Book - Computing With Spatial Trajectories of Humans
Book - Computing With Spatial Trajectories of Humans
With the rapid development of wireless communication and mobile computing tech-
nologies and global positioning and navigational systems, spatial trajectory data has
been mounting up, calling for systematic research and development of new com-
puting technologies for storage, preprocessing, retrieving, and mining of trajectory
data and exploring its broad applications. Thus, computing with spatial trajectories
becomes an increasingly important research theme. Although there are many books
on spatial databases, mobile computing, and data mining, this is a unique book ded-
icated to computing with spatial trajectory data, with a broad spectrum of coverage
and authoritative overview.
Despite of many years of research on algorithms and methods on general database
systems and data mining, spatial trajectory computing deserves dedicated study and
in-depth treatment because of its unique nature of data semantics, structures, and
applications. Such a unique nature calls for in-depth study of many interesting is-
sues, including spatial trajectory data preprocessing, trajectory indexing and query
processing, trajectory pattern mining, uncertainty and privacy in trajectory data,
location-based social networks, and application of trajectory computing, such as
for driving and other activities. This book, Computing with Spatial Trajectories,
by Yu Zheng and Xiaofang Zhou, provides a comprehensive coverage on the above
topics timely, with conciseness and clear organization. The authors of the book are
active researchers on different aspects on computing with spatial trajectories, and
have made tangible contributions to the progress of this dynamic research frontier.
This ensures that the book is authoritative and reects the current state of the art.
Nevertheless, the book gives a balanced treatment on a wide spectrum of topics,
well beyond the authors own methodologies and research scopes.
Computing with spatial trajectories is still a fairly young and dynamic research
eld. This book may serve researcher and application developers a comprehensive
overview of the general concepts, techniques, and applications on trajectory index-
ing, search and data mining, and help them explore this exciting eld and develop
new methods and applications. It may also serve graduate students and other inter-
ested readers a general introduction to the state-of-the-art of this promising research
theme.
I nd the book is enjoyable to read. I hope you like it too.
v
Preface
vii
viii Preface
- The rst two chapters of the book introduce the foundation of technology dealing
with spatial trajectory data: Trajectory Preprocessing (Chapter 1) and Trajectory
Indexing and Retrieval (Chapter 2).
- The second section is comprised of 6 advanced topics: Uncertainty in Spatial
Trajectories (Chapter 3), Privacy of Spatial Trajectories (Chapter 4), Trajectory
Pattern Mining (Chapter 5), Activity Recognition Based on Spatial Trajectories
(Chapter 6), Trajectory Analysis for Driving (Chapter 7), and Location-Based
Social Networks (Chapter 8 and 9).
Specically, the book gradually introduces the concepts and technologies for
solving the problems that newcomers will be faced with when exploring this eld,
starting from the preprocessing and managing of spatial trajectories, then to min-
ing uncertainty, privacy, and patterns of trajectories, and nally ending with some
advanced applications based on spatial trajectories including activity recognition,
Preface ix
Foundation
Trajectory Indexing and Retrieval (In Databases)
Chapter 1: While spatial trajectories carry rich information that can be used in a
variety of applications, we have to deal with a number of issues before using them.
Generally, the continuous movement of an object is recorded in an approximate
form as discrete samples of location points. A high sampling rate of location points
generates accurate trajectories, but will result in a massive amount of data leading
to enormous overhead in data storage, communications, and processing. Thus, it is
vital to design data reduction techniques that compress the size of a trajectory while
maintaining the utility of the trajectory. Meanwhile, a trajectory is usually generated
with occasional outliers or some noisy points caused by the poor signal of location
positioning systems. For example, when traveling in a city canyon, the satellite
signals to a GPS device might be very poor, thereby generating some location points
with a signicant offset to the real positions. Sometimes, the offsets are more than a
mile, creating noise in the trajectories and reducing the effectiveness of techniques
and systems that use such trajectories. As a result, techniques for ltering the noisy
points are needed for preprocessing spatial trajectories.
To address these two issues, Chapter 1 rst presents data reduction techniques
that can run in a batch mode after the data is collected or in an online mode as
the data is being collected. The second part of the chapter introduces methods for
ltering measurement noise from location trajectories, including mean and median
ltering, the Kalman lter, and the particle lter. In short, this chapter provides a
newcomer with the fundamentals for preprocessing spatial trajectories.
x Preface
While providing richer information beyond snapshot location data, spatial trajec-
tories also demand more advanced techniques for trajectory-based activity recog-
nition. To help newcomers address this issue, Chapter 6 overviews the existing re-
search into trajectory-based activity recognition and classies them into categories
according to the number of users involved in the training and inference stage.
Chapter 7: The trajectories of vehicles have a potentially strong connection to
transportation, as driving is one of the most central aspects of our lives. Rich knowl-
edge can be learned from these trajectories, such as information about road net-
works, trafc conditions, and driver behavior, contributing to different aspects of
the driving experience. For example, creating a road map from GPS trajectories can
be a less expensive way to make up-to-date road maps than traditional methods.
Meanwhile, effective route recommendations can be enabled based on the trajecto-
ries of one or more experienced drivers.
Chapter 7 describes how a driver benets from the analysis of spatial trajectories,
following the paradigm of creating road map from GPS trajectories mapping a
single trajectory to road networks mining effective driving routes from driver-
s trajectories personalizing driving routes for a particular driver based on the
preferences learned from her trajectories.
Chapter 8 and 9: The advances in location positioning and wireless commu-
nication technologies have led to a myriad of user-generated spatial trajectories,
which imply rich information about user behavior, interests, and preferences. Re-
cently, people have started sharing their trajectory data via online social networking
services for a variety of purposes, fostering a number of trajectory-centric LBSNs
(location-based social networks). For example, users can record travel routes with
GPS trajectories to share travel experiences in an online community (e.g., GeoLife),
or log jogging and bicycle trails for sports analysis and experience sharing. In ad-
dition, the check-ins of an individual in Foursquare and the photo trips of a user
in Flickr can be regarded as spatial trajectories. These trajectory-centric LBSNs en-
able us to understand users and locations respectively, and explore the relationship
between them.
On the one hand, we can understand an individual and the similarity between
two different users with user-generated trajectories, thereby providing a user with
personalized services and enabling friend recommendation and community discov-
ery. On the other hand, we are able to understand a location and the correlation
between two different locations based upon the information from users, thereby of-
fering users better travel recommendations.
Chapter 8 denes the meaning of location-based social network and discusses
the research philosophy behind LBSNs from the perspective of users and locations.
Under the circumstances of a trajectory-centric LBSN, this chapter explores two
fundamental research points concerned with understanding users in terms of their
locations. One is modeling the location history of an individual using the individuals
trajectory data. The other is estimating the similarity between two different people
according to their location histories. The similarity represents the strength of con-
nection between two users in a location-based social network, and can enable friend
recommendations and community discovery. Some possible methods for evaluation
Preface xiii
Many thanks to Mr. Jing Yuan for helping us compile this book.
Special thanks to the editorial board consisting of Ralf Hartmut Guting, Hans-Peter
Kriegel, and Hanan Samet for their constructive suggestion and comments.
Thanks John Krumm for proposing the name of the book.
xv
Contents
Part I Foundations
1 Trajectory Preprocessing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Wang-Chien Lee and John Krumm
1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2 Trajectory Data Generation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.3 Performance Metrics and Error Measures . . . . . . . . . . . . . . . . . . . . . 8
1.4 Batched Compression Techniques . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
1.5 On-Line Data Reduction Techniques . . . . . . . . . . . . . . . . . . . . . . . . . 15
1.6 Trajectory Data Reduction Based on Speed and Direction . . . . . . . . 17
1.7 Trajectory Filtering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
1.7.1 Sample Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
1.7.2 Trajectory Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
1.8 Mean and Median Filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
1.9 Kalman Filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
1.9.1 Measurement Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
1.9.2 Dynamic Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
1.9.3 Entire Kalman Filter Model . . . . . . . . . . . . . . . . . . . . . . . . . 25
1.9.4 Kalman Filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
1.9.5 Kalman Filter Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
1.10 Particle Filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
1.10.1 Particle Filter Formulation . . . . . . . . . . . . . . . . . . . . . . . . . . 29
1.10.2 Particle Filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
1.10.3 Particle Filter Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
1.11 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
xvii
xviii Contents
2.2.1 P-Query . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
2.2.2 R-Query . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
2.2.3 T-Query . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
2.2.4 Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
2.3 Trajectory Similarity Measures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
2.3.1 Point to Trajectory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
2.3.2 Trajectory to Trajectory . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
2.4 Trajectory Indexes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
2.4.1 Augmented R-tree . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
2.4.2 Multiversion R-trees . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
2.4.3 Grid Based Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
2.5 Query Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
2.5.1 Query Processing in Spatial Databases . . . . . . . . . . . . . . . . 53
2.5.2 P-query . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
2.5.3 T-Query . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
2.5.4 R-Query . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
2.6 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
Wang-Chien Lee
The Pennsylvania State University, USA, e-mail: [email protected]
John Krumm
Microsoft Research, Redmond, WA, USA, e-mail: [email protected]
Ke Deng
The University of Queensland, Brisbane, Australia,
e-mail: [email protected]
Kexin Xie
The University of Queensland, Brisbane, Australia,
e-mail: [email protected]
Kevin Zheng
The University of Queensland, Brisbane, Australia,
e-mail: [email protected]
Xiaofang Zhou
The University of Queensland, Brisbane, Australia,
e-mail: [email protected]
Goce Trajcevski
Northwestern University, USA, e-mail: [email protected]
Mohamed F. Mokbel
University of Minnesota, USA, e-mail: [email protected]
Chi-Yin Chow
City University of Hong Kong, China, e-mail: [email protected]
Hoyoung Jeung
xxiii
xxiv List of Contributors
Editorial Board
Ralf Hartmut Guting
University of Hagen, Germany, e-mail: [email protected]
Hans-Peter Kriegel
Institut fur Informatik, Ludwig-Maximilians Universitat Munchen, Germany,
e-mail: [email protected]
Hanan Samet
University of Maryland, USA, e-mail: [email protected]
Acronyms
xxv
Part I
Foundations
Chapter 1
Trajectory Preprocessing
Abstract A spatial trajectory is a sequences of (x,y) points, each with a time stamp.
This chapter discusses low-level preprocessing of trajectories. First, it discusses how
to reduce the size of data required to store a trajectory, in order to save storage costs
and reduce redundant data. The data reduction techniques can run in a batch mode
after the data is collected or in an on-line mode as the data is collected. Part of this
discussion consists of methods to measure the error introduced by the data reduction
techniques. The second part of the chapter discusses methods for ltering spatial
trajectories to reduce measurement noise and to estimate higher level properties of
a trajectory like its speed and direction. The methods include mean and median
ltering, the Kalman lter, and the particle lter.
1.1 Introduction
Owing to the rapid advent of wireless communication and mobile computing tech-
nologies, the vision of pervasive computing is becoming a reality. Mobile devices,
including smart phones, PDAs, navigational systems on vehicles, and RFIDs on
cargos, have played a growing important role in various applications in our dai-
ly life. Nowadays, many of these mobile devices have location positioning and
wireless communicating capabilities and thus are able to locally log or dynami-
cally report their locations to the server.1 Indeed, there is a tremendous demand
for location tracking of moving objects from various location-based services (LBS),
Wang-Chien Lee
Department of Computer Science and Engineering, The Pennsylvania State University, University
Park, PA 16802, USA. e-mail: [email protected]
John Krumm
Microsoft Research, Redmond, WA 98052, USA. e-mail: [email protected]
1 We call these mobile devices (and their carriers) location-aware moving objects or moving objects
in short.
3
4 Wang-Chien Lee and John Krumm
2 See http://www.pyramidresearch.com/store/Report-Location-Based-Services.htm
3 http://www.e-bus.taipei.gov.tw/
1 Trajectory Preprocessing 5
such systems, the locations of tracked moving objects are reported to the location
server in accordance with the adopted reporting schemes, e.g. periodically. The loca-
tion point data (which form trajectories of moving objects) are then uploaded to the
moving object databases. On the other hand, the LBS applications submit queries
to the location server to retrieve moving objects of interests (as well as their at-
tributes such as locations and other phenomenons/patterns discovered from moving
behaviors of objects) to meet various application needs.
As discussed earlier, systems in support of location based services naturally gen-
erate enormous volumes of data with measurement noise. Consequently, the data
reduction and ltering techniques are particularly important for cleansing, trans-
mission, and storage of trajectory data in location based services. Even though ob-
ject movement is continuous, the representation of object trajectories is inevitably
in a discrete form due to the nature of sampling-based data acquisition approach.
Thus, an intuitive strategy to reduce the volumes of trajectory data is to reduce the
sampling rate of data acquisition or to reduce the number of sample points in the
trajectory representation. However, the question is whether we are able to discard
some sample points without sacricing the quality of trajectory data required for
supporting the targeted applications. Additionally, what techniques can be used to
effectively lter measurement noise not only in the raw location points of trajec-
tories but also in high-level properties of trajectories such as direction and speed.
Fortunately, due to the linear characteristics of the underlying transportation infras-
tructure, object movements in many LBS applications exhibit predictable patterns.
As a result, many redundant and erroneous information can be removed from the
trajectory without compromising much of the application requirements.
In the following, we review some trajectory data reduction strategies for LBSs.
We rst consider the location update scenarios and then review the data reduction
strategies under these scenarios. Accordingly, we classify the data reduction strate-
gies into two categories: 1) off-line compression and 2) on-line reporting.
After discussing data reduction, we review ltering techniques, including mean
and median ltering, the Kalman lter, and the particle lter.
4XHULHV
5HVXOWV /%6 $SSOLFDWLRQ
0RYLQJ 2EMHFWV :LUHOHVV
1HWZRUN
4XHULHV
5HVXOWV
02'
/RFDWLRQ 6HUYHU /%6 $SSOLFDWLRQ
Fig. 1.1 A high-level system model for typical location-based services. The locations of tracked
moving objects are reported to the location server via wireless communications. The LBS applica-
tions submit queries to the server to retrieve moving object data for analysis or other application
needs.
6 Wang-Chien Lee and John Krumm
A trajectory is the path that a moving object follows through space as a function of
time. Thus, it can be captured as a time-stamped series of location points, denoted
as {x1 , y1 ,t1 , x2 , y2 ,t2 , ..., xN , yN ,tN } where xi , yi represent geographic coordi-
nates of the moving object at time ti and N is the total number of elements in the
series. To generate the trajectory, a moving object needs to acquire its coordinates
x, y at time t. There are many positioning technologies, e.g. global positioning sys-
tem (GPS), that can be employed to determine the location of a moving object.
For example, most of the smart phones already have a built-in GPS receiver and
thus can easily derive their own locations. Augmenting the GPS, some positioning
techniques have used wi access points as the underlying reference system to de-
termine the location of a moving object. Additionally, even in situations where the
GPS signal is poor and there is no nearby wi access point to serve as a positioning
reference, the dead reckoning techniques can be used to estimate the position of
a moving object by advancing from a known position using course, speed, time and
distance to be traveled. In other words, where a moving object will be at a certain
time can be derived based upon known or estimated speeds over elapsed time, and
course. Notice that dead reckoning relies on accurate estimation of speed, elapsed
time and direction, which can be measured by using accelerometers and g-sensors
built in many mobile devices today. Thus, while the traditional navigational methods
of dead reckoning for location acquisition have been replaced by modern position-
ing technologies, it is still very useful for generating trajectory data, especially when
GPS reception is lost, e.g. in a tunnel. Since positions of moving objects calculated
by dead reckoning is based on previous positions and estimated distance and direc-
tions, the errors in subsequent locations are cumulative. Therefore, the dead reck-
oning methods only serve as a remedy when the more accurate modern positioning
techniques are not applicable.
Given that the time-stamped geographical coordinates can be sampled arbitrarily
by a moving object, the next question is whether the moving object needs to report
all the sampled trajectory data to the location server for upload to the mobile ob-
ject database. Obviously the answer is dependent on the application requirements.
Since the data acquisition occurs at the moving object, we assume that the location
data it possesses have the highest precision. On the contrary, the applications may
allow some imprecision based on their requirements. Thus, the data precision at the
location server is not expected to be as high as what the moving object has. In sum-
mary, the data at the moving object are considered as precise and the required data
precision at the location server is determined by the supported LBS applications.
Generally speaking, there are two categories of data reduction techniques report-
ed in the literature of moving object and trajectory management. These approaches
aim to reduce the communication and storage overhead of trajectory data repre-
sentation while not to compromise much precision in the new data representation
of trajectory. The basic idea behind data reduction techniques in the rst catego-
ry, called batched compression techniques, is to rst collect the full set of sampled
location data points and then compress the data set by discarding redundant loca-
1 Trajectory Preprocessing 7
tion points for transmission to the location server. Because the full data set is taken
into consideration by the compression algorithms, the results tend to approaching
the global optimal better than the techniques in the other category. These batched
compression techniques are very suitable for off-line uploading and analysis of tra-
jectories at various Web 2.0 sites such as Everytrail4 and Bikely5 . Take Everytrail
as an example, it provides trajectory logging tools on iphone and Android phones
for users to record their trips. By uploading a trip trajectory (usually after the trip
is completed), a user can annotate the trajectory with pictures and travelogues for
sharing with her friends. Thus, the batched compression techniques can be used to
reduce the transmission and storage overheads for the user and the hosting server.
For many LBS applications which require timely updates of the moving object-
s locations, e.g. eet management and trafc monitoring applications, the batched
compression techniques may not be applied directly. In these applications, the lo-
cation server needs to know the whereabouts of moving objects constantly. Since
continuous location updates of moving objects is infeasible, data reduction of the
sample points in a trajectory is usually achieved on-line by selective updates of the
locations based on specied precision requirements. Thus, this category of trajectory
data reduction techniques is named as on-line data reduction techniques. Two ideas
are usually exploited in this category of on-line data reduction techniques: (i) use a
line segment to t as many location points in a trajectory as possible; (ii) predict the
object movements and report only those location points deviating signicantly from
the prediction. Techniques based on (i) are able to capture the geometric properties
of trajectories pretty well with linear approximation. On the other hand, techniques
based on (ii) may capture additional features, such as speed and headings, of object
movements and use them in prediction. Based on previously reported location of a
moving object, the server is able to predict its next move even though the predicted
location may not be exactly accurate. Later in this chapter we discuss the Kalman l-
ter and particle lter, which can both be used for trajectory prediction. By obtaining
a prediction model from the server, the moving object applies the same prediction
algorithm on the previously reported object locations to gure out where the server
perceives as its current location. As a result, by comparing the location perceived by
the server and its true location (acquired from its positioning mechanism locally),
the moving object is able to decide whether a location update should be reported to
the server in order to calibrate the precision of object location and trajectory.
Figure 1.2 illustrates a simple update policy, called point policy, that models the
tracked object as a jumping point [5]. This policy assumes that the object jumps to a
distant point from its current location, stays around the new location for a while, then
jumps to another remote location and stays there for a while. The process repeats
in the trajectory of the tracked moving object. As shown in the gure, the object
moves to location A and sends a location update to the location server. At this point,
a circular neighborhood of radius r is set. As long as the object moves within the
neighborhood of location A, no update report is sent to the server. When the object
4 http://www.everytraiil.com
5 http://www.bikely.com
8 Wang-Chien Lee and John Krumm
$ % &
U
U U
Fig. 1.2 The point update policy. A moving object does not update its new locations as long as
they are within the error threshold of the previously reported location.
The primary goal of the trajectory data reduction techniques is to reduce the data
size of trajectory representation without compromising much of its precision. Ad-
ditionally, for the on-line data reduction techniques, the location of an object needs
to be reported to the server if the imprecision of the predicted location goes beyond
an application-dependent error threshold. Thus, there is a need to nd appropriate
metrics and error measures for use in algorithms and performance evaluation. The
following are the main performance metrics often used to evaluate the efciency
and effectiveness of the trajectory data reduction techniques:
Processing time: the execution time spent to run a trajectory data reduction algo-
rithm;
Compression rate: the ratio in the size of an approximate trajectory vs. the size
of its original trajectory;
Error measure: the deviation of an approximate trajectory from its original tra-
jectory.
Among them, the processing time assesses how efciently a trajectory data re-
duction technique processing a given trajectory data set. On the other hand, the com-
1 Trajectory Preprocessing 9
pression rate and error measure are used to assess the effectiveness of the examined
technique. Notice that there may be a tradeoff between these two effectiveness met-
rics. Thus, trajectory data reduction techniques are usually compared in a plot of
these two metrics in order to nd the Pareto front.
From the above, we can observe that there is a room to further dene different
error measures while the denition of compression rate is quite straightforward.
For the rest of the section, we discuss two error measures, namely, perpendicular
Euclidean distance and time synchronized Euclidean distance, that are widely used
in literature since they have an implication in specifying the imprecision allowed by
application and the performance [24, 27, 6].
To specify the allowed imprecision, distance-based error measure is a natural
choice due to its simplicity and ability to deal with positions of points in multi-
dimensional space. Take the error threshold used in on-line data reduction tech-
niques as an example. The distance between a location on the original trajectory
acquired from the positioning mechanism and the estimated location on the approx-
imated trajectory intuitively represents how closely the estimated location approxi-
mates the original location.6 With the same reasoning, the aggregated distance be-
tween the approximated trajectory and the original trajectory can be used to measure
the error introduced by the data reduction process. As mentioned earlier, one of the
error measure is to compute the perpendicular Euclidean distances, i.e. the shortest
distance, from each of the sampled location points in the original trajectory to the
approximated trajectory. As such, we can measure the error by the average or total
distances.
Figure 1.3 illustrates the computation of error measure based on the perpendicu-
lar Euclidean distance between the original trajectory acquired by a moving object
and an approximated trajectory generated by applying one of the trajectory data
reduction algorithms. As shown in the gure, the original trajectory is represent-
ed by a series of time-stamped location points denoted by {p0 , p1 , ..., p16 } where
pi is the location of the moving object at time ti . On the other hand, the approx-
imated trajectory, reduced from the original trajectory, consists of three location
points, p0 , p5 and p16 . Notice that the approximated trajectory can also be repre-
S S
S
S S
S
S S
S 3 S
S S
S S S
3 S
S S
S
Fig. 1.3 Error measure based on perpendicular Euclidean distance. This error measure takes into
account the geometric relationship of the trajectories. However, the temporal factor is not incorpo-
rated in this error measure.
6Note that here we ignore the inherent noises and imprecision from the location acquisition mech-
anism and assume the measured original location to be precise.
10 Wang-Chien Lee and John Krumm
sented as two line segments p0 p5 and p5 p16 . Thus, the approximated trajectory can
be interpreted as the path in which the object moved from p0 to p5 and then to
p16 . Based on this interpretation, the sampled location points on the subtrajecto-
ries {p0 , p1 , ..., p5 } and {p5 , p6 , ..., p16 } should be projected to the corresponding
line segments p0 p5 and p5 p16 for error measurement. Figure 1.3 shows the esti-
mated location points p0 , p1 , ... and p5 on the line segment p0 p5 , corresponding to
p0 , p1 , ... and p5 , respectively. Notice that the perpendicular Euclidean distance be-
tween a location point on the original trajectory to the approximated trajectory is
the shortest distance between the point and the approximated trajectory. Thus, the
error between the approximated trajectory and the original trajectory can be cal-
culated by summing up the distances of the projection or computing their average
distance. Notice that the error measurements by total or average are actually quite
sensitive to the number of sampled location points in the original trajectory [24]. A
remedy to this deciency is to take into consideration all possible location points
on the original trajectory instead of limiting the error measure to only the sampled
location points. This can be achieved by interpolating some pseudo sampled points
on the original trajectory. For example, ve pseudo sampled points between p2 and
p3 and their projection on the line segment p0 p5 (indicated by the ve dash lines)
are illustrated in Figure 1.3. When an innite number of pseudo sample points are
considered, the area between the original trajectory and the approximated trajectory
naturally measures the error between them.
The aforementioned approach elegantly captures the error in the approximated
trajectory using perpendicular Euclidean distance. The idea of projecting each pos-
sible points in the original trajectory onto the line segments of the approximated tra-
jectory, nevertheless, takes only geometric properties of the trajectories into account.
The temporal factor of object movement in the trajectories is not considered in the
projection. Notice that a sampled data point x, y,t in the original trajectory denotes
the time t when the moving object are located at x, y. Thus, there is a need to also
consider the temporal factor in the projection.
The time synchronized Euclidian distance has been proposed as a new error mea-
sure for approximated trajectories generated by trajectory data reduction algorithm-
s [24, 27]. The intuition is that the movement projected on the approximated tra-
jectory should be synchronized in terms of time with the actual movement on the
original trajectory. Consider an original trajectory represented by n sampled loca-
tion points. It can also be seen as consisting of n 1 line segments. Given one of
those line segments, even though there is no sampled location points acquired on
this line segment, most applications implicitly assume that the object moves in a
constant speed along the specic line segment. This interpretation of object moving
behavior has been made earlier on the approximated trajectory as well. Since the
approximated trajectory is actually a subset of the original trajectory, their location
points can be used naturally for time and spatial synchronization of the represented
object movement on both trajectories. Consider a line segment on an approximated
trajectory and its corresponding subtrajectory on the original trajectory, their end
points are the same and thus synchronized. Moreover, the projection of the sampled
location points on the original trajectory onto the corresponding line segment on the
1 Trajectory Preprocessing 11
S S
S
S S
S
S 3 S S
S S S
S S S
3 S
S S
S
Fig. 1.4 Error measure based on time synchronized Euclidean distance. This error measure takes
into account both the geometric relationship and temporal factor of the trajectories.
12 Wang-Chien Lee and John Krumm
Given a trajectory that consists of a full series of time-stamped location data points,
a batched compression algorithm aims to generate an approximated trajectory by
discarding some location points with negligible error from the original trajectory.
This is similar to the line generalization problem, which has been well studied in
the computer graphics and cartography research communities [18, 32, 25, 6]. Works
on cartographic line generalization aim to derive small-scale map data from the
large-scale high-granularity data. As a result, they can be used to reduce the number
of location points in trajectories and thus save storage space.
Some of the line generalization algorithms are very simple in nature. The idea
is to retain a fraction of the location points in the original trajectory, without con-
sidering the redundancy or other relationships between neighboring data points. For
example, the uniform sampling algorithm may keep the every i-th location points
(e.g. 5th, 10th, 15th, etc) and discard the other points [27]. Since the original trajec-
tory is acquired as a sample of the true trajectory, the new trajectory generated by
the uniform sampling process basically is an approximated trajectory with a more
coarse granularity. The uniform sampling approach is very efcient computation-
ally, but it may not be useful for certain applications that require better capture of
some special trajectory details.
Notice that every location point in the original trajectory may contain different
amount of information required to represent the trajectory and that some neighbor-
ing location points may contain redundant information, the location points in an
approximated trajectory can be selected based on other criteria instead of uniform
sampling. A well-known algorithm, called Douglas-Peucker (DP), can be used to
approximate the original trajectory [9, 15]. The idea is to replace the original trajec-
tory by an approximate line segment. If the replacement does not meet the specied
error requirement, it recursively partitions the original problem into two subprob-
lems by selecting the location point contributing the most errors as the split point.
This process continues until the error between the approximated trajectory and the
original trajectory is below the specied error threshold. The DP algorithm aims to
preserve directional trends in the approximated trajectory using the perpendicular
Euclidean distance as the error measure.
Figure 1.5 illustrates the rst two steps of the Douglas-Peucker algorithm when it
is applied on the same trajectory in earlier examples. As shown, in the rst step (see
Figure 1.5 (a)), the starting point p0 and end point p16 are selected to generate an
approximate line segment p0 p16 . The perpendicular Euclidean distance from each
sampled location point on the original trajectory to the approximate line segment
p0 p16 is derived. Since some of the perpendicular error distances are greater than the
pre-dened error distance threshold, the sampled location point deviating the most
from p0 p16 , i.e. p9 in this example, is chosen as the split point. As a result, in the
second step of the algorithm (see Figure 1.5 (b)), a trajectory p0 , p9 , p16 is used to
approximate the original trajectory. In this step, the original problem is divided into
two subproblems where the line segment p0 p9 is to approximate the subtrajectory
{p0 , p1 , ..., p9 } and the line segment p9 p16 is to approximate the other subtrajectory
1 Trajectory Preprocessing 13
{p9 , p10 , ..., p16 }. As shown, in the rst subproblem, several sampled location points
have their perpendicular error distances to p0 p9 greater than the pre-dened error
distance threshold. Therefore, p5 , the sampled location point deviating the most
from p0 p9 , is chosen as the split point and the split subtrajectories are processed
recursively until all the sampled location points have perpendicular distances to their
approximate line segments within the error threshold. On the other hand, in the
second subproblem, the perpendicular distances of all the sample points to the line
segment p9 p16 are smaller than the error threshold. Therefore, further splitting is
not necessary.
The Douglas-Peucker algorithm is widely used in cartographic and computer
graphic applications. Several studies have analyzed and evaluated various line gen-
eralization algorithms mathematically and perceptually and ranked the Douglas-
Peucker algorithm highly [18, 32, 25]. Many cartographers considers the Douglas-
Peucker algorithm as one of the most accurate line generalization algorithms avail-
able but some think it is too costly in terms of processing time. The time complexity
of the original Douglas-Peucker algorithm is O(N 2 ) where N is the number of trajec-
tory location points. Several improvements have been proposed for implementation
of the Douglas-Peucker algorithm and reduce its time complexity to O(NlogN) [15].
As we discussed earlier, the error measure of perpendicular Euclidean distance
used in the Douglas-Peucker algorithm only takes into account the geometric aspec-
t of the trajectory representation. Unfortunately, it does not capture the important
temporal aspect of the trajectories very well. To address this issue, Meratina and de
S S
S
S S
S
3 S S
S
S S
3 S
S S
S
D 6WHS
S S
S
S S
S
3 S S
S
S S
3 S
S S
S
E 6WHS
Fig. 1.5 The Douglas-Peucker algorithm. Line segments are used to approximate the original tra-
jectory. The original trajectory is split into two subtrajectories by selecting the location point con-
tributing the most errors as the split point. In Step (1), p9 is selected as the split point. In Step (2),
p3 is selected as the split point.
14 Wang-Chien Lee and John Krumm
By propose to adopt a new error metrics, called time-distance ratio metric, to re-
place the perpendicular Euclidean distance in the Douglas-Peucker algorithm [24].7
They claim that the improvement is important because this new error measure is not
only more accurate but also taking into consideration both geometric and temporal
properties of object movements. A modied Douglas-Peucker algorithm, called the
top-down time-ratio (TD-TR) algorithm, is proposed in [24] because the Douglas-
Peucker algorithm decomposes the trajectory approximation problem in a top-down
fashion [19].
The Douglas-Peucker algorithm is based on a heuristic that selects the most de-
viating location points for inclusion in the approximated trajectory in order to lower
the introduced error. However, there is no guarantee that the selected split points
are the best choices. To ensure that the approximated trajectory is optimal, dynamic
programming technique can be employed even thought its computational cost is ex-
pected to be high. The Bellmans algorithm [3] applies the dynamic programming
technique to approximate a continuous function g(x) by a nite number of line seg-
ments. Even though the algorithm considers a one-dimensional value space, it can be
generalized to compute an approximated trajectory in the two-dimensional spatial
space. The optimization problem is formulated as to minimize the area between
the original function and the approximate line segments. In this algorithm, including
more line segments in the approximated trajectory ts the original trajectory better
but is less effective in terms of compression rate. Thus, the Bellmans algorithm can
also adopt a penalty to control the tradeoff between compression rate and quality.
Since Bellmans algorithm approximates a continuous function, it can not handle
loops, which may occur in trajectory data. Therefore, to employ the Bellmans algo-
rithm for trajectory data reduction, the trajectories with loops need to be segmented
rst to eliminate loops. Additionally, the original Bellmans algorithm has a time
complexity of O(N 3 ) where N is the number of trajectory location points, which
is very expensive when compared to the Douglas-Peucker algorithm. An improved
implementation has been proposed to reduce its time complexity to O(N 2 ) [23].
A natural complement to the top-down Douglas-Peucker algorithm is the bottom-
up algorithm which, starting from the nest possible approximation of a trajectory,
merges line segments in the approximation until some stopping criteria is met. Giv-
en a trajectory of N location points, the algorithm rst creates N/2 line segments,
which represent the nest possible approximation of the trajectory. Next, by calcu-
lating the cost of merging each pair of adjacent line segments, the algorithm begins
to iteratively merge the lowest-cost pair. When a pair of adjacent line segments are
merged, the algorithm needs to perform some book-keeping to make sure the cost of
merging the new line segment with its right and left neighbors are considered. The
algorithm has been used extensively to support a variety of time series data mining
tasks and thus can be extended for trajectory data reduction [19, 22, 20, 21].
7 The time-distance ratio metric is the same as the time synchronized Euclidean distance discussed
in Section 1.3.
1 Trajectory Preprocessing 15
The batched compression algorithms, especially the Bellmans algorithm, are ex-
pected to produce high-quality approximations due to the access of the whole trajec-
tory. However, they are not as practical as the on-line algorithms in realistic applica-
tion scenarios. For example, a eet management application may require trajectory
data from tracked moving objects, e.g. trucks, to be reported in a timely fashion back
to the eet control center in order to support multiple continuous queries on truck
status in real time. To address the issue of excessive trajectory data continuously
generated, there is a demand for on-line trajectory data reduction techniques.
While its important to reduce the data size of trajectories in order to alleviate
storage and communication overheads as well as the computational workload at
the location server, there may be certain trajectory properties to be preserved for
application needs. Therefore, the on-line trajectory data reduction techniques needs
to select some negligible location points intelligently in order to retain a satisfactory
approximated trajectory.
One of the essential requirement for on-line processing algorithms is to be able
to make efcient on-line decisions when a location point is acquired, i.e. to decide
whether to retain the location point in the trajectory or not. The reservoir sampling
algorithms [30] is well suited for processing trajectory data. The basic idea behind
the reservoir sampling algorithms is to maintain a reservoir of size R (or greater
than R) which are used to to generate an approximated trajectory of size R. Since
the location points in an on-going trajectory are acquired continuously, we do not
know in advance the nal size of the trajectory. Thus, the key issue is how to select
without replacement an approximated trajectory of size R, i.e. once a location point
is discarded, there is no way to get it back into the reservoir.
The reservoir algorithm works as follows. It puts the rst R location points in the
reservoir and decide whether to insert a new location point into the reservoir when
it is acquired. Suppose that the k-th location point is acquired (where k > R). The
algorithm randomly decides, with a probability of R/k, whether this location point
should be included as a candidate point in the nal approximated trajectory. If the
decision is positive, one of the R existing candidates in the reservoir is discarded
randomly to make space for the new location point. As such, the algorithm always
maintains only R location points in the reservoir, which form a random sample of
the original trajectory. Evidently, the reservoir algorithm always maintains a uniform
sample of the evolving trajectory without even knowing the eventual trajectory size.
Overall, the time complexity is O(R(1 + logN/R)), where N is the trajectory size.
While the reservoir sampling algorithm is efcient, it does not consider the se-
quential, spatial and temporal properties of a trajectory. Since all the location points
included in the nal trajectory are determined randomly and independently, tem-
poral locality and spatial locality in nearby location points are not considered. The
sliding window algorithm developed for time series data mining can be adapted for
trajectory approximation [19, 24]. The idea is to t the location points in a growing
sliding window with a valid line segment and continue to grow the sliding window
(and its corresponding line segment) until the approximation error exceeds some
16 Wang-Chien Lee and John Krumm
S S
S
S S
S
3 S S
S
S S
3 S
S S
S
Fig. 1.6 The sliding window algorithm. The idea is to t the location points in a growing sliding
window with a valid line segment and continue to grow the sliding window and its corresponding
line segment until the approximation error exceeds some error bound.
error bound. The algorithm rst initializes the rst location point of a trajectory as
the anchor point pa and then starts to grow the sliding window (i.e. by including
the next location point in the window). When a new location point pi is added to
the sliding window, the line segment pa pi is used to t the subtrajectory consisting
of all the location points within the sliding window. As long as the distance errors
for all the location points in the sliding window derived against the potential line
segment pa pi are smaller than the user-specied error threshold, the sliding win-
dow grows by including the next location point pi+1 . Otherwise, the last valid line
segment pa pi1 is included as part of the approximated trajectory and pi is set as
the new anchor point. The algorithm continues until all the location points in the
original trajectory are visited.
Figure 1.6 illustrates the sliding window algorithm. First, p0 is set as the anchor
point and the initial sliding window is {p0 , p1 }. Next, p2 is added into the slid-
ing window. Since p0 p2 ts {p0 , p1 , p2 } very well, the sliding window grows into
{p0 , p1 , p2 , p3 }. Again, all the location points within the sliding window do not have
error greater than a pre-determined error threshold, i.e. p0 p3 ts {p0 , p1 , p2 , p3 }
sufciently well. Thus, the algorithm continues to grow the sliding window into
{p0 , p1 , p2 , p3 , p4 }. This time, the errors for some location points in the sliding win-
dow, i.e. p1 , p2 and p3 , are greater than the error threshold. Thus, the last valid line
segment, i.e. p0 p3 , is included as a part of the approximated trajectory. Next, the
anchor point and the sliding window are reset as p3 and {p3 , p4 }, respectively. The
algorithm continues to process the rest of the trajectory and then eventually chooses
to t {p3 , p4 , p5 , p6 } with p3 p6 , {p6 , p7 , p8 , p9 } with p6 p9 , and {p9 , p10 , ..., p16 }
with p9 p16 . Thus, the nal approximated trajectory is {p0 , p3 , p6 , p9 , p16 }.
Meratnia and de By have applied the sliding window algorithm for on-line trajec-
tory data reduction [24]. They consider both of the perpendicular Euclidean distance
and time synchronized Euclidean distance as error measures and rename them as Be-
fore Open Window (BOPW) algorithms, because the location points included in the
nal approximate trajectory are located before those that result in excessive error.
Moreover, Meratnia and de By also apply the heuristic of the Douglas-Peucker al-
gorithm in the open window algorithm. Instead of choosing the location points that
result in the longest valid line segments, the new algorithm, called Normal Opening
Window (NOPW), chooses location points with the highest error within their sliding
1 Trajectory Preprocessing 17
window as the closing point of the approximating line segment as well as the new
anchor point. As it is in the Douglas-Peucker algorithm, this heuristic works very
well in reducing the approximation error. With the new anchor point, the NOPW
algorithm continues to process the rest of the trajectory.
Figure 1.7 illustrates the NOPW algorithm. First, p0 is set as the anchor point
and the initial open window is {p0 , p1 }. Next, p2 is added into the open window.
Similar to the illustration in Figure 1.6, p0 p2 and p0 p3 respectively ts {p0 , p1 , p2 }
and {p0 , p1 , p2 , p3 } sufciently well, because all the location points within these
windows do not have error greater than a pre-determined error threshold. When
the opening window grows into {p0 , p1 , p2 , p3 , p4 }, the errors for p1 , p2 and p3 are
greater than the error threshold. Instead of choosing p3 as the closing point, the
NOPW algorithm chooses p2 as the closing point to include the line segment p0 p2
as a part of the approximated trajectory. Then, the anchor point and the opening
window are reset as p2 and {p2 , p3 , p4 , p5 }, respectively. The algorithm continues
to process the rest of the trajectory and then eventually chooses {p2 , p2 , p5 , p8 , p16 }
as the approximated trajectory.
The data reduction techniques described earlier all use a subset of the location points
in the original trajectory as an approximation. In these algorithms, the approxima-
tion error, measured by variants of Euclidean distances such as perpendicular Eu-
clidean distance or time synchronized Euclidean distance, are used to select data
points that represents the original trajectory as close as possible. In [27], Potamias
et. al argue that a data point should be included in the approximated trajectory as
long as it reveals changes in the course of a trajectory. As long as the location of
an incoming data point can be predicted (e.g. by interpolation or dead reckoning)
from the previous movement, this data point can be safely discarded without sig-
nicant loss in accuracy since it contributes little information. They also argue that,
in addition to spatial positions, changes in speed and direction are key factors for
S S
S
S S
S
3 S S
S
S S
3 S
S S
S
Fig. 1.7 The open window algorithm. The idea is similar to the sliding window algorithm but it
applies the heuristic of the Douglas-Peucker algorithm to choose location points with the highest
error within their sliding window as the closing point of the approximating line segment as well as
the new anchor point.
18 Wang-Chien Lee and John Krumm
S
S
S S
S S
S
3 S
S
S S S
S
3 S
S
Fig. 1.8 The construction of the safe area and the data reduction strategy in a threshold-guided
sampling algorithm. Only the location points fallen out of the projected safe areas are reported to
the location server.
Spatial trajectories are never perfectly accurate, due to sensor noise and other fac-
tors. Sometimes the error is acceptable, such as when using GPS to identify which
city a person is in. In other situations, we can apply various ltering techniques
to the trajectory to smooth the noise and potentially decrease the error in the mea-
surements. This section explains and demonstrates some conventional ltering tech-
niques using sample data.
It is important to note that ltering is not always necessary. In fact, we rarely use
it for GPS data. Filtering is important in those situations where the trajectory data is
particularly noisy, or when one wants to derive other quantities from it, like speed
or direction.
zi = xi + vi (1.1)
The noise vector vi is assumed to be drawn from a two-dimensional Gaussian
probability density with zero mean and diagonal covariance matrix R, i.e.
1 Trajectory Preprocessing 21
tWD'W^
z
y
Fig. 1.9 This is a trajectory recorded by a GPS logger. The outliers were inserted later for demon-
stration.
2 0
vi N(0, R) R= (1.2)
0 2
With the diagonal covariance matrix, this is the same as adding random noise from
two different, one-dimensional Gaussian densities to xi and yi separately, each with
zero mean and standard deviation . It is important to note that Equation (1.1) is just
a model for noise from a location sensor. It is not an algorithm, but an approximation
of how the measured sensor values differ from the true ones. For GPS, the Gaussian
noise model above is a reasonable one [7]. In our experiments, we have observed a
standard deviation of about four meters.
One simple way to smooth noise is to apply a mean lter. For a measured point zi ,
the estimate of the (unknown) true value is the mean of zi and its n 1 predecessors
in time. The mean lter can be thought of as a sliding window covering n temporally
adjacent values of zi . In equation form, the mean lter is
22 Wang-Chien Lee and John Krumm
D& D&
z
z
y y
Fig. 1.10 The dark curve show the result of the mean lter in (a) and the median lter in (b).
One advantage of the median lter is that it is less affected by outliers. The gray curve shows the
original measured trajectory.
i
1
x i =
n zj (1.3)
j=in+1
Figure 1.10(b) shows the result of the median lter, where it is clear that it is less
sensitive to outliers and still gives a smooth result.
The mean and median lters are both simple and effective at smoothing a tra-
jectory. They both suffer from lag. More importantly, they are not designed to help
estimate higher order variables like speed. In the next two sections, we discuss the
Kalman lter and the particle lter, two more advanced techniques that reduce lag
and can be designed to estimate more than just location.
The mean and median lters use no model of the trajectory. More sophisticated
lters, like the Kalman and particle lters, model both the measurement noise (as
given by Equation (1.1)) and the dynamics of the trajectory.
For the Kalman lter, a simple example is smoothing trajectory measurements
from something arcing through the air affected only by gravity, such as a soccer ball.
While measurements of the balls location, perhaps from a camera, are noisy, we can
also impose constraints on the balls trajectory from simple laws of physics. The
trajectory estimate from the Kalman lter is a tradeoff between the measurements
and the motion model. Besides giving estimates that obey the laws of physics, the
Kalman lter gives principled estimates of higher order motion states like speed.
The subsections below develop the model for the Kalman lter for the example
trajectory from above. We use notation from the book by Gelb, which is one of the
standard references for Kalman ltering [1].
While the mean and median lters can only estimate what is directly measured, the
Kalman lter can estimate other variables like speed and acceleration. In order to
do this, the Kalman formulation makes a distinction between what is measured and
what is estimated, as well as formulating a linear relationship between the two.
As above, we assume that the measurements of the trajectory are taken as noisy
values of x and y:
(x)
z
zi = i(y) (1.5)
zi
(x) (y)
Here zi and zi are noisy measurements of the x and y coordinates.
The Kalman lter gives estimates for the state vector, which describes the full
state of the object being tracked. In our case, the state vector will include both the
objects location and velocity:
24 Wang-Chien Lee and John Krumm
xi
yi
xi =
si(x) (1.6)
(y)
si
(x) (y)
The elements xi and yi are the true, unknown coordinates at time i, and si and si
are the x and y components of the true, unknown velocity at time i. The Kalman
lter will produce an estimate of xi , which includes velocity, even though this is not
directly measured. The relationship between the measurement vector zi and the state
vector xi is
zi = Hi xi + vi (1.7)
where Hi , the measurement matrix, translates between xi and zi . For our example,
(x) (y)
Hi expresses the fact that we are measuring xi and yi to get zi and zi , but we are
not measuring velocity. Thus,
1000
Hi = (1.8)
0100
Hi also neatly accounts for the dimensionality difference between xi and zi . While
the subscript on Hi means it could change with time, it does not in our example.
The noise vector vi in Equation (1.7) is the same as the zero-mean, Gaussian
noise vector in Equation (1.2). Thus Equation (1.7) is how the Kalman lter models
measurement noise. In fact, Gaussian noise has been proposed as a simple model of
GPS noise [7], and for our example it would be reasonable to set the measurement
noise to a few meters.
If the rst half of the Kalman lter model is measurement, the second half is dy-
namics. The dynamic model approximates how the state vector xi changes with
time. Like the measurement model, it uses a matrix and added noise:
Here ti is the elapsed time between the state at time i and time i 1. Recalling
the state vector from Equation (1.6), the top two rows of the system matrix say that
(x)
xi = xi1 + ti si and similarly for yi . This is standard physics for a particle with
constant velocity.
(x) (x) (y) (y)
The bottom two rows of system matrix say si = si1 and si = si1 , which
means the velocity does not change. Of course, we know this is not true, or else
the trajectory would be straight with no turns. The dynamic model accounts for its
own inaccuracy with the noise term wi1 . This is another zero-mean Gaussian noise
term. For our example, we have
00 0 0
0 0 0 0
wi N(0, Qi ) Qi = 0 0 s2 0
(1.11)
0 0 0 s2
With the rst two rows of zeros, this says that the relationship between location
(x)
and velocity (e.g. xi = xi1 + ti si ) is exact. However, the last two rows say that
the assumption in the system matrix about constant velocity is not quite true, but
(x) (x)
that the velocity is noisy, i.e. si = si + N(0, s2 ). This is how the Kalman lter
maintains its assumption about the linear relationship between the state vectors over
time, yet manages to account for the fact that the dynamic model does not account
for everything.
The Kalman lter requires a measurement model and dynamic model, both dis-
cussed above. It also requires assumptions about the initial state and uncertainty of
the initial state. Here are the all the required elements:
Hi measurement matrix giving measurement zi from state xi , Equation (1.8).
Ri measurement noise covariance matrix, Equation (1.2).
i1 system matrix giving state xi from xi1 , Equation (1.10).
Qi system noise covariance matrix, Equation (1.11).
x 0 initial state estimate.
P0 initial estimate of state error covariance.
The initial state estimate can usually be estimated from the rst measurement.
For our example, the initial position came from z0 , and the initial velocity was taken
as zero. For P0 , a reasonable estimate for this example is
2
0 0 0
0 2 0 0
p0 =
0 0 s2 0
(1.12)
0 0 0 s2
26 Wang-Chien Lee and John Krumm
The value of is an estimate of the sensor noise for GPS. For our example, we set
= 4 meters based on earlier experiments with our particular GPS logger. We set
s = 6.62 meters/second , which we computed by looking at the changes in velocity
estimated naively from the measurement data.
For the derivation of the Kalman lter, see [1]. The result is a two-step algorithm
that rst extrapolates the current state to the next state using the dynamic model. In
equations, this is
() (+)
x i = i1 x i1 (1.13)
() (+)
Pi = i1 Pi1 i1
T
+ Qi1 (1.14)
The terms in Equation (1.13) should be familiar. The () superscript refers to
the extrapolated estimate of the state vector, and the (+) superscript refers to the
estimated value of the state vector. Equation (1.14) is interesting in that it concerns
an extrapolation Pi of the covariance of the state vector, giving some idea of the error
associated with the state vector.
The rst step of the Kalman lter is pure extrapolation, with no use of measure-
ments. The second step incorporates the current measurement to make new esti-
mates. The equations are
() ()
Ki = Pi HiT (Hi Pi HiT + Ri )1 (1.15)
(+) () ()
x i = x i + Ki (zi Hi x i ) (1.16)
(+) ()
Pi = (I Ki Hi )Pi (1.17)
Equation (1.15) gives the Kalman gain matrix Ki . It is used in Equation (1.16) to give
(+)
the state estimate x i and in Equation (1.17) to give the state covariance estimate
(+)
Pi .
Applying these equations to the example trajectory gives the plot in Figure 1.11(a).
One of the advantages of the Kalman lter over the mean and median lters is its
lack of lag. There is still some intrinsic lag, because the Kalman lter depends on
previous measurements for its current estimate, but it also includes a dynamic model
1 Trajectory Preprocessing 27
to keep it more current. Another advantage is the richer state vector. In our example,
it includes velocity as well as location, making the Kalman lter a principled way
to estimate velocity based on a sequence of location measurements. It is easy to
add acceleration as another part of the state vector. Yet another advantage is the
(+)
Kalman lters estimate of uncertainty in the form of the covariance matrix Pi
given in Equation 1.17. Knowledge of the uncertainty of the estimate can be used
by a higher-level algorithm to react intelligently to ambiguity, possibly by invoking
another sensor or asking a user for help.
<& <&
z
z
y y
(a) Kalman lter with s = 6.62 meters/second (b) Kalman lter with s = 0.1 meters/second
Fig. 1.11 The dark curve show the result of the Kalman lter. In (a), the process noise s comes
from an estimate on the original noisy data. The process noise in (b) is much smaller, leading to a
smoother ltered trajectory.
One of the mysteries of the Kalman lter is the process noise, which is embodied
as s in our example. In our example, this represents how much the tracked objects
velocity changes between time increments. In reality, this is difcult to estimate in
many cases, including our example trajectory of a pedestrian. A larger value of s
represents less faith in the dynamic model relative to the measurements. A smaller
value puts more weight on the dynamic model, often leading to a smoother trajec-
tory. This is illustrated in Figure 1.11(b) where we have reduced the value of s
from our original value of 6.62 meters/second to 0.1 meters/second. The resulting
trajectory is indeed smoother and less distracted by outliers.
One of the main limitations of the Kalman lter is the requirement that the dy-
namic model be linear, i.e. that the relationship between xi1 and xi be expressed
as a matrix multiplication (plus noise). Sometimes this can be solved with an ex-
tended Kalman lter, which linearizes the problem around the current value of the
state. But this can be difcult for certain processes, like a bouncing ball or an object
constrained by predened paths. In addition, all the variables in the Kalman lter
model are continuous, without a convenient way to represent discrete variables like
the mode of transportation or goal. Fortunately, the particle lter xes these prob-
lems, and we discuss it next.
28 Wang-Chien Lee and John Krumm
The particle lter is similar to the Kalman lter in that they both use a measurement
model and a dynamic model. The Kalman lter gains efciency by assuming linear
models (matrix multiplication) plus Gaussian noise. The particle lter relaxes these
assumptions for a more general, albeit generally less efcient, algorithm. But, as
shown by Hightower and Borriello, particle lters are practical for tracking even on
mobile devices [16].
The particle lter gets its name from the fact that it maintains a set of parti-
cles that each represent a state estimate. There is a new set of particles generated
each time a new measurement becomes available. There are normally hundreds or
thousands of particles in the set. Taken together, they represent the probability dis-
tribution of possible states. A good introduction to particle ltering is the chapter by
Doucet et al. [8], and this section uses their notation.
W&
z
y
Fig. 1.12 This is the result of the particle lter. It is similar to the result of the Kalman lter in
Figure 3(a) since it uses the same measurement model, dynamic model, and noise assumptions.
As in the previous section on Kalman ltering, this section shows how to apply
particle ltering to our example tracking problem.
1 Trajectory Preprocessing 29
As with the Kalman lter discussed above, the particle lter makes estimates x i of a
sequence of unknown state vectors xi , based on measurements zi . For our example,
these vectors are formulated just as in the Kalman lter. As a reminder, the state vec-
tor xi has four scalar elements representing location and velocity. The measurement
vector zi has two elements representing a location measurement with some degree
of inaccuracy.
The particle lters measurement model is a probability distribution p(zi |xi ) giv-
ing the probability of seeing a measurement given a state vector. This distribution
must be provided to the particle lter. This is essentially a model of a noisy sensor
which might produce many different possible measurements for a given state. It is
much more general than the Kalman lters measurement model, which is limited
to zi = Hi xi + vi , i.e. a linear function of the state plus added Gaussian noise.
To stay consistent with the example, however, we will use the same measurement
model as in the Kalman lter, writing it as
(x)
xi+1 = xi + vi ti
(y)
yi+1 = yi + vi ti
(x) (x) (x) (x) (1.19)
vi+1 = vi + wi wi N(0, s2 )
(y) (y) (y) (y)
vi+1 = vi + wi wi N(0, s2 )
The above is a recipe for generating random samples of xi+1 from xi . Contrary to
the Kalman lter, the particle lter requires actually generating random numbers,
which in this case serve to change the velocity.
Finally, also paralleling the Kalman lter, we need an initial distribution of the
state vector. For our example, we can say the initial velocity is zero and the initial
location is a Gaussian around the rst measurement with a covariance matrix Ri
from Equation (1.2).
has a larger importance weight. This is the last step in the loop, and processing then
returns to the importance sampling step with the new set of particles.
While the particles give a distribution of state estimates, one can compute a single
estimate with a weighted sum:
P
( j) ( j)
x i = w i x i (1.21)
j=1
Applying the particle lter to our example problem gives the result in Figure 1.12.
We used P = 1000 particles. This result looks similar to the Kalman lter result,
since we used the same measurement model, dynamic model, and noise in both.
One potential disadvantage of the particle lter is computation time, which is affect-
ed by the number of particles. More particles generally give a better result, but at
the expense of computation. Fox gives a method to choose the number of particles
based on bounding the approximation error [10].
Even though the particle lter result looks similar to the Kalman lter result in
our example, it is important to understand that the particle lter has the potential to
be much richer. As mentioned previously, it could be made sensitive to a network
of roads or walking paths. It could include a discrete state variable representing the
mode of transportation, e.g. walking, bicycling, in a car, or on a bus.
While it is tempting to add many variables to the state vector, the cost is often
more particles required to make a good state estimate. One solution to this problem
is the Rao-Blackwellized particle lter [26]. It uses a more conventional lter, like
Kalman, to track some of the state variables and a particle lter for the others.
1.11 Summary
In this chapter, we discussed two low-level preprocessing tasks for spatial trajectory
computing and data management: 1) how to reduce the data size for representing a
trajectory; and 2) how to lter spatial trajectories to reduce measurement noise and
to estimate higher level properties of a trajectory. For task 1, the data reduction tech-
niques can run in a batch mode after the data is collected or in an on-line mode as the
data is collected. Due to the inherent spatio-temporal characteristics in spatial tra-
jectories, conventional error measure, e.g. the perpendicular Euclidean distance that
has been widely used in many line generalization algorithms, does not work well
in determining the location points to be included in the approximated trajectory. On
the other hand, the time synchronized Euclidean distance, providing a more precise
error measurement for approximated trajectories, has been incorporated into sev-
32 Wang-Chien Lee and John Krumm
References
14. Guting, R., Schneider, M.: Moving Object Databases. Morgan Kaufmann, San Francisco,
CA (2005)
15. Hershberger, J., Snoeyink, J.: Speeding up the Douglas-Peucker Line simplication Algorith-
m. In: International Symposium on Spatial Data Handling, pp. 134143 (1992)
16. Hightower, J., Borriello, G.: Particle Filters for Location Estimation in Ubiquitous Computing:
A Case Study. In: in 6th International Conference on Ubiquitous Computing., pp. 88106
(2004)
17. Hung, C.C., Peng, W.C.: Model Driven Trafc Data Acquisition in Vehicle Sensor Networks.
In: International Conference of Parallen Processing (ICPP)., pp. 424432 (2011)
18. Jenks, G.: Lines, Computers, and Human Frailties. Annuals of the Association of American
Geographers 71, 110 (1981)
19. Keogh, E., Chu, S., Hart, D., Pazzani, M.: An On-Line Algorithm for Segmenting Time Series.
In: International Conference on Data Mining (ICDM), pp. 289296 (2001)
20. Keogh, E., Pazzani, M.: An Enhanced Representation of Time Series which Allows Fast and
Accurate Classication, Clustering and Relevance Feedback. In: International Conference of
Knowledge Discovery and Data Mining (KDD)., pp. 239241 (1998)
21. Keogh, E., Pazzani, M.: An On-Line Algorithm for Segmenting Time Series. In: Annual
International ACM-SIGIR Conference on Research and Development in Information Retrieval
(SIGIR). (1999)
22. Keogh, E., Smyth, P.: A Probabilistic Approach to Fast Pattern Matching in Time Series
Databases. In: International Conference of Knowledge Discovery and Data Mining (KDD).,
pp. 2430 (1997)
23. Kleinberg, J., Tardos, E.: Algorithm Design. Addison Wesley, Reading, MA (2005)
24. Maratnia, N., de By, R.: Spatio-Temporal Compression Techniques for Moving Point Objects.
In: International Conference on Extending Database Technology (EDBT), pp. 765782 (2004)
25. McMaster, R.: Statistical Analysis of Mathematical Measures of Linear Simplication. The
American Cartographer 13, 103116 (1986)
26. Murphy, K., Russell, S.: Rao-Blackwellised Particle Filtering for Dynamic Bayesian Network-
s. In: Sequential Monte Carlo Methods in Practice., pp. 499515. Springer: New York (2001)
27. Potamias, M., Patroumpas, K., Sellis, T.: Sampling Trajectory Streams with Spatio-Temporal
Criteria. In: International Conference on Scientic and Statistical Database Management (SS-
DBM), pp. 275284 (2006)
28. Saltenis, S., Jensen, C., Leutenegger, S., Lopez, M.: Indexing the Positions of Continuously
Moving Objects. In: ACM International Conference on Management of Data (SIGMOD), pp.
331342 (2000)
29. Schmid, F., Richter, K.F., Laube, P.: Semantic Trajectory Compression. In: International Sym-
posium on Advances in Spatial and Temporal Databases (SSTD). (2009)
30. Vitter, J.: Random sampling with a reservoir. ACM Transactions on Mathematical Software
(TOMS) 11(1) (1985)
31. Wang, X., Tieu, K., Grimson, E.: Learning Semantic Scene Models by Trajectory Analysis.
In: European Conference on Computer Vision (ECCV), pp. 110123 (2006)
32. White, E.: Assessment of Line Generalization Algorithms. The American Cartographer 12,
1727 (1985)
33. Wolfson, O., Sistla, P., Xu, B., Zhou, J., Chamberlain, S., Yesha, Y., Rishe, N.: Tracking Mov-
ing Objects Using Database Technology in DOMINO. In: The Fourth Workshop on Next
Generation Information Technologies and Systems (NGITS), pp. 112119 (1999)
34. Yan, Z.: Towards Semantic Trajectory Data Analysis: A Conceptual and Computational Ap-
proach. In: Internation Conference on Very Large Data Base (VLDB) PhD Workshop. (2009)
Chapter 2
Trajectory Indexing and Retrieval
2.1 Introduction
Trajectories are the traveling history of moving objects such as a person, a vehicle, or
an animal. Trajectories can be used for complex analysis across different domains.
For example, public transport systems may go back in time to any particular instant
or period to analyze the pattern of trafc ow and the causes of trafc congestions;
in biological studies movements of animals may be analyzed when considering road
networks to reveal the impact of human activity on wild life; or the urban planning of
a city council may analyze the trajectories to predict the development of suburbs and
provide support in decision making. Other applications include path optimization of
Ke Deng
The University of Queensland, Brisbane, Australia, e-mail: [email protected]
Kexin Xie
The University of Queensland, Brisbane, Australia, e-mail: [email protected]
Kevin Zheng
The University of Queensland, Brisbane, Australia, e-mail: [email protected]
Xiaofang Zhou
The University of Queensland, Brisbane, Australia, e-mail: [email protected]
35
36 Ke Deng, Kexin Xie, Kevin Zheng and Xiaofang Zhou
Trajectories are the historical spatiotemporal data which are the foundation of many
important and practical applications such as trafc analysis, behavior analysis and so
on. The utility of trajectory data is built on various queries in a trajectory database. A
typical trajectory query asks for the information against spatiotemporal relationships
between trajectories and with other spatial data objects, i.e. points (P), regions (R)
and trajectories (T ). We generally classify the trajectory queries into three types:
P-Query 1) asks for points of interest (POI) which satisfy the spatiotemporal
relationship to specied trajectory segment(s) (e.g. top k nearest neighbors); or
2) asks for trajectories which satisfy the spatiotemporal relationship to a specied
point/points.
2 Trajectory Indexing and Retrieval 37
2.2.1 P-Query
In the multiple-points trajectory query [10], given a small set of points with or
without an order specied, the target is to nd the trajectories from a trajectory
database such that these trajectories best connect the designated points geographi-
cally. This query is useful when planning a traveling path passing several must-go
locations such as sightsee points.
2.2.2 R-Query
Given a three dimensional spatiotemporal region (or block), R-query searches for
trajectory segments that belong to the specied spatiotemporal region. This type of
query can be used to support trafc analysis, and located-based services. As a basic
operation in various applications, this query type has been studied extensively and
various indexes have been proposed (TB, 3D-R tree, STR tree).
Even though trajectories are independent of each other, they often show common
behavior such as passing a small region within a certain period of time. Identifying
these regions with R-query is important in trajectory clustering [19, 17]. An appli-
cation is to identify the regions which are more likely to be passed by a given user
in a time window based on the many trajectories relevant to that user.
2.2.3 T-Query
T-Query usually asks for similar trajectories in a trajectory database with attempt
to classify/cluster trajectories. The trajectory classication/clustering can be used in
many applications such as to predict the class labels of moving objects based on their
trajectories and other features, to identify the trafc ow in road networks, or for
instance, to identify interesting behavior patterns, etc. One version of T-query is to
discover common sub-trajectories [20, 19] and another version targets the problem
of long trajectories spreading over large geographic areas [18].
2 Trajectory Indexing and Retrieval 39
2.2.4 Applications
The similarity between a query point q and a trajectory A is usually measured by the
distance from q to the nearest point of A, i.e.,
D(q, A) = min
d(q, p )
p A
where d(, ) is some distance function between two points, which can be either L p -
norms (if they are in Euclidean space) or network distance (if they are on spatial
networks).
We can also extend a single query point to multiple query points. In this case
we need a similarity function to score how well a trajectory connects the query
locations, and which considers the distance from the trajectory to each query point.
The work [10] has studied this kind of query and propose a novel similarity function
Sim(Q, A) = eD(q,A)
qQ
The similarity between two trajectories is usually measured by some kind of aggre-
gation of distances between trajectory points. Along this line, several typical similar-
ity functions for different applications include Closest-Pair Distance, Sum-of-Pairs
Distance [1], Dynamic Time Warping (DTW) [38], Longest Common Subsequence
(LCSS) [39], and Edit Distance with Real Penalty (ERP) [10], Edit Distance on Re-
al Sequences (EDR) [7]. It is worth noting that some of those similarity functions
were originally proposed for time series data. But as trajectories can be regarded as
a special kind of time series in multi-dimensional space, these similarity functions
can also be applied to trajectory data.
42 Ke Deng, Kexin Xie, Kevin Zheng and Xiaofang Zhou
A simple way to measure the similarity between two trajectories is to use their
minimum distance. To do so, we nd the closest pair of points from two trajectories
and calculate the distance between them. More formally, given two trajectories A
and B, their Closest-Pair distance can be computed as follows:
0, i f n = 0 and m = 0
, i f n = 0 or m = 0
DTW (A, B) = DTW (A, Rest(B))
d(Head(A), Head(B)) + min DTW (Rest(A), B)
DTW (Rest(A), Rest(B)))
A common drawback of the previous two similarity functions is that they are rel-
atively sensitive to noise, since all points including noises are required to match.
Therefore it is possible to accumulate an overly large distance merely due to a sin-
gle noisy point. To address this issue, Longest Common Subsequence (LCSS) has
been proposed to measure the distance of two trajectories in a more robust man-
ner. Its basic idea is to allow skipping over some points rather than just rearranging
them. As a consequence, far-away points will be ignored, making it robust to noises.
The advantages of the LCSS method are twofold: 1) some points can be unmatched,
while in Euclidean distance and DTW distance all points have to be matched, even
when they are outliers. 2) The LCSS distance allows a more efcient approximate
computation.
Let A and B be two trajectories with lengths of n and m respectively. Given an in-
teger and a distance threshold , the LCSS between A and B is dened as follows:
0, i f n = 0 or m = 0
1 + LCSS(Rest(A), Rest(B)), i f d(Head(A), Head(B)) ,
LCSS(A, B) =
and |n m| <
max(LCSS(Rest(A), B), LCSS(A, Rest(B))), otherwise
The parameter is used to control how far in time we can go in order to match
a given point from one trajectory to a point in another trajectory. is a matching
threshold to determine whether to take the point into account.
Based on the concept of LCSS, two similarity functions S1 and S2 have been
proposed in [39].
Denition 2.1. The similarity function S1 between two trajectories A and B, given
and , is dened as follows:
LCSS(A, B)
S1( , , A, B) =
min(n, m)
Denition 2.2. Given , and the family F of translations, S2 between two trajec-
tories A and B is dened:
So both similarity functions take the range from 0 to 1. It is worth noting that
S2 is an improvement over the S1, because by allowing translations, similarities
between movements that are parallel in space but not identical can be detected.
44 Ke Deng, Kexin Xie, Kevin Zheng and Xiaofang Zhou
Although LCSS can handle trajectories with noises, but it is a very coarse measure
since it does not differentiate trajectories with similar common subsequences, but
focuses on different sizes of gaps in between. This has motivated the proposal of a
new distance function, called Edit Distance on Real Sequence [7], to be proposed.
where
0, i f d(Head(A), Head(B))
subcost =
1, otherwise
Compared to Euclidean distance, DTW, and LCSS, EDR has the following
virtues:
In EDR, the matching threshold reduces effects of noise by quantizing the dis-
tance between a pair of elements to two values, 0 and 1 (LCSS also performs the
same quantization). Therefore, the effect of outliers on the measured distance is
much less in EDR than that in Euclidean distance, DTW.
Contrary to LCSS, EDR assigns penalties to the gaps between two matched sub-
trajectories according to the lengths of gaps, which makes it more accurate than
LCSS.
All the similarity functions discussed before can be classied into two categories.
The rst one is the Euclidean distance, which is a metric but cannot support local
time shifting. The second category includes DTW, LCSS, EDR which are capable of
handling local time shifting but are non-metric. To tackle this problem, Edit distance
with Real Penalty (ERP for short) [6] has been proposed, representing a marriage
of L1-norm and the edit distance.
By analyzing DTW distance more carefully, it can be observed that the reason
DTW is not metric is because, when a gap needs to be added, it repeats the previous
points. Thus the difference between a point and a gap depends on the previous point.
On the contrary, ERP uses real penalty between two matched points, but a constant
value for computing the distance for unmatched points. As a consequence, ERP can
support local time shifting, and is a metric.
2 Trajectory Indexing and Retrieval 45
R-Tree We rst briey introduce R-tree and then two extended versions of R-tree
with augmentation of temporal dimension. R-tree [13] is efcient and simple. It
has been widely recognized in the spatial database research community and found
its way into commercial spatial database management systems. In addition, many
trajectory indexing structures are variants or based on R-trees.
R-tree is a height-balanced data structure. Each node in R-tree represents a region
which is the minimum bounding box (MBB) of all its children nodes. Each data en-
try in a node contains the information of the MBB associated with the referenced
46 Ke Deng, Kexin Xie, Kevin Zheng and Xiaofang Zhou
children node. The search key of an R-tree is the MBB of each node. Figure 2.1
shows two views of an R-tree. In Figure 2.1(b), we see a tree structure, and in Fig-
ure 2.1(a), we see how the data objects and bounding boxes are distributed in space.
E1 n10
E5 n12
n1 n2 root
E1 E2
E3 n11
N1 N2
n3 E3 E4 E5 E6 E7 E8
n8 n9
E6 n14
n5 n13 E8
n6 N3 N4 N5 N6 N7 N8
E4 n7
n15
n1 n2 n3 n4 n5 n6 n10 n11 n12 n7 n8 n9 n13 n14 n15 n16
n4
E7
The root has two data entries E1, E2 referring to the children nodes N1 and N2
separately. N1 represents the minimum bounding box of its children nodes N3, N4
and N5 and the information of the bounding box is contained in E1, as with N2. The
spatial objects are referred by the entries of the leaf nodes in R-tree.
R-tree can be used in range query to retrieve all spatial objects within a speci-
ed query region, e.g., a sphere of 5km radius around a location. R-tree is traversed
from the root. The query region is examined against the MBB in each entry visited.
If they are contained/overlapped, this entry is accessed and its referring child node
is visited. In this way, the nodes are visited only if its MBB is relevant (e.g., con-
tained/overlapped) to the query region. When all relevant nodes have been visited,
query processing terminates. For example in Figure 2.1, QR is a query region and
N1 is visited since its MBB overlaps with QR; then for the same reason N3 and N4
are visited and n5 is found from N4. To search for a certain point using R-tree, is
the same as with processing range query. For example, to search for n7, N1 and N2
are visited and then n7 is found in N6. Note that N2 is visited although n7 is not
in the subtree of N2. The reason is that MBBs of R-tree nodes overlap each other
and therefore multiple searching paths may be followed. A variant of R-tree, called
R*-tree [2], has been developed to minimize node access by reducing overlapping
of MBBs.
R-tree can also be used to process a nearest neighbor query for a given query
point. There are two traverse strategies, depth-rst and best-rst [14]. In both strate-
gies, the minimum distance from each MBB to the query point is used and denoted
as mindist. Using the best-rst traverse, the root node of R-tree is visited rst. Each
entry in the root node computes its mindist to the query point and is kept in a heap
sorted in ascending order of mindist. Each time the rst entry in the heap is expand-
ed and replaced by its child nodes. Once the rst entry is a leaf node, the object is
2 Trajectory Indexing and Retrieval 47
the rst nearest neighbor. Using the depth-rst traverse, a leaf node is visited rst
in some way and its mindist to the query point is used as a threshold T . Then, oth-
er nodes of R-tree which probably contain objects closer to the query point (i.e.,
mindist < T ) are accessed and checked. If an object has mindist < T , T is updated
with mindist. The query is returned when all such nodes have been visited. R-tree is
also used in processing spatial join queries. More details can be found in [15, 3].
Inserting a new data point p to a R-tree takes the following steps. First, a leaf node
L is selected in which to place p. The selection starts from the root of the R-tree and
each time a subtree is chosen until the lead node is reached. Among several subtrees,
we always chose the one which needs the least enlargement to include p. Second, we
insert p into L if L has room for anther entry, otherwise a structure change happens
by splitting L to two nodes. Third, the structure change is propagated upward. If the
node split propagation caused the root to split, a new root is created and the R-tree
grows taller as a consequence.
Deleting a data point p from an R-tree takes following steps. First, the leaf node L
containing p is found and remove p from L. Second, L is eliminated if it has too few
entries and relocate its entries. The change is propagated upward as necessary. Third,
if the root node has one child after the tree has been adjusted, the child becomes the
new root and R-tree is shortened as a consequence.
3D R-Tree In trajectory databases, traditional spatial queries need to consider the
temporal aspect of the spatial objects. Two basic queries in temporal databases are
timestamp queries, which retrieve all objects at a specic timestamp, and interval
queries, which retrieve all objects lasting for several continuous timestamps. As a
result, common queries for trajectory databases include nding the spatial objects
according to some spatial requirement (e.g. trajectories within a region) for a given
timestamp or interval.
In order to capture the temporal aspect of the spatial objects, R-tree can be simply
modied to model the temporal aspect of the trajectory as an additional dimension.
As a result, a 2 dimensional trajectory line segment can be bounded by a 3 dimen-
sional MBB (i.e.minimum bounding box) as shown in Figure 2.4.1(a). The problem
with using MBB to bound 3D line segments is that the MBB used to bound the
actual line segment covers a much larger portion of space, whereas the line segmen-
t itself is small. As a result, the 3D R-tree have smaller discrimination capability
because of the high overlap between MBBs.
Another aspect not captured in R-tree is knowledge about the specic trajectory
to which a line segment belongs. To smoothen these inefciencies, the 3 dimensional
R-tree can be modied as follows. As can be seen in Figure 2.4.1(b), a line segment
can only be contained in four different ways. This extra information is stored in
four different ways in an MBB. This extra information is stored at the leaf level by
simply modifying the entry format to (id, MBB, orientation), where the orientations
domain is {1, 2, 3, 4}. Assuming the trajectories are numbered from 0 to n, a leaf
node entry is then of the form (id,tra jectory#, MBB, orientation).
In 3D R-tree, the insertion and deletion of data points follows R-tree as discussed
above.
48 Ke Deng, Kexin Xie, Kevin Zheng and Xiaofang Zhou
Fig. 2.2 (a) Approximating trajectories using MBBs. (b) Mapping of line segments in a MBB [25]
The ideal characteristics for an index suitable for object trajectories would be to
decompose the overall space according to time, the dominant dimension in which
growth occurs, while simultaneously preserving trajectories. An additional pa-
rameter is introduced by [25], called the preservation parameter, p, that indicates
the number of levels to be reserved for the preservation of trajectories. When a
leaf node returned by FindNode is full, the algorithm checks whether the p 1 par-
ent nodes are full (in Figure 2.3, for p = 2, only the node draw in bold at non-leaf
level 1 has to be checked). In case one of them is not full, the leaf node is split.
In case all of the p 1 parent nodes are full, another leaf node is selected on the
subtree including all the nodes further on the right of the current insertion path (the
gray shaded tree in Figure 2.3). A smaller p decreases the trajectory preservation
and increases the spatial discrimination capabilities of index. The converse is true
for a larger p. The experimental results show that the best choice of a preservation
parameter is p = 2 [25].
TB-Tree The TB-tree (Trajectory-Bundle tree) [21] is a trajectory bundle tree that
is based on the R-tree. The main idea of the TB-tree indexing method is to bundle
segments from the same trajectory into the leaf nodes of the R-tree. The structure of
the TB-tree is a set of leaf nodes, each containing a partial trajectory, organized in a
tree hierarchy. In other words, a trajectory is distributed over a set of disconnected
leaf nodes. Figure 2.4 shows a part of a TB-tree structure and a trajectory illustrating
this approach. The trajectory symbolized by the gray band is fragmented across six
nodes c1, c3, etc. In the TB-tree, these leaf nodes are connected through a linked
list.
To insert a trajectory into TB-tree, the goal is to cut the whole trajectory of
a moving object into pieces, where each piece contains M line segments, with M
being the fanout. The process starts by traversing the tree from the root and steps
into every child node that overlaps with the MBB of the new line segment. The leaf
node containing a segment connected to the new entry (stage 1 in Figure 2.5) is
chosen. In case the leaf node is full, in order to preserve the trajectory, instead of a
split, a new leaf node is created. As shown in the example, the tree is traversed until
a non-full parent node is found (stages 2 through 4). The right-most path (stage 5)
is chosen to insert the new node. If there is room in the parent node (stage 6), the
new leaf node is inserted as shown in Figure 2.5.
by both trees R0 and R1 . In this case, it is not necessary to recreate the entire branch
in R1 , instead, a pointer is created to point branch A0 in R0 .
In a 3D R-tree, the temporal and the spatial dimensions are treated equally, i.e. a
bounding box in the index includes the time dimension. This increases the chance of
overlap amongst the keys. Consequently, the performance of the 3D R-tree degrades
rapidly as the data set size increases. However, for trajectory data, the temporal and
the spatial dimensions have important different characteristics. More specically,
the boundaries of the spatial dimensions remain constant or change very slowly over
the lifetime of the trajectories, whereas the time dimension is continually increasing.
This observation motivates the grid based index which partitions the spatial dimen-
sions statically. Within each spatial partition, the indexing structure only needs to
index lines in a 1-D (time) dimension. Such an approach will not exhibit the rapid
degradation in index performance observed for 3-D indexing techniques. The SETI
indexing mechanism (Scalable and Efcient Trajectory Index) [4] is the rst grid
based index.
In SETI, spatial discrimination is maintained by logically partitioning the spa-
tial extent into a number of non-overlapping spatial cells. Each cell contains only
those trajectory segments that are completely within the cell. If a trajectory segment
crosses a spatial partitioning boundary then that segment is split at the boundary,
and inserted into both cells. Each trajectory segment is stored as a tuple in a data
le, with the restriction that any single data page only contains trajectory segments
that belong to the same spatial cell. The lifetime of a data page is dened as the
minimum time interval that completely covers the time-spans of all the segments
stored in that page. The lifetime values of all pages that are logically mapped to a
spatial cell are indexed using an R*-tree. These temporal indices are sparse indices
as only one entry for each data page is maintained instead of one entry for each
segment. Using sparse indices has two distinct advantages: smaller index overheads
and improved insert performance. The temporal indices also provide the temporal
discrimination in searches. A good spatial partitioning is one in which the number
of moving objects per cell is fairly uniform. Producing a good partitioning strategy
is challenging as the distribution of the objects may be non-uniform, and the distri-
bution may change over time. Partitioning strategies may be static or dynamic. In a
static partitioning strategy, the partition boundaries are xed, whereas in a dynamic
partitioning strategy the partition boundaries may change over time.
A variant of SETI is MTSB-tree (Multi Time Split B-tree). Similar to SETI,
MTSB-tree partitions the spatial space into cells, and maintains a temporal access
method corresponding to each cell. A trajectory is stored in all cells it intersects.
Different from SETI where an R*-tree is used to index the time dimension within
each cell, MTSB-tree uses the TSB-tree (Time Split B-tree) [22] to index the time
dimension within each cell. Compared to R*-tree, the advantage of using TSB-tree
is that it provides results in order of time. So, MTSB is more suitable for processing
queries where trajectories are close in spatial space as well as in time. Another vari-
ant of SETI is CSE-tree (Compressed Start-End tree) [36] where different indexes
are used to index time dimension within each cell; B+-tree for frequently updated
data and sorted dynamic array for rarely updated data.
2 Trajectory Indexing and Retrieval 53
Since trajectories are spatial objects themselves, in this section, we rst review the
traditional query processing techniques for spatial objects, in particular, the spatial
range search as well as nearest neighbor search.
As introduced earlier, spatial objects are usually organized by R-trees in spatial
databases. Since computing the spatial relationship (e.g. distances, containments,
etc) between spatial objects is expensive, a query processing algorithm typically
employs a lter-and-rene approach. The lter step uses relatively cheap computa-
tion cost to nd a set of candidate objects that are likely to be the results. The rene
step is to further identify the actual query result from the small set of candidates.
The overall efciency of a spatial query processing algorithm mainly depends on
the effectiveness of the ltering step.
function f ilter() is to check whether the MBB of the node and the query region
overlaps, while re f ine() is to examine whether the candidate actually overlaps with
the query region. As shown in gure 2.1, only the spatial objects n1 , n2 , n3 , n4 , n5
and n6 need to be passed to the rene process, since the MBBs of the other objects
do not overlap with QR and would thus be eliminated in the lter step.
2.5.2 P-query
This kind of query aims to nd a set of trajectories whose nearest distance to a given
query point is below a certain threshold (i.e., range query) or belongs to the top-k
(i.e., k nearest neighbor query), based on some distance function. To answer such a
query efciently, one can index either the line segments or the sampled positions of
trajectories using any multidimensional indexing structure (e.g. R-trees), and then
search for the line segments or sampled points in the lter-and-rene paradigm. But
it is worth noting a subtle difference compared to the traditional query processing for
point objects. Whenever we encounter a line segment or a point, the corresponding
trajectory should be marked as visited so that it will not be processed repeatedly
when the other parts of the same trajectory are also reached.
2 Trajectory Indexing and Retrieval 55
A well known query that falls into this category is the Continuous Nearest Neighbor
Search [35]. Given a set P of points, and a line segment q = s, e, a continuous near-
est neighbor (CNN) query retrieves the nearest neighbor from P for every position
on q. The resulting output by such a query contains a set of R, T tuples, where R
is a point in P, and T is an interval of s, e within which R is the nearest neighbor
of q. Figure 2.8 shows an example of the CNN query. Let P = {a, b, c, d, f , g, h}
be the set of points to be considered. Given a query line segment s, e, the CNN re-
turns {a, s, s1 , c, s1 , s2 , f , s2 , s3 , h, s3 , e} as the result. The objective of a CNN
query is to split the line segments such that each of them consists of only one nearest
neighbor.
Let SL be the list of split points. It can be seen that the start and end points of the
line segment constitute the rst and last elements in SL. To avoid multiple database
scans, the strategy is to start with an initial SL that contains only two split points s
and e with their covering points set, and then incrementally updates SL during query
processing.
As illustrated in gure 2.9, the initial SL consists of s and e only. The nearest
neighbor of the segment starting with s must be a nearest neighbor of s. The process
starts by nding the nearest neighbor (i.e. a) of s and then draws a circle centered
at s and e with the radius of s, a and e, a, respectively. At this stage, only the data
points within the circle need to be processed, because the data points outside the
circles have greater distances to the line segment than a. The next step is to nd
the nearest neighbor of e from the data points within the circles and then draw a
circle centered at e with radius e, c. After that, the perpendicular bisector of a, c is
computed and intersects with s, e at s1 . The above process will repeat, i.e., nding
the nearest neighbor of s1 and performing the perpendicular bisection, until no new
point within the circles becomes the nearest neighbor again.
56 Ke Deng, Kexin Xie, Kevin Zheng and Xiaofang Zhou
2.5.3 T-Query
Given a trajectory, a T-query nds trajectories that satisfy a given distance function
to a query trajectory. One of the approaches for addressing this type of query is to
treat the query trajectory as multiple points.
Given multiple query points, a k-BCT query nds k closest trajectories to the set
of query points. The distance Distq between a query location qi and a trajectory
R = {p1 , p2 , . . . , pl } is dened as:
The approach adopted to evaluate this query is to search the nearby trajectories
for each query location separately by using the k-Nearest Neighbor search [27, 7]
algorithm, and then merge the results for the exact k-BCT [10]. Given a set of query
locations {q1 , q2 , . . . , qm }, rst of all the -NN of each query location is retrieved:
C = C1 C2 Cm = {R1 , R2 , . . . , R f }
For each trajectory Rx (x [1, f ]) within C, it must contain at least one point
whose distance to the corresponding query location is determined. For example, if
Rx Ci (Ci C), then the -NN of qi must include at least one point of Rx , and the
shortest distance from Rx to qi is known. Therefore, at least one matched pair of
points between Rx and some qi can be discovered, and then a lower bound LB of the
distance for each candidate Rx (x [1, f ]) can thereafter be computed by using the
found matched pairs:
j
LB(Rx ) = (
j
max {eDiste (qi ,pi ) }) (2.4)
i[1,m]Rx Ci j[1, ]pi Rx
Here {qi |i [1, m] Rx Ci } denotes the set of query locations that have al-
ready been matched with some point on Rx , and the pij which achieves the max-
j
imum eDiste (qi ,pi ) with respect to qi is the point on Rx that is closest to qi , i.e.,
max j[1, ]R C (eDistq (qi ,Rx ) ) . Obviously it is not greater than m Distq (qi ,Rx ) , be-
x i i=1 e
cause it only takes those matched pairs found so far into account. Thus LB(Rx ) must
lower bound the exact distance Dist(Q, Rx ) dened in equation 2.3. On the other
hand if Rx Ci , then none of the trajectory points has been scanned by NN(qi )
yet.
The upper bound UB of the distances for candidate trajectories in C can be de-
rived by following the same rational:
j
UB(Rx ) = ( max
j
{eDiste (qi ,pi }) + (eDiste (qi ,pi ) (2.5)
i[1,m]Rx Ci j[1, ]pi Rx i[i,m]Rx Ci
Having both the lower and upper bound, a lter and rene strategy can be adapted
by using -NN to nd the results. In case that -NN returns enough candidates for
nding the k nearest trajectories to the query point, the rene process will be invoked
to evaluate the exact result. Otherwise, is modied to 2 in order to include more
candidates.
2.5.4 R-Query
within a region at a particular time instant in the past, whereas time window queries
nd spatial objects within a region for a period of continuous time instants.
There are many indexing structures that organize the movements of spatial objects
by building an R-tree for each timestamp. In this section, we choose HR+-tree [33]
as a representative for processing this type of query.
For timestamp queries, the process search is rstly directed to the root whose
jurisdiction interval covers the timestamp. After that, it proceeds to the appropriate
branches considering both the spatial and temporal extents (lifespan). The process-
ing of interval queries is more complicated; since a node can be shared by multiple
branches, it may be visited many times during the search. Sometimes, it is not nec-
essary to traverse the same node if it has already been visited.
One approach to avoid duplicate visits is to store the old spatial extents into the
new entry. However, storing such information, will signicantly lower the fanout
of the R-tree. Another solution is to perform (interval) queries in a breadth-rst
manner. Specically, we start with the set of roots whose associated logical trees will
be accessed. By examining the entries in these nodes, we can decide the nodes that
need to be visited at the next level. Instead of accessing these nodes immediately,
we save their block addresses and check for duplicates. Only when we have nished
all the nodes at this level, will the ones at the next level be searched via the address
information saved. Obviously the duplicate visits will be naturally avoided in this
way.
With 3D R-tree, the timestamp and interval queries can be treated as 3D range
queries. A timestamp query is to nd the spatial objects that overlap with a cir-
cle parallel to the x-y plane, while an interval query is to nd spatial objects that
are contained by a cylinder. In such cases, traditional spatial query processing ap-
proaches can then be adopted to answer these queries.
2.6 Summary
tance measure between spatial objects is essential in order to accurately capture the
spatiotemporal relationships. The second aspect is about efciency which requires a
proper index to speed up the query processing. This chapter introduces fundamental
knowledge about these two aspects and discusses the processing techniques for d-
ifferent types of queries. These techniques and knowledge form the background for
further study of this book.
References
1. Agrawal, R., Faloutsos, C., Swami, A.N.: Efcient similarity search in sequence databases.
FODO pp. 6984 (1993)
2. Beckmann, N., Kriefel, H., Schneider, R., Seeger, B.: The r tree: An efcient and robust
access method for points and rectangles. In 9th ACM-SIGMOD Symposium n Principles of
Database Systems 6(1), 322331 (1990)
3. Brinkhoff, T., Kriegel, H.P., Seeger, B.: Efcient processing of spatial joins using r-trees. ACM
SIGMOD Conference pp. 237246 (1993)
4. Chakka, V.P., Everspaugh, A., Patel, J.M.: Indexing large trajectory data sets with seti. In
Proc. of the Conf. on Innovative Data Systems Research(CIDR) (2003)
5. Chen, L.: Robust and fast similarity search for moving object trajectories. VLDB
6. Chen, L., Ng, R.: On the marriage of lp-norms and edit distance. In: VLDB, pp. 792803
(2004)
7. Chen, L., Ozsu, M.T., Oria, V.: Robust and fast similarity search for moving object trajectories.
SIGMOD (2005)
8. Chen, Z., Shen, H.T., Zhou, X.: Discovering popular routes from trajectories. ICDE (2011)
9. Chen, Z., Shen, H.T., Zhou, X., Yu, J.X.: Monitoring path nearest neighbor in road networks.
SIGMOD (2009)
10. Chen, Z., Shen, H.T., Zhou, X., Zheng, Y., Xie, X.: Searching trajectories by locations - an
efciency study. SIGMOD (2010)
11. Frentzos, E., Gratsias, K., Pelekis, N., Theodoridis, Y.: Algorithms for nearest neighbor search
on moving object trajectories. Geoinformatica 11(2), 159193 (2007)
12. Gonzalez, H., Han, J., Li, X., Myslinska, M., Sondag, J.P.: Adaptive fastest path computation
on a road network: a trafc mining approach. VLDB (2007)
13. Guttman, A.: R-trees: a dynamic index structure for spatial searching. In: Proceedings of the
1984 ACM SIGMOD international conference on Management of data, SIGMOD 84, pp.
4757. ACM, New York, NY, USA (1984). DOI http://doi.acm.org/10.1145/602259.602266.
URL http://doi.acm.org/10.1145/602259.602266
14. Hjaltason, G.R., Samet, H.: Distance browsing in spatial databases. TODS 24(2), 265318
(1999)
15. Huang, Y.W., Jing, N., Rundensteiner, E.A.: Spatial joins using r-trees: Breadth-rst traversal
with global optimizations. VLDB 24(2), 396405 (1997)
16. Jeung, H., Liu, Q., Shen, H.T., Zhou, X.: A hybrid prediction model for moving objects. ICDE
(2008)
17. Jeung, H., Yiu, M.L., Zhou, X., Jensen, C.S., Shen, H.T.: Discovery of convoys in trajectory
databases. VLDB (2008)
18. Lee, J.G., Han, J., Li, X., Gonzalez, H.: Traclass: trajectory classication using hierarchical
region-based and trajectory-based clustering. PVLDB 1(1), 10811094 (2008)
19. Lee, J.G., Han, J., Whang, K.Y.: Trajectory clustering: A partition-and-group framework. SIG-
MOD (2007)
20. Lee, J.G., Han, J., Whang, K.Y.: Trajectory clustering: a partitionand-group framework. SIG-
MOD (2007)
60 Ke Deng, Kexin Xie, Kevin Zheng and Xiaofang Zhou
21. Li, X., Han, J., Lee, J.G., Gonzalez, H.: Trafc density-based discovery of hot routes in road
networks. SSTD (2007)
22. Lomet, D., Salzberg, B.: The performance of a multiversion access method. SIGMOD (1990)
23. Monreale, A., Pinelli, F., Trasarti, R., Giannotti, F.: Wherenext: a location predictor on trajec-
tory pattern mining. SIGKDD (2009)
24. Nascimento, M., Silva, J.: Towards historical r-trees. In: Proceedings of the 1998 ACM sym-
posium on Applied Computing, pp. 235240. ACM (1998)
25. Pfoser, D., Jensen, C., Theodoridis, Y.: Novel approaches to the indexing of moving object
trajectories. VLDB (2000)
26. Pfoser, D., Jensen, C.S., Theodoridis, Y.: Novel approaches in query processing for moving
object trajectories. VLDB pp. 395406 (2000)
27. Roussopoulos, N., Kelley, S., Vincent, F.: Nearest neighbor queries. In: Acm Sigmod Record,
vol. 24, pp. 7179. ACM (1995)
28. Sacharidis, D., Patroumpas, K., Terrovitis, M., Kantere, V., Potamias, M., Mouratidis, K.,
Sellis, T.: On-line discovery of hot motion paths. EDBT (2008)
29. Shang, S., Deng, K., Xie, K.: Best point detour query in road networks. ACM GIS (2010)
30. Shekhar, S., Yoo, J.S.: Processing in-route nearest neighbor queries: a comparison of alterna-
tive approaches. ACM GIS (2003)
31. Song, Z., Roussopoulos, N.: Seb-tree: An approach to index continuously moving objects.
Proceedings of International Conference of Mobile Data Management (2003)
32. Tao, Y., Faloutsos, C., Papadias, D., Liu, B.: Prediction and indexing of moving objects with
unknown motion patterns. SIGMOD (2004)
33. Tao, Y., Papadias, D.: Efcient historical r-trees. In: ssdbm, p. 0223. Published by the IEEE
Computer Society (2001)
34. Tao, Y., Papadias, D.: Mv3r-tree: A spatio-temporal access method for timestamp and interval
queries. In: VLDB, pp. 431440 (2001)
35. Tao, Y., Papadias, D., Shen, Q.: Continuous nearest neighbor search. In: Proceedings of the
28th international conference on Very Large Data Bases, pp. 287298. VLDB Endowment
(2002)
36. Wang, L., Zheng, Y., Xie, X., Ma, W.Y.: A exible spatio-temporal indexing scheme for large-
scale gps track retrieval. MDM (2008)
37. Xu, X., Han, J., Lu, W.: Rt-tree: An improved r-tree indexing structure for temporal spatial
databases. In: Int. Symp. on Spatial Data Handling
38. Yi, B.K., Jagadish, H., Faloutsos, C.: Efcient retrieval of similar time sequences under time
warping. ICDE (1998)
39. Zheng, Y., Zhang, L., Xie, X., Ma, W.Y.: Mining interesting locations and travel sequences
from gps trajectories. WWW (2009)
40. Zhou, P., Zhang, D., Salzberg, B., Cooperman, G., Kollios, G.: Close pair queries in moving
object databases. Proceedings of ACM GIS (2005)
Part II
Advanced Topics
Chapter 3
Uncertainty in Spatial Trajectories
Goce Trajcevski
Abstract This chapter presents a systematic overview of the various issues and so-
lutions related to the notion of uncertainty in the settings of moving objects tra-
jectories. The sources of uncertainty in this context are plentiful: from the mere
fact that the positioning devices are inherently imprecise, to the pragmatic aspect
that, although the objects are moving continuously, location-based servers can only
be updated in discrete times. Hence come the problems related to modelling and
representing the uncertainty in Moving Objects Databases (MOD) and, as a con-
sequence, problems of efcient algorithms for processing various spatio-temporal
queries of interest. Given the ever-presence of uncertainty since the dawn of philos-
ophy through modern day nano-level science, after a brief introduction, we present
a historic overview of the role of uncertainty in parts of the evolution of the human
thought in general, and Computer Science (CS) and databases in particular, which
are relevant to this chapter. The focus of this chapter, however, will be on the impact
that capturing the uncertainty in the syntax of the popular spatio-temporal queries
has on their semantics and processing algorithms. We also consider the impact of
different models in different settings e.g., free motion; road-network constrained
motion and discuss the main issues related to exploiting such semantic dimen-
sion(s) for efcient query processing.
3.1 Introduction
Historically, the impact of the imperfect knowledge on the reasoning and belief has
been a topic that has attracted a lot of research interest among both philosophers
and logicians [41, 63, 44, 123]. With the advent of the computing technologies,
as various domains of Computer Science (CS) have emerged, the importance of
Goce Trajcevski
Dept. of EECS, Northwestern University, 2145 Sheridan Rd. Evanston, Il 60208 USA (research
supported by NSF-CNS-0910952), e-mail: [email protected]
63
64 Goce Trajcevski
capturing the uncertain/probabilistic nature of the data has been recognized in many
of them:
Articial Intelligence which, in a sense popularized the Possible-Worlds seman-
tics [6, 40, 158].
Knowledge Representation and Reasoning along with Logic Programming and
Deductive Databases [1, 7, 98, 173].
Incorporating it on top of the traditional database technology [16].
to list but a few.
Due to the novel application domains along with advancements in database tech-
nology, a lot of recent research has been undertaken, addressing problems in mod-
elling and efcient querying of imprecise/uncertain data [2, 20, 111, 125, 133, 134].
In the past two decades, the advances in sensing and communication/networking
technologies, along with the miniaturizations of computing devices and develop-
ment of variety of embedded systems have spurred the recognition of the importance
of Location Based Services (LBS) [126] in a plethora of applications. From military,
through structural and environmental monitoring, disaster/rescue management and
remediation, to tourist information-providing systems the efcient management of
large amount of (location, time) data pertaining to mobile entities over (large) pe-
riods of time is a paramount. After several works and development of some ad-hoc
solutions [89], the eld of Moving Objects Databases (MOD) [56, 163] emerged
in the late 1990s as an enabling technology for the LBS-related applications, pro-
viding formal foundations and bringing about development of prototype system-
s [51, 69].
Contrary to the typical assumptions in:
1. Spatial databases [19, 76, 130, 142], where the data items may have dimension-
ality and extent, but are (relatively) static over time;
2. Temporal databases [35, 72, 132], where the main objective is capturing the
time-varying nature of the data in various application domains; and
3. Time-series [79, 78, 116, 177], where the values of the data samples over time
often pertain to a single dimension,
in MOD-settings, the objects are assumed to move, either freely in the 2D (or even
3D) space [90, 52, 131], or constrained by a road network [38, 50, 28, 154]. The
main features of spatio-temporal data sets:
1. The discrete data samples are expected to represent a continuous motion over
the given space, thereby necessitating some type of an interpolation; and
2. The typical queries of interest (e.g., whereabouts-in-time, range, (k)nearest-
neighbor, reverse nearest-neighbor, skyline) are continuous which is, their
answers need to be re-evaluated in time, or even persistent (cf. [131]) which
is, in addition to re-evaluating the answers over time, one may need to take into
consideration the entire history of the motion;
have inuenced a large body of works addressing issues related to modelling/ repre-
sentation, indexing and querying such data [9, 14, 24, 80, 37, 99, 109, 59, 112, 71,
93, 60, 97, 105, 164, 102, 119, 106, 140, 139, 141, 155, 169, 172]
3 Uncertainty in Spatial Trajectories 65
tainty in all the different scientic elds like, for instance, physics, chemistry, etc.
66 Goce Trajcevski
We now discuss the evolution of the treatment of the uncertainty along different
aspects of the evolution of the human thought. Firstly, we will review the uncertainty
of the knowledge/belief and how philosophers and logicians throughout the history
have addressed its formalization(s). Subsequently, we follow up with discussing
the role and treatment of the uncertainty in the elds of Articial Intelligence and
Databases. The last part of the section touches upon the elds of time-geography
and inexact geometries.
Due to its close relationship with logic and, for that matter, extensive use of the
Logic Programming paradigm, AI is one of the very rst CS elds that have adopted
the concept of possible worlds. The Possible Worlds Approach (PWA) is a power-
ful mechanism for incorporating new information into logical theories, studied by
philosophers interested in belief revision and scientic theory formation [3], as well
as database theorists [1, 36]. The basic premise of PWA is to keep a single model
of the world that is updated when actions are performed. The update procedure in-
volves constructing the nearest world to the current one, in which the consequences
of the actions under consideration hold. As explained in [158], the PWA-based re-
vision of a theory can be summed up as: To incorporate a set S of formulae into an
existing theory T, take the maximal subset T of T that is consistent with S, and add
S to T. This is one of the approaches undertaken for the problem of minimality of
view updates in databases [46].
Although it aimed at bringing about computationally efcient procedures for rea-
soning about actions, PWA was shown to have problems when it comes to, so called,
3We respectfully note that philosophers and logicians are likely to disagree that semantics based
on Kripke frames are model-equivalent to the one based possible worlds.
68 Goce Trajcevski
frame, ramication, or qualication issues, due to the fact that it did not distinguish
between the state of the world and the description of the state of the world [158]. As
a remedy, the Possible Models Approach (PMA) was introduced, which observed
the models of a given theory T, rather than its formulae. The goal of PMA is to
change as little as possible the models of T in order to make the new set of formulae
S true. Once the focus has shifted on the models, reasoning about actions became
more amenable to incomplete information.
The archetypical example of uncertainty in traditional relational databases was
the one of an absence of value for a particular attribute, denoted as NULL. This value
is not associated with a particular type and, more importantly, it implies involvemen-
t of the three-valued logic, adding the unknown value in the picture and disturbing
the cushy Closed World Assumption (CWA) model of relational databases. With
NULL value, one is no longer justied to assume that the values stored within a
database correspond to a complete version of the world and everything not stored in
the database is false thereby imposing the Open World Assumption and demand-
ing extra caution when using SQL in practice.
A plethora of novel application domains such as Location-Based services, health
and environmental monitoring based on sensor data analysis, biological image anal-
ysis, market analysis and economics generate a vast amount of data which is in-
herently uncertain due to the imprecision of measuring devices, randomness and
delays in data updates. This has spurred a tremendous research interest in proba-
bilistic databases [2, 11, 10, 20, 92, 125, 133, 167]. In these settings, one typical
feature is that some attributes are probabilistic, in the sense that their values are giv-
en by a probabilistic density function (pdf) however, in practice, one cannot hope
to have the pdf available and must rely on samples instead. In general, a probabilistic
database can be thought of as nite set of probabilistic tables one for each plau-
sible value of the uncertain tuples, associated with membership probability. If the
probability of a particular instantiation for the objects in the database is greater ze-
ro, then that particular instantiation constitutes one of the possible world. The main
problem is that the cardinality of the set of all the possible worlds is exponential
in the number of uncertain objects [6]. In addition to complicating the issue of the
semantics to the answers of the queries, the large number of possible worlds clearly
imposes computational costs in their processing enumerating the answers in all
the possible worlds is infeasible in practice. Hence, the researchers have resorted
to balancing tradeoff between accuracy and computational cost, e.g., retrieving on-
ly objects with highest likelyhood to be in the result; reporting only answers the
probability of which exceeds a given threshold; returning approximate answers, etc.
A recent approach addressing a generic query optimization for uncertain databases,
introducing a threshold operator ( -operator) to the query plan and demonstrating
that it is generally desirable to push it down as much as possible, is presented
in [118].
Getting into a detailed discussion on the topic of probabilistic databases is be-
yond the scope of this Chapter, and for a comprehensive overview the reader is re-
ferred to the recent tutorials [134, 111, 120], along with a cohesive recent collection
of works with an extensive list of references available in [58].
3 Uncertainty in Spatial Trajectories 69
Two elds that have emerged in the mid/late 1980s Spatial Databases and Tempo-
ral Databases became, in some sense, precursors to the spatio-temporal databases.
In the rest of this section, we present some issues addressed in each eld, which are
of relevance to the context of this Chapter.
Spatial databases [49, 122, 130] deal with efcient storage and retrieval of object-
s in space that have identity and well-dened extents, locations, as well as certain
geometric and/or topological relationships among them, owing to developments in
application elds (GIS, VLSI design, CAD) that needed to deal with large quantities
of geometric, geographic, or spatial entities. In addition to some stable and mature
prototypes prototypes based on solid algebraic type-foundation [48, 55] commer-
cial Database Management System (DBMS) vendors have provided extensions to
their products, supporting spatial types and operations (Oracle Spatial, DB2 Spatial
Extender, PostgresGIS, Microsoft SQL server, MySQL). Without a doubt, the re-
sults in spatial databases have spurred several important research avenues in MOD
settings, e.g.:
Many popular types of MOD queries (e.g., range, nearest-neighbor) have variants
that were studied in spatial databases context [65, 124].
Indexing structures developed for facilitating the efcient data access for pro-
cessing spatial queries [8, 57] served as foundations for spatio-temporal indexes.
3 Uncertainty in Spatial Trajectories 71
h h
The rst such concept is the one of location uncertainty. Namely, if one cannot
specically determine the values of the coordinates of a given point in a reference
coordinate system, then the specication of that point must incorporate the accom-
panying uncertainty. We already touched upon the issue of tolerance geometry in
Section 3.2.3, which generalized the concept of a point into a point with extension
and investigated the impacts on the formal reasoning in such geometries. In prac-
tice, however, in addition to capturing the uncertainty e.g., via pdf, or histogram,
alongside with some boundary an important aspect is how to incorporate it in the
query processing techniques. The rst observation is that the answer to the query
must somehow reect it. An illustrating example is shown in Figure 3.2, pertaining
to processing of spatio-temporal range queries for objects with uncertain locations.
Part a.) of Figure 3.2 shows the uncertain object o.ur whose possible locations are
bounded by a heptagonal region. For as long as the query region r.q is crisp, one can
determine the probability that o.ur is inside the range r.q e.g., if the pdf of o.ur is
uniform, the probability is: |o.ur r.q|/|o.ur|. However, once the query region itself
is uncertain e.g., its boundaries have some bound of possible whereabouts (cf.
Figure 3.2.a.)), then the calculations of the probability become more computation-
ally expensive. To cater for this, it was observed in [142] that if one is interested
only in objects whose probability of being inside the range exceeds certain thresh-
old, then a pruning could be applied, for which the U-Tree indexing structure was
introduced.
Many entities such as regions of toxic spread, temperature maps, water-to-soil
boundaries and boundaries among different types of soil, cannot be exactly deter-
mined. One of the approaches to address the storing and querying of such data was
to introduce the concepts of fuzzy points, fuzzy lines, and fuzzy regions in the Eu-
clidian space. Along with that, fuzzy spatial set operations like union, intersection,
72 Goce Trajcevski
We now focus on the rst part of the main topic of this chapter modelling of un-
certainty in spatial trajectories. After a brief overview of some basic spatio-temporal
concepts and denitions, we proceed with detailed discussion of the main aspects of
some of the existing models for capturing the uncertainty of spatio-temporal data.
The last part of this section is dedicated to the uncertainty aspects when the motion
of the objects is constrained to a road network.
As mentioned in Section 3.1, the (location, time) data capturing the motion of
moving objects is subject to uncertainty for a variety of reasons, at every stage
of its generation. The GPS receivers only approximate the actual position [27]
hardware. The precision of motion sensors deteriorates with the distance from
their own location and, moreover, typically the localization of a tracked object is
done via trillateration, without guaranteeing that every participating node is reli-
able [62, 73, 175, 179]. Aside from the location determination per se additional
issues arise due to timing synchronization [135], as well as the protocols used for
transmitting the (location,time) information from sensors to MOD or LBS server-
s [37, 162]. Last, but not the least since it is impossible to record the location for
every single time-instant, the interpolation in-between consecutive records yields an
uncertainty of the trajectory [74, 88].
In a similar spirit to the works that have developed formal models for repre-
senting and querying crisp trajectories i.e., ones without any uncertainty of the
moving objects whereabouts(e.g., [53, 154]), researchers have addressed the prob-
lem of generic representation of uncertainty, along with a framework for syntactic
categorization of spatio-temporal queries [88, 103, 171].
W
W&
^
h
W& ^
E h > W
needed. Hence, techniques have been proposed for using different (hybrid) models
based on representing the objects whereabouts with other algebraic functions [74,
138].
O2: Are the points arriving at a MOD server in a batch manner, i.e., portions of, or
the entire trip as opposed to streams of individual (location,time) data values [100,
102, 39, 162]?
Catering to observations O1 and O2, researchers have proposed several models
of uncertainty of motion, which we address in detail next.
Denition 3.2. Let vimax denote the maximum speed that an object can take within
the time-interval (ti ,ti+1 ). A bead Bi = ((xi , yi ,ti ), (xi+1 , yi+1 ,ti+1 ), vimax ) is dened
as the set of all the points (x, y,t) satisfying the following constraints:
ti t ti+1
(x xi ) + (y yi ) [(t ti )vimax ]2
2 2
The rst and the second constraint of Equation 3.3, when taken together describe a
cone emanating upwards from (xi , yi ,ti ), with a vertical axis and with circles whose
radius value at time t is (t ti )vimax , whereas the rst and the third constraint togeth-
er, specify a cone emanating downwards from (xi+1 , yi+1 ,ti+1 ), with a vertical axis
and with circles whose radius at time t is (ti+1 t)vimax . Hence, the bead Bi can be
4 We note that, more recently, this model is also called space-time prism.
76 Goce Trajcevski
ti
tsv1
t1
L2 ((x2,y2), t2)
L1((x1,y1), t1)
Possible locations at t = ti
(tsv1 < ti < tsv2)
viewed as volume dened by the intersection of those two cones. We note that at
t = ti (resp. t = ti+1 ) the locations
of the object are crisp (i.e., no uncertainty).
For a given bead Bi , let di = (xi+1 xi )2 + (yi+1 yi )2 denote the distance
between locations of the starting location (at ti ) and ending location (at ti+1 ). Also,
let tsvi = (ti + ti+1 )/2 di /2vimax and tsvi+1 = (ti + ti+1 )/2 + di /2vimax . We observe
that each bead had two distinct types of volumes:
1. Single disk volumes: For every t [ti ,tsvi ], the spatial boundary of the bead at
t is a circle with radius r(t) = vimax (t ti ), centered at (xi , yi ). Similarly, for
every t [tsvi+1 ,ti+1 ], the spatial boundary of the bead at t is a circle with radius
r(t) = (ti+1 t)vimax , centered at (xi+1 , yi+1 ). Hence, throughout [ti ,tsvi ], the 3D
volume of the bead consists of a single cone, with a vertex at (xi , yi ,ti ) (similarly
for [tsvi+1 ,ti+1 ]).
2. Two-disks volume: In-between tsvi and tsvi+1 , (i.e., t [tsvi ,tsvi+1 ]), the boundary
of the bead at t is an intersection of two circles: Cdown i (t), centered at (xi , yi ),
with radius rdown (t) = (t ti )vmax , and Cup (t), centered at (xi+1 , yi+1 ), with ra-
i i
(2x xi xi+1 )2
+
(vimax )2 (ti+1 ti )2
(2y yi yi+1 )2
=1 (3.4)
(vimax )2 (ti+1 ti )2 (xi+1 xi )2 (yi+1 yi )2
3 Uncertainty in Spatial Trajectories 77
We will use Eli to denote the ellipse resulting from projecting the bead Bi in the
(X,Y ) plane. Figure 3.4 provides an illustration of the different components of the
(volume of the) bead and its corresponding shapes at different time-points, as pro-
jected on the horizontal (X,Y ) plane.
Denition 3.3. Given a trajectory Tr, its corresponding uncertain trajectory UTr is
a sequence of beads, B1 , B2 , . . . , Bn1 .
A Possible Motion Curve PMC(Tr) of UTr is any function f: Time R2 for
which every point (x, y,t), is either a vertex of the polyline of Tr, or it satises
(x, y) = f (t) and is inside the corresponding bead i.e., (t)(ti < t < ti+1 )
((x, y,t) Bi ).
The concept of a possible motion curve is illustrated in Figure 3.4 and we note
that, in a sense, each possible motion curve corresponds to a possible world of the
objects motion in-between two updates.
We note that in a recent work [94], an analogy is used between the expected-
trajectory (i.e., the line segment between consecutive points) where necklace is re-
served for the known part of the motion, and the uncertain part termed pendant.
Denition 3.4. Let r denote a positive real number and Tr denote a trajectory be-
tween the times t1 and tn . An uncertain trajectory UTr is the pair (Tr, r). r is called
the uncertainty threshold.
For each point (x, y,t) along Tr, its r-uncertainty area (or the uncertainty area
for short) is a horizontal disk (i.e. the circle and its interior) with radius r centered
at (x, y,t), where (x,y) is the expected location at time t [t1 ,tn ].
Let UTr = (T, r) be an uncertain trajectory between t1 and tn .
A Possible Motion Curve PMC(Tr) of UTr is any continuous function fPMCTr :
Time R2 dened on the interval [t1 ,tn ] such that for any t [t1 ,tn ], the 3D point
( fPMC(Tr) (t),t) is inside the uncertainty disk around the expected location at time t.
For a given uncertain trajectory UTr = (Tr, r) and two end-points (xi , yi ,ti ),
(xi+1 , yi+1 ,ti+1 ) Tr, the trajectory volume of UTr between ti and ti+1 is the u-
nion of all the disks with radius r centered at the points along the line segment
(xi , yi ,ti ), (xi+1 , yi+1 ,ti+1 ). This volume is actually what denes the sheared cylin-
der in the (X,Y, T ) coordinate system. The XY projection of the trajectory volume
is called an uncertainty zone. Figure 3.5 illustrates the basic concepts associated
with the motions uncertainty under this model.
78 Goce Trajcevski
(x2,y2,t2)
(x1,y1,t1)
possible route
Y uncertainty zone
When the motion of an object is restricted by a road network [5, 31, 30, 45, 84,
83, 178], the models described so far (cones/beads and sheared cylinders) become
inadequate for representing the moving objects uncertainty. To begin with, road net-
works are most often represented as (undirected) graph G(V, E), where the vertices
correspond to intersections and edges correspond to road segments in-between in-
tersections. Often, a given edge esk is accompanied with some additional attributes,
e.g.,:
the length of esk , denoted l(esk ); and
3 Uncertainty in Spatial Trajectories 79
S
T
%HDGV RQ URDG
QHWZRUN
Fig. 3.7 Uncertainty on
Road Networks: The pos-
sible whereabouts of the
moving objects, contrary to
the space-time prisms, is now
only a subset of the 2D ellipse
the one intersecting the
edges. The cones/beads are
reduced to unions of vertical
line-segments, sweeping
along, and perpendicular to
road network edges (cf. [84],
with permission)
The connection (and restrictions) with the beads model is illustrated in Fig-
ure 3.7. Note that in road network settings, one cannot consider the entire ellipse (the
2D projection of the bead [113]) as a spatial range of the objects possible locations.
Instead, only a subset of it intersecting the edges of the graph can be taken into
account [84, 83].
An important consequence of the model of road network trajectories is that the
distance between two moving objects can no longer be measured using the 2D Eu-
clidian distance (L2 -norm) since the objects are constrained to move along the edges
of the road network. Instead we need to rely on the shortest network distance which,
in turn, may have a two-fold interpretation ( [67, 105, 129, 168]):
80 Goce Trajcevski
We note that the processing of the popular spatio-temporal queries for uncertain
trajectories often follows the typical paradigm of ltering + pruning + renement,
where: (1) the ltering stage brings a subset of the total set of trajectories candi-
dates from the secondary storage, which is a superset of the relevant data for the
query, based on some indexing structure. The desiderata for this stage are that there
should be no false-negatives and as few false-positive as possible; (2) the pruning
stage is used to quickly eliminates some of the candidates e.g., based on the as-
surance that the desired probability threshold cannot be met by a trajectory which
satises some properties that are computationally easier to evaluate than the rene-
ment algorithm; (3) the renement stage, which eliminates all the false positives
from among the candidates.
In the rest of this section, we will present examples of solutions to the problem
of processing spatio-temporal range queries and nearest neighbor queries for uncer-
tain trajectories for different models of uncertainty discussed in Section 3.4. Since
explaining the details of the approaches exceeds the scope of this Chapter, we will
try to highlight some of the main intuitive features of the existing results and point
out to the body of references where more detailed exposition of various topics is
available. We nalize this section with an overview of some miscellaneous queries
for uncertain moving objects.
3 Uncertainty in Spatial Trajectories 81
If the model of uncertainty is the one of a cone and the moving objects are assumed
to send (location, time) updates, along with a given restriction of the velocity then,
for a given spatial pdf, one can evaluate the probability of a particular object be-
ing inside the region R at each t [t1 ,t2 ]. For a given t, the generic formula for
calculating whether a given object oi is inside R would be (cf. [21]):
with an extra data in its nodes, which is vmax - the maximum possible speed of the
objects under a given node, with an extra storage of the overall maximum speed
at leaf nodes. The construction of VCI is similar to the R-tree, with an additional
provision of ensuring that vmax is correctly maintained at the root of each sub-tree
which is properly considered when a node split occurs. When VCI is used to process
a given query, one must account for the changes of the position (with respect to the
stored value) over time. To cater for this, in [21] the Minimum Bounding Rectan-
gles (MBR) used to process a give query at a time instant t are expanded by a factor
of vmax (t t0 ), where t0 is the time of recording the entry for a given object at
VCI. We note that the discussion above illustrates techniques that can be applied for
processing range queries over uncertain trajectories at a particular time-instant.
In Section 3.4, we introduced the concept of a possible motion curve for a given
trajectory (PMC(Tr)) and hinted that, in some sense, it describes a possible world
of a particular trip taking place. However, the generic form of a range query QR
discussed above does not reect this anywhere in its syntax. Towards that, the works
in [150, 149] have identied the different qualitative relationships that an uncertain
trajectory (i.e., the family of its PMCs) could have with the spatial aspect (region
R) and temporal aspect (time-interval of interest [t1 ,t2 ]) of the range query.
Firstly, since the location of the object changes continuously, the condition of
the moving object being inside R may be true sometime (t) or always (t) within
[t1 ,t2 ]. Secondly, an uncertain moving object, in addition completely failing to be
inside R, may either possibly or denitely satisfy the spatial aspect of the condition
at a particular time-instant t [t1 ,t2 ]. In simpler terms, if some PMC(Tr) is inside R
at t, there is a possibility that it has been the actual motion of the object however,
this need not be the case as there may have been another PMC(Tr) that the object
has taken along its motion. Let V Tr denote the bounding volume of (the union
of) all the possible motion curves for a given trajectory Tr i.e., the sequence of
sheared cylinders (cf. Figure 3.5). Formally, the concept of possibly can be specied
as PMC(Tr) V Tr and the one of denitely can be specied as PMC(Tr) V Tr.
Given the two domains of quantication spatial and temporal with two quan-
tiers each, we have a total of 22 2! = 8 operators, and their combinations yield the
following variants of the spatio-temporal range query for uncertain trajectories:
Fig. 3.9 Illustration of the Predicates Capturing the Different Quantiers of Spatial and Temporal
Domains
QAP
R : Always Possibly Inside(Tr,R,t1 ,t2 )
(t)(PMC(Tr))Inside(R, PMC(Tr),t)
Semantics: true iff for every time value t [t1 ,t2 ], there exists some (not neces-
sarily unique) PMC(Tr) inside (or on the boundary of) the region R at t.
QAD
R : Always Denitely Inside(Tr,R,tb ,te )
(t)(PMC(Tr))Inside(R, PMC(Tr),t)
Semantics: true iff at every time t [t1 ,t2 ], every possible motion curve PMC(Tr)
of the trajectory Tr, is in the region R. Thus, no matter which possible motion
curve the object takes, it is guaranteed to be within the query region R throughout
the entire interval [t1 ,t2 ].
QDS
R : Denitely Sometime Inside(Tr,R,tb ,te )
(PMC(Tr))(t)Inside(R, PMC(Tr),t)
Semantics: true iff for every possible motion curve PMC(Tr) of the trajectory
Tr, there exists some time t [t1 ,t2 ] in which the particular motion curve is
inside the region R. Intuitively, no matter which possible motion curve within
the uncertainty zone is taken by the moving object, it will intersect the region
at some time t between tb and te . However, the time of the intersection may be
different for different possible motion curves.
QSD
R : Sometime Denitely Inside(Tr,R,tb ,te )
(t)(PMC(Tr))Inside(R, PMC(Tr),t)
Semantics: true iff there exists a time point t [t1 ,t2 ] at which every possible
route PMC(Tr) of the trajectory Tr is inside the region R. In other words, no
matter which possible motion curve is taken by the moving object, at the specic
time t the object will be inside the query region.
Figure 3.9 illustrates the intuition behind plausible scenarios for the predicates spec-
ifying the properties of an uncertain trajectory with respect to a range query, project-
84 Goce Trajcevski
ed in the spatial dimension. Dashed lines indicate the possible motion curve(s) due
to which a particular predicate is true, whereas the solid lines indicate the expected
routes, along with the boundaries of the uncertainty zone.
A couple of remarks are in order:
1. Although we mentioned that there are 8 combinations of the quantiers over
the variables in the predicates, we listed only 6 of them. This is actually a s-
traightforward consequence of the facts from First Order Logic namely, for
any predicate P, given a constant A and variables x and y, it is true that:
(x)(y)P(A, x, y) (y)(x)P(A, x, y)
and
(x)(y)P(A, x, y) (y)(x)P(A, x, y)
This is regardless of the domain of (interpretation of) the variables and the se-
mantics of the predicate P. Hence, we have that Possibly Sometime Inside is
equivalent to Sometime Possible Inside; and Denitely Always Inside is equiv-
alent to Always Denitely Inside. Hence, in effect we have 6 different predi-
cates.
2. Similarly, the formula:
(x)(y)P(A, x, y) (y)(x)P(A, x, y)
is a tautology. In effect, this means that the predicate Possibly Always Inside
is stronger than Always Possibly Inside, in the sense that whenever Possi-
bly Always Inside is true, Always Possibly Inside is guaranteed to be true.
We observe that the converse need not be true. As illustrated in Figure 3.9, the
predicate Always Possibly Inside may be satised due to two or more possible
motion curves, none of which satises Possibly Always Inside by itself. When
the region R is convex, however, those two predicates are equivalent (cf. [149]).
3. For the same reason as above, we conclude that Sometime Denitely Inside is
stronger than Denitely Sometime Inside, however, the above two predicates
are not equivalent when the region R is convex. In Figure 3.9 this is shown
by R2 satisfying Denitely Sometime Inside, however, since it does not con-
tain the entire uncertainty disk at any time-instant, it cannot satisfy Some-
time Denitely Inside.
The algorithms for processing the respective predicates involve techniques from
Computational Geometry (CG) (Red-Blue Intersection; Minkowski Sum/Difference)
and their detailed presentation is beyond the level of detail for this Chapter. Their
detailed implementation, along with complexity analysis, is available in [149]. We
note that in the global context of query processing, [149] focused on the renement
stage.
In a sense, the predicates described above correspond to the, so called, MAY
and MUST cases for range queries over uncertain trajectories (cf. [104, 103, 162])
3 Uncertainty in Spatial Trajectories 85
tbq
Y
Possibly_Sometime
Possibly_Always
(Always_Possibly)
and, more specically, the Inside property is discussed as a predicate in the generic
query interface discussed in [88].
X
ai+1
ai
R
(= (xi+1 , yi+1 )) denote the 2D projections of its lower and upper foci in temporal
sense i.e., Fil occurs at time ti and Fiu at time ti+1 . For complexity analysis, as-
sume that the region R has m edges/vertices, and an one-time pre-processing cost of
O(m) has been performed to determine the angles in-between its consecutive ver-
tices with respect to a given point in Rs interior [107]. The renement algorithm
can be specied as follows:
1. If (ti [t1 ,t1 ] Fil R) (ti+1 [t1 ,t2 ] Fiu R)
2. return true
3. else if (Eli R = 0) /
4. return true
7. return false
Each of the disjuncts in line 1. can be veried in O(log m) due to the convexity of
R (after the one-time pre-processing cost of O(m)) [107]. Similarly, by splitting the
ellipse in monotone pieces (e.g., with respect to the major axis), one can check its
intersection with R in O(log m), which is the upper bound on the time-complexity
of the algorithm.
We note that many of the works on formalizing the predicates that capture d-
ifferent types of spatio-temporal range queries are geared towards extending the
querying capabilities of MODs. Consider, for example the following query:
QUR : Retrieve all the objects which are possibly within a region R, always between
the earliest5 time when the object A arrives at locations L1 and the latest time when
it arrives at location L2 .
If the corresponding predicates are available, this query can be specied in SQL as:
WITH Earliest(times) AS
SELECT When_At(trajectory,L_1)
FROM MOD
5 Observe that a given object may pass through a given point along its route more than once
3 Uncertainty in Spatial Trajectories 87
WHERE oid = A
WITH Latest(times) AS
SELECT When_At(trajectory,L_2)
FROM MOD
WHERE oid = A
SELECT M1.oid
FROM MOD as M1
WHERE
Possibly_Always_Inside(M1.trajectory,R,
MIN(Earliest.times),
MAX(Latest.times))
When the motion of a given object is constrained to an existing road network, one
of the sources of its location uncertainty is due to the fact that the objects speed may
vary between some vmin and vmax along a given segment which we described in
Section 3.4.3. However, there is another source of the uncertainty of such motion
namely, the low sampling-rate of the on-board GPS devices e.g., due to unavail-
ability of satellite coverage in dense downtown areas. The main consequence of this
is that the distance between two consecutive sampled positions can be large: e.g.,
it can be over 1.3km when sampling every 2 minutes, even if a vehicle is moving
at the speed as low as 40km/h. The additional uncertainty is reected in the fact
that there may be many possible paths connecting the two consecutively sampled
positions, which satisfy the temporal constraints of the actual consecutive samples.
The problem is even more severe for vehicles travelling with higher speeds, as there
may be several intersections between two consecutive samples.
As an example, consider the scenario depicted in Figure 3.12. It shows two con-
secutive location-samples: L1 at t1 = 0, and L2 at t2 = 7. There are three possible
routes between vertices (intersections) A and D: (AC,CD) with travel time 4 + 2
= 6 time units; AD with travel time of 4; and (AB, BD), with a travel time of
2 + 3 = 5 time units. Given the information about minimum travel time cost e.g.,
88 Goce Trajcevski
1 time unit between L1 and A, as well as between D and L2 , is 1 time unit, consider
the following query:
QR :Retrieve all the moving objects that are within distance r from the location Q
between t = 3.5 and t = 4.
Clearly, it is impossible that the object has travelled along the route (AC,CD)
because with the maximum speed at each segment, the earliest time of arrival at
the location L2 would be 8. This leaves only two possible paths: AD and (AB, BD).
Following are the main observations regarding these plausible routes:
If object a travelled along AD with the maximum speed, it will denitely be insid-
e the spatio-temporal cylinder (based at the 2D disk centered at q and with radius
r) between t = 3.5 and t = 4. However, now the question becomes, what if the
moving object did not travel using the maximum speed? What is the probability
of a satisfying QR , given some pdf of its speed?
If object a travelled along (AB, BD) using the maximum speed, it will not qualify
as an answer to QR . However, if the moving object uses smaller speed, then there
may be a possibility of it entering the spatio-temporal query cylinder sometime
during the time-interval of interest. Namely, the object can be at the location LQ
along the segment BD at any time during t = 3.3 and t = 3.7. Now the question
again becomes, given the pdf of its speed, what is the probability of a satisfying
QR . As an additional observation, we note that the object a can be anywhere
within a particular segment at a given time-instant as illustrated in Figure 3.12
for the time t = 3.7.
The models for uncertain trajectories on road networks in terms of possible
locations at a given time-instant have been considered in [5, 45, 83]. The combi-
nation of the effects of choosing possible path together with the location uncertainty
along a particular one has been formalized in [178].
Denition 3.5. Given two trajectory samples (ti , pi ) and (ti+1 , pi+1 ) of a moving
object a on road network, the set of possible paths (PPi ) between ti and ti+1 consists
of all the paths along the routes (sequence of edges) that connect pi and pi+1 , and
whose minimum time costs (tc) are not greater than ti+1 ti , i.e.,
where Paths denotes all the paths between pi and pi+1 , tc(Pj ) is the sum of all the
tc(e) of e Pj .
1/tc(Pj )
Pri, j (a) = Pr[PPi (a) = Pj ] =
Px PPi (a) 1/tc(Px )
Even if a particular path Pj is considered, the location of the moving object at
a given time-instant t (ti ,ti+1 ) need not be crisp (i.e., certain) because the speed
along Pj may uctuate. However, the set of possible locations can be restricted as
follows:
Denition 3.6. Given a path Pj PPi (a), the Possible Locations of a given moving
object a with respect to Pj at t [ti ,ti+1 ] is the set of all the positions p along Pj
from which a can reach pi (respectively, pi+1 ) within time period t ti (respectively,
ti+1 t) i.e.,
tcP (pi , p) t ti
PLi, j (t) = p Pj j (3.5)
tcPj (p, pi+1 ) ti+1 t
As an example, in the case of a uniform pdf, the probability that the object a is
between positions pA and pB along a possible path Pj , whose network-distance is
d(pA , pB ), is:
d(pA , pB )
Pr[pa (t) [pA , pB ]] = Pri, j (a) (3.6)
PLi, j (t)
where PLi, j (t) denotes the the network-length of PLi, j (t). Formula 3.6 illustrates
the joint consideration of the probability that a particular path Pj is being selected
from among the possible ones, together with the probability of the object being
somewhere along the segment pA , pB at a given time-instant t [178].
Clearly, given an existing road-map along with the (location,time) samples, a
methodology is needed to construct all the possible trajectories that satisfy the tem-
poral constraints of the samplings. In addition, one needs to determine the pdfs of
the location uncertainty along different possible paths. Algorithmic solutions for
two types of probabilistic range queries: snapshot (instantaneous) and continuous,
are presented in [178], along with a novel indexing structure Uncertain Trajectory
Hierarchy (UTH), used to index the road network, object movement and trajectories
in a hierarchical style and to improve the overall efciency of the query processing.
We now present some of the techniques that have addressed variants of the problem
of efcient management of Nearest-Neighbor (NN) queries for uncertain trajecto-
ries. Before we proceed with the details, we note that an assumption commonly
used in the literature (e.g., [21, 142]) is that the locations of the uncertain objects
are independent random variables.
The basic form of spatio-temporal range query is:
QNN : Retrieve the nearest neighbors of the trajectory Truq between t1 and t2 .
90 Goce Trajcevski
Recall Figure 3.8 used to explain the intuition behind spatio-temporal range query
processing for cone-like model of uncertainty. If we take a horizontal slice at a
particular time-instant, we will obtain all the spatial locations of the objects at that
time-instant.
Tr1
R1min
Tr2 Rd
Q
Tr3
Rmin
4 > Rmax
1
Tr4
Consider a scenario in which that we are given a query object oQ whose location
at a particular time instant is crisp, i.e., a 2D point Q, with no uncertainty associated
with it, and assume that the possible locations of the other objects are disks with
radius r (cf. Figure 3.13).
An important observation was made in [21], which can be used to effectively
prune all the objects that cannot qualify to have a non-zero probability of being a
nearest neighbor to oQ . Namely, the distance between Q and the most distant point
of the closest disk (e.g., Rmax in Figure 3.13), is an upper bound on the distance
that any possible nearest neighbor of Trq can have. Consequently, any object oi
(a snapshot of a trajectory Tri ) whose closest possible distance to Q, denoted with
Rmin
i , is larger than Rmax , has a zero probability of being a nearest neighbor to Trq
and can therefore be safely pruned. As can be seen from Figure 3.13, Rmin 4 > R1
max
and similarly R5 > R1 , which means that Tr4 and Tr5 have zero probability of
min max u u
where A, the integration bound, denotes the area of the intersection of the disk
with radius Rd centered at Q and the uncertainty disk of Tri , with a correspond-
ing pd fi (x, y).
Then, in order to calculate the probability that the trajectory of a given object,
Truj , is a nearest neighbor of the crisp querying object Trq at a given time instant,
one needs to consider:
1. The probability of Tr j being within distance Rd from Trq ; combined with:
2. The probability that every other object Tri (i = j) is at a distance greater than
Rd from the location Q of Trq ; and
3. The fact that the distributions of the objects are assumed to be independent from
each other.
Using these observations, the generic formula for the nearest-neighbor probability
(cf. [21]) is:
NN
Pj,Q = WD
pd f j,Q (Rd ) (1 Pi,Q
WD
(Rd )) dRd (3.8)
0 i= j
As pointed out in [21], the boundaries of the integration need not be 0 and because
the effective boundary of the region for which an object can qualify to be a nearest
neighbor of Trq is the ring centered at Q with radii Rmin and Rmax . More specically,
WD (R ) is 0 for any R < Rmin and 1 PWD (R ) is 1 for R < Rmin .
pd f j,Q d d j i,Q d d i
By sorting the objects that have a non-zero probability of being nearest neighbors
according to the minimal distances of their boundaries from Q, one can break the
evaluation of the integral from Equation 3.8 into subintervals corresponding to each
Rmini and the computation of the Pj,QNN can be performed in a more efcient manner,
based on the sorted distances and the corresponding intervals [21]. The importance
of this observation is in the fact that the the integrals (cf. Equation 3.8) are likely
to be computed numerically. For a uniform pdf of the location uncertainty, the ob-
jects can be sorted according to the distances of their expected locations from the
querying object.
While the methodology explained above is sound for evaluating a snapshot (i.e., in-
stantaneous) NN queries, an important property of the NN queries in MOD settings
is that their answer over the time-interval of interest needs to be parameterized [139].
In other words, as the querying object itself, as well as the other objects are continu-
ously moving, the nearest neighbors will change over time. To illustrate this feature,
assume that we have a MOD with four trajectory-segments
Tr1 = {(120, 60, 10), (220, 300, 20)}
Tr2 = {(310, 100, 10), (190, 260, 20)}
92 Goce Trajcevski
7U
z
y
Syntax and Semantics of the Answer: how can we capture the time-parameterized
nature of the answer in a compact manner?
Ranking: how can we establish the rank of a given trajectorys probability (e.g.,
highest or lowest) of being a nearest neighbor [133] at a particular time instant?
Continuity: how can we efciently detect the changes to the continuous ranking
of the objects that qualify to be nearest neighbors (with non-zero probability)
throughout the time-interval of interest?
3 Uncertainty in Spatial Trajectories 93
Fig. 3.15 Left: Uncountably many integrations needed to evaluate Within Distance probability in
native space; Right: After convolution, the querying trajectory is xed and crisp
The rst source of complication comes when the querying object is no longer
crisp how is the probability of being within distance evaluated in such cases? As
shown in the left portion of Figure 3.15, we need to take innitely many integrations
over the entire disk of possible locations for the uncertain trajectory. However, since
the relevant part for determining the nearest neighbor status between a given trajec-
tory and the querying trajectory is their distance, it was observed in [148] that one
may actually focus on a random variable specifying the difference between the two
random variables: one corresponding to a particular trajectory; one correspond-
ing to the querying trajectory. It is a consequence of the laws of probability theory
that the difference-variable will have a pdf which is a convolution of the pdfs of the
original variables and, in addition, as demonstrated in [148] if the original pdfs
have circular symmetry, so will their convolution. What is enabled by this obser-
vation is that one can snap the querying trajectory to the origin of the respective
W D using the results from [21], except
spatial coordinate system, and calculate the Pi,q
the non-querying trajectories will be transformed by: translation of the expect-
ed location; modication of their location pdf. An illustration of this is provided
in the right portion of Figure 3.15 in effect, reducing an extra-level of an outer
integration.
Most importantly, though, since the transformation described above is applicable
to every time-instant, one can tackle the continuity aspect by using the, so called,
difference trajectories. Specically, instead of considering the original expected tra-
jectories in the MOD to evaluate the expected distance from the querying trajectory,
one can assume that the querying trajectory is snap-ed to the origin, and consider
the modied trajectories to evaluate the change of the mutual distance. The main
consequence of this, which is enabling the design of the efcient algorithm for cal-
culating the answer to the continuous NN query for uncertain trajectories (again,
assuming the location pdf has circular symmetry around the centroid) is that if the
94 Goce Trajcevski
centroid of Trui Truq is closer to the coordinate-center than the centroid of Truj Truq ,
then Trui has a higher probability of being the nearest neighbor of Truq than Truj .
Given the observations above, along with the fact that the distance function be-
tween the centroids of the querying trajectory and an individual trajectory changes
as a hyperbola [9, 119] over time6 the continuity and ranking aspects can be handled
based on the following properties:
The nearest neighbor with highest probability will be the trajectory whose dis-
tance function determines the lower envelope of the collection of the distance
function. The rank will change in the cusps of the lower envelope (i.e., whenever
it becomes determined by the distance function of another trajectory).
The trajectory with the second-highest probability of being a nearest neighbor
in a given time-interval can be obtained if the one dening the lower envelope
in that time-interval is removed (and recursively for the k-th highest probability
(k 2).
Regardless of the particular pdf, for as long as the uncertainty zone of the object-
s locations is bounded by a circle with radius r, every trajectory whose distance
function is further than 4 r from the lower envelope can be pruned from con-
sideration for a nearest neighbor with non-zero probability.
When it comes to the structure of the answer that is to be presented to the us-
er [148] postulates that one compact structure can be obtained by splitting the time-
interval of interest, say [tb ,te ], into sub-intervals [tb ,t1 ], [t1 ,t2 ], . . . , [tn1 ,te ] so that
the trajectory that has the highest probability of being the nearest neighbor of Truq in
each sub-interval is unique.
Subsequently, each such sub-interval can be further split into its own sub-
intervals e.g., [ti1 ,ti ] is split into [ti1 ,t(i1),1 ], [t(i1),1 ,t(i1),2 ], . . . , [t(i1),(k1) ,ti ].
To each of this sub-intervals, again a unique trajectory is matched representing the
trajectory which would have been the actual highest-probability nearest neighbor of
Truq , if the MOD did not contain Trui1 . Towards that, a tree-structure called IPAC-
NN tree (Intervals of Possible Answers to Continuous-NN) was introduced, shown
in Figure 3.16 with the following properties:
6 Since squaring each distance function will not disturb the relative ordering, one may readily work
The root of the tree is node labelled with the description of the parameters of
interest for the specication of the query, e.g., Truq , along with [tb ,te ].
The root has one child for each sub-interval of [tb ,te ], throughout which there
is a unique uncertain trajectory Trui having the highest probability of being the
nearest neighbor to Truq . Each child of the root is labelled with the corresponding
trajectory (e.g., Trui ) and the time-interval of its validity as the highest probability
nearest neighbor (e.g., ti1 ,ti ) in Figure 3.16).
After obtaining the respective labels from the respective parent-node, each child-
node checks whether if it is removed from the MOD, there could still be some
object with nonzero probability of being the nearest neighbor of Truq in the time
sub-interval of its label.
If so, then it is an internal node, and each internal node follows the principle
of splitting its own (sub)interval like it has been done in the root, and uses the
same labelling for its children.
If not, then that node is a leaf-node.
The construction of the IPAC-NN tree is based on the algorithm for constructing
the collection of lower envelopes of the distance functions.
Recall that at the heart of the space-time prisms (beads) is the assumption that the
motion of the objects is constrained by some maximal velocity vmax , and the ob-
jects can take any speed v [vmin , vmax ] in-between two consecutive (location,time)
updates.
20W T0W 20W 2PW 20W K 20W K 20W 2PW
VXEFDVH VXEFDVH VXEFDVH VXEFDVH
TPW T0W T0W T0W
T0W TPW
TPW 2PW TPW
2PW
20W K 20W K 20W 2PW 20W TPW
&DVH
&DVH &DVH
Fig. 3.17 Different Cases of Evaluating the Distance Between Two Objects with Uncertain Veloc-
ities (cf. [67], with permission)
The assumption for uncertain speed and crisp update points clearly affects how
the minimum possible distance between two objects can vary in-between updates.
96 Goce Trajcevski
To capture the different variations, in [67] three basic cases of the minimum distance
were identied (cf. Figure 3.17):
The two objects are moving along paths that intersect.
The two objects are on the expected segments that do not intersect, and the mini-
mum distance is based on a perpendicular from a point on one segment to a point
on the other.
The two objects are on expected segments that do not intersect, however, their
minimum distance happens when each of the two objects is located in some of
the end-points of the expected segment of motion.
Based on the three cases for instantaneous distance values, when it comes to
monitoring the distance between a given object and the querying object over a time-
interval, the so called function-switching time points are determined. The key prop-
erty is that in-between two consecutive function-switching time points the function
describing the variation of the minimum-distance between the querying object q and
a moving object o (denoted do,q (t) in [67]) is one and the same function of time.
In addition to do,q (t), a similar formalization of Do,q (t) was presented, where
Do,q (t) describes the maximum-distance function between q and o over time. In ef-
fect, these two functions determine the boundaries for the possible distance between
the two objects with uncertain speeds, q and o. An illustration of these boundaries
is presented in Figure 3.18.
Given the goal of the work to determine the probabilistic answer for the con-
tinuous K- nearest neighbors for a querying object q, the solution proceeds in three
main stages:
1. Pruning: in this stage, based on the boundaries of the possible-distance zones
i.e., Do,q (t) and do,q (t), the objects for which it is impossible to be among the K
closest ones to q during the time-interval of interest are eliminated from further
consideration.
2. Candidate-distilling: during this stage, sub-intervals are identied, during which
the set of possible K nearest neighbors consists of same objects. To determine
the time-instants during which the change occurs, one needs to determine the
3 Uncertainty in Spatial Trajectories 97
time tc when doi ,q (tc = Do j ,q (tc ) i.e., the minimum-distance of the object oi
becomes equal to the maximum-distance of the object o j with respect to the
querying object q. In this case, if o j was among the PKNN(q) (i.e., possibly a-
mong the K nearest neighbors) before tc , then it will be substituted by oi at/after
tc .
3. Ranking: in this phase, a condence value, based on a reasonable probability-
model is determined for each object among the candidates.
In [68], an indexing structure was proposed TPRe tree which can be applied
to index trajectories with uncertain velocities, thereby avoiding unnecessary I/O op-
erations from the secondary storage. Extending the paradigm from [67], scalable
efcient techniques were presented to process probabilistic variants of the K NN
query, along with a variant of the range query a moving range (i.e., within a given
distance from a moving object).
1. MaxDq,o, (t) determining how the maximum distance between o and q varies
over time.
2. MinDq,o, (t) determining how the minimum distance between o and q varies over
time.
When calculating the distance functions, given the bounds vmin and vmax , for
each of o and q at a given time-instant, the closest possible location and the furthest
possible location from a vertex (e.g., an intersection in the graph-based network
model) along the direction of movement in the current segment are obtained. The
shortest path distance between the vertices of the graph incident to the edges along
which o and q travel, together with the bounds for closest/furthest possible locations,
98 Goce Trajcevski
is used to calculate the total value of MinDq,o, (t) and MaxDq,o, (t). The crux is that
these two functions which were hyperbolae for the motion in free 2D space (or,
equivalently, parabolae) now correspond to line segments in the (distance,time)
space.
The typical CUkNN query processing proceeds with the standard three stages:
pruning eliminating the objects with zero probability of being one of the K n-
earest neighbors of q; renement where the possible candidates are ranked; and
probability evaluation the last phase where the actual probabilities for the object-
s from the renement phase are calculated. We close this part with a note that a
methodology for processing NN query in the settings in which a model based on
location-uncertainty is coupled with a network distance function based on shortest
travel-time has recently been presented in [147]
The range and nearest neighbor queries have been identied as important categories
even in traditional databases settings. However, there are certain predicates that are
topological in nature [33, 76] which have recently been considered in the context of
uncertain spatio-temporal data.
Given that the beads (or, space-time prisms) can be described by polynomial
constraints (cf. Section 3.4), various queries that are well-suited for constrained
database paradigm can be explored. For example, one can envision predicates like
inPrism(r,p,q,v) specifying that the point r is inside the space-time prism dened by
points p and q, with a maximum speed v, where p is preceding q in time.
An example query that is of interest to geographers [61] is the, so called, alibi-
query. Given two space-time prisms, representing the uncertain motions of two in-
dividuals, the alibi-query asks whether those objects had a chance to meet es-
sentially, whether their corresponding space-time prisms intersect. It was observed
that relying on the quantier-elimination approaches for rst order theories to pro-
cess the alibi-query was computationally cost-prohibitive, and an analytic solution
to this problem was presented in [82].
The inside-ness (cf. Section 3.5.1.2) can also be viewed as a topological proper-
ty describing a possible relationship between an uncertain trajectory and a spatio-
temporal range corresponding to the query-prism. This is but an example of the
perspective taken in [94], where different topological predicates for uncertain tra-
jectories under the, so called, pendant model are discussed. The pendant model is,
in some sense, equivalent to the beads for moving points, however, the formalization
in [94] addresses both uncertain moving points ( unmpoint) and uncertain moving
regions (unmregion). Extending the work in [34] presenting the STP framework for
formalizing Spatio-Temporal Predicates, a collection of Spatio-Temporal Uncertain
Predicates (SUTPs) is presented, based on the pendant model. Formally, a SUTP is
a boolean expression containing:
3 Uncertainty in Spatial Trajectories 99
3.6 Summary
7 Note that Chapter 1 and Chapter 4 address in detail the topics of trajectory data reduction and
privacy, respectively.
100 Goce Trajcevski
References
1. Abiteboul, S., Kanellakis, P.C., Grahne, G.: On the representation and querying of sets of
possible worlds. In: SIGMOD Conference, pp. 3448 (1987)
2. Aggarwal, C.C., Yu, P.S.: A survey of uncertain data algorithms and applications. IEEE
Trans. Knowl. Data Eng. 21(5), 609623 (2009)
3. Alchourron, C., Gardenfors, P., Makinson, D.: On the logic of theory change. Journal of
Symbolic Logic 50, 510530 (1985)
4. Ali, M.E., Tanin, E., Zhang, R., Kotagiri, R.: Probabilistic voronoi diagrams for process-
ing moving nearest neighbor queries (2011). (personal communication, manuscript under
revision)
5. de Almeida, V.T., Guting, R.H.: Supporting uncertainty in moving objects in network
databases. In: GIS, pp. 3140 (2005)
6
6. Antova, L., Koch, C., Olteanu, D.: 10(10 ) worlds and beyond: efcient representation and
processing of incomplete information. VLDB Journal 18(5), 10211040 (2009)
7. Apt, K., Blair, H.: Arithmetic classication of perfect models of stratied programs. In:
R. Kowalski, K. Bowen (eds.) Proc. 5th International Conference and Symposium on Logic
Programming, pp. 765779. Seattle, Washington (August 15-19, 1988)
8. Beckmann, N., Kriegel, H., Schneider, R., Seeger, B.: The r tree: An efcient and robust
access method for points and rectangles. In: ACM SIGMOD (1990)
9. Benetis, R., Jensen, C.S., Karciauskas, G., Saltenis, S.: Nearest and reverse nearest neighbor
queries for moving objects. VLDB Journal 15(3), 229249 (2006)
10. Bernecker, T., Emrich, T., Kriegel, H.P., Mamoulis, N., Renz, M., Zue, A.: A novel proba-
bilistic pruning approach to speed up similarity queries in uncertain databases. In: ICDE, pp.
339350 (2011)
11. Bernecker, T., Kriegel, H.P., Mamoulis, N., Renz, M., Zue, A.: Scalable probabilistic sim-
ilarity ranking in uncertain databases. IEEE Trans. Knowl. Data Eng. 22(9), 12341246
(2010)
12. Biazzo, V., Giugno, R., Lukasiewicz, T., Subrahmanian, V.S.: Temporal probabilistic object
bases. IEEE Trans. Knowl. Data Eng. 15(4), 921939 (2003)
13. Buh, I.: Epistemic Logic in the Middle Ages. Routledge (1993)
14. Cai, Y., Hua, K., Cao, G.: Processing range-monitoring queries on heterogeneous mobile
objects. In: International conference on Mobile Data Management (MDM) (2004)
15. Cao, H., Wolfson, O., Trajcevski, G.: Spatio-temporal data reduction with deterministic error
bounds. VLDB Journal 15(3) (2006)
16. Cavallo, R., Pittarelli, M.: The theory of probabilistic databases. In: VLDB, pp. 7181 (1987)
17. Chellas, B.: Modal Logic: An Introduction. Cambridge University Press (1980)
18. Chen, J., Cheng, R., Mokbel, M.F., Chow, C.Y.: Scalable processing of snapshot and contin-
uous nearest-neighbor queries over one-dimensional uncertain data. VLDB Journal 18(5),
12191240 (2009)
19. Chen, T., Schneider, M.: Data structures and intersection algorithms for 3d spatial data types.
In: GIS (2009)
20. Cheng, R., Chen, J., Mokbel, M.F., Chow, C.Y.: Probabilistic veriers: Evaluating con-
strained nearest-neighbor queries over uncertain data. In: ICDE (2008)
21. Cheng, R., Kalashnikov, D.V., Prabhakar, S.: Querying imprecise data in moving objects
environments. IEEE-Trans. Knowl. Data Eng. 16(9) (2004)
22. Cheng, R., Xie, X., Yiu, M.L., Chen, J., Sun, L.: Uv-diagram: A voronoi diagram for uncer-
tain data. In: ICDE, pp. 796807 (2010)
23. Chomicki, J.: Temporal query languages: A survey. In: ICTL, pp. 506534 (1994)
24. Chon, H.D., Agrawal, D., Abbadi, A.E.: Range and knn query processing for moving objects
in grid model. Mobile Networks and Applications 8 (2003)
25. Chow, C.Y., Mokbel, M.F., Liu, X.: Spatial cloaking for anonymous location-based services
in mobile peer-to-peer environments. GeoInformatica 15(2), 351380 (2011)
102 Goce Trajcevski
26. Civilis, A., Jensen, C.S., Pakalnis, S.: Techniques for efcient road-network-based tracking
of moving objects. IEEE Trans. Knowl. Data Eng. 17(5) (2005)
27. of Defense, U.S.D.: Navstar gps: Global positioning system standard (2008)
28. Demiryurek, U., Pan, B., Kashani, F.B., Shahabi, C.: Towards modeling the trafc data on
road networks. In: GIS-IWCTS (2009)
29. Detlovs, V., Podnieks, K.: Introduction to Mathematical Logic. University of Latvia (2011).
Hyper-textbook for students
30. Ding, Z.: Utr-tree: An index structure for the full uncertain trajectories of network-
constrained moving objects. In: MDM, pp. 3340 (2008)
31. Ding, Z., Guting, R.H.: Uncertainty management for network constrained moving objects.
In: DEXA, pp. 411421 (2004)
32. Egenhofer, M., Franzosa, R.: Point set topological relations. International Journal of Geo-
graphical Information Systems 5 (1991)
33. Egenhofer, M.J., Dube, M.P.: Topological relations from metric renements. In: GIS (2009)
34. Erwig, M., Schneider, M.: Spatio-temporal predicates. IEEE Trans. Knowl. Data Eng. 14(4),
881901 (2002)
35. Etzion, O., Jajodia, S., (eds.), S.S.: Temporal Databases: Research and Practice. Springer,
LNCS (1998)
36. Fagin, R., Ullman, J., Vardi, M.: On the semantics of updates in databases. In: Proc. ACM
PODS, pp. 352365 (1983)
37. Gedik, B., Liu, L.: Mobieyes: A distributed location monitoring service using moving loca-
tion queries. IEEE Transactions on Mobile Computing 5(10) (2006)
38. George, B., Kim, S., Shekhar, S.: Spatio-temporal network databases and routing algorithms:
A summary of results. In: SSTD (2007)
39. Ghica, O., Trajcevski, G., Zhou, F., Tamassia, R., Scheuermann, P.: Selecting tracking princi-
pals with epoch-awareness. In: Proceedings of the 18th ACM SIGSPATIAL GIS Conference,
pp. 222231 (2010)
40. Ginsberg, M.L., Smith, D.E.: Reasoning about action i: A possible worlds approach. Artif.
Intell. 35(2), 165195 (1988)
41. Goguen, J.: The logic of inexact concepts. Synthese 19, 325373 (1969)
42. Goldblatt, R.: Mathematical modal logic: A history of its evolution (2006).
Http://homepages.mcs.vuw.ac.nz/ rob/papers/modalhist.pdf
43. Goodchild, M.F., Zhang, J., Kyriakidis, P.C.: Discriminant models of uncertainty in nominal
elds. T. GIS 13(1), 723 (2009)
44. von Gottfried Wilhelm Leibniz, F.: Theodicy: Essays on the Goodness of God, the Freedom
of Man, and the Origin of Evil. Open Court (1998)
45. Gowrisankar, N., Nittel, S.: Reducing uncertainty in location prediction of moving objects in
road networks. In: GIScience (2002)
46. Grant, J., Horty, J., Lobo, J., Minker, J.: View updates in stratied disjunctive deductive
databases. Journal of Automated Reasoning 11, 249267 (1993)
47. Gudmundsson, J., van Kreveld, M.J.: Computing longest duration ocks in trajectory data.
In: GIS (2006)
48. Guting, R.H.: Gral: An extensible relational database system for geometric applications. In:
VLDB (1989)
49. Guting, R.H.: An introduction to spatial database systems. VLDB J. 3(4), 357399 (1994)
50. Guting, R.H., de Almeida, V.T., Ding, Z.: Modeling and querying moving objects in net-
works. VLDB Journal 15(2) (2006)
51. Guting, R.H., Behr, T., Duntgen, C.: Secondo: A platform for moving objects database re-
search and for publishing and integrating research implementations. IEEE Data Eng. Bull.
33(2), 5663 (2010)
52. Guting, R.H., Bohlen, M.H., Erwig, M., Jensen, C.S., Lorentzos, N., Nardeli, E., Schneider,
M., Viqueira, J.R.R.: Spatio-temporal models and languages: An approach based on data
types. In: Spatio-Temporal Databases the Chorochronos Approach (2003)
3 Uncertainty in Spatial Trajectories 103
53. Guting, R.H., Bohlen, M.H., Erwig, M., Jensen, C.S., Lorentzos, N., Schneider, M., Vazir-
giannis, M.: A foundation for representing and queirying moving objects. ACM TODS
(2000)
54. Guting, R.H., Bohlen, M.H., Erwig, M., Jensen, C.S., Lorentzos, N.A., Schneider, M., Vazir-
giannis, M.: A foundation for representing and querying moving objects. ACM Trans.
Database Syst. 25(1) (2000)
55. Guting, R.H., Schneider, M.: Realm-based spatial data types: The rose algebra. VLDB J.
4(2), 243286 (1995)
56. Guting, R.H., Schneider, M.: Moving Objects Databases. Morgan Kaufmann (2005)
57. Guttman, A.: R-trees: A dynamic index structure for spatial searching. In: SIGMOD Con-
ference, pp. 4757 (1984)
58. Haas, P.J., Suciu, D.: Special issue on uncertain and probabilistic databases. VLDB Journal
18(5), 987988 (2009)
59. Hadjielefteriou, M., Kollios, G., Bakalov, P., Tsotras, V.: Complex spatio-temporal pattern
queries. In: VLDB (2005)
60. Hadjieleftheriou, M., Kollios, G., Tsotras, V.J., Gunopulos, D.: Efcient indexing of spa-
tiotemporal objects. In: EDBT (2002)
61. Hagerstrand, T.: What about people in regional science? Papers of the Regional Science
Association 24, 721 (1970)
62. He, G., Hou, J.C.: Tracking targets with quality in wireless sensor networks. In: 13th IEEE
International Conference on Network Protocols (ICNP) (2005)
63. Herrick, P.: The Many Worlds of Logic. Oxford University Press (1999)
64. Hintikka, J.: Knowledge and Belief: An Introduction to the Logic of the Two Notions. Cor-
nell University Press (1962)
65. Hjaltason, G.R., Samet, H.: Distance browsing in spatial databases. ACM Trans. Database
Syst. 24(2), 265318 (1999)
66. Hornsby, K., Egenhofer, M.J.: Modeling moving objects over multiple granularities. Ann.
Math. Artif. Intell. 36(1-2), 177194 (2002)
67. Huang, Y.K., Chen, C.C., Lee, C.: Continuous k -nearest neighbor query for moving objects
with uncertain velocity. GeoInformatica 13(1) (2009)
68. Huang, Y.K., Lee, C.: Efcient evaluation of continuous spatio-temporal queries on moving
objects with uncertain velocity. GeoInformatica 14(2), 163200 (2010)
69. Ilarri, S., Mena, E., Illarramendi, A.: Location-dependent query processing: Where we are
and where we are heading. ACM Comput. Surv. 42(3) (2010)
70. online issue, F.: (2006). Http://www.forbes.com/home/digitalentertainment/2006/
04/13/google-aol-yahoo-cx rr 0417maps.html
71. Iwerks, G.S., Samet, H., Smith, K.P.: Maintenance of k-nn and spatial join queries on con-
tinuously moving points. ACM Trans. Database Syst. 31(2) (2006)
72. Jensen, C.S., Snodgrass, R.T.: Temporal data management. IEEE Trans. Knowl. Data Eng.
11(1), 3644 (1999)
73. Jeong, J., Guo, S., He, T., Du, D.: Apl: Autonomous passive localization for wireless sensors
deployed in road networks. In: INFOCOM (2008)
74. Jeung, H., Liu, Q., Shen, H.T., Zhou, X.: A hybrid prediction model for moving objects. In:
ICDE, pp. 7079 (2008)
75. Jeung, H., Yiu, M.L., Zhou, X., Jensen, C.S., Shen, H.T.: Discovery of convoys in trajectory
databases. PVLDB 1(1) (2008)
76. Kainz, W., Egenhofer, M., Greasley, I.: Modeling spatial relations and operations with par-
tially ordered sets. International Journal of Geographical Information Systems 7(3) (1993)
77. Kanjilal, V., Liu, H., Schneider, M.: Plateau regions: An implementation concept for fuzzy
regions in spatial databases and gis. In: IPMU, pp. 624633 (2010)
78. Keogh, E.J.: A decade of progress in indexing and mining large time series databases. In:
VLDB (2006)
79. Keogh, E.J., Chakrabarti, K., Mehrotra, S., Pazzani, M.J.: Locally adaptive dimensionality
reduction for indexing large time series databases. In: SIGMOD Conference (2001)
104 Goce Trajcevski
80. Koubarakis, M., Sellis, T., Frank, A., Grumbach, S., Guting, R., Jensen, C., Lorentzos, N.,
Manolopoulos, Y., Nardelli, E., Pernici, B., Scheck, H.J., Scholl, M., Theodoulidis, B., Try-
fona, N. (eds.): Spatio-Temporal Databases the CHOROCHRONOS Approach. Springer-
Verlag (2003)
81. Kripke, S.: Semantical considerations on modal logic. Acta Philosophica Fennica 16 (1963)
82. Kuijpers, B., Grimson, R., Othman, W.: An analytic solution to the alibi query in the space-
time prisms model for moving object data. International Journal of Geographical Information
Science 25(2), 293322 (2011)
83. Kuijpers, B., Miller, H.J., Neutens, T., Othman, W.: Anchor uncertainty and space-time
prisms on road networks. International Journal of Geographical Information Science 24(8),
12231248 (2010)
84. Kuijpers, B., Moelans, B., Othman, W., Vaisman, A.A.: Analyzing trajectories using uncer-
tainty and background information. In: SSTD, pp. 135152 (2009)
85. Kuijpers, B., Othman, W.: Modelling uncertainty on road networks via space-time prisms.
Int.l Journal on GIS 23(9) (2009)
86. Kuijpers, B., Othman, W.: Trajectory databases: data models, uncertainty and
complete query languages. Journal of Computer and System Sciences (2009).
Doi:10.1016/j.jcss.2009.10.002
87. Lange, R., Farrell, T., Durr, F., Rothermel, K.: Remote real-time trajectory simplication. In:
PerCom (2009)
88. Lange, R., Weinschrott, H., Geiger, L., Blessing, A., Durr, F., Rothermel, K., Schutze, H.:
On a generic uncertainty model for position information. In: QuaCon, pp. 7687 (2009)
89. Lee, D.L., Zhu, M., Hu, H.: When location-based services meet databases. Mobile Informa-
tion Systems 1(2), 8190 (2005)
90. Lema, J.A., Forlizzi, L., Guting, R.H., Nardelli, E., Schneider, M.: Algorithms for moving
objects databases. Computing Journal 46(6) (2003)
91. Li, G., Li, Y., Shu, L., Fan, P.: Cknn query processing over moving objects with uncertain
speeds in road networks. In: APWeb, pp. 6576 (2011)
92. Lian, X., 0002, L.C.: Probabilistic ranked queries in uncertain databases. In: EDBT, pp.
511522 (2008)
93. Lin, D., Cui, B., Yang, D.: Optimizing moving queries over moving object data streams. In:
DASFAA, pp. 563575 (2007)
94. Liu, H., Schneider, M.: Querying moving objects with uncertainty in spatio-temporal
databases. In: DASFAA (1), pp. 357371 (2011)
95. Lynch, J.D., Chen, X., Hui, R.B.: A multimedia approach to visualize and interact with large
scale mobile lidar data. In: ACM Multimedia, pp. 16891692 (2010)
96. Ma, C.: Spatio-temporal variograms and covariance models. Advances in Applied Probabil-
ity 37(3), 706725 (2005)
97. Mamoulis, N., Cao, H., Kollios, G., Hadjieleftheriou, M., Tao, Y., Cheung, D.W.: Mining, in-
dexing, and querying historical spatiotemporal data. In: International Conference on Knowl-
edge Discovery and Data Mining, pp. 236245 (2004)
98. Minker, J., Lobo, J., Rajasekar, A.: Circumscription and disjunctive logic programming. In:
V. Lifschitz (ed.) Articial Intelligence and Mathematical Theory of Computation, pp. 281
304. Academic Press (1991)
99. Mokbel, M.F., Aref, W.G.: SOLE: Scalable on-line execution of continuous queries on
spatio-temporal data streams. VLDB Journal 17(5), 971985 (2008)
100. Mokbel, M.F., Aref, W.G.: SOLE: scalable on-line execution of continuous queries on spatio-
temporal data streams. VLDB Journal 17(5), 971995 (2008)
101. Mokbel, M.F., Chow, C.Y., Aref, W.G.: The new casper: Query processing for location ser-
vices without compromising privacy. In: VLDB (2006)
102. Mokbel, M.F., Xing, X., Hammad, M., Aref, W.G.: Continuous query processing of spatio-
temoral data streams in place. The GeoInformatica Journal 9(4) (2005)
103. Mokhtar, H., Su, J.: Questo: A query language for uncertain and exact spatio-temporal ob-
jects. In: ADBIS, pp. 184198 (2008)
3 Uncertainty in Spatial Trajectories 105
104. Mokhtar, H., Su, J., Ibarra, O.: On moving objects queries. In: PODS (2002)
105. Mouratidis, K., Yiu, M.L., Papadias, D., Mamoulis, N.: Continuous nearest neighbor moni-
toring in road networks. In: VLDB, pp. 4354 (2006)
106. du Mouza, C., Rigaux, R.: Multi-scale classication of moving objects trajectories. In: SS-
DBM (2004)
107. ORourke, J.: Computational Geometry in C. Cambridge University Press (2000)
108. Othman, W.: Uncertainty management in trajectory databases. Phd thesis, Hasselt University
(Belgium) (2009)
109. Pasquale, A.D., Forlizzi, L., Jensen, C.S., Manolopoulos, Y., Nardelli, E., Pfoser, D., Proietti,
G., Saltenis, S., Theodoridis, Y., Tzouramanis, T.: Access methods and query processing
techniques. In: Spatio-Temporal Databases: the Chorochronos Approach (2003)
110. Pattem, S., Poduri, S., Krishnamachari, B.: Energy-quality tradeoffs for target tracking in
wireless sensor networks. In: IPSN (2003)
111. Pei, J., Hua, M., Tao, Y., Lin, X.: Query answering techniques on uncertain and probabilistic
data: tutorial summary. In: ACM SIGMOD (2008)
112. Pelanis, M., Saltenis, S., Jensen, C.S.: Indexing the past, present, and anticipated future po-
sitions of moving objects. ACM Trans. Database Syst. 31(1) (2006)
113. Pfoser, D., Jensen, C.S.: Capturing the uncertainty of moving objects representation. In: SSD
(1999)
114. Pfoser, D., Tryfona, N.: Capturing fuzziness and uncertainty of spatiotemporal objects. In:
ADBIS, pp. 112126 (2001)
115. Pfoser, D., Tryfona, N., Jensen, C.S.: Indeterminacy and spatiotemporal data: Basic deni-
tions and case study. GeoInformatica 9(3) (2005)
116. Popivanov, I., Miller, R.J.: Similarity search over time-series data using wavelets. In: ICDE
(2002)
117. Prabhakar, S., Xia, Y., Khalashnikov, D., Aref, W., Hambrusch, S.: Query indexing and ve-
locity constrained indexing: Scalable techniques for continuous queries on moving objects.
IEEE - TRANS. KNOWL. DATA ENG. 51(10) (2002)
118. Qi, Y., Jain, R., Singh, S., Prabhakar, S.: Threshold query optimization for uncertain data. In:
SIGMOD Conference, pp. 315326 (2010)
119. Raptopoulou, K., Papadopoulos, A., Manolopoulos, Y.: Fast nearest-neighbor query process-
ing in moving-object databases. GeoInformatica 7(2), 113137 (2003)
120. Renz, M., Cheng, R., Kriegel, H.P., Zue, A., Bernecker, T.: Similarity search and mining in
uncertain databases (tutorial). PVLDB 3(2), 16531654 (2010)
121. Reynolds, A., Ioacono, G.L.: On the simulation of particle trajectories in turbulent ows.
Physics of Fluids 16(12) (2004)
122. Rigaux, P., Scholl, M., Voisard, A.: Introduction to Spatial Databases: Applications to GIS.
Morgan Kauffmann (2000)
123. Roberts, F.: Tolerance geometry. Notre Dame Journal of Formal Logic 14(1), 6876 (1973)
124. Roussopoulos, N., Kelley, S., Vincent, F.: Nearest neighbor queries. In: SIGMOD Confer-
ence, pp. 7179 (1995)
125. Sarma, A.D., Benjelloun, O., Halevy, A.Y., Nabar, S.U., Widom, J.: Representing uncertain
data: models, properties, and algorithms. VLDB Journal 18(5), 9891019 (2009)
126. Schiller, J., (editors), A.V.: Location-Based Services. Morgan Kaufmann (2004)
127. Schneider, M.: Uncertainty management for spatial data in databases: Fuzzy spatial data
types. In: SSD, pp. 330351 (1999)
128. Schneider, M.: Fuzzy spatial data types for spatial uncertainty management in databases. In:
Handbook of Research on Fuzzy Information Processing in Databases, pp. 490515 (2008)
129. Shahabi, C., Kolahdouzan, M.R., Sharifzadeh, M.: A road network embedding technique for
k-nearest neighbor search in moving object databases. GeoInformatica 7(3), 255273 (2003)
130. Shekhar, S., Chawla, S.: Spatial Databases: A Tour. Prentice Hall (2003)
131. Sistla, A.P., Wolfson, O., Chamberlain, S., Dao, S.: Modeling and querying moving objects.
In: 13th Intl Conf. on Data Engineering (ICDE) (1997)
132. Snodgrass, R.T., Bohlen, M.H., Jensen, C.S., Steiner, A.: Transitioning temporal support in
tsql2 to sql3. In: Temporal Databases, Dagstuhl, pp. 150194 (1997)
106 Goce Trajcevski
133. Soliman, M.A., Ilyas, I.F., Chang, K.C.C.: Top-k query processing in uncertain databases.
In: ICDE (2007)
134. Suciu, D., Dalvi, N.N.: Foundations of probabilistic answers to queries. In: ACM SIGMOD
(2005). Tutorial
135. Sundararaman, B., Buy, U., Kshemkalyani, A.D.: Clock synchronization for wireless sensor
networks: a survey. Ad Hoc Networks 3(3), 281323 (2005)
136. Szewczyk, R., Mainwaring, A.M., Polastre, J., Anderson, J., Culler, D.E.: An analysis of a
large scale habitat monitoring application. In: SenSys, pp. 214226 (2004)
137. Tanin, E., Chen, S., Tatemura, J., Hsiung, W.P.: Monitoring moving objects using low fre-
quency snapshots in sensor networks. In: MDM (2008)
138. Tao, Y., Faloutsos, C., Papadias, D., 0002, B.L.: Prediction and indexing of moving objects
with unknown motion patterns. In: SIGMOD Conference, pp. 611622 (2004)
139. Tao, Y., Papadias, D.: Spatial queries in dynamic environments. ACM Trans. Database Syst.
28(2) (2003)
140. Tao, Y., Papadias, D., Shen, Q.: Continuous nearest neighbor search. In: VLDB (2002)
141. Tao, Y., Papadias, D., Sun, J.: The tpr-tree: An optimized spatio-temporal access method
for predictive queries. In: VLDB (2003)
142. Tao, Y., Xiao, X., Cheng, R.: Range search on multidimensional uncertain data. ACM Trans.
Database Syst. 32(3), 15 (2007)
143. Tssebro, E., Nygard, M.: Uncertainty in spatiotemporal databases. In: ADVIS, pp. 4353
(2002)
144. Trajcevski, G., Cao, H., Scheuermann, P., Wolfson, O., Vaccaro, D.: On-line data reduction
and the quality of history in moving objects databases. In: MobiDE, pp. 1926 (2006)
145. Trajcevski, G., Choudhary, A., Wolfson, O., Li, Y., Li, G.: Uncertain range queries for neck-
laces. In: MDM (2010)
146. Trajcevski, G., Ghica, O.C., Scheuermann, P.: Tracking-based trajectory data reduction in
wireless sensor networks. In: SUTC/UMC, pp. 99106 (2010)
147. Trajcevski, G., Tamassia, R., Cruz, I., Scheuermann, P., Hartglass, D., Zamierowski, C.:
Ranking continuous nearest neighbors for uncertain trajectories. VLDB Journal (2011). (ac-
cepted, to appear)
148. Trajcevski, G., Tamassia, R., Ding, H., Scheuermann, P., Cruz, I.F.: Continuous probabilistic
nearest-neighbor queries for uncertain trajectories. In: EDBT (2009)
149. Trajcevski, G., Wolfson, O., Hinrichs, K., Chamberlain, S.: Managing uncertainty in moving
objects databases. ACM Trans. Database Syst. 29(3) (2004)
150. Trajcevski, G., Wolfson, O., Zhang, F., Chamberlain, S.: The geometry of uncertainty in
moving objects databases. In: International Conference on Extending Database Technology
(EDBT) (2002)
151. Umer, M., Kulik, L., Tanin, E.: Spatial interpolation in wireless sensor networks: localized
algorithms for variogram modeling and kriging. GeoInformatica 14(1), 101134 (2010)
152. UNISYS: 2009 hurrican/tropical data for atlantic.
http://weather.unisys.com/hurricane/atlantic/2009/index.htm (2009)
153. Vaisman, A.A., Zimanyi, E.: What is spatio-temporal data warehousing? In: DaWaK, pp.
923 (2009)
154. Vazirgiannis, M., Wolfson, O.: A spatiotemporal model and language for moving objects on
road networks. In: SSTD (2001)
155. Vlachos, M., Hadjielefteriou, M., Gunopulos, D., Keogh, E.: Indexing multidimensional
time-series. VLDB Journal 15(1) (2006)
156. Weibel, R.: Generalization of spatial data: Principles and selected algorithms. In: Algorith-
mic Foundations of Geographic Information Systems. LNCS Springer Verlag (1996)
157. Wilke, G., Frank, A.F.: Tolerance geometry euclids rst postulate for points and lines with
extension. In: Proceedings of the 18th ACM SIGSPATIAL GIS Conference, pp. 162171
(2010)
158. Winslett, M.: Reasoning about action using a possible model approach. In: Proc. of the
Seventh National Conference on Articial Intelligence, pp. 8993 (1988)
3 Uncertainty in Spatial Trajectories 107
159. Winter, S., Yin, Z.C.: Directed movements in probabilistic time geography. International
Journal of Geographical Information Science 24(9) (2010)
160. Winter, S., Yin, Z.C.: The elements of probabilistic time geography. GeoInformatica 15(3),
417434 (2011)
161. Wolfson, O., Chamberlain, S., Dao, S., Jiang, L., Mendez, G.: Cost and imprecision in mod-
eling the position of moving objects. In: 14 Intl Conf. on Data Engineering (ICDE) (1998)
162. Wolfson, O., Sistla, A.P., Chamberlain, S., Yesha, Y.: Updating and querying databases that
track mobile units. Distributed and Parallel Databases 7 (1999)
163. Wolfson, O., Xu, B., Chamberlain, S., Jiang, L.: Moving objects databases: Issues and solu-
tions. In: SSDB (1999)
164. Xing, X., Mokbel, M.F., Aref, W.G., Hambrusch, S.E., Prabhakar, S.: Scalable spatio-
temporal continuous query processing for location-aware services. In: International Con-
ference on Scientic and Statistical Database Management (SSDBM) (2004)
165. Xu, Y., Lee, W.C.: Compressing moving object trajectory in wireless sensor networks. IJDSN
3(2) (2007)
166. Yang, J., Hu, M.: Trajpattern: Mining sequential patterns from imprecise trajectories of mo-
bile objects. In: International Conference on Extending Database Technology, pp. 664681
(2006)
167. Yi, K., Li, F., Kollios, G., Srivastava, D.: Efcient processing of top-k queries in uncertain
databases. In: ICDE, pp. 14061408 (2008)
168. Yiu, M.L., Mamoulis, N., Papadias, D.: Aggregate nearest neighbor queries in road networks.
IEEE Trans. Knowl. Data Eng. 17(6) (2005)
169. Yoon, H., Shahabi, C.: Robust time-referenced segmentation of moving object trajectories.
In: ICDM (2008)
170. Yu, B., Kim, S.H., Alkobaisi, S., Bae, W.D., Bailey, T.: The tornado model: Uncertainty
model for continuously changing data. In: DASFAA, pp. 624636 (2007)
171. Yu, X., Mehrotra, S.: Capturing uncertainty in spatial queries over imprecise data. In: DEXA,
pp. 192201 (2003)
172. Yu, X., Pu, K.Q., Koudas, N.: Monitoring k-nearest neighbor queries over moving objects.
In: ICDE, pp. 631642 (2005)
173. Zadeh, L.A.: Commonsense knowledge representation based on fuzzy logic. IEEE Computer
16(10), 6165 (1983)
174. Zadeh, L.A.: Granular computing - computing with uncertain, imprecise and partially true
data. In: Int.l Symp. on Spatial Data Quality (2007)
175. Zhang, Q., Sobelman, G.E., He, T.: Gradient-based target localization in robotic sensor net-
works. Pervasive and Mobile Computing 5(1) (2009)
176. Zhang, Y., Cheng, R., Chen, J.: Evaluating continuous probabilistic queries over imprecise
sensor data. In: DASFAA (1), pp. 535549 (2010)
177. Zhao, Y., Aggarwal, C.C., Yu, P.S.: On wavelet decomposition of uncertain time series data
sets. In: CIKM, pp. 129138 (2010)
178. Zheng, K., Trajcevski, G., Zhou, X., Scheuermann, P.: Probabilistic range queries for uncer-
tain trajectories on road networks. In: EDBT, pp. 283294 (2011)
179. Zhong, Z., Zhu, T., Wang, D., He, T.: Tracking with unreliable node sequences. In: INFO-
COM, pp. 12151223 (2009)
180. Zhu, X., Sarkar, R., Gao, J., Mitchell, J.S.B.: Light-weight contour tracking in wireless sensor
networks. In: INFOCOM, pp. 11751183 (2008)
Chapter 4
Privacy of Spatial Trajectories
Abstract The ubiquity of mobile devices with global positioning functionality (e.g.,
GPS and Assisted GPS) and Internet connectivity (e.g., 3G and Wi-Fi) has resulted
in widespread development of location-based services (LBS). Typical examples of
LBS include local business search, e-marketing, social networking, and automotive
trafc monitoring. Although LBS provide valuable services for mobile users, reveal-
ing their private locations to potentially untrusted LBS service providers pose priva-
cy concerns. In general, there are two types of LBS, namely, snapshot and continu-
ous LBS. For snapshot LBS, a mobile user only needs to report its current location
to a service provider once to get its desired information. On the other hand, a mo-
bile user has to report its location to a service provider in a periodic or on-demand
manner to obtain its desired continuous LBS. Protecting user location privacy for
continuous LBS is more challenging than snapshot LBS because adversaries may
use the spatial and temporal correlations in the users a sequence of location sam-
ples to infer the users location information with a higher degree of certainty. Such
user spatial trajectories are also very important for many applications, e.g., business
analysis, city planning, and intelligent transportation. However, publishing original
spatial trajectories to the public or a third party for data analysis could pose serious
privacy concerns. Privacy protection in continuous LBS and trajectory data publi-
cation has increasingly drawn attention from the research community and industry.
In this chapter, we describe the state-of-the-art privacy-preserving techniques for
continuous LBS and trajectory publication.
Chi-Yin Chow
City University of Hong Kong, China
Mohemad F. Mokbel
University of Minnesota - Twin Cities, USA
109
110 Chi-Yin Chow and Mohemad F. Mokbel
4.1 Introduction
9RWHU5HJLVWUDWLRQ5HFRUGV 0HGLFDO5HFRUGV
*HQGHU
1DPH 'LDJQRVLV
=LS&RGH
'DWHRI%LUWK
4XDVLLGHQWLILHUV
This section gives the derivation of spatial trajectory privacy from data privacy and
location privacy.
Many agencies and other organizations often need to publish microdata, i.e., ta-
bles that contain unaggregated information about individuals, (e.g., medical, voter
registration, census, and customer data) for many practical purposes such as de-
mographic and public health research. In general, microdata are stored in a table
where each row corresponds to one individual. In order to avoid the identication
of records in microdata, known identiers (e.g., name and social security number)
must be removed. However, joining such de-identied microdata with other released
microdata may still pose data privacy issues for individuals [49]. A study estimated
that 87% of the population of the United States can be uniquely identied by us-
ing the collection of non-identity attributes, i.e., gender, date of birth, and 5-digit
zip code [52]. In fact, those three attributes were used to link Massachusetts, USA
voter registration records including name, gender, zip code and date of birth to de-
identied medical data from Group Insurance Company including gender, zip code,
date of birth and diagnosis to identify the medical records of the governor of Mas-
sachusetts in the medical data [52], as illustrated in Figure 4.1. Terminologically,
attributes whose values taken together can potentially identify an individual record
are referred to as quasi-identiers and a set of records that have the same values for
the quasi-identiers in a released microdata is dened as an equivalence class.
Data privacy-preserving techniques are developed to anonymize microdata. Sev-
eral data privacy principles are proposed to limit disclosure of anonymized micro-
data. For example, k-anonymity requires each record to be indistinguishable with
other at least k 1 records with respect to the quasi-identier, i.e., each equiva-
lence class contains at least k records [35, 49, 51, 52]. However, a k-anonymized
112 Chi-Yin Chow and Mohemad F. Mokbel
equivalence class suffers from a homogeneity attack if all records in the class have
less than k values for the sensitive attribute (e.g., disease and salary). To this end,
l-diversity principle is proposed to ensure that an equivalence class must have at
least l values for the sensitive attribute [38, 58]. To further strengthen data privacy
protection, t-closeness principle is dened that an equivalence class is said to have
t-closeness if the difference between the distribution of a sensitive attribute in this
class and the distribution of the attribute in the entire data set is no more than a
threshold parameter t [36]. For the details of these and other data privacy principles
for data publishing, we refer the reader to the recent survey paper [18].
In LBS, mobile users issue location-based queries to LBS service providers to ob-
tain information based on their physical locations. LBS pose new challenges to tra-
ditional data privacy-preserving techniques due to two main reasons [41]. (1) These
techniques preserve data privacy, but not the location-based queries issued by mobile
users. (2) They ensure desired privacy guarantees for a snapshot of the database. In
LBS, queries and data are continuously updated at high rates. Such highly dynamic
behaviors need continuous maintenance of anonymized user and object sets.
Privacy-preserving techniques for LBS can be classied into three categories:
1. False locations. The basic idea of the techniques in this category is that the user
sends either a fake location which is related to its actual location or its actual
location with several fake locations to the LBS service provider in order to hide
its location [28, 33, 62].
2. Space transformation. The techniques in this category transform the location
information into another space where the spatial relationships among queries
and data are encoded [20, 32].
3. Spatial cloaking. The main idea of spatial cloaking is to blur users locations
into cloaked spatial regions that are guaranteed to satisfy the k-anonymity [52]
(i.e., the cloaked spatial region contains at least k users) and/or minimum re-
gion area privacy requirements [5, 14, 41] (i.e., the cloaked spatial region size
is larger than a threshold) [2, 5, 7, 11, 12, 14, 19, 21, 22, 25, 31, 41, 64]. Spatial
cloaking techniques have been extended to support road networks where a us-
ers location is cloaked into a set of connected road segments so that the cloaked
road segment set satises the privacy requirements of k-anonymity and/or min-
imum total road segment length [10, 34, 43, 56].
Anonymizing user locations is not the end of the story because database servers
have to provide LBS based on anonymized user and/or object location information.
Research efforts have also dedicated to dealing with privacy-preserving location-
based queries, i.e., getting anonymous services from LBS service providers (e.g., [5,
20, 29, 31, 32, 41, 62]). These query processing frameworks can be divided into
three main categories:
4 Privacy of Spatial Trajectories 113
example shows that publishing de-identied user trajectory data can still cause seri-
ous privacy threats if the adversary has certain background knowledge.
In LBS, when a mobile user issues a continuous location-based query to a
database server (e.g., continuously inform me the trafc condition within 1 mile
from my vehicle), the user has to report its new location to the database server in
a periodic or on-demand manner. Similarly, intelligent transportation systems re-
quire their users (e.g., probe vehicles) to periodically report their location and speed
information to the system for analysis. Although such location-based queries and
reports can be anonymized by replacing the identiers of users with random identi-
ers, in order to achieve pseudonymity [47], the users may still suffer from privacy
threats. This is because movements of whereabouts of users in public spaces can be
openly observed by others through chance or engineered meetings [37]. In the worst
case, if the starting location point of a trajectory is a home, an adversary uses re-
verse geocoding1 [24] to translate a location point into a home address, and then us-
es a people-search-by-address engine (e.g., http://www.intelius.com and
http://www.peoplefinders.com) to nd the residents of the home ad-
dress. Even though users generate a random identity for each of their location
samples, multi-target tracking techniques (e.g., the multiple hypothesis tracking al-
gorithm [48]) can be used to link anonymous location samples to construct target
trajectories [26]. To this end, new techniques are developed to protect user spatial
trajectory.
The key difference between continuous LBS and trajectory data publication with
respect to challenges in privacy protection is twofold: (1) The scalability require-
ment of the privacy-preserving techniques for continuous LBS is much more im-
portant than that for trajectory data publication. This is because continuous LBS
require the anonymization module to deal with a large number of real-time location
updates at high rates while the anonymization process for trajectory data publication
can be performed ofine. (2) Global optimization can be applied to trajectory data
publication because the anonymization process is able to analyze the entire (stat-
ic) trajectory data to optimize its privacy protection or usability. However, global
optimization is very difcult for continuous LBS, due to highly dynamic, uncertain
user movements. Sections 4.3 and 4.4 present the state-of-the-art privacy-preserving
techniques for continuous LBS and trajectory publication, respectively.
In general, there are two categories of LBS based on whether they need a consistent
user identity. A consistent user identity is not necessarily a users actual identity or
name because it can be an internal pseudonym.
1 Reverse geocoding is the process of translating a human-readable address, such as a street ad-
Category-I LBS. Some LBS require consistent user identities. For example,
Q1: let me know my friends locations if they are within 2km from my loca-
tion, Q2: recommend 10 nearby restaurants to me based on my prole, and
Q3: continuously tell me the nearest shopping mall to my location. Q1 and Q2
require consistent user identities to let applications to nd out their friends and
proles. Although Q3 does not need any consistent user identity, the query pa-
rameters (e.g., a particular shop name) can be considered as a virtual user identity
that remains the same until the query expires.
Category-II LBS. Other LBS do not require any consistent user identity, or even
any user identity, such as Q4: send e-coupons to users within 1km from my
coffee shop.
In this section, we discuss seven privacy-preserving techniques for continuous LBS,
including spatial cloaking, mix-zones, vehicular mix-zones, path confusion, path
confusion with mobility prediction and data caching, Euler histogram-based on
short IDs, and dummy trajectories, and indicate whether they support Category-I
and/or II LBS from Sections 4.3.1 to 4.3.7, as summarized in Table 4.2.
WLPH WLPH %
0D[LPXP 0D[LPXP &
ERXQG ERXQG 5
$
W W
\ \
& $ & $
W % 5 % 5
[ W [
(a) At time t1 (b) At time t2
Patching and delaying techniques are proposed to prevent the trajectory tracing
attack [5]. We describe these two techniques below.
\ \
$QRQ\PRXV&ORDNHG
6SDWLDO5HJLRQ )
) +
( + $
*
(
* $
&
& ' '
%
%
[ [
(a) At time t1 (b) At time t2
Fig. 4.4 Two techniques for preventing the trajectory tracing attack.
depicts an example for the patching technique in the running example, where
the combination of the current cloaked spatial region at time t2 (which is rep-
resented by a dotted rectangle) and the maximum bound of the cloaked spatial
region released at time t1 constitutes the users cloaked spatial region R2 (which
is represented by a solid rectangle at time t2 ).
Delaying technique. The delaying technique is to suspend a location update until
its cloaked spatial region is completely included in the maximum bound of the
previous cloaked spatial region. As depicted in Figure 4.4b, the cloaked spatial
region R2 generated at time t2 is suspended until R2 ts into the maximum bound
of the previous cloaked spatial region R1 at time t1 . At time tn , R2 is reported to
the database server.
In general, the patching technique generates larger cloaked spatial regions than
the original ones, so it reduces the spatial accuracy of location updates that could
118 Chi-Yin Chow and Mohemad F. Mokbel
\ \ \
$QRQ\PRXV&ORDNHG )
6SDWLDO5HJLRQ )
) +
$ $ +
( + *
* (
( &
* $
& '
& ' '
%
% %
[ [ [
(a) At time t1 (b) At time t2 (c) At time t3
Fig. 4.5 Group-based spatial cloaking over real-time spatial trajectory data.
degrade the quality of services, in terms of the number of candidate answers returned
to the user. On the other hand, the delaying technique does not reduce the spatial
accuracy of location updates, but it degrades the quality of services in terms of the
query response time.
To prevent the anonymity-set tracing attack, new spatial cloaking techniques
based on either real-time or historical user trajectories are designed to protect user
spatial trajectories. Similar to snapshot spatial cloaking techniques, a fully-trusted
third party, usually termed location anonymizer, is placed between mobile users
and database servers. The location anonymizer is responsible for collecting users
locations and blurring their locations into cloaked spatial regions that satisfy the
user-specied k-anonymity level and/or minimum spatial region area. Since spatial
cloaking techniques do not change user identities, they can support both Category I
and II LBS.
In the following sections, we will discuss three main kinds of spatial cloak-
ing techniques over user trajectories, namely, group-based, distortion-based, and
prediction-based approaches, from Sections 4.3.1.1 to 4.3.1.3, respectively. All
these techniques can prevent the anonymity-set tracing attack. The rst two ap-
proaches are designed for real-time user trajectories, while the last one is for histor-
ical trajectory data.
\ WLPH
5Q
$ WQ
[\
5Q
& WQ
5
% \
[\ 5
5
& $
W
%
[ W [
(a) Cloaked spatial region R1 at time t1 (b) Cloaked spatial regions R2 , . . . , Rn at times
t2 , . . . ,tn , respectively
the temporal query distortion of a cluster of continuous queries. Figure 4.6 gives
an example of how to determine query distortion. In this example, three users A,
B and C that issue their continuous location-based queries at time t1 constitute an
anonymity set and their queries expire at time tn . Their cloaked spatial region R1 at
time t1 is a minimum bounding rectangle of the anonymity set, as represented by a
rectangle (Figure 4.6a). Let (xi , y + +
i ) and (xi , yi ) be the left-bottom and right-top
vertices of a cloaked spatial region Ri at time ti , respectively. The distortion for their
queries with a cloaked spatial region Ri at time ti is dened as:
(xi+ xi ) + (y+
i yi )
(Ri ) = , (4.1)
Aheight + Awidth
where Aheight and Awidth are the height and width of the minimum bounding rect-
angle of the entire system space, respectively. Assume their movement directions
and velocities (represented by arrows in Figure 4.6b) remain the same from the
time period t1 to tn , their subsequent cloaked spatial regions R2 , R3 , . . . , Rn at times
t2 ,t3 , . . . ,tn can be predicted, respectively. The distortion for their queries with re-
spect to the time period from t1 to tn is dened as:
tn t2 t3 tn
1
(Ri ) = (R1 )dt + (R2 )dt + . . . + (Rn )dt ,
t1 Aheight + Awidth t1 t2 tn1
([SHFWHGWUDMHFWRU\ +LVWRULFDOWUDMHFWRULHV
X
S &
& & S & S
X S
S
&
X
Fig. 4.7 Continuous spatial cloaking over historical trajectories.
4 Privacy of Spatial Trajectories 121
lected at some point of time. Similar to the previous two approaches, a fully-trusted
location anonymizer is placed between users and LBS service providers to collect
users footprints. Given a users predicted trajectory (i.e., a sequence of expected
footprints), the location anonymizer cloaks it with k 1 historical trajectories col-
lected from other users. Figure 4.7 gives an example for continuous spatial cloaking
over historical trajectories, where a user u1 wants to subscribe continuous LBS from
a service provider. u1 s predicted time-ordered footprints, p1 p2 . . . p5 , are
represented by black circles. If u1 s desired anonymity level is k = 3, the location
anonymizer nds historical trajectories from other two users, u2 and u3 . Then, each
u1 s expected footprint pi (1 i 5) is cloaked with at least one unique footprint of
each of u2 s and u3 s trajectories to form a cloaked spatial region Ci . The sequence
of such cloaked spatial regions constitutes the k-anonymized trajectory for u1 .
Given a k-anonymized trajectory T = {C1 ,C2 , . . . ,Cn }, its resolution is dened
as:
ni=1 Area(Ci )
|T | = , (4.2)
n
where Area(Ci ) is the area of cloaked spatial region Ci . For quality of services, |T |
should be minimized. Since the computation of an optimal T would be expensive,
heuristic approaches are designed to nd T [61]. Although using historical trajectory
data gives better resolutions for k-anonymized trajectories, it would suffer from an
observation attack. This is because an attacker may only see the querying user or
less than k users located in a cloaked spatial region at its associated timestamp.
4.3.2 Mix-Zones
E 0L[=RQH
F ]
Table 4.3 gives an example of three-anonymity for the mix-zone depicted in Fig-
ure 4.8, where three users with real identities, , , and enter the mix-zone with
old pseudonyms a, c, and b at times (timeenter ) 2, 5, and 1, respectively. Users , ,
and exit the mix-zone with new pseudonyms y, x, and z at times (timeexit ) 9, 8, and
11, respectively. Thus, they all are in the mix-zone during the time period from 5
to 8. Since they stay inside the mix-zone with random time periods (i.e., timeinside ),
there is a strong unlinkability between their entering order ( ) and exiting
order ( ).
We can see that mix-zones require pseudonym change to protect user location
privacy, so this technique can only support Category-II LBS. Mix-zones also im-
pose limits on the services available to mobile users inside a mix-zone because they
cannot update their locations until exiting the mix-zone. To minimize disruptions
caused to users, the placement of mix-zones in the system should be optimized to
limit the total number of mix-zones required to achieve a certain degree of anonymi-
ty [17].
4 Privacy of Spatial Trajectories 123
6HJLQ 6HJRXW
F
6HJRXW 6HJLQ
G
E
D
In a road network, vehicle movements are constrained by many spatial and tempo-
ral factors, such as physical roads, directions, speed limits, trafc conditions, and
road conditions. Mix-zones designed for the Euclidean space are not secure enough
to protect trajectory privacy in road networks [16, 45]. This is because an adver-
sary can gain more background information from physical road constraints and de-
lay characteristics to link entering events and exiting events of a mix-zone with a
high degree of certainty. For example, a mix-zone (represented by a shaded area) is
placed on an intersection of three road segments Seg1, Seg2, and Seg3, as depicted
in Figure 4.9. If u-turn is not allowed in the intersection, an adversary knows that a
vehicle with pseudonym c enters the mix-zone from either Seg1in or Seg2in . Since
a vehicle turning from Seg1in to Seg3out normally takes a longer time than turning
from Seg2in to Seg3out , the adversary would use this delay characteristic to link an
exiting event at Seg3out to an entering event at Seg1in or Seg2in . In addition, every
vehicle may spend almost the same time during a short time period for a specic di-
rection, e.g., u-turn, left, straight, or right. This temporal characteristic may violate
the third necessary condition for mix-zones listed in Section 4.3.2.
An effective solution for vehicular mix-zones is to construct non-rectangular,
adaptive mix-zones that start from the center of an road segment intersection on its
outgoing road segments [45], as depicted in Figure 4.10. The length of each mix-
zone on an outgoing segment is determined based on the average speed of the road
segment, the time window, and the minimum pairwise entropy threshold. The dark
shaded area should also be included in the mix-zone to ensure that an adversary
cannot infer the vehicle movement direction (e.g., turn left or go straight in this
example). The pairwise entropy is computed for every pair of users a and b in an
anonymity set S by considering a and b to be the only members in S and determining
the linkability between their old and new pseudonyms. Similar to mix-zones, vehic-
124 Chi-Yin Chow and Mohemad F. Mokbel
6HJLQ 6HJRXW
F
6HJRXW 6HJLQ
G
D
E
6HJLQ 6HJRXW
ular mix-zones require a pseudonym change, so they can only support Category-II
LBS.
Since consecutive location samples from a vehicle are temporally and spatially cor-
related, trajectories of individual vehicles can be constructed from a set of location
samples with anonymized pseudonyms reported from several vehicles through tar-
get tracking algorithms [26]. The general idea of these algorithms is to predict the
position of a target vehicle based on the last known speed and direction information
and then decide which next location sample (or the one with the highest probability
if there are multiple candidate location samples) to link to the same vehicle through
Maximum Likelihood Detection [26].
The main goal of the path confusion technique is to avoid linking consecutive
location samples to individual vehicles through target tracking algorithms with high
condence [27]. The degree of privacy of the path confusion technique is dened as
the time-to-confusion, i.e., the tracking time between two location samples where
an adversary could not determine the next sample with sufcient tracking certainty.
Tracking uncertainty is computed by H = pi log pi , where pi is the probability
that location sample i belongs to a target vehicle. Smaller values of H means higher
certainty or lower privacy. Given a maximum allowable time to confusion, Confu-
sionTime, and an associated uncertainty threshold, ConfusionLevel, a vehicles loca-
tion sample can be safely revealed if the time between the current time t and the last
point of its confusion is less than ConfusionTime and the tracking uncertainty of its
sample with all other location samples revealed at time t is higher than Confusion-
Level. To reduce computational overhead, the computation of tracking uncertainty
can only consider the k-nearest location samples to a predicted location point (cal-
4 Privacy of Spatial Trajectories 125
7KHGDWDRQWKLVSDWKDUHFDFKHG
8
D E F D E F
8
3UHGLFWHGSDWK
"
7KHGDWDRQWKLVSDWKDUHFDFKHG
"
G H I G H I
(a) Using cached data (b) Predicting a movement path
Fig. 4.11 Path confusion with mobility prediction and data caching.
culated by the target tracking algorithm), rather than all location samples reported
at time t. Since a consistent user identity can link consecutive location samples, it
cannot be revealed to any service provider; and hence, the path confusion technique
only supports Category-II LBS.
The main idea of the path confusion technique with mobility prediction and da-
ta caching, called CacheCloak, is that the location anonymizer predicts vehicular
movement paths, pre-fetches the spatial data on predicted paths, stores the data in
a cache [40]. Figure 4.11a illustrates an example for CacheCloak where there are
seven road segments, ab, bc, de, e f , ad, be, and c f , with six intersections, a to f .
A bold road segment indicates that the data located on it are currently cached by
the location anonymizer (e.g., data on road segments ab, bc, de, and e f are cached).
Given a continuous location-based query from a user U (represented by a car in
Figure 4.11), if U is moving on a path whose data are currently cached by the lo-
cation anonymizer, the location anonymizer is able to return the query answer to U
without contacting any LBS service provider, as depicted in Figure 4.11a. On the
other hand, Figure 4.11b shows that U enters a road segment (i.e., c f ) from an in-
tersection c with no data in the cache. In this case, the location anonymizer predicts
a path (which contains one road segment c f ) for U that connects to an intersection
of existing paths with cached data (i.e., f ). Then, the location anonymizer issues a
query Q to the service provider to get the data on the newly predicted path c f and
caches the data. It nally returns the answer of Q to U.
CacheCloak prevents the LBS service provider from tracking any one user be-
cause the service provider can only see queries for a series of interweaving path-
s [40]. As shown in the example, the service provider cannot track the user who
issues Q because the user could be turning in from road segment bc or from the oth-
er one e f (Figure 4.11b). CacheCloak can tolerate mispredictions or dynamic data.
126 Chi-Yin Chow and Mohemad F. Mokbel
When a user deviates from a predicted path p or the cached data for p have expired,
the location anonymizer simply makes a new prediction. To preserve wireless band-
width, stale data or data on mispredicted road segments will not be sent to the user.
CacheCloak is a variant version of the basic path confusion technique, as described
in Section 4.3.4, so it also only supports Category-II LBS.
The Euler Histogram-based on Short IDs (EHSID for short) is proposed for provid-
ing privacy-aware trafc monitoring services through answering aggregate queries [59].
EHSID supports two types of aggregate queries in road networks, namely, ID- and
entry-based query types.
ID-based query type. ID-based queries ask for the count of unique vehicles in-
side a query region in a road network. Given a query region R, a cross-border
query collects the count of unique vehicles that cross the boundary of R and a
distinct-object query collects the count of unique vehicles that have been detect-
ed in R, including Rs boundary. Figure 4.12 gives an example with two vehicles
v1 and v2 whose trajectories intersect a rectangular query region R. Since there
is only one vehicle, i.e., v1 , crossing the boundary of R, the cross-border query
answer is one. On the other hand, both v1 and v2 are in R, so the distinct-object
query answer is two.
Entry-based query type. Entry-based queries ask for the number of entries to a
query region. If a vehicle has multiple entries to a query region (i.e., it enters the
query region several times), its trajectory is divided into multiple sub-trajectories.
Entry-based queries count the number of entries to the query region, even if the
entries are from the same vehicle. Given a query region R, a cross-border query
counts the number of entries that cross the boundary of R and a distinct-object
query counts the number of distinct entries to R, including its boundary. Fig-
ure 4.12 depicts that v1 s trajectory can be divided into two sub-trajectories and
each one crosses the boundary of the query region R, so the cross-border query
answer is two. With an additional entry from v2 , the distinct-object query answer
is three.
The basic idea of EHSID is based on Euler histograms, which were designed to
count the number of rectangular objects in multidimensional space [50]. An Euler
histogram is constructed by partitioning the space into a grid and maintaining a
count for the number of intersecting objects of each face, edge, and vertex in the
grid. Figure 4.13a gives an example of a 3 3 gird with three rectangular objects
A, B, and C. Figure 4.13b shows the count of each face and vertex in the grid,
and Figure 4.13c shows the count of each edge in the grid. Given a query region
R, which is represented by a bold rectangle, the total number of distinct objects
N in R is estimated by the equation N = F + V E, where F is the sum of face
counts inside R, V is the sum of vertex counts inside R (excluding its boundary),
4 Privacy of Spatial Trajectories 127
9 4XHULHV
&URVVERUGHU 'LVWLQFWREMHFW
4XHU\7\SHV
,'EDVHG
4XHU\ (QWU\EDVHG
5HJLRQ
9 4XHU\$QVZHUV
$ &
%
(a) 3 3 grid with 3 rectangles (b) Counts for faces and vertices (c) Counts for edges
Fig. 4.13 Using an Euler histogram to count distinct rectangles in a query region.
and E is the sum of edge counts inside R (excluding its boundary). In this example,
F = 1 + 2 + 1 + 2 = 6, V = 1, and E = 1 + 1 + 1 + 2 = 5; hence, N = 6 + 1 5 = 2,
which is the exact number of distinct rectangles intersecting R.
To protect user trajectory privacy, each vehicle is identied by a short ID that
is extracted from random bit positions from its full ID and EHSID periodically
changes the bit positions. For example, if a vehicles full ID is 110111011 and
a bit pattern is 1, 3, 4, and 7, its short ID generated by the system is 1010. The
random bit pattern is periodically updated. Let lF and lS be the length of the full
and short IDs, respectively. The degree of k-anonymity of a short ID is measured as
k = 2lF lS [59].
Figure 4.14 gives a simple example with two vehicles for EHSID, where the road
network consists of six vertices a to f and ve road segments, ab, bc, cd, de, and e f .
The short IDs of the two vehicles are 01 and 10. EHSID maintains a data list
for each vertex and edge. An item in a data list is dened as (short ID, the counter
for the short ID). The query region of a query Q is shown as a bold rectangle. In
general, the query processing algorithm of EHSID has two main steps.
1. Aggregating data at vertices and edges. The algorithm identies four types of
relevant vertices to a query, as depicted in Table 4.4. An relevant edge is denoted
as Ex,y , where x is the vertex type at one end and y is the vertex type at the other
end. For example, E jo,ob denotes an edge with a just-outside vertex (V jo ) at
one end and an on-border vertex (Vob ) at the other end. Then, the algorithm
128 Chi-Yin Chow and Mohemad F. Mokbel
-2 2%
9 ( 9
F G 4
( (
E D H I
9 ( 9 9 ( 9
-, &,
Fig. 4.14 EHSID with two trajectories.
Table 4.5 Relevant short IDs and edge datasets for a query.
Query type Relevant short IDs Relevant edge datasets
ID-based cross-border V jo Vob V ji N/A
ID-based distinct-objects Vob V ji Vci N/A
Entry-based cross-border V jo Vob V ji E jo, jo , Eob,ob , E ji, ji , E jo,ob , Eob, ji
Entry-based distinct-objects Vob V ji Vci Eob,ob , E ji, ji , Eci,ci , Eob, ji , E ji,ci
aggregates the data for each type of vertices and edges. If a short ID appears
n times (n > 0) for the same vertex or edge type, its corresponding counter is
simply set to n.
2. Computing query answers. Since a short ID of a vehicle may not be relevant
to a query, the algorithm needs to nd a set of relevant short IDs based on
the denition of the query. The relevant set of short IDs and aggregate edge
datasets to a query are dened in Table 4.5. EHSID only needs the relevant
short IDs to compute answers for ID-based aggregate queries. If the query Q
4 Privacy of Spatial Trajectories 129
where dist(p, q) denotes the Euclidean distance between two point locations p
and q. In the running example, DD = 15 (2.80 + 0.71 + 0.71 + 2.12 + 2.12) =
1.69.
Given a real trajectory Tr and the three user-specied parameters SD, T D, and
DD in a privacy prole, the dummy-based anonymization algorithm incrementally
uses DD to nd a set of candidate dummies and select one with the best matching
to SD and T D until it nds a set of trajectories (including Tr and selected dummies)
that satises all the parameters [63]. Since a user can use consistent identities for its
\
V V
7G 7G
, G
,
7U G
V
G
[
Fig. 4.15 One real trajectory Tr and two dummies Td1 and Td2 .
4 Privacy of Spatial Trajectories 131
WLPH
+RUL]RQWDO'LVN
7UDMHFWRU\
9ROXPH
7UDMHFWRU\
\
8QFHUWDLQW\
WKUHVKROG
G
[
Fig. 4.16 The trajectory uncertainty model.
actual trajectory and other dummies, the dummy-based approach can support both
Category-I and -II LBS, as depicted in Table 4.2.
The clustering-based approach [1] utilizes the uncertainty of trajectory data to group
k co-localized trajectories within the same time period to form a k-anonymized ag-
gregate trajectory. Given a trajectory T between times t1 and tn , i.e., [t1 ,tn ], and an
uncertainty threshold d, each location sample in T , pi = (xi , yi ,ti ), is modeled by a
horizontal disk with radius d centered at (xi , yi ). The union of all such disks consti-
tutes the trajectory volume of T , as shown in Figure 4.16. Two trajectories Tp and
Tq dened in [t1 ,tn ] are said to be co-localized with respect to d, if the Euclidean
distance between each pair of points in Tp and Tq at time t [t1 ,tn ] is less than or
equal to d. An anonymity set of k trajectories is dened as a set of at least k co-
localized trajectories. The cluster of k co-localized trajectories is then transformed
into an aggregate trajectory where each of its location points is computed by the
132 Chi-Yin Chow and Mohemad F. Mokbel
WLPH
7UDMHFWRU\
7UDMHFWRU\
9ROXPHRI7T
9ROXPHRI7S
UDGLXV G
UDGLXV G
%RXQGLQJWUDMHFWRU\
YROXPHRI7 SDQG7 T $JJUHJDWH
UDGLXV G 7UDMHFWRU\
\
arithmetic mean of the location samples at the same time. Figure 4.17 gives the tra-
jectory volumes of Tp and Tq that are represented by grey dotted lines, respectively.
The trajectory volume with black lines is a bounding trajectory volume for Tp and
Tq . The bounding trajectory volume is then transformed into an aggregate trajectory
which is represented by the sequence of square markers.
The clustering-based anonymization algorithm consists of three main steps [1]:
1. Pre-processing step. The main task of this phase is to group all trajectories that
have the same starting and ending times, i.e., they are in the same equivalence
class with respect to time span. To increase the number of trajectories in an
equivalence class, given an integer parameter , all trajectories are trimmed if
necessary such that only one timestamp every can be the starting or ending
point of a trajectory.
2. Clustering step. This phase clusters trajectories based on a greedy clustering
scheme. For each equivalence class, a set of appropriate pivot trajectories are se-
lected as cluster centers. For each cluster center, its nearest k 1 trajectories are
assigned to the cluster, such that the radius of the bounding trajectory volume
of the cluster is not larger than a certain threshold (e.g., d/2).
3. Space transformation step. Each cluster is transformed into a k-anonymized
aggregate trajectory by moving all points at the same time to the corresponding
arithmetic mean of the cluster.
Since most data mining and statistical applications work on atomic trajectories,
they are needed to be modied to work on aggregate trajectories generated by an
anonymization algorithm (e.g., the clustering approach). To address this limitation,
4 Privacy of Spatial Trajectories 133
W W W
W W
W W W
W W W W W
W
W W W W
7 7 7 7 7 7 7
7
(a) Original trajectories (b) Anonymity group G = (c) Anonymization of G
{T1 , T2 }
W WW
W WW
W WW
W
W WW
W WW
7
7 7
(d) Add T3 into G (e) Anonymization of G
the generalization-based algorithm rst generalizes a trajectory data set into a set
of k-anonymized trajectories, i.e., each one is a sequence of k-anonymized regions.
Then, for each k-anonymized trajectory, the algorithm uniformly selects k atomic
points from each anonymized region and links a unique atomic point from each
anonymized region to reconstruct k trajectories [44]. More details about these two
main steps are given below:
1. Anonymization step. Given a trajectory data set T , each iteration of this step
creates an empty anonymity group G and randomly samples one trajectory
T T . T is put into G as the group representative RepG = T . Then, the clos-
est trajectory T T G to RepG is inserted into G and RepG is updated as
the anonymization of RepG and T . This anonymization process continues un-
til G contains k trajectories. At the end of the iteration, the trajectories in G
134 Chi-Yin Chow and Mohemad F. Mokbel
WW W W W
WW W W W
WW W W
W
WW W W W
are removed from T . This step nishes when there are less than k remaining
trajectories in T . These trajectories are simply discarded.
Figure 4.18 gives an example of generalizing three trajectories T1 , T2 and T3 into
a three-anonymized trajectory, where the timestamp of each location sample is
shown beside its location. In this example, T2 is rst added into an empty group
G as its representative RepG . Next T1 is added to G and the location samples
of T1 and T2 are generalized into a sequence of anonymized regions (represent-
ed by shaded rectangles), as depicted in Figure 4.18b. RepG is updated as the
anonymization of T1 and T2 , denoted by T (Figure 4.18c). T3 is also added into
G and a sequence of new anonymized regions is formed for G (Figure 4.18d).
The time span of an anonymized region is the range from the smallest and
largest timestamps of the location samples included in the region. Note that
unmatched points (e.g., the location sample of T3 at times t7 ) are suppressed in
this step. Since G already contains k = 3 trajectories, the anonymization process
is done (Figure 4.18e).
2. Reconstruction step. Given a k-anonymized trajectory, k locations are uniform-
ly selected in each of its anonymized regions, as illustrated in Figure 4.19a.
Next, for each selected location, a timestamp is also uniformly selected from
its associated time span. k trajectories are reconstructed by linking a unique
location sample in each monitored region (Figure 4.19b).
The reconstructed trajectory data set can be released to the public or third parties
for answering spatio-temporal queries and data analysis (e.g., data mining).
4 Privacy of Spatial Trajectories 135
Digital cash and electronic money have become very popular. People often use them
to pay for their transportation and for their purchases at a wide variety of stores, e.g.,
convenient stores, grocery stores, restaurants and parking lots. Since a transaction
is associated with the location of a particular store at a particular time, the sequence
of a users transactions can be considered as its trajectory information. Consider a
digital cash or electronic money company publishes its original trajectory database
T . A company A (e.g., 7-Eleven) that accepts its electronic payment service has
part of trajectory information in T , i.e., the transactions are done by A. A can be
considered as an adversary because A could use its knowledge TA to identify its
customers private information [53].
Figure 4.20a shows an original trajectory database T that contains the location
information of As stores and other stores. A has part of the knowledge of T , TA ,
i.e., the location information of its stores, as given in Figure 4.20b. By joining TA to
T , A knows that t5A actually corresponds to t5 because t5 is the only trajectory with
a1 a3 . Thus, A is 100% sure that the user of t5A visited b1 . Similarly, A knows
that t6A corresponds to t6 , t7 or t8 , so A can infer that the user of t6A visited b2 with
probability 66%, i.e., b2 appears in t7 and t8 .
The privacy protection for the above-mentioned linking attack is dened as: given
an original trajectory database T and an adversary As knowledge TA , where T s
locations take values from a data set P, TA s locations take values from PA and PA
P, the probability that A can correctly identify the actual user of any location pi |pi
t j pi
/ tkA (where t j T , tkA TA , pi P, and pi / PA ) can be determined by the
equation:
| t |t S(tkA , T ) pi t pi P pi
/ PA |
Pr(pi ,tk , T ) =
A
, (4.3)
|S(tkA , T )|
where S(tkA , T ) denotes a set X of trajectories in T such that tkA is a subsequence of
each trajectory in X. To protect user privacy, Pr(pi ,tkA , T ) should not be larger than
a certain threshold . If = 50%, the publication of T makes privacy breaches, as
given in the example (Figures 4.20a and 4.20b).
A greedy anonymization algorithm [53] is designed to iteratively suppress locations
until the privacy constraint is met, i.e., Pr(pi ,tkA , T ) (computed by Equation 4.3)
for each pair of pi P and tkA TA . At the meantime, the utility of the published
trajectory database is maximized. In the example, after the algorithm suppresses b3
from t2 , a1 from t5 , and b3 from t8 , the transformed trajectory database T ( = 50%),
as given in Figure 4.20c, can be published without compromising the user privacy.
One way to measure the utility is to compute the average difference between the
original trajectories in T and the transformed ones in T [53]. Let t be a trajectory
in T and t be its transformed form in T . Let ts and te (ts and te ) be the starting and
ending locations of t (t ), respectively. The difference between t and t , denoted by
di f f (t,t ), is computed as follows. For each location p t, it forms one component
to the distance based on the following four cases:
136 Chi-Yin Chow and Mohemad F. Mokbel
The nal step of computing di f f (t,t ) is to sum up the square of each component
and take the root of the sum. Figure 4.21 gives a trajectory t : a1 a2 a3 c1
that is transformed to t : a2 c1 by suppressing a1 and a3 from t. For the rst
location a1 in t, Figure 4.21a shows that a1 is before ts (i.e., Case 1), so its corre-
sponding component is d(a1 ,ts ) = d(a1 , a2 ). Since a2 is in-between ts and te (i.e.,
Case 3), we need to nd (a2 ,t ). As (a2 ,t ) = a2 , the corresponding component of a2
is dist(a2 , a2 ) = 0. a3 is also in-between ts and te (i.e., Case 3), so its corresponding
component is dist(a3 , (a3 ,t )). Similar to a2 , the corresponding component of c1 is
dist(c1 , c1 ) = 0. Therefore, di f f (t,t ) = [d(a1 , a2 )]2 + [dist(a3 , (a3 ,t ))]2 .
D D
F WH F WH
WV D WV D
W
W
GLVWDD
D D
(a) Corresponding component of a1 (b) Corresponding component of a2
D D
F WH F WH
WV D WV D
W
W
Fig. 4.21 The difference between an original trajectory t and its transformed trajectory t .
3 3 3
DW IW
FW GW
JW
EW HW
3 3 KW
area for a lower level of privacy protection. However, larger partitions will lead to
lower accuracy in the data mining results.
Figure 4.22b gives an example to illustrate how to anonymize a trajectory
T : (a,t1 ) (b,t2 ) . . . (i,t9 ), where x and y in each pair (x, y) denote a
location and its update timestamp, respectively, to a list of anonymization rectan-
138 Chi-Yin Chow and Mohemad F. Mokbel
gles. Locations a, b, and c are in the same grid cell P4 , so they are blurred into the
anonymization rectangle P4 with a time range from t1 to t3 , i.e., (P4 , [t1 ,t3 ]). Since
t crosses two partitions, from P4 to P5 , the sub-path from c to d is ignored. T is
split into two sub-trajectories. Similarly, locations d, e, f , and g are transformed
into (P5 , [t4 ,t7 ]). As the path gh crosses two partitions, it is discarded and T is s-
plit again. Finally, locations h and i are transformed into (P2 , [t8 ,t9 ]). Therefore,
the transformed form of t is (P4 , [t1 ,t3 ]) (P5 , [t4 ,t7 ]) (P2 , [t8 ,t9 ]). Trajecto-
ries anonymized by the grid-based approach can answer spatio-temporal density
queries [23].
4.5 Summary
References
1. Abul, O., Bonchi, F., Nanni, M.: Never walk alone: Uncertainty for anonymity in moving
objects databases. In: Proceedings of the IEEE International Conference on Data Engineering
(2008)
2. Bamba, B., Liu, L., Pesti, P., Wang, T.: Supporting anonymous location queries in mobile
environments with PrivacyGrid. In: Proceedings of the International Conference on World
Wide Web (2008)
4 Privacy of Spatial Trajectories 139
3. Bao, J., Chow, C.Y., Mokbel, M.F., Ku, W.S.: Efcient evaluation of k-range nearest neighbor
queries in road networks. In: Proceedings of the International Conference on Mobile Data
Management (2010)
4. Beresford, A.R., Stajano, F.: Location privacy in pervasive computing. IEEE Pervasive Com-
puting 2(1), 4655 (2003)
5. Cheng, R., Zhang, Y., Bertino, E., Prabhakar, S.: Preserving user location privacy in mobile
data management infrastructures. In: Proceedings of International Privacy Enhancing Tech-
nologies Symposium (2006)
6. Chow, C.Y., Bao, J., Mokbel, M.F.: Towards location-based social networking services. In:
Proceedings of the ACM SIGSPATIAL International Workshop on Location Based Social
Networks (2010)
7. Chow, C.Y., Mokbel, M., He, T.: A privacy-preserving location monitoring system for wireless
sensor networks. IEEE Transactions on Mobile Computing 10(1), 94107 (2011)
8. Chow, C.Y., Mokbel, M.F.: Enabling private continuous queries for revealed user locations.
In: Proceedings of the International Symposium on Spatial and Temporal Databases (2007)
9. Chow, C.Y., Mokbel, M.F., Aref, W.G.: Casper*: Query processing for location services with-
out compromising privacy. ACM Transactions on Database Systems 34(4), 24:124:48 (2009)
10. Chow, C.Y., Mokbel, M.F., Bao, J., Liu, X.: Query-aware location anonymization in road
networks. GeoInformatica 15(3), 571607 (2011)
11. Chow, C.Y., Mokbel, M.F., Liu, X.: A peer-to-peer spatial cloaking algorithm for anonymous
location-based services. In: Proceedings of the ACM Symposium on Advances in Geographic
Information Systems (2006)
12. Chow, C.Y., Mokbel, M.F., Liu, X.: Spatial cloaking for anonymous location-based services
in mobile peer-to-peer environments. GeoInformatica 15(2), 351380 (2011)
13. Dateline NBC: Tracing a stalker. http://www.msnbc.msn.com/id/19253352
(2007)
14. Duckham, M., Kulik, L.: A formal model of obfuscation and negotiation for location privacy.
In: Proceedings of International Conference on Pervasive Computing (2005)
15. FoxNews: Man accused of stalking ex-girlfriend with GPS. http://www.foxnews.com/
story/0,2933,131487,00.html (2004)
16. Freudiger, J., Raya, M., Felegyhazi, M., Papadimitratos, P., Hubaux, J.P.: Mix-zones for loca-
tion privacy in vehicular networks. In: Proceedings of the International Workshop on Wireless
Networking for Intelligent Transportation Systems (2007)
17. Freudiger, J., Shokri, R., Hubaux, J.P.: On the optimal placement of mix zones. In: Proceedings
of International Privacy Enhancing Technologies Symposium (2009)
18. Fung, B.C.M., Wang, K., Chen, R., Yu, P.S.: Privacy-preserving data publishing: A survey of
recent developments. ACM Computing Surveys 42(4), 14:114:53 (2010)
19. Gedik, B., Liu, L.: Protecting location privacy with personalized k-anonymity: Architecture
and algorithms. IEEE Transactions on Mobile Computing 7(1), 118 (2008)
20. Ghinita, G., Kalnis, P., Khoshgozaran, A., Shahabi, C., Tan, K.L.: Private queries in location
based services: Anonymizers are not necessary. In: Proceedings of the ACM Conference on
Management of Data (2008)
21. Ghinita, G., Kalnis, P., Skiadopoulos, S.: PRIVE: Anonymous location-based queries in dis-
tributed mobile systems. In: Proceedings of the International Conference on World Wide Web
(2007)
22. Ghinita1, G., Kalnis, P., Skiadopoulos, S.: MobiHide: A mobile peer-to-peer system for anony-
mous location-based queries. In: Proceedings of the International Symposium on Spatial and
Temporal Databases (2007)
23. Gidofalvi, G., Huang, X., Pedersen, T.B.: Privacy-preserving data mining on moving object
trajectories. In: Proceedings of the International Conference on Mobile Data Management
(2007)
24. Google Geocoding API: http://code.google.com/apis/maps/
documentation/geocoding/
140 Chi-Yin Chow and Mohemad F. Mokbel
25. Gruteser, M., Grunwald, D.: Anonymous usage of location-based services through spatial and
temporal cloaking. In: Proceedings of the International Conference on Mobile Systems, Ap-
plications, and Services (2003)
26. Gruteser, M., Hoh, B.: On the anonymity of periodic location samples. In: Proceedings of the
International Conference on Security in Pervasive Computing (2005)
27. Hoh, B., Gruteser, M., Xiong, H., Alrabady, A.: Achieving guaranteed anonymity in GPS
traces via uncertainty-aware path cloaking. IEEE Transactions on Mobile Computing 9(8),
10891107 (2010)
28. Hong, J.I., Landay, J.A.: An architecture for privacy-sensitive ubiquitous computing. In:
Proceedings of the International Conference on Mobile Systems, Applications, and Services
(2004)
29. Hu, H., Lee, D.L.: Range nearest-neighbor query. IEEE Transactions on Knowledge and Data
Engineering 18(1), 7891 (2006)
30. Ilarri, S., Mena, E., Illarramendi, A.: Location-dependent query processing: Where we are and
where we are heading. ACM Computing Surveys 42(3), 12:112:73 (2010)
31. Kalnis, P., Ghinita, G., Mouratidis, K., Papadias, D.: Preventing location-based identity infer-
ence in anonymous spatial queries. IEEE Transactions on Knowledge and Data Engineering
19(12), 17191733 (2007)
32. Khoshgozaran, A., Shahabi, C.: Blind evaluation of nearest neighbor queries using space trans-
formation to preserve location privacy. In: Proceedings of the International Symposium on
Spatial and Temporal Databases (2007)
33. Kido, H., Yanagisawa, Y., Satoh, T.: An anonymous communication technique using dummies
for location-based services. In: Proceedings of IEEE International Conference on Pervasive
Services (2005)
34. Ku, W.S., Zimmermann, R., Peng, W.C., Shroff, S.: Privacy protected query processing on
spatial networks. In: Proceedings of the International Workshop on Privacy Data Management
(2007)
35. LeFevre, K., DeWitt, D., Ramakrishnan, R.: Mondrian multidimensional k-anonymity. In:
Proceedings of the IEEE International Conference on Data Engineering (2006)
36. Li, N., Li, T., Venkatasubramanian, S.: Closeness: A new privacy measure for data publishing.
IEEE Transactions on Knowledge and Data Engineering 22(7), 943956 (2010)
37. Ma, C.Y., Yau, D.K.Y., Yip, N.K., Rao, N.S.V.: Privacy vulnerability of published anonymous
mobility traces. In: Proceedings of the ACM International Conference on Mobile Computing
and Networking (2010)
38. Machanavajjhala, A., Kifer, D., Gehrke, J., Venkitasubramaniam, M.: l-diversity: Privacy be-
yond k-anonymity. ACM Transactions on Knowledge Discovery from Data 1(1), 3:13:52
(2007)
39. Marist Institute for Public Opinion (MIPO): Half of Social Net-
workers Online Concerned about Privacy. http://maristpoll.
marist.edu/714-half-of-social-networkers-online-%
concerned-about-privacy/. July 14, 2010
40. Meyerowitz, J., Choudhury, R.R.: Hiding stars with reworks: Location privacy through cam-
ouage. In: Proceedings of the ACM International Conference on Mobile Computing and
Networking (2009)
41. Mokbel, M.F., Chow, C.Y., Aref, W.G.: The new casper: Query procesing for location services
without compromising privacy. In: Proceedings of the International Conference on Very Large
Data Bases (2006)
42. Mokbel, M.F., Levandoski, J.: Towards context and preference-aware location-based database
systems. In: Proceedings of the ACM International Workshop on Data Engineering for Wire-
less and Mobile Access (2009)
43. Mouratidis, K., Yiu, M.L.: Anonymous query processing in road networks. IEEE Transactions
on Knowledge and Data Engineering 22(1), 215 (2010)
44. Nergiz, M.E., Atzori, M., Saygin, Y., Guc, B.: Towards trajectory anonymization: A
generalization-based approach. Transactions on Data Privacy 2(1), 4775 (2009)
4 Privacy of Spatial Trajectories 141
45. Palanisamy, B., Liu, L.: Mobimix: Protecting location privacy with mix zones over road net-
works. In: Proceedings of the IEEE International Conference on Data Engineering (2011)
46. Pan, X., Meng, X., Xu, J.: Distortion-based anonymity for continuous queries in location-
based mobile services. In: Proceedings of the ACM SIGSPATIAL International Conference
on Advances in Geographic Information Systems (2009)
47. Ptzmann, A., Kohntopp, M.: Anonymity, unobservability, and pseudonymity - a proposal for
terminology. In: Proceedings of the Workshop on Design Issues in Anonymity and Unobserv-
ability (2000)
48. Reid, D.: An algorithm for tracking multiple targets. IEEE Transactions on Automatic Control
24(6), 843854 (1979)
49. Samarati, P.: Protecting respondents identities in microdata release. IEEE Transactions on
Knowledge and Data Engineering 13(6), 10101027 (2001)
50. Sun, C., Agrawal, D., Abbadi, A.E.: Exploring spatial datasets with histograms. In: Proceed-
ings of the IEEE International Conference on Data Engineering (2002)
51. Sweeney, L.: Achieving k-anonymity privacy protection using generalization and suppression.
International Journal on Uncertainty, Fuzziness and Knowledge-based Systems 10(5), 571
588 (2002)
52. Sweeney, L.: k-anonymity: A model for protecting privacy. International Journal on Uncer-
tainty, Fuzziness and Knowledge-based Systems 10(5), 557570 (2002)
53. Terrovitis, M., Mamoulis, N.: Privacy preservation in the publication of trajectories. In: Pro-
ceedings of the International Conference on Mobile Data Management (2008)
54. USAToday: Authorities: GPS system used to stalk woman. http://www.usatoday.
com/tech/news/2002-12-30-gps-stalker_x.htm (2002)
55. Voelcker, J.: Stalked by satellite: An alarming rise in gps-enabled harassment. IEEE Spectrum
47(7), 1516 (2006)
56. Wang, T., Liu, L.: Privacy-aware mobile services over road networks. In: Proceedings of the
International Conference on Very Large Data Bases (2009)
57. Webroot Software, Inc.: Webroot survey nds geolocation apps prevalent amongst mobile
device users, but 55% concerned about loss of privacy. http://pr.webroot.com/
threat-research/cons/social-networks-mobile-security-071310.
html. July 13, 2010
58. Xiao, X., Yi, K., Tao, Y.: The hardness and approximation algorithms for l-diversity. In:
Proceedings of the International Conference on Extending Database Technology (2010)
59. Xie, H., Kulik, L., Tanin, E.: Privacy-aware trafc monitoring. IEEE Transactions on Intelli-
gent Transportation Systems 11(1), 6170 (2010)
60. Xu, T., Cai, Y.: Location anonymity in continuous location-based services. In: Proceedings of
the ACM Symposium on Advances in Geographic Information Systems (2007)
61. Xu, T., Cai, Y.: Exploring historical location data for anonymity preservation in location-based
services. In: Proceedings of IEEE INFOCOM (2008)
62. Yiu, M.L., Jensen, C., Huang, X., Lu, H.: Spacetwist: Managing the trade-offs among location
privacy, query performance, and query accuracy in mobile services. In: Proceedings of the
IEEE International Conference on Data Engineering (2008)
63. You, T.H., Peng, W.C., Lee, W.C.: Protecting moving trajectories with dummies. In: Pro-
ceedings of the International Workshop on Privacy-Aware Location-Based Mobile Services
(2007)
64. Zhang, C., Huang, Y.: Cloaking locations for anonymous location based services: A hybrid
approach. GeoInformatica 13(2), 159182 (2009)
Chapter 5
Trajectory Pattern Mining
Abstract :
In step with the rapidly growing volumes of available moving-object trajectory
data, there is also an increasing need for techniques that enable the analysis of tra-
jectories. Such functionality may benet a range of application area and services,
including transportation, the sciences, sports, and prediction-based and social ser-
vices, to name but a few. The chapter rst provides an overview trajectory patterns
and a categorization of trajectory patterns from the literature. Next, it examines
relative motion patterns, which serve as fundamental background for the chapters
subsequent discussions. Relative patterns enable the specication of patterns to be
identied in the data that refer to the relationships of motion attributes among mov-
ing objects. The chapter then studies disc-based and density-based patterns, which
address some of the limitations of relative motion patterns. The chapter also reviews
indexing structures and algorithms for trajectory pattern mining.
5.1 Introduction
We are witnessing a rapid and continued diffusion of mobile devices such as smart-
phones, personal navigation devices and tablet computers. Further, these devices are
increasingly being geo-positioned using satellite navigation systems, e.g., GPS, sys-
tems that exploit the wireless communication infrastructure, and proximity-based
systems, e.g., RFID-based systems.
Hoyoung Jeung
143
144 Hoyoung Jeung, Man Lung Yiu, and Christian S. Jensen
1. Data collection
Server
Device 1
2. Pre-processing
online Collected Refined
Device 2 trajectories trajectories
offline
Device 3
3. Trajectory mining
Patterns
Device n
1. Data collection.
In this step, devices submit their location records to the server. Online devices
may submit their data in real time or delayed, in batches. For example, a device
may submit records as soon they become available on the device, or it may
collect a small batch of records before submitting in order to save bandwidth.
Ofine devices accumulate their trajectory data, which is transferred to the serv-
er in batches via other means. For example, an ofine navigation device in a
vehicle may occasionally be connected to an online personal computer in order
to transfer location records to the server.
2. Pre-processing.
Due in part to imperfections in the positioning technologies employed and the
use of different sampling policies, collected trajectories may be inhomogeneous
and may not be of the desired quality. For instance, some of trajectories may
lack location records for times where other trajectories posses such records.
In pre-processing, the server cleans the data and converts it into a standard
format in preparation for the data mining. As part of the pre-processing, the
granularity and the representation of the rened trajectories need to be decided
by the server. For example, a nest sampling rate is often chosen, and it is de-
cided whether a trajectory be stored as a sequence of location records or should
be approximated by a piecewise linear function from time to space.
3. Mining trajectories.
The rened trajectories are made available for the mining algorithms to discover
patterns (e.g., clusters of trajectories).
4. Post-processing.
This step enables applications to analyze or tune the discovery process. For ex-
ample, mined patterns can be displayed interactively using visualization tools,
which can suggest more appropriate parameter values for the mining algorithms
or nding further research issues.
5 Trajectory Pattern Mining 147
The term trajectory pattern covers many different types of patterns that can be
mined from trajectory data [29]. As a result, the concepts and techniques underlying
trajectory pattern discovery are classied by according to a variety of aspects [19].
In the following, we describe key classications of trajectory pattern concepts and
techniques while emphasizing the intuitions behind the classications.
Two typical mining tasks on trajectories are clustering and join. Clustering aims
at discovering groups of similar objects from a single trajectory collection. On the
other hand, a join is a specic operation that computes pairs of similar objects from
two trajectory collections.
Clustering of Trajectories
Clustering is the process of organizing objects into groups so that the members of a
group are similar and so that members of distinct groups are dissimilar, according
to some specic denition of similarity. Clustering is a fundamental concept in data
mining, due to its wide spectrum of applications.
A clustering technique is classied according to the type of data that it is applica-
ble to. Clustering techniques for different types of data are likely to vary signicant-
ly with respect to the underlying concepts and the specic techniques employed.
In the context of trajectory data, clustering attempts to group trajectories based
on their geometric proximity in either spatial or spatiotemporal space. Clustering
of trajectories is perhaps one of the most fundamental operations used in various
types of trajectory pattern mining, since the discovery of trajectory patterns typically
involves the process of grouping similar positions, trajectories, and objects.
Assuming the polyline representation of a trajectory, one fundamental approach
to trajectory clustering treats a segment of a trajectory as a minimum unit when
computing the distance between two trajectories. To this end, it is essential to design
an effective distance function for measuring the distance between two trajectories
(segment). We offer details on trajectory distance measures in Section 5.6.1. An-
other fundamental approach views a cluster of trajectories as a sequence of spatial
clusters. Assuming that all objects have position samples at the same points in time,
such spatial clusters can be obtained by applying some spatial clustering technique
to the positions for each point in time.
This chapter describes in detail the core ideas and concepts of state-of-the-art
algorithms for clustering of trajectories: relative motion patterns, ock, TRACLAUS,
moving cluster, convoy, and swarm.
Trajectory Join
Some trajectory patterns are dened and computed by means of join queries. Given
two data sets P1 and P2 , spatio-temporal joins nd pairs of elements from the two sets
that satisfy a given predicate with both spatial and temporal attributes [31, 17]. The
148 Hoyoung Jeung, Man Lung Yiu, and Christian S. Jensen
study of airplane or vessel trajectories with the objective of nding incidents may be
accomplished using joins. Since joins may involve the comparison of all trajectories
in data set P1 with all trajectories in data set P2 , which is computationally expensive,
a common approach for join processing involves the use if indexing techniques to
avoid unnecessary distance computations. For example, Tao et al. [53] show how
join queries are processed by using the time-parameterized methods [56, 52, 51].
The close-pair join [13] reports all object pairs (o1 , o2 ) from P1 P2 with distance
D (o1 , o2 ) e within a time interval , where e is a user-specied distance. Plane-
sweep techniques [6, 61] have been proposed for evaluating spatio-temporal joins.
Zhou et al. [61] use join predicates that dene a rectangular region in time and
space. An index structure (MTSB-tree) is introduced to enable efcient retrieval of
the pairs of trajectories that satisfy the join predicates. Instead of using an index,
Arumugam and Jermaine [6] utilize MBR approximations of trajectory segments to
reduce the computation of query processing.
As does the close-pair join, the trajectory join [10] aims at retrieving all pairs of
similar trajectories in two data sets. Bakalov et al. [9, 10] represent trajectories as se-
quences of symbols, and apply sliding window techniques to measure the symbolic
distance between possible pairs.
\ R R
R R R
R R
R R
R R
[
W W W W
ries according to the similarity of the embeddings, the three trajectories may form
one cluster, although o3 has never traveled together with o1 and o2 , but has merely
followed the same route as these.
The above is an example of a spatial trajectory pattern (Figure 5.3(a)). Despite
the fact that the concept of trajectory encompasses the time domain, a variety of
applications do not need to consider the temporal aspects of trajectories.
For example, analyzing a set of hurricane trajectories collected over several years
for forecasting the trajectories of future hurricanes may be done best by considering
simply the embeddings into the movement space of the past hurricanes so that is
becomes the similarity of the routes of the hurricanes that is studied. Put differently,
the routes of the past hurricanes may be the most important aspect when aiming to
offer pre-warnings to regions of potential damage.
In contrast to spatial trajectory patterns, spatiotemporal trajectory patterns take
the time information in a trajectory into account. For example, o3 in Figure 5.2 may
not belong to the same cluster as the one o1 and o2 belong to (see Figure 5.3(b)),
since o3 always trailed behind o1 and o2 . Having a time constraint, a spatiotemporal
\ R R
R R
R R
[
D VSDWLDOSDWWHUQ E VSDWLRWHPSRUDOSDWWHUQ
trajectory pattern is therefore stricter than a spatial trajectory pattern. This time con-
straint can help discover more specic patterns in many cases of mining trajectory
data. For instance, identifying objects that have traveled together for the purpose
of given car pooling recommendations should consider the temporal information
of trajectories. Discovering places in a road network where congestion may occur
based on vehicle trajectories should take into account the time information of the
trajectories.
that participate in the patterns. In global trajectory patterns, trajectories are viewed
as non-decomposable, i.e., the basic unit of pattern discovery is a whole trajectory.
For example, Gaffney et al. [24] propose a model-based clustering algorithm that
groups trajectories with overall similar routes using a regression mixture model and
the EM algorithm. This algorithm generate clusters of trajectories with respect to
the overall distances among whole trajectories.
In contrast, partial trajectory patterns consider partial trajectories in the pattern
discovery process. The idea behind this approach is that the clustering of whole
trajectories may not detect trajectories with similar sub-trajectories. In general, a
trajectory may be long and complex. Hence, even though some parts of trajectories
are similar, the full trajectories might not be similar. Based in this view, Lee et
al. [42] propose to partition trajectories into line segments and to build groups of
close trajectory segments. Recent studies on trajectory clustering algorithms, such
as moving clusters [36], ocks [11], convoys [35], and swarms [44], also consider
patterns that appear in sub-trajectories.
Individual Vs. Group Patterns
Another distinction relates to whether a set of individual trajectories are retrieved
that satisfy a pattern specied in query, called individual trajectory pattern re-
trieval [28, 32, 48], or whether sets of trajectories are retrieved so that the trajec-
tories in a set exhibit a similar pattern according to some specic notion of pattern,
called group trajectory pattern discovery [27, 33]
So-called spatiotemporal pattern queries [28, 48] illustrate well the retrieval of
trajectories that satisfy a particular pattern as specied in a query. Examples of such
queries include the nding of ights that descended into an airport, but did not land;
identifying ights that had to make several approaches before entering the airport;
and discovering vessels that changed course to avoid a collision.
The discovery of groups of trajectories that share patterns [57] is fundamental-
ly different in that the objects returned are to be similar to each other according
to a given notion of similarity rather than similar to a query pattern. The discov-
ery of group patterns may enable different forms of sharing among the objects who
have similar trajectories, e.g., in car pooling or delivery truck logistics. This class
of patterns include concurrence [39], trend-setter [39], ock [11, 27, 26], lead-
ership [5, 4], convergence [11], encounter [11], convoy [33], and swarm [44].
We describe each of these pattern concepts in detail in Sections 5.4 and 5.5.
Some trajectory patterns can be associated with constraints along the spatial and
temporal dimensions.
Spatial Constraints: Movement on Spatial Networks
Many types of objects move in a spatial network, such as a road network, a rail net-
work, or the kind of network made up by the corridors used by commercial aircraft.
Since those objects are always located somewhere in the networks, raw trajectory
5 Trajectory Pattern Mining 151
Y Y Y H H Y
Z
Y Z
D D D D
D D
Z
D Z H
H
Y
D
Y
Y
H Y
Y Z
D D
D E
Fig. 5.4 An example of road network-constrained trajectory model.
of four time points. This latter space of trajectories is called the analysis space in
REMO.
o1 t1 t2 t3 t4
o1
o2
o2 o3
o3
(a) raw trajectories (b) motion-azimuth trajectories
REMO denes three sets of relative motion patterns: basic motion patterns, spa-
tial motion patterns, and aggregate/segregate motion patterns. These pattern con-
cepts serve as fundamental background for subsequent studies of moving objects
patterns. This section summarizes the key ideas in REMO.
The rst set of REMO patterns describe motion events and patterns that explicitly
disregard the absolute position of the moving objects. This means that a set of geo-
graphically distant objects can be identied as belonging to the same group, as long
as they exhibit the same predened motion properties. The basic motion patterns in-
clude (i) patterns over time, (ii) patterns across objects, and (iii) patterns over time
and across objects. Such patters are exemplied next.
Constance
This pattern is dened as a sequence of equal motion attribute values for some con-
secutive time points. As an example in Figure 5.5, object o2 moves with a constant
motion azimuth during the interval of [t2 ,t4 ].
Concurrence
A concurrence motion pattern captures the incidence of having multiple objects
with similar motion attributes. For example, in Figure 5.5, objects o1 , o2 and o3
move with the same motion azimuth at time t1 .
Trendsetter
This motion pattern attempts to nd objects that anticipate a certain motion pattern
that is shared by a set of other objects in future. Thus, this complex pattern combines
154 Hoyoung Jeung, Man Lung Yiu, and Christian S. Jensen
the simple patterns concurrence and constance. For example, o2 anticipates at t2 the
motion azimuth that is shared by all other objects at time t4 .
Based on the motion patterns in the set of patterns just covered, REMO identies
three important trajectory patterns that are all classied as spatial motion patterns.
This second set of motion patterns includes spatial constraints regarding the abso-
lute positions of the moving objects [40, 5], meaning that certain objects motions
appear within a spatial range (e.g., rectangle, circle, or ellipse) for some duration of
time. Therefore, these patterns capture objects that are geographically close to one
another, which is different from the basic motion patterns.
Figure 5.6 illustrates examples of the following three spatial motion patterns.
Each spatial constraint is a circle.
o1
o1
o2
o2 o2
o3
spatial constraint spatial constraint o3 spatial constraint
Track
Given a spatial range, e.g., a disc, a track motion pattern nds objects who trav-
el within the range while keeping the same motion. For instance, an airplane that
ies at constant speed and direction can be captured by the track motion pattern.
Essentially, track combines constance pattern and a spatial constraint.
Flock
The concept of ock pattern in REMO covers not only a group of animals that live,
travel, or feed together (e.g., a pride of lions, a school of sh, a gam of whales, a
gaggle of geese, a murder of crows, or a swarm of insects), but also a group or crowd
of people that move together.
In order to capture this concept using the basic motion patterns, the denition
of ock consists of the concurrence pattern combined with a spatial constraint.
5 Trajectory Pattern Mining 155
Intuitively, this patter may help identify groups of objects that travel together, i.e.,
within spatial proximity, for some duration of time.
Leadership
Leadership is a widespread phenomenon in social settings. In particular, the animal
behavior research community studies the general topic of group decision-making
in animals, searching for evidence for groups led in their activities by some domi-
nant individuals, e.g., dominant breeding wolves frequently show signicant frontal
leadership, leading the pack during travel.
The leadership pattern corresponds to the trendsetter pattern, but includes a
spatial constraint. For example, followers must lie within a given geographical re-
gion when they join the motion of the trendsetter. As a result, this pattern captures
well the case where a group of people are under the leadership of one person.
The third set of relative motion patterns describe aggregation and segregation of
objects movements.
Convergence
This pattern describes a set of m objects during a time interval k that share motion
azimuth vectors intersecting within a given spatial range, e.g., a disc with radius r.
This pattern captures the behavior of a group of objects that converge in a certain
region. An example of this pattern is wild animals that are heading in a synchronized
fashion for a mating place.
Encounter
Suppose that some antelopes distributed over a eld are heading for a location. At
some later time, they will thus meet at the location, according to their current mo-
tions. To capture such an extrapolated (future) meeting within a spatial range, the
encounter pattern is dened as a set of m objects that will arrive in a given spa-
tial range r concurrently k time points later (i.e., the extrapolations of the objects
current motions intersect with r).
Divergence
This pattern is an opposite concept of convergence, integrating a spatial diver-
gence pattern with the temporal constraint of a preceding meeting in a region. The
graphical representation of the divergence pattern is that of heading backwards
instead of forwards, relative to the direction of motion.
Breakup
Like the convergence pattern is an opposite concept of convergence, the con-
cept of breakup is an opposite of the concept of encounter. This pattern captures
objects behaviors, such as departing from a meeting point.
156 Hoyoung Jeung, Man Lung Yiu, and Christian S. Jensen
5.3.4 Discussion
Although the REMO patterns constitute important mining concepts for trajectory
data, they pose several open problems that should be addressed. We cover such
open problems briey.
In the REMO framework, it is difcult to determine an absolute distance be-
tween two objects because the pattern discovery process is performed over the
motion attributes (i.e. speed, change of speed, or motion azimuth) that are de-
rived from raw trajectories. As a result, some pattern analysis tasks, such as
nding the k nearest neighbor objects of a given object (trajectory), are difcult
to support in REMO.
Although the motion attributes in REMO encompass the objects speeds and
changes of speeds, the objects motions are mainly analyzed considering the
motion azimuths that capture the direction of a trajectory at a point in time. Full
motion analysis considering all the motion attributes simultaneously is indeed
not a simple task, but requires complex mechanisms and heavy computation.
The default motion azimuths in REMO consists of eight different angles. Using
a ner or coarser angle granularity would substantially impact the effectiveness
and efciency of trajectory pattern discovery. For example, the classication
of motion azimuths into only the two classes East and West would reveal a
lot of presumably meaningless constancy patterns. In contrast, every constancy
pattern found with 360 azimuth classes may be unnecessary for typical applica-
tions. It is non-trivial to determine an appropriate angle granularity for a given
trajectory data set.
During the detection of relative motion patterns, time intervals with uncertain
or missing data points may reduce the accuracy and effectiveness of pattern dis-
covery signicantly. In addition, the REMO framework assumes all trajectories
have the same sampling rate as the granularity used in the analysis task, which
may not hold for real-world trajectory data. Before employing the concept of
relative motion patterns, pre-processing steps are required (e.g., interpolating
missing samples and smoothing trajectories) in order to ensure a uniform time
granularity.
Built on the above principles, a rich body of studies have rened or redened
the original concepts and denitions of relative motion patterns. They have also
introduced a set of new pattern types, mainly based on the REMO concept.
We categorize these newly introduced patterns into two classes:
Prospective patterns that are likely to occur some time in the near future. This
class covers encounter and convergence.
Flock-based patterns that correspond to the original ock pattern of REMO.
This class includes redenitions of ock, meet, and leadership.
This section discusses in detail concepts that relate to these patterns.
Gudmundsson et al. [27] revisit the encounter and convergence patterns in RE-
MO, providing generic denitions based on the geometric arrangements of the mov-
ing objects. The resulting new patterns thus do not require the motion attributes in
the REMO framework. The new pattern denitions consider the future trajectories
of moving objects, meaning that the new encounter and convergence patterns
capture future events that are likely to occur, based on the current motions of mov-
ing objects. Specically, they are dened as follows.
Encounter (m, r)
Satised by a group of at least m objects that will arrive simultaneously in a disc
with radius r, assuming that they keep their current speeds and directions.
Convergence (m, r)
Satised by a group of at least m objects that will pass through a disc with radius r
158 Hoyoung Jeung, Man Lung Yiu, and Christian S. Jensen
(not necessarily at the same time), assuming that they keep their current movement
directions.
Figure 5.7 demonstrates the current and future trajectories obtained from ve ob-
jects o1 , o2 , o3 , o4 , and o5 . The arrows show the current positions and their current
motions, i.e., speed and direction; the dotted lines indicate the objects future trajec-
tories based on the current motions. According to the future trajectories, o2 , o3 , o4 ,
and o5 will pass the disc r, forming a convergence pattern if given an m that does
not exceed 45. If these objects arrive at r at the same time, they also satisfy the
encounter pattern with the same parameters.
R
R
R
U
R
R
Fig. 5.7 Examples of the encounter and convergence patterns.
Gudmundsson et al. [11, 27, 26, 3, 54] have studied extensions of the ock pat-
tern introduced by Laube et al. [39, 40] intensively. The studies have resulted in a
wide range of interesting trajectory pattern concepts and discovery techniques. This
section summarizes key ideas in relation to the extensions and variants of ock.
Flock (m, r, k)
In one study [11], two types of ock patterns are dened: one concerns continuous
object movement, while the other concerns discrete object movement. The latter is
widely used in database and data mining research. A discrete ock occurs if at least
m objects move together for at least k consecutive time points while staying within
a disc with radius r.
Based on this ock concept, two interesting variants, meet [11] and leader-
ship [5], are dened:
Meet (m, r, k)
A meet pattern occurs if at least m objects stay together in a stationary disc with
5 Trajectory Pattern Mining 159
radius r for at least k consecutive time points. Unlike the denition of ock, the disc
specied in meet has a xed location. Thus, the concept of meet resembles a past
variant of encounter.
Figure 5.8 illustrates the concepts of ock and meet. In Figure 5.8(a), a ock
of objects o1 , o2 , and o3 is found during the time points [t7 , t8 , and t9 , while the
meet pattern of objects o1 and o2 is identied during the time points t3 , . . . ,t8 (Fig-
ure 5.8(b)).
R
R
R
R
R R
Leadership (m, r, k)
Andersson et al. [4] present a clear concept and denition of a leadership pattern.
Their leadership pattern is essentially an extension of ock. Yet it captures the
spatial constraint of the leader being ahead of the followers. Formally, the pattern
occurs when a set of at least m objects move together for at least k consecutive time
points while staying within a disc with radius r, and when at least one of the objects
is/was heading in the leaders direction.
Andersson et al. [5] also introduce a variant of leadership where two new pa-
rameters are added to the denition of leadership. In Leadership (m, r, k, , ),
parameter inuences the spatial extent of a pattern, and parameter determines
the spatial characteristics of a pattern.
5.4.3 Discussion
The disc-based trajectory patterns are satised by groups of objects that move to-
gether within a disc with some user-specied extent. As a result, the chosen disc
extent has a substantial effect on the result of the discovery process. Although the
disc concept is intuitive, it raises potential problems when specifying trajectory pat-
terns, as discussed next.
160 Hoyoung Jeung, Man Lung Yiu, and Christian S. Jensen
The selection of a proper disc size turns out to be difcult, as situations can
occur where objects that intuitively belong together or do not belong together
are not quite within any disk of the given size or are within such a disk. In
Figure 5.9, for example, all objects travel together in a natural group. However,
object o4 does not enter the disc and is not discovered as a member of the ock.
This problem occurs because what constitutes a ock is very sensitive to the
user-specied disc size, which does not take the data distribution into account.
Indeed, if a ock must contain at least 4 objects, no ock would be found in this
example.
For some data sets, no single appropriate disc size may exist that works well for
all parts of the (space, time) domain. A herd of animals, for instance, consists
of individual that move together, but the herd may expand or contract over time.
This can not be captured by a xed-size disc.
The use of a circular shape may not always be appropriate. For example, sup-
pose that two different groups of cars move across a river and each group has a
long linear form along roads. A sufcient disc size for capturing one group may
also capture the other group as one ock. Ideally, no particular shape should be
xed apriori.
\
R
R
R
R
[
W
Fig. 5.9 Lossy-ock problem.
In order to avoid the size and shape restrictions inherent to disc-based trajectory pat-
terns, density-based trajectory patterns have been introduced. These employ density
concepts [22] that allow the capture of generic trajectory pattern of any shape and
any extent. In this section, we rst review the concept of density-based clustering
and then describe in detail the key concepts and denitions relating to density-based
trajectory patterns.
5 Trajectory Pattern Mining 161
o1 o7
o2 o3 o3
o5 o9
o4 o5 o4
o6 o6
o2
o7 o9
o8 o1
o8
DWLPHW
(a) time t1 EWLPHW
(b) time t2
Fig. 5.10 An example of a density-connected cluster.
162 Hoyoung Jeung, Man Lung Yiu, and Christian S. Jensen
Recently, a wide variety of clustering concepts and algorithms for trajectory data
have appeared in the literature. The different proposals generally assume different
data and application requirements, and they have different advantages and disadvan-
tages. In this section, we present a clear, systematic, and comprehensive overview
of recent works on the clustering of trajectories in order to offer a good foundation
for subsequent studies of trajectory pattern mining.
5.5.2.1 TRACLUS
Lee et al. introduce trajectory clustering [42] for the purpose of grouping trajectory
segments. Specically, they proposed a partition-and-group framework TRACLUS
that clusters trajectories in the following three steps:
Partitioning: each trajectory is partitioned into a set of line segments. This pro-
cess nds the points where the behavior of a trajectory changes, called its char-
acteristic points. The process adopts the minimum description length (MDL)
principle, which is used widely in information theory.
Grouping: trajectory segments that are close to each other according to a cer-
tain distance measure are grouped into a cluster. For this process, Lee et al.
dene a set of distance measures for trajectory segments (details are presented
in Section 5.6.1) that are used for density-based clustering using the DBSCAN
algorithm [22]. This allows the clusters of trajectories obtained by TRACLUS
to form any shape and size.
Representing: given a cluster , this process derives a representative trajectory for
the cluster that describes the overall movement of the trajectory partitions that
belong to the cluster. Basically, this process averages the lengths and angles of
the entire trajectory segments belonging to the cluster, thus constructing a new
trajectory segment, i.e., a representative trajectory.
Figure 5.11 illustrates the result of the above three processing steps of the
partition-and-group framework for trajectory clustering. The trajectory segments
shown in grey in Figure 5.11(b) denote those that are not included in the result clus-
ters c1 and c2 . The dotted line segments in each cluster in Figure 5.11(b) show the
representative trajectory segments of c1 and c2 .
5 Trajectory Pattern Mining 163
\ UHSUHVHQWDWLYH
WUDMHFWRULHV F
R
R R
F
R [
D E
Fig. 5.11 An example of trajectory clustering: (a) raw trajectories; (b) clustered trajectory seg-
ments.
Notice that TRACLUS does not consider the temporal aspects of the trajecto-
ries while partitioning and grouping trajectories. As a result, some objects can be-
long to the same group even though they have never traveled close together (i.e.,
traveled at the same time). That is, TRACLUS performs spatial trajectory pattern
clustering as opposed to spatio-temporal trajectory pattern clustering, as described
in Section 5.2.2.2.
Kalnis et al. introduce the concept of moving cluster [36] that is dened as a set of
objects that move close to each other for a time duration. It is a sequence of spatial
clusters appearing during consecutive time points, such that the portion of com-
mon objects in any two consecutive clusters is not below a given threshold , i.e.,
|ct ct+1 |
|ct c | , where ct denotes a cluster at time t. As an example, o1 , o2 , and o3 in
t+1
Figure 5.12 form a moving cluster if 34 (i.e., requiring at least 75% overlapping
objects between two consecutive clusters in time).
\
F F F R
R
VSDWLDOFOXVWHU R
R
[
W
Fig. 5.12 An example of moving cluster.
164 Hoyoung Jeung, Man Lung Yiu, and Christian S. Jensen
It is worth noticing that the concept of moving cluster is not effective at captur-
ing groups of objects that traveled together, since a moving cluster can be formed
as long as two snapshot clusters have at least overlap, regardless of which objects
traveled together from the beginning to the end of the trip.
5.5.2.3 Convoy
The concept of convoy [35, 33] employs the notion of density connection [22] in
order to enable the formulation of arbitrary shapes of groups. More specically,
given a set of trajectories O, an integer m, a distance value e, and a lifetime k, a
convoy is dened as a group that has at least m objects who are density-connected
with respect to distance e and cardinality m during k consecutive time points. Each
convoy is associated with a time interval during which the objects in the group
traveled together.
Figure 5.13 shows polylines that represent the trajectories of three objects o1 , o2 ,
and o3 , during the time interval from t1 to t4 . Consider the convoy specied by the
parameters m = 2 and k = 3 issued over the trajectories in the gure. The result is
o2 , o3 , [t1 ,t3 ], meaning that o2 and o3 form a convoy during the consecutive time
points from t1 to t3 .
2
W W 2
W
2
W
\
W GHQVLW\FRQQHFWHG [
\ \
F F R F R
F
R R
R R
R
R F
[ [ F
W
W
D E
Fig. 5.14 Comparison between moving cluster and convoy.
have supplemented the original concept. Aung and Tan [8] introduce two variants
of convoys: dynamic convoys allow their members to be absent briey during
the convoy lifetime, while evolving convoys are allowed to grow and shrink in
cardinality during their lifetimes, which reduces the number of convoys that have
large sets of overlapping objects and similar lifetimes.
In addition, Yoon and Shahabi [59] report that the original concept of convoy
may miss some convoys that still satisfy with the denition, when two separate con-
voys are merged into one larger, union convoy. To capture this case, they introduce
a variant of the convoy concept, termed a valid convoy.
5.5.2.4 Swarm
The convoy concept has a strict restriction regarding time: all convoy objects must
be together for all of the consecutive time points in a lifetime of their convoy. For ex-
ample, consider the group of moving objects o1 , o2 , o3 , and o4 shown in Figure 5.15,
where the rst three objects belong to the same cluster for three time points consid-
ered and where object o4 was apart from the others only during the second time
point. Due to the strict time constraint, o4 cannot belong to the same convoy as the
rst three objects although all the objects may be viewed as traveling together.
In order to overcome this drawback of convoy, Li et al. introduce a new trajec-
tory pattern type, swarm [44], that extends the concept of convoy by relaxing the
consecutive-time constraint. Specically, the denition of swarm replaces the pa-
rameter k of convoy with kmin , such that kmin denotes a minimum of time duration to
form a moving object cluster, regardless of the consecutiveness in time. This allows
an individual moving object to temporarily leave its group as long as it is close to
other group members for most of the time.
The concept of swarm is similar to that of dynamic convoy [8]; however, it dif-
fers in its discovery technique. swarm also has a denition similar to that of group
pattern [57] in the sense of identifying a group of objects that travel together while
166 Hoyoung Jeung, Man Lung Yiu, and Christian S. Jensen
\
F F F R
R
R
VKRUWWHUPGHYLDWLRQ R
[
W
Fig. 5.15 An example of a swarm.
5.5.3 Discussion
Table 5.2 summarizes the key features of each concept of moving object clustering.
We review distance functions for measuring the distance between two trajectories
and then examine techniques for the mining of patterns from trajectories.
We use the notation P1..n for a trajectory that consists of a sequence of time-
referenced point locations P1 , P2 , , Pn , where Pt is the point at time t (in the inter-
val [1, n]). A trajectory pattern mining task (e.g., trajectory clustering) often needs to
compute the closeness of two trajectories, which is captured by a distance func-
tion. We classify existing distance functions as global distance measures or local
distance measures. In the sequel, we consider measures in each class in turn and
discuss how the individual measures capture the characteristics of trajectories.
A global distance function denes the overall distance between two trajectories with
respect to all points in those trajectories.
Euclidean Distance
A simple approach to measuring the distance between two trajectories is to com-
pute the sum of the Euclidean distances between all corresponding pairs of point
locations in the two. This denition assumes that a pair of argument trajectories P
and Q have the same lengthi.e., they are sampled at the same times.
Specically, the Euclidean distance between such trajectories P1..n and Q1..n ,
DEuclid (P1..n , Q1..n ), is dened as the sum of their point distances at each sampling
time t, i.e.,
n
DEuclid (P1..n , Q1..n ) = ||Pt Qt || ,
t=1
In cases where only relative distances, not absolute distance, are important, the
squared Euclidean distance may be used as an alternative to the Euclidean distance.
The squared Euclidean distance preserves the ordering of the Euclidean distance
and is attractive because it is easier to compute.
Alignment-based Distance
The Euclidean distance measure is affected by noise and distortion that may ob-
scure a trajectory. Thus, it may be argued that the Euclidean distance is unable to
168 Hoyoung Jeung, Man Lung Yiu, and Christian S. Jensen
In the equation, P1..n1 denotes the sub-trajectory of P1..n that covers the time points
from 1 to n 1 only.
The dynamic time warping distance is not a metric, as it does not satisfy the
triangle inequality. In contrast, a recent, related measure called the Edit Distance on
Real sequence (EDR) [16] is a metric. It satises the triangle inequality, so it can be
exploited for pruning unnecessary trajectories effectively during query processing.
When compared to the above distance measures, the Longest Common SubSe-
quence measure (LCSS) [55] is more robust to noise. However, it requires the user
to specify two parameters and as tolerances for two points to match with respect
to time and space. This measure is dened by the recurrence equation next.
0 if n = 0 m = 0
1 + LCSS(P1..n1 , Q1..m1 ) if |n m|
LCSS(P1..n , Q1..m ) = ||Pn Qm ||
max{LCSS(P 1..n1 , Q1..m ), }
LCSS(P1..n , Q1..m1 ) otherwise
A recent distance measure called the Edit distance with Real Penalty (ERP) [15]
is also designed to handle noise and it is even better than LCSS.
Global distance measures capture the overall similarity between a pair of trajecto-
ries, not their local similarity during some short time interval. We proceed to con-
sider local distance functions that capture the similarity between sub-trajectories.
MBR-Based Distance
A commonly used trajectory distance measure is derived based on the use of Mini-
mum Bounding Rectangles (MBRs), which are often used to approximate trajectory
segments and provide fast computation of trajectory distances. Let B1 and B2 be the
MBR of the line segment L1 and L2 , respectively. The distance Dmin (B1 , B2 ) repre-
5 Trajectory Pattern Mining 169
sents the minimum distance between any pair of points in B1 and B2 . It is dened
as:
Dmin (B1 , B2 ) = ( (B1 .[xl , xu ], B2 .[xl , xu ]))2 + ( (B1 .[yl , yu ], B2 .[yl , yu ]))2 ,
Trajectory-Hausdorff Distance
Lee et al. [42] propose a distance function that is a weighted sum of three terms:
DHausdorff = w d + w d + w d ,
where w , w , and w are the weights of the following components. They suggest
that different applications may require different weights.
The aggregate perpendicular distance (d ) that measures the separation between
two trajectories. where d,a and d,b are two perpendicular distances between
The aggregate parallel distance (d ) that captures the difference in length be-
tween two trajectories.
The angular distance (d ) that reects the orientation difference between two
trajectories.
Figure 5.16 illustrates these distance components between two line segments L1 and
L2 . Specically, we have:
2 + d2
d,a ,b
d =
d,a + d,b
d = min{d,a , d,b }
d = L2 sin
where d,a , d,b are two perpendicular distances between L1 and L2 , d,a , d,b are
two parallel distances between L1 and L2 , and is the angle between L1 and L2 .
Trajectory-Segment Distance
Jeung et al. [35] use two simple measures as the distance between two trajecto-
ry segments l1 and l2 . These measures are designed to support efcient trajectory
clustering.
The line distance DLL (, ) is simply the shortest distance Euclidean distance be-
tween a pair of points located on the two argument line segments, and it is thus
dened as follows.
DLL (l1 , l2 ) = min
||pi b j ||
pi l1 ,b j l2
170 Hoyoung Jeung, Man Lung Yiu, and Christian S. Jensen
d//,a
dA,a
L2
T
L1 dA,b
d//,b
Figure 5.17(a) shows two line segments l1 and l2 . Here, l1 has the endpoints p1
and p4 , corresponding to its locations at times t1 and t4 . Similarly, l2 has endpoints
b3 and b5 , for its locations at times t3 and t5 . The shortest distance between l1 and
l2 is given by DLL (l1 , l2 ). Note that this distance is purely spatial and ignores the
temporal dimension.
&3$WLPH O
O
S
S
S
S
'//
O
O
'
O
O
E
O
E
E
O
E
D E
Fig. 5.17 Trajectory-segment distance examples.
In the example in Figure 5.17(b), the tightened distance D (l1 , l2 ) is the distance
between the locations l1 (3) and l2 (3), which are the derived locations of the two
trajectories at time 3.
It is possible to compute the tightened distance D (l1 , l2 ) efciently. Let l p =
{pu , pv } be a line segment having a time interval l p . = [u, v]. The location of a
point l p in the segment as of time t [u, v] is dened as:
t u
l p (t) = pu + (pv pu )
vu
5 Trajectory Pattern Mining 171
Note that the terms l p (t), pu , and (pv pu ) are 2D vectors representing locations.
We then introduce the Closest Point of Approach time, called the CPA time (tCPA )
[6]. This is the time when the distance between two dynamic objects is the shortest,
considering their velocities. Let lq = {qw , qz } be another line segment during lq . =
[w, z]. The CPA time for l p and lq is computed by:
hen the time intervals of the two argument segments do not intersect, i.e., l1 .
l2 . = 0,
/ their distance is .
The above equation can be expressed as a quadratic equation of t, and its mini-
mum value can be found in constant time, regardless of the length of the common
time interval l1 . l2 ..
Observe that D (l1 , l2 ) is longer than DLL (l1 , l2 ); hence, the line segments in
Figure 5.17(b) have a lower probability of forming a cluster than do those in Fig-
ure 5.17(a). The tightened distance bounds thus improve the effectiveness of a l-
tering step that is applied as part of trajectory clustering.
change of speed, or motion azimuth). The REMO framework then uses the REMO
matrix to identify notable individual motion behaviors as well as events of distinct
group motion behavior, e.g., patterns like constancy, concurrence, and trend-
setter as discussed in Section 5.3.
Table 5.3 illustrates an example of a REMO matrix that supports efcient dis-
covery of patterns as illustrated by the following examples.
The constancy pattern appears as a consecutive row of identical values, e.g.,
object o1 from time t1 to t4 .
The concurrence pattern appears as a column (not necessarily consecutive) of
identical values, e.g., objects o2 , o3 , o4 at time t2 .
The trend-setter pattern is a constancy pattern followed by a concurrence pat-
tern, e.g., object o4 from time t4 to t6 , then objects o4 , o5 , o6 at time t6 .
t1 t2 t3 t4 t5 t6
o1
o2
o3
o4
o5
o6
Table 5.3 An example REMO matrix.
In this approach, raw data is approximated and transformed into an analysis for-
mat (i.e., the motion matrix) optimized for pattern discovery. This accelerates the
pattern discovery process substantially when compared with directly accessing raw
trajectory data to retrieve relative motion patterns.
Trajectory Simplication
The work on convoy discovery [35, 33] applies the lter-and-renement paradigm
in order to reduce the overall computational cost. In the ltering step, the original
trajectories are simplied and a clustering algorithm is applied on the simplied
trajectories in order to obtain convoy candidates. The goal is to retrieve efciently
a superset of the actual convoys. In the renement step, each candidate convoy is
considered in turn, and clustering is performed on the original trajectories of the
objects involved so as to determine whether they indeed form an actual convoy.
Specically, given a trajectory represented as a polyline o = p1 , p2 , , pT , and
a simplication tolerance , the Douglas-Peucker algorithm (DP) [20] is applied to
derive a simplied trajectory o such that o has fewer points and o deviates from o
by at most at any point. Initially, DP composes the line p1 pT and nds the point
pi o farthest from the line. If the distance DPL (pi , p1 pT ) , then the segment
p1 pT is reported as the simplied trajectory o . Otherwise, DP recursively exam-
ines the sub-trajectories p1 , , pi and pi , , pT , reporting the concatenation of
their simplied trajectories as the simplied trajectory o . Figure 5.18(a) illustrates
5 Trajectory Pattern Mining 173
three original trajectories. Their simplied trajectories (by using DP) are shown in
Figure 5.18(b).
2 2
W W 2 W W 2
W 2 W 2
W W
\ \
W [ W [
D E
Fig. 5.18 An example of trajectory simplication.
5.6.2.2 Indexing
The Apriori approach has been applied to discover trajectory patterns efcient-
ly [57, 44]. First, some (short) candidate trajectory patterns are generated, and their
frequencies are counted by scanning the trajectory database. Then unpromising pat-
terns (with low frequencies) are removed from consideration. The remaining can-
didates are combined together to form larger candidate patterns. This process is
repeated until no further candidates are generated. The Apriori approach is able to
174 Hoyoung Jeung, Man Lung Yiu, and Christian S. Jensen
reduce the search space signicantly in the rst few iterations, allowing trajectory
patterns to be mined efciently.
5.7 Summary
References
13. Brinkhoff, T., Kriegel, H.P., Seeger, B.: Efcient processing of spatial joins using r-trees. In:
SIGMOD Conference, pp. 237246 (1993)
14. Cao, H., Mamoulis, N., Cheung, D.W.: Discovery of periodic patterns in spatiotemporal se-
quences. TJDE 19, 453467 (2007)
15. Chen, L., Ng, R.: On the marriage of lp-norms and edit distance. In: Proceedings of the
international conference on Very large data bases, pp. 792803 (2004)
16. Chen, L., Ozsu, M.T., Oria, V.: Robust and fast similarity search for moving object trajectories.
In: Proceedings of the ACM SIGMOD international conference on Management of data, pp.
491502 (2005)
17. Chen, Y., Patel, J.M.: Design and evaluation of trajectory join algorithms. In: GIS, pp. 266
275 (2009)
18. Chen, Z., Shen, H.T., Zhou, X.: Discovering popular routes from trajectories. In: ICDE, pp.
900911 (2011)
19. Dodge, S., Weibel, R., Lautenschutz, A.K.: Towards a taxonomy of movement patterns. In-
formation Visualization 7, 240252 (2008)
20. Douglas, D., Peucker, T.K.: Algorithms for the reduction of the number of points required to
represent a line or its character. The American Cartographer 10(42), 112123 (1973)
21. Eppstein, D., Goodrich, M.T., Sun, J.Z.: The skip quadtree: a simple dynamic data structure
for multidimensional data. In: SCG, pp. 296305 (2005)
22. Ester, M., Kriegel, H.P., Sander, J., Xu, X.: A density-based algorithm for discovering clusters
in large spatial databases with noise. In: Proceedings of the ACM SIGKDD International
Conference on Knowledge Discovery and Data Mining, pp. 226231 (1996)
23. Frank, A., Raper, J., Cheylan, J.P.: Life and motion of spatial socio-economic units. Taylor &
Francis, London (2001)
24. Gaffney, S., Smyth, P.: Trajectory clustering with mixtures of regression models. In: KDD,
pp. 6372 (1999)
25. Gidofalvi, G., Pedersen, T.B.: Cab-sharing: An effective, door-to-door, on-demand transporta-
tion service. In: Proceedings of the 6th European Congress on Intelligent Transport Systems
and Services (2007)
26. Gudmundsson, J., van Kreveld, M.: Computing longest duration ocks in trajectory data. In:
Proceedings of the ACM international symposium on Advances in geographic information
systems, pp. 3542 (2006)
27. Gudmundsson, J., van Kreveld, M., Speckmann, B.: Efcient detection of motion patterns in
spatio-temporal data sets. In: Proceedings of the ACM international symposium on Advances
in geographic information systems, pp. 250257 (2004)
28. Hadjieleftheriou, M., Kollios, G., Bakalov, P., Tsotras, V.J.: Complex spatio-temporal pattern
queries. In: VLDB, pp. 877888 (2005)
29. Han, J., Li, Z., Tang, L.A.: Mining moving object, trajectory and trafc data. In: DASFAA,
pp. 485486 (2010)
30. Iwase, S., Saito, H.: Tracking soccer player using multiple views. In: Proceedings of the IAPR
Workshop on Machine Vision Applications (2002)
31. Jeong, S.H., Paton, N.W., Fernandes, A.A., Grifths, T.: An experimental performance
evaluation of spatiotemporal join strategies. Transactions in GIS 9(2), 129156 (2005)
32. Jeung, H., Liu, Q., Shen, H.T., Zhou, X.: A hybrid prediction model for moving objects. In:
ICDE, pp. 7079 (2008)
33. Jeung, H., Shen, H.T., Zhou, X.: Convoy queries in spatio-temporal databases. In: Proceedings
of the IEEE International Conference on Data Engineering, pp. 14571459 (2008)
34. Jeung, H., Yiu, M.L., Zhou, X., Jensen, C.S.: Path prediction and predictive range querying in
road network databases. The VLDB Journal 19(4), 585602 (2010)
35. Jeung, H., Yiu, M.L., Zhou, X., Jensen, C.S., Shen, H.T.: Discovery of convoys in trajectory
databases. Proceedings of the VLDB Endowment 1(1), 10681080 (2008)
36. Kalnis, P., Mamoulis, N., Bakiras, S.: On discovering moving clusters in spatio-temporal data.
In: Proceedings of the International Symposium on Spatial and Temporal Databases, pp. 364
381 (2005)
176 Hoyoung Jeung, Man Lung Yiu, and Christian S. Jensen
37. Karimi, H.A., Liu, X.: A predictive location model for location-based services. In: Proceed-
ings of the ACM International Symposium on Advances in Geographic Information Systems,
pp. 126133 (2003)
38. Laube, P., Imfeld, S.: Analyzing relative motion within groups of trackable moving point
objects. In: GIScience, pp. 132144 (2002)
39. Laube, P., Imfeld, S., Weibel, R.: Discovering relative motion patterns in groups of mov-
ing point objects. International Journal of Geographical Information Science 19(6), 639668
(2005)
40. Laube, P., van Kreveld, M., Imfeld, S.: Finding remo - detecting relative motion patterns in
geospatial lifelines. In: Proceedings of the International Symposium on Spatial Data Handling,
pp. 201214 (2004)
41. Laube, P., Purves, R.S.: An approach to evaluating motion pattern detection techniques in
spatio-temporal data. Computers, Environment and Urban Systems 30(3), 347374 (2006)
42. Lee, J., Han, J., Whang, K.: Trajectory clustering: a partition-and-group framework. In: Pro-
ceedings of the ACM SIGMOD international conference on Management of data, pp. 593604
(2007)
43. Lee, J.G., Han, J., Li, X., Gonzalez, H.: TraClass: trajectory classication using hierarchical
region-based and trajectory-based clustering. PVLDB 1(1), 10811094 (2008)
44. Li, Z., Ding, B., Han, J., Kays, R.: Swarm: mining relaxed temporal moving object clusters.
PVLDB 3, 723734 (2010)
45. Li, Z., Ding, B., Han, J., Kays, R., Nye, P.: Mining periodic behaviors for moving objects. In:
SIGKDD, pp. 10991108 (2010)
46. Li, Z., Ji, M., Lee, J.G., Tang, L.A., Yu, Y., Han, J., Kays, R.: MoveMine: Mining moving
object databases. In: Proceedings of the ACM SIGMOD international conference on Manage-
ment of data, pp. 12031206 (2010)
47. Mamoulis, N., Cao, H., Kollios, G., Hadjieleftheriou, M., Tao, Y., Cheung, D.W.: Mining,
indexing, and querying historical spatiotemporal data. In: Proceedings of the ACM SIGKDD
International Conference on Knowledge Discovery and Data Mining, pp. 236245 (2004)
48. Sakr, M.A., Shams, A.: Spatiotemporal pattern queries. Geoinformatica 14 (2010)
49. Samet, H.: Foundations of Multidimensional and Metric Data Structures (The Morgan Kauf-
mann Series in Computer Graphics and Geometric Modeling). Morgan Kaufmann Publishers
Inc. (2005)
50. Sumpter, N., Bulpitt, A.: Learning spatio-temporal patterns for predicting object behaviour.
Image Vision Computing 18, 697V704 (2000)
51. Tao, Y., Faloutsos, C., Papadias, D., Liu, B.: Prediction and indexing of moving objects with
unknown motion patterns. In: Proceedings of the ACM SIGMOD International Conference
on Management of Data, pp. 611622 (2004)
52. Tao, Y., Papadias, D., Sun, J.: The tpr*-tree: An optimized spatio-temporal access method for
predictive queries. In: Proceedings of the International Conference on Very Large Data Bases,
pp. 790801 (2003)
53. Tao, Y., Sun, J., Papadias, D.: Analysis of predictive spatio-temporal queries. ACM Transac-
tion on Database Systems 28(4), 295336 (2003)
54. Vieira, M.R., Bakalov, P., Tsotras, V.J.: On-line discovery of ock patterns in spatio-temporal
data. In: Proceedings of the 17th ACM SIGSPATIAL International Conference on Advances
in Geographic Information Systems, pp. 286295 (2009)
55. Vlachos, M., Gunopoulos, D., Kollios, G.: Discovering similar multidimensional trajecto-
ries. In: Proceedings of the IEEE International Conference on Data Engineering, pp. 673684
(2002)
56. Saltenis, S., Jensen, C.S., Leutenegger, S.T., Lopez, M.A.: Indexing the positions of contin-
uously moving objects. In: Proceedings of the ACM SIGMOD International Conference on
Management of Data, pp. 331342 (2000)
57. Wang, Y., Lim, E.P., Hwang, S.Y.: Efcient mining of group patterns from user movement
data. DKE 57, 240282 (2006)
5 Trajectory Pattern Mining 177
58. Yi, B.K., Jagadish, H.V., Faloutsos, C.: Efcient retrieval of similar time sequences under
time warping. In: Proceedings of the IEEE International Conference on Data Engineering, pp.
201208 (1998)
59. Yoon, H., Shahabi, C.: Accurate discovery of valid convoys from moving object trajectories.
In: IEEE International Conference on Data Mining Workshops, pp. 636643 (2009)
60. Zheng, K., Trajcevski, G., Zhou, X., Scheuermann, P.: Probabilistic range queries for uncertain
trajectories on road networks. In: EDBT, pp. 283294 (2011)
61. Zhou, P., Zhang, D., Salzberg, B., Cooperman, G., Kollios, G.: Close pair queries in mov-
ing object databases. In: Proceedings of the ACM international symposium on Advances in
geographic information systems, pp. 211 (2005)
Chapter 6
Activity Recognition from Trajectory Data
6.1 Introduction
Mining the activities and patterns from the moving objects trajectory data is an
important challenge in todays society. This problem is becoming increasingly nec-
essary as we accumulate large amounts of trajectory data in our daily lives. Recent
development of social networks and maturing sensing technologies makes it possi-
ble to record sequences of location related data. Activity information hidden in these
data can power services such as location-based recommendation systems, e-health
and intelligent transportation. Activity recognition is a process to extract high-level
activity and goal related information from low-level sensor readings through ma-
179
180 Yin Zhu, Vincent Wenchen Zheng and Qiang Yang
chine learning and data mining techniques. In this survey, we review and summa-
rize existing literature on trajectory-based activity recognition, and project into the
future in this active research area.
A natural categorization of trajectory-based activity recognition can be done by
considering the different levels in which we place the activities. First, at the low-
est level, we consider location-estimation techniques that take into sensor readings
and produces estimates on the objects locations. This layer provides the important
information input for the further activity recognition. Second, we survey represen-
tative methods that can determine trajectory segments, transportation modes and
activities. The target output includes actions and goals. At the third level, we con-
sider various applications that can be built based on activity data. Figure 6.1 shows
a process view of these three levels.
1 http://research.microsoft.com/jump/79442
6 Activity Recognition from Trajectory Data 181
much manual effort is saved and mistakes avoided. Activity recognition also serves
as an important component for higher-level applications in the GeoLife system. For
example, a main goal of Geolife is to provide a trajectory sharing system that con-
nects people using their trajectories as a medium. Transportation modes and other
activities on the trajectories can be strong indicators for the similarity among peo-
ple. This reveals another aspect of activity recognition: activity recognition serves
as an important embedded component for other applications.
In this chapter, we consider trajectory-based activity recognition as a task that
takes the sequences of sensor readings and context as input, and produces predic-
tions of actions, goals, and plans. In particular, we rst introduce location estimation
techniques and focus on learning-based models. Then we consider various forms of
activity recognition from trajectory data. We classify the current work into different
categories, and survey existing research work under each category. We also present
our views into the future.
Before inferring activities for moving objects, we need to get their trajectory as a
sequence of locations. In this section, we review location estimation techniques. In
general, there are two categories of location estimation methods, including propa-
gation models and learning based models.
Global Positioning System (GPS) is the most widely used positing system in out-
door environments. It is based on a global navigation satellite system with at least
24 geo-synchronized satellites. A GPS receiver with four or more satellites in sight
is able to know its location on the earth. In particular, the signal received from each
satellite includes two pieces of information, including the coordinate of the satellite
and the time stamp when the package is sent out. The distance between the GPS
receiver and the satellite can be calculated by using the time difference between the
sending time stamp and the receiving time stamp. After the GPS receiver knows
the distances to four satellites, its location could be calculated by solving a distance
equation system with three known parameters (latitude, longitude and altitude). This
mathematical procedure is also called trilateration, where numerical root nding al-
gorithms such as Newton-Raphson [4] are often used. The positioning accuracy for
GPS can reach ten meters in an open area [14]. It is more accurate in an open area,
and less accurate in cities with tall buildings. Because walls and other barriers block
the satellite signals, GPS usually does not work in indoor environments. Besides G-
182 Yin Zhu, Vincent Wenchen Zheng and Qiang Yang
PS, there are also some other similar satellite positioning systems, such as Beidou2
from China, and Galileo3 from the European Union.
Though the GPS system is easy to use and relatively accurate in outdoor envi-
ronments, it has obvious disadvantages. Most notably, it has difculty working in
indoor environments where signals from satellites are blocked or weakened. Other
outdoor location estimation systems include GSM based localization, which uses
cell-towers and their positions as basis for propagation model calculation.
Since GPS hardly works in the indoor environment, researchers have considered al-
ternative methods that work indoors and other complex environments. Among these
methods, WiFi localization [1, 19] is one of the most mature and widely adopt-
ed solutions in research and practice. Even though, in theory, radio signal strength
from a WiFi access point decays linearly with log distance, which allows a triangu-
lation based method to identify the client mobile devices, in practice, it is difcult
to obtain an accurate signal-propagation model in an indoor environment. This is
because the physical characteristics of an environment, such as walls, furniture and
even human activities, add signicant noise to radio signal strength measurements.
One particular problem in indoor environment is that the signals can reect on the
surfaces of certain materials, such as some walls. That means the signal strength the
device receives is highly dependent on the local environment where the WiFi access
points and the receiving device are. This scenario is referred to as the multiple path
problem [1].
One intuitive idea to tackle this problem is to remember the signal strength be-
havior at different places in the environment, and train a learning-based method on
these data. This method is commonly referred to as the ngerprinting technique.
The following is an example illustrating this basic idea. When at place A, the device
remembers the signal strength pattern. When this device arrives at A again, it knows
that the scanned signal is most similar to one that is stored before. Therefore the
device is able to infer its current location. However, there is much to be improved in
this setting, e.g. how to collect fewer labeled points and achieve at the same accu-
racy, how to utilize the oor structure, and how to deal with the instability of WiFi
signals.
A WiFi-enabled device, e.g. a laptop or a smartphone, can usually receive signals
from multiple access points, which are installed at xed positions in the environ-
ment, although their absolute positions may not be known. A WiFi access point is
uniquely identied by its Media Access Control address (MAC address). The signal
strength is called radio signal strength (RSS), which is a value usually spans from
-120 dBm to -50 dBm. Once a mobile device scans the WiFi nearby, it gets a list of
2 http://www.beidou.gov.cn/
3 http://www.esa.int/esaNA/galileo.html
6 Activity Recognition from Trajectory Data 183
access points and the signal strength values to them. These received signal strength
values can be represented as a vector x Rd , where d is the number of total access
points and x j is the RSS to the j-th access point. The ngerprints can be formally
represented as a signal strength data set with locations as their labels X = {xi , yi }Ni=1 ,
where N is the total number of data examples. yi denotes a location, which can be a
discrete label indicating a block in an environment or a continuous coordinate pair
such as (p, q) R2 in the 2-D case. There are some public WiFi data sets that can be
used for indoor localization study. For example, one collection of data is provided
by the IEEE 2007 ICDM data mining contest [43]. It contains a set of 5, 333 nger-
print points collected from 247 locations in an ofce area of the HKUST academic
building.
RADAR [1] is one of the earliest system on WiFi localization. This project started
as a localization system using only triangulation. But the multi-path problems led
the researchers to use a ngerprint or learning-based method, which later became
successful and highly inuential. RADAR works in a test bed which is a 43.5m by
22.5m ofce area as shown in Figure 6.2. There are three base stations BS1, BS2
and BS3, which are similar to WiFi access points. A laptop is used as the mobile
device to collect labeled signal strength at each location. Besides the signal strength
SS, the device used in this project also uses one more strength called the signal-to-
noise-ratio (SNR). For each location point (lx , ly ) and each facing direction of the
person holding the laptop d {N, E, S,W }, at least 20 pairs of SS and SNR to the
three base stations are collected.
An important data preprocessing step in the RADAR system is that, it uses mean,
standard deviation, and median of the signal strength values at each location for the
location. After this, the data become less noisy. The data set contains many data
tuples, each of which is represented as (lx , ly , d, ssi , snri ) with i = 1, 2, 3. ssi and snri
are the mean values averaged over all the signal points collected under (lx , ly , d). The
proposed location estimation method is based on nearest-neighbor search. A signal
vector is matched to the nearest ngerprint vector sets in the feature space given
some distance measure. Since these ngerprint points are already labeled, their lo-
cation labels are used by average to predict the test signal vectors location. RADAR
is an important early localization system with the meter-level accuracy, and it sup-
ports both learning-based method and radio propagation method for localization.
Ladd et al. provide a major improvement to the RADAR system by further reduc-
ing the localization error to one meter for a similar test bed [19]. They propose a
Bayesian model for indoor localization. Assume that the indoor space consists of
n location states S = {s1 , , sn }, where each state represents a location coordinate
184 Yin Zhu, Vincent Wenchen Zheng and Qiang Yang
(lx , ly ) with the facing direction d of the mobile user who holds a laptop in data col-
lection. Given an observation o from a WiFi scan, the probability that it belongs to
a state s j is calculated as:
N N
P(o|s j ) = P( f j |si ) P( j |b j , si ) ,
j=1 j=1
where P( f j |si ) is the probability that the frequency for j-th WiFi access points
frequency count f j . P( j |b j , si ) measures the probability of received signal strength
j given the access point b j and the state si . With this likelihood formula, one can
calculate the posterior probability of the observation o on the location states:
P(si ) P(o|si )
P(si |o) = .
j=1 P(si ) P(o|si )
n
Ladd et al. further improve this Bayesian prediction by using the sequential con-
straints with a Hidden Markov Model (HMM) [34]. In practice, two consecutive
6 Activity Recognition from Trajectory Data 185
locations in an objects spatial trajectory are close to each other. Such a constraint
can be naturally encoded in the HMM model as state transitions. An HMM is a state
transition model P(si |s j ) with observations P(o|s). Given a sequence of observation-
s, the states are hidden variables. The inference process gives the most probable state
sequences, which is known as decoding. At inference time, observations and hidden
states are both location states. HMM decoding is used as a smoothing procedure. In
most applications, observations and hidden states are different. For example, sen-
sor readings are the observations and the unknown activities are the hidden states.
Other techniques such as Kalman lters and particle lters [37] are can also be used
to model such sequential information. Interested readers are referred to Chapter 9
of [18] and [9, 8] for more details. The experimental results from this improved
system also validate that using an HMM for post processing the predicted location
states improves the error by 40%.
6.2.2.3 Summary
There are several directions to improve the above WiFi localization systems. For ex-
ample, Pan et al. [31] present a manifold based method to recover both the mobile-
device locations and the access point locations from labeled and unlabeled trajecto-
ries. Because unlabeled signal points are much easier to collect, this semi-supervised
approach also reduces the manual labeling effort. One observation is that mobile de-
vices and access points are spatially close to each other if their signal vectors are
similar on some manifold structure. An illustration of the experimental result is
shown in Figure 6.3. With only a few labeled WiFi signal points, the structure of the
ofce area can be discovered by using many other unlabeled WiFi trajectories.
Fig. 6.3 Indoor environment layout and the manifold learning result in [31].
There has also been some work that uses additional sources such as signal snif-
fers with known locations or GPS to automatically annotate the data. For example,
LANDMARC [30] is an indoor localization system that uses RFID sensors as refer-
186 Yin Zhu, Vincent Wenchen Zheng and Qiang Yang
ence points, whose locations are known. They are used to collect signal calibration
data. The VTrack system [39] can use GPS to calibrate a WiFi localization system
for outdoor usage. GPS is believed to be accurate in an outdoor environment. But
there are cases where GPS is temporarily unavailable or the mobile device is forced
to turn off GPS to save energy. Commercial systems such as Google WiFi localiza-
tion and Skyhook also use the similar techniques. Table 6.1 compares the different
learning-based localization methods regarding their calibration algorithms and the
methods to collect labeled data.
After getting the spatial trajectories, we need to build models to extract useful ac-
tivity information from them. In this chapter, we categorize the existing work for
trajectory-based activity recognition along two possible dimensions.
The rst dimension is the user dimension, where we categorize the existing
work into single-user activity recognition and multi-user activity recogni-
tion. In particular, these two categories differ on whether the trajectory data are
collected by multiple users and the user difference is modeled. If a model us-
es multiple users data and considers the difference among the users in training
the activity recognition model, then it belongs to multi-user activity recognition.
Otherwise, it belongs to the single-user activity recognition category. Most of
the existing work goes to the single-user activity recognition category, but we
see a growing trend of multi-user activity recognition in the recent years as there
are more and more users activity data accumulate.
The second dimension is the learning method dimension. Most of the exist-
ing work uses machine learning or data mining for activity recognition. For
example, supervised learning methods use the trajectory data labeled with a
predened set of activity labels for training an activity recognition model. Un-
supervised learning and frequent pattern mining methods aim to extract useful
activity patterns directly from the trajectory data.
There are also some other possible criteria to categorize the existing trajectory-based
activity recognition work, including venue (e.g. indoor and outdoor), sensors (e.g.
6 Activity Recognition from Trajectory Data 187
GPS, WiFi, cameras.), etc. However, the categories generated by using these cri-
teria may not be mutually exclusive to each other. For example, an activity model
that works in indoor environments may also work in outdoor environments. There-
fore, we do not take these criteria into account, and only focus the user and learning
method dimensions in categorization. We list some existing work that falls into these
two categories in Table 6.2. In the following sections, we shall introduce some repre-
sentative work within each category, and hopefully shed some light on the emerging
research directions.
Sequence information is important in modeling the trajectory data for activity recog-
nition. For example, Zheng et al. propose to use decision tree and sequence smooth-
ing to detect a mobile users transportation mode, such as Drive, Bus, Bike
and Walk, based on her GPS trajectory [47]. In order to predict the transportation
modes, a GPS trajectory is segmented into a sequence of x-sized time slices. With-
in each time slice t, raw GPS points denoted as latitude and longitude coordinates
are used to calculate some features for a feature vector xt , such as
188 Yin Zhu, Vincent Wenchen Zheng and Qiang Yang
Heading change rate measures the percentage of GPS points in a window that
change their heading directions. As shown in Figure 6.4, for example, being
constrained by the road, people driving a car or taking a bus cannot change their
heading directions as exible as if they are walking or cycling. Such heading
direction changes can be different for different transportation modes.
Stop rate measures the percentage of GPS points whose velocity values to their
previous points are less than a threshold. This feature is inspired by the heuristic
that the stop rate is usually higher for walking and lower for driving or taking a
bus. Besides, a bus could also take more stops than a car, and thus taking a bus
still has a higher stop rate than driving.
Velocity change rate measures the percentage of GPS points with a velocity
change percentage above a certain threshold within a unit distance as shown
in Figure 6.5. This feature, together with the stop rate above, can be used to
differentiate the transportation modes.
After the features xt are extracted for each time slice, a decision tree is applied
rst to predict the transportation mode denoted as yt {Drive, Bus, Bike,Walk} in
it. As such decision tree model does not take the sequence information into account,
Zheng et al. further propose to model the location transition probability so that, if
6 Activity Recognition from Trajectory Data 189
two locations have high transition probability value, then the transportation modes
for a mobile user to travel from one location to the other can be more consisten-
t. Such location transition probabilities can be learned by clustering on the given
GPS trajectory data in training. Finally, sequence smoothing is used to adjust pos-
sible misclassication in the inference step. The experimental results show that the
systems overall accuracy archives 76.2% over the four transportation modes.
The proposed decision tree with sequence smoothing model can be seen as a vari-
ant of the Hidden Markov Model introduced in Section 6.2.2.2, except HMM learns
the state emission probability p(xt |yt ) and the state transition probability p(yt+1 |yt )
at the same time. HMM is also extensively used in trajectory-based activity recog-
nition. For example, HMM can be used to predict the taxis activity state such as
occupied and non-occupied. In particular, a taxis GPS trajectory is segmented in-
to a sequence of time slices. At each time slice, similar to the above mentioned
transportation mode detection algorithm, some features such as the point-of-interest
information around the trajectory, taxi velocity and heading change rate are extract-
ed. Then, an HMM is used to formulate the taxi state transition probabilities and the
state emission probabilities. An overall recognition accuracy of 75% is observed by
using HMM, and it is close to the recognition accuracy from some human experts.
Fig. 6.6 The DBN + N-Gram model for activity recognition [44].
Fig. 6.7 The map for the ofce area of HKUST CSE department [45].
where the conditional probability P(A1:t |Gk ) can be simplied with a N-gram mod-
el:
Hence, an action At only depends on the goal G and its previous actions At1 , At2 ,
. . . , Atn+1 . When n = 2, the Bigram model is as follows:
T
G = argmax P(Gk )P(A1 |G) P(Ai |Ai1 , Gk ).
Gk i=2
Fig. 6.8 Recognizing activities and signicant places from the GPS trajectories.
As shown in Figure 6.8, Liao et al. show that they can employ a hierarchical
model for location-based activity recognition. There are three levels in the model:
GPS trajectories are sequences of some latitude and longitude coordinates in
the map. As the raw GPS points can be noisy and less informative, a map-
matching algorithm based on linear-chain CRF is employed to group the con-
secutive raw GPS points within every 10 meters into some segment, and further
align it to some street patch in the map. Later, these street patches are used for
feature extraction in recognizing the activities and signicant places.
Activities are estimated for the street patches obtained from the segmented G-
PS trajectory. The activities such as walk, drive and sleep, after being
recognized, are further used to infer the signicant places.
Signicant places are those locations that play a signicant role in the activi-
ties of a person. Such places include a persons home and work place, the bus
stops and parking lots the person typically uses, the homes of friends, stores the
person frequently shops in, and so on.
192 Yin Zhu, Vincent Wenchen Zheng and Qiang Yang
The whole activity and signicant place recognition task is decomposed into two
sub-tasks, including a map matching process which groups the raw GPS data in-
to some informative street patches, and a joint recognition process which detects
the activities and the signicant places together from the trajectory data. In each
subtask, a CRF model is employed to formulate the dependencies among the GPS
trajectory features and the hidden variables of activities and signicant places.
Fig. 6.9 Three types of features functions designed for map matching.
In particular, three types of feature functions are designed for this map matching
subtask:
Measurement feature function formulates the distance between a street patch
sT 1 and a GPS point gT 1 for some time moment t = T 1, as shown in the
dark grey part in the gure:
|gt st |2
fmeas (gt , st ) = ,
2
where sigma > 0 is used to control the scale of the distance. Generally, if the
GPS point gt is closer to the street patch center st , then the distance fmeas is
smaller.
Consistency feature function captures the temporal consistency of sequential
GPS points, as shown in the light grey part in the gure:
This feature means that, if two GPS points (gt+1 and gt ) are close, their associ-
ated street patches (st+1 and st ) should be close too.
Smoothness feature function constrain two consecutive street patches to be
consistent, as shown in the medium grey part in the gure:
fsmooth (st , st+1 ) = (st .street, st+1 .street) (st .direction, st+1 .direction),
Fig. 6.10 The CRF for activity and signicant place recognition [24].
Summary
Clustering Methods
One intuitive unsupervised learning model is clustering, which can uncover struc-
ture in a set of data examples by grouping them according to some distance metric.
Clustering methods are also used in activity recognition. For example, Huynh et al.
6 Activity Recognition from Trajectory Data 195
|Ci, j |
Pi, j = ,
j |Ci, j
where Ci, j is the set of examples in cluster i labeled with activity j. The cluster
precision for activity j is dened as the weighted sum over different clusters:
i pi, j |Ci, j |
pj = .
i |Ci, j |
If an activity has a cluster precision close to one, this indicates that there are many
clusters mainly consisting of samples for this activity. Therefore, such a clustering
process can help to decide which features to use for further activity recognition.
The MIT RealityMining project [11] aims to model conversation context, proxim-
ity sensing, and temporospatial location throughout large communities of individ-
uals. Among others, it provides a very valuable dataset, which contains cellphone
usage logs of one hundred MIT faculty members and students over nine month-
s. The dataset is available online for other researchers to use 4 . For each user, the
log records phone calls and short messages, phone status information, proximity to
Bluetooth devices, and celltower IDs. The celltower ID indicates a coarse location
of each user, based on which a user spatial trajectory for each user can be built.
Figure 6.11 illustrates a single users daily trajectories over 113 days. The celltower
IDs are further associated with activity and status labels: Work, Home, No Signal,
etc.
The Eigenbehavior project studies the patterns in the location trajectories for each
user. For each user, a behavior dataset = {1 ,2 , . . . ,D } is built where D is the
number of days and i is a H-dimensional binary vector. Each bit in the behavior
vector i indicates whether one of the above ve status states is one in a specic hour.
Similar to face recognition research such as eigenface learning [40], we can get the
average behavior of a user via Principle Component Analysis (PCA). In this analy-
sis, we have = D1 D i=1 i , and we build difference behavior vectors as i = i .
An eigenbehavior is then the eigenvectors of the covariance matrix AAT where the
4 http://reality.media.mit.edu/download.php.
196 Yin Zhu, Vincent Wenchen Zheng and Qiang Yang
Farrahi and Gatica-Perez [12] apply Latent Dirichlet Allocation (LDA), which is an
unsupervised model, to extract the activity routines from the RealityMining data set.
LDA is a probabilistic modeling method for unsupervised learning. It is originally
developed to perform topic modeling on a text corpus [3]. Later, researchers found
it useful for non-text data mining as well; e.g., it can be used for tagging images
[2] and for accelerometer based routine recognition [15]. LDA is usually explained
in the language of a text domain. Given a collection of text documents, where each
document contains a set of words, the output of a LDA algorithm is to nd K latent
topics Z = {z1 , z2 , . . . , zK }, which each topic zi is a distribution over words w j via a
conditional probability P(w j |zi ). Different topics favor different words. For exam-
ple, the politics topic may have a larger value for the probability for words such as
president and war, while the computer topic may have a larger probability value
for words such as java and Microsoft.
routines, or so-called topics, from the data. Each day can be seen as a mixture of
the topics. The transition pattern is encoded as a word. The more frequent a word
occurs, the more likely the pattern it encodes. Table 6.3 shows an example result
of topic modeling. For example, the pattern WOO7 means that there is a high
transition probability from Work to other activities during the time of 7pm to 9pm.
The words in each topic are also similar; for example the pattern words in topic 2
mainly represent Work-to-Other activity during 7-9pm.
Summary
Comparing the different unsupervised learning methods, we can see some interest-
ing differences among them. From an algorithmic perspective, the working principle
under the eigenbehavior method is PCA, which is a well-known statistical learning
method for learning latent factors. LDA is a recent algorithm from the Bayesian
learning community, which model may be easier to explain to people. From an ap-
plication perspective, the input to eigenbehavior is numerical coding for the trajec-
tory. The output is also numerical, which requires good knowledge of the inner side
of the PCA algorithm to explain the result. Topic modeling uses preprocessed short
trajectory words. Therefore, the output of the model is much easier to explain. The
unsupervised segmentation method in [45] is different as it is only a data compres-
sion step to the higher level of supervised activity recognition. Thus, it does not
require the output of the model to be explainable.
Although unsupervised activity recognition does not require labeled data, it is
a challenge to explain the model and outcome of the unsupervised learning algo-
rithm to people. For example, in [10], the outcome of the PCA model is a set of
eigenvectors, which indicates that each days user behavior can be seen as a linear
combination of the some activity routines such as midnight to 9:00 at home, 10:00
to 20:00 at work, etc. This is a key insight why PCA can be used to extract and
explain the behaviors. The transformation of daily activity representation in Figure
6.13 to the binary vectors is the key idea for PCA. In LDA , a challenge lies in how
to dene the pattern word.
6 Activity Recognition from Trajectory Data 199
Over the years, there has been much research work using association rule and fre-
quent pattern mining for spatial and temporal data [7, 29]. Sequential activity pattern
mining from trajectory data also belongs to this category. Here we shall take a re-
cent study on mining the animal periodic patterns from trajectories [22, 21] as an
example to start introducing this area. Figure 6.14 shows the location history of a
bald eagle. Li et al. aim to analyze such a spatial trajectory and nd some periodic
activity patterns of the eagle [22]: for example, from December to March the eagle
stays in the New York area, and some time later, it may leave to some other place
etc.
In order to achieve this goal, Li et al. propose to rst discover meaningful refer-
ence spots where the eagle often stays, and then try to detect the periods from the
binary movement sequence (indicating whether the eagle is in this reference spot at
some time t) within each reference spot. Finally, all the movement sequences across
the reference spots with the same period will be put into some clustering algorithm
in order to nd the frequent patterns. The details for each step are given as follows:
Finding reference spots. In order to get the reference spots, they divide the map
into w h cells of the same size. For each cell c, the GPS data density can be
calculated as:
1 n 1 |c loci |2
f (c) = 2 exp( ),
n i=1 2 2 2
where |c loci | is the distance between cell center c and location loci . is a
smoothing factor dened as = 12 (x2 + y2 )1/2 n1/6 . Therefore, if there are
more GPS points from the eagle in this cell, the density is higher. Besides, if
the GPS points are closer to the cell center, the density is also higher. After
obtaining the density values, an reference spot can be dened by a contour line
on the map, as shown in Figure 6.15(a), which joins the cells of the equal density
200 Yin Zhu, Vincent Wenchen Zheng and Qiang Yang
value, with some density threshold. The threshold can be determined as the top-
p% density value among all the density values of all cells. The larger the value
p is, the bigger the size of reference spot is.
Detecting periods on binary movement sequence. Given a single reference spot,
the eagles movement sequence can be transformed into a binary sequence B =
b1 b2 . . . bn , where bi = 1 when the eagle is within the reference spot at time
i and 0 otherwise. Such a sequence can be used to nd the sequence period
patterns (e.g. in days) by combining Fourier transform and autocorrelation. We
refer readers to the details of such period discovery in the paper [22].
Mining periodic patterns. Let OT = {o1 , . . . , od } denote reference spots with
the same period T such as a day. Given LOC = loc1 . . . locn , one can generate
the corresponding symbolized movement sequence S =!s1 . . . sn , where si = j if
loci is within o j . S is further segmented into m = Tn segments so that each
segment can represent a period such as a day if T = 24. Finally, the periodic
activities can be found by using hierarchical agglomerative clustering to group
these segments.
Figure 6.15(b) shows the daily behavior pattern of the bald eagle over one year,
indicating that this eagle stays in New York area (i.e., reference spot 1) from De-
cember to March. In March, it ies to Great Lakes area (i.e., reference spot 2) and
stays there until the end of May. It ies to Quebec area (i.e., reference spot 3) in the
summer and stays there until late September. Then it ies back to Great Lake again
staying there from mid-October to mid-November and goes back to New York in
December.
As mobile devices and sensors become extensively available, there are more and
more data collected from different users. In the past, people have considered using
6 Activity Recognition from Trajectory Data 201
all the users data together to train an activity recognition model. For example, Liao
et al. pool all the users GPS trajectory data together and train a hierarchical activity
model to predict some transportation routine activities [25]. Such a method may
work well if there is no big difference among different users activities. However,
this is not always true. For example, in WiFi-based activity recognition, a user visits
the coffee shop for meal and the other just enjoys sitting in its outdoor couches to
read research paper. These two users are very likely to observe similar WiFi signals,
but their activities are quite personalized. This motivates us to consider the user-
user relationship in utilizing such multi-user data for activity recognition. In the
following, we introduce some existing work that falls into this multi-user activity
recognition category.
Wang et al. [42] provide a concurrent activity recognition system based on coupled
Hidden Markov Model. In particular, each user ui , 1 i n, has a sensor observation
sequence {o1 , o2 , , oT } of length T . Each observation oi has a label from a set
of m activities L = {y1 , y2 , , ym }. One can use a standard HMM to model each
users activity with the hidden states as the activity labels and the corresponding
observations as the observations. To model the interaction and inuence between
users along the time, Wang et al. use the Coupled Hidden Markov Models (CHMM)
to formulate the state transitions among different users. Figure 6.16 shows a CHMM
for two users A and B. The two hidden state sequences {ai } and {bi } represent the
activity sequences of user A and user B. The states from A and B are cross linked
to capture the interactions between the two users. For example, the activity of B at
time t is inuenced not only by Bs state at time t 1, but also As state at time t 1.
Fig. 6.16 A two-user Coupled Hidden Markov Model (CHMM) for activity recognition [42].
202 Yin Zhu, Vincent Wenchen Zheng and Qiang Yang
After such a CHMM model is built from the multi-user training data, the most
probable label sequence for an observation sequence is arg maxS P(S|O), which can
be effectively solved by dynamic programming. Notice that in this work, although
the training phase takes the concurrent activities of different users into considera-
tion, the inference procedure only works for a single observation sequence.
Ensemble Learning
Transfer Learning
The rst challenge leads to different feature spaces in different houses data. In or-
der to address this challenge, Kasteren et al. propose to introduce some meta-feature
mapping function, which can map different sensor sets into a single common fea-
ture set that can be used for all houses. In particular, each sensor is described by
one or more meta features, for example, a sensor on the microwave might have one
meta feature describing that the sensor is located in the kitchen, and another that the
sensor is attached to a heating device. The second challenge describes the activity
differences given a series of similar sensor observations. For example, one person
might often have cereal for breakfast, while another prefers toast, though they can
trigger a series of similar sensor events w.r.t. their similar moving trajectories in the
houses. Such activity differences require different sets of parameters to allow the
model to recognize the corresponding activities. Therefore, Kasteren et al. propose
to use a separate model for each house, and further assume that the target houses
model and the source houses model parameters share some common prior distri-
bution. By learning the prior distribution from the source houses, one can use it to
provide a reasonable initial value for the target houses model, and meanwhile make
the new model be able to capture the unique activity patterns in the target house.
Fig. 6.17 The illustration for the transfer learning algorithm [17].
The detailed transfer learning model is illustrated in Figure 6.17. In each house,
a Hidden Markov Model (HMM) is used to model the sensor sequence data togeth-
er with the activities. Let us denote xt as a sensor feature vector at time t, and yt
as its corresponding activity label. Here, each houses sensors are mapped to some
common features; in other words, the feature spaces of x at each house, after the
meta-feature mapping, are now the same. A HMM formulates the generative prob-
ability
T T
p(y1:T , x1:T ) = p(y1 ) p(xt |yt ) p(yt |yt1 ),
t=1 t=2
where p(y1 ) is the prior state distribution parameterized by , p(xt |yt ) measures
the emission probability parameterized by B and p(yt |yt1 ) measures the transition
probability parameterized by A. Therefore, a HMM is denoted as = {, A, A}. No-
tice that each house has a HMM parameterized as j , the proposed transfer learning
model assigns some common prior distributions to these HMM parameters j . For
(y i)
example, Kasteren et al. design each prior state probability as p(y1 ) = Ki=1 i 1 ,
204 Yin Zhu, Vincent Wenchen Zheng and Qiang Yang
where K is the number of states, (s) = 1 if s = 1 and 0 otherwise. Then, they force
such prior state probabilities from different HMMs to share a same Dirichlet prior
(K ) 1
distribution, which is given by Dir(|) = ( )... (K ) k=1 k
k=1 k K k
with parameter-
1
s . Here, () is a Gamma distribution and we refer readers to the details in the
paper. As the parameters are shared across different houses, one can use different
houses data to learn them and thus be able to estimate the prior state distribution
( j) at each house j. Similarly, Kasteren et al. also assign a beta prior distribution
to the emission probability and a Dirichlet prior distribution to the transition proba-
bility. These prior distributions parameters are then learned using multiple houses
data and used to estimate the HMMs for each house [17].
Finally, three real world data sets are used to evaluate the proposed transfer learn-
ing solution. The experimental results show that, the proposed method can give
good performance in activity recognition for a house with little or no labeled data,
and generally outperforms some competing baselines. The datasets collected by the
authors are also available on line 5.
One important application of using multiple users data at the same time is to mod-
el the concurrent activities among the users. For example, Lian and Hsu develop a
methodology to recognize concurrent chatting activities from multiple users audio
streams [23]. In order to capture the dynamic interactions, they adopt a factorial
Conditional Random Fields model to learn and recognize concurrent chatting activ-
ities.
5 https://sites.google.com/site/tim0306/datasets
6 Activity Recognition from Trajectory Data 205
Figure 6.18 shows a sample FCRFs model for the recognition of concurrent chat-
ting activities among three users. Denote X as the acoustic feature variables and Y as
the set of chatting activity variables. Let xti X denote an observed acoustic sensor
feature value at time t for chatting activity i from a user. Let yti be the corresponding
state of chatting activity i. Let G = (V, E) be an undirected graph structure shown
in Figure 6.18, with V as the node set and E as the edge set. For any given time
slice t and chatting activity i, Lian and Hsu build edges (Yit ,Yit+1 ) E to repre-
sent the possibility of activity state transition across time slices. They also build
edges (Xit ,Yit ) E to represent the possible relationships between activity labels
and acoustic observations. Besides, edges (Yit ,Y jt ) E are built to represent the pos-
sibility of co-temporal relationships between any two concurrent chatting activities
i and j. That is, all the hidden nodes within the same time slice are fully connected.
An FCRF model allows us to design various feature functions in formulating the
conditional probabilities p(y|x) for a sensor feature x and its chatting activity state
y. In particular, based on the propoesd FCRF model shown in Figure 6.18, Lian and
Hsu propose to design three types of feature functions:
" #
(p) (p) (p)
Local potential function iA (xti , yti ,t) = exp Pp=1 wi fi (xti , yti ,t) , where fi
is a function indicating whether the state values are equal to the p-th state com-
(p)
bination within the local clique (xti , yti ). wi are some weights to learn later.
Temporal potential function
"
(q) (q) t t t+1 t+1
i , yi ,t) = exp q=1 wi f i (xi , yi , xi , yi ,t) ,
Q
iB (xti , yti , xt+1 t+1
(q)
where fi is a function indicating whether the state values are equal to the q-th
(q)
state combination within the temporal clique (xti , yti , xt+1 i , yi ). wi
t+1
are some
weights to learn later.
Co-temporal potential function
" #
(r) (r)
i (xti , yti , xtj , ytj ,t) = exp r=1 wi j fi j (xti , yti , xtj , ytj ,t) ,
R
(r)
where fi j is a function indicating whether the state values are equal to the r-
(r)
th state combination within the co-temporal clique (xti , yti , xtj , ytj ). wi j are some
weights to learn later.
Finally, an FCRF model formulate the following conditional probability for N users
concurrent chatting activities:
T N T 1 N
1
p(y|x, w) = i (xi , yi ,t) i (xi , yi , xi , yi ,t)
A t t B t t t+1 t+1
Z(x) t=1 i=1 t=1 i=1
T N
i (xti , yti , xtj , ytj ,t) ,
t=1 i, j
206 Yin Zhu, Vincent Wenchen Zheng and Qiang Yang
In [46], Zheng and Yang propose a user-dependent aspect model to help the users
collaboratively build an activity recognition model that can give personalized pre-
dictions. Rather than simply pooling multiple users data together, the proposed
model introduces user aspect variables to capture the user grouping information
from their data. As a result, for a targeted user, the data from her similar users in the
same group can also help with her personalized activity recognition. In this way, one
can greatly reduce the need of much valuable and expensive labeled data required
in training the personalized recognition model.
In a WiFi environment, multiple users collect wireless signal data with ac-
tivity annotations for around a month. The data format is in a set of quads:
{ai , ui , fi ,ti |i = 1, ..., L}, where a is an activity, u is a user, and f is a feature ob-
served at time t. In the WiFi case, a feature corresponds to a wireless access point
(AP) that the mobile device can detect. A data record quad indicates that a user u is
doing an activity a at time t, and meanwhile her wireless device detects some AP f .
The goal is to build a personalized activity recognition model by using these data, so
that with a users WiFi observations at some time, we can predict what she is doing.
The proposed model extends the standard aspect model [13] by introducing user
aspects, as well as time aspects and feature aspects to model personalized activi-
ty recognition from time-dependent sensor data. Figure 6.19 depicts the graphical
model. The shadow nodes for user variables u, time variables f , feature variables
f and activity variables a are observations. The blank nodes inside the rectangle
are latent aspect variables. The user latent aspects Zu {z1u , z2u , ..., zD u } are discrete
u
D
Some other latent aspects Z f {z1f , z2f , ..., z f f } and Zt {zt1 , zt2 , ..., ztDt } are also
introduced to encode the data observations on feature and time. They are used to
capture the dependency between activities and observations, considering that similar
feature observations at similar time periods are likely to imply some same activity.
Note that these aspects do not necessarily rely on users. One can also take all the
users data as input, and only use them (i.e. Z f and Zt ) to build a user-independent
model for general activity recognition. However, such a user-independent model, as
shown in their empirical experiment, does not perform as well as the user-dependent
model. The user latent aspects help to achieve personalization, so it is called a user-
dependent aspect model.
In general, the proposed aspect model is a generative model, which uses the latent
aspect variables to explain the observations. It species a joint probability of the
observed random variables:
Much future work can be done in multi-user activity recognition. One particu-
larly interesting direction is social activity recognition, which aims to use the social
media information as input and predict the users physical activities. In social ac-
tivity recognition, the scales on both users and data can be much larger than those
using limited sensor or spatial trajectory data. For example, Sakaki et al. treat the
Twitter users as social sensors, and use these sensors for event detection [36]. In
their work, the words and links in the Twitter messages are used as sensor readings,
and a spatial-temporal model is built on the Twitter message streams. They build an
earthquake notication system which uses these Twitter messages as the input, and
outputs the earthquake notication when there is one.
6.4 Summary
be either used to smooth the location estimations [19] or used in sequential clas-
sications for transportation mode detection [35]. The main part of this chapter
discusses trajectory-based activity recognition for a single user and for multiple
users. We have also categorized the previous research work according to the learning
paradigms: supervised learning, unsupervised learning and frequent pattern mining.
Table 6.5 gives a summary of the applications based on trajectory activity recog-
nition. Some of the applications are direct activity recognition problems, while the
others can be more high-level and are based on activity recognition such as GeoLife.
The second category of applications are usually built on the rst category.
the data sparsity in activity recognition, but it also brings the large-scale data com-
putation problem. Some cloud computing solution could be an option. Besides, as
the social media data are very noisy, more careful data cleaning and information
retrieval are vital.
References
1. Bahl, P., Padmanabhan, V.N.: Radar: An in-building rf-based user location and tracking sys-
tem. In: Proc. The Annual IEEE International Conference on Computer Communications
(INFOCOM), pp. 775784 (2000)
2. Barnard, K., Duygulu, P., Forsyth, D.A., de Freitas, N., Blei, D.M., Jordan, M.I.: Matching
words and pictures. Journal of Machine Learning Research 3 (2003)
3. Blei, D.M., Ng, A.Y., Jordan, M.I.: Latent dirichlet allocation. Journal of Machine Learning
Research 3, 9931022 (2003)
4. Boyd, S., Vandenberghe, L.: Convex optimization. Cambridge Univ Pr (2004)
5. Brand, M., Oliver, N., Pentland, A.: Coupled hidden markov models for complex action recog-
nition. In: Proceedings of the 1997 Conference on Computer Vision and Pattern Recognition
(CVPR 97), CVPR 97, p. 994. IEEE Computer Society, Washington, DC, USA (1997)
6. Breiman, L.: Classication and regression trees. Chapman & Hall/CRC (1984)
7. Cao, H., Mamoulis, N., Cheung, D.: Mining frequent spatio-temporal sequential patterns. In:
Proc. of IEEE International Conference on Data Mining (ICDM), pp. 8pp. IEEE (2005)
8. Doucet, A., De Freitas, N., Gordon, N.: Sequential Monte Carlo methods in practice. Springer
Verlag (2001)
9. Doucet, A., Godsill, S., Andrieu, C.: On sequential monte carlo sampling methods for bayesian
ltering. Statistics and computing 10(3), 197208 (2000)
10. Eagle, N., Pentland, A.: Eigenbehaviors: Identifying structure in routine. Behavioral Ecology
and Sociobiology 63(7), 10571066 (2009)
11. Eagle, N., (Sandy) Pentland, A.: Reality mining: sensing complex social systems. Personal
Ubiquitous Comput. 10, 255268 (2006)
12. Farrahi, K., Gatica-Perez, D.: Discovering routines from large-scale human locations using
probabilistic topic models. ACM Transactions on Intelligent Systems and Technology (TIST)
2(1), 3 (2011)
13. Hofmann, T., Puzicha, J.: Latent class models for collaborative ltering. In: Proc. of the 16th
International Joint Conference on Articial Intelligence (IJCAI 99), pp. 688693 (1999)
14. Hofmann-Wellenhof, B., Lichtenegger, H., Collins, J.: Global positioning System. Theory and
Practice. (1993)
15. Huynh, T., Fritz, M., Schiele, B.: Discovery of activity patterns using topic models. In: Proc.
of International Conference on Ubiquitous Computing (UbiComp), pp. 1019 (2008)
6 Activity Recognition from Trajectory Data 211
16. Huynh, T., Schiele, B.: Analyzing features for activity recognition. p. 159C163. Smart objects
and ambient in- telligence: innovative context-aware services (2005)
17. van Kasteren, T., Englebienne, G., Krose, B.J.A.: Transferring knowledge of activity recogni-
tion across sensor networks. In: Proc. of the International Conference of Pervasive Computing,
pp. 283300 (2010)
18. Krumm, J. (ed.): Ubiquitous Computing Fundamentals. Chapman and Hall/CRC, Boca Raton,
FL (2010)
19. Ladd, A.M., Bekris, K.E., Rudys, A., Kavraki, L.E., Wallach, D.S., Marceau, G.: Robotics-
based location sensing using wireless ethernet. In: Proc. of The Annual International Confer-
ence on Mobile Computing and Networking (MobiCom), pp. 227238 (2002)
20. Lafferty, J.D., McCallum, A., Pereira, F.C.N.: Conditional random elds: Probabilistic models
for segmenting and labeling sequence data. In: Proc. The International Conference on Machine
Learning (ICML), pp. 282289 (2001)
21. Li, Z., Ding, B., Han, J., Kays, R., Nye, P.: Mining periodic behaviors for moving objects.
In: Proc. of the ACM Conference on Knowledge Discovery and Data Mining (KDD), pp.
10991108 (2010)
22. Li, Z., Han, J., Ji, M., Tang, L.A., Yu, Y., Ding, B., Lee, J.G., Kays, R.: Movemine: Mining
moving object data for discovery of animal movement patterns. ACM Transactions on Intel-
ligent Systems and Technology (ACM TIST) (Special Issue on Computational Sustainability)
(Aug. 2010)
23. Lian, C.C., Hsu, J.Y.j.: Probabilistic models for concurrent chatting activity recognition. In:
Proc. of the 21st International Jont Conference on Artical Jntelligence (IJCAI 09) (2009)
24. Liao, L., Fox, D., Kautz, H.A.: Extracting places and activities from gps traces using hierar-
chical conditional random elds. I. J. Robotic Res. 26(1), 119134 (2007)
25. Liao, L., Patterson, D.J., Fox, D., Kautz, H.A.: Learning and inferring transportation routines.
Artif. Intell. 171(5-6), 311331 (2007)
26. Liu, S., Liu, Y., Ni, L.M., 0002, J.F., Li, M.: Towards mobility-based clustering. In: Proc. of
the ACM Conference on Knowledge Discovery and Data Mining (KDD), pp. 919928 (2010)
27. Miluzzo, E., Cornelius, C., Ramaswamy, A., Choudhury, T., Liu, Z., Campbell, A.T.: Dar-
win phones: the evolution of sensing and inference on mobile phones. In: Proc. The Annual
International Conference on Mobile Systems (MobiSys), pp. 520 (2010)
28. Murphy, K.: Dynamic bayesian networks: representation, inference and learning. Ph.D. thesis,
UC Berkeley, Computer Science Division (2002)
29. Nazerfard, E., Rashidi, P., Cook, D.J.: Using association rule mining to discover temporal
relations of daily activities
30. Ni, L.M., Liu, Y., Lau, Y.C., Patil, A.P.: Landmarc: Indoor location sensing using active rd.
Wireless Networks 10(6), 701710 (2004)
31. Pan, J.J., Yang, Q., Pan, S.J.: Online co-localization in indoor wireless networks by dimension
reduction. In: Proc. of National Conference on Articial Intelligence (AAAI), pp. 11021107
(2007)
32. Patterson, D.J., Liao, L., Fox, D., Kautz, H.A.: Inferring high-level behavior from low-level
sensors. In: Proc. of International Conference on Ubiquitous Computing (UbiComp), pp. 73
89 (2003)
33. Quinlan, J.: C4. 5: programs for machine learning. Morgan Kaufmann (1993)
34. Rabiner, L.: A tutorial on hidden markov models and selected applications in speech recogni-
tion. Proceedings of the IEEE 77(2), 257286 (1989)
35. Reddy, S., Mun, M., Burke, J., Estrin, D., Hansen, M.H., Srivastava, M.B.: Using mobile
phones to determine transportation modes. ACM Transactions on Sensor Networks (TOSN)
6(2) (2010)
36. Sakaki, T., Okazaki, M., Matsuo, Y.: Earthquake shakes twitter users: real-time event detection
by social sensors. In: Proc. of International World Wide Web Conference, pp. 851860 (2010)
37. Schulz, D., Fox, D., Hightower, J.: People tracking with anonymous and id-sensors using
rao-blackwellised particle lters. In: Proc. of International Joint Conferences on Articial
Intelligence (IJCAI), pp. 921928 (2003)
212 Yin Zhu, Vincent Wenchen Zheng and Qiang Yang
38. Sutton, C.A., Rohanimanesh, K., McCallum, A.: Dynamic conditional random elds: factor-
ized probabilistic models for labeling and segmenting sequence data. In: Proc. The Interna-
tional Conference on Machine Learning (ICML) (2004)
39. Thiagarajan, A., Ravindranath, L., LaCurts, K., Madden, S., Balakrishnan, H., Toledo, S.,
Eriksson, J.: Vtrack: accurate, energy-aware road trafc delay estimation using mobile phones
40. Turk, M., Pentland, A.: Eigenfaces for recognition. Journal of cognitive neuroscience 3(1),
7186 (1991)
41. Vail, D.L., Veloso, M.M., Lafferty, J.D.: Conditional random elds for activity recognition.
In: Proc. the International Conference on Autonomous Agents and Multiagent Systems (AA-
MAS), p. 235 (2007)
42. Wang, L., Gu, T., Tao, X., Lu, J.: Sensor-based human activity recognition in a multi-user
scenario. In: Proc. of the International Joint Conference on Ambient Intelligence (AmI), pp.
7887 (2009)
43. Yang, Q., Pan, S.J., Zheng, V.W.: Estimating location using wi-. IEEE Intelligent Systems
23(1), 813 (2008)
44. Yin, J., Chai, X., Yang, Q.: High-level goal recognition in a wireless lan. In: Proc. of National
Conference on Articial Intelligence (AAAI), pp. 578584 (2004)
45. Yin, J., Shen, D., Yang, Q., Li, Z.N.: Activity recognition through goal-based segmentation.
In: Proc. of National Conference on Articial Intelligence (AAAI), pp. 2834 (2005)
46. Zheng, V.W., Yang, Q.: User-dependent aspect model for collaborative activity recognition.
In: In Proc. of the 22nd International Joint Conference on Articial Intelligence (IJCAI-11)
(2011)
47. Zheng, Y., Li, Q., Chen, Y., Xie, X., Ma, W.Y.: Understanding mobility based on gps data. In:
Proc. of International Conference on Ubiquitous Computing (UbiComp), pp. 312321 (2008)
48. Zheng, Y., Xie, X.: Learning travel recommendations from user-generated gps traces. ACM
Transactions on Intelligent Systems and Technology (TIST) 2(1), 2 (2011)
Chapter 7
Trajectory Analysis for Driving
John Krumm
Abstract This chapter discusses the analysis and use of trajectories from vehicles
on roads. It begins with techniques for creating a road map from GPS logs, which
is a potentially less expensive way to make up-to-date road maps than traditional
methods. Next is a discussion of map matching. This is a collection of techniques
to infer which road a vehicle was on given noisy measurements of its location. Map
matching is a prerequisite for the next two topics: location prediction and route
learning. Location prediction works to anticipate where a vehicle is going, and it
can be used to warn drivers of upcoming trafc situations as well as give advertising
and alerts about future points of interest. Route learning consists of techniques for
automatically creating good route suggestions based on the trajectories of one or
more drivers.
7.1 Introduction
GPS trajectories from vehicles are useful in a variety of ways to make driving better.
It is easy to gather trajectories using small GPS loggers, and it can be even easier
with GPS-equipped mobile phones and in-car personal navigation devices. Figure
7.1 shows a typical GPS trajectory recorded from a vehicle. Such trajectories typi-
cally consist of a sequence of time-stamped latitude/longitude points.
Many of the techniques discussed in this chapter can be considered crowdsourc-
ing, which take a large collection of GPS traces from different drivers to create
something useful. The chapter starts with techniques for making road maps from
GPS trajectories. This is an alternative to expensive, special purpose road surveys
that can have trouble keeping up with road changes. The chapter next discusses map
matching. Given a road map, this is the problem of assigning GPS points to particu-
John Krumm
Microsoft Research, Microsoft Corpration, Redmond, WA USA
e-mail: [email protected]
213
214 John Krumm
Fig. 7.1 The black dots show a GPS trajectory recorded in a vehicle, staring from the right side.
The inset is a close-up of part of the trajectory, showing some of the individual points. In this case,
the points were recorded every one second.
lar roads. Map matching is often an annoying, but sometimes necessary prerequisite
to the chapters next two topics: destination prediction and route learning. Destina-
tion prediction attempts to predict a drivers destination during a trip, with the goal
of providing warnings and useful information in time for the driver to act. Route
learning is a process that observes drivers preferences based on GPS trajectories
and uses these preferences to inuences future route suggestions.
Digital road maps are one of the most important resources for assisting drivers,
from planning a route on a desktop PC to real time route guidance in a car. Creating
these maps is expensive, because it usually requires trained, dedicated personnel
in specially equipped vehicles to drive the streets for the sole purpose of mapping.
Technologists have explored other, less expensive methods of making digital road
maps. One of the earliest attempts was to use aerial imagery, from airplanes and
satellites, along with computer vision algorithms, to automatically nd roads, such
as the early work by Tavakoli and Rosenfeld [4].
Another inexpensive approach is manual crowdsourcing, as exemplied by the
successful OpenStreetMap (OSM) project founded by Steve Coast [13]. OSMs reg-
istered users can update the map by editing and adding entities, including geograph-
ic features derived from aerial images, out-of-copyright maps, and uploaded GPS
traces.
In this section, however, we explore the automated processing of GPS trajectories
to create a map. Figure 7.2 shows a set of GPS trajectories that our research group
has collected over the past few years in Seattle, WA USA. Given that the raw traces
7 Trajectory Analysis for Driving 215
Fig. 7.2 These are GPS traces taken from volunteer drivers in Seattle, WA USA. Based on GPS
traces like this, it seems plausible that one could build a road map. The dark, star-like clusters come
from idling GPS loggers that occasionally recorded an outlier location.
already look like a road map, it seems plausible to automatically make a road map
from such data.
One of the rst attempts to make a road map from GPS traces came from Rogers
et al. in 1999 [24]. In a series of papers, this idea was developed into an end-to-end
system that starts with differential GPS data and concludes with a renement of an
existing map, including nding lanes and lane transitions through the intersections
[9]-[25]. The process involves smoothing and ltering the GPS data, matching to
an existing map, spline tting for the road centerline, clustering to nd lanes, and
renement of the intersection geometry.
Worrall and Nebot approached the problem of nding roads in a large mining
site without using any previous maps [14]. Their algorithm starts by clustering GPS
points with similar locations and headings. These clusters are in turn linked, and
then the linked clusters are segmented into straight line segments and curves. The
216 John Krumm
algorithm uses least squares to t lines and circular arcs to these segments, giving a
compact representation of the mines roads.
Of course road maps need to represent much more than the centerlines of the
roads. Roads have several other important features, some of which could be derived
from GPS data. These features include direction of travel, number of lanes, trafc
controls like stop lights and stop signs, speed limits, road names, turn restrictions,
and height and weight restrictions. It is an interesting challenge to imagine tech-
niques for deriving these features automatically.
The next three sections describe three projects in our own research lab aimed
at inferring a road map and road details from raw GPS data. The goal of the rst
project was to make a routable road map, the second to nd intersections, and the
third to count lanes.
Fig. 7.3 We installed GPS loggers (a) in Microsoft shuttles (b) to record GPS data for automati-
cally making road maps.
Our labs rst project in this area was an attempt to create a routable road map
from recorded GPS data [10]. For this experiment, we installed GPS loggers on
Microsoft shuttle vehicles operating on and between Microsoft corporate campus-
es in the Seattle, WA area, shown in Figure 7.3. The GPS loggers we used were
Royal-Tek RBT-2300 models. These loggers are convenient because they can hold
400,000 GPS points (including latitude, longitude, altitude, speed, and time stamp),
and they can be powered from the vehicles cigarette lighter. For this experiment,
we deployed loggers on 55 different Microsoft shuttles, recording GPS points every
1 second for approximately three weeks.
We split the GPS traces from each shuttle into discrete trips and dropped some
of the GPS points for easier processing. Specically, we split the GPS points into
7 Trajectory Analysis for Driving 217
trips by looking for gaps of at least 10 seconds or 100 meters between temporally
adjacent GPS points. To reduce the amount of data, we dropped points that were
within 30 meters of a previous point, unless the point was part of a turn (change in
direction over last three points greater than 10 degrees), when we allowed the points
to be as close as 10 meters apart.
Our process for making a map proceeded in two steps. First we claried the
GPS traces in an effort to mitigate the effect of measurement noise. Second, we
clustered the claried traces into discrete roads represented by a graph with nodes
and edges.
Fig. 7.4 Part (a) shows a road map that corresponds to the raw GPS traces in (b). After clarifying,
we get the traces in (c) that are more compact and that show the roads two directions of travel.
GPS measurements inevitably have noise, which can be reasonably modeled with a
Gaussian distribution [13]. As an example of GPS noise, Figure 7.4 shows some of
the GPS data we collected along with a section of a road map for the same area. The
raw GPS traces are spread, making it more difcult to infer the location of the road
and to differentiate the two directions of travel.
We developed a technique to clarify the GPS traces by imagining each trace as a
special kind of electrostatically charged wire. Pairs of wires with the same direction
of travel were attracted to each other over short distances, while pairs of wires with
the opposite direction of travel repelled each other over short distances. The traces
could move in response to these forces, but they were also anchored with imaginary
springs to their original locations to prevent too much deviation.
These imaginary forces are simulated as energy potential wells, as shown in Fig-
ure 7.5. Figure 7.5(a) shows a cross sectional view of two traces. The inverted Gaus-
sian potential well is centered on one trace, and it tends to pull the other trace toward
it at the bottom of the potential well. The force is proportional to the derivative of
218 John Krumm
Altered
Nearby trace in Potential well
Potential well location
same direction
(inverted Gaussian) (parabola)
Fig. 7.5 These illustrations show cross sections of GPS traces as small circles. In (a), a nearby
GPS trace is attracted to the potential well around another trace. In (b), a trace is attracted back to
its original position.
the potential well. These attractive forces are counterbalanced by forces that tend to
keep the traces from moving too much, as in Figure 7.5(b). This parabolic potential
well simulates a spring that pulls a trace back to its original position.
We modify the attractive force of the potential well in Figure 7.5(a) to help sepa-
rate opposite directions of travel. The computed force is multiplied by the cosine of
the angle between the two traces. Thus, traces with nearly the same direction will
be subject to nearly the full attractive force (cos 0 = 1), while traces with nearly the
opposite direction will feel a repelling force (cos 180 = 1). We had to adjust this
cosine-modulated force slightly to prevent strange effects from traces that drifted
left past the opposite direction of travel. Details are in [10].
The two types of potential wells in Figure 7.5 are each governed by a small set
of parameters giving their amplitude and width. One way to set these parameters
is to experiment with actual traces to see which parameters work best. Instead, we
wrote equations to simulate the behavior of the potential wells and traces and solved
for the parameters numerically. We specically looked at two scenarios that were
relatively easy to capture with equations: adjacent lanes in the same direction and a
road split, shown in Figure 7.6. For the adjacent lanes, we adjusted the potential well
parameters so the traces would merge, and for the road split, we tried to maintain
the location of the split in spite of tendency for traces in the two lanes to merge.
The result of the clarication step is shown in some examples in Figure 7.7. The
procedure successfully consolidated traces going in the same direction and separated
traces going in the opposite direction, helping to suppress the GPS noise.
To build a routable road map, we need to convert the GPS traces into a road network
represented by a graph of nodes and edges. After clarifying the GPS traces, the
next step is to merge them into a graph. Figure 7.8 shows an example of merging.
We begin with an empty graph and choose one claried GPS trip as the rst set of
nodes and edges. Each GPS point is a node, and the connections between temporally
7 Trajectory Analysis for Driving 219
(a) Traces from ad- (b) Traces with the same di-
jacent lanes with the rection of travel should split
same direction of travel near the road split.
should be merged.
Fig. 7.6 We adjusted the parameters of our potential functions to achieve the desired effects in
these two situations.
adjacent nodes are edges. To add more claried traces, we merge new nodes with
existing nodes. For a given candidate node to add, we look for the nearest nodes with
the same direction of travel. If the nearest node is close enough, we merge the two
nodes. If necessary, we also add an edge to preserve the connectivity of the candidate
node with previous nodes in its trip. More details of this merging algorithm are in
[10].
With the road network created, we can run a route-planning algorithm to compute
actual driving routes. Some of these routes are shown in Figure 7.9, along with com-
TM
parisons to routes computed with Maps. Our routes match well. Where there are
deviations, one is due to the fact that a road had closed, which our graph repre-
TM
sented correctly over the slightly out-of-date Bing version. Another deviation was
due to the fact that we never observed a GPS trace on a road that was actually there.
Overall, however, this technique of generating road maps shows that it is possible to
create a routable road map from raw GPS traces without the expense of paid drivers
in specialized vehicles.
220 John Krumm
(a) Raw GPS traces before clarication step (b) After clarication step
Fig. 7.7 The GPS traces in (a) were taken from shuttles around Microsoft in Redmond, WA USA.
The claried version of the traces is shown in (b). Here, the directions of travel have been separated,
and traces in the same direction are pulled together.
Trip 1
Trip 2
Trip 3
Graph Node
Fig. 7.8 This shows an illustration of our GPS trace merging algorithm to product a graph repre-
sentation of the road network.
7 Trajectory Analysis for Driving 221
Fig. 7.9 The upper rows shows the road network we generated and routes planned on this network
in white. The bottom row shows the same routes planned in BingTM Maps.
While the work above on making a routable road network nds road intersections
implicitly, we wanted an explicit way of nding intersections, because this is where
roads are often most interesting.
(a) GPS traces at inter- (b) Shape detector (c) Incrementing bins of shape
section detector with GPS trace
Fig. 7.10 Part (a) shows typical GPS traces at a road intersection. The shape detector in (b) is used
to nd intersections. A GPS trace increments the bins it intersects in the shape detector, as in (c)
With the counts normalized and with the detector rotated to a canonical orien-
tation, we extract the counts into a feature vector with each vector element corre-
sponding to one bin of the shape detector.
Our goal is to apply a standard machine learning technique to the feature vectors.
In order to do this, we need training data consisting of positive and negative samples
of intersections. Since we have a ground truth map with the actual locations of
intersections in the region of our GPS data, we use it to nd positive feature vectors
for training, and we take negative examples centered at GPS points that are at least
20 meters from any known intersection. Given these positive and negative training
samples, we use Adaboost [26] to learn a classier, although several other classiers
likely would have worked as well.
The algorithm outlined above reduces the problem of nding road intersections
to a classic detection problem. We can thus assess the performance of the algorith-
m with a receiver operating characteristic (ROC) curve, as shown in Figure 7.11.
This shows the tradeoff between correctly nding intersections (true positives) and
hallucinating intersections that are not actually there (false positives) as we adjust
the sensitivity of the Adaboost classier. The ideal operating point is in the upper
left corner, where all the intersections are found and there are no false positives. We
optimized the geometry of our shape detector (e.g. number of circles, number of
angular slices) by nding the geometry that gave the best ROC curve.
Fig. 7.11 This is the receiver operating characteristic (ROC) curve of our intersection detector.
More correct detections (true positives) come at the expense of more false positives.
Fig. 7.12 These are some of the intersections found by our intersection detector and the roads
lled between the detected intersections.
Having discussed how to use GPS traces to create a routable road map and pinpoint
intersections, this section concludes with a discussion of how to nd trafc lanes. A
detailed discussion of this method appears in [11].
An example of this problem is shown in Figure 7.13. On the left is a set of GPS
traces going through an intersection, and on the right is an aerial view of the same
intersection. Our goal is to nd the lanes of trafc from the GPS traces. GPS traces
from adjacent lanes have signicant overlap, which makes this a difcult problem.
This overlap is partially due to GPS noise. In addition, some of the GPS spread
comes from the fact that the GPS loggers were not always centered in the vehicle,
but placed at various positions across the dashboard.
(a) (b)
Fig. 7.13 The GPS traces in (a) are colored by their direction of travel. They came from the inter-
section in (b). The lanes in the GPS data are difcult to distinguish due to GPS noise.
If we model GPS noise as Gaussian as suggested in [13], this suggests that the
spread of GPS traces across multiple lanes can be modeled as a mixture of Gaus-
sians (GMM), as shown in Figure 7.14. Specically, the GMM applies to the points
where the GPS traces intersect a perpendicular line across the road. The mixture of
Gaussians represents a continuous probability density expressed as a weighted sum
of Gaussian distributions, as in Equation 7.1.
k
1 (x u j )2
p(x) = w j exp (7.1)
j=1 2 2 2 2j
j
Here, k gives the number of lanes across the road. The variables j and j give the
center and standard deviation of the GPS traces in the jth lane, respectively. The w j
7 Trajectory Analysis for Driving 225
Gaussian mixtures
sampling cross sections
Fig. 7.14 We t a Gaussian mixture to GPS traces to nd lanes of trafc.
represents the fraction of GPS traces in each lane. While there are standard tech-
niques to nd k, 1 . . . k , and 1 . . . k , we found these did not work well. Instead,
we developed a special expectation maximization (EM) algorithm to nd the lane
parameters. This algorithm is discussed in detail in [11]. The basic assumptions are:
Lanes are evenly spread across the road, expressed as j = + ( j 1) ,
j = 1 . . . k.
GPS traces have the same spread in each lane, i.e. j = , j = 1 . . . k.
In addition, we impose priors on and 2 . To choose between different values
of k (the number of lanes), we impose a penalty term that prefers lane widths of 5
meters. Figure 7.15 shows an example of how the t improves with our restricted
GMM. We tested this technique on roads approaching three intersections, with a
separate model t for each direction of travel. We looked at several cross sections
along each road. Compared to a general GMM, our new technique achieved a low-
er percentage error in estimating the number of lanes as well as more consistent
estimates of the lanes spacing and spread.
(a) (b)
Fig. 7.15 Before imposing restrictions on our Gaussian mixture model, the resulting Gaussians
are uneven, as in (a). After the restrictions, the two Gaussians have the same width as we expect of
trafc lanes, as in (b).
actual path
Fig. 7.16 Map matching is the process of nding which road corresponds to each GPS point. For
these three GPS points, there are multiple nearby roads, but the true path is obvious considering
continuity.
7 Trajectory Analysis for Driving 227
The rst inclination for solving the map matching problem is to match the GPS
point to the nearest road. This technique falls in the category of geometric algo-
rithms for map matching, as explained in the survey articles in [6, 23]. The combi-
nation of GPS noise and multiple nearby roads, however, means that this technique
often fails. In fact, matching to the nearest road generally serves only as a weak tech-
nique with which to demonstrate the superiority of more sophisticated algorithms.
? ?
?
?
? ?
Fig. 7.17 These are three problematic scenarios for map matching. Simply matching to the nearest
road will result in mistakes for the points with gray outlines.
Figure 7.17 shows three common scenarios where map matching can be difcult.
In all three, multiple roads cause ambiguity in matching.
A step up in sophistication and robustness beyond geometric algorithms are so-
call topological algorithms [6, 23] that pay attention to the connectivity of the road
network. Clearly this would help solve the map matching problems illustrated in
Figure 7.16 and Figure 7.17, where mistaken matches tend to violate the continuity
of the drive. Representative of these algorithms are those that use the Frechet dis-
tance to measure the t between a GPS sequence and candidate road sequence [5, 8].
Here, candidate routes are assessed against the polyline created by connecting the
GPS points with straight line segments. The candidate routes are created from the
road network, and thus represent feasible driving paths which rule out sudden jumps
to nearby roads. The Frechet distance measures the dissimilarity between the GPS
polyline and the candidate route. [5] describes the Frechet distance as:
Suppose a person is walking his dog, the person is walking on the one curve and the dog on
the other. Both are allowed to control their speed but they are not allowed to go backwards.
Then the Frechet distance of the curves is the minimal length of a leash that is necessary for
both to walk the curves from beginning to end.
In addition to noise in the GPS data, map matching algorithms must deal with
occasional outliers. Also, the GPS sampling rate may be low. These problems can
be addressed by probabilistic algorithms [23] that make explicit provisions for GPS
noise and consider multiple possible paths through the road network to nd the best
one.
A new class of map matching algorithms has emerged recently that embrace both
the topology of the road network and the noise and outliers in the GPS data, exem-
plied by [22]-[21]. These algorithms nd a sequence of roads that simultaneously
228 John Krumm
come close to the noisy GPS data and form a reasonable route through the road
network. The description below concentrates on [22], from our lab, as a well-tested
and representative sample of algorithms like this.
1 2
Fig. 7.18 GPS points 1 and 2 can match to either the black road or gray road. Matching to the
black road is preferred, because the length of the resulting route is about the same as the distance
between the GPS points.
There is a natural tradeoff in map matching between matching a GPS point to the
nearest road and matching it to a road that makes sense in the context of other
matched points. For example, Figure 7.16 shows three GPS points and nearby roads.
None of the points is exactly on a road, due to GPS noise and possible geometric
errors in the map. Thus, each GPS point has multiple candidate roads to which it
could be matched, shown by the arrows at each point. However, it is obvious to us
which route the driver took based on the continuity of the sequence of road match-
ing candidates. There is a tradeoff between two criteria: the matched road should be
close to the GPS point, but the sequence of roads should make a reasonable path. A
hidden Markov model (HMM) makes this tradeoff explicit using probability distri-
butions.
The rst probability distribution for the HMM models the GPS observations and
their possible matching roads. Specically, this probability distribution models GPS
noise, which can be represented by a Gaussian centered around the actual GPS mea-
surement [13]. This means that roads that are farther away from the GPS point have
a smaller probability of matching the GPS point. We measure the distance between
the GPS point and the road as the great circle distance between the GPS point and
the nearest point on the road. In Figure 7.16, these distances are the lengths of the
7 Trajectory Analysis for Driving 229
lines with arrows. Based on ground truth data from manual map matching, we esti-
mated the standard deviation of this Gaussian distribution to be 4.07 meters for our
data, which is a reasonable value for GPS noise [22].
The other probability distribution in the HMM, the transition probabilities, helps
enforce the continuity of the route in terms of the transitions between pairs of GPS
points. Intuitively, we want to avoid matching to a nearby road that would require
a convoluted route to get to the next matched road. For example, in Figure 7.16, if
GPS point 2 matched to the highway rather than the curving ramp, the subsequent
route to any of the roads near point 3 would be long and inefcient.
The structure of the HMM requires these transition probabilities be a function of
two, temporally adjacent road match candidates. We achieve this by considering the
distance between the GPS points (great circle distance) and the length of the route
that it would take to traverse this distance starting and ending on the road match
candidates.
Figure 7.18 shows an example. If the two GPS points match to the black road,
then the route distance between the two matched points is approximately the same
as the great circle distance between the GPS points. If they instead matched to the
gray roads, the route distance is much longer. In our experiments, we found that the
absolute value of the difference between the great circle distance and route distance
for correct road matches follows an exponential probability distribution, i.e.
1 d/
p(d) = e (7.2)
where d is the absolute difference between the great circle distance and route dis-
tance. This distribution is maximum at d = 0, and decreases monotonically for
d > 0. In the example in Figure 7.18, d would be small if the two GPS points
matched to the black road, leading to a larger probability. Matching to the gray
road, d would be much larger, along with a lower probability.
To implement the computation of these transition probabilities requires that we
run a route planner between all candidate pairs of matches for all temporally adja-
cent GPS points. To make this faster, we ignore all road matches that are more than
200 meters away from the GPS measurement.
The transition probabilities above are computed by looking at the differences in
length between the GPS pairs and resulting routes. In [20] we looked at using time
differences instead, with similar results. Time differences, however, can vary due to
trafc speeds.
For each GPS point, the HMM looks at all the possible road matches within
200 meters. The HMM algorithm nds the optimal sequence of matched roads that
maximizes the product of the observation probabilities (Gaussian for GPS noise)
and transition probabilities (exponential on distance differences). Figure 7.19 shows
some examples of how our algorithm works in spite of the problems illustrated
in Figure 7.17. In Figure 7.19, the roads highlighted in white show the correctly
matched route segment. The roads highlighted in gray show the route the vehicle
would have to drive if each GPS point matched to the nearest road. This often results
230 John Krumm
Fig. 7.19 These three scenarios correspond to the three in Figure 7.17. The HMM map matching
algorithm works correctly. The black lines connect the GPS points, the white road shows the correct
match, and the gray path shows the path necessary to satisfy naively matching the nearest road to
each GPS point.
Drivers could benet from a prediction of their destination. They could be informed
of upcoming trafc jams, road construction, speed limit changes, and other warn-
ings. With prediction, drivers could also be alerted about gas stations or charging
stations along their route. Retailers near the drivers destination might pay a premi-
um to deliver ads to vehicles predicted to arrive nearby. People doing a local Web
search on a mobile device could get results clustered around their destination.
Our lab has developed a general, probabilistic framework for destination pre-
diction [17, 19]. It operates on a vehicles partial trajectory to predict where the
trajectory will end. The framework depends on a discretization of the map, such as
a tiling of square cells, as in Figure 7.20(a). In this discretization, each GPS point
is represented by cell that contains it. Although the remainder of this discussion
will use the cell-based discretization, we have also experimented with alternative
discretizations, such as representing each GPS point by its nearest road intersection
(Figure 7.20(b)), or road. In any case, the GPS trail is converted to a sequence of
discretized points C = {c1 , c2 , c3 , . . . , cn }. In general, this is a partial trajectory, and
a new element is added to the end whenever the vehicle encounters a new cell.
7 Trajectory Analysis for Driving 231
(a) (b)
Fig. 7.20 For destination prediction, GPS points are discretized based on which grid cell they fall
in (a), or which intersection they are close to (b).
(a) (b)
Fig. 7.21 As the trip progresses, we compute a destination probability for each cell. Cells with
darker borders have higher destination probabilities.
232 John Krumm
p(C|c )p(c )
p(c |C) = (7.3)
Nj=1 p(C|c( j) )p(c( j) )
Our destination likelihood term is based on our assumption that drivers take fairly
efcient routes to their destination. In order to test this, we gathered GPS data from
118 volunteer drivers representing 4300 different trips [17]. We discretized each trip
with the grid in Figure 7.20(a), so each trip was represented by a sequence of grid
cells. For each cell in each trip, we computed the driving time to the last (destination)
cell using a conventional route planner.
We measured efciency by tracking the minimum computed driving time to the
destination cell as each trip progressed. That is, for each cell in the trip, we computed
whether or not the driving time from that cell to the destination was the minimum
driving time over all the cells up to that point in the trip. If drivers were perfectly
efcient in their driving, and if our route planner gave accurate driving times, we
would expect the minimum driving time to the destination cell to decrease with
each cell-to-cell transition.
In fact, we found that drivers decreased the minimum driving time to their des-
tination for 62.5% of the cell-to-cell transitions. This seems low, but could be due
to the fact that drivers may be sensitive to trafc, while our route planner was not.
Also, we computed driving times based on the road nearest the center of each cell,
which may also be inaccurate. Despite this, we can give a simple equation for the
likelihood term in Equation 7.3 based on efcient driving.
n
p if ci is closer to c than any previous cell in C
p(C|c ) = (7.4)
i=2 1 p otherwise
7 Trajectory Analysis for Driving 233
0.2
Probability
0.15
0.1
0.05
0
0-4 5-9 10-14 15-19 20-24 25-29 30-34 35-39 > 39
Trip Time (minutes)
Fig. 7.22 We can use a distribution of trip times as a prior probability for destination prediction.
We know that there are several other clues to a drivers destination in addition to the
efcient driving likelihood discussed above. These other clues can be formulated
234 John Krumm
as prior probabilities over the grid of cells, denoted as p(c ) in Equation 7.3. This
section discusses some useful priors.
Our intuition is that most car trips are fairly short. For instance, if someone started a
trip in Los Angeles, we might be suspicious if we saw a high probability destination
prediction for New York City. This intuition is correct, according to the U.S. 2001
National Household Transportation Survey (NHTS) [3]. Figure 7.22 shows a prob-
ability distribution of trip times from the 2001 NHTS. Given a starting cell in the
grid, we can use our computed trip times and the trip time distribution to compute a
driving time prior for each cell.
The U.S. Geological Survey classies each 30m x 30m square of the U.S. into one
of 21 different ground cover types, such as water, pasture, urban, and commercial
[1]. An image of their classications for the region around Seattle, Washington USA
is shown in Figure 7.23(a). We looked up the ground cover for each trip in our GPS
data to create a ground cover prior. In our experiment, we found that the two most
popular ground cover types at destinations were:
Commercial/Industrial/Transportation Includes infrastructure (e.g. roads, rail-
roads, etc.) and all highly developed areas not classied as High Intensity Res-
idential. [2]
Low Intensity Residential Includes areas with a mixture of constructed ma-
terials and vegetation. Constructed materials account for 3080 percent of the
cover. Vegetation may account for 20 to 70 percent of the cover. These areas
most commonly include single-family housing units. Population densities will
be lower than in high intensity residential areas. [2]
Other destination priors include a drivers personal destinations, i.e. places that he or
she goes frequently, such as their home and work place. In [19] we implemented this
as an open world model, raising the probability of previously visited locations, but
leaving some non-zero probability for new places.
Another prior could be a function of which types of businesses are present. We
have found, not surprisingly, that restaurants are more common destinations than
dentists. This fact could help raise the probability of certain cells in the map.
Of course, all of these priors could vary by the time of day and day of week, as we
expect certain types of destinations to rise and fall in popularity as time progresses.
7 Trajectory Analysis for Driving 235
(a) (b)
Fig. 7.23 (a) shows the USGS ground cover classes around the Seattle, Washington USA area. The
resulting destination probabilities are shown in (b). Water and unpopulated areas are less popular
destinations.
While the focus of this section has been destination prediction, a related problem
is route prediction, where the goal is predict a drivers entire route rather than just
their stop location. In summary, here are three route prediction techniques we have
explored:
Trip Observations: Observe several trips from a driver. When a new trip starts,
attempt to nd a good match with a previous trip, and use the matched trip as a route
prediction [15].
Markov Model: For short sequences (110) of observed road segments for a
particular driver, build a probabilistic model for which road segment comes next
[16].
Turn Proportions: To predict which way a driver will turn at an intersection,
look at which turns bring the driver closer to the most destinations. This tends to
assign low probabilities to turns that result in dead ends or closed neighborhoods
[18].
It is easy to get driving directions from Web-based mapping sites and GPS-based
navigation devices. When they were rst available, these directions would give the
fastest route assuming time-invariant driving speeds. More recently, the computed
236 John Krumm
routes are sensitive to current or predicted trafc speeds, helping to route around
congestion.
Such directions, however, still fail to account for route subtleties that may affect
speeds (e.g. turn delays) or driving pleasure (e.g. complexity). To address this, re-
searchers have built routing algorithms that are heavily inuenced by the behavior
of real drivers whose routes are presumably closer to optimal.
This section presents two routing algorithms that exemplify learning by observ-
ing real drivers. The rst, T-Drive, uses GPS traces from taxi cabs to create routes
that are measurably faster than those from conventional routers. The second, TRIP,
uses an individuals driving behavior to create better, new routes.
(a) Map matching sparse (b) Identifying landmark (c) Connecting landmark
GPS traces (dots) to road roads roads with edges
segments ri
Fig. 7.24 These are the steps to creating a routing graph from taxi traces in T-Drive.
T-Drive [28] looked at GPS traces from taxi drivers in Beijing, China to compute
fast driving routes based on the assumption that taxi drivers are generally good at
efciently navigating through the city. This includes the fact that the best route may
vary with the time of day as trafc conditions vary.
The research started with three months of GPS data from over 33,000 Beijing
taxis. These taxis were already equipped with GPS sensors for the purpose of log-
ging their locations for business intelligence. Unfortunately, the GPS points were
separated in time by 25 minutes. This complicates the process of map matching,
because the route taken between GPS samples is ambiguous. This led the same re-
search team to create a new map matching algorithm specially aimed at sparsely
sampled GPS traces [29]. This step of the process is illustrated in Figure 7.24(a).
It is unlikely that a newly requested start and end point will correspond exactly
to a previous taxi route, especially a previous route at the same time of day as the
7 Trajectory Analysis for Driving 237
request. Thus, T-Drive identied landmark road segments that contained a signi-
cant number of taxi traces. These landmarks are not necessarily connected, but they
serve as start points, end points, and waypoints for computing new routes. Figure
7.24(b) shows an illustration of these landmark road segments.
Two landmark roads are connected to each other if there have been enough taxi
traces connecting them. These connections, illustrated in Figure 7.24(c), serve as
edges in a landmark graph. This graph is similar to the traditional road network
graph used for conventional route planning, but its nodes (landmark roads) represent
popular taxi roads, and its edges (landmark edges) represent taxi routes between the
landmark roads.
Based on GPS observations of the taxis, the travel times associated with the land-
mark edges vary. T-Drive introduces a clustering technique called Variance-Entropy
Clustering that splits the observed driving times on these edges into time periods
throughout the day. The clustering splits time to produce periods of stable travel
time distributions for each edge. Thus, there may be one distribution of travel times
for 7:15 a.m. to 7:50 a.m., followed by a different distribution for 7:50 a.m. to 8:10
a.m., etc.
In planning a route, the route planner uses the landmark graph as a conventional
road graph, but with two changes. First, a conventional road graph has a single
cost scalar associated with each edge, such as the travel time or length of the edge.
Instead, T-Drive has travel time distributions for each edge. Thus, prior to each route
computation, the user must specify a value of , 0 1, which indicates how
close they are to a taxis speed and aggressiveness. This value is used to choose one
travel time for each edge from the edges travel time distribution.
The second difference is that the T-Drive graph has time-varying travel times.
The clustering process, combined with a choice of , gives different travel times in
different time periods for each edge. Thus, the expected travel time of an edge near
the end of the route may change as the driver executes the route. This is a so-called
time-dependent fastest path problem for which there are standard solutions, one
of which T-Drive uses.
The rst test of the T-Drive router used GPS trajectories from 30 drivers to show
that T-Drive gave accurate driving times compare to real driving times. The re-
searchers found that = 0.6 produced a good match between the two.
Having established that T-Drive gave accurate driving times, it was compared
against synthetic route queries computed on a graph with constant edge speeds and
on a graph with real-time trafc information. For about 60% of the queries, T-Drive
gave faster routes than the graph with constant travel times, and it also outperformed
the graph with real-time trafc. This is because the trafc-sensitive router had to
resort to constant speeds on roads where it had no data and because T-Drive could
implicitly account for subtleties like pedestrians blocking the road and cars parking.
Finally, T-Drive was compared against real drivers taking T-Drive routes and
TM
routes computed from Google Maps . 81% of T-Drives routes were faster, and
saved 11.9% of driving time on average.
Recently, an extension of T-Drive system performs a self-adaptive driving direc-
tion service for a particular user. In this self-adaptive service, a mobile client (typi-
238 John Krumm
cally running on a GPS-phone) records a users driving routes and gradually learns
the users driving behavior from the GPS logs [27]. Specically, a users driving
behavior is represented by a vector of custom factors, = {1 , 2 , . . .}, where i
denotes how fast the user could drive on the landmark edge i as compared to taxi
drivers. This is different from the original T-Drive system using only one custom
factor for a user. The motivation of this work is that an individuals driving behavior
varies in routes and driving experiences. For example, traveling on an unfamiliar
route, a user has to pay attention to the road signs, hence drive relatively slowly.
Meanwhile, after becoming experienced in driving a user is likely to drive faster
than he/she did before.
While T-Drive helps drivers imitate taxis to nd the fastest route, Trip Router with
Inividualized Preferences (TRIP) helps drivers nd routes that match their implied
preferences [27]. Using GPS data from 102 different drivers who made 2517 total
trips, TRIP was designed to compute new routes that paid attention to both trafc
speeds and individual drivers preferences for certain roads. TRIP was based on the
fact that drivers do not always choose the fastest route to their destination, even
if they are familiar with the area. This is illustrated in Figure 7.25, which shows
four different routes for a drivers morning commute. The drivers usual route is
signicantly different from the shortest distance route, the fastest route computed
based on trafc speeds, and the fastest route computed by Microsoft MapPoint R
. In
fact, by looking at the GPS trips in the TRIP study, drivers choose the fastest route
only about 35% of their trips. These are drivers who are familiar with the area.
Interestingly, the work in TRIP was preceded by necessary work on map match-
ing, similar to the work on T-Drive above, resulting in another HMM-based algo-
rithm [20].
TRIP worked in two steps. The rst was to assign time-varying road speeds to ev-
ery road segment encountered by all the drivers. TRIPs road speeds were computed
as the average speed seen on each road, separated into 15-minute time intervals to
account for variations throughout the day. There was one set of speeds for week-
days and another set for weekends. If a road had no GPS data for a certain time
interval, its speed was taken as the system-wide average of roads of the same type
(e.g. arterial, highway, ramp) for that time interval. If there was no data available
for a time interval, the roads speed was taken as its speed limit. Similar to T-Drive,
these real time road speeds provide the basis for computing fast routes between any
two points.
The efcient routes computed from measured road speeds served as a baseline
for incorporating driving preferences that go beyond efciency, which was TRIPs
second step. TRIP examined all the recorded trips for each driver to compute each
drivers inefciency ratio r. The inefciency ratio reects the amount by which a
drivers actual routes are less time-efcient than the computed fastest routes. For a
7 Trajectory Analysis for Driving 239
given route, the numerator of the ratio is the duration of the fastest route between the
endpoints, computed using TRIPs road speed estimates from above. The denomi-
nator is the drivers actual driving time. This r is almost always less than one, unless
the driver has taken the fastest route or, occasionally, has found a route faster than
that based on TRIPs speed estimates. The drivers average efciency ratio, r, repre-
sents the amount he or she is implicitly discounting the time cost of their preferred
roads.
Fig. 7.25 This shows four routes for a drivers morning commute. (A) shows the drivers usual
route, (B) is the shortest distance route, (C) is the fasted route based on our own GPS study, and
(D) is the fastest route according to MapPoint R
.
A drivers efciency ratio is used to discount the cost of their preferred roads
for computing routes. Specically, TRIP computes the time cost of road segment i
as ti , based on GPS observations from all drivers as explained above. For planning
a route, TRIP uses the drivers average efciency ratio as follows to compute new
costs ci of every road segment:
rti if road i previously driven by this driver
ci = (7.5)
ti otherwise
The effect of this discounting is a reduction in cost of roads the driver has already
driven, meaning they are more likely to be chosen by the otherwise conventional
route planner.
In tests, TRIPs computed route matched the drivers actual route in 46.6% of the
test cases. This compares favorably with computing routes based on the estimated
road speeds, which matched the test trips only 34.5% of the time. Using a traditional
route planner based on static speed limits, the computed routes matched only 30%
of the time.
240 John Krumm
7.6 Summary
This chapter discussed the use of GPS traces to rst construct a road map, match
new GPS traces to an existing road map, and then use matched traces to predict a
drivers destination and to compute optimal routes. Each of these efforts depends on
an easily gathered repository of GPS traces of drivers as they drive normally, which
demonstrates the value of logged GPS data.
References
18. Krumm, J.: Where will they turn: predicting turn proportions at intersections. Personal Ubiq-
uitous Comput. 14, 591599 (2010)
19. Krumm, J., Horvitz, E.: Predestination: Inferring destinations from partial trajectories. In:
Proceedings of the 8th International Conference on Ubiquitous Computing (UbiComp 2006)
20. Krumm, J., Letchner, J., Horvitz, E.: Map matching with travel time constraints. In: Society
of Automotive Engineers (SAE) 2007 World Congress
21. Lou, Y., Zhang, C., Zheng, Y., Xie, X., Wang, W., Huang, Y.: Map-matching for low-sampling-
rate gps trajectories. In: Proceedings of the 17th ACM SIGSPATIAL International Conference
on Advances in Geographic Information Systems, GIS 09, pp. 352361. ACM, New York,
NY, USA (2009)
22. Newson, P., Krumm, J.: Hidden markov map matching through noise and sparseness. In: Pro-
ceedings of the 17th ACM SIGSPATIAL International Conference on Advances in Geographic
Information Systems, GIS 09, pp. 336343. ACM, New York, NY, USA (2009)
23. Quddus, M.A., Ochieng, W.Y., Noland, R.B.: Current map-matching algorithms for transport
applications: State-of-the art and future research directions. Transportation Research Part C-
emerging Technologies 15, 312328 (2007)
24. Rogers, S., Langley, P., Wilson, C.: Mining gps data to augment road models. In: Proceedings
of the fth ACM SIGKDD international conference on Knowledge discovery and data mining,
KDD 99, pp. 104113. ACM, New York, NY, USA (1999)
25. Schroedl, S., Wagstaff, K., Rogers, S., Langley, P., Wilson, C.: Mining gps traces for map
renement. Data Min. Knowl. Discov. 9, 5987 (2004)
26. Viola, P., Jones, M.: Rapid object detection using a boosted cascade of simple features. In:
Computer Vision and Pattern Recognition, 2001. CVPR 2001. Proceedings of the 2001 IEEE
Computer Society Conference on, vol. 1, pp. I511 I518 vol.1 (2001)
27. Yuan, J., Zheng, Y., Xie, X., Sun, G.: Driving with knowledge from the physical world (to
appear). In: Proceedings of the 17th ACM SIGKDD International Conference on Knowledge
Discovery and Data Mining, KDD 11
28. Yuan, J., Zheng, Y., Zhang, C., Xie, W., Xie, X., Sun, G., Huang, Y.: T-drive: driving directions
based on taxi trajectories. In: Proceedings of the 18th SIGSPATIAL International Conference
on Advances in Geographic Information Systems, GIS 10, pp. 99108. ACM, New York, NY,
USA (2010)
29. Yuan, J., Zheng, Y., Zhang, C., Xie, X., Sun, G.Z.: An interactive-voting based map matching
algorithm. In: Proceedings of the 2010 Eleventh International Conference on Mobile Data
Management, MDM 10, pp. 4352. IEEE Computer Society, Washington, DC, USA (2010)
Chapter 8
Location-Based Social Networks: Users
Yu Zheng
8.1 Introduction
Yu Zheng
Microsoft Research Asia, China
e-mail: [email protected]
243
244 Yu Zheng
to a social networking service such as Flickr [2], comment on an event at the exact
place where the event is happening (for instance, in Twitter [6]), share their present
location on a website (such as Foursquare [3]) for organizing a group activity in the
real world, record travel routes with GPS trajectories to share travel experiences in
an online community (for example GeoLife [60, 57, 53, 61]), or log jogging and
bicycle trails for sports analysis and experience sharing (as in Bikely [1] and [15]).
Here, a location can be represented in absolute (latitude-longitude coordinates),
relative (100 meters north of the Space Needle), and symbolic (home, ofce, or
shopping mall) form. Also, the location embedded into a social network can be
a stand-alone instant location of an individual, like in a bar at 9pm, or a location
history accumulated over a certain period, such as a GPS trajectory: a cinemaa
restauranta parka bar.
The dimension of location brings social networks back to reality, bridging the gap
between the physical world and online social networking services. For example,
a user with a mobile phone can leave her comments with respect to a restaurant
in an online social site (after nishing dinner) so that the people from her social
structure can reference her comments when they later visit the restaurant. In this
example, users create their own location-related stories in the physical world and
browse other peoples information as well. An online social site becomes a platform
for facilitating the sharing of peoples experiences.
Furthermore, people in an existing social network can expand their social struc-
ture with the new interdependency derived from their locations. As location is one
of the most important components of user context, extensive knowledge about an
individuals interests and behavior can be learned from her locations. For instance,
people who enjoy the same restaurant can connect with each other. Individuals con-
stantly hiking the same mountain can be put in contact with each other to share their
travel experiences. Sometimes, two individuals who do not share the same abso-
lute location can still be linked as long as their locations are indicative of a similar
interest, such as beaches or lakes.
These kinds of location-embedded and location-driven social structures are known
as location-based social networks, formally dened as follows:
A location-based social network (LBSN) does not only mean adding a location to
an existing social network so that people in the social structure can share location-
embedded information, but also consists of the new social structure made up of
individuals connected by the interdependency derived from their locations in the
physical world as well as their location-tagged media content, such as photos, video,
and texts. Here, the physical location consists of the instant location of an individual
at a given timestamp and the location history that an individual has accumulated
in a certain period. Further, the interdependency includes not only that two persons
co-occur in the same physical location or share similar location histories but also
the knowledge, e.g., common interests, behavior, and activities, inferred from an
individuals location (history) and location-tagged data.
8 Location-Based Social Networks: Users 245
In a location-based social network, people can not only track and share the
location-related information of an individual via either mobile devices or desktop
computers, but also leverage collaborative social knowledge learned from user-
generated and location-related content, such as GPS trajectories and geo-tagged
photos. One example is determining this summers most popular restaurant by min-
ing peoples geo-tagged comments. Another example could be identifying the most
popular travel routes in a city based on a large number of users geo-tagged pho-
tos. Consequently, LBSNs enable many novel applications that change the way we
live, such as physical location (or activity) recommendation systems [65, 63, 59, 50,
51, 58, 10] and travel planning [45, 46], while offering many new research oppor-
tunities for social network analysis (like user modeling in the physical world and
connection strength analysis) [28, 39, 16, 20, 21, 19, 25, 44], spatio-temporal da-
ta mining [29, 47, 49, 42, 64], ubiquitous computing [55, 54, 52, 56, 48, 62], and
spatio-temporal databases [35, 13, 12, 37, 14, 18].
Actually, the location data generated in the rst two LBSN services can be con-
verted into the form of a trajectory which might be used by the third category of
LBSN service. For example, if we sequentially connect the point locations of the
geo-tagged photos taken by a user over several days, a sparse trajectory can be for-
mulated. Likewise, the check-in records of an individual ordered by time can be
regarded as a low-sampling-rate trajectory. However, due to the sparseness, i.e., the
distance and time interval between two consecutive points in a trajectory could be
very big, the uncertainty existing in a single trajectory from the rst two services
is increased. Aiming to put these trajectories into trajectory-centric LBSN services,
we need to use them in a collective and collaborative way.
8 Location-Based Social Networks: Users 247
The following sections will pay closer attention to trajectory data, which is the
most complex data structure to be found in the three LBSN services, and provides
the richest information. If it is handled well, other data sources become easier to deal
with. Moreover, as mentioned above, location data can be converted into a trajectory
on many occasions. Consequently, some methodologies designed for trajectory data
can be employed by the rst two LBSN services.
User and location are two major subjects closely associated with each other in a
location-based social network. As illustrated in Fig. 8.1, users visit some locations
in the physical world, leaving their location histories and generating location-tagged
media content. If we sequentially connect these locations in terms of time, a trajec-
tory will be formulated for each user. Based on these trajectories, we can build three
graphs: a location-location graph, a user-location graph, and a user-user graph.
In the user-user graph (shown in the top-right of Fig. 8.1), a node is a user and
an edge between two nodes consists of two folds. One is the original connection
between two users in an existing social network like Twitter. The other is the new
interdependency derived from their locations, e.g., two users have visited the same
location, or similar types of places, in the real world over a certain number of visits.
The latter information, initially inferred from a users locations, can be transferred
to the former through a recommendation mechanism. In other words, we can rec-
ommend users to an individual based on the inferred interdependency. Once the
individual accepts the recommendation, the relationship switches from the second
category to the rst.
Using these graphs, we can understand users and locations respectively, and ex-
plore the relationship between them. Though the research topics are listed indi-
vidually from the perspective of users and locations as follows, these two subjects
have a mutually reinforcing relationship that cannot be studied alone:
1) Understanding users: Here, we aim to understand users based upon their locations.
Estimate user similarity [28, 16]: An individuals location history in the real
world implies, to some extent, her interests and behaviors. Accordingly, peo-
ple who share similar location histories are likely to have common interests
and behavior. The similarity between users inferred from their location his-
tories can enable friend recommendations, which connect users with similar
interests even when they may not have known each other previously [63],
and community discovery that identies a group of people sharing common
interests.
Finding local experts in a region [65]: With users locations, we are able
to identify the local experts who have richer knowledge about a region than
others. Their travel experiences, e.g., the locations where they have been,
are more accountable and valuable for travel recommendation. For instance,
local experts are more likely to know about high-quality restaurants than
some tourists.
Community discovery [39, 25]: Using the similarity inferred from users
locations, we can cluster these users into groups in which users share com-
mon interests like visiting museums. Consequently, an individual can easily
initiate a group activity, such as hiking or purchasing tickets at a group price,
by sending an invitation to the appropriate users in a social site.
2) Understanding locations: Here, we focus on understanding locations based upon
user information.
Generic travel recommendations:
Mining the most interesting locations [65]: Finding the most interesting
locations in a city as well as the travel sequences among these locations is
a general task that a tourist wants to fulll when traveling to an unfamiliar
city. Location-based social networks provide us with the opportunity to
identify such information by mining a large number of users location
histories (represented by trajectories). Refer to Section 9.2.1.
8 Location-Based Social Networks: Users 249
considerable amount of media (e.g., tweets) in the location where the event
occurs. By grouping and mining media that co-occurs in particular locations,
we can get a sense of geo-social events automatically.
Actually, the problems that traditional social networks have exist in location-based
social networks, and become more challenging due to the following reasons:
The graph representing a location-based social network is heterogeneous, con-
sisting of at least two types of nodes (user and location) and three kinds of links
(user-user, location-location, and user-location). Or, we can say there are at least
three tightly associated graphs modeling a LBSN (as mentioned previously). If
it is a trajectory-centric LBSN, trajectories can be regarded as another kind of
node in the social network; so do geotagged videos and photos. Location is not
only an additional dimension of the user, but also an important object in a LB-
SN. Under the circumstances, determining the connecting strength between two
users in a LBSN needs to involve the information from the other graphs, such as
the linking structure of user-location and location-location, besides that of users
(refer to Fig. 8.1).
Location-based social networks are constantly evolving at a faster pace than
traditional social networks, in both social structure and properties of nodes and
links. Though academic social networks are also heterogeneous with authors,
conferences, and papers, its evolves at a much slower speed than LBSNs do.
For example, it is much easier to add a new location to a LBSN (by check-in)
than launching a new conference or publishing a paper. That is, the number of
nodes in a LBSN increases faster than an academic social network. Also, it is
common for users to visit locations (e.g., restaurants and shopping malls) they
have never been before. However, researchers will not constantly attend new
conferences. Thus, the linking structure of a LBSN evolves much faster than
an academic social network. Furthermore, the properties of nodes and links in
a LBSN evolve more quickly than in an academic social network. A user can
become a travel expert in a city after visiting many interesting locations over
several months, while a researcher needs years before becoming an expert in a
research area.
A location has unique features beyond that of other objects in a social net-
work. Besides general linking relationship between locations, the hierarchical
and sequential properties of locations are unique. A location can be as small as
a restaurant or as big as a city. Locations with different granularities formulate
hierarchies between them. For example, a restaurant belongs to a neighborhood,
and the neighborhood pertains to a city. Further, the city will belong to a county
and a country, and so on. Using different granularities, we will obtain different
location graphs even given the same trajectory data. This hierarchical proper-
ty does not hold in an academic social network as a conference never belongs
to others. Regarding the sequential property, each link between two locations
is associated with temporal and directional information. Moreover, these links
can construct a sequence carrying a particular semantic meaning, e.g., a popular
travel route.
8 Location-Based Social Networks: Users 251
There are other important research points in location-based social networks. For ex-
ample, from the perspective of data management, streaming databases and indexing
user-generated location data are vital. Also, user privacy in location-based social
networks deserves to be further studied. As these topics have been discussed exten-
sively in other chapters, they will not be covered here.
So far, there is no dedicated conference for researchers and professionals to share
the research into LBSNs. While people submit LBSN-related papers to a number of
conferences such as WWW, Ubicomp, and ACM GIS, ACM SIGSPATIAL Work-
shop on Location-Based Social Networks provides a dedicated international forum
for LBSN researchers and practitioners from academia and industry to share their
ideas, research results, and experiences. This workshop was launched in 2009 and
has been in conjunction with ACM SIGSPATIAL GIS conference from 2009 to
2011.
8.2.1 Overview
To carry out the above-mentioned research, it is rst necessary to model the lo-
cation history of an individual from raw sensor data, such as GPS readings. The
methods presented in most literature [8, 24] solely pay attention to detecting signif-
icant places from the sensor data, without considering the social computing among
different users. That is, they do not study how to compare different users location
histories when modeling the location data of multiple persons. Since 2008, a series
of publications [65, 63, 59, 10, 28, 39] proposed a systematical solution for this
problem, following the paradigm of sensor data geospatial locations (signicant
places)semantic meanings (e.g., restaurants). Beyond the related methods, this
solution has the following two advantages: 1) Modeling the location history of an
individual and that of many users simultaneously, thereby making different users
location histories comparable and computable; 2) Modeling an individuals travel in
geospatial and semantic spaces respectively, allowing deeper understanding of the
individuals behavior and interests.
Given these advantages, this solution will be further introduced in later sections.
This paradigm is further illustrated using Fig. 8.2 as an example, in which two users
visited some locations and created two trajectories, Tr1 and Tr2 , respectively.
Directly measuring these two users location histories based on the GPS readings
(denoted by points) is difcult for two reasons. First, the raw sensor readings of
these two users are different even if they were visiting the same location, such as
A and C. This is caused by the intrinsic positioning error of a location-acquisition
technology and the randomness of peoples movement (e.g., people exit a building
from different gates). Second, dening a proper distance threshold (e.g. 100 meters)
is often arbitrary in determining whether two readings belong to the same location. If
252 Yu Zheng
we regard two points with a Euclidian distance smaller than 100 meters as readings
from the same location, why do those points having a distance of 101 meters not
also pertain to the same location? To address this issue, we need to convert a users
location history from sensor readings into a sequence of comparable locations in the
geographic spaces, for instance, Tr1 : A C, and Tr2 : A B C D. Note that
the focus is on the signicant places like A and B where an individual carried out
some meaningful behavior (reecting her interests), such as shopping and watching
a movie, instead of some points generated when an individual passes by a location
like a crossroad without taking any essential action. This process will be discussed
in more detail in Section 8.2.2.
However, knowing an individuals movement in the geographic spaces is not
enough to understand the individuals interests. The semantic meaning of a physical
location, e.g., a shopping center, will bring richer knowledge and context to explore
a users behavior. Given this reason, a users trajectory is further converted from
Tr1 : A C to a lake a shopping center, thereby modeling the users location
history in terms of semantic spaces. Refer to Section 8.2.3 for details.
A
Lake
D
Tr1
Tr2
Park
C
B
User1
Shopping centre User2
Fig. 8.2 Modeling the location history of a user from sensor data
2) Formulate a shared framework: All users stay points are placed together in-
to a dataset. Using a density-based clustering algorithm, this dataset is recursively
clustered into several clusters in a divisive manner. Thus, similar stay points from
various users are assigned to the same cluster, and the clusters on different layers
represent locations (geographical regions) of different granularities. This structure
of clusters, referred to as a hierarchical framework, provides various users with a
uniform framework to formulate their own graphs. Refer to the middle box shown
at the bottom of Fig. 8.3.
3) Construct a personal location history: By projecting the individual location
history onto the shared hierarchical framework, each user can build a personal
directed-graph, in which a graph node is the cluster containing the users stay points
and a graph edge stands for the users traveling sequence between these clusters
(geographic regions). To simplify the problem, we do not differentiate between the
diverse paths that a user created between two places (clusters).
In later sections, GPS logs are used as an exemplary trajectory to illustrate the
methodology. Of course, this solution can be applied to other trajectory data sources,
such as geo-tagged photos.
{C }
G1 High
c20 c21 G1
c21 l2 c21 l2
c20 c20
c30 c31 c32 c33 c34
G2 Low G2
c32 l3 c32 l3
c30 c33
Stands for a stay point S
c31 c34 G3 Stands for a stay point cluster cij c31 c34 G3
User 1's hierarchical graph HG1 Shared Hierarchical Framework User 2s hierarchical graph HG 2
Fig. 8.3 Framework for modeling users location history in geographical spaces
254 Yu Zheng
A signicant place denotes the location where an individual carried out some mean-
ingful behavior (reecting her interests), such as shopping, watching a movie, or
visiting a museum. These signicant places allow a better understanding of an
individuals interests, thereby accurately computing the interdependency between
different users. At the same time, other sensor readings outside of these signicant
places can be skipped, saving the computational load in a real system. Literature
that introduces a method for detecting signicant places includes [10, 28, 8, 24].
Basically, they share the idea of using a spatial and temporal constraint to delineate
a location from a sequence of GPS coordinates. One representative method [28, 48]
is selected and introduced below. Before going into detail, it is necessary to rst
dene some terms that will be used in Chapters 8 and 9.
Denition 8.2. Dist(pi , p j ) denotes the geospatial distance between two points pi
and p j , and Int(pi , p j ) = |pi .t p j .t| is the time interval between two points.
Denition 8.3 (Stay Point). A stay point s stands for a geographic region where a
user stayed over a certain time interval. The extraction of a stay point depends on
two scale parameters, a time threshold () and a distance threshold ( ). Formally,
given a trajectory, Tra j : p1 p2 pn , a single stay point s can be regarded
as a virtual location characterized by a sub-trajectory pi p j , which satises
the conditions that k [i, j), Dist(pk , p( k + 1)) < , Int(pi , p j ) > . Therefore,
s = (x, y,ta ,tl ), where
j
s.x = pk .x/|s|, (8.1)
k=i
j
s.y = pk .y/|s|, (8.2)
k=i
respectively stands for the average x and y coordinates of the stay point s; s.ta = pi .t
is the users arriving time on s and s.tl = p j .t represents the users departure time.
Note that a stay point does not necessarily mean a user remains stationary in a
location. Also, we do not expect to include the circumstance when an individual
is stuck in a trafc jam or waiting for a trafc signal. Instead, we aim to detect
the signicant stays reecting the semantic meanings of an individuals behavior
and interests, which usually occur in the following two situations. One is when
people enter a building and lose satellite signal over a time interval before coming
back outdoors. Figure 8.4 A) shows an example in which an individual visited a
shopping mall and stayed inside for a period of time. The other situation is when a
8 Location-Based Social Networks: Users 255
user exceeds a time limit at a certain geospatial area (outdoors). For instance, people
strolling along a nice beach (refer to Fig. 8.4 B)), or being attracted by a landmark
(See Fig. 8.4 C)) could generate a stay point.
>150m >100m
>200m
A B
Figure 8.5 demonstrates the algorithm for stay point detection, using a trajec-
tory (p1 p2 p7 ). Overall, the stay point detection algorithm includes
two operations: checking spatio-temporal constraint and expanding. As depicted in
Fig. 8.5 B), p1 and p2 cannot formulate a stay point as Dist(p1 , p2 ) exceeds the
corresponding threshold . Then, we move to p2 and nd that Dist(p2 , p3 ) < and
Dist(p2 , p4 ) < while Dist(p2 , p5 ) > (see Fig. 8.5 C)). If the time interval be-
tween p2 and p4 is larger than time threshold , the three points form a small cluster
representing a stay point. However, they might not be the entire set of the points
in this stay. Accordingly, we try to expand the stay point by continuously checking
the distance between p4 and the remaining points (p5 , p6 , p7 ) in the trajectory. As
depicted in Fig. 8.5 D), p5 and p6 are added into this stay point since they also meet
the spatio-temporal constraints. Finally, we detect (p2 p3 p4 p5 p6 ) as a
stay point because we cannot expand the cluster any further. That is, all the points
in the cluster have a distance farther than to p7 .
p2 p4 p6 p2 p4 p6
p1 p7
p1 p7
p1 , p 2)
Dist( p3 p3
p5 p5
A) B)
p2 p4 p6 p4 p6 p7
p1 p7 p2
p1
p3 p5 C) p3 p5 D)
At this point, some people might ask why not use an already existing clustering
algorithm like DBSCAN to determine the stay points. There are two reasons for not
doing so. On the one hand, as depicted in Fig. 8.4 A), if stay points are detected
256 Yu Zheng
by directly clustering raw GPS points, most signicant places like shopping malls
and restaurants will remain undetected. This is caused by the fact that GPS devices
lose satellite signal indoors, i.e., few GPS points will be generated at those places.
However, some places like intersections passed by many people will be identied
as stay points. On the other hand, if we use an interpolation operation (to ll the
lost GPS points), the computational load for clustering such a big dataset will be
extremely heavy. For instance, a 2-hour stay will generate 720 points if we use 5-
seconds as the interpolating frequency. The workload of clustering is impractical for
a real system with an increasing number of users.
However, the selection of thresholds and for the algorithm is still not easy
and depends on peoples commonsense knowledge. For example, in the experiment
of [28, 63], if an individual spent more than 15 minutes within a distance of 200
meters, the region is detected as a stay point. Although the aim is to represent each
stay of a user as precisely as possible, we have to use a proper geo-region to specify
an individuals stay for a number of reasons.
First, a strict region size, such as 2020 meters, might be more capable of ac-
curately identifying a business like a Starbucks visited by a user; however, it would
cause many stays to remain undetected. As demonstrated in Fig. 8.4 A), a user could
enter a shopping mall from Gate A while leaving the mall from Gate B (see the blue
line). Given that a shopping mall could cover a 150150 meter geo-region, the dis-
tance between the last GPS point before entering the mall and the rst point after
coming out from the mall could be larger than 150 meters; i.e., the users stay at
this shopping mall cannot be detected using a very small region constraint like 20
meters. Moreover, even if a user leaves the shopping mall from the same gate they
entered, in most cases, the distance between the last GPS point before entering and
the rst point after coming out could be larger than 100 meters. Typically, GPS
devices need some time to re-locate themselves after returning outdoors.
Second, a very small region constraint could cause the stays of people to be
over-detected. As shown in Fig. 8.4 B) and C), multiple trivial stay points could
be detected in one location when people stroll along a beach or wander around a
landmark. The data does not align with a persons perceptions that she has only
accessed one location (the beach or the landmark).
Third, these two parameters (200 meters, 15 minutes) are likely to exclude a
situation where people wait for a signal at a trafc light, and can reduce to some
extent the stay points caused by trafc jams, e.g., a trafc light does not normally
last for 10 minutes.
After detecting the stay points from an individuals GPS trajectories, we can model
the individuals location history with a sequence of stay points, which is dened as
follows:
Denition 8.4 (Location histroy). Generally, location history is a record of locations
that an entity visited in geographical spaces over an interval of time. In this book,
8 Location-Based Social Networks: Users 257
Figure 8.3 illustrates the process for formulating a shared hierarchical frame-
work. The stay points from different users are placed into one dataset, and recur-
sively clustered into several clusters in a divisive manner using a density-based clus-
tering algorithm, such as DBSCAN or OPTICS [7]. As compared to an agglomera-
tive method like K-Means, these density-based approaches are capable of detecting
clusters with irregular structures, which may stand for a set of nearby restaurants, a
beach, or a shopping street.
As a result, the similar stay points from different users are assigned to the same
cluster, and the clusters on different layers denote locations of different granulari-
ties. From the top to the bottom of the hierarchy, the geospatial scale of these clusters
decreases while the granularity of the locations (corresponding to the clusters) be-
comes ner. For example, cluster c20 on the second layer is divided into two clusters
c30 and c31 on the third layer. So, c30 and c31 have a smaller size in geographical
spaces while they are with a ner granularity than c20 . This hierarchical feature is
useful for differentiating people with different degrees of similarity. Intuitively, peo-
ple sharing the same location histories on a deeper layer might be more correlated
than on a higher layer. For instance, people visiting the same museum are more
likely to be similar than those visiting the same city.
Overall, the shared hierarchical framework provides different users with a uni-
form foundation to re-formulate their own location history, which looks like a hi-
erarchical graph. Meanwhile, this shared framework is the model representing the
location histories of a myriad of users in a LBSN.
258 Yu Zheng
After projecting these stay points onto the third layer of the shared framework, User
2s location history can be transferred to,
t t t t t t t
LocH = c31
1
c34
2
c33
3
c32
4
c31
5
c32
6
c32
7
c31 . (8.5)
Where ci j is the jth cluster on the ith layer. For instance, s1 , s5 , s6 , and s8 belong to
cluster c31 . Further, we merge the same cluster (like c31 ) continuously appearing in
a users location history.
t t t t t t
LocH = c31
1
c34
2
c33
3
c32
4
c31
6
c32
7
c31 . (8.6)
In this section, an individuals stay in the physical world is provided with some se-
mantic meanings, e.g., museum cinema restaurant, aiming to transfer human
location history from the geographical spaces into semantic spaces. The semantic
meaning of a location reveals the interests of an individual better than its original
geo-position, and enables detection of similar users without any overlapping of ge-
ographic spaces, e.g., people living in different cities.
Expanding the method introduced in Section 8.2.2, [39] proposed a solution that
is comprised of the following three steps: 1) stay point representation in semantic
spaces, 2) the formulation of a shared semantic framework, and 3) the construction
8 Location-Based Social Networks: Users 259
of personal location histories. The major difference between this method and that
designed for geographical spaces lies in the rst step. The three steps are detailed in
the following subsections.
This step aims to represent a stay point (detected in Section 8.2.2.1) with the seman-
tic meaning (e.g., a restaurant) of the location where the stay occurred. However, it
is almost impossible to identify the exact point of interest (POI) an individual has
visited given a stay point, because of the GPS positioning error and the crowded
distribution of POIs in a city. In practice, as shown in Fig. 8.6, a GPS reading usu-
ally has a 10-meter or more error in its real position. Accordingly, there could be
multiple POIs of different categories involved in this distance. Unfortunately, the n-
earest POI to the center of a stay point may not be the actual place that an individual
visited. What is worse, many POIs, like restaurants, shopping malls, and cinemas,
often overlap in the same building.
2
A stay point The POI truly
s=(x, y) visited by a user
A building with
The closest POI to multiple POIs
the GPS reading overlapped
(s.x+, s.y+)
Due to the challenge mentioned above, it is necessary to rst expand a stay point
to a stay region covering the POI that a user has visited. For example, as depicted
in Fig. 8.6, a stay point s is expanded to a region [s.x , s.x + ] [s.y , s.y + ]
where is a parameter formulating a bounding box. The value of is related to the
threshold for detecting a stay point.
After that, a feature vector is constructed for each stay region according to the
POIs located in a region (dened in Denition 8.6). Here, TF-IDF (term frequency-
inverse document frequency) [32, 33], a statistical measurement used to evaluate
how important a word is to a document in a collection or corpus, is employed. The
importance increases proportionally to the number of times a word appears in the
document but is offset by the frequency of the word in the corpus.
Similarly, the method proposed in [39] regards categories of POIs as words and
treats stay regions as documents. Intuitively, if POIs of a category occur in a region
many times, this POI category is important in representing this region. Furthermore,
if a POI category (e.g., museum and natural parks) occurs rarely in other region-
s, the category is more representative for the region (in which it is located) beyond a
common POI category, e.g., restaurant, which appears in many places. Thus, both
260 Yu Zheng
the occurrence frequency of a POI category in a region (similar to TF) and the in-
verse location frequency (equivalent to IDF) of this category have been considered
in [39]. Combining these two factors, the feature vector is dened as follows:
Denition 8.6 (Feature Vector). The feature of a stay region r in a collection of
regions R is fr =< w1 , w2 . . . , wK >, where K is the number of unique POI categories
in a POI database and wi is the weight of POI category i in the region r. The value
of wi is calculated as Eq. 8.7:
ni |R|
wi = log (8.7)
N |{Regions containing i}|
Suppose that s1 contains two restaurants and one museum, and s2 only has four
restaurants. The total number of stay regions created by all the users is 100, in which
50 have restaurants and two contain museums. So, the feature vectors of s1 and s2
are f1 and f2 respectively:
2 100 1 100
f1 = ( log , log , . . .),
3 50 3 2
4 100
f2 = ( log , 0, . . .).
4 50
Although we still cannot identify the exact POI category visited by an individual,
this feature vector determines the interests of a user to some extent by extracting the
semantic meaning of a region accessed by the individual. For example, people are
likely to conduct similar activities at similar places. Also, users visiting locations
with similar POI categories may have similar interests. Consequently, the represen-
tation of a stay point carries advanced semantic information (beyond its geograph-
ical position), contributing to a broad range of applications in LBSNs, such as the
calculating of similarity between two users in terms of their location histories and
activity inferences.
Step 2: Formulating a shared semantic framework: The second step clusters the s-
tay regions into groups according to their feature vectors. The stay regions in the
same cluster can be regarded as locations of similar type with similar semantic
meanings. However, a at clustering is insufcient to differentiate similar users of
different extents. Intrinsically, we are more capable of discriminating similar users
given categories with a ner granularity. For example, restaurant helps identify
users who like dining out, while Indian restaurant and Japanese restaurant en-
able us to differentiate people interested in different types of food.
Considering this factor, the feature vectors are hierarchically clustered in a divi-
sive manner, building a tree-structured sematic location hierarchy. This is similar to
generating a shared framework in the geographical spaces (refer to Section 8.2.2.2).
As shown in the middle part of Fig. 8.7, feature vectors of all users are placed into
8 Location-Based Social Networks: Users 261
Feature
spaces
Feature vectors of stay regions Feature vectors of stay regions
Hierarchical
clustering
)HDWXUHVSDFH
)HDWXUH
)HDWXUHVSDFH
VSDFH
/D\HU C2 /D\HU
c20 c21
/D\HU C3 /D\HU
c31
one cluster and this cluster is treated as the root (i.e., cluster at layer 1). Each cluster
c at layer j ( j 0) is split into a set of sub-clusters by using a at clustering algorith-
m. The resulting sub-clusters of c are considered cs child nodes at layer j + 1. This
procedure repeats a given number of times, leading to a tree-structured hierarchy
where clusters at a lower layer have a ner granularity.
Step 3: Construct personal location history: In the third step, a location history
is constructed for each user based on the semantic location hierarchy and the users
stay points. Originally, a users location history in the geographic spaces is repre-
sented by a sequence of stay points with the travel time between each two consecu-
tive stay points. Then, on each layer of the semantic location hierarchy, a stay point
is substituted with the semantic location that the stay points feature vector pertains
to. After this projection, different users location histories become comparable in
the semantic spaces.
262 Yu Zheng
locations were visited. The longer the similar sequences shared by two users
location histories are, the more related these two users might be.
Hierarchical property of geographic spaces: This framework mines user simi-
larity by exploring movements on different scales of geographic (or, semantic)
spaces. Users who share similar location histories on a space of ner granulari-
ties might be more correlated. For example, people accessing the same building
could be more similar then those visiting the same city. In this example, a build-
ing belongs to a lower layer of the geographic hierarchy than the city. This claim
also holds in semantic spaces. For instance, two users sharing an interest in din-
ing at Chinese restaurants might be more similar than others who generally like
dinning in any restaurant. Here, the Chinese restaurant is a subset of restaurants,
thereby having a ner granularity.
Popularity of different locations: Analogous to inverse document frequency
(IDF) [34], the proposed framework considers the visited popularity of a lo-
cation when measuring the similarity between users. Two users who access a
location visited by a few people might be more correlated than others who share
a location history accessed by many people. For example, a myriad of people
have visited the Great Wall, a well-known landmark in Beijing. It might not
mean all these people are similar to one another. If two users visited a small
museum, however, they might indeed share some similar preferences.
The input of this framework is the location histories (i.e., two hierarchical graphs)
of two users in geographical or semantic spaces, and the output is a similarity score
indicating how similar these two users are.
In this step, the sub-sequences shared by two users at each layer of their hierarchical
graph are determined. Intuitively, users sharing the habit of cinema restaurant
shopping are more similar to each other than those visiting these three places sep-
arately or in a different order. Therefore, the simple method counting the number
of items shared by two sequences will lose a great deal of information about an
individuals behavior and preferences. To address this issue, we must consider both
the order of visitation and the travel time between two locations when detecting
similar sub-sequences. Under the circumstances, Travel Match and Maximum Trav-
el Match are dened as follows:
t1 t2 tm1
Notation: Given sequence Seq = (c1 c2 cm ), we denote
the i-th item of Seq as Seq[i] (e.g., Seq[1]=c1 ) and represent its subsequence
as Seq[a1 , a2 , . . . , ak ] where 1 a1 < a2 < m, for instance, Seq[1, 3, 6, 7]=
c1 c3 c6 c7 .
Denition 8.7 (Travel Match). Given a temporal constraint factor [0, 1] and
two sub-sequences Seq1 [a1 , a2 , . . . , ak ] and Seq2 [b1 , b2 , . . . , bk ] from two sequences
264 Yu Zheng
Seq1 and Seq2 respectively, these two sub-sequences formulate a k-length travel
match if they hold the following two conditions:
1. i [1, k], ai = bi , and
| ti = ti |
2. i [1, k), max( ti , ti )
p, where ti is the travel time between ai and ai+1 ,
and ti denotes that between bi and bi+1 .
1 2 3 4 5 6 7
2 0.5 1 1
2 4 0.5 5 2
Seq1 A B C D E F
1 0.5 2 3.5 1
2 4 0.5 2 2 2
Seq2 A B D C E F G
Let = 0.2 in this example. First, (1, 1) (2, 2), i.e., A B, is a travel match,
because the travel times (A B) in Seq1 and Seq2 are identical, |2 2|/2 = 0.
Then, we nd that (2, 2) (3, 4), i.e., B C, also satises the conditions dened
in Denition 8.7. Though B and C are not directly connected in Seq2 , the travel
time between these two locations is 4 + 0.5 + 0.5 = 5, which is very similar to that
of Seq1 . In short, |5 4|/5 = 0.2. However, both A B and B C are not the
maximum travel match in this example as they are contained in A B C, i.e.,
(1, 1) (2, 2) (3, 4). Later, C E and C F cannot formulate travel matches
due to the difference between corresponding travel times. Using the same approach,
we nd (1, 1) (2, 2) (4, 3) (5, 5) (6, 6), i.e., A B D E F, is
another maximum travel match. Overall, we detect two maximum travel matches,
A B C and A B D E F from Seq1 and Seq2 .
Some well-known sequence matching algorithms, such as longest common sub-
sequences (LCSS) searching [36]] and dynamic time wrapping (DTW) [43], cannot
satisfy the need to discover the maximum travel matches as they do not incorporate
the travel time between two locations in the matching process. Due to this reason, a
method has been proposed in [39] for detecting the maximum travel matches from
two sequences. This method consists of two steps, summarized as follows:
The rst step detects the 1-length travel matches between two sequences and
identies a precedence relation between these 1-length matches. For example, A
in Fig. 8.8, i.e., (1,1), is a 1-length travel match between Seq1 and Seq2 , and A is
a precedence of B. Then, the 1-length matches and their precedence relation are
transferred into a precedence graph G, where a node is a 1-length match and an
edge corresponds to the precedence relation between 1-length matches.
The second step searches graph G for the maximum length path which has been
proved equivalent to the maximum matches.
Following the case illustrated in Fig. 8.8, Fig. 8.9 shows an example of building
graph G based on Seq1 and Seq2 . As demonstrated in Fig. 8.9 A), the identical items
in two sequences are rst detected by putting these two sequences into a matching
matrix. The numbers that stand on the top and left of the matrix denote the index
of an item in a sequence. For example, A11 means that A is the rst item in both
sequences. In Fig. 8.9 B), each node corresponds to a trivial match, and an edge
between two nodes stands for a precedent relation between two trivial matches. The
number in a node indicates its order being added to the graph. For instance, F66 is
the rst node being added to graph G.
After the graph building process, precedence graph G is a directed acyclic graph
in which a path represents a travel match (between two sequences). More speci-
cally, if (a1 , b1 ) (a2 , b2 ) (ak , bk ) is a path in G, Seq1 [a1 , a2 , . . . , ak ] and
Seq2 [b1 , b2 , . . . , bk ] form a travel match, and vice versa. Meanwhile, path P in G cor-
responds to a maximum travel match if the rst node of P has zero in-degree and
the last node has zero out-degree. For instance, path A11 B22 C34 in Fig. 8.9 b)
corresponds to the maximum travel match (1, 1) (2, 2) (3, 4) in Fig. 8.8.
266 Yu Zheng
Index 1 2 3 4 5 6 A11
A B C D E F Seq1 A 6
1 A 1 0 0 0 0 0 redundant A precedent
B 0 1 0 0 0 0 relationship
2 5
3 D 0 0 0 1 0 0 C34 B22
4 3 D43
4 C 0 0 1 0 0 0
Seq2
5 E 0 0 0 0 1 0 E55 2
6 F 0 0 0 0 0 1 A 1-length
7 G 0 0 0 0 0 0 1 F66 match
After detecting the maximum travel matches from two users location sequences,
a similarity score can be calculated for the two users according to the following
three factors: visited popularity of a location, sequential properties, and hierarchical
properties, which were introduced in the beginning of Section 8.3.2 and are formally
dened in Eq. 8.8, 8.9, 8.10, and 8.11.
L
SimUser(LocH1 , LocH2 ) = fw (l) SimSq(Seql1 , Seql2 ); (8.8)
l=1
mj=1 simT M(t j )
SimSq(Seq1 , Seq2 ) = , (8.9)
|Seq1 | |Seq2 |
k
SimT M(s) = gw (k) vp(ci ); (8.10)
i=1
N
vp(c) = log , (8.11)
n
where N is the total number of users in the dataset and n is the number of users
visiting location c.
Given two users location histories LocH1 and LocH2 , the similarity between
them can be computed by summing up the similarity score at each layer of the
hierarchical graph (refer to Denition 8.5 for details) in a weighted way. A function
fw (l) is employed to assign a bigger weight to the similarity of sequences occurring
at a lower layer, e.g., fw (l) = 2l1 , where l is the depth of a layer in the hierarchy.
Then, the similarity between two sequences Seq1 and Seq2 at a layer, SimSq(Seq1 ,
Seq2 ), is represented by the sum of the similarity score, simT M(t j ), of each max-
imum travel match between Seq1 and Seq2 . Here, m is the total number of maxi-
mum matches. Meanwhile, SimSq(Seq1 , Seq2 ) is normalized by the production of
8 Location-Based Social Networks: Users 267
the lengths of the two sequences, since a longer sequence has a higher probability
of having long matches. That is, a user with a longer history of data is more likely to
be similar to others (than a user having a shorter period of data) without performing
the normalization.
Further, the similarity score of a maximum travel match t, simT M(t), is calculat-
ed by summing up the vp (visited popularity) of each location c contained in t. At the
same time, the simT M(t) is weighted in terms of the length k of t, e.g., gw (k) = 2k1 .
The insight leading to Eq. 8.10 and 8.11 is based on two aspects. First, the longer
the similar sequences shared by two users location histories, the more related these
two users are likely to be (this is known as the sequential property). Second, users
who have accessed a location visited by a few people might be more correlated than
others who share a location history accessed by many people (the visited popularity
of a location). According to the experimental results, it was discovered that the num-
ber of shared sub-sequences exponentially decreases with the increase of the length
of the sub-sequence. So, in the implementation, its preferable to use an exponential
weight function, assigning a higher weight to the longer sequences.
Note that this framework can be applied to the location history modeled either
in geographical or semantic spaces. Specically, when applying this framework to
the location history in geographical spaces, a location is a cluster of stay points as
depicted in Fig. 8.3, while a location is replaced by a group of semantic features in
the semantic spaces illustrated in Fig. 8.7.
8.4.1 Methodology
With the user similarity calculated above, we can hierarchically cluster users into
groups in a divisive manner by using some clustering algorithms like K-mean. Con-
sequently, as depicted in Fig. 8.10, we can build a user cluster hierarchy, where a
cluster denotes a group of users sharing some similar interests and different layers
represent different levels of similarity. The clusters shown on a higher layer could
stand for big communities in which people share some high-level interests, such as
sports. The clusters occurring on the lower layers denote people sharing some nar-
rower interests, like hiking (the layer of the hierarchy can be determined based on
the needs of applications). Meanwhile, we can nd one representative user (the cen-
ter) for each cluster according to the similarity scores between each pair of users.
For instance, the individual with the minimal distance to other users in the cluster
(the individual pertains to) can be selected as the representative user of the cluster.
This user hierarch brings us two types of advantages:
1) Fast retrieval of similar users: Instead of checking all the users, we can retrieve
the top k similar users for an individual by only ranking the users from the same
cluster (the individual belongs to) in terms of similarity score. This retrieval process
268 Yu Zheng
C1
u1 u2 C2 uk Ck
Inserting a new user
Fig. 8.10 Finding similar users and inserting new users in hierarchical user clusters
can start from the bottom layer of the hierarchy, as depicted by the blue dash arrow
in Fig. 8.10. If the number of users is less than k in the bottom-layer cluster, we
can further check the parent node (cluster) of this cluster until nding a cluster with
more than k users.
2) Insert new users: When a new user u enters the system, it is not necessary to
compute the similarity score between u and each user in the system. This process
is very time consuming and will become more difcult as the number of users in-
creases. Instead, we only need to insert this user into the most appropriate clusters
on each layer of the hierarchy by computing the similarity between u and the rep-
resentative user in a cluster. For example, as demonstrated by the red solid arrows
in Fig. 8.10, we rst compute the similarity between u and (u1 , u2 , . . . , uk ) who are
representative users in each cluster. If u2 is the most similar user to u out of the k
users, we insert u into u2 s cluster C2 . Then, we further check the children clusters
of C2 and insert u into the clusters whose representative user is the most similar
to u . This process is performed iteratively until reaching the bottom layer of the
hierarchy.
In practice, we do not need to re-build this hierarchy unless the number of newly
inserted users exceeds a certain threshold. That is, in most cases we can nd similar
users for a person very efciently.
The biggest challenge of the evaluation comes from the data, consisting of location
data such as GPS trajectories and the social structure, of many users. To collect the
data, a research group typically needs to deploy a location-based social network-
8 Location-Based Social Networks: Users 269
ing service and encourage enough people to use this service in a certain period,
e.g., 3 months. Without an online LBSN service, they could assign some location-
acquisition devices like GPS loggers to a group of users and collect the data ofine.
Both ways are very time-consuming and resource-intensive, thereby becoming a
major barrier to many professionals stepping into this eld.
In recent years, a few real-world datasets created by some pioneers were made
available on the Internet for free download, for example, the reality mining dataset
[5] from MIT media laboratory and GeoLife GPS Trajectories [4] from Microsoft
research. The reality mining dataset was collected by one hundred human subjects
with a Bluetooth-enabled mobile phone over the course of nine months, representing
500,000 hours of data on users location, communication, and device usage behav-
ior.
The GeoLife GPS Trajectories was collected by 170 users with a GPS logger
or GPS-phone (see Fig 8.11) over a period of four years (from April 2007 to the
date when this book was published). This dataset is still growing and upgrading
with an annual release. The latest version (released in July, 2011) is comprised of
17,085 GPS trajectories with a total distance over 1,000,000km and an effective
duration over 48,000 hours. 95 percent of these trajectories are logged in a dense
representation, e.g., every 25 seconds or every 510 meters per point. Figure 8.12
shows the distribution of this dataset in the urban area of Beijing, where the gures
associated with the colored bar indicate the number of GPS points in a location.
Fig. 8.11 GPS devices used for collecting data in GeoLife Project
This dataset recorded a broad range of users outdoor movements, including not
only daily routines like going to work but also some entertainment and sports ac-
tivities, such as shopping, sightseeing, dining, hiking, and cycling. A part of these
trajectories has a label of transportation modes including driving, riding a bike, tak-
ing a bus, and walking. These datasets provide professionals with a good resource
to evaluate their early research into LBSN, signicantly boosting the LBSN com-
munity. Detailed information can be found at the website [4].
The advent of some commercial LBSN services like Foursquare brings new op-
portunities to carry out evaluations using large-scale and real-world data. For exam-
ple, Foursquare released an API set allowing LBSN researchers to crawl the publi-
cally available check-in records generated by users. The collected data includes the
venue where a user checked in and a corresponding timestamp as well as the tips
270 Yu Zheng
42,200
40.05
35,000
40
27,800
39.95
20,600
39.9
13,400
39.85
39.8 6,170
Fig. 8.12 The distribution of GeoLife dataset in the urban area of Beijing
that the user left in the venue. At the same time, the social structure of a user can
be obtained by using this API. A great deal of research based on such data has been
published [16, 41, 40], verifying some hypothesis proposed in LBSN, e.g., people
with similar location histories can be correlated.
The second challenge stems from ground truth. For example, to evaluate a friend
recommendation, we need to rank people according to the similarity inferred in
terms of location histories. The ability to obtain an idea ranking (i.e., ground truth)
is important. Generally speaking, there are two ways of generating ground truth.
One is performing a questionnaire-style user study. The other is to extract ground
truth from an individuals social structure [17, 38, 9, 31].
The former approach usually provides the users who collect location data for the
research with a questionnaire inquiring about their interests. In the GeoLife project,
for example, each user answered the questions shown in Fig. 8.13 A) by giving a
rank (14) to denote different degrees of desire for an activity. A users answer,
e.g., Fig. 8.13 B), is regarded as an interest vector, in which each entry is the users
rank to a corresponding question. In the example, the users interest vector is <
3, 2, 1, 4, 3, 1, 3, 1, 2, 3, 1, 1 >. A cosine similarity between two users interest vectors
can be calculated and used to rank a group of people for an individual. As a result,
the top k people can be retrieved as a ground truth. Due to the intensive human
effort, this kind of approach can only be applied to a small scale of people such as
when using the Reality Mining Dataset and GeoLife GPS Trajectories.
8 Location-Based Social Networks: Users 271
The latter approach uses the closeness between two users inferred from the con-
nections in their social structure as the ground truth. For example, random walk the-
ory [17] can be used to analyze the closeness of two nodes (i.e., friendship strength
in a social network context) using the resistance distance, which is the random walk
steps for the electrons traveling from one node to the other, in a social graph. How-
ever, the random walk theory completely overlooks semantic information contained
in social networks. As a result, recently, more advanced research have been pro-
posed to analyze the closeness between two users considering: 1) the similarity of
their prole [38, 11], e.g., demographics like age, gender, and hometown, and 2) in-
teraction activities [9, 22, 31], e.g., commenting, tagging, and group communication
patterns.
The third challenge is the metric used to measure the effectiveness of inferred user
similarity, given the data and ground truth. As mentioned before, user similarity is
a metric specifying to what extent two users are similar to each other, instead of a
binary value indicating whether two users are similar or not. The goal is to rank a
group of people for an individual according to similarity and recommend the top k
people as potential friends to the individual. Accordingly, it is natural to look at user
similarity as an information retrieval problem.
Given an individual, the top k similar users to the individual can be retrieved ac-
cording to their similarity scores (inferred by the approach mentioned previously).
An idea rank can be formulated from the ground truth (which was obtained by using
one of the methods mentioned in Section 8.4.3). Based on these two ranking list-
s, MAP (Mean Average Precision) and nDCG (Normalized Discounted Cumulated
272 Yu Zheng
Gain) are calculated for retrieval. After testing all users, a mean value of MAP and
nDCG is computed respectively.
More specically, when generating the ground truth for an individual, users
are divided into groups according to their similarity scores to the individual. As
demonstrated in Fig. 8.14, users are ranked in terms of the similarity scores to the
individual, and then split into 5 classes: 04. The users in class 4 have a higher
similarity score than those in a lower class. The split can be driven by evenly parti-
tioning the similarity scores or by a uniform division of users. The number of classes
is determined by application which can assign each cluster a semantic meaning as in
the example shown in Fig. 8.14. Afterwards, the numeric value of a (ground truth)
similarity is replaced by the class ID it pertains to.
In the testing phase, the top k users are retrieved for an individual according to our
method (based on location history). Then, a ranking list e.g., G = (U3 ,U2 , . . . ,U5 )
can be obtained. By replacing these user IDs with the corresponding class IDs, an-
other ranking list, e.g., G = (4, 3, 2, 3, , 0), is formulated. Now, a score for this rank-
ing list can be calculated in terms of nDCG. nDCG is used to compute the relative-
A query user
Retrieve Similar Users
Strongly 1.00
4 Ground Truth
similar .
U1, U2, Ui, , Un Top Ten Similar Users
0.75
Similar 3 . (U3, U2,, U5)
U1, / 2, 3, 0,
Weakly 0.57
2 U2, 2, / 4, 1,
Similar . Get Ground Truth
....
...
0.38
Ui 2, 3, / 2,
Neutral 1 . G=(4, 3, 2, 3,0,1,,0,0 )
0.23
...
Un 0 1 1 /
Dis-similar 0 . Calculating
0.00 NDCG and MAP
DCG[1] = G[1] = 4;
DCG[2] = DCG[1] + G[2] = 4 + 2 = 6;
DCG[3] = DCG[2] + (G[3])/(log2 3) = 6 + 1.893 = 7.893;
8 Location-Based Social Networks: Users 273
However, the idea ranking should be G = (4, 3, 3, 2, 0). According to the same
method, the DCG [3] = 8.893. As a result,
DCG[3] 7.893
nDCG[3] =
= = 0.888.
DCG [3] 8.893
8.5 Summary
This chapter dened a location-based social network and discussed a research phi-
losophy from the perspective of user and location. Three categories of location-
based social networking services were classied in terms of the location data pow-
ering a service and a users preferences in the service. Then, research focusing
on understanding users in a location-based social network was gradually explored
from modeling the location history of an individual to estimating the similarity be-
tween different users, and then moving to high-level applications, such as friend
recommendation and community discovery. Some possible methods for evaluation
of these applications were discussed, and a number of publically available datasets
have been listed as well. All these efforts are enabled by the unprecedented wealth
of user-generated trajectories.
References
1. Bikely. http://www.bikely.com
2. Flickr. http://www.ickr.com
3. Foursquare. https://foursquare.com
4. GeoLife GPS Trajectories. http://research.microsoft.com/en-us/downloads/b16d359d-d164-
469e-9fd4-daa38f2b2e13/default.aspx
5. The Reality Mining Dataset. http://reality.media.mit.edu/dataset.php
6. Twitter. http://twitter.com
7. Ankerst, M., Breunig, M.M., Kriegel, H.P., Sander, J.: Optics: ordering points to identify the
clustering structure. In: Proceedings of the 1999 ACM SIGMOD international conference on
Management of data, SIGMOD 99, pp. 4960. ACM, New York, NY, USA (1999)
8. Ashbrook, D., Starner, T.: Using gps to learn signicant locations and predict movement across
multiple users. Personal Ubiquitous Comput. 7, 275286 (2003)
9. Backstrom, L., Leskovec, J.: Supervised random walks: predicting and recommending links in
social networks. In: Proceedings of the fourth ACM international conference on Web search
and data mining, WSDM 11, pp. 635644. ACM, New York, NY, USA (2011)
10. Cao, X., Cong, G., Jensen, C.S.: Mining signicant semantic locations from gps data. Proc.
VLDB Endow. 3, 10091020 (2010)
11. Chen, J., Geyer, W., Dugan, C., Muller, M., Guy, I.: Make new friends, but keep the old:
recommending people on social networking sites. In: Proceedings of the 27th international
conference on Human factors in computing systems, CHI 09, pp. 201210. ACM, New York,
NY, USA (2009)
274 Yu Zheng
12. Chen, Y., Jiang, K., Zheng, Y., Li, C., Yu, N.: Trajectory simplication method for location-
based social networking services. In: Proceedings of the 2009 International Workshop on
Location Based Social Networks, LBSN 09, pp. 3340. ACM, New York, NY, USA (2009)
13. Chen, Z., Shen, H.T., Zhou, X., Zheng, Y., Xie, X.: Searching trajectories by locations: an
efciency study. In: Proceedings of the 2010 international conference on Management of
data, SIGMOD 10, pp. 255266. ACM, New York, NY, USA (2010)
14. Chow, C.Y., Bao, J., Mokbel, M.F.: Towards location-based social networking services. In:
Proceedings of the 2nd ACM SIGSPATIAL International Workshop on Location Based Social
Networks, LBSN 10, pp. 3138. ACM, New York, NY, USA (2010)
15. Counts, S., Smith, M.: Where were we: communities for sharing space-time trails. In: Proceed-
ings of the 15th annual ACM international symposium on Advances in geographic information
systems, GIS 07, pp. 10:110:8. ACM, New York, NY, USA (2007)
16. Cranshaw, J., Toch, E., Hong, J., Kittur, A., Sadeh, N.: Bridging the gap between physical
location and online social networks. In: Proceedings of the 12th ACM international conference
on Ubiquitous computing, Ubicomp 10, pp. 119128. ACM, New York, NY, USA (2010)
17. Doyle, P.G., Snell, J.L.: Random walks and electric networks (1984)
18. Doytsher, Y., Galon, B., Kanza, Y.: Querying geo-social data by bridging spatial networks and
social networks. In: Proceedings of the 2nd ACM SIGSPATIAL International Workshop on
Location Based Social Networks, LBSN 10, pp. 3946. ACM, New York, NY, USA (2010)
19. Eagle, N., de Montjoye, Y.A., Bettencourt, L.M.A.: Community computing: Comparisons be-
tween rural and urban societies using mobile phone data. In: Proceedings of the 2009 Inter-
national Conference on Computational Science and Engineering - Volume 04, pp. 144150.
IEEE Computer Society, Washington, DC, USA (2009)
20. Eagle, N., Pentland, A., Lazer, D.: Inferring social network structure using mobile phone data.
Proceedings of the National Academy of Sciences (PNAS) 106, 15,27415,278 (2007)
21. Eagle, N., (Sandy) Pentland, A.: Reality mining: sensing complex social systems. Personal
Ubiquitous Comput. 10, 255268 (2006)
22. Gilbert, E., Karahalios, K.: Predicting tie strength with social media. In: Proceedings of the
27th international conference on Human factors in computing systems, CHI 09, pp. 211220.
ACM, New York, NY, USA (2009)
23. Goldberg, D., Nichols, D., Oki, B.M., Terry, D.: Using collaborative ltering to weave an
information tapestry. Commun. ACM 35, 6170 (1992)
24. Hariharan, R., Toyama, K.: Project lachesis: Parsing and modeling location histories. In:
Proceedings of the 3rd International Conference on Geographic Information Science, pp. 106
124 (2004)
25. Hung, C.C., Chang, C.W., Peng, W.C.: Mining trajectory proles for discovering user com-
munities. In: Proceedings of the 2009 International Workshop on Location Based Social Net-
works, LBSN 09, pp. 18. ACM, New York, NY, USA (2009)
26. Jarvelin, K., Kekalainen, J.: Cumulated gain-based evaluation of ir techniques. ACM Trans.
Inf. Syst. 20, 422446 (2002)
27. Lee, R., Sumiya, K.: Measuring geographical regularities of crowd behaviors for twitter-based
geo-social event detection. In: Proceedings of the 2nd ACM SIGSPATIAL International Work-
shop on Location Based Social Networks, LBSN 10, pp. 110. ACM, New York, NY, USA
(2010)
28. Li, Q., Zheng, Y., Xie, X., Chen, Y., Liu, W., Ma, W.Y.: Mining user similarity based on
location history. In: Proceedings of the 16th ACM SIGSPATIAL international conference on
Advances in geographic information systems, GIS 08, pp. 34:134:10. ACM, New York, NY,
USA (2008)
29. Liu, W., Zheng, Y., Chawla, S., Yuan, J., Xie, X.: Discovering spatio-temporal causal interac-
tions in trafc data streams. In: The 17th ACM SIGKDD international conference on Knowl-
edge Discovery and Data mining, KDD 11. ACM, New York, NY, USA (2011)
30. Nakamura, A., Abe, N.: Collaborative ltering using weighted majority prediction algorithms.
In: Proceedings of the Fifteenth International Conference on Machine Learning, ICML 98,
pp. 395403. Morgan Kaufmann Publishers Inc., San Francisco, CA, USA (1998)
8 Location-Based Social Networks: Users 275
31. Roth, M., Ben-David, A., Deutscher, D., Flysher, G., Horn, I., Leichtberg, A., Leiser, N.,
Matias, Y., Merom, R.: Suggesting friends using the implicit social graph. In: Proceedings of
the 16th ACM SIGKDD international conference on Knowledge discovery and data mining,
KDD 10, pp. 233242. ACM, New York, NY, USA (2010)
32. Salton, G., Buckley, C.: Term-weighting approaches in automatic text retrieval. Inf. Process.
Manage. 24, 513523 (1988)
33. Salton, G., Fox, E.A., Wu, H.: Extended boolean information retrieval. Commun. ACM 26,
10221036 (1983)
34. Sparck Jones, K.: A statistical interpretation of term specicity and its application in retrieval,
pp. 132142. Taylor Graham Publishing, London, UK, UK (1988)
35. Tang, L.A., Zheng, Y., Xie, X., Yuan, J., Yu, X., Han, J.: Retrieving k-nearest neighboring
trajectories by a set of point locations. In: The 12th Symposium on Spatial and Temporal
Databases (2011)
36. Vlachos, M., Gunopoulos, D., Kollios, G.: Discovering similar multidimensional trajectories.
In: Proceedings of the 18th International Conference on Data Engineering, ICDE 02, pp.
673684. IEEE Computer Society, Washington, DC, USA (2002)
37. Wang, L., Zheng, Y., Xie, X., Ma, W.Y.: A exible spatio-temporal indexing scheme for large-
scale gps track retrieval. In: Proceedings of the The Ninth International Conference on Mobile
Data Management, pp. 18. IEEE Computer Society, Washington, DC, USA (2008)
38. Xiang, R., Neville, J., Rogati, M.: Modeling relationship strength in online social networks.
In: Proceedings of the 19th international conference on World wide web, WWW 10, pp.
981990. ACM, New York, NY, USA (2010)
39. Xiao, X., Zheng, Y., Luo, Q., Xie, X.: Finding similar users using category-based location
history. In: Proceedings of the 18th SIGSPATIAL International Conference on Advances in
Geographic Information Systems, GIS 10, pp. 442445. ACM, New York, NY, USA (2010)
40. Ye, M., Shou, D., Lee, W.C., Yin, P., Janowicz, K.: On the semantic annotation of places
in location-based social networks. In: The 17th ACM SIGKDD international conference on
Knowledge Discovery and Data mining, KDD 11. ACM, New York, NY, USA (2011)
41. Ye, M., Yin, P., Lee, D.L., Lee, W.C.: Exploiting geographical inuence for collaborative
point-of-interests recommendation. In: The 34th international ACM SIGIR conference on
Research and development in information retrieval, SIGIR 11. ACM, New York, NY, USA
(2011)
42. Ye, Y., Zheng, Y., Chen, Y., Feng, J., Xie, X.: Mining individual life pattern based on location
history. In: Proceedings of the 2009 Tenth International Conference on Mobile Data Man-
agement: Systems, Services and Middleware, MDM 09, pp. 110. IEEE Computer Society,
Washington, DC, USA (2009)
43. Yi, B.K., Jagadish, H.V., Faloutsos, C.: Efcient retrieval of similar time sequences under time
warping. In: Proceedings of the Fourteenth International Conference on Data Engineering,
ICDE 98, pp. 201208. IEEE Computer Society, Washington, DC, USA (1998)
44. Ying, J.J.C., Lu, E.H.C., Lee, W.C., Weng, T.C., Tseng, V.S.: Mining user similarity from
semantic trajectories. In: Proceedings of the 2nd ACM SIGSPATIAL International Workshop
on Location Based Social Networks, LBSN 10, pp. 1926. ACM, New York, NY, USA (2010)
45. Yoon, H., Zheng, Y., Xie, X., Woo, W.: Smart itinerary based on user-generated gps trajec-
tories. In: Proceedings of the 7th international conference on Ubiquitous intelligence and
computing, UIC10, pp. 1934. Springer-Verlag, Berlin, Heidelberg (2010)
46. Yoon, H., Zheng, Y., Xie, X., Woo, W.: Social itinerary recommendation from user-generated
digital trails. Personal and Ubiquitous Computing (2011)
47. Yuan, J., Zheng, Y., Xie, X., Sun, G.: Driving with knowledge from the physical world. In:
The 17th ACM SIGKDD international conference on Knowledge Discovery and Data mining,
KDD 11. ACM, New York, NY, USA (2011)
48. Yuan, J., Zheng, Y., Xie, X., Sun, G.: Where to nd the next passenger. In: Proceedings of
the 13th ACM international conference on Ubiquitous computing, Ubicomp 11. ACM, New
York, NY, USA (2011)
276 Yu Zheng
49. Yuan, J., Zheng, Y., Zhang, C., Xie, W., Xie, X., Sun, G., Huang, Y.: T-drive: driving directions
based on taxi trajectories. In: Proceedings of the 18th SIGSPATIAL International Conference
on Advances in Geographic Information Systems, GIS 10, pp. 99108. ACM, New York, NY,
USA (2010)
50. Zheng, V.W., Cao, B., Zheng, Y., Xie, X., Yang, Q.: Collaborative ltering meets mobile rec-
ommendation: A user-centered approach. In: Proceedings of AAAI conference on Articial
Intelligence (AAAI 2010), pp. 236241. ACM, New York, NY, USA (2010)
51. Zheng, V.W., Zheng, Y., Xie, X., Yang, Q.: Collaborative location and activity recommenda-
tions with gps history data. In: Proceedings of the 19th international conference on World
wide web, WWW 10, pp. 10291038. ACM, New York, NY, USA (2010)
52. Zheng, Y., Chen, Y., Li, Q., Xie, X., Ma, W.Y.: Understanding transportation modes based on
gps data for web applications. ACM Trans. Web 4, 1:11:36 (2010)
53. Zheng, Y., Chen, Y., Xie, X., Ma, W.Y.: Geolife2.0: A location-based social networking ser-
vice. In: Proceedings of the 2009 Tenth International Conference on Mobile Data Manage-
ment: Systems, Services and Middleware, MDM 09, pp. 357358. IEEE Computer Society
(2009)
54. Zheng, Y., Li, Q., Chen, Y., Xie, X., Ma, W.Y.: Understanding mobility based on gps data. In:
Proceedings of the 10th international conference on Ubiquitous computing, UbiComp 08, pp.
312321. ACM, New York, NY, USA (2008)
55. Zheng, Y., Liu, L., Wang, L., Xie, X.: Learning transportation mode from raw gps data for
geographic applications on the web. In: Proceeding of the 17th international conference on
World Wide Web, WWW 08, pp. 247256. ACM, New York, NY, USA (2008)
56. Zheng, Y., Liu, Y., Xie, X.: Urban computing with taxicabs. In: Proceedings of the 13th ACM
international conference on Ubiquitous computing, Ubicomp 11. ACM, New York, NY, USA
(2011)
57. Zheng, Y., Wang, L., Zhang, R., Xie, X., Ma, W.Y.: Geolife: Managing and understanding your
past life over maps. In: Proceedings of the The Ninth International Conference on Mobile Data
Management, pp. 211212. IEEE Computer Society, Washington, DC, USA (2008)
58. Zheng, Y., Xie, X.: Learning location correlation from gps trajectories. In: Proceedings of the
2010 Eleventh International Conference on Mobile Data Management, MDM 10, pp. 2732.
IEEE Computer Society, Washington, DC, USA (2010)
59. Zheng, Y., Xie, X.: Learning travel recommendations from user-generated gps traces. ACM
Trans. Intell. Syst. Technol. 2, 2:12:29 (2011)
60. Zheng, Y., Xie, X., Ma, W.Y.: Geolife: A collaborative social networking service among user,
location and trajectory. IEEE Data Eng. Bull. 33(2), 3239 (2010)
61. Zheng, Y., Xie, X., Zhang, R., Ma, W.Y.: Searching your life on web maps. In: SIGIR Work-
shop on Mobile Information Retrieval (2008)
62. Zheng, Y., Yuan, J., Xie, W., Xie, X., Sun, G.: Drive smartly as a taxi driver. In: Proceedings
of the 2010 Symposia and Workshops on Ubiquitous, Autonomic and Trusted Computing,
UIC-ATC 10, pp. 484486. IEEE Computer Society, Washington, DC, USA (2010)
63. Zheng, Y., Zhang, L., Ma, Z., Xie, X., Ma, W.Y.: Recommending friends and locations based
on individual location history. ACM Trans. Web 5, 5:15:44 (2011)
64. Zheng, Y., Zhang, L., Xie, X., Ma, W.Y.: Mining correlation between locations using human
location history. In: Proceedings of the 17th ACM SIGSPATIAL International Conference on
Advances in Geographic Information Systems, GIS 09, pp. 472475. ACM, New York, NY,
USA (2009)
65. Zheng, Y., Zhang, L., Xie, X., Ma, W.Y.: Mining interesting locations and travel sequences
from gps trajectories. In: Proceedings of the 18th international conference on World wide
web, WWW 09, pp. 791800. ACM, New York, NY, USA (2009)
Chapter 9
Location-Based Social Networks: Locations
9.1 Introduction
277
278 Yu Zheng and Xing Xie
This section describes the generic travel recommendation following the paradigm
of trajectories interesting locations popular travel sequences itinerary
planning activities recommendation. Specically, Section 9.2.1 introduces the
detection of interest locations and travel sequences [48]. Section 9.2.2 then presents
9 Location-Based Social Networks: Locations 279
9.2.1.1 Background
Traveling to an unfamiliar city or region, people usually like to know the most inter-
esting locations and the most popular travel sequences. In fact, this kind of informa-
tion evolves as time goes by and varies in quite a few factors, such as time of day,
day of the week, and the seasons. For example, the Forbidden City was the most
popular tourist attraction in the urban area of Beijing before 2008. However, it has
recently been replaced by the Olympic Park of Beijing. Locals particularly enjoy
the Olympic Park on weekend evenings during the summer. Other popular destina-
tions include Houhai Bar Street for sightseeing in the daytime and drinking in the
evening, or some newly-built movie theatres offering half-price tickets every Tues-
day night. Note that the interesting places do not only include tourist attractions but
also restaurants and shopping malls popular among residents. Consequently, trav-
el agencies and travel books cannot always provide the latest and most effective
recommendations that a user needs.
In order to deal with this dilemma, it is necessary to gather travel recommen-
dations automatically and in a timely manner from social media such as the vast
amount of GPS trajectories generated by the large number of users travelling in a
city. GPS trajectories can be formulated in terms of users geo-tagged photos and
check-in records, or obtained from some trajectory-sharing social networking ser-
vices like GeoLife [45, 42, 41]. A number of studies [23, 2] have introduced the
methods for extracting trips from geo-tagged photos, and some professionals have
explored the idea of mining generic travel recommendations from GPS trajectories
[48, 5, 44]. Particularly, one paper [48] rst proposed a learning model to infer the
most interesting locations in a city as well as the popular travel sequences among
these locations, followed by a few expanded studies reported in [5, 44]. The mined
locations and travel sequences are used to enable a generic travel recommender il-
lustrated in Fig. 9.1 and Fig. 9.2.
Figure 9.1 illustrates the user interface of a generic travel recommender run-
ning on desktop computers. The right column shows the top ve most interesting
locations and the ve most experienced users in the region (specied by the present
view of the map). The top ve most popular travel sequences within this region are
also displayed on the map. By zooming in/out and panning, a user can retrieve such
results within any region. In addition, the photos taken in an interesting location will
be presented on the bottom of the window after a user clicks the icon representing
the location on the map.
As shown in Fig. 9.2, a user with a GPS-phone can nd the top ve most interest-
ing locations as well as the ve most popular sequences near her present geographic
280 Yu Zheng and Xing Xie
position (denoted as the red star). Additionally, when the user reaches a location,
the recommender system will provide her with a further suggestion by presenting
the top three most popular sequences starting from this location.
However, we will be faced with some challenges when conducting the generic
recommendations. The rst is to determine the interest level of a location. Intrinsi-
cally, the interest level of a location does not only depend on the number of users
visiting this location but also on these users travel experiences (knowledge). In-
tuitively, different people have different degrees of knowledge about a geospatial
region. During a journey, the users with more travel experience of a region would be
9 Location-Based Social Networks: Locations 281
more likely to visit interesting locations in that region. For example, the residents of
Beijing are more capable than overseas tourists of nding high quality restaurants
and shopping malls in Beijing. If we do not consider the travel knowledge of a user,
the hot spots like railway stations and airports will be most recommended. Second,
an individuals travel experience and interest level of a lo-cation are relative values
(i.e., it is not reasonable to judge whether or not a location is interesting), and are
region-related (i.e., conditioned by the given geospatial region). An individual who
has visited many places in New York might have no idea about Beijing. Likewise,
the most interesting restaurant in a district of a city might not be the most interesting
one in the whole city (as restaurants from other districts might outperform it).
To address the above challenges, the location histories of users are rst modeled
with a tree-based hierarchical graph (TBHG) according to the following two steps
demonstrated in Fig. 9.3.
c11 l1 c11
G1 {C }
Ascendant c21 c22
c22 l2
c21 Descendant
G2
c31 c32 c33 c34 c35
l3
c31 c33 c34
Stands for a stay point s
c32 c35 G3 Stands for a stay point cluster cij
2) Build location graphs on each layer: Based on shared framework F and users
location histories, the clusters on the same level are connected with directed edges. If
two consecutive stay points from one trip are individually contained in two clusters,
a link is generated between the two clusters in a chronological direction according to
the time serial of the two stay points. Note that different from the third step of mod-
eling an individuals location history (introduced in Section 8.2.1), this step feeds
all users location histories (sequences of stay points) into the shared framework.
Therefore, this tree-based hierarchical graph models the location history of all users
in a location-based social networking service.
Then, a HITS(Hypertext Induced Topic Search)-based inference model is pro-
posed with the TBHG. This inference model regards an individuals access to a
location as a directed link from the user to that location. This model infers two
values, the interest level of a location and a users travel experience, by taking into
account 1) the mutuallly reinforcing relationship between the two values and 2) the
geo-regional conditions. See details in the following paragraphs.
Concept of HITS model: HITS stands for hypertext induced topic search [17],
which is a search-query-dependent ranking algorithm for Web information retrieval.
When the user enters a search query, HITS rst expands the list of relevant pages
returned by a search engine and then produces two rankings for the expanded set
of pages, authority ranking and hub ranking. For every page in the expanded set,
HITS assigns them an authority score and a hub score. As shown in Fig. 9.4, an
authority is a Web page with many inlinks, and a hub is a page with many out-links.
The key idea of HITS is that a good hub points to many good authorities, and a
good authority is pointed to by many good hubs. Thus, authorities and hubs have a
mutually reinforcing relationship. More specically, a pages authority score is the
sum of the hub scores of the pages it points to, and its hub score is the integration of
authority scores of the pages pointed to by it. Using a power iteration method, the
authority and hub scores of each page can be calculated. The main strength of HITS
is ranking pages according to the query topic, which may provide more relevant
authority and hub pages. However, HITS requires time consuming operations, such
as online expanding page sets and calculating the hub and authority scores.
An authority
Mutually reinforcing relationship: Using the third level of the TBHG shown
in Fig. 9.3 as an example, Fig. 9.5 illustrates the main idea of the HITS-based in-
9 Location-Based Social Networks: Locations 283
ference model. Here, a location is a cluster of stay points, like c31 and c32 . This
model regards an individuals visit to a location as an implicitly directed link from
the individual to that location. For instance, cluster c31 contains two stay points re-
spectively detected from u1 s and u2 s GPS traces, i.e., both u1 and u2 have visited
this location. Thus, two directed links are generated respectively to point to c31 from
u1 and u2 . Similar to HITS, in this model, a hub is a user who has accessed many
places, and an authority is a location which has been visited by many users. Intu-
itively, a user with rich travel experience (knowledge) in a region is able to visit
many interesting places in that region, and a very interesting place in that region
could be accessed by many users with rich travel experiences. Therefore, users
travel experiences (hub scores) and the interest level of locations (authority scores)
have a mutually reinforcing relationship. More specically, a users travel experi-
ence is represented by the sum of the interest values of the locations that the user
has been to, and the interest value of a location is denoted by the sum of the experi-
ences of users who have visited this location. For simplicitys sake, in the remainder
of this chapter, a user with rich travel experience (i.e., relatively high hub score) in
a region is called an experienced user of that region and a location that attracts peo-
ples profound interests (relatively high authority score) is denoted as an interesting
location.
u1 u2 u3 u4
Users (Hub)
l3
Locations
(Authority) c33 c35
c31 c34
c32 G3
Denition 9.1 (Location Interest). In this system, the interest of a location (ci j ) is
represented by a collection of authority scores Ii j = {Ii1j , Ii2j , . . . , Iil j }. Here, Iil j denotes
the authority score of cluster ci j conditioned by its ascendant nodes on level l, where
1 l < i.
Denition 9.2 (User Travel Experience). In our system, a users (e.g., uk ) travel
experience is represented by a set of hub scores ek = {ekij | 1 i < |L|, 1 j |Ci |}
(refer to Denition 8.5), where ekij denotes uk s hub score conditioned by region ci j .
Figure 9.6 demonstrates these denitions. In the region specied by cluster c11 ,
it is possible to respectively calculate an authority score (I21 1 and I 1 ) for clusters
22
c21 and c22 . Meanwhile, within this region, the authority scores (I31 1 , I1 , I1 , I1
32 33 34
1
and I35 ) for clusters c31 , c32 , c33 , c34 and c35 can be inferred. Further, using the
region specied by cluster c21 , we can also calculate authority scores (I31 2 and I 2 )
32
2 2 2
for c31 and c32 . Likewise, the authority scores (I33 , I34 and I35 ) of c33 , c34 and c35
can be re-inferred within region c22 . Therefore, each cluster on the third level has
two authority scores, which can be used on various occasions based on user inputs.
For instance, as depicted in Fig. 9.6 A), when a user selects a region only covering
locations c31 and c32 , the authority scores I312 and I 2 can be used to rank these two
32
locations. However, as illustrated in Fig. 9.6 B), if the region selected by a user
covers the locations from two different parent clusters (c21 and c22 ), the authority
1 , I 1 and I 1 should be used to rank these locations.
values I32 33 34
A strategy that allows for multiple hub scores for a user and multiple authority
scores for a location has two advantages. First, it is able to leverage the main strength
of HITS to rank locations and users within the context of geospatial regions (query
topics). Second, these hub and authority scores can be calculated ofine, thereby
ensuring the efciency of a recommender system while allowing users to specify
any region on a map.
Inference: Given the locations pertaining to the same ascendant cluster, we are
able to build an adjacent matrix M between users and locations based on the users
visits to these locations. In this matrix, item vkij stands for the times that uk (a user)
has visited to cluster ci j (the jth cluster on the ith level). Such matrixes can be
built ofine for each non-leaf node. For instance, the matrix M formulated for the
example shown in Fig. 9.5 can be represented as follows, where all ve clusters
pertain to c11 :
9 Location-Based Social Networks: Locations 285
c11 c11
{C } {C }
Ascendant
c21 c22 c21 c22
c31 c32 c33 c34 c35 Descendant c31 c32 c33 c34 c35
where clq is ci j s ascendant node on the lth level, 1 l < i. For instance, as shown
in Fig. 9.6, c31 s ascendant node on the rst level of the hierarchy is c11 , and its
ascendant node on the second level is c21 . Thus, if l = 2, clq stands for c21 and
(c31 , c32 ) c21 . Also, if l = 1, clq denotes c11 , and (c31 , c32 , . . . , c35 ) c11 .
Writing them in matrix form, we use J to denote the column vector with all the
authority scores, and use E to denote the column vector with all the hub scores. Con-
ditioned by the region of cluster c11 , J = (I311 , I 1 , . . . , I 1 ), and E = (e1 , e2 , . . . , e4 ).
32 35 11 11 11
J = MJ E (9.4)
E = MJ (9.5)
286 Yu Zheng and Xing Xie
If we use Jn and En to denote authority and hub scores at the nth iteration, the
iterative processes for generating the nal results are
Jn = M J M Jn1 (9.6)
En = M M En1
J
(9.7)
Starting with J0 = E0 = (1, 1, . . . , 1), we are able to calculate the authority and hub
scores using the power iteration method. Later, we can retrieve the top n most inter-
esting locations and the top k most experienced users in a given region.
This step detects the top k most popular sequences of locations from the graph on
a layer of the TBHG (refer to Fig. 9.3 for an example). A popularity score is calcu-
lated for each location sequence within a given region based upon two factors: the
travel experiences of the users taking this sequence and the interests of the locations
contained in the sequence. Since there would be multiple paths starting from the
same location, the interest value of this location should be distributed to these paths
according to the probability that users would take a path.
Figure 9.7 demonstrates the calculation of the popularity score for a 2-length
sequence (i.e., a sequence containing two locations), A C. In this gure, the graph
nodes (A, B,C, D, and E) stand for locations, and the graph edges denote peoples
transition sequences among them. The number associated with an edge represents
how many times that users have taken the sequence. Eq. 9.8 computes the popularity
score of sequence A C, consisting of contributions from the following three parts:
The authority score of location A(IA ) weighted by the probability of people
leaving by this sequence (OutAC ). Clearly, there are seven (5+2) links pointing
to other nodes from node A, and ve out of seven of these links point directly to
node C. So, OutAC = 5/7 , i.e., only ve sevenths of location As authority (IA )
should be propagated to sequence A C, and the rest of IA should be distributed
to A B.
The authority score of location C(IC ) weighted by the probability of peoples
entering by this sequence (InAC ).
The hub scores of the users (UAC ) who have taken this sequence.
A 4 E
5 4
3 6
2 3
2 C 1 D
B
The detection of popular travel sequences starts with computing the popularity score
for each 2-length sequence, and then searches for 3-lenth sequences based on these
2-length sequences. Though searching for the top k n-length most popular sequences
in a graph is time consuming, there are a few optimization methods using some
upper bound to lter unnecessary search spaces. Moreover, the size of a location
graph is usually small as the number of interesting locations in a city is limited.
Meanwhile, as people do not normally travel to too many places during a trip, it
is not necessary to provide a user with very long travel sequences. Sometimes, a
sequence with three locations is more useful than longer ones.
9.2.2.1 Background
The interesting locations and travel sequences mentioned above can facilitate travel
to an unfamiliar place. However, people are still faced with particular challenges
when planning their trips.
First, while there are many location candidates that can be considered, a travel-
er usually wants to maximize her travel experience, i.e., visit as many interesting
locations as possible in a comfortable manner without wasting too much time trav-
eling between locations. To achieve this task, the typical duration that people stay
in a location and the average travel time between two locations should be consid-
ered. Second, an effective itinerary needs to adapt to a travelers present location
and available time length as well as her destination. Some popular travel routes can
be available in a book but may not be feasible for a particular individual in the real
288 Yu Zheng and Xing Xie
world because the attractions contained in these routes might be too far away, or the
individual does not have enough time for the trip.
What a traveler needs is an effective itinerary, which can be adapted to the trav-
elers requests (consisting of a starting location, destination, and available time) and
includes the information of not only a travel route passing some interesting locations
but also the typical duration spent in each location and the general travel time be-
tween locations.
Itinerary recommendation has been studied in quite a few research projects.
Some recommender systems [9, 3, 16] need a users intervention when generating
an itinerary for the user. For example, [9] presented an interactive travel itinerary
planning system where a user denes which places to visit and avoid. Similarly, [3]
reported on an interactive system where a user species general constraints, such as
time and attractions to be included in the itinerary. The advantage of such interac-
tive recommender systems is that the more a user knows about traveling in the area,
the better the itinerary is. However, this assumption is not practical for most novice
travelers who lack prior knowledge of a region.
To alleviate the human intervention and prior knowledge needed, [37, 38, 18, 8]
presented relatively automated recommenders. Particularly, [37, 38] proposed a so-
cial itinerary recommendation service that generates an effective itinerary based on
a users query and social knowledge learned from user-generated GPS trajectories,
with a major application scenario described as follows. Imagine that a researcher
is attending a conference in Beijing. At the end of the conference, she has 8 hours
to spend before catching her ight. She is a rst time visitor to the city and has no
idea how to plan an effective travel route, and is thereby relying on a social itinerary
recommendation service. She is starting from her current location, which is auto-
matically recognized with a GPS-enabled phone. She marks the Beijing Capital In-
ternational Airport in the map as her destination, inputs 8 hours for travel duration,
and sends the query. As a result, she receives an itinerary recommendation visual-
ized on the map which shows interesting locations to be visited, a recommended
amount of time to stay in each location, and an estimate of the time needed to travel
between any two locations. With the information at hand, she obtains a good idea of
where she might go and is able to manage her time effectively.
As illustrated in Fig. 9.8, the framework for this itinerary recommender consists of
an online component and an ofine component.
Ofine component: This component data mines the collective social intelligence
from a database of GPS trajectories in terms of the following two steps:
The rst step detects stay points from each GPS trajectory and clusters these stay
points into locations. A location graph can be formulated according to the method
described in Section 9.2.1.2 (the bottom layer of the hierarchy shown in Fig. 9.3
is used here as a demonstration). Remember that each stay point has properties
pertaining to arrival and departure times, which indicate the length of time stayed in
9 Location-Based Social Networks: Locations 289
Online Offline
Query Verification GPS TrajN
Itinerary Location-Interest
Graph
Duration
Start/End Collective
Locations G Social
Intelligence
Preference User
a location. So, the typical stay duration in each location and general travel duration
between two locations (in a location graph) can be calculated, for example, using the
median of all peoples stay times in a location. These values associated with each
location are used to estimate the duration of an itinerary. This clustering operation
picks out the locations accessed by a signicant number of people, ensuring the
accuracy of the estimated travel and stay times. This operation also contributes to
the second step by reducing the sparseness of the connections between users and
locations.
The second step infers the interest value of each location in the location graph
using the approach introduced in Section 9.2.1.2 (see Fig. 9.5), and calculates the
popularity score of each 2-length travel sequence in terms of the method presented
in Section 9.2.1.3. As a result, the output of this component is a location-interest
graph, in which a node is a location associated with an interest value and a typical
stay duration and an edge denotes peoples transitions (between locations) and the
general travel duration. The ofine component will not be detailed further since they
have been introduced in previous sections and in Chapter 8.
Online component: This component accepts a user-generated query (consisting
of a starting location, a destination, and an available duration), and returns an effec-
tive itinerary comprised of a sequence of locations with a stay time in each location
and travel times between two consecutive locations. This component can be decom-
posed into three steps, introduced as follows:
1) Query Verication: This step checks the feasibility of a query according to
spatial and temporal constraints. In some cases, a user might set a short time length
290 Yu Zheng and Xing Xie
with a far destination, making all itineraries impossible. Such queries can be ltered
out by checking the distance between the start and end location with respect to the
duration (of a query).
2) Trip Candidate Selection: This step searches a location-interest graph for can-
didate itineraries satisfying a users query, i.e., each path has to start from the source
and reach the destination within the given time length and pass some interesting
locations on the way. Though there are some advanced path-nding algorithms, a
straightforward method retrieving all the possible paths in a brute-force manner will
work given the small size of a location-interest graph. When the start and end point
of a query do not fall into any existing location in the graph, the nearest location to
these points will be used.
3) Trip Candidate Ranking: This step rst ranks candidate itineraries according
to three factors: elapsed time ratio, stay time ratio, and interest density ratio, as in-
troduced below. Then, these itineraries will be re-ranked according to the popularity
score of the travel sequences pertaining to an itinerary.
Elapsed Time Ratio (ETR): ETR is a ratio between the time length of a recom-
mended itinerary and that given by a user. The bigger value this factor has, the
more substantially the time given by a user is leveraged by an itinerary. If the
total time needed for an itinerary is much shorter than the available time, the
remaining time is wasted.
Stay Time Ratio (STR): This factor considers how the available time is spent by
calculating a ratio between the time that a user could stay in a location and that
for traveling between locations. Intuitively, travelers prefer to spend more time
in interesting locations rather than traveling to them. Therefore, an itinerary
with a bigger STR is considered a better choice, i.e., a user can spend a longer
time visiting actual places.
Interest Density Ratio (IDR): IDR is the sum of the interest values of the
locations contained in an itinerary. The general assumption is that visitors like
to visit as many highly interesting locations as possible on a trip. Therefore, the
bigger the IDR value, the better the itinerary. In the implementation, the IDR of
an itinerary should be normalized to [0, 1] and divided by the maximum IDR in
the candidate itineraries.
As shown in Fig. 9.9, a good itinerary candidate is a point located in the upper-
right corner of this cube, i.e., simultaneously having larger ETR, STR, and IDR
values.
To rank candidate itineraries, a Euclidian distance in these three dimensions is
calculated as Eq. 9.11:
ED = 1 (ET R)2 + 2 (ST R)2 + 3 (IDR)2 (9.11)
ranking step and guarantees the feasibility of an itinerary. As a result, the top k
itineraries will be recommended to a user.
Besides the need for an itinerary, people usually have two types of questions in
mind when traveling. They wonder where to go for sightseeing and food, and they
wonder what there is to do at a particular location. The rst question corresponds
to location recommendation given a particular activity query, which might include
restaurants, shopping, movies/shows, sports/exercise, and sightseeing. The second
question corresponds to activity recommendation given a particular location query.
This section introduces a location-activity recommender system [40] which an-
swers the above questions by mining a myriad of social media, such as tips-tagged
trajectories or check-in sequences. Regarding the rst question, this system pro-
vides a user with a list of interesting locations, e.g., the Forbidden City and the
Great Wall, which are the top k candidate locations for conducting a given activity.
With respect to the second question, if a user is visiting the Olympic Park of Bei-
jing, the recommender suggests that the user can also try some exercise activities
and nice restaurants nearby. This recommender integrates location recommendation
and activity recommendation into one knowledge-mining process, since locations
and activities are closely related in nature.
Locations
Activities
U V
Y = UWT X = UVT Z = VVT
Location-feature matrix: In this matrix, a row stands for a location, and a col-
umn denotes a category (referred to as feature in this section), such as restaurants,
cafes, and bars, illustrated in the left part of Fig. 9.10. Usually, a location might
include multiple points of interest (POI) pertaining to different categories. For ex-
ample, a mall would include different types of shops, movie theaters, and cafes.
Further, a movie theater could have a few bars and restaurants inside. At the same
time, a single venue could belong to multiple categories. For instance, some bars can
also be regarded as a restaurant or a cafe. The motivation for building this location-
feature matrix lies in the insight that people could carry out similar activities in
similar locations.
Specically, this matrix is built based on a POI database. Each POI in this
database is associated with a set of properties, including name, address, GPS co-
ordinates, and category. Given a location, the number of POIs pertaining to each
category (and falling in this location) can be counted. Note that a location can be
represented by a point or a small region [48, 46] like a cluster of stay points men-
tioned in Section 8.2.1.1, depending on the data source from different applications.
9 Location-Based Social Networks: Locations 293
Suppose there are 4 restaurants, 2 bars and 5 shops in a location, a feature vector
v =< . . . , 4, 2, 5, . . . > is formulated for the location. To further differentiate the rep-
resentativeness of each category in a location, a TF-IDF (term frequency-inverse
document frequency [26, 27]) value is calculated for each category according to
Eq. 8.7. Intuitively, if POIs of a category occur in a region many times, this POI
category is important in representing this region. Furthermore, if a POI category
(e.g., museum or natural parks) occurs rarely in other regions, the category is
more representative for the region in which it is located than a common POI cat-
egory (e.g., restaurant) that appears in many places. As a result, each item in a
location-feature matrix is a TF-IDF value of a category in a location.
Activity-activity matrix: The activity-activity matrix, demonstrated in the right
part of Fig. 9.10, models the correlation between two different activities, which
contributes to the inferences of user activities that can be performed at a location.
In other words, if a user performs some activity at a location, how likely would she
perform another activity? One possible way to calculate this correlation is based
upon user-generated tips and to-do-lists. In case the user-generated data is not large
enough, the results returned by a search engine (like Google and Bing) can be used
to compute the correlation as the correlation between two activities should be gener-
ally reected by the World Wide Web. Specically, we can send a pair of activities
like shopping and food as a query to a search engine and count the returned
results. The bigger this count is, the more these two activities are correlated. For
example, the count of results returned for shopping and food is much larger
than that of sports and food, indicating that the former pair of activities is more
related than the latter. Later, these counts are normalized into [0, 1], representing the
correlation between different pairs of activities.
The data modeling has allowed for the compilation of location-activity, location-
feature, and activity-activity matrices. The objective is to ll the missing entries in
the location-activity matrix with the information learned from the other two matri-
ces. A collaborative ltering (CF) approach based on collective matrix factorization
[31] can be employed to train a location-activity recommender, using these matrices
as inputs. Specically, to infer the value of each missing entry an objective function
is dened according to Eq. 9.12, which is iteratively minimized using a gradient de-
scent method. Based on the lled location-activity matrix, it is possible to rank and
retrieve the top k locations/activities as recommendations to users.
As shown in Fig. 9.10, a location-activity matrix Xmn can be decomposed into
a product of two matrices Umk and Vnk (the superscript T for Vnk T denotes the
matrix transpose), where m is the number of locations and n stands for the number
of activities. k is the number of latent factors (topics), usually k < n. In the im-
plementation, k was set to 3 as there are three topics: location, activity, and feature.
Likewise, location-feature matrix Yml is decomposed as a product of matrices Umk
and Wlk , and activity-activity matrix Znn is decomposed as a self-product of Vnk .
294 Yu Zheng and Xing Xie
So, this location-activity matrix shares the location information with the location-
feature matrix via Umk , and shares the activity knowledge with the activity-activity
matrix via Vnk . In short, the inference model propagates the information among
Xmn , Yml and Znn by the low-rank matrices Umk and Vnk . Finally, an objective
function is formulated as Eq. 9.13:
1 1
L(U,V,W ) = I (X UV T )2F + Y UW T 2F +
2 2 (9.12)
2 3 & '
Z VV T 2F + U2F + V 2F + W 2F ,
2 2
where |F denotes the Frobenius norm, and I is an indicator matrix with its entry
Ii j = 0 if Xi j is missing, Ii j =1 otherwise. The operator denotes the entry-wise
product. The rst three terms in the objective function control the loss in matrix
factorization, and the last term controls the regularization over the factorized ma-
trices so as to prevent over-tting. 1 ,2 and 3 are three parameters respectively
weighting the contributions of location features, activity correlations, and the regu-
larization term. These parameters can be learned using a training dataset.
In the objective function, the rst term (X UV T ) measures the prediction loss
of the location-activity matrix. The second term (Y UW T ) measures the prediction
loss of the location-feature matrix. Minimizing it enforces the location latent factor
U to be good as well in representing the location features. In other words, it helps
to propagate the information of location features Y to the prediction of X. The third
term (Z VV T ) measures the prediction loss of the activity-activity correlations.
Minimizing it enforces the activity latent factor V to be good as well in representing
the activity correlations. In other words, it helps to propagate the information of
activity correlations Z to the prediction of X.
In general, this objective function is not jointly convex to all the variables, Umk ,
Vnk , and Wlk . Also, there is no closed-form solution for minimizing the objective
function. As a result, a numerical method such as the gradient descent is employed
to determine the local optimal solutions. Specically, the gradient (denoted as )
for each variable is represented as follows. Using the gradient descent, a converged
Xmn is returned with all the entries lled:
( )
U L = I (UV T X) V + 1 (UW T Y )W + 3U, (9.13)
( )T
V L = I (UV T X) U + 22 (VV T Z)V + 3V, (9.14)
W L = 1 (UW Y ) U + 3W.
T T
(9.15)
9 Location-Based Social Networks: Locations 295
While a generic travel recommender system can provide users with a variety of
locations regardless of their personal interests, a personalized recommender of-
fers locations matching an individuals preferences, which are learned from the
individuals location history [44, 46]. Specically, a personalized recommender us-
es a particular individuals number of visits to a location as their implicit rating of
that location, and predicts the users interest in an unvisited location in terms of their
location history and those of other users. A matrix between users and locations, like
the M shown in Eq. 9.16, is formulated, where rows stand for users and columns
denote users ratings of locations (represented by the times that a user has been to a
location). One approach for building this matrix with user-generated GPS trajectory
has been introduced in Section 8.2.1.
for the same item. There are two classes of memory-based collaborative ltering:
user-based [29, 25] and item-based techniques [19, 28].
1) User-based techniques are derived from similarity measures between users.
The similarity between two users (A and B) is essentially a distance measure and
is used as a weight. In other words, when predicting user As rating of an item, the
more similar user A and B are, the more weight user Bs rating of the item will carry.
In most approaches, the similarity between two users is based on their ratings of
items that both users have rated, using the Pearson correlation or the Cosine simi-
larity measures. Spertus et al. [32] present an extensive empirical comparison of six
distinct measures of similarity for recommending online communities to members
of the Orkut social network. As a result, under the circumstances of the above-
mentioned approach, they found that the Cosine similarity measure showed the best
empirical results ahead of other measures, such as log odds and point-wise mutual
information.
2) Item-based techniques predict the ratings of one item based on the ratings of
another item. Examples of binary item-based collaborative ltering include Ama-
zons item-to-item algorithm [22], which computes the Cosine similarity between
binary vectors representing the purchases in a user-item matrix. Slope One [19]
is the simplest form of non-trivial item-based collaborative ltering. Its simplicity
makes it especially easy to implement it efciently while its accuracy is often on par
with more complicated and computationally expensive algorithms. This algorithm
is detailed in Section 9.3.2.2.
Model-based: In contrast to memory-based methods, model-based algorithms
[10, 12] use the collection of ratings to form a model, which is then used to predict
ratings. For example, Breese et al. [4] proposed a probabilistic approach to collab-
orative ltering. It is assumed that rating values are integers between 0 and n, and
the probability expression is the probability that a user will give a particular rating
to an item given that users ratings of previously rated items. Hofmann et al. [12]
proposed a collaborative ltering method in a machine learning framework where
various machine learning techniques (such as articial neural networks) coupled
with feature extraction techniques can be used.
This section presents a personalized location recommender system [46] using a user-
based CF model. Given a user-location matrix like M shown in Eq. 9.16, this loca-
tion recommender operates according to the following three steps:
1) Infer the similarity between users: This personalized location recommender
estimates the user similarity between two users in terms of their location histories
(detailed in Section 8.3), instead of using traditional similarity measures, such as the
Cosine similarity or the Pearson correlation. Typically, in a user-based CF model,
the similarity between two users is based upon the ratings provided by both users.
For example, the similarity between u1 and u2 (shown in Eq. 9.16) can be represent-
9 Location-Based Social Networks: Locations 297
ed by the Pearson correlation between the ratings < 1, 1, 2, 4 > and < 1, 1, 3, 2 >.
Eq. 9.17 details the computation of the Pearson correlation.
E Ads!! A Museume
F
D
Billboards!! Promotion!!
A A Lake
B C A Landmark
However, mining the correlation from peoples location histories faces the fol-
lowing two challenges. First, the correlation between two locations does not only
depend on the number of users visiting the two locations but also lies in these users
travel experiences. The locations sequentially accessed by the people with more
travel knowledge would be more correlated than the locations visited by those hav-
ing little idea about the region. For instance, some overseas tourists might randomly
visit some places in Beijing because they are not familiar with the city. However,
the local people of Beijing are more capable of determining the best itineraries for
a visit there.
Second, the correlation between two locations, A and B, also depends on the
sequences in which both locations have been visited. 1) This correlation between A
and B, Cor(A, B), is asymmetric; i.e., Cor(A, B) = Cor(B, A). The semantic meaning
of a travel sequence A B might be quite different from B A. For example, on
a one-way road, people would only go to B from A while never traveling to A from
B. 2) The two locations continuously accessed by a user would be more correlated
than those being visited discontinuously. Some users would reach B directly from
A (A B) while others would access another location C before arriving at B (A
C B). Intuitively, the Cor(A, B) indicated by the two sequences might be different.
Likewise, in a sequence A C B, Cor(A,C) would be greater than Cor(A, B), as
the user consecutively accessed A C, but traveled to B after visiting C.
In short, the correlation between two locations can be calculated by integrating
the travel experiences of the users visiting them on a trip in a weighted manner.
Formally, the correlation between location A and B can be calculated as Eq. 9.21.
Cor(A, B) = ek , (9.21)
uk U
1 1
Cor(A, B) = e1 + e2 ; Cor(A,C) = e1 + e2 + e3 ;
2 2
1
Cor(B,C) = e1 + e3 ; Cor(C, B) = e2 ; Cor(B, A) = e3 .
2
0 1 2 0 1 2 0 1 2
The typical way to estimate the similarity between two items is calculating the Co-
sine similarity between two rating vectors that correspond to the two items. For
instance, the similarity between location l3 and l5 can be represented by the Cosine
similarity between the two rating vectors, < 3, 2, 1, 0 >T and < 4, 2, 0, 1 >T . This
rating-based similarity measure is fast, however it neglects the information of user
mobility patterns among locations. As a result, the rating-based method is not a very
effective similarity measure for an item-based location recommender, in which peo-
ples mobility patterns is a key factor determining the quality of recommendations.
Instead of using the rating-based similarity measure, the recommender present-
ed in [44] integrates the location correlation (introduced in Section 9.3.3.1) into
an item-based collaborative ltering (specically, the Slope One algorithm) [19],
thereby inferring the ratings of a particular user to some unvisited locations.
evaluation R p S j,i (), the average deviation of item i with regard to item j is
calculated as Eq. 9.22.
r p j r pi
dev j,i = S j,i ()
, (9.22)
R p S j,i ()
where w j = {i|i S(R p ), i = j, |S j,i ()| > 0} is the set of all relevant items.
Further, the number of evaluations that simultaneously contain two items has
been used to weight the prediction regarding different items, as presented in E-
q. 9.25. Intuitively, to predict u p s rating of item A given u p s ratings of item B and
C, if 2000 users rated the pair of A and B whereas only 20 users rated pair of A and
C, then u p s ratings of item B is likely to be a far better predictor for item A than
u p s ratings of item C is.
2) The Slope One algorithm using the location correlation: Intuitively, to predict
u p s rating of location A given u p s ratings of location B and C, if location B is more
related to A beyond C, then u p s ratings of location B is likely to be a far better
predictor for location A than u p s ratings of location C is. Therefore, as shown in
Eq. 9.25, the |S j,i ()| in Eq. 9.24 is replaced by the correlation cor ji (inferred in
Section 9.3.3.1):
where cor ji denotes the correlation between location i and j, and dev j,i is still cal-
culated as Eq. 9.22.
In contrast to the number of observed ratings (i.e., |S j,i ()|) used by the weighted
Slope One algorithm, the mined location correlation considers more human travel
behavior, such as the travel sequence, user experience, and transition probability
between locations. Using Eq. 9.25, an individuals ratings of locations they have not
accessed can be inferred. Later, the top n locations with relatively high ratings can
be recommended to the user.
9 Location-Based Social Networks: Locations 303
visited location to a few similar places that have not been accessed by the individual.
Specically, a similarity between two locations can be determined using either the
location correlation (if both locations have sufcient ratings), or categories of these
two locations as mentioned in the new location problem.
Intuitively, a user-location matrix is very sparse as a user can only visit a certain
number of locations. The prediction of an individuals interest in a location is un-
able to be very accurate based on such a sparse matrix. Some approaches using
additional information can improve the inferences. For example, the method intro-
duced in Section 9.2.3 uses the category information of a location. Also, propagation
and similarity-based mapping methods (mentioned in the above section) can be em-
ployed to reduce the empty entries in a matrix. Alternative methods can transfer
this user-location matrix into a user-category matrix, which has a smaller number of
columns and fewer empty entries than the former. As shown in Fig. 9.13, the sim-
ilarity between users can be determined in terms of this user-category matrix with
sufcient ratings, and then used in turn in the user-location matrix for location rec-
ommendation. However, this is still a very challenging problem that remains open
to research and real implementation.
l0 l1 lj ln-1 ln c0 c 1 cj cm-1 cm
u0 I a0,1 I I u0 I b0,1 b0,m
Transform
u1 a1,0 I I I a1,n u1 b1,0 I b1,m
9.3.4.3 Scalability
While the number of locations is limited in the real world and usually much smaller
than that of users, the problem concerning the scalability of a location recommender
arises in large part from the increasing number of users. Some approximation ap-
proaches can be used to reduce this problem to some extent.
For example, in the user-based CF model (introduced in Section 9.3.2), the mech-
anisms demonstrated in Fig. 8.10 can be employed to diminish the computations
when a new user joins the system. First, existing users in a recommendation sys-
tem can be clustered into groups according to the similarity between one another.
9 Location-Based Social Networks: Locations 305
The users who are similar to a new user can then be found solely in the groups that
the new user pertains to. Second, a location history can be quickly built for a new
user by directly inserting her stay points into existing framework F. Later, we can
compute the similarity between the new user and the representative user of a clus-
ter based on this location history, thereby determining which group the new user
belongs to. Third, the shared framework and user clusters can also be updated at a
relatively low frequency, e.g., 1 update per month, as the arrival of a few users will
not signicantly change them. Fourth, once the similarity between the new users
and other users in the cluster is computed, the similarity can be used for a time even
if the new user has new data uploaded to the system. Adding a few trajectories will
not change the similarity between two users signicantly.
An alternative way to enhance the scalability of a location recommender system
uses the item-based CF model presented in Section 9.3.3. The correlation (or sim-
ilarity) between two locations can be updated at a very low frequency, e.g., once a
month, as the arrival of a few new users does not change them signicantly.
9.4 Summary
This chapter explores research topics in a location-based social network from the
perspective of understanding locations with user-generated GPS trajectories. Using
travel as a main application scenario, both generic and personalized travel recom-
mendations are studied.
The generic travel recommender starts by nding interesting locations and travel
sequences from a large amount of raw trajectories, and then offers itinerary and
location-activity recommendations. By tapping into the collective social knowledge,
these recommendations help people to travel to an unfamiliar place and plan their
journey with minimal effort.
The personalized location recommender provides a particular user with locations
matching her preferences, based on the location history of this user and that of oth-
ers. Regarding a users visits to a location as an implicit rating to that location, two
kinds of collaborative ltering-based models are proposed to predict the users in-
terests in unvisited places. One is a user-based CF model, which incorporates the
similarity between two different users (derived from their location histories) as a
distance function between them. The other is a location-based CF model using the
correlation between two different locations (inferred from many users GPS trajec-
tories) as a distance measure between them. The user-based CF model is able to
accurately model an individuals behavior while it suffers from the increasing scale
of users. The location-based CF model is efcient and reasonably accurate.
Some challenges are also discussed in the end of this chapter, aiming to encour-
age more research effort into this eld.
306 Yu Zheng and Xing Xie
References
1. Adomavicius, G., Tuzhilin, A.: Toward the next generation of recommender systems: A survey
of the state-of-the-art and possible extensions. IEEE Trans. on Knowl. and Data Eng. 17, 734
749 (2005)
2. Arase, Y., Xie, X., Hara, T., Nishio, S.: Mining peoples trips from large scale geo-tagged
photos. In: Proceedings of the international conference on Multimedia, MM 10, pp. 133
142. ACM, New York, NY, USA (2010)
3. Ardissono, L., Goy, A., Petrone, G., Segnan, M.: A multi-agent infrastructure for developing
personalized web-based systems. ACM Trans. Internet Technol. 5, 4769 (2005)
4. Breese, J.S., Heckerman, D., Kadie, C.M.: Empirical analysis of predictive algorithms for
collaborative ltering. In: Proceedings of the International 14th Conference on Uncertainty in
Articial Intelligence, pp. 4352 (1998)
5. Cao, X., Cong, G., Jensen, C.S.: Mining signicant semantic locations from gps data. Proc.
VLDB Endow. 3, 10091020 (2010)
6. Counts, S., Smith, M.: Where were we: communities for sharing space-time trails. In: Proceed-
ings of the 15th annual ACM international symposium on Advances in geographic information
systems, GIS 07, pp. 10:110:8. ACM, New York, NY, USA (2007)
7. Cranshaw, J., Toch, E., Hong, J., Kittur, A., Sadeh, N.: Bridging the gap between physical
location and online social networks. In: Proceedings of the 12th ACM international conference
on Ubiquitous computing, Ubicomp 10, pp. 119128. ACM, New York, NY, USA (2010)
8. De Choudhury, M., Feldman, M., Amer-Yahia, S., Golbandi, N., Lempel, R., Yu, C.: Auto-
matic construction of travel itineraries using social breadcrumbs. In: Proceedings of the 21st
ACM conference on Hypertext and hypermedia, HT 10, pp. 3544. ACM, New York, NY,
USA (2010)
9. Dunstall, S., Horn, M.E.T., Kilby, P., Krishnamoorthy, M., Owens, B., Sier, D., Thiebaux, S.:
An automated itinerary planning system for holiday travel. J. of IT & Tourism 6(3), 195210
(2003)
10. Getoor, L., Sahami, M.: Using probabilistic relational models for collaborative ltering. In:
Working Notes of the KDD Workshop on Web Usage Analysis and User Proling (1999)
11. Goldberg, D., Nichols, D., Oki, B.M., Terry, D.: Using collaborative ltering to weave an
information tapestry. Commun. ACM 35, 6170 (1992)
12. Hofmann, T.: Collaborative ltering via gaussian probabilistic latent semantic analysis. In:
Proceedings of the 26th annual international ACM SIGIR conference on Research and devel-
opment in informaion retrieval, SIGIR 03, pp. 259266. ACM, New York, NY, USA (2003)
13. Horozov, T., Narasimhan, N., Vasudevan, V.: Using location for personalized poi recommen-
dations in mobile environments. In: Proceedings of the International Symposium on Applica-
tions on Internet, pp. 124129. IEEE Computer Society, Washington, DC, USA (2006)
14. Huang, Y., Shekhar, S., Xiong, H.: Discovering colocation patterns from spatial data sets: A
general approach. IEEE Trans. on Knowl. and Data Eng. 16, 14721485 (2004)
15. Hung, C.C., Chang, C.W., Peng, W.C.: Mining trajectory proles for discovering user com-
munities. In: Proceedings of the 2009 International Workshop on Location Based Social Net-
works, LBSN 09, pp. 18. ACM, New York, NY, USA (2009)
16. Kim, J., Kim, H., Ryu, J.h.: Triptip: a trip planning service with tag-based recommendation.
In: Proceedings of the 27th international conference extended abstracts on Human factors in
computing systems, CHI EA 09, pp. 34673472. ACM, New York, NY, USA (2009)
17. Kleinberg, J.M.: Authoritative sources in a hyperlinked environment. In: Proceedings of the
ninth annual ACM-SIAM symposium on Discrete algorithms, SODA 98, pp. 668677. Soci-
ety for Industrial and Applied Mathematics, Philadelphia, PA, USA (1998)
18. Kumar, P., Singh, V., Reddy, D.: Advanced traveler information system for hyderabad city.
Intelligent Transportation Systems, IEEE Transactions on 6(1), 2637 (2005)
19. Lemire, D., Maclachlan, A.: Slope one predictors for online rating-based collaborative lter-
ing. In: Proceedings of SIAM Data Mining. SIAM press (2005)
9 Location-Based Social Networks: Locations 307
20. Li, Q., Zheng, Y., Xie, X., Chen, Y., Liu, W., Ma, W.Y.: Mining user similarity based on
location history. In: Proceedings of the 16th ACM SIGSPATIAL international conference on
Advances in geographic information systems, GIS 08, pp. 34:134:10. ACM, New York, NY,
USA (2008)
21. Li, Q., Zheng, Y., Xie, X., Chen, Y., Liu, W., Ma, W.Y.: Mining user similarity based on
location history. In: Proceedings of the 16th ACM SIGSPATIAL international conference on
Advances in geographic information systems, GIS 08, pp. 34:134:10. ACM, New York, NY,
USA (2008)
22. Linden, G., Smith, B., York, J.: Amazon.com recommendations: Item-to-item collaborative
ltering. IEEE Internet Computing 7, 7680 (2003)
23. Lu, X., Wang, C., Yang, J.M., Pang, Y., Zhang, L.: Photo2trip: generating travel routes from
geo-tagged photos for trip planning. In: Proceedings of the international conference on Mul-
timedia, MM 10, pp. 143152. ACM, New York, NY, USA (2010)
24. Nakamura, A., Abe, N.: Collaborative ltering using weighted majority prediction algorithms.
In: Proceedings of the Fifteenth International Conference on Machine Learning, ICML 98,
pp. 395403. Morgan Kaufmann Publishers Inc., San Francisco, CA, USA (1998)
25. Resnick, P., Iacovou, N., Suchak, M., Bergstrom, P., Riedl, J.: Grouplens: an open architec-
ture for collaborative ltering of netnews. In: Proceedings of the 1994 ACM conference on
Computer supported cooperative work, CSCW 94, pp. 175186. ACM, New York, NY, USA
(1994)
26. Salton, G., Buckley, C.: Term-weighting approaches in automatic text retrieval. Inf. Process.
Manage. 24, 513523 (1988)
27. Salton, G., Fox, E.A., Wu, H.: Extended boolean information retrieval. Commun. ACM 26,
10221036 (1983)
28. Sarwar, B., Karypis, G., Konstan, J., Reidl, J.: Item-based collaborative ltering recommen-
dation algorithms. In: Proceedings of the 10th international conference on World Wide Web,
WWW 01, pp. 285295. ACM, New York, NY, USA (2001)
29. Shardanand, U., Maes, P.: Social information ltering: algorithms for automating Word of
Mouth. In: Proceedings of the SIGCHI conference on Human factors in computing systems,
CHI 95, pp. 210217. ACM Press/Addison-Wesley Publishing Co., New York, NY, USA
(1995)
30. Sheng, C., Zheng, Y., Hsu, W., Lee, M.L., Xie, X.: Answering top- similar region queries.
In: Proceedings of Database Systems For Advanced Applications, vol. 5981, pp. 186201.
Springer (2010)
31. Singh, A.P., Gordon, G.J.: Relational learning via collective matrix factorization. In: Proceed-
ing of the 14th ACM SIGKDD international conference on Knowledge discovery and data
mining, KDD 08, pp. 650658. ACM, New York, NY, USA (2008)
32. Spertus, E., Sahami, M., Buyukkokten, O.: Evaluating similarity measures: a large-scale study
in the orkut social network. In: Proceedings of the eleventh ACM SIGKDD international
conference on Knowledge discovery in data mining, KDD 05, pp. 678684. ACM, New York,
NY, USA (2005)
33. Takeuchi, Y., Sugimoto, M.: Cityvoyager: An outdoor recommendation system based on user
location history. In: Proceedings of the 3rd International Conference Ubiquitous Intelligence
and Computing, pp. 625636. Springer press (2006)
34. Xiao, X., Zheng, Y., Luo, Q., Xie, X.: Finding similar users using category-based location
history. In: Proceedings of the 18th SIGSPATIAL International Conference on Advances in
Geographic Information Systems, GIS 10, pp. 442445. ACM, New York, NY, USA (2010)
35. Xiao, X., Zheng, Y., Luo, Q., Xie, X.: Finding similar users using category-based location
history. In: Proceedings of the 18th SIGSPATIAL International Conference on Advances in
Geographic Information Systems, GIS 10, pp. 442445. ACM, New York, NY, USA (2010)
36. Ying, J.J.C., Lu, E.H.C., Lee, W.C., Weng, T.C., Tseng, V.S.: Mining user similarity from
semantic trajectories. In: Proceedings of the 2nd ACM SIGSPATIAL International Workshop
on Location Based Social Networks, LBSN 10, pp. 1926. ACM, New York, NY, USA (2010)
308 Yu Zheng and Xing Xie
37. Yoon, H., Zheng, Y., Xie, X., Woo, W.: Smart itinerary recommendation based on user-
generated gps trajectories. In: Proceedings of the 7th international conference on Ubiquitous
intelligence and computing, UIC10, pp. 1934. Springer-Verlag, Berlin, Heidelberg (2010)
38. Yoon, H., Zheng, Y., Xie, X., Woo, W.: Social itinerary recommendation from user-generated
digital trails. Personal and Ubiquitous Computing (2011)
39. Zheng, V.W., Cao, B., Zheng, Y., Xie, X., Yang, Q.: Collaborative ltering meets mobile rec-
ommendation: A user-centered approach. In: Proceedings of AAAI conference on Articial
Intelligence (AAAI 2010), pp. 236241. ACM, New York, NY, USA (2010)
40. Zheng, V.W., Zheng, Y., Xie, X., Yang, Q.: Collaborative location and activity recommenda-
tions with gps history data. In: Proceedings of the 19th international conference on World
wide web, WWW 10, pp. 10291038. ACM, New York, NY, USA (2010)
41. Zheng, Y., Chen, Y., Xie, X., Ma, W.Y.: Geolife2.0: A location-based social networking ser-
vice. In: Proceedings of the 2009 Tenth International Conference on Mobile Data Manage-
ment: Systems, Services and Middleware, MDM 09, pp. 357358. IEEE Computer Society
(2009)
42. Zheng, Y., Wang, L., Zhang, R., Xie, X., Ma, W.Y.: Geolife: Managing and understanding your
past life over maps. In: Proceedings of the The Ninth International Conference on Mobile Data
Management, pp. 211212. IEEE Computer Society, Washington, DC, USA (2008)
43. Zheng, Y., Xie, X.: Learning location correlation from gps trajectories. In: Proceedings of the
2010 Eleventh International Conference on Mobile Data Management, MDM 10, pp. 2732.
IEEE Computer Society, Washington, DC, USA (2010)
44. Zheng, Y., Xie, X.: Learning travel recommendations from user-generated gps traces. ACM
Trans. Intell. Syst. Technol. 2, 2:12:29 (2011)
45. Zheng, Y., Xie, X., Ma, W.Y.: Geolife: A collaborative social networking service among user,
location and trajectory. IEEE Data Eng. Bull. 33(2), 3239 (2010)
46. Zheng, Y., Zhang, L., Ma, Z., Xie, X., Ma, W.Y.: Recommending friends and locations based
on individual location history. ACM Trans. Web 5, 5:15:44 (2011)
47. Zheng, Y., Zhang, L., Xie, X., Ma, W.Y.: Mining correlation between locations using human
location history. In: Proceedings of the 17th ACM SIGSPATIAL International Conference on
Advances in Geographic Information Systems, GIS 09, pp. 472475. ACM, New York, NY,
USA (2009)
48. Zheng, Y., Zhang, L., Xie, X., Ma, W.Y.: Mining interesting locations and travel sequences
from gps trajectories. In: Proceedings of the 18th international conference on World wide
web, WWW 09, pp. 791800. ACM, New York, NY, USA (2009)