Research ArticleEfficient Processing of Moving k-Range Nearest NeighborQueries in Directed and Dynamic Spatial Networks
Hyung-Ju Cho1 and Rize Jin2
1Department of Software Kyungpook National University Gyeongsang-daero 2559 Sangju-siGyeongsangbuk-do 37224 Republic of Korea2Department of Information amp Computer Engineering Ajou University Worldcup-ro 206 Yeongtong-guSuwon 16499 Republic of Korea
Correspondence should be addressed to Hyung-Ju Cho hyungjuknuackr
Received 6 August 2015 Revised 18 October 2015 Accepted 29 October 2015
Academic Editor Hua Lu
Copyright copy 2016 H-J Cho and R JinThis is an open access article distributed under the Creative Commons Attribution Licensewhich permits unrestricted use distribution and reproduction in any medium provided the original work is properly cited
A k-range nearest neighbor (kRNN) query in a spatial network finds the k closest objects to each point in the query region Theessential nature of the kRNNquery is significant in location-based services (LBSs) where location-aware queries with query regionssuch as kRNN queries are frequently used because of the issue of location privacy and the imprecision of the associated positioningtechniques Existing studies focus on reducing computation costs at the server side while processing kRNN queries They alsoconsider snapshot queries that are evaluated once and terminated as opposed to moving queries that require constant updating oftheir results However little attention has been paid to evaluating moving kRNN queries in directed and dynamic spatial networkswhere every edge is directed and its weight changes in accordance with the traffic conditions In this paper we propose an efficientalgorithm called MORAN that evaluates moving k-range nearest neighbor (MkRNN) queries in directed and dynamic spatialnetworksThe results of a simulation conducted using real-life roadmaps indicate thatMORAN ismore effective than a competitivemethod based on a shared execution approach
1 Introduction
Recently positioning devices such as global positioningsystem (GPS) have become very popular The use of nav-igation systems in automobiles is already widespread andthis together with mobile communications facilitates newexciting applications [1 2] In these systems points of interest(POIs) for example hotels campsites and fuel stationsprovided by online map services are located in a spatialnetwork and their proximity can be defined by the lengthfor example the travel time of the shortest path connectingthem [3 4] A k-range nearest neighbor (kRNN) query findsthe 119896 closest objects to each point inside a query range asopposed to a query point [5ndash8] Figure 1 gives an exampleof a kRNN query in a spatial network where a query object119902 is located inside a query region 119876 denoted by a rectanglefor presentation convenience Note that the numbers on thearrows in the figure indicate the order of the steps kRNN
queries are widely used in the context of location privacy andlocation uncertainty in location-based services (LBSs) Morespecifically when using a potentially untrusted LBS serverusers are reluctant to expose their exact location to the serverbecause of the possibility of privacy leakages [9 10] As aresult many privacy-preserving techniques that blur the userlocation into a spatial region corresponding to query region119876have been proposed Indeed location uncertainty is inherentin LBSs because of the imprecision of the utilized positioningsystem [5]
Depending on the query lifetime a location-aware querycan be classified as either a snapshot query or a movingquery A snapshot query returns a result only once whereas amoving query returns results continuously for a designatedperiod Existing algorithms focus on evaluating snapshot119896RNN queriesThey primarily consider undirected and staticspatial networks where every edge is undirected and itsweight does not change over time [5ndash8] However their
Hindawi Publishing CorporationMobile Information SystemsVolume 2016 Article ID 2406142 17 pageshttpdxdoiorg10115520162406142
2 Mobile Information Systems
(1) q submits a kRNN query for a query region Q
(2) Server returns a set of candidate objects for q isin Q
q
Q
LBS server
Figure 1 Example of a 119896RNN query whose region is denoted by 119876
problem scenarios based on undirected and static spatialnetworks fail to provide a sufficient level of realism for manyapplications of interest when query objects move freely andconstantly
In this paper we present a new approach for evaluatingmoving 119896RNN queries (M119896RNN) in directed and dynamicspatial networks where each edge has a particular orientationand its weight changes in accordance with the traffic condi-tions Clearly directed and dynamic spatial network modelsprovidemore realistic modeling of urban road networks thanundirected and static spatial network models For exampleafter entering a highway a driver must remain on thathighway until heshe has reached an exit point even ifheshe has chosen an incorrect path Thus a highway canbe represented using directed edges Furthermore the traveltime to a destination selected by a query user frequentlychanges in accordance with the traffic conditions In movingobjects databases a safe segment (or safe region) is a populartechnique used in the processing of moving queries [11ndash17] A safe segment (or safe region) indicates a segment (orregion) in which the movement of a query object does notcause the current query result to changeThis helps to reducecommunication and computation costs
In this paper we propose an efficient algorithm calledMORAN for processing moving k-range nearest neighborqueries in directed and dynamic spatial networks under theassumption that query objects move freely on spatial net-works and that data objects are stationary In our approacha query region 119876 is partitioned into safe segments whichare maintained in directed and dynamic spatial networksClearly unless the safe segments are used the query objectshould evaluate a kNN query at its location using the kRNNquery result provided by the server whenever it movesinside the query region This simple approach places anexcessive computational burden on the client side with a highcomputation frequency Another considerable approach thatcan be used to solve this problem is to predict the movementof the query object in order to create the query resultsbeforehand [18 19] However in this paper we consider amore realistic scenario in which the query object movesarbitrarily and its path is not known in advance
The contributions made in this paper can be summarizedas follows
(i) We propose a new algorithm calledMORAN that par-titions query regions into safe segments to facilitate
efficient processing of MkRNN queries in directedand dynamic spatial networks
(ii) We also propose a method that preserves the validityof the safe segments when traffic conditions areupdated
(iii) We outline extensive experiments conducted to dem-onstrate the effectiveness and efficiency of MORANunder various conditions
The remainder of this paper is organized as followsSection 2 reviews related studies Section 3 defines the pri-mary terms used in this paper and formulates the researchproblem Section 4 presents our proposed method for divid-ing query regions into safe segments in directed spatial net-works Section 5 presents our proposedmethod formaintain-ing the safe segments in dynamic spatial networks Section 6analyzes the extensive experimental results obtained FinallySection 7 provides concluding remarks regarding the pro-posed method
2 Related Work
To ensure location privacy in pervasive computing mobileusers frequently issue kRNN queries using cloaked regionscorresponding to the query regions in this study [5ndash8 20]Then a server performs query processing assuming that theuser can be at any location inside the query region and thusnot knowing the exact location of the query issuer Severalstudies on processing of kRNN queries in Euclidean spacehave been conducted Kalnis et al [21] developed a newalgorithm for computing kRNN queries based on circularregions that reduce the number of redundant results aswell as the communication cost Chow et al [22] proposeda new approximate range NN query processing algorithmthat enables the user to tune the tradeoff between thequery response time and the quality of the query answersThe algorithm allows the user to specify an approximationtolerance level where an answer set A is returned suchthat each object in A is one of the kNNs of every pointin the query region Xu et al [23] developed an efficientalgorithm for evaluating circular-region-based kNN queriesthat applies a filter method based on a distance measure toprune out POIs effectively However these techniques basedon Euclidean distance cannot be applied to our problem
Mobile Information Systems 3
concerning network-constrained mobile users and networkdistance-based queries
kRNN queries have also been widely studied in thecontext of privacy-preserving LBSs based on spatial networkdistance where the exact location of the query issuer isblurred into the query region [5ndash8]The basic idea underlyingthe processing of a kRNN query is to execute a range queryto retrieve data objects within the query region and executekNN queries at the boundary points of the query regionKu et al [6] developed a privacy-aware spatial networknearest neighbor query algorithm that retrieves all POIsinside a given cloaked region and finds POIs outside thecloaked region using spatial network expansion Naturallyissuing kNNqueriesmultiple times in order to process kRNNqueries leads to a huge redundant search overhead To rectifythis problem Bao et al [5] proposed an efficient kRNNquery processing algorithm that employs a shared executionapproach to eliminate the redundant search overhead
Existing algorithms such as [5ndash8] deal with snapshotkRNN queries as opposed to the moving kRNN queries con-sidered in this study Consequently they focus on reducingthe computation time of the server as well as communicationcosts between the server and query objects Thus whileprocessing snapshot kRNN queries existing algorithms donot have to consider the computation time of the queryobjects that evaluate the exact kNNset using a set of candidatedata objects provided by the server This is because inprocessing snapshot kRNN queries the computation time ofthe query objects is very small compared to the computationtime of the server However very little research has focusedon supporting MkRNN queries in directed and dynamicspatial networks where the computation time of the queryobjects is not negligible
Nutanong et al [16] developed an incremental safe-region-based technique called the 119881lowast-Diagram for answer-ing moving kNN queries in Euclidean space as well as inundirected spatial networks However 119881lowast-Diagram is notappropriate in our problem scenarios because the distanceis transitive in both Euclidean space and undirected spatialnetworks whereas the distance is not transitive in directedspatial networks Yung et al [17] proposed an algorithm forcomputing the boundary referred to as safe exits of thesafe region of moving range queries in spatial networksTheir solution focuses onmoving range queries (eg find gasstations within 119903 = 3 km for the next 10 minutes) and is thusinapplicable for the processing of MkRNN queries
MORAN differs from existing studies in several aspectsfirst it considers MkRNN queries in directed and dynamicspatial networks second it focuses on reducing the compu-tation time and frequency of the query object and finallyit efficiently determines and maintains safe segments withina query region In recent years various types of querieson moving objects have also been studied extensively Theyinclude range queries [14 17] kNN queries with two predi-cates [24] and obstructed kNN queries [25] The associatedstudies have different problem scenarios from those in ourstudy and their solutions are not appropriate
Finally Table 1 compares our problem scenario withrelated work in terms of query type space domain and
Table 1 Classification of related work
References Query type Space domain Query object Data object[11 12] Range Euclidean Moving Static[4] Range USSN Static Static[17] Range USSN Moving Static[14] Range DDSN Moving Static[15 16 18 19] kNN Euclidean Moving Static[2 13 16] kNN USSN Moving Static[4 30 31] kNN USSN Static Static[1 26] kNN USSN Moving Moving[20ndash23] kRNN Euclidean Static Static[5ndash8] kRNN USSN Static StaticThis paper kRNN DDSN Moving Static
mobility of query objects and data objects Because of spacelimitations we shorten the terms ldquoundirected and staticspatial networkrdquo to ldquoUSSNrdquo and ldquodirected and dynamicspatial networkrdquo to DDSN
3 Background
Section 31 defines the terms and notations used in this paperSection 32 formulates the problem by using an example
31 Definition of Terms and Notations Now we define theterms and notations used in this paper for clarification
Spatial Network A spatial network is represented by aweighted directed graph 119866 = (119873 119864119882) where 119873 119864 and119882 denote a node set edge set and edge distance matrixrespectively Each edge connecting two nodes has a weightand a specific orientation The weight of an edge changesdepending on the traffic conditions and its direction is eitherbidirectional or unidirectional Specifically 119899
119894119899119895denotes an
undirected edge where 119899119894and 119899
119895are adjacent nodes whereas
997888997888rarr119899119894119899119895orlarr997888997888119899
119894119899119895denotes a directed edgeThe arrow above the edge
denotes the associated direction
Classification of Nodes Nodes can be classified into threecategories according to the node degree (1) if it is greater thanor equal to 3 the node is referred to as an intersection node(2) if it is equal to 2 the node is an intermediate node and (3)if it is equal to 1 the node is a terminal node
Edge Sequence and Segment An edge sequence denoted byeither 119899
119904119899119904+1sdot sdot sdot 119899
119890or 997888997888997888997888997888997888997888997888997888997888rarr119899
119904119899119904+1sdot sdot sdot 119899
119890 refers to a path connecting
two nodes 119899119904and 119899
119890 such that 119899
119904(or 119899
119890) is either an
intersection or terminal node and the other nodes in thepath are intermediate nodes The two end nodes 119899
119904and 119899
119890
are called boundary nodes Clearly all edges in the sameedge sequence have the same directionThe length of an edgesequence is the total weight of the edges in the edge sequenceOne part of an edge sequence is called a segment Note thatby definition an edge sequence is also a segment defined bythe boundary nodes of the edge sequence
4 Mobile Information Systems
16 2 4
2
3
4
3
n1 n2
n3 n4
n5 n6
o1o2
Figure 2 dist(1199001 119900
2) = 6 dist(119900
2 119900
1) = 9 and len(119900
1 119900
2) = 9
To simplify the presentation Notations and Their Def-initions summarizes the notations used in this paper Thedistance between two points in a directed spatial network 119866is not symmetric that is for two points 119901
1 119901
2isin 119866 there is
no guarantee that dist(1199011 119901
2) equals dist(119901
2 119901
1) Note that
if the algorithms for MORAN operate in the same mannerfor undirected and directed spatial segments an undirectedsegment is used for convenience to describe the algorithms
Figure 2 depicts the distances and segment lengthbetween two objects 119900
1and 119900
2in a directed spatial network
In this figure the shortest path from 1199001to 119900
2is 119900
1rarr
1198992rarr 119899
5rarr 119900
2and thus the distance from 119900
1to 119900
2is
dist(1199001 119900
2) = 6 Conversely the shortest path from 119900
2to 119900
1
is 1199002rarr 119899
4rarr 119899
3rarr 119900
1and thus the distance from 119900
2to
1199001is dist(119900
2 119900
1) = 9 This proves that the network distance
is not symmetric in a directed spatial network The segmentconnecting 119900
1and 119900
2in the same edge sequence larr997888997888997888997888997888997888997888119899
2119899311989941198995
becomes 1199001rarr 119899
3rarr 119899
4rarr 119900
2and thus its length is
len(1199001 119900
2) = 9 Recall that len(119901
1 119901
2) is defined if and only
if the two points 1199011and 119901
2 are located in the same edge
sequence
32 Problem Formulation Figure 3 shows an example of anM119896RNN query in a directed and dynamic spatial networkHere data objects 119900
1through 119900
5are represented by the
rectangles and a query region 119876 is represented by a set ofbold line segments that is 119876 =
larr99788899788899788811989911198993 119899
21198993larr99788899788899788811989931198994 The
boundary point of a query region indicates the point wherethe query region and nonquery region meet In this examplequery region119876 has four boundary points 119899
1through 119899
4 The
number next to an edge indicates the distance between thetwo adjacent objects Suppose that a query object 119902 in queryregion 119876 requests two NNs from the server while hiding itslocation from the server Then the kRNN query result for119876 should include the two closest data objects to each pointin query region 119876 The query result can be represented bya set of ⟨119878 119877⟩ tuples where 119878 is a safe segment in 119876 and119877 is the query result for the safe segment 119878 As shown inFigure 3(a) query region 119876 can be partitioned into four safesegments that is Ω
1= ⟨larr99788899788899788811989911199003 119900
1 119900
2⟩ Ω
2= ⟨997888997888997888rarr11989931199003 119900
2 119900
3⟩
Ω3= ⟨119899
2119904 119900
4 119900
5⟩ andΩ
4= ⟨119899
3119904cuplarr99788899788899788811989931198994 119900
3 119900
4⟩ Clearly if
query object 119902 is located in a safe segmentlarr99788899788899788811989911199003(ie 119902 isin larr997888997888997888119899
11199003)
then the kNN set of 119902 is 1199001 119900
2 Similarly if 119902 isin 997888997888997888rarr119899
31199003 then
the kNN set of 119902 is 1199002 119900
3 if 119902 isin 119899
2119904 then the kNN set for
119902 is 1199004 119900
5 and if 119902 isin 119899
3119904 cuplarr99788899788899788811989931198994 then the kNN set of 119902 is
1199003 119900
4 As shown in Figure 3(b) if the weight of an edge997888997888997888rarr119899
11199001
represented by the bold dotted line is updated from 3 to 5 at
time 119905119895 this update may affect the safe segments computed at
time 119905119894 which leads to nullifying the kNN set of 119902 isin 119876
The query region 119876 consists of a set 119876119904 of 119897 segments anda set 119876119887 of 119898 boundary points that is 119876119904
= 1199041 1199042 119904
119897
and 119876119887
= 1198871 1198872 119887
119898 Clearly a query object 119902 is located
inside query region 119876 while hiding its exact location fromthe server to ensure location privacy Note that we use theterms ldquoquery object 119902rdquo and ldquoquery point 119902rdquo interchangeablyfor convenience of discussion Clearly for a query point 119902 isin119876 119874119902
119896sube (⋃
119898
119894=1119874119887119894
119896) cap (⋃
119897
119895=1119874(119904
119895)) holds where 119874119887119894
119896refers to
a set of 119896NNs at a boundary point 119887119894isin 119876
119887 and 119874(119904119895) refers to
a set of objects inside a segment 119904119895isin 119876
119904 It should be notedthat processing kRNN queries at the server is orthogonal tothis studyTherefore any kRNN query processing algorithms(eg [5 6]) can be used to evaluate the kRNN queries atthe server The server evaluates a kRNN query for a queryregion 119876 and then provides a set of candidate data objects toquery object 119902 Finally 119902 determines safe segments using a setof candidate data objects for the query region 119876 Recall thatgiven a safe segment 119878 for two points 119902
1 119902
2isin 119878 1198741199021
119896is equal
to 1198741199022
119896
Figure 4 illustrates three scenarios that can arise when aquery object 119902 issues kRNN queries As shown in Figure 4(a)at time 119905
119894 a query object 119902 submits a kRNN query for a
query region 119876119894to the server On receiving the query the
server evaluates the kRNN query and returns the queryresult to 119902 isin 119876
119894 Clearly 119902 determines safe segments inside
query region 119876119894using the kRNN query result As shown in
Figure 4(b) when 119902 leaves the query region 119876119894at time 119905
119895 it
submits a kRNN query for an updated query region 119876119895to
the server Then the server evaluates the kRNN query andreturns the query result to 119902 isin 119876
119895 Clearly 119902 determines safe
segments inside query region 119876119895 As shown in Figure 4(c)
while 119902 is inside 119876119895at time 119905
119896 a query region 119876
119895overlaps a
traffic congestion area119879 marked by a gray rectangle inwhichthe weight of the edges changes The server realizes that thetraffic congestion area 119879 invalidates the kRNN query resultfor 119876
119895and thus requests that 119902 updates the query region
Consequently 119902 submits a kRNN query for an updated queryregion 119876
119896to the server which evaluates the kRNN query
and returns the query result to 119902 isin 119876119896 Clearly 119902 determines
the safe segments inside query region 119876119896 In Section 5 we
elaborate on a method to verify that an updated trafficcondition invalidates current kRNN query results
4 Processing MkRNN Queries inDirected Spatial Networks
In Section 41 we give an overview of MORAN InSection 42 we present an algorithm for determiningsafe segments in a query region Finally in Section 43 wediscuss the construction of the safe segments of an MkRNNquery for the example of directed spatial network
41 Overview As stated before we focus on query processingat the client side while processing MkRNN queries in adirected and dynamic spatial network If either of the two
Mobile Information Systems 5
3 2
2
4
1
2
3
3
3 6
4
4
3
2
3 2
2
4
1
2
3
3
25 6
4
4
3
2
s
n1n1
n2n2 n3n3n4n4
n5n5n6n6
o1o1
o5
o4
o3
o2
o3
o4
o5
o2
Ω1
Ω2
Ω3 Ω4
Ω3 = ⟨n2s o4 o5⟩
Ω1 = ⟨larr997888997888997888n1o3 o1 o2⟩
Ω2 = ⟨997888997888997888rarrn3o3 o2 o3⟩
Ω4 = ⟨ n3s cuplarr997888997888997888n3n4 o3 o4⟩
(a) MkRNN query with 119896 = 2 and its safe segments at time 119905119894
5 2
2
4
1
2
3
3
3 6
4
4
3
2
n1
n2 n3n4
n6n5
o1
o5
o4
o3
o2
(b) Updated traffic conditions at time 119905119895
Figure 3 Example of MkRNN query in a spatial network where 119896 = 2 and 119905119894lt 119905
119895
Qi
q
(1) q submits kRNN query for a query region Qi
(2) Server returns a set of candidate objects to qisin Qi
LBS server
(a) 119902 submits a 119896RNN query for a query region119876119894to the server at time 119905
119894 where 119902 isin 119876
119894
q
Qj
(1) q submits kRNN query for a query region Qj
(2) Server returns a set of candidate objects to qisin Qj
LBS server
(b) 119902 submits a 119896RNN query for an updated query region119876119895to the server when 119902 leaves119876
119894at 119905
119895
q
Qj
T(1) Server requests thatq updates the query region
(2)q submits kRNN query for an updated query region Qk
LBS server
(c) Server requests that 119902 updates the query region when a set of candidate objects is invalidated at 119905119896
Figure 4 Three scenarios for processing MkRNN queries
events in Figure 5 occurs the server should evaluate thekRNN query and provide query object 119902 with an updatedkRNN query result The first event is 119902 leaving the cur-rent query region For example as shown in Figure 5(a)if 119902 moves to 1199021015840 outside of 119876 a kRNN query should bereevaluated with the updated query regionThe second event
is invalidation of the current kRNN query result providedto query object 119902 because of an updated traffic conditionFor example as shown in Figure 5(b) if query region 119876overlaps traffic congestion area 119879 the kRNN query shouldbe reevaluated to reflect the updated traffic condition Whenthe query object receives an updated kRNNquery result from
6 Mobile Information Systems
Q
qq998400
(a) 119902 leaves query region119876
Q
q
T
(b) Congestion area 119879 nullifies 119896RNN query resultfor119876
Figure 5 Two events that trigger the evaluation of MkRNN queries
Input Q query region k the number of requested NNsOutputΩ the set of safe segments in 119876(1)Ω larr 0 Ω is initialized to an empty set(2) for each segment 120572120573 isin 119876 do(3) 119874
120572
119896larr evaluate kNN query at point (120572 k) a kNN query is evaluated at a boundary point 120572
(4) 119874120573
119896larr evaluate kNN query at point (120573 k) a kNN query is evaluated at a boundary point 120573
(5) 119874(120572120573) larr evaluate range query (120572120573) a range query is evaluated for a segment 120572120573(6) Ω(120572120573) larr find safe segments (119874120572
119896 119874120573
119896 119874(120572120573)) the function is detailed in Section 42
(7) Ω larr Ω cup Ω(120572120573)
(8) return Ω the set of safe segments is provided to the query issuer
Algorithm 1 MORAN (Q k)
the server it should reevaluate safe segments inside the queryregion Using safe segments reduces the computation timeand frequency because the query object does not have toevaluate kNN queries while inside the safe segments
Algorithm 1 outlines the process of determining the safesegments in a query region 119876 in a directed spatial networkThe algorithm starts by initializing Ω to an empty set whichstores the safe segments found thus far Each segment 120572120573in query region 119876 is explored sequentially to find the safesegments in segment120572120573 For this purposeMORANevaluatestwo kNN queries issued at boundary points 120572 and 120573 ofsegment 120572120573 The query results are stored to 119874120572
119896and 119874120573
119896
respectively The objects in 120572120573 are explored and stored to119874(120572120573) The function find safe segments is called with 119874120572
119896
119874120573
119896 and 119874(120572120573) in order to find safe segments in segment
120572120573 The found safe segments are added to the result set ΩWhen all the segments in 119876 have been examined a set Ωof safe segments in query region 119876 is returned to the queryissuer It should be noted that if updates in the weight of edgesfrequently occur in a spatial network it is better to determinethe safe segments in the current segment including the querypoint rather than all the safe segments in the query regionWe employ a shared execution approach [5] which is widely
used to avoidmultiple visits to the samenodes and edgesThisclearly reduces the query processing time while determiningsafe segments in a query region
42 Partitioning Query Region into Safe Segments We con-sider an undirected segment 120572120573 followed by a directedsegment
997888rarr120572120573 We present a method for finding safe segments
in segment 120572120573 by using119874120572
119896119874120573
119896 and119874(120572120573) Here119874120572
119896and119874120573
119896
refer to sets of 119896NNs at boundary points 120572 and 120573 respectivelyand 119874(120572120573) refers to a set of objects inside segment 120572120573 Anobject 119900 that belongs to the union of 119874120572
119896 119874120573
119896 and 119874(120572120573) that
is 119900 isin 119874120572
119896cup 119874
120573
119896cup 119874(120572120573) is referred to as a qualifying object
Clearly the set 119874119902
119896of 119896NNs at a query point 119902 isin 120572120573 is a
subset of the union of 119874120572
119896 119874120573
119896 and 119874(120572120573) [5 13 26] that is
119874119902
119896sube (119874
120572
119896cup119874
120573
119896cup119874(120572120573)) If119874120572
119896equals119874120573
119896and119874(120572120573) is a subset
of119874120572
119896 segment 120572120573 becomes a safe segment Otherwise it has
two or more safe segmentsWe first explore the change in a network distance
dist(119902 119900) for a qualifying object 119900 isin 119874120572
119896cup 119874
120573
119896cup 119874(120572120573)
when a query point 119902 is located in an undirected segment120572120573 [13 14] Figure 6 shows the change in dist(119902 119900) for three
Mobile Information Systems 7
Table 2 Computation of dist(119902 119900) where 119902 isin 120572120573 and 119900 isin 119874120572
119896cup 119874
120573
119896cup 119874(120572120573)
Condition dist(119902 119900)
119900 isin 119874120572
119896minus (119874
120573
119896cup 119874(120572120573)) dist (119902 119900) = len (119902 120572) + dist (120572 119900)
119900 isin 119874120573
119896minus (119874
120572
119896cup 119874(120572120573)) dist (119902 119900) = len (119902 120573) + dist (120573 119900)
119900 isin 119874(120572120573) minus (119874120572
119896cup 119874
120573
119896) dist (119902 119900) = len (119902 119900)
119900 isin 119874120572
119896cap 119874
120573
119896minus 119874(120572120573) dist (119902 119900) = min (len (119902 120572) + dist (120572 119900) len (119902 120573) + dist (120573 119900))
119900 isin 119874120572
119896cap 119874(120572120573) minus 119874
120573
119896dist (119902 119900) = min (len (119902 120572) + dist (120572 119900) len (119902 119900))
119900 isin 119874120573
119896cap 119874(120572120573) minus 119874
120572
119896dist (119902 119900) = min (len (119902 120573) + dist (120573 119900) len (119902 119900))
119900 isin 119874120572
119896cap 119874
120573
119896cap 119874(120572120573) dist (119902 119900) = min (len (119902 120572) + dist (120572 119900) len (119902 120573) + dist (120573 119900) len (119902 119900))
120572
o
q 120573
dist(120572 o)
dist(120572 o) + len(120572 120573)
(a) If 119900 isin 119874120572
119896 then dist(119902 119900) = len(119902 120572) +
dist(120572 119900)
120572
o
120573
len(120572 120573) + dist(120573 o)
dist(120573 o)
(b) If 119900 isin 119874
120573
119896
then dist(119902 119900) = len(119902 120573) +dist(120573 119900)
o120572 q 120573
len(120572 o)
len(o 120573)
(c) If 119900 isin 119874(120572120573) thendist(119902 119900) = len(119902 119900)
Figure 6 Evaluation of dist(119902 119900) where 119902 isin 120572120573 and 119900 isin 119874120572
119896cup 119874
120573
119896cup 119874(120572120573)
cases 119900 isin 119874120572
119896 119900 isin 119874120573
119896 and 119900 isin 119874(120572120573) In this figure the
119910-axis represents dist(119902 119900) and the 119909-axis represents len(120572 119902)for 0 le len(120572 119902) le len(120572 120573) If 119900 isin 119874120572
119896 then dist(119902 119900) =
len(119902 120572) + dist(120572 119900) as shown in Figure 6(a) Similarly if119900 isin 119874
120573
119896 then dist(119902 119900) = len(119902 120573) + dist(120573 119900) as shown in
Figure 6(b) Finally if 119900 isin 119874(120572120573) then dist(119902 119900) = len(119902 119900)as shown in Figure 6(c)
Table 2 summarizes the evaluation of dist(119902 119900) for 119902 isin 120572120573and 119900 isin 119874120572
119896cup 119874
120573
119896cup 119874(120572120573) where MIN returns the minimum
of the values in the input array Because a qualifying object 119900belongs to a combination of119874120572
119896119874120573
119896 or119874(120572120573) a total of seven
possible cases are considered Note that dist(120572 119900) dist(120573 119900)len(120572 119900) and len(120573 119900) are given constants and dist(119902 119900) is thelength of the shortest path among multiple paths from 119902 and119900
Figure 7 shows an example of the change in dist(119902 119900)depending on the location of query point 119902 isin 119899
2119899511989961198993 For
simplicity we assume that the number of NNs requested atquery point 119902 is 119896 = 1 Then as shown in Figure 7(a) 1198741198992
119896
1198741198993
119896 and 119874(119899
2119899511989961198993) are evaluated as 1198741198992
119896= 119900 1198741198993
119896= 119900
and119874(1198992119899511989961198993) = 119900 respectively As shown in Figure 7(b)
the distance from 119902 to 119900 represented by the bold lines isdist(119902 119900) = len(119902 119900) if 119902 isin 119899
211989951198996 otherwise it is dist(119902 119900) =
len(119902 1198993) + 3 because dist(119899
2 119900) = 1 dist(119899
3 119900) = 3 and
len(1198992 119900) = 1 are given
Next we explore the change in network distance dist(119902 119900)for object 119900 isin 119874120572
119896cup 119874
120573
119896cup 119874(
997888rarr120572120573) when a query point 119902 is
located in a directed segment997888rarr120572120573 Figure 8 shows the change
in dist(119902 119900) for three cases 119900 isin 119874120572
119896 119900 isin 119874120573
119896 and 119900 isin 119874(
997888rarr120572120573)
1
2
1 2
1 16 5
n1 n4n2 n3
n5
n6o
q
(a) q isin n2n5n6n3
9
7
5
3
112 2
n2 n3n5 n6
o
o
o
(b) dist(q o) = len(q o) if q isin n2n5n6
len(q n3) + 3 otherwise
Figure 7 Computation of ist(119902 119900) where 119902 isin 1198992119899511989961198993and 119900 isin
1198741198992
119896cap 119874
1198993
119896cap 119874(119899
2119899511989961198993)
Note that the dotted lines indicate that no paths exist from119902 to 119900 for the corresponding intervals which are denoted bydist(119902 119900) = infin For object 119900 isin 119874120572
119896 as shown in Figure 8(a)
8 Mobile Information Systems
asympasymp
dist(120572 o) o
120572 q 120573
infin
(a) If o isin O120572k then dist(q o) = dist(120572 o) if q = 120572
infin otherwise
o
120572 q 120573
len(120572 120573)+dist(120573 o)
dist(120573 o)
(b) If o isin O120573
k then dist(q o) = len(q 120573) + dist(120573 o)
asympasymp
120572 qo 120573
len(120572 o)
infin
(997888rarr120572120573
997888rarr120572(c) If o isin O then dist(q o) =len(q o) if q isin o
infin otherwise)
Figure 8 Evaluation of dist(119902 119900) where 119902 isin997888rarr120572120573 and 119900 isin 119874120572
119896cup 119874
120573
119896cup
119874(997888rarr120572120573)
if 119902 = 120572 then dist(119902 119900) = dist(120572 119900) otherwise (ie 119902 isin997888rarr120572120573minus120572) dist(119902 119900) = infin Similarly if 119900 isin 119874120573
119896 then dist(119902 119900) =
len(119902 120573) + dist(120573 119900) as shown in Figure 8(b) Finally forobject 119900 isin 119874(
997888rarr120572120573) as shown in Figure 8(c) if 119902 isin 997888rarr120572119900 then
dist(119902 119900) = len(119902 119900) otherwise (ie 119902 isinlarr997888120573119900) dist(119902 119900) = infin
Here dist(119902 119900) is the length of the shortest path from 119902 and119900 where query point 119902 isin
997888rarr120572120573 and is thus determined using
Table 2 in the same way as 119902 isin 120572120573Figure 9 shows an example of the change in dist(119902 119900)
depending on the location of query point 119902 isin 997888997888997888997888997888rarr119899211989951198993 For
simplicity we assume that the number of NNs requested atquery point 119902 is 119896 = 1 Then as shown in Figure 9(a) 1198741198992
119896
1198741198993
119896 and 119874(997888997888997888997888997888rarr119899
211989951198993) are evaluated as 1198741198992
119896= 119900 1198741198993
119896= 119900
and 119874(997888997888997888997888997888rarr119899211989951198993) = 119900 respectively As shown in Figure 9(b)
the distance from 119902 to 119900 represented by the bold lines isdist(119902 119900) = len(119902 119900) if 119902 isin 997888997888rarr119899
2119900 otherwise it is dist(119902 119900) =
len(119902 1198993) + 3 because dist(119899
2 119900) = 1 dist(119899
3 119900) = 3 and
len(1198992 119900) = 1 are given
1
2
3
1
16 5
n1 n4n2 n3
n5
o
q
(a) q isin 997888997888997888997888997888rarrn2n5n3
21
3
3
9
n2 n3n5o
o
o
asympasymp
infin
997888997888rarrn2o(b) dist(q o) =len(q o) if q isinlen(q n3) + 3 otherwise
Figure 9 Computation of dist(119902 119900) where 119902 isin 997888997888997888997888997888rarr119899211989951198993and 119900 isin 1198741198992
119896cap
1198741198993
119896cap 119874(
997888997888997888997888997888rarr119899211989951198993)
43 Partitioning Example Query Region into Safe SegmentsWe now discuss the construction of safe segments for queryregion 119876 in Figure 3(a) Recall that the number of requestedNNs is 119896 = 2 and the query region includes three segmentsthat is 119876 = larr997888997888997888119899
11198993 119899
21198993larr99788899788899788811989931198994 Table 3 summarizes the com-
putation of the safe segments in query region 119876 Clearly thekNN set at a node 119899
3is evaluated only once and it is reused
multiple timesAs shown in Algorithm 1 MORAN determines the safe
segments for each segment in query region 119876 Therefore weshow the successive determination of the safe segments inlarr99788899788899788811989911198993 119899
21198993 and larr997888997888997888119899
31198994 It is clear that adjacent safe segments
with the same query result can be merged Recall that we candraw dist(119902 119900) by using a query point 119902 isin 120572120573 and an object119900 isin 119874
120572
119896cup 119874
120573
119896cup 119874(120572120573)
Figure 10 depicts dist(119902 119900) using a query point 119902 isin larr99788899788899788811989911198993
and each object 119900 isin 1198741198991
119896cup 119874
1198993
119896cup 119874(
larr99788899788899788811989911198993) Here the union
of 1198741198991
119896 1198741198993
119896 and 119874(larr997888997888997888119899
11198993) becomes 1198741198991
119896cup 119874
1198993
119896cup 119874(
larr99788899788899788811989911198993) =
1199001 119900
2 119900
3 119900
4 because 1198741198991
119896= 119900
1 119900
2 1198741198993
119896= 119900
3 119900
4 and
119874(larr99788899788899788811989911198993) = 119900
3 are given Figures 10(a) 10(b) 10(c) and 10(d)
illustrate dist(119902 1199001) dist(119902 119900
2) dist(119902 119900
3) and dist(119902 119900
4)
respectively Recall that 1199001isin 119874
1198991
119896 119900
2isin 119874
1198991
119896 119900
3isin 119874
1198993
119896cup
119874(larr99788899788899788811989911198993) and 119900
4isin 119874
1198993
119896hold
To partition a segment 120572120573 into safe segments it isessential to identify the 119896th NN 119900
119896th at a query point 119902 isin120572120573 among the qualifying objects 119900 isin 119874
120572
119896cup 119874
120573
119896cup 119874(120572120573)
Mobile Information Systems 9
Table 3 Computation of safe segments for the example query region
120572120573 120572 120573 119874120572
119896119874120573
119896119874(120572120573) Ω(120572120573)
larr99788899788899788811989911198993
1198991
1198993
1199001 119900
2 119900
3 119900
4 119900
3 ⟨
larr99788899788899788811989911199003 119900
1 119900
2⟩ ⟨
997888997888997888rarr11989931199003 119900
2 119900
3⟩ ⟨119899
3 119900
3 119900
4⟩
11989921198993
1198992
1198993
1199004 119900
5 119900
3 119900
4 119900
4 ⟨119899
2119904 119900
4 119900
5⟩ ⟨119899
3119904 119900
3 119900
4⟩
larr99788899788899788811989931198994
1198993
1198994
1199003 119900
4 119900
3 119900
4 0 ⟨
larr99788899788899788811989931198994 119900
3 119900
4⟩
10
3
7
n1 n3
o1
(a) dist(q o1) = len(q n1) + 3
7
2
9
n1 n3
o2
(b) dist(q o2) = len(q n1) + 2
4
43
n1 n3
o3
o3
asympasymp
infin
997888997888997888rarrn3o3(c) dist(q o3) =len(q o3) if q isininfin otherwise
7
3
n1 n3
o4
asymp asymp
infin
q = n3infin otherwise(d) dist(q o4) =3 if
Figure 10 Plot of ist(119902 119900) where 119902 isin larr99788899788899788811989911198993and 119900 isin 119900
1 119900
2 119900
3 119900
4
Algorithm 2determines the skyline119874119896th that consists of (119909 119910)
pairs such that 119909 = len(120572 119902) and 119910 = dist(119902 119900119896th) hold for
each query point 119902 isin 120572120573The variable count keeps the numberof qualifying objects processed thus far which is initializedto 0 (line (1)) If count is less than 119896 then the skyline for119900119896th is determined by 119874
119896th = (119909 119910) | 119909 = len(120572 119902) 119910 =max(dist(119902 120579
119896th) dist(119902 119900)) for 119902 isin 120572120573 where 120579119896th keeps the119896th NN determined thus far (lines (4)-(5)) Otherwise (ie119888119900119906119899119905 ge 119896) the skyline for 119900
119896th is determined by 119874119896th =
(119909 119910) | 119909 = len(120572 119902) 119910 = min(dist(119902 120579119896th) dist(119902 119900))
for 119902 isin 120572120573 (lines (6)-(7)) Naturally count increases by 1whenever an object o is processed (line (8))
Figure 11 illustrates the partitioning of a segment larr99788899788899788811989911198993
into three safe segments using dist(119902 119900) for each object 119900 isin1198741198991
119896cup 119874
1198993
119896cup 119874(
larr99788899788899788811989911198993) Figure 11(a) shows the plot of dist(119902 119900)
for each object 119900 isin 1199001 119900
2 119900
3 119900
4 Note that to simplify the
presentation the interval in which dist(119902 119900) = infin holds isnot represented When a query point 119902 moves in a segmentlarr99788899788899788811989911198993 its 119896th NN 119900
119896th is determined using Algorithm 2 andis represented by the bold lines in Figure 11(b) Specificallyfor 119902 isin larr997888997888997888119899
11199003 the 119896th NN 119900
119896th is 1199001and thus the kNN set is
1199001 119900
2 Similarly for 119902 isin 997888997888997888rarr119899
31199003 the 119896th NN 119900
119896th is 1199002and
thus the kNN set is 1199002 119900
3 Finally for 119902 = 119899
3 the 119896th NN
119900119896th is 119900
3and thus the 119896NN set is 119900
3 119900
4 Consequently a
segmentlarr99788899788899788811989911198993is divided into three safe segments represented
by Ω(larr99788899788899788811989911198993) = ⟨
larr99788899788899788811989911199003 119900
1 119900
2⟩ ⟨997888997888997888rarr11989931199003 119900
2 119900
3⟩ ⟨119899
3 119900
3 119900
4⟩
Figures 12(a) 12(b) and 12(c) illustrate dist(119902 1199003)
dist(119902 1199004) and dist(119902 119900
5) respectively where 119902 refers to a
query point in a segment 11989921198993and 119900
3 119900
4 and 119900
5refer to
qualifying objects for the segment 11989921198993 Note that 119900
3isin 119874
1198993
119896
1199004isin 119874
1198992
119896cup 119874
1198993
119896cup 119874(119899
21198993) and 119900
5isin 119874
1198992
119896hold
Figure 13 illustrates the partitioning of a segment 11989921198993
into two safe segments using dist(119902 119900) for each object 119900 isin1198741198992
119896cup 119874
1198993
119896cup 119874(119899
21198993) Figure 13(a) shows the plot of dist(119902 119900)
for each object 119900 isin 1199003 119900
4 119900
5 When a query point 119902
moves in a segment 11989921198993 its 119896th NN 119900
119896th is represented bythe bold lines in Figure 13(b) where a point 119904 marked by afive-pointed star indicates the middle of the segment 119899
21198993
Specifically for 119902 isin 1198992119904 the 119896th NN 119900
119896th is 1199005and thus
the kNN set is 1199004 119900
5 Similarly for 119902 isin 119899
3119904 the 119896th NN
119900119896th is 119900
3and thus the kNN set is 119900
3 119900
4 Consequently
a segment 11989921198993is divided into two safe segments which
are represented as Ω(11989921198993) = ⟨119899
2119904 119900
4 119900
5⟩ ⟨119899
3119904 119900
3 119900
4⟩
Finally a segment larr99788899788899788811989931198994becomes a safe segment that is
10 Mobile Information Systems
Input k the number of requested NNs 119874120572
119896cup 119874
120573
119896cup 119874(120572120573) the set of qualifying objects for a segment 120572120573
Output 119874119896th the set of distances from q to its kth NN 119900
119896th (ie 119874119896th = (119909 119910) | 119909 = len(120572 119902) 119910 = dist(119902 119900119896th))
(1) 119888119900119906119899119905 larr 0 count keeps the number of objects processed thus far(2) 119874
119896th = (119909 119910) | 119909 = len(120572 119902) 119910 = 0 for 119902 isin 120572120573 119910 = dist(119902 119900119896th) is initialized to 0 for 119902 isin 120572120573
(3) for each object 119900 isin 119874120572
119896cup 119874
120573
119896cup 119874(120572120573) do qualifying objects are handled sequentially
(4) if 119888119900119906119899119905 lt 119896 then if the number of objects processed thus far is less than 119896(5) 119874
119896th = (119909 119910) | 119909 = len(120572 119902) 119910 = max(dist(119902 120579119896th) dist(119902 119900)) for 119902 isin 120572120573 120579
119896th is the 119896th NN thus far(6) else(7) 119874
119896th = (119909 119910) | 119909 = len(120572 119902) 119910 = min(dist(119902 120579119896th) dist(119902 119900)) for 119902 isin 120572120573
(8) 119888119900119906119899119905 larr 119888119900119906119899119905 + 1 count increases by 1 whenever an object 119900 is processed(9) return 119874
119896th
Algorithm 2 Determine skyline for kth NN (k 119874120572
119896cup 119874
120573
119896cup 119874(120572120573))
3 3
3 4
4
9
10
2
n1 n3o3
o1o2
o4
(a) Plot of dist(119902 119900) for119900 isin 119900
1 1199002 1199003 1199004
3 34
9
10
2
n1 n3o3
3 4
o1o2
o4
okth
(b) Ω(larr99788899788899788811989911198993) = ⟨
larr99788899788899788811989911199003
11990011199002⟩ ⟨997888997888997888rarr119899
31199003 119900
2 1199003⟩
⟨1198993 119900
3 1199004⟩
Figure 11 Partitioning of a segmentlarr99788899788899788811989911198993into three safe segments
9
4
5
n2 n3
o3
(a) dist(119902 1199003) =
len(119902 1198993) + 4
87
32
2 3n2 n3o4
o4
o4
(b) dist(119902 1199004) =
len(119902 1199004)
4
9
5n2 n3
o5
(c) dist(119902 1199005) =
len(119902 1198992) + 4
Figure 12 Plot of dist(119902 119900) where 119902 isin 11989921198993and 119900 isin 119900
3 119900
4 119900
5
Ω(larr99788899788899788811989931198994) = ⟨
larr99788899788899788811989931198994 119900
3 119900
4⟩ This is because 1198741198993
119896equals 1198741198994
119896
and 119874(larr99788899788899788811989931198994) is a subset of 1198741198993
119896 that is 1198741198993
119896= 119874
1198994
119896and
119874(larr99788899788899788811989931198994) sub 119874
1198993
119896
5 Monitoring Safe Segments inDynamic Spatial Networks
Figure 14 illustrates an example of changing the weight of anedge 997888997888997888rarr119899
11199001in a spatial network where it is assumed that 119896 = 2
is given For convenience we consider the query region 119876
4 4
2
2 3n2 n3o4
o5 o3
(a) Plot of dist(119902119900) for 119900 isin 119900
3 1199004
1199005
4
2
2 3
34
n2 n3o4 s
o5 o3
okth
(b) Ω(11989921198993) =
⟨1198992119904 119900
4 1199005⟩
⟨1198993119904 119900
3 1199004⟩
Figure 13 Partitioning of a segment 11989921198993into two safe segments
that consists of an edgelarr99788899788899788811989911198993 that is 119876 = larr997888997888997888119899
11198993 As shown
in Figure 14(b) when the weight of an edge 997888997888997888rarr11989911199001has been
updated from 3 to 5 at time 119905119895 this update may invalidate
the safe segments in the query region 119876 Therefore it isnecessary to monitor the validity of safe segments in a queryregion when the change occurs To this end we introduce aninfluential region to monitor the validity of safe segmentsThe influential region Ψ
119902for a query point 119902 is defined as a
set of points 119901 such that dist(119902 119901) le dist(119902 119900119896th) holds If the
weight of an edge changes inside influential region Ψ119902 the
kNN query at query point 119902 should be reevaluated to reflectthe change in the weight However if the weight of an edgechanges outside influential regionΨ
119902 the change can be safely
ignored Suppose that a query region 119876 is represented by aset 119876119904 of 119897 connected segments and a set 119876119887 of 119898 boundarypoints that is 119876119904
= 1199041 1199042 119904
119897 and 119876119887
= 1198871 1198872 119887
119898
Then the influential region Ψ119876for query region 119876 becomes
the union of the influential region for each query point 119902 isin 119876that isΨ
119876= ⋃
119902isin119876Ψ119902This can be represented simply asΨ
119876=
119876cup(⋃119898
119894=1Ψ119887119894) whereΨ
119887119894refers to the influential region at each
boundary point 119887119894of the query region119876 SpecificallyΨ
119887119894is the
set of points 119901 such that dist(119887119894 119901) le dist(119887
119894 119900
119887119894
119896th) holds Here119900119887119894
119896th is the farthest answer object from boundary point 119887119894 that
Mobile Information Systems 11
3 4
4 63
3
3
2
4
1
3
2
2
2
n1
n2n3
n6n5
n4
o5
o1
o4
o3
o2
(a) Query region119876 = larr99788899788899788811989911198993 at time 119905
119894
3
3
32
4
5 2
3
46
1
2
2
4
n1
n2n3
n6n5
n4
o5
o1
o4
o3
o2
(b) Updating the weight of 997888997888997888rarr11989911199001at time 119905
119895
Figure 14 Changing the weight of an edge in a dynamic spatial network where 119905119894lt 119905
119895
46
3
3
3
2
4
1
1
1
1
3
2
2
2 2 2
n1
n2n3
n6n5
n4
o5
o1
o4
o3
o2
1205951
1205952 1205953
(a) Influence region Ψ119876at time 119905
119894
41 1 3 4
4
3
5 2
2
2
2
2
2
21
2
1
1
n1
n2n3
n6n5
n4
o5
o1
o4
o3
o2
1205951
1205953
1205955
1205952
1205954
(b) Updated influence region Ψ119876at time 119905
119895
Figure 15 Updating the influence region for 119876
is for each answer object 119900 isin 119874119887119894
119896 dist(119887
119894 119900) le dist(119887
119894 119900
119887119894
119896th)holds
Figure 15(a) illustrates the influential region for the queryregion 119876 at time 119905
119894 where the dotted line and square
brackets mark the influential region and its boundary pointsrespectively A set of the two NNs at boundary point 119899
1is
1198741198991
119896= 119900
1 119900
2 and the 119896th NN of 119899
1is 1199001198991
119896th = 1199001 Thus thedistance from 119899
1to its 119896th NN 119900
1is dist(119899
1 119900
1) = 3 and thus
the influential region Ψ1198991
for a boundary point 1198991becomes
Ψ1198991= 997888997888997888rarr11989911199001997888997888997888997888997888rarr119899111990021198994 Similarly the influential regionΨ
1198993for a
boundary point 1198993evaluates Ψ
1198993= 997888997888997888rarr11989931199003 119899
311990041205951 119899
31198995 119899
51205952
11989951205953 because 1198741198993
119896= 119900
3 119900
4 1199001198993
119896th = 1199003 and dist(1198993 119900
3) = 4
are given Consequently the influential region Ψ119876for query
region119876 becomesΨ119876=larr99788899788899788811989911198993cupΨ
1198991cupΨ
1198993= larr99788899788899788811989911198993997888997888997888997888997888rarr119899111990021198994997888997888997888rarr11989931199003
119899311990041205951 119899
31198995 119899
51205952 119899
51205953 As shown in Figure 15(b) updating
the weight of edge 997888997888997888rarr11989911199001from 3 to 5 may affect the safe
segments for the query region119876This is because updated edge997888997888997888rarr11989911199001overlaps the influential region Ψ
119876for query region 119876
In this case the server reevaluates the qualifying objects forquery region 119876 and provides updated qualifying objects sothat the user can update safe segments If the safe segmentsare updated the influential region should be also updatedaccordinglyThus the influential region for query region119876 isupdated at time 119905
119895 as shown in Figure 15(b) Finally updates
to the weights of the edges for examplelarr99788899788899788811989921199001 119899
21199005larr997888997888997888119899
31198994 and
11989941198996 that do not overlap the influential region can be safely
ignoredAlgorithm 3 monitors the validity of safe segments in a
query region when the weight of edges changes over timeAssume that the weight of edge 119899
119894119899119895is updated Subsequently
the server checks if edge 119899119894119899119895overlaps the influential region
Ψ119876for query region 119876 If the edge with the updated weight
does not overlap the influential region the update is safelyignored (lines (1)-(2)) Otherwise (ie Ψ
119876cap 119899
119894119899119895= 0) the
server requests that query object 119902 updates the query region(line (4)) Consequently 119902 submits a kRNNquery for updatedquery region119876updThe server then evaluates the kRNNqueryfor 119876upd and returns the kRNN query result Σ
119876updto 119902 (line
(5)) The query object then determines safe segments usingΣ119876upd
(line (6)) Finally the server updates the influentialregion accordingly (line (7))
6 Performance Evaluation
We describe our experimental settings in Section 61 andpresent the results of our experiments using real-life roadmaps in Section 62
61 Experimental Settings In the experiments we use tworeal-life roadmaps obtained from [27] to explore the impact
12 Mobile Information Systems
Input Ψ119876 influential region 119899
119894119899119895 updated edge
Output none(1) if Ψ
119876cap 119899
119894119899119895= 0 then an update to edge 119899
119894119899119895that does not overlap Ψ
119876is ignored
(2) ignore the update in the weight of edge 119899119894119899119895
(3) else this means that Ψ119876cap 119899
119894119899119895= 0
(4) 119876upd larr Update query region () server requests that 119902 update the query region(5) Σ
119876updlarr Evaluate 119896RNN query (119876upd 119896) server evaluates 119896RNN query for an updated query region
(6) Ω119876upd
larr Update safe segments (Σ119876upd
119896) 119902 determines safe segments inside the updated query region(7) Ψ
119876updlarr Update influential region (119876upd 119896) server updates influential region accordingly
Algorithm 3 Monitor safe segments (Ψ119876 119899
119894119899119895)
Table 4 Experimental parameter settings
Parameter RangeNumber of requested NNs (119896) 2 4 8 16 32Ratio of directed edge sequences to total edge sequences (119877dir) 0 5 10 20 50 ()Ratio of updated edge sequences to total edge sequences per timestamp (119877upd) 0 03 05 07 1 ()Size of query region (119876sz) 1 2 4 8 16
Number of data points (119873data)1 3 5 7 10 (times104) for NA1 3 5 7 10 (times103) for SJ
Speed of query points (119881qry)20 40 60 80 100 (kmh) for NA20 40 60 80 100 (kmh) for SJ
Distribution of data points (119863data) UniformDistribution of query points (119863qry) UniformNumber of query points (119873qry) 1000Road map NA SJ
of the edge sequence length on the performance of MORANThe first road map comprising 175813 nodes and 179179edges includes major roads in North America (NA) andcorresponds approximately to a data universe of 25times107 km2The second road map comprising 18263 nodes and 23874edges includes major roads in San Joaquin County (SJ)California and corresponds approximately to a data universeof 36 times 103 km2 For the first road map NA the numberof edge sequences and their average length are 12416 and29052m respectively For the second road map SJ thenumber of edge sequences and their average length are 20040and 248m respectively Table 4 summarizes the parametersused in the experiments In each experiment we vary a singleparameter in the range shown and set the other parameters tothe default values marked in boldWe simulate moving querypoints using a network-based moving objects generator [28]The number of query objects is set to 1000The size of a queryregion is determined by the number of edge sequences thatconstitute the query region The directed and updated edgesequences are selected randomly irrespective of the locationsof the data and query objects The length of an updated edgesequence is selected randomly to be between 01 and 10 timesthe original length For example if 119877upd is set to 05 and thenumber of edge sequences is 12416 then 62 edge sequences
are selected randomly every timestamp and their weights areupdated
As a benchmark against MORAN we use kRNN-E [5]without information of the precomputed shortest distancesbased on a shared execution paradigm to remove the redun-dant search overhead We choose kRNN-E instead of kRNN-F [5] with information of all the precomputed shortestdistances although kRNN-F typically outperforms kRNN-E The reason for this is that the precomputed distancesamong nodes are frequently invalidated by the updates tothe weights of the edges which makes it difficult to maintainthe precomputed distances To make kRNN-F applicable toour problem scenarios we can consider applying hierarchicaland goal-directed speed-up techniques [29] for DijkstrarsquosalgorithmThis approach can help to reduce the computationtime only at the server side and thus would not affect ourexperimental results Recall that the query processing at theserver is orthogonal to this study and that MORAN focuseson reducing the computation frequency and time taken atthe client side to evaluateMkRNN queries Our experimentalresults provide the average values per timestamp while 1000query points run for 600 timestamps Note that for roadmapNA the speed of the query points is 100 kmh by defaultwhereas for road map SJ the speed is 60 kmh by default
Mobile Information Systems 13
All algorithms are implemented in C++ and executed on adesktop PC with a 34GHz processor and 16GB of memory
62 Experimental Results Figure 16 shows a comparison ofthe query processing times at the client side of MORANand kRNN-E for evaluating MkRNN queries in road mapNA where each chart illustrates the effect of varying asingle parameter in Table 4 The values in the parenthesesindicate the computation frequency per timestamp Clearlythe computation frequency of kRNN-E equals the numberof query points and thus is omitted It should be noted thatthe server evaluates the MkRNN queries whenever the querypoints exit their query regions and thus the query processingtimes at the server side are the same forMORAN and kRNN-E Therefore we focus on comparing the query processingtimes at the client side
Figure 16(a) shows the query processing time as a func-tion of the number of requested NNs that is k Clearly thequery processing time at the client side increaseswith k How-ever the query processing time of MORAN is significantlyshorter than that of kRNN-E for all cases The reason for thisis that kRNN-E evaluates kNNquerieswhenever query pointsmove Conversely MORAN determines safe segments whenquery points enter new edge sequences or when the queryresults provided by the server become invalidated because ofupdated traffic conditions
Figure 16(b) shows the query processing time as a func-tion of the ratio of directed edge sequences to the totalnumber of edge sequences that is 119877dir Clearly 119877dir = 0refers to an undirected spatial networkThe query processingtimes at the client side of both methods are insensitive to thevalue of119877dirThe query processing time ofMORAN is shorterthan that of kRNN-E regardless of the value of 119877dir
Figure 16(c) shows the query processing time as a func-tion of the ratio of updated edge sequences to the totalnumber of edge sequences per timestamp that is 119877upd Here119877upd = 0 refers to a static spatial network The length of anupdated edge sequence is selected randomly frombetween 01and 10 times the original length Clearly the query processingtime of kRNN-E is almost constant regardless of the valueof 119877upd because query points in kRNN-E issue kNN queriesat each timestamp However the query processing time ofMORAN increases linearly with 119877upd because the probabilitythat the influential region of a query region overlaps anyupdated edge sequence increases with 119877upd Therefore alarger value of 119877upd leads to a longer query processing time
Figure 16(d) shows the query processing time as a func-tion of the size of the query region that is 119876sz Clearly thequery processing time increases with119876sz However the queryprocessing time of MORAN is clearly shorter than that ofkRNN-E regardless of the value of 119876sz
Figure 16(e) shows the query processing time as a func-tion of the number of data points that is 119873data In generalas 119873data increases the search space decreases and thus thequery processing time at the server side decreases accord-ingly However the query processing time at the client sideincreases with119873dataThis is because the number of qualifyingdata points handled at the client side increases with 119873data
Although the query processing time of MORAN increasesmore rapidly with 119873data than that of kRNN-E the queryprocessing time of MORAN is still shorter than that ofkRNN-E for 10 k le 119873data le 70 k However for119873data = 100 kthe query processing time of MORAN is 129 times longerthan that of kRNN-E
Figure 16(f) shows the query processing time as a func-tion of the speed of the query points that is 119881qry The queryprocessing time ofMORAN ismore sensitive to119881qry than thatof kRNN-E However the query processing time of MORANis clearly shorter than that of kRNN-E for all cases
Figure 17 shows a comparison of the query processingtimes at the client side of MORAN and kRNN-E for eval-uating MkRNN queries in road map SJ As when road mapNA is used when road map SJ is used the query processingtime of MORAN is clearly shorter than that of kRNN-E Asshown in Figure 17(a) the query processing time increaseswith k for the same reason as discussed earlier in the case ofFigure 16(a) As shown in Figure 17(b) the query processingtimes are not sensitive to the value of 119877dir As shown inFigure 17(c) the query processing time of kRNN-E remainsstable regardless of the value of 119877upd Conversely the queryprocessing time of MORAN increases with 119877upd because alarger value of 119877upd affects the influential regions of morequery points As shown in Figure 17(d) the query processingtime increases with 119876sz because the number of qualifyingdata points handled at the client side also increases with119876sz As shown in Figure 17(e) as 119873data increases the queryprocessing times decrease This is closely related to the sizeof the influential regions Specifically as 119873data increasesthe influential region decreases and thus updating weightsof edge sequences affects the influential regions of morequery points As shown in Figure 17(f) the query processingtime of MORAN increases with 119881qry for the same reason asdiscussed earlier in the case of Figure 16(f) whereas the queryprocessing time of kRNN-E remains stable regardless of thevalue of 119881qry
7 Conclusion
We proposed a new algorithm called MORAN for pro-cessing MkRNN queries in directed and dynamic spatialnetworks Existing studies focus on reducing redundant com-putation costs at the server side while processing snapshotkRNN queries in undirected and static spatial networksHowever MORAN clearly decreases the computation timeand frequency at the client side by dividing the query regioninto safe segments while processing MkRNN queries indirected and dynamic spatial networksThe influential regionfor a query region is introduced to monitor the impact of theupdated traffic conditions on the safe segments The resultsof experiments using real-life road maps demonstrate thatMORAN clearly outperforms kRNN-E for various workloadsin terms of the computation time and frequency We plan toextend our approach to processing sophisticated queries suchas kNN joins and top-k spatial preference queries in directedand dynamic spatial networks
14 Mobile Information Systems
k
(67)
2
MORAN
4 8 16 32
(73)
(83) (106)
(137)
0
10
20
30
40
CPU
tim
e at c
lient
side
(ms)
kRNN-E
(a) Effect of 119896
0 5 10 20 50
(90) (83) (83) (83) (81)
MORAN
0
5
10
15
20
CPU
tim
e at c
lient
side
(ms)
Rdir ()
kRNN-E
(b) Effect of 119877dir
00 03 05 07 10
(1)
(72) (83)
(157) (158)
MORAN
0
5
10
15
20
CPU
tim
e at c
lient
side
(ms)
Rupd ()
kRNN-E
(c) Effect of 119877upd
1 2 4 8 16
(66) (68) (83) (98)
(144)
MORAN
0
8
16
24
32CP
U ti
me a
t clie
nt si
de (m
s)
Qsz
kRNN-E
(d) Effect of119876sz
(163) (99)
(83) (80)
(79)
MORAN
0
8
16
24
32
CPU
tim
e at c
lient
side
(ms)
10 30 50 70 100
kRNN-E
Ndata (k)
(e) Effect of119873data
20 40 60 80 100
(95) (74) (81) (70) (83)
MORANkRNN-E
0
8
16
24
32
CPU
tim
e at c
lient
side
(ms)
Vqry (kmh)
(f) Effect of 119881qry
Figure 16 Comparison of CPU time at the client side for road map NA
Mobile Information Systems 15
(157) (209)(280)
(383)
(536)
k
2
MORAN
4 8 16 320
8
16
24
32
CPU
tim
e at c
lient
side
(ms)
kRNN-E
(a) Effect of 119896
(366) (286) (280) (272) (243)
MORAN
0 5 10 20 500
5
10
15
20
CPU
tim
e at c
lient
side
(ms)
Rdir ()
kRNN-E
(b) Effect of 119877dir
(26)(230) (280) (391) (429)
MORAN
00 03 05 07 10Rupd ()
0
5
10
15
20
CPU
tim
e at c
lient
side
(ms)
kRNN-E
(c) Effect of 119877upd
(277) (276) (280)(307)
(371)
MORAN
1 2 4 8 160
8
16
24
32CP
U ti
me a
t clie
nt si
de (m
s)
Qsz
kRNN-E
(d) Effect of119876sz
(612)
(359) (280) (232) (211)
MORAN
0
8
16
24
32
CPU
tim
e at c
lient
side
(ms)
1 3 5 7 10
kRNN-E
Ndata (k)
(e) Effect of119873data
(248) (265) (280) (286) (328)
MORAN
20 40 60 80 1000
5
10
15
20
CPU
tim
e at c
lient
side
(ms)
Vqry (kmh)
kRNN-E
(f) Effect of 119881qry
Figure 17 Comparison of CPU time at the client side for road map SJ
16 Mobile Information Systems
Notations and Their Definitions
119899119894119899119895 Edge connecting two adjacent nodes 119899
119894
and 119899119895
119899119904119899119904+1sdot sdot sdot 119899
119890 Edge sequence where 119899
119904(or 119899
119890) is the
start (or end) boundary node and theother nodes 119899
119904+1 119899
119890minus1 are
intermediate nodesdist(119901
1 119901
2) Length of the shortest path from point 119901
1
to point 1199012
len(1199011 119901
2) Length of the segment connecting two
points 1199011and 119901
2 such that 119901
1and 119901
2are
located in the same edge sequence119899119904119899119904+1sdot sdot sdot 119899
119890
119902 Query point119896 Number of requested NNs119874119901
119896 Set of kNNs at point 119901
120572120573 Segment that belongs to an edgesequence
119874(120572120573) Set of objects in segment 120572120573119900119896th The 119896th NN of query point 119902Ψ119902 Influence region for query point 119902
Ψ119876 Influence region for query region 119876
Conflict of Interests
The authors declare that there is no conflict of interestsregarding the publication of this paper
Acknowledgment
This research was supported by Kyungpook National Univer-sity Research Fund 2014
References
[1] U Demiryurek F Banaei-Kashani and C Shahabi ldquoEfficientcontinuous nearest neighbor query in spatial networks usingEuclidean restrictionrdquo in Advances in Spatial and TemporalDatabases 11th International Symposium SSTD 2009 AalborgDenmark July 8ndash10 2009 Proceedings vol 5644 of Lecture Notesin Computer Science pp 25ndash43 Springer Berlin Germany2009
[2] M R Kolahdouzan and C Shahabi ldquoAlternative solutionsfor continuous K nearest neighbor queries in spatial networkdatabasesrdquo GeoInformatica vol 9 no 4 pp 321ndash341 2005
[3] E W Dijkstra ldquoA note on two problems in connexion withgraphsrdquoNumerischeMathematik vol 1 no 1 pp 269ndash271 1959
[4] H Samet J Sankaranarayanan and H Alborzi ldquoScalablenetwork distance browsing in spatial databasesrdquo in Proceedingsof the SIGMOD International Conference on Management ofData (SIGMOD rsquo08) pp 43ndash54 Vancouver Canada June 2008
[5] J Bao C-Y ChowM FMokbel andW-S Ku ldquoEfficient evalu-ation of k-range nearest neighbor queries in road networksrdquo inProceedings of the 11th IEEE International Conference on MobileData Management (MDM rsquo10) pp 115ndash124 Kansas City MoUSA May 2010
[6] W-S Ku Y Chen and R Zimmermann ldquoPrivacy protectedspatial query processing for advanced location based servicesrdquo
Wireless Personal Communications vol 51 no 1 pp 53ndash652009
[7] K Mouratidis and M L Yiu ldquoAnonymous query processingin road networksrdquo IEEE Transactions on Knowledge and DataEngineering vol 22 no 1 pp 2ndash15 2010
[8] T Wang and L Liu ldquoPrivacy-aware mobile services over roadnetworksrdquo Proceedings of the VLDB Endowment vol 2 no 1pp 1042ndash1053 2009
[9] G Ghinita P Kalnis and S Skiadopoulos ldquoMobiHide amobilea peer-to-peer system for anonymous location-basedqueriesrdquo in Proceedings of the 10th International Symposium onSpatial and Temporal Databases (SSTD rsquo07) Boston MA USAJuly 2007 pp 221ndash238 Springer 2007
[10] S Ilarri E Mena and A Illarramendi ldquoLocation-dependentquery processing where we are and where we are headingrdquoACM Computing Surveys vol 42 no 3 article 12 2010
[11] H Al-Khalidi D Taniar J Betts and S Alamri ldquoDynamicsafe regions for moving range queries in mobile navigationrdquoInternational Journal of Ad Hoc and Ubiquitous Computing vol16 no 4 pp 250ndash259 2014
[12] H Al-Khalidi D Taniar J Betts and S Alamri ldquoMonitoringmoving queries inside a safe regionrdquo The Scientific WorldJournal vol 2014 Article ID 630396 13 pages 2014
[13] H-J Cho S J Kwon and T-S Chung ldquoA safe exit algorithmfor continuous nearest neighbor monitoring in road networksrdquoMobile Information Systems vol 9 no 1 pp 37ndash53 2013
[14] H-J Cho K Ryu and T-S Chung ldquoAn efficient algorithm forcomputing safe exit points of moving range queries in directedroad networksrdquo Information Systems vol 41 pp 1ndash19 2014
[15] C Li Y Gu J Qi G Yu R Zhang andW Yi ldquoProcessing mov-ing kNN queries using influential neighbor setsrdquo Proceedings ofthe VLDB Endowment vol 8 no 2 pp 113ndash124 2014
[16] S Nutanong R Zhang E Tanin and L Kulik ldquoAnalysis andevaluation of V-kNN an efficient algorithm for moving kNNqueriesrdquo VLDB Journal vol 19 no 3 pp 307ndash332 2010
[17] D Yung M L Yiu and E Lo ldquoA safe-exit approach for efficientnetwork-based moving range queriesrdquo Data and KnowledgeEngineering vol 72 pp 126ndash147 2012
[18] Y Gao B Zheng G Chen C Chen and Q Li ldquoContinuousnearest-neighbor search in the presence of obstaclesrdquo ACMTransactions on Database Systems vol 36 no 2 article 9 2011
[19] Y Tao D Papadias and Q Shen ldquoContinuous nearest neighborsearchrdquo in Proceedings of the 28th International Conference onVery Large Data Bases (VLDB rsquo02) pp 287ndash298 Hong KongAugust 2002
[20] M Mokbel C Chow and W Aref ldquoThe new casper queryprocessing for location serviceswithout compromising privacyrdquoin Proceedings of the 32nd International Conference on VeryLarge Data Bases (VLDB rsquo06) pp 763ndash774 Seoul Republic ofKorea 2006
[21] P Kalnis G Ghinita K Mouratidis and D Papadias ldquoPre-venting location-based identity inference in anonymous spatialqueriesrdquo IEEE Transactions on Knowledge and Data Engineer-ing vol 19 no 12 pp 1719ndash1733 2007
[22] C Chow M Mokbel J Naps and S Nath ldquoApproximateevaluation of range nearest neighbor queries with qualityguaranteerdquo in Advances in Spatial and Temporal Databases 11thInternational Symposium SSTD 2009 Aalborg Denmark July 8ndash10 2009 Proceedings vol 5644 of Lecture Notes in ComputerScience pp 283ndash301 Springer Berlin Germany 2009
Mobile Information Systems 17
[23] J Xu X Tang H Hu and J Du ldquoPrivacy-conscious location-based queries in mobile environmentsrdquo IEEE Transactions onParallel and Distributed Systems vol 21 no 3 pp 313ndash326 2010
[24] A M Aly W G Aref and M Ouzzani ldquoSpatial queries withtwo kNN predicatesrdquo Proceedings of the VLDB Endowment vol5 no 11 pp 1100ndash1111 2012
[25] Y Gu G Yu and X Yu ldquoAn efficient method for k nearestneighbor searching in obstructed spatial databasesrdquo Journal ofInformation Science and Engineering vol 30 no 5 pp 1569ndash1583 2014
[26] K Mouratidis M L Yiu D Papadias and N MamoulisldquoContinuous nearest neighbormonitoring in road networksrdquo inProceedings of the 32nd International Conference on Very LargeData Bases (VLDB rsquo06) pp 43ndash54 Seoul Republic of KoreaSeptember 2006
[27] Real Datasets for Spatial Databases httpwwwcsfsuedusimlifeifeiSpatialDatasethtm
[28] T Brinkhoff ldquoA framework for generating network-based mov-ing objectsrdquo GeoInformatica vol 6 no 2 pp 153ndash180 2002
[29] R Bauer D Delling P Sanders D Schieferdecker D Schultesand D Wagner ldquoCombining hierarchical and goal-directedspeed-up techniques for dijkstrarsquos algorithmrdquo Journal of Exper-imental Algorithmics vol 15 article 23 2010
[30] M Kolahdouzan C Shahabi and M Kolahdouzan ldquoVoronoi-based k nearest neighbor search for spatial network databasesrdquoinProceedings of the 30th International Conference onVery LargeData Bases (VLDB rsquo04) vol 30 pp 840ndash851 2004
[31] D Papadias J Zhang N Mamoulis and Y Tao ldquoQueryprocessing in spatial network databasesrdquo in Proceedings of the29th International Conference on Very Large Data Bases (VLDBrsquo03) vol 29 pp 802ndash813 2003
Submit your manuscripts athttpwwwhindawicom
Computer Games Technology
International Journal of
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Distributed Sensor Networks
International Journal of
Advances in
FuzzySystems
Hindawi Publishing Corporationhttpwwwhindawicom
Volume 2014
International Journal of
ReconfigurableComputing
Hindawi Publishing Corporation httpwwwhindawicom Volume 2014
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Applied Computational Intelligence and Soft Computing
thinspAdvancesthinspinthinsp
Artificial Intelligence
HindawithinspPublishingthinspCorporationhttpwwwhindawicom Volumethinsp2014
Advances inSoftware EngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Electrical and Computer Engineering
Journal of
Journal of
Computer Networks and Communications
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Hindawi Publishing Corporation
httpwwwhindawicom Volume 2014
Advances in
Multimedia
International Journal of
Biomedical Imaging
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
ArtificialNeural Systems
Advances in
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
RoboticsJournal of
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Computational Intelligence and Neuroscience
Industrial EngineeringJournal of
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014
The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Human-ComputerInteraction
Advances in
Computer EngineeringAdvances in
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
2 Mobile Information Systems
(1) q submits a kRNN query for a query region Q
(2) Server returns a set of candidate objects for q isin Q
q
Q
LBS server
Figure 1 Example of a 119896RNN query whose region is denoted by 119876
problem scenarios based on undirected and static spatialnetworks fail to provide a sufficient level of realism for manyapplications of interest when query objects move freely andconstantly
In this paper we present a new approach for evaluatingmoving 119896RNN queries (M119896RNN) in directed and dynamicspatial networks where each edge has a particular orientationand its weight changes in accordance with the traffic condi-tions Clearly directed and dynamic spatial network modelsprovidemore realistic modeling of urban road networks thanundirected and static spatial network models For exampleafter entering a highway a driver must remain on thathighway until heshe has reached an exit point even ifheshe has chosen an incorrect path Thus a highway canbe represented using directed edges Furthermore the traveltime to a destination selected by a query user frequentlychanges in accordance with the traffic conditions In movingobjects databases a safe segment (or safe region) is a populartechnique used in the processing of moving queries [11ndash17] A safe segment (or safe region) indicates a segment (orregion) in which the movement of a query object does notcause the current query result to changeThis helps to reducecommunication and computation costs
In this paper we propose an efficient algorithm calledMORAN for processing moving k-range nearest neighborqueries in directed and dynamic spatial networks under theassumption that query objects move freely on spatial net-works and that data objects are stationary In our approacha query region 119876 is partitioned into safe segments whichare maintained in directed and dynamic spatial networksClearly unless the safe segments are used the query objectshould evaluate a kNN query at its location using the kRNNquery result provided by the server whenever it movesinside the query region This simple approach places anexcessive computational burden on the client side with a highcomputation frequency Another considerable approach thatcan be used to solve this problem is to predict the movementof the query object in order to create the query resultsbeforehand [18 19] However in this paper we consider amore realistic scenario in which the query object movesarbitrarily and its path is not known in advance
The contributions made in this paper can be summarizedas follows
(i) We propose a new algorithm calledMORAN that par-titions query regions into safe segments to facilitate
efficient processing of MkRNN queries in directedand dynamic spatial networks
(ii) We also propose a method that preserves the validityof the safe segments when traffic conditions areupdated
(iii) We outline extensive experiments conducted to dem-onstrate the effectiveness and efficiency of MORANunder various conditions
The remainder of this paper is organized as followsSection 2 reviews related studies Section 3 defines the pri-mary terms used in this paper and formulates the researchproblem Section 4 presents our proposed method for divid-ing query regions into safe segments in directed spatial net-works Section 5 presents our proposedmethod formaintain-ing the safe segments in dynamic spatial networks Section 6analyzes the extensive experimental results obtained FinallySection 7 provides concluding remarks regarding the pro-posed method
2 Related Work
To ensure location privacy in pervasive computing mobileusers frequently issue kRNN queries using cloaked regionscorresponding to the query regions in this study [5ndash8 20]Then a server performs query processing assuming that theuser can be at any location inside the query region and thusnot knowing the exact location of the query issuer Severalstudies on processing of kRNN queries in Euclidean spacehave been conducted Kalnis et al [21] developed a newalgorithm for computing kRNN queries based on circularregions that reduce the number of redundant results aswell as the communication cost Chow et al [22] proposeda new approximate range NN query processing algorithmthat enables the user to tune the tradeoff between thequery response time and the quality of the query answersThe algorithm allows the user to specify an approximationtolerance level where an answer set A is returned suchthat each object in A is one of the kNNs of every pointin the query region Xu et al [23] developed an efficientalgorithm for evaluating circular-region-based kNN queriesthat applies a filter method based on a distance measure toprune out POIs effectively However these techniques basedon Euclidean distance cannot be applied to our problem
Mobile Information Systems 3
concerning network-constrained mobile users and networkdistance-based queries
kRNN queries have also been widely studied in thecontext of privacy-preserving LBSs based on spatial networkdistance where the exact location of the query issuer isblurred into the query region [5ndash8]The basic idea underlyingthe processing of a kRNN query is to execute a range queryto retrieve data objects within the query region and executekNN queries at the boundary points of the query regionKu et al [6] developed a privacy-aware spatial networknearest neighbor query algorithm that retrieves all POIsinside a given cloaked region and finds POIs outside thecloaked region using spatial network expansion Naturallyissuing kNNqueriesmultiple times in order to process kRNNqueries leads to a huge redundant search overhead To rectifythis problem Bao et al [5] proposed an efficient kRNNquery processing algorithm that employs a shared executionapproach to eliminate the redundant search overhead
Existing algorithms such as [5ndash8] deal with snapshotkRNN queries as opposed to the moving kRNN queries con-sidered in this study Consequently they focus on reducingthe computation time of the server as well as communicationcosts between the server and query objects Thus whileprocessing snapshot kRNN queries existing algorithms donot have to consider the computation time of the queryobjects that evaluate the exact kNNset using a set of candidatedata objects provided by the server This is because inprocessing snapshot kRNN queries the computation time ofthe query objects is very small compared to the computationtime of the server However very little research has focusedon supporting MkRNN queries in directed and dynamicspatial networks where the computation time of the queryobjects is not negligible
Nutanong et al [16] developed an incremental safe-region-based technique called the 119881lowast-Diagram for answer-ing moving kNN queries in Euclidean space as well as inundirected spatial networks However 119881lowast-Diagram is notappropriate in our problem scenarios because the distanceis transitive in both Euclidean space and undirected spatialnetworks whereas the distance is not transitive in directedspatial networks Yung et al [17] proposed an algorithm forcomputing the boundary referred to as safe exits of thesafe region of moving range queries in spatial networksTheir solution focuses onmoving range queries (eg find gasstations within 119903 = 3 km for the next 10 minutes) and is thusinapplicable for the processing of MkRNN queries
MORAN differs from existing studies in several aspectsfirst it considers MkRNN queries in directed and dynamicspatial networks second it focuses on reducing the compu-tation time and frequency of the query object and finallyit efficiently determines and maintains safe segments withina query region In recent years various types of querieson moving objects have also been studied extensively Theyinclude range queries [14 17] kNN queries with two predi-cates [24] and obstructed kNN queries [25] The associatedstudies have different problem scenarios from those in ourstudy and their solutions are not appropriate
Finally Table 1 compares our problem scenario withrelated work in terms of query type space domain and
Table 1 Classification of related work
References Query type Space domain Query object Data object[11 12] Range Euclidean Moving Static[4] Range USSN Static Static[17] Range USSN Moving Static[14] Range DDSN Moving Static[15 16 18 19] kNN Euclidean Moving Static[2 13 16] kNN USSN Moving Static[4 30 31] kNN USSN Static Static[1 26] kNN USSN Moving Moving[20ndash23] kRNN Euclidean Static Static[5ndash8] kRNN USSN Static StaticThis paper kRNN DDSN Moving Static
mobility of query objects and data objects Because of spacelimitations we shorten the terms ldquoundirected and staticspatial networkrdquo to ldquoUSSNrdquo and ldquodirected and dynamicspatial networkrdquo to DDSN
3 Background
Section 31 defines the terms and notations used in this paperSection 32 formulates the problem by using an example
31 Definition of Terms and Notations Now we define theterms and notations used in this paper for clarification
Spatial Network A spatial network is represented by aweighted directed graph 119866 = (119873 119864119882) where 119873 119864 and119882 denote a node set edge set and edge distance matrixrespectively Each edge connecting two nodes has a weightand a specific orientation The weight of an edge changesdepending on the traffic conditions and its direction is eitherbidirectional or unidirectional Specifically 119899
119894119899119895denotes an
undirected edge where 119899119894and 119899
119895are adjacent nodes whereas
997888997888rarr119899119894119899119895orlarr997888997888119899
119894119899119895denotes a directed edgeThe arrow above the edge
denotes the associated direction
Classification of Nodes Nodes can be classified into threecategories according to the node degree (1) if it is greater thanor equal to 3 the node is referred to as an intersection node(2) if it is equal to 2 the node is an intermediate node and (3)if it is equal to 1 the node is a terminal node
Edge Sequence and Segment An edge sequence denoted byeither 119899
119904119899119904+1sdot sdot sdot 119899
119890or 997888997888997888997888997888997888997888997888997888997888rarr119899
119904119899119904+1sdot sdot sdot 119899
119890 refers to a path connecting
two nodes 119899119904and 119899
119890 such that 119899
119904(or 119899
119890) is either an
intersection or terminal node and the other nodes in thepath are intermediate nodes The two end nodes 119899
119904and 119899
119890
are called boundary nodes Clearly all edges in the sameedge sequence have the same directionThe length of an edgesequence is the total weight of the edges in the edge sequenceOne part of an edge sequence is called a segment Note thatby definition an edge sequence is also a segment defined bythe boundary nodes of the edge sequence
4 Mobile Information Systems
16 2 4
2
3
4
3
n1 n2
n3 n4
n5 n6
o1o2
Figure 2 dist(1199001 119900
2) = 6 dist(119900
2 119900
1) = 9 and len(119900
1 119900
2) = 9
To simplify the presentation Notations and Their Def-initions summarizes the notations used in this paper Thedistance between two points in a directed spatial network 119866is not symmetric that is for two points 119901
1 119901
2isin 119866 there is
no guarantee that dist(1199011 119901
2) equals dist(119901
2 119901
1) Note that
if the algorithms for MORAN operate in the same mannerfor undirected and directed spatial segments an undirectedsegment is used for convenience to describe the algorithms
Figure 2 depicts the distances and segment lengthbetween two objects 119900
1and 119900
2in a directed spatial network
In this figure the shortest path from 1199001to 119900
2is 119900
1rarr
1198992rarr 119899
5rarr 119900
2and thus the distance from 119900
1to 119900
2is
dist(1199001 119900
2) = 6 Conversely the shortest path from 119900
2to 119900
1
is 1199002rarr 119899
4rarr 119899
3rarr 119900
1and thus the distance from 119900
2to
1199001is dist(119900
2 119900
1) = 9 This proves that the network distance
is not symmetric in a directed spatial network The segmentconnecting 119900
1and 119900
2in the same edge sequence larr997888997888997888997888997888997888997888119899
2119899311989941198995
becomes 1199001rarr 119899
3rarr 119899
4rarr 119900
2and thus its length is
len(1199001 119900
2) = 9 Recall that len(119901
1 119901
2) is defined if and only
if the two points 1199011and 119901
2 are located in the same edge
sequence
32 Problem Formulation Figure 3 shows an example of anM119896RNN query in a directed and dynamic spatial networkHere data objects 119900
1through 119900
5are represented by the
rectangles and a query region 119876 is represented by a set ofbold line segments that is 119876 =
larr99788899788899788811989911198993 119899
21198993larr99788899788899788811989931198994 The
boundary point of a query region indicates the point wherethe query region and nonquery region meet In this examplequery region119876 has four boundary points 119899
1through 119899
4 The
number next to an edge indicates the distance between thetwo adjacent objects Suppose that a query object 119902 in queryregion 119876 requests two NNs from the server while hiding itslocation from the server Then the kRNN query result for119876 should include the two closest data objects to each pointin query region 119876 The query result can be represented bya set of ⟨119878 119877⟩ tuples where 119878 is a safe segment in 119876 and119877 is the query result for the safe segment 119878 As shown inFigure 3(a) query region 119876 can be partitioned into four safesegments that is Ω
1= ⟨larr99788899788899788811989911199003 119900
1 119900
2⟩ Ω
2= ⟨997888997888997888rarr11989931199003 119900
2 119900
3⟩
Ω3= ⟨119899
2119904 119900
4 119900
5⟩ andΩ
4= ⟨119899
3119904cuplarr99788899788899788811989931198994 119900
3 119900
4⟩ Clearly if
query object 119902 is located in a safe segmentlarr99788899788899788811989911199003(ie 119902 isin larr997888997888997888119899
11199003)
then the kNN set of 119902 is 1199001 119900
2 Similarly if 119902 isin 997888997888997888rarr119899
31199003 then
the kNN set of 119902 is 1199002 119900
3 if 119902 isin 119899
2119904 then the kNN set for
119902 is 1199004 119900
5 and if 119902 isin 119899
3119904 cuplarr99788899788899788811989931198994 then the kNN set of 119902 is
1199003 119900
4 As shown in Figure 3(b) if the weight of an edge997888997888997888rarr119899
11199001
represented by the bold dotted line is updated from 3 to 5 at
time 119905119895 this update may affect the safe segments computed at
time 119905119894 which leads to nullifying the kNN set of 119902 isin 119876
The query region 119876 consists of a set 119876119904 of 119897 segments anda set 119876119887 of 119898 boundary points that is 119876119904
= 1199041 1199042 119904
119897
and 119876119887
= 1198871 1198872 119887
119898 Clearly a query object 119902 is located
inside query region 119876 while hiding its exact location fromthe server to ensure location privacy Note that we use theterms ldquoquery object 119902rdquo and ldquoquery point 119902rdquo interchangeablyfor convenience of discussion Clearly for a query point 119902 isin119876 119874119902
119896sube (⋃
119898
119894=1119874119887119894
119896) cap (⋃
119897
119895=1119874(119904
119895)) holds where 119874119887119894
119896refers to
a set of 119896NNs at a boundary point 119887119894isin 119876
119887 and 119874(119904119895) refers to
a set of objects inside a segment 119904119895isin 119876
119904 It should be notedthat processing kRNN queries at the server is orthogonal tothis studyTherefore any kRNN query processing algorithms(eg [5 6]) can be used to evaluate the kRNN queries atthe server The server evaluates a kRNN query for a queryregion 119876 and then provides a set of candidate data objects toquery object 119902 Finally 119902 determines safe segments using a setof candidate data objects for the query region 119876 Recall thatgiven a safe segment 119878 for two points 119902
1 119902
2isin 119878 1198741199021
119896is equal
to 1198741199022
119896
Figure 4 illustrates three scenarios that can arise when aquery object 119902 issues kRNN queries As shown in Figure 4(a)at time 119905
119894 a query object 119902 submits a kRNN query for a
query region 119876119894to the server On receiving the query the
server evaluates the kRNN query and returns the queryresult to 119902 isin 119876
119894 Clearly 119902 determines safe segments inside
query region 119876119894using the kRNN query result As shown in
Figure 4(b) when 119902 leaves the query region 119876119894at time 119905
119895 it
submits a kRNN query for an updated query region 119876119895to
the server Then the server evaluates the kRNN query andreturns the query result to 119902 isin 119876
119895 Clearly 119902 determines safe
segments inside query region 119876119895 As shown in Figure 4(c)
while 119902 is inside 119876119895at time 119905
119896 a query region 119876
119895overlaps a
traffic congestion area119879 marked by a gray rectangle inwhichthe weight of the edges changes The server realizes that thetraffic congestion area 119879 invalidates the kRNN query resultfor 119876
119895and thus requests that 119902 updates the query region
Consequently 119902 submits a kRNN query for an updated queryregion 119876
119896to the server which evaluates the kRNN query
and returns the query result to 119902 isin 119876119896 Clearly 119902 determines
the safe segments inside query region 119876119896 In Section 5 we
elaborate on a method to verify that an updated trafficcondition invalidates current kRNN query results
4 Processing MkRNN Queries inDirected Spatial Networks
In Section 41 we give an overview of MORAN InSection 42 we present an algorithm for determiningsafe segments in a query region Finally in Section 43 wediscuss the construction of the safe segments of an MkRNNquery for the example of directed spatial network
41 Overview As stated before we focus on query processingat the client side while processing MkRNN queries in adirected and dynamic spatial network If either of the two
Mobile Information Systems 5
3 2
2
4
1
2
3
3
3 6
4
4
3
2
3 2
2
4
1
2
3
3
25 6
4
4
3
2
s
n1n1
n2n2 n3n3n4n4
n5n5n6n6
o1o1
o5
o4
o3
o2
o3
o4
o5
o2
Ω1
Ω2
Ω3 Ω4
Ω3 = ⟨n2s o4 o5⟩
Ω1 = ⟨larr997888997888997888n1o3 o1 o2⟩
Ω2 = ⟨997888997888997888rarrn3o3 o2 o3⟩
Ω4 = ⟨ n3s cuplarr997888997888997888n3n4 o3 o4⟩
(a) MkRNN query with 119896 = 2 and its safe segments at time 119905119894
5 2
2
4
1
2
3
3
3 6
4
4
3
2
n1
n2 n3n4
n6n5
o1
o5
o4
o3
o2
(b) Updated traffic conditions at time 119905119895
Figure 3 Example of MkRNN query in a spatial network where 119896 = 2 and 119905119894lt 119905
119895
Qi
q
(1) q submits kRNN query for a query region Qi
(2) Server returns a set of candidate objects to qisin Qi
LBS server
(a) 119902 submits a 119896RNN query for a query region119876119894to the server at time 119905
119894 where 119902 isin 119876
119894
q
Qj
(1) q submits kRNN query for a query region Qj
(2) Server returns a set of candidate objects to qisin Qj
LBS server
(b) 119902 submits a 119896RNN query for an updated query region119876119895to the server when 119902 leaves119876
119894at 119905
119895
q
Qj
T(1) Server requests thatq updates the query region
(2)q submits kRNN query for an updated query region Qk
LBS server
(c) Server requests that 119902 updates the query region when a set of candidate objects is invalidated at 119905119896
Figure 4 Three scenarios for processing MkRNN queries
events in Figure 5 occurs the server should evaluate thekRNN query and provide query object 119902 with an updatedkRNN query result The first event is 119902 leaving the cur-rent query region For example as shown in Figure 5(a)if 119902 moves to 1199021015840 outside of 119876 a kRNN query should bereevaluated with the updated query regionThe second event
is invalidation of the current kRNN query result providedto query object 119902 because of an updated traffic conditionFor example as shown in Figure 5(b) if query region 119876overlaps traffic congestion area 119879 the kRNN query shouldbe reevaluated to reflect the updated traffic condition Whenthe query object receives an updated kRNNquery result from
6 Mobile Information Systems
Q
qq998400
(a) 119902 leaves query region119876
Q
q
T
(b) Congestion area 119879 nullifies 119896RNN query resultfor119876
Figure 5 Two events that trigger the evaluation of MkRNN queries
Input Q query region k the number of requested NNsOutputΩ the set of safe segments in 119876(1)Ω larr 0 Ω is initialized to an empty set(2) for each segment 120572120573 isin 119876 do(3) 119874
120572
119896larr evaluate kNN query at point (120572 k) a kNN query is evaluated at a boundary point 120572
(4) 119874120573
119896larr evaluate kNN query at point (120573 k) a kNN query is evaluated at a boundary point 120573
(5) 119874(120572120573) larr evaluate range query (120572120573) a range query is evaluated for a segment 120572120573(6) Ω(120572120573) larr find safe segments (119874120572
119896 119874120573
119896 119874(120572120573)) the function is detailed in Section 42
(7) Ω larr Ω cup Ω(120572120573)
(8) return Ω the set of safe segments is provided to the query issuer
Algorithm 1 MORAN (Q k)
the server it should reevaluate safe segments inside the queryregion Using safe segments reduces the computation timeand frequency because the query object does not have toevaluate kNN queries while inside the safe segments
Algorithm 1 outlines the process of determining the safesegments in a query region 119876 in a directed spatial networkThe algorithm starts by initializing Ω to an empty set whichstores the safe segments found thus far Each segment 120572120573in query region 119876 is explored sequentially to find the safesegments in segment120572120573 For this purposeMORANevaluatestwo kNN queries issued at boundary points 120572 and 120573 ofsegment 120572120573 The query results are stored to 119874120572
119896and 119874120573
119896
respectively The objects in 120572120573 are explored and stored to119874(120572120573) The function find safe segments is called with 119874120572
119896
119874120573
119896 and 119874(120572120573) in order to find safe segments in segment
120572120573 The found safe segments are added to the result set ΩWhen all the segments in 119876 have been examined a set Ωof safe segments in query region 119876 is returned to the queryissuer It should be noted that if updates in the weight of edgesfrequently occur in a spatial network it is better to determinethe safe segments in the current segment including the querypoint rather than all the safe segments in the query regionWe employ a shared execution approach [5] which is widely
used to avoidmultiple visits to the samenodes and edgesThisclearly reduces the query processing time while determiningsafe segments in a query region
42 Partitioning Query Region into Safe Segments We con-sider an undirected segment 120572120573 followed by a directedsegment
997888rarr120572120573 We present a method for finding safe segments
in segment 120572120573 by using119874120572
119896119874120573
119896 and119874(120572120573) Here119874120572
119896and119874120573
119896
refer to sets of 119896NNs at boundary points 120572 and 120573 respectivelyand 119874(120572120573) refers to a set of objects inside segment 120572120573 Anobject 119900 that belongs to the union of 119874120572
119896 119874120573
119896 and 119874(120572120573) that
is 119900 isin 119874120572
119896cup 119874
120573
119896cup 119874(120572120573) is referred to as a qualifying object
Clearly the set 119874119902
119896of 119896NNs at a query point 119902 isin 120572120573 is a
subset of the union of 119874120572
119896 119874120573
119896 and 119874(120572120573) [5 13 26] that is
119874119902
119896sube (119874
120572
119896cup119874
120573
119896cup119874(120572120573)) If119874120572
119896equals119874120573
119896and119874(120572120573) is a subset
of119874120572
119896 segment 120572120573 becomes a safe segment Otherwise it has
two or more safe segmentsWe first explore the change in a network distance
dist(119902 119900) for a qualifying object 119900 isin 119874120572
119896cup 119874
120573
119896cup 119874(120572120573)
when a query point 119902 is located in an undirected segment120572120573 [13 14] Figure 6 shows the change in dist(119902 119900) for three
Mobile Information Systems 7
Table 2 Computation of dist(119902 119900) where 119902 isin 120572120573 and 119900 isin 119874120572
119896cup 119874
120573
119896cup 119874(120572120573)
Condition dist(119902 119900)
119900 isin 119874120572
119896minus (119874
120573
119896cup 119874(120572120573)) dist (119902 119900) = len (119902 120572) + dist (120572 119900)
119900 isin 119874120573
119896minus (119874
120572
119896cup 119874(120572120573)) dist (119902 119900) = len (119902 120573) + dist (120573 119900)
119900 isin 119874(120572120573) minus (119874120572
119896cup 119874
120573
119896) dist (119902 119900) = len (119902 119900)
119900 isin 119874120572
119896cap 119874
120573
119896minus 119874(120572120573) dist (119902 119900) = min (len (119902 120572) + dist (120572 119900) len (119902 120573) + dist (120573 119900))
119900 isin 119874120572
119896cap 119874(120572120573) minus 119874
120573
119896dist (119902 119900) = min (len (119902 120572) + dist (120572 119900) len (119902 119900))
119900 isin 119874120573
119896cap 119874(120572120573) minus 119874
120572
119896dist (119902 119900) = min (len (119902 120573) + dist (120573 119900) len (119902 119900))
119900 isin 119874120572
119896cap 119874
120573
119896cap 119874(120572120573) dist (119902 119900) = min (len (119902 120572) + dist (120572 119900) len (119902 120573) + dist (120573 119900) len (119902 119900))
120572
o
q 120573
dist(120572 o)
dist(120572 o) + len(120572 120573)
(a) If 119900 isin 119874120572
119896 then dist(119902 119900) = len(119902 120572) +
dist(120572 119900)
120572
o
120573
len(120572 120573) + dist(120573 o)
dist(120573 o)
(b) If 119900 isin 119874
120573
119896
then dist(119902 119900) = len(119902 120573) +dist(120573 119900)
o120572 q 120573
len(120572 o)
len(o 120573)
(c) If 119900 isin 119874(120572120573) thendist(119902 119900) = len(119902 119900)
Figure 6 Evaluation of dist(119902 119900) where 119902 isin 120572120573 and 119900 isin 119874120572
119896cup 119874
120573
119896cup 119874(120572120573)
cases 119900 isin 119874120572
119896 119900 isin 119874120573
119896 and 119900 isin 119874(120572120573) In this figure the
119910-axis represents dist(119902 119900) and the 119909-axis represents len(120572 119902)for 0 le len(120572 119902) le len(120572 120573) If 119900 isin 119874120572
119896 then dist(119902 119900) =
len(119902 120572) + dist(120572 119900) as shown in Figure 6(a) Similarly if119900 isin 119874
120573
119896 then dist(119902 119900) = len(119902 120573) + dist(120573 119900) as shown in
Figure 6(b) Finally if 119900 isin 119874(120572120573) then dist(119902 119900) = len(119902 119900)as shown in Figure 6(c)
Table 2 summarizes the evaluation of dist(119902 119900) for 119902 isin 120572120573and 119900 isin 119874120572
119896cup 119874
120573
119896cup 119874(120572120573) where MIN returns the minimum
of the values in the input array Because a qualifying object 119900belongs to a combination of119874120572
119896119874120573
119896 or119874(120572120573) a total of seven
possible cases are considered Note that dist(120572 119900) dist(120573 119900)len(120572 119900) and len(120573 119900) are given constants and dist(119902 119900) is thelength of the shortest path among multiple paths from 119902 and119900
Figure 7 shows an example of the change in dist(119902 119900)depending on the location of query point 119902 isin 119899
2119899511989961198993 For
simplicity we assume that the number of NNs requested atquery point 119902 is 119896 = 1 Then as shown in Figure 7(a) 1198741198992
119896
1198741198993
119896 and 119874(119899
2119899511989961198993) are evaluated as 1198741198992
119896= 119900 1198741198993
119896= 119900
and119874(1198992119899511989961198993) = 119900 respectively As shown in Figure 7(b)
the distance from 119902 to 119900 represented by the bold lines isdist(119902 119900) = len(119902 119900) if 119902 isin 119899
211989951198996 otherwise it is dist(119902 119900) =
len(119902 1198993) + 3 because dist(119899
2 119900) = 1 dist(119899
3 119900) = 3 and
len(1198992 119900) = 1 are given
Next we explore the change in network distance dist(119902 119900)for object 119900 isin 119874120572
119896cup 119874
120573
119896cup 119874(
997888rarr120572120573) when a query point 119902 is
located in a directed segment997888rarr120572120573 Figure 8 shows the change
in dist(119902 119900) for three cases 119900 isin 119874120572
119896 119900 isin 119874120573
119896 and 119900 isin 119874(
997888rarr120572120573)
1
2
1 2
1 16 5
n1 n4n2 n3
n5
n6o
q
(a) q isin n2n5n6n3
9
7
5
3
112 2
n2 n3n5 n6
o
o
o
(b) dist(q o) = len(q o) if q isin n2n5n6
len(q n3) + 3 otherwise
Figure 7 Computation of ist(119902 119900) where 119902 isin 1198992119899511989961198993and 119900 isin
1198741198992
119896cap 119874
1198993
119896cap 119874(119899
2119899511989961198993)
Note that the dotted lines indicate that no paths exist from119902 to 119900 for the corresponding intervals which are denoted bydist(119902 119900) = infin For object 119900 isin 119874120572
119896 as shown in Figure 8(a)
8 Mobile Information Systems
asympasymp
dist(120572 o) o
120572 q 120573
infin
(a) If o isin O120572k then dist(q o) = dist(120572 o) if q = 120572
infin otherwise
o
120572 q 120573
len(120572 120573)+dist(120573 o)
dist(120573 o)
(b) If o isin O120573
k then dist(q o) = len(q 120573) + dist(120573 o)
asympasymp
120572 qo 120573
len(120572 o)
infin
(997888rarr120572120573
997888rarr120572(c) If o isin O then dist(q o) =len(q o) if q isin o
infin otherwise)
Figure 8 Evaluation of dist(119902 119900) where 119902 isin997888rarr120572120573 and 119900 isin 119874120572
119896cup 119874
120573
119896cup
119874(997888rarr120572120573)
if 119902 = 120572 then dist(119902 119900) = dist(120572 119900) otherwise (ie 119902 isin997888rarr120572120573minus120572) dist(119902 119900) = infin Similarly if 119900 isin 119874120573
119896 then dist(119902 119900) =
len(119902 120573) + dist(120573 119900) as shown in Figure 8(b) Finally forobject 119900 isin 119874(
997888rarr120572120573) as shown in Figure 8(c) if 119902 isin 997888rarr120572119900 then
dist(119902 119900) = len(119902 119900) otherwise (ie 119902 isinlarr997888120573119900) dist(119902 119900) = infin
Here dist(119902 119900) is the length of the shortest path from 119902 and119900 where query point 119902 isin
997888rarr120572120573 and is thus determined using
Table 2 in the same way as 119902 isin 120572120573Figure 9 shows an example of the change in dist(119902 119900)
depending on the location of query point 119902 isin 997888997888997888997888997888rarr119899211989951198993 For
simplicity we assume that the number of NNs requested atquery point 119902 is 119896 = 1 Then as shown in Figure 9(a) 1198741198992
119896
1198741198993
119896 and 119874(997888997888997888997888997888rarr119899
211989951198993) are evaluated as 1198741198992
119896= 119900 1198741198993
119896= 119900
and 119874(997888997888997888997888997888rarr119899211989951198993) = 119900 respectively As shown in Figure 9(b)
the distance from 119902 to 119900 represented by the bold lines isdist(119902 119900) = len(119902 119900) if 119902 isin 997888997888rarr119899
2119900 otherwise it is dist(119902 119900) =
len(119902 1198993) + 3 because dist(119899
2 119900) = 1 dist(119899
3 119900) = 3 and
len(1198992 119900) = 1 are given
1
2
3
1
16 5
n1 n4n2 n3
n5
o
q
(a) q isin 997888997888997888997888997888rarrn2n5n3
21
3
3
9
n2 n3n5o
o
o
asympasymp
infin
997888997888rarrn2o(b) dist(q o) =len(q o) if q isinlen(q n3) + 3 otherwise
Figure 9 Computation of dist(119902 119900) where 119902 isin 997888997888997888997888997888rarr119899211989951198993and 119900 isin 1198741198992
119896cap
1198741198993
119896cap 119874(
997888997888997888997888997888rarr119899211989951198993)
43 Partitioning Example Query Region into Safe SegmentsWe now discuss the construction of safe segments for queryregion 119876 in Figure 3(a) Recall that the number of requestedNNs is 119896 = 2 and the query region includes three segmentsthat is 119876 = larr997888997888997888119899
11198993 119899
21198993larr99788899788899788811989931198994 Table 3 summarizes the com-
putation of the safe segments in query region 119876 Clearly thekNN set at a node 119899
3is evaluated only once and it is reused
multiple timesAs shown in Algorithm 1 MORAN determines the safe
segments for each segment in query region 119876 Therefore weshow the successive determination of the safe segments inlarr99788899788899788811989911198993 119899
21198993 and larr997888997888997888119899
31198994 It is clear that adjacent safe segments
with the same query result can be merged Recall that we candraw dist(119902 119900) by using a query point 119902 isin 120572120573 and an object119900 isin 119874
120572
119896cup 119874
120573
119896cup 119874(120572120573)
Figure 10 depicts dist(119902 119900) using a query point 119902 isin larr99788899788899788811989911198993
and each object 119900 isin 1198741198991
119896cup 119874
1198993
119896cup 119874(
larr99788899788899788811989911198993) Here the union
of 1198741198991
119896 1198741198993
119896 and 119874(larr997888997888997888119899
11198993) becomes 1198741198991
119896cup 119874
1198993
119896cup 119874(
larr99788899788899788811989911198993) =
1199001 119900
2 119900
3 119900
4 because 1198741198991
119896= 119900
1 119900
2 1198741198993
119896= 119900
3 119900
4 and
119874(larr99788899788899788811989911198993) = 119900
3 are given Figures 10(a) 10(b) 10(c) and 10(d)
illustrate dist(119902 1199001) dist(119902 119900
2) dist(119902 119900
3) and dist(119902 119900
4)
respectively Recall that 1199001isin 119874
1198991
119896 119900
2isin 119874
1198991
119896 119900
3isin 119874
1198993
119896cup
119874(larr99788899788899788811989911198993) and 119900
4isin 119874
1198993
119896hold
To partition a segment 120572120573 into safe segments it isessential to identify the 119896th NN 119900
119896th at a query point 119902 isin120572120573 among the qualifying objects 119900 isin 119874
120572
119896cup 119874
120573
119896cup 119874(120572120573)
Mobile Information Systems 9
Table 3 Computation of safe segments for the example query region
120572120573 120572 120573 119874120572
119896119874120573
119896119874(120572120573) Ω(120572120573)
larr99788899788899788811989911198993
1198991
1198993
1199001 119900
2 119900
3 119900
4 119900
3 ⟨
larr99788899788899788811989911199003 119900
1 119900
2⟩ ⟨
997888997888997888rarr11989931199003 119900
2 119900
3⟩ ⟨119899
3 119900
3 119900
4⟩
11989921198993
1198992
1198993
1199004 119900
5 119900
3 119900
4 119900
4 ⟨119899
2119904 119900
4 119900
5⟩ ⟨119899
3119904 119900
3 119900
4⟩
larr99788899788899788811989931198994
1198993
1198994
1199003 119900
4 119900
3 119900
4 0 ⟨
larr99788899788899788811989931198994 119900
3 119900
4⟩
10
3
7
n1 n3
o1
(a) dist(q o1) = len(q n1) + 3
7
2
9
n1 n3
o2
(b) dist(q o2) = len(q n1) + 2
4
43
n1 n3
o3
o3
asympasymp
infin
997888997888997888rarrn3o3(c) dist(q o3) =len(q o3) if q isininfin otherwise
7
3
n1 n3
o4
asymp asymp
infin
q = n3infin otherwise(d) dist(q o4) =3 if
Figure 10 Plot of ist(119902 119900) where 119902 isin larr99788899788899788811989911198993and 119900 isin 119900
1 119900
2 119900
3 119900
4
Algorithm 2determines the skyline119874119896th that consists of (119909 119910)
pairs such that 119909 = len(120572 119902) and 119910 = dist(119902 119900119896th) hold for
each query point 119902 isin 120572120573The variable count keeps the numberof qualifying objects processed thus far which is initializedto 0 (line (1)) If count is less than 119896 then the skyline for119900119896th is determined by 119874
119896th = (119909 119910) | 119909 = len(120572 119902) 119910 =max(dist(119902 120579
119896th) dist(119902 119900)) for 119902 isin 120572120573 where 120579119896th keeps the119896th NN determined thus far (lines (4)-(5)) Otherwise (ie119888119900119906119899119905 ge 119896) the skyline for 119900
119896th is determined by 119874119896th =
(119909 119910) | 119909 = len(120572 119902) 119910 = min(dist(119902 120579119896th) dist(119902 119900))
for 119902 isin 120572120573 (lines (6)-(7)) Naturally count increases by 1whenever an object o is processed (line (8))
Figure 11 illustrates the partitioning of a segment larr99788899788899788811989911198993
into three safe segments using dist(119902 119900) for each object 119900 isin1198741198991
119896cup 119874
1198993
119896cup 119874(
larr99788899788899788811989911198993) Figure 11(a) shows the plot of dist(119902 119900)
for each object 119900 isin 1199001 119900
2 119900
3 119900
4 Note that to simplify the
presentation the interval in which dist(119902 119900) = infin holds isnot represented When a query point 119902 moves in a segmentlarr99788899788899788811989911198993 its 119896th NN 119900
119896th is determined using Algorithm 2 andis represented by the bold lines in Figure 11(b) Specificallyfor 119902 isin larr997888997888997888119899
11199003 the 119896th NN 119900
119896th is 1199001and thus the kNN set is
1199001 119900
2 Similarly for 119902 isin 997888997888997888rarr119899
31199003 the 119896th NN 119900
119896th is 1199002and
thus the kNN set is 1199002 119900
3 Finally for 119902 = 119899
3 the 119896th NN
119900119896th is 119900
3and thus the 119896NN set is 119900
3 119900
4 Consequently a
segmentlarr99788899788899788811989911198993is divided into three safe segments represented
by Ω(larr99788899788899788811989911198993) = ⟨
larr99788899788899788811989911199003 119900
1 119900
2⟩ ⟨997888997888997888rarr11989931199003 119900
2 119900
3⟩ ⟨119899
3 119900
3 119900
4⟩
Figures 12(a) 12(b) and 12(c) illustrate dist(119902 1199003)
dist(119902 1199004) and dist(119902 119900
5) respectively where 119902 refers to a
query point in a segment 11989921198993and 119900
3 119900
4 and 119900
5refer to
qualifying objects for the segment 11989921198993 Note that 119900
3isin 119874
1198993
119896
1199004isin 119874
1198992
119896cup 119874
1198993
119896cup 119874(119899
21198993) and 119900
5isin 119874
1198992
119896hold
Figure 13 illustrates the partitioning of a segment 11989921198993
into two safe segments using dist(119902 119900) for each object 119900 isin1198741198992
119896cup 119874
1198993
119896cup 119874(119899
21198993) Figure 13(a) shows the plot of dist(119902 119900)
for each object 119900 isin 1199003 119900
4 119900
5 When a query point 119902
moves in a segment 11989921198993 its 119896th NN 119900
119896th is represented bythe bold lines in Figure 13(b) where a point 119904 marked by afive-pointed star indicates the middle of the segment 119899
21198993
Specifically for 119902 isin 1198992119904 the 119896th NN 119900
119896th is 1199005and thus
the kNN set is 1199004 119900
5 Similarly for 119902 isin 119899
3119904 the 119896th NN
119900119896th is 119900
3and thus the kNN set is 119900
3 119900
4 Consequently
a segment 11989921198993is divided into two safe segments which
are represented as Ω(11989921198993) = ⟨119899
2119904 119900
4 119900
5⟩ ⟨119899
3119904 119900
3 119900
4⟩
Finally a segment larr99788899788899788811989931198994becomes a safe segment that is
10 Mobile Information Systems
Input k the number of requested NNs 119874120572
119896cup 119874
120573
119896cup 119874(120572120573) the set of qualifying objects for a segment 120572120573
Output 119874119896th the set of distances from q to its kth NN 119900
119896th (ie 119874119896th = (119909 119910) | 119909 = len(120572 119902) 119910 = dist(119902 119900119896th))
(1) 119888119900119906119899119905 larr 0 count keeps the number of objects processed thus far(2) 119874
119896th = (119909 119910) | 119909 = len(120572 119902) 119910 = 0 for 119902 isin 120572120573 119910 = dist(119902 119900119896th) is initialized to 0 for 119902 isin 120572120573
(3) for each object 119900 isin 119874120572
119896cup 119874
120573
119896cup 119874(120572120573) do qualifying objects are handled sequentially
(4) if 119888119900119906119899119905 lt 119896 then if the number of objects processed thus far is less than 119896(5) 119874
119896th = (119909 119910) | 119909 = len(120572 119902) 119910 = max(dist(119902 120579119896th) dist(119902 119900)) for 119902 isin 120572120573 120579
119896th is the 119896th NN thus far(6) else(7) 119874
119896th = (119909 119910) | 119909 = len(120572 119902) 119910 = min(dist(119902 120579119896th) dist(119902 119900)) for 119902 isin 120572120573
(8) 119888119900119906119899119905 larr 119888119900119906119899119905 + 1 count increases by 1 whenever an object 119900 is processed(9) return 119874
119896th
Algorithm 2 Determine skyline for kth NN (k 119874120572
119896cup 119874
120573
119896cup 119874(120572120573))
3 3
3 4
4
9
10
2
n1 n3o3
o1o2
o4
(a) Plot of dist(119902 119900) for119900 isin 119900
1 1199002 1199003 1199004
3 34
9
10
2
n1 n3o3
3 4
o1o2
o4
okth
(b) Ω(larr99788899788899788811989911198993) = ⟨
larr99788899788899788811989911199003
11990011199002⟩ ⟨997888997888997888rarr119899
31199003 119900
2 1199003⟩
⟨1198993 119900
3 1199004⟩
Figure 11 Partitioning of a segmentlarr99788899788899788811989911198993into three safe segments
9
4
5
n2 n3
o3
(a) dist(119902 1199003) =
len(119902 1198993) + 4
87
32
2 3n2 n3o4
o4
o4
(b) dist(119902 1199004) =
len(119902 1199004)
4
9
5n2 n3
o5
(c) dist(119902 1199005) =
len(119902 1198992) + 4
Figure 12 Plot of dist(119902 119900) where 119902 isin 11989921198993and 119900 isin 119900
3 119900
4 119900
5
Ω(larr99788899788899788811989931198994) = ⟨
larr99788899788899788811989931198994 119900
3 119900
4⟩ This is because 1198741198993
119896equals 1198741198994
119896
and 119874(larr99788899788899788811989931198994) is a subset of 1198741198993
119896 that is 1198741198993
119896= 119874
1198994
119896and
119874(larr99788899788899788811989931198994) sub 119874
1198993
119896
5 Monitoring Safe Segments inDynamic Spatial Networks
Figure 14 illustrates an example of changing the weight of anedge 997888997888997888rarr119899
11199001in a spatial network where it is assumed that 119896 = 2
is given For convenience we consider the query region 119876
4 4
2
2 3n2 n3o4
o5 o3
(a) Plot of dist(119902119900) for 119900 isin 119900
3 1199004
1199005
4
2
2 3
34
n2 n3o4 s
o5 o3
okth
(b) Ω(11989921198993) =
⟨1198992119904 119900
4 1199005⟩
⟨1198993119904 119900
3 1199004⟩
Figure 13 Partitioning of a segment 11989921198993into two safe segments
that consists of an edgelarr99788899788899788811989911198993 that is 119876 = larr997888997888997888119899
11198993 As shown
in Figure 14(b) when the weight of an edge 997888997888997888rarr11989911199001has been
updated from 3 to 5 at time 119905119895 this update may invalidate
the safe segments in the query region 119876 Therefore it isnecessary to monitor the validity of safe segments in a queryregion when the change occurs To this end we introduce aninfluential region to monitor the validity of safe segmentsThe influential region Ψ
119902for a query point 119902 is defined as a
set of points 119901 such that dist(119902 119901) le dist(119902 119900119896th) holds If the
weight of an edge changes inside influential region Ψ119902 the
kNN query at query point 119902 should be reevaluated to reflectthe change in the weight However if the weight of an edgechanges outside influential regionΨ
119902 the change can be safely
ignored Suppose that a query region 119876 is represented by aset 119876119904 of 119897 connected segments and a set 119876119887 of 119898 boundarypoints that is 119876119904
= 1199041 1199042 119904
119897 and 119876119887
= 1198871 1198872 119887
119898
Then the influential region Ψ119876for query region 119876 becomes
the union of the influential region for each query point 119902 isin 119876that isΨ
119876= ⋃
119902isin119876Ψ119902This can be represented simply asΨ
119876=
119876cup(⋃119898
119894=1Ψ119887119894) whereΨ
119887119894refers to the influential region at each
boundary point 119887119894of the query region119876 SpecificallyΨ
119887119894is the
set of points 119901 such that dist(119887119894 119901) le dist(119887
119894 119900
119887119894
119896th) holds Here119900119887119894
119896th is the farthest answer object from boundary point 119887119894 that
Mobile Information Systems 11
3 4
4 63
3
3
2
4
1
3
2
2
2
n1
n2n3
n6n5
n4
o5
o1
o4
o3
o2
(a) Query region119876 = larr99788899788899788811989911198993 at time 119905
119894
3
3
32
4
5 2
3
46
1
2
2
4
n1
n2n3
n6n5
n4
o5
o1
o4
o3
o2
(b) Updating the weight of 997888997888997888rarr11989911199001at time 119905
119895
Figure 14 Changing the weight of an edge in a dynamic spatial network where 119905119894lt 119905
119895
46
3
3
3
2
4
1
1
1
1
3
2
2
2 2 2
n1
n2n3
n6n5
n4
o5
o1
o4
o3
o2
1205951
1205952 1205953
(a) Influence region Ψ119876at time 119905
119894
41 1 3 4
4
3
5 2
2
2
2
2
2
21
2
1
1
n1
n2n3
n6n5
n4
o5
o1
o4
o3
o2
1205951
1205953
1205955
1205952
1205954
(b) Updated influence region Ψ119876at time 119905
119895
Figure 15 Updating the influence region for 119876
is for each answer object 119900 isin 119874119887119894
119896 dist(119887
119894 119900) le dist(119887
119894 119900
119887119894
119896th)holds
Figure 15(a) illustrates the influential region for the queryregion 119876 at time 119905
119894 where the dotted line and square
brackets mark the influential region and its boundary pointsrespectively A set of the two NNs at boundary point 119899
1is
1198741198991
119896= 119900
1 119900
2 and the 119896th NN of 119899
1is 1199001198991
119896th = 1199001 Thus thedistance from 119899
1to its 119896th NN 119900
1is dist(119899
1 119900
1) = 3 and thus
the influential region Ψ1198991
for a boundary point 1198991becomes
Ψ1198991= 997888997888997888rarr11989911199001997888997888997888997888997888rarr119899111990021198994 Similarly the influential regionΨ
1198993for a
boundary point 1198993evaluates Ψ
1198993= 997888997888997888rarr11989931199003 119899
311990041205951 119899
31198995 119899
51205952
11989951205953 because 1198741198993
119896= 119900
3 119900
4 1199001198993
119896th = 1199003 and dist(1198993 119900
3) = 4
are given Consequently the influential region Ψ119876for query
region119876 becomesΨ119876=larr99788899788899788811989911198993cupΨ
1198991cupΨ
1198993= larr99788899788899788811989911198993997888997888997888997888997888rarr119899111990021198994997888997888997888rarr11989931199003
119899311990041205951 119899
31198995 119899
51205952 119899
51205953 As shown in Figure 15(b) updating
the weight of edge 997888997888997888rarr11989911199001from 3 to 5 may affect the safe
segments for the query region119876This is because updated edge997888997888997888rarr11989911199001overlaps the influential region Ψ
119876for query region 119876
In this case the server reevaluates the qualifying objects forquery region 119876 and provides updated qualifying objects sothat the user can update safe segments If the safe segmentsare updated the influential region should be also updatedaccordinglyThus the influential region for query region119876 isupdated at time 119905
119895 as shown in Figure 15(b) Finally updates
to the weights of the edges for examplelarr99788899788899788811989921199001 119899
21199005larr997888997888997888119899
31198994 and
11989941198996 that do not overlap the influential region can be safely
ignoredAlgorithm 3 monitors the validity of safe segments in a
query region when the weight of edges changes over timeAssume that the weight of edge 119899
119894119899119895is updated Subsequently
the server checks if edge 119899119894119899119895overlaps the influential region
Ψ119876for query region 119876 If the edge with the updated weight
does not overlap the influential region the update is safelyignored (lines (1)-(2)) Otherwise (ie Ψ
119876cap 119899
119894119899119895= 0) the
server requests that query object 119902 updates the query region(line (4)) Consequently 119902 submits a kRNNquery for updatedquery region119876updThe server then evaluates the kRNNqueryfor 119876upd and returns the kRNN query result Σ
119876updto 119902 (line
(5)) The query object then determines safe segments usingΣ119876upd
(line (6)) Finally the server updates the influentialregion accordingly (line (7))
6 Performance Evaluation
We describe our experimental settings in Section 61 andpresent the results of our experiments using real-life roadmaps in Section 62
61 Experimental Settings In the experiments we use tworeal-life roadmaps obtained from [27] to explore the impact
12 Mobile Information Systems
Input Ψ119876 influential region 119899
119894119899119895 updated edge
Output none(1) if Ψ
119876cap 119899
119894119899119895= 0 then an update to edge 119899
119894119899119895that does not overlap Ψ
119876is ignored
(2) ignore the update in the weight of edge 119899119894119899119895
(3) else this means that Ψ119876cap 119899
119894119899119895= 0
(4) 119876upd larr Update query region () server requests that 119902 update the query region(5) Σ
119876updlarr Evaluate 119896RNN query (119876upd 119896) server evaluates 119896RNN query for an updated query region
(6) Ω119876upd
larr Update safe segments (Σ119876upd
119896) 119902 determines safe segments inside the updated query region(7) Ψ
119876updlarr Update influential region (119876upd 119896) server updates influential region accordingly
Algorithm 3 Monitor safe segments (Ψ119876 119899
119894119899119895)
Table 4 Experimental parameter settings
Parameter RangeNumber of requested NNs (119896) 2 4 8 16 32Ratio of directed edge sequences to total edge sequences (119877dir) 0 5 10 20 50 ()Ratio of updated edge sequences to total edge sequences per timestamp (119877upd) 0 03 05 07 1 ()Size of query region (119876sz) 1 2 4 8 16
Number of data points (119873data)1 3 5 7 10 (times104) for NA1 3 5 7 10 (times103) for SJ
Speed of query points (119881qry)20 40 60 80 100 (kmh) for NA20 40 60 80 100 (kmh) for SJ
Distribution of data points (119863data) UniformDistribution of query points (119863qry) UniformNumber of query points (119873qry) 1000Road map NA SJ
of the edge sequence length on the performance of MORANThe first road map comprising 175813 nodes and 179179edges includes major roads in North America (NA) andcorresponds approximately to a data universe of 25times107 km2The second road map comprising 18263 nodes and 23874edges includes major roads in San Joaquin County (SJ)California and corresponds approximately to a data universeof 36 times 103 km2 For the first road map NA the numberof edge sequences and their average length are 12416 and29052m respectively For the second road map SJ thenumber of edge sequences and their average length are 20040and 248m respectively Table 4 summarizes the parametersused in the experiments In each experiment we vary a singleparameter in the range shown and set the other parameters tothe default values marked in boldWe simulate moving querypoints using a network-based moving objects generator [28]The number of query objects is set to 1000The size of a queryregion is determined by the number of edge sequences thatconstitute the query region The directed and updated edgesequences are selected randomly irrespective of the locationsof the data and query objects The length of an updated edgesequence is selected randomly to be between 01 and 10 timesthe original length For example if 119877upd is set to 05 and thenumber of edge sequences is 12416 then 62 edge sequences
are selected randomly every timestamp and their weights areupdated
As a benchmark against MORAN we use kRNN-E [5]without information of the precomputed shortest distancesbased on a shared execution paradigm to remove the redun-dant search overhead We choose kRNN-E instead of kRNN-F [5] with information of all the precomputed shortestdistances although kRNN-F typically outperforms kRNN-E The reason for this is that the precomputed distancesamong nodes are frequently invalidated by the updates tothe weights of the edges which makes it difficult to maintainthe precomputed distances To make kRNN-F applicable toour problem scenarios we can consider applying hierarchicaland goal-directed speed-up techniques [29] for DijkstrarsquosalgorithmThis approach can help to reduce the computationtime only at the server side and thus would not affect ourexperimental results Recall that the query processing at theserver is orthogonal to this study and that MORAN focuseson reducing the computation frequency and time taken atthe client side to evaluateMkRNN queries Our experimentalresults provide the average values per timestamp while 1000query points run for 600 timestamps Note that for roadmapNA the speed of the query points is 100 kmh by defaultwhereas for road map SJ the speed is 60 kmh by default
Mobile Information Systems 13
All algorithms are implemented in C++ and executed on adesktop PC with a 34GHz processor and 16GB of memory
62 Experimental Results Figure 16 shows a comparison ofthe query processing times at the client side of MORANand kRNN-E for evaluating MkRNN queries in road mapNA where each chart illustrates the effect of varying asingle parameter in Table 4 The values in the parenthesesindicate the computation frequency per timestamp Clearlythe computation frequency of kRNN-E equals the numberof query points and thus is omitted It should be noted thatthe server evaluates the MkRNN queries whenever the querypoints exit their query regions and thus the query processingtimes at the server side are the same forMORAN and kRNN-E Therefore we focus on comparing the query processingtimes at the client side
Figure 16(a) shows the query processing time as a func-tion of the number of requested NNs that is k Clearly thequery processing time at the client side increaseswith k How-ever the query processing time of MORAN is significantlyshorter than that of kRNN-E for all cases The reason for thisis that kRNN-E evaluates kNNquerieswhenever query pointsmove Conversely MORAN determines safe segments whenquery points enter new edge sequences or when the queryresults provided by the server become invalidated because ofupdated traffic conditions
Figure 16(b) shows the query processing time as a func-tion of the ratio of directed edge sequences to the totalnumber of edge sequences that is 119877dir Clearly 119877dir = 0refers to an undirected spatial networkThe query processingtimes at the client side of both methods are insensitive to thevalue of119877dirThe query processing time ofMORAN is shorterthan that of kRNN-E regardless of the value of 119877dir
Figure 16(c) shows the query processing time as a func-tion of the ratio of updated edge sequences to the totalnumber of edge sequences per timestamp that is 119877upd Here119877upd = 0 refers to a static spatial network The length of anupdated edge sequence is selected randomly frombetween 01and 10 times the original length Clearly the query processingtime of kRNN-E is almost constant regardless of the valueof 119877upd because query points in kRNN-E issue kNN queriesat each timestamp However the query processing time ofMORAN increases linearly with 119877upd because the probabilitythat the influential region of a query region overlaps anyupdated edge sequence increases with 119877upd Therefore alarger value of 119877upd leads to a longer query processing time
Figure 16(d) shows the query processing time as a func-tion of the size of the query region that is 119876sz Clearly thequery processing time increases with119876sz However the queryprocessing time of MORAN is clearly shorter than that ofkRNN-E regardless of the value of 119876sz
Figure 16(e) shows the query processing time as a func-tion of the number of data points that is 119873data In generalas 119873data increases the search space decreases and thus thequery processing time at the server side decreases accord-ingly However the query processing time at the client sideincreases with119873dataThis is because the number of qualifyingdata points handled at the client side increases with 119873data
Although the query processing time of MORAN increasesmore rapidly with 119873data than that of kRNN-E the queryprocessing time of MORAN is still shorter than that ofkRNN-E for 10 k le 119873data le 70 k However for119873data = 100 kthe query processing time of MORAN is 129 times longerthan that of kRNN-E
Figure 16(f) shows the query processing time as a func-tion of the speed of the query points that is 119881qry The queryprocessing time ofMORAN ismore sensitive to119881qry than thatof kRNN-E However the query processing time of MORANis clearly shorter than that of kRNN-E for all cases
Figure 17 shows a comparison of the query processingtimes at the client side of MORAN and kRNN-E for eval-uating MkRNN queries in road map SJ As when road mapNA is used when road map SJ is used the query processingtime of MORAN is clearly shorter than that of kRNN-E Asshown in Figure 17(a) the query processing time increaseswith k for the same reason as discussed earlier in the case ofFigure 16(a) As shown in Figure 17(b) the query processingtimes are not sensitive to the value of 119877dir As shown inFigure 17(c) the query processing time of kRNN-E remainsstable regardless of the value of 119877upd Conversely the queryprocessing time of MORAN increases with 119877upd because alarger value of 119877upd affects the influential regions of morequery points As shown in Figure 17(d) the query processingtime increases with 119876sz because the number of qualifyingdata points handled at the client side also increases with119876sz As shown in Figure 17(e) as 119873data increases the queryprocessing times decrease This is closely related to the sizeof the influential regions Specifically as 119873data increasesthe influential region decreases and thus updating weightsof edge sequences affects the influential regions of morequery points As shown in Figure 17(f) the query processingtime of MORAN increases with 119881qry for the same reason asdiscussed earlier in the case of Figure 16(f) whereas the queryprocessing time of kRNN-E remains stable regardless of thevalue of 119881qry
7 Conclusion
We proposed a new algorithm called MORAN for pro-cessing MkRNN queries in directed and dynamic spatialnetworks Existing studies focus on reducing redundant com-putation costs at the server side while processing snapshotkRNN queries in undirected and static spatial networksHowever MORAN clearly decreases the computation timeand frequency at the client side by dividing the query regioninto safe segments while processing MkRNN queries indirected and dynamic spatial networksThe influential regionfor a query region is introduced to monitor the impact of theupdated traffic conditions on the safe segments The resultsof experiments using real-life road maps demonstrate thatMORAN clearly outperforms kRNN-E for various workloadsin terms of the computation time and frequency We plan toextend our approach to processing sophisticated queries suchas kNN joins and top-k spatial preference queries in directedand dynamic spatial networks
14 Mobile Information Systems
k
(67)
2
MORAN
4 8 16 32
(73)
(83) (106)
(137)
0
10
20
30
40
CPU
tim
e at c
lient
side
(ms)
kRNN-E
(a) Effect of 119896
0 5 10 20 50
(90) (83) (83) (83) (81)
MORAN
0
5
10
15
20
CPU
tim
e at c
lient
side
(ms)
Rdir ()
kRNN-E
(b) Effect of 119877dir
00 03 05 07 10
(1)
(72) (83)
(157) (158)
MORAN
0
5
10
15
20
CPU
tim
e at c
lient
side
(ms)
Rupd ()
kRNN-E
(c) Effect of 119877upd
1 2 4 8 16
(66) (68) (83) (98)
(144)
MORAN
0
8
16
24
32CP
U ti
me a
t clie
nt si
de (m
s)
Qsz
kRNN-E
(d) Effect of119876sz
(163) (99)
(83) (80)
(79)
MORAN
0
8
16
24
32
CPU
tim
e at c
lient
side
(ms)
10 30 50 70 100
kRNN-E
Ndata (k)
(e) Effect of119873data
20 40 60 80 100
(95) (74) (81) (70) (83)
MORANkRNN-E
0
8
16
24
32
CPU
tim
e at c
lient
side
(ms)
Vqry (kmh)
(f) Effect of 119881qry
Figure 16 Comparison of CPU time at the client side for road map NA
Mobile Information Systems 15
(157) (209)(280)
(383)
(536)
k
2
MORAN
4 8 16 320
8
16
24
32
CPU
tim
e at c
lient
side
(ms)
kRNN-E
(a) Effect of 119896
(366) (286) (280) (272) (243)
MORAN
0 5 10 20 500
5
10
15
20
CPU
tim
e at c
lient
side
(ms)
Rdir ()
kRNN-E
(b) Effect of 119877dir
(26)(230) (280) (391) (429)
MORAN
00 03 05 07 10Rupd ()
0
5
10
15
20
CPU
tim
e at c
lient
side
(ms)
kRNN-E
(c) Effect of 119877upd
(277) (276) (280)(307)
(371)
MORAN
1 2 4 8 160
8
16
24
32CP
U ti
me a
t clie
nt si
de (m
s)
Qsz
kRNN-E
(d) Effect of119876sz
(612)
(359) (280) (232) (211)
MORAN
0
8
16
24
32
CPU
tim
e at c
lient
side
(ms)
1 3 5 7 10
kRNN-E
Ndata (k)
(e) Effect of119873data
(248) (265) (280) (286) (328)
MORAN
20 40 60 80 1000
5
10
15
20
CPU
tim
e at c
lient
side
(ms)
Vqry (kmh)
kRNN-E
(f) Effect of 119881qry
Figure 17 Comparison of CPU time at the client side for road map SJ
16 Mobile Information Systems
Notations and Their Definitions
119899119894119899119895 Edge connecting two adjacent nodes 119899
119894
and 119899119895
119899119904119899119904+1sdot sdot sdot 119899
119890 Edge sequence where 119899
119904(or 119899
119890) is the
start (or end) boundary node and theother nodes 119899
119904+1 119899
119890minus1 are
intermediate nodesdist(119901
1 119901
2) Length of the shortest path from point 119901
1
to point 1199012
len(1199011 119901
2) Length of the segment connecting two
points 1199011and 119901
2 such that 119901
1and 119901
2are
located in the same edge sequence119899119904119899119904+1sdot sdot sdot 119899
119890
119902 Query point119896 Number of requested NNs119874119901
119896 Set of kNNs at point 119901
120572120573 Segment that belongs to an edgesequence
119874(120572120573) Set of objects in segment 120572120573119900119896th The 119896th NN of query point 119902Ψ119902 Influence region for query point 119902
Ψ119876 Influence region for query region 119876
Conflict of Interests
The authors declare that there is no conflict of interestsregarding the publication of this paper
Acknowledgment
This research was supported by Kyungpook National Univer-sity Research Fund 2014
References
[1] U Demiryurek F Banaei-Kashani and C Shahabi ldquoEfficientcontinuous nearest neighbor query in spatial networks usingEuclidean restrictionrdquo in Advances in Spatial and TemporalDatabases 11th International Symposium SSTD 2009 AalborgDenmark July 8ndash10 2009 Proceedings vol 5644 of Lecture Notesin Computer Science pp 25ndash43 Springer Berlin Germany2009
[2] M R Kolahdouzan and C Shahabi ldquoAlternative solutionsfor continuous K nearest neighbor queries in spatial networkdatabasesrdquo GeoInformatica vol 9 no 4 pp 321ndash341 2005
[3] E W Dijkstra ldquoA note on two problems in connexion withgraphsrdquoNumerischeMathematik vol 1 no 1 pp 269ndash271 1959
[4] H Samet J Sankaranarayanan and H Alborzi ldquoScalablenetwork distance browsing in spatial databasesrdquo in Proceedingsof the SIGMOD International Conference on Management ofData (SIGMOD rsquo08) pp 43ndash54 Vancouver Canada June 2008
[5] J Bao C-Y ChowM FMokbel andW-S Ku ldquoEfficient evalu-ation of k-range nearest neighbor queries in road networksrdquo inProceedings of the 11th IEEE International Conference on MobileData Management (MDM rsquo10) pp 115ndash124 Kansas City MoUSA May 2010
[6] W-S Ku Y Chen and R Zimmermann ldquoPrivacy protectedspatial query processing for advanced location based servicesrdquo
Wireless Personal Communications vol 51 no 1 pp 53ndash652009
[7] K Mouratidis and M L Yiu ldquoAnonymous query processingin road networksrdquo IEEE Transactions on Knowledge and DataEngineering vol 22 no 1 pp 2ndash15 2010
[8] T Wang and L Liu ldquoPrivacy-aware mobile services over roadnetworksrdquo Proceedings of the VLDB Endowment vol 2 no 1pp 1042ndash1053 2009
[9] G Ghinita P Kalnis and S Skiadopoulos ldquoMobiHide amobilea peer-to-peer system for anonymous location-basedqueriesrdquo in Proceedings of the 10th International Symposium onSpatial and Temporal Databases (SSTD rsquo07) Boston MA USAJuly 2007 pp 221ndash238 Springer 2007
[10] S Ilarri E Mena and A Illarramendi ldquoLocation-dependentquery processing where we are and where we are headingrdquoACM Computing Surveys vol 42 no 3 article 12 2010
[11] H Al-Khalidi D Taniar J Betts and S Alamri ldquoDynamicsafe regions for moving range queries in mobile navigationrdquoInternational Journal of Ad Hoc and Ubiquitous Computing vol16 no 4 pp 250ndash259 2014
[12] H Al-Khalidi D Taniar J Betts and S Alamri ldquoMonitoringmoving queries inside a safe regionrdquo The Scientific WorldJournal vol 2014 Article ID 630396 13 pages 2014
[13] H-J Cho S J Kwon and T-S Chung ldquoA safe exit algorithmfor continuous nearest neighbor monitoring in road networksrdquoMobile Information Systems vol 9 no 1 pp 37ndash53 2013
[14] H-J Cho K Ryu and T-S Chung ldquoAn efficient algorithm forcomputing safe exit points of moving range queries in directedroad networksrdquo Information Systems vol 41 pp 1ndash19 2014
[15] C Li Y Gu J Qi G Yu R Zhang andW Yi ldquoProcessing mov-ing kNN queries using influential neighbor setsrdquo Proceedings ofthe VLDB Endowment vol 8 no 2 pp 113ndash124 2014
[16] S Nutanong R Zhang E Tanin and L Kulik ldquoAnalysis andevaluation of V-kNN an efficient algorithm for moving kNNqueriesrdquo VLDB Journal vol 19 no 3 pp 307ndash332 2010
[17] D Yung M L Yiu and E Lo ldquoA safe-exit approach for efficientnetwork-based moving range queriesrdquo Data and KnowledgeEngineering vol 72 pp 126ndash147 2012
[18] Y Gao B Zheng G Chen C Chen and Q Li ldquoContinuousnearest-neighbor search in the presence of obstaclesrdquo ACMTransactions on Database Systems vol 36 no 2 article 9 2011
[19] Y Tao D Papadias and Q Shen ldquoContinuous nearest neighborsearchrdquo in Proceedings of the 28th International Conference onVery Large Data Bases (VLDB rsquo02) pp 287ndash298 Hong KongAugust 2002
[20] M Mokbel C Chow and W Aref ldquoThe new casper queryprocessing for location serviceswithout compromising privacyrdquoin Proceedings of the 32nd International Conference on VeryLarge Data Bases (VLDB rsquo06) pp 763ndash774 Seoul Republic ofKorea 2006
[21] P Kalnis G Ghinita K Mouratidis and D Papadias ldquoPre-venting location-based identity inference in anonymous spatialqueriesrdquo IEEE Transactions on Knowledge and Data Engineer-ing vol 19 no 12 pp 1719ndash1733 2007
[22] C Chow M Mokbel J Naps and S Nath ldquoApproximateevaluation of range nearest neighbor queries with qualityguaranteerdquo in Advances in Spatial and Temporal Databases 11thInternational Symposium SSTD 2009 Aalborg Denmark July 8ndash10 2009 Proceedings vol 5644 of Lecture Notes in ComputerScience pp 283ndash301 Springer Berlin Germany 2009
Mobile Information Systems 17
[23] J Xu X Tang H Hu and J Du ldquoPrivacy-conscious location-based queries in mobile environmentsrdquo IEEE Transactions onParallel and Distributed Systems vol 21 no 3 pp 313ndash326 2010
[24] A M Aly W G Aref and M Ouzzani ldquoSpatial queries withtwo kNN predicatesrdquo Proceedings of the VLDB Endowment vol5 no 11 pp 1100ndash1111 2012
[25] Y Gu G Yu and X Yu ldquoAn efficient method for k nearestneighbor searching in obstructed spatial databasesrdquo Journal ofInformation Science and Engineering vol 30 no 5 pp 1569ndash1583 2014
[26] K Mouratidis M L Yiu D Papadias and N MamoulisldquoContinuous nearest neighbormonitoring in road networksrdquo inProceedings of the 32nd International Conference on Very LargeData Bases (VLDB rsquo06) pp 43ndash54 Seoul Republic of KoreaSeptember 2006
[27] Real Datasets for Spatial Databases httpwwwcsfsuedusimlifeifeiSpatialDatasethtm
[28] T Brinkhoff ldquoA framework for generating network-based mov-ing objectsrdquo GeoInformatica vol 6 no 2 pp 153ndash180 2002
[29] R Bauer D Delling P Sanders D Schieferdecker D Schultesand D Wagner ldquoCombining hierarchical and goal-directedspeed-up techniques for dijkstrarsquos algorithmrdquo Journal of Exper-imental Algorithmics vol 15 article 23 2010
[30] M Kolahdouzan C Shahabi and M Kolahdouzan ldquoVoronoi-based k nearest neighbor search for spatial network databasesrdquoinProceedings of the 30th International Conference onVery LargeData Bases (VLDB rsquo04) vol 30 pp 840ndash851 2004
[31] D Papadias J Zhang N Mamoulis and Y Tao ldquoQueryprocessing in spatial network databasesrdquo in Proceedings of the29th International Conference on Very Large Data Bases (VLDBrsquo03) vol 29 pp 802ndash813 2003
Submit your manuscripts athttpwwwhindawicom
Computer Games Technology
International Journal of
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Distributed Sensor Networks
International Journal of
Advances in
FuzzySystems
Hindawi Publishing Corporationhttpwwwhindawicom
Volume 2014
International Journal of
ReconfigurableComputing
Hindawi Publishing Corporation httpwwwhindawicom Volume 2014
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Applied Computational Intelligence and Soft Computing
thinspAdvancesthinspinthinsp
Artificial Intelligence
HindawithinspPublishingthinspCorporationhttpwwwhindawicom Volumethinsp2014
Advances inSoftware EngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Electrical and Computer Engineering
Journal of
Journal of
Computer Networks and Communications
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Hindawi Publishing Corporation
httpwwwhindawicom Volume 2014
Advances in
Multimedia
International Journal of
Biomedical Imaging
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
ArtificialNeural Systems
Advances in
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
RoboticsJournal of
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Computational Intelligence and Neuroscience
Industrial EngineeringJournal of
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014
The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Human-ComputerInteraction
Advances in
Computer EngineeringAdvances in
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Mobile Information Systems 3
concerning network-constrained mobile users and networkdistance-based queries
kRNN queries have also been widely studied in thecontext of privacy-preserving LBSs based on spatial networkdistance where the exact location of the query issuer isblurred into the query region [5ndash8]The basic idea underlyingthe processing of a kRNN query is to execute a range queryto retrieve data objects within the query region and executekNN queries at the boundary points of the query regionKu et al [6] developed a privacy-aware spatial networknearest neighbor query algorithm that retrieves all POIsinside a given cloaked region and finds POIs outside thecloaked region using spatial network expansion Naturallyissuing kNNqueriesmultiple times in order to process kRNNqueries leads to a huge redundant search overhead To rectifythis problem Bao et al [5] proposed an efficient kRNNquery processing algorithm that employs a shared executionapproach to eliminate the redundant search overhead
Existing algorithms such as [5ndash8] deal with snapshotkRNN queries as opposed to the moving kRNN queries con-sidered in this study Consequently they focus on reducingthe computation time of the server as well as communicationcosts between the server and query objects Thus whileprocessing snapshot kRNN queries existing algorithms donot have to consider the computation time of the queryobjects that evaluate the exact kNNset using a set of candidatedata objects provided by the server This is because inprocessing snapshot kRNN queries the computation time ofthe query objects is very small compared to the computationtime of the server However very little research has focusedon supporting MkRNN queries in directed and dynamicspatial networks where the computation time of the queryobjects is not negligible
Nutanong et al [16] developed an incremental safe-region-based technique called the 119881lowast-Diagram for answer-ing moving kNN queries in Euclidean space as well as inundirected spatial networks However 119881lowast-Diagram is notappropriate in our problem scenarios because the distanceis transitive in both Euclidean space and undirected spatialnetworks whereas the distance is not transitive in directedspatial networks Yung et al [17] proposed an algorithm forcomputing the boundary referred to as safe exits of thesafe region of moving range queries in spatial networksTheir solution focuses onmoving range queries (eg find gasstations within 119903 = 3 km for the next 10 minutes) and is thusinapplicable for the processing of MkRNN queries
MORAN differs from existing studies in several aspectsfirst it considers MkRNN queries in directed and dynamicspatial networks second it focuses on reducing the compu-tation time and frequency of the query object and finallyit efficiently determines and maintains safe segments withina query region In recent years various types of querieson moving objects have also been studied extensively Theyinclude range queries [14 17] kNN queries with two predi-cates [24] and obstructed kNN queries [25] The associatedstudies have different problem scenarios from those in ourstudy and their solutions are not appropriate
Finally Table 1 compares our problem scenario withrelated work in terms of query type space domain and
Table 1 Classification of related work
References Query type Space domain Query object Data object[11 12] Range Euclidean Moving Static[4] Range USSN Static Static[17] Range USSN Moving Static[14] Range DDSN Moving Static[15 16 18 19] kNN Euclidean Moving Static[2 13 16] kNN USSN Moving Static[4 30 31] kNN USSN Static Static[1 26] kNN USSN Moving Moving[20ndash23] kRNN Euclidean Static Static[5ndash8] kRNN USSN Static StaticThis paper kRNN DDSN Moving Static
mobility of query objects and data objects Because of spacelimitations we shorten the terms ldquoundirected and staticspatial networkrdquo to ldquoUSSNrdquo and ldquodirected and dynamicspatial networkrdquo to DDSN
3 Background
Section 31 defines the terms and notations used in this paperSection 32 formulates the problem by using an example
31 Definition of Terms and Notations Now we define theterms and notations used in this paper for clarification
Spatial Network A spatial network is represented by aweighted directed graph 119866 = (119873 119864119882) where 119873 119864 and119882 denote a node set edge set and edge distance matrixrespectively Each edge connecting two nodes has a weightand a specific orientation The weight of an edge changesdepending on the traffic conditions and its direction is eitherbidirectional or unidirectional Specifically 119899
119894119899119895denotes an
undirected edge where 119899119894and 119899
119895are adjacent nodes whereas
997888997888rarr119899119894119899119895orlarr997888997888119899
119894119899119895denotes a directed edgeThe arrow above the edge
denotes the associated direction
Classification of Nodes Nodes can be classified into threecategories according to the node degree (1) if it is greater thanor equal to 3 the node is referred to as an intersection node(2) if it is equal to 2 the node is an intermediate node and (3)if it is equal to 1 the node is a terminal node
Edge Sequence and Segment An edge sequence denoted byeither 119899
119904119899119904+1sdot sdot sdot 119899
119890or 997888997888997888997888997888997888997888997888997888997888rarr119899
119904119899119904+1sdot sdot sdot 119899
119890 refers to a path connecting
two nodes 119899119904and 119899
119890 such that 119899
119904(or 119899
119890) is either an
intersection or terminal node and the other nodes in thepath are intermediate nodes The two end nodes 119899
119904and 119899
119890
are called boundary nodes Clearly all edges in the sameedge sequence have the same directionThe length of an edgesequence is the total weight of the edges in the edge sequenceOne part of an edge sequence is called a segment Note thatby definition an edge sequence is also a segment defined bythe boundary nodes of the edge sequence
4 Mobile Information Systems
16 2 4
2
3
4
3
n1 n2
n3 n4
n5 n6
o1o2
Figure 2 dist(1199001 119900
2) = 6 dist(119900
2 119900
1) = 9 and len(119900
1 119900
2) = 9
To simplify the presentation Notations and Their Def-initions summarizes the notations used in this paper Thedistance between two points in a directed spatial network 119866is not symmetric that is for two points 119901
1 119901
2isin 119866 there is
no guarantee that dist(1199011 119901
2) equals dist(119901
2 119901
1) Note that
if the algorithms for MORAN operate in the same mannerfor undirected and directed spatial segments an undirectedsegment is used for convenience to describe the algorithms
Figure 2 depicts the distances and segment lengthbetween two objects 119900
1and 119900
2in a directed spatial network
In this figure the shortest path from 1199001to 119900
2is 119900
1rarr
1198992rarr 119899
5rarr 119900
2and thus the distance from 119900
1to 119900
2is
dist(1199001 119900
2) = 6 Conversely the shortest path from 119900
2to 119900
1
is 1199002rarr 119899
4rarr 119899
3rarr 119900
1and thus the distance from 119900
2to
1199001is dist(119900
2 119900
1) = 9 This proves that the network distance
is not symmetric in a directed spatial network The segmentconnecting 119900
1and 119900
2in the same edge sequence larr997888997888997888997888997888997888997888119899
2119899311989941198995
becomes 1199001rarr 119899
3rarr 119899
4rarr 119900
2and thus its length is
len(1199001 119900
2) = 9 Recall that len(119901
1 119901
2) is defined if and only
if the two points 1199011and 119901
2 are located in the same edge
sequence
32 Problem Formulation Figure 3 shows an example of anM119896RNN query in a directed and dynamic spatial networkHere data objects 119900
1through 119900
5are represented by the
rectangles and a query region 119876 is represented by a set ofbold line segments that is 119876 =
larr99788899788899788811989911198993 119899
21198993larr99788899788899788811989931198994 The
boundary point of a query region indicates the point wherethe query region and nonquery region meet In this examplequery region119876 has four boundary points 119899
1through 119899
4 The
number next to an edge indicates the distance between thetwo adjacent objects Suppose that a query object 119902 in queryregion 119876 requests two NNs from the server while hiding itslocation from the server Then the kRNN query result for119876 should include the two closest data objects to each pointin query region 119876 The query result can be represented bya set of ⟨119878 119877⟩ tuples where 119878 is a safe segment in 119876 and119877 is the query result for the safe segment 119878 As shown inFigure 3(a) query region 119876 can be partitioned into four safesegments that is Ω
1= ⟨larr99788899788899788811989911199003 119900
1 119900
2⟩ Ω
2= ⟨997888997888997888rarr11989931199003 119900
2 119900
3⟩
Ω3= ⟨119899
2119904 119900
4 119900
5⟩ andΩ
4= ⟨119899
3119904cuplarr99788899788899788811989931198994 119900
3 119900
4⟩ Clearly if
query object 119902 is located in a safe segmentlarr99788899788899788811989911199003(ie 119902 isin larr997888997888997888119899
11199003)
then the kNN set of 119902 is 1199001 119900
2 Similarly if 119902 isin 997888997888997888rarr119899
31199003 then
the kNN set of 119902 is 1199002 119900
3 if 119902 isin 119899
2119904 then the kNN set for
119902 is 1199004 119900
5 and if 119902 isin 119899
3119904 cuplarr99788899788899788811989931198994 then the kNN set of 119902 is
1199003 119900
4 As shown in Figure 3(b) if the weight of an edge997888997888997888rarr119899
11199001
represented by the bold dotted line is updated from 3 to 5 at
time 119905119895 this update may affect the safe segments computed at
time 119905119894 which leads to nullifying the kNN set of 119902 isin 119876
The query region 119876 consists of a set 119876119904 of 119897 segments anda set 119876119887 of 119898 boundary points that is 119876119904
= 1199041 1199042 119904
119897
and 119876119887
= 1198871 1198872 119887
119898 Clearly a query object 119902 is located
inside query region 119876 while hiding its exact location fromthe server to ensure location privacy Note that we use theterms ldquoquery object 119902rdquo and ldquoquery point 119902rdquo interchangeablyfor convenience of discussion Clearly for a query point 119902 isin119876 119874119902
119896sube (⋃
119898
119894=1119874119887119894
119896) cap (⋃
119897
119895=1119874(119904
119895)) holds where 119874119887119894
119896refers to
a set of 119896NNs at a boundary point 119887119894isin 119876
119887 and 119874(119904119895) refers to
a set of objects inside a segment 119904119895isin 119876
119904 It should be notedthat processing kRNN queries at the server is orthogonal tothis studyTherefore any kRNN query processing algorithms(eg [5 6]) can be used to evaluate the kRNN queries atthe server The server evaluates a kRNN query for a queryregion 119876 and then provides a set of candidate data objects toquery object 119902 Finally 119902 determines safe segments using a setof candidate data objects for the query region 119876 Recall thatgiven a safe segment 119878 for two points 119902
1 119902
2isin 119878 1198741199021
119896is equal
to 1198741199022
119896
Figure 4 illustrates three scenarios that can arise when aquery object 119902 issues kRNN queries As shown in Figure 4(a)at time 119905
119894 a query object 119902 submits a kRNN query for a
query region 119876119894to the server On receiving the query the
server evaluates the kRNN query and returns the queryresult to 119902 isin 119876
119894 Clearly 119902 determines safe segments inside
query region 119876119894using the kRNN query result As shown in
Figure 4(b) when 119902 leaves the query region 119876119894at time 119905
119895 it
submits a kRNN query for an updated query region 119876119895to
the server Then the server evaluates the kRNN query andreturns the query result to 119902 isin 119876
119895 Clearly 119902 determines safe
segments inside query region 119876119895 As shown in Figure 4(c)
while 119902 is inside 119876119895at time 119905
119896 a query region 119876
119895overlaps a
traffic congestion area119879 marked by a gray rectangle inwhichthe weight of the edges changes The server realizes that thetraffic congestion area 119879 invalidates the kRNN query resultfor 119876
119895and thus requests that 119902 updates the query region
Consequently 119902 submits a kRNN query for an updated queryregion 119876
119896to the server which evaluates the kRNN query
and returns the query result to 119902 isin 119876119896 Clearly 119902 determines
the safe segments inside query region 119876119896 In Section 5 we
elaborate on a method to verify that an updated trafficcondition invalidates current kRNN query results
4 Processing MkRNN Queries inDirected Spatial Networks
In Section 41 we give an overview of MORAN InSection 42 we present an algorithm for determiningsafe segments in a query region Finally in Section 43 wediscuss the construction of the safe segments of an MkRNNquery for the example of directed spatial network
41 Overview As stated before we focus on query processingat the client side while processing MkRNN queries in adirected and dynamic spatial network If either of the two
Mobile Information Systems 5
3 2
2
4
1
2
3
3
3 6
4
4
3
2
3 2
2
4
1
2
3
3
25 6
4
4
3
2
s
n1n1
n2n2 n3n3n4n4
n5n5n6n6
o1o1
o5
o4
o3
o2
o3
o4
o5
o2
Ω1
Ω2
Ω3 Ω4
Ω3 = ⟨n2s o4 o5⟩
Ω1 = ⟨larr997888997888997888n1o3 o1 o2⟩
Ω2 = ⟨997888997888997888rarrn3o3 o2 o3⟩
Ω4 = ⟨ n3s cuplarr997888997888997888n3n4 o3 o4⟩
(a) MkRNN query with 119896 = 2 and its safe segments at time 119905119894
5 2
2
4
1
2
3
3
3 6
4
4
3
2
n1
n2 n3n4
n6n5
o1
o5
o4
o3
o2
(b) Updated traffic conditions at time 119905119895
Figure 3 Example of MkRNN query in a spatial network where 119896 = 2 and 119905119894lt 119905
119895
Qi
q
(1) q submits kRNN query for a query region Qi
(2) Server returns a set of candidate objects to qisin Qi
LBS server
(a) 119902 submits a 119896RNN query for a query region119876119894to the server at time 119905
119894 where 119902 isin 119876
119894
q
Qj
(1) q submits kRNN query for a query region Qj
(2) Server returns a set of candidate objects to qisin Qj
LBS server
(b) 119902 submits a 119896RNN query for an updated query region119876119895to the server when 119902 leaves119876
119894at 119905
119895
q
Qj
T(1) Server requests thatq updates the query region
(2)q submits kRNN query for an updated query region Qk
LBS server
(c) Server requests that 119902 updates the query region when a set of candidate objects is invalidated at 119905119896
Figure 4 Three scenarios for processing MkRNN queries
events in Figure 5 occurs the server should evaluate thekRNN query and provide query object 119902 with an updatedkRNN query result The first event is 119902 leaving the cur-rent query region For example as shown in Figure 5(a)if 119902 moves to 1199021015840 outside of 119876 a kRNN query should bereevaluated with the updated query regionThe second event
is invalidation of the current kRNN query result providedto query object 119902 because of an updated traffic conditionFor example as shown in Figure 5(b) if query region 119876overlaps traffic congestion area 119879 the kRNN query shouldbe reevaluated to reflect the updated traffic condition Whenthe query object receives an updated kRNNquery result from
6 Mobile Information Systems
Q
qq998400
(a) 119902 leaves query region119876
Q
q
T
(b) Congestion area 119879 nullifies 119896RNN query resultfor119876
Figure 5 Two events that trigger the evaluation of MkRNN queries
Input Q query region k the number of requested NNsOutputΩ the set of safe segments in 119876(1)Ω larr 0 Ω is initialized to an empty set(2) for each segment 120572120573 isin 119876 do(3) 119874
120572
119896larr evaluate kNN query at point (120572 k) a kNN query is evaluated at a boundary point 120572
(4) 119874120573
119896larr evaluate kNN query at point (120573 k) a kNN query is evaluated at a boundary point 120573
(5) 119874(120572120573) larr evaluate range query (120572120573) a range query is evaluated for a segment 120572120573(6) Ω(120572120573) larr find safe segments (119874120572
119896 119874120573
119896 119874(120572120573)) the function is detailed in Section 42
(7) Ω larr Ω cup Ω(120572120573)
(8) return Ω the set of safe segments is provided to the query issuer
Algorithm 1 MORAN (Q k)
the server it should reevaluate safe segments inside the queryregion Using safe segments reduces the computation timeand frequency because the query object does not have toevaluate kNN queries while inside the safe segments
Algorithm 1 outlines the process of determining the safesegments in a query region 119876 in a directed spatial networkThe algorithm starts by initializing Ω to an empty set whichstores the safe segments found thus far Each segment 120572120573in query region 119876 is explored sequentially to find the safesegments in segment120572120573 For this purposeMORANevaluatestwo kNN queries issued at boundary points 120572 and 120573 ofsegment 120572120573 The query results are stored to 119874120572
119896and 119874120573
119896
respectively The objects in 120572120573 are explored and stored to119874(120572120573) The function find safe segments is called with 119874120572
119896
119874120573
119896 and 119874(120572120573) in order to find safe segments in segment
120572120573 The found safe segments are added to the result set ΩWhen all the segments in 119876 have been examined a set Ωof safe segments in query region 119876 is returned to the queryissuer It should be noted that if updates in the weight of edgesfrequently occur in a spatial network it is better to determinethe safe segments in the current segment including the querypoint rather than all the safe segments in the query regionWe employ a shared execution approach [5] which is widely
used to avoidmultiple visits to the samenodes and edgesThisclearly reduces the query processing time while determiningsafe segments in a query region
42 Partitioning Query Region into Safe Segments We con-sider an undirected segment 120572120573 followed by a directedsegment
997888rarr120572120573 We present a method for finding safe segments
in segment 120572120573 by using119874120572
119896119874120573
119896 and119874(120572120573) Here119874120572
119896and119874120573
119896
refer to sets of 119896NNs at boundary points 120572 and 120573 respectivelyand 119874(120572120573) refers to a set of objects inside segment 120572120573 Anobject 119900 that belongs to the union of 119874120572
119896 119874120573
119896 and 119874(120572120573) that
is 119900 isin 119874120572
119896cup 119874
120573
119896cup 119874(120572120573) is referred to as a qualifying object
Clearly the set 119874119902
119896of 119896NNs at a query point 119902 isin 120572120573 is a
subset of the union of 119874120572
119896 119874120573
119896 and 119874(120572120573) [5 13 26] that is
119874119902
119896sube (119874
120572
119896cup119874
120573
119896cup119874(120572120573)) If119874120572
119896equals119874120573
119896and119874(120572120573) is a subset
of119874120572
119896 segment 120572120573 becomes a safe segment Otherwise it has
two or more safe segmentsWe first explore the change in a network distance
dist(119902 119900) for a qualifying object 119900 isin 119874120572
119896cup 119874
120573
119896cup 119874(120572120573)
when a query point 119902 is located in an undirected segment120572120573 [13 14] Figure 6 shows the change in dist(119902 119900) for three
Mobile Information Systems 7
Table 2 Computation of dist(119902 119900) where 119902 isin 120572120573 and 119900 isin 119874120572
119896cup 119874
120573
119896cup 119874(120572120573)
Condition dist(119902 119900)
119900 isin 119874120572
119896minus (119874
120573
119896cup 119874(120572120573)) dist (119902 119900) = len (119902 120572) + dist (120572 119900)
119900 isin 119874120573
119896minus (119874
120572
119896cup 119874(120572120573)) dist (119902 119900) = len (119902 120573) + dist (120573 119900)
119900 isin 119874(120572120573) minus (119874120572
119896cup 119874
120573
119896) dist (119902 119900) = len (119902 119900)
119900 isin 119874120572
119896cap 119874
120573
119896minus 119874(120572120573) dist (119902 119900) = min (len (119902 120572) + dist (120572 119900) len (119902 120573) + dist (120573 119900))
119900 isin 119874120572
119896cap 119874(120572120573) minus 119874
120573
119896dist (119902 119900) = min (len (119902 120572) + dist (120572 119900) len (119902 119900))
119900 isin 119874120573
119896cap 119874(120572120573) minus 119874
120572
119896dist (119902 119900) = min (len (119902 120573) + dist (120573 119900) len (119902 119900))
119900 isin 119874120572
119896cap 119874
120573
119896cap 119874(120572120573) dist (119902 119900) = min (len (119902 120572) + dist (120572 119900) len (119902 120573) + dist (120573 119900) len (119902 119900))
120572
o
q 120573
dist(120572 o)
dist(120572 o) + len(120572 120573)
(a) If 119900 isin 119874120572
119896 then dist(119902 119900) = len(119902 120572) +
dist(120572 119900)
120572
o
120573
len(120572 120573) + dist(120573 o)
dist(120573 o)
(b) If 119900 isin 119874
120573
119896
then dist(119902 119900) = len(119902 120573) +dist(120573 119900)
o120572 q 120573
len(120572 o)
len(o 120573)
(c) If 119900 isin 119874(120572120573) thendist(119902 119900) = len(119902 119900)
Figure 6 Evaluation of dist(119902 119900) where 119902 isin 120572120573 and 119900 isin 119874120572
119896cup 119874
120573
119896cup 119874(120572120573)
cases 119900 isin 119874120572
119896 119900 isin 119874120573
119896 and 119900 isin 119874(120572120573) In this figure the
119910-axis represents dist(119902 119900) and the 119909-axis represents len(120572 119902)for 0 le len(120572 119902) le len(120572 120573) If 119900 isin 119874120572
119896 then dist(119902 119900) =
len(119902 120572) + dist(120572 119900) as shown in Figure 6(a) Similarly if119900 isin 119874
120573
119896 then dist(119902 119900) = len(119902 120573) + dist(120573 119900) as shown in
Figure 6(b) Finally if 119900 isin 119874(120572120573) then dist(119902 119900) = len(119902 119900)as shown in Figure 6(c)
Table 2 summarizes the evaluation of dist(119902 119900) for 119902 isin 120572120573and 119900 isin 119874120572
119896cup 119874
120573
119896cup 119874(120572120573) where MIN returns the minimum
of the values in the input array Because a qualifying object 119900belongs to a combination of119874120572
119896119874120573
119896 or119874(120572120573) a total of seven
possible cases are considered Note that dist(120572 119900) dist(120573 119900)len(120572 119900) and len(120573 119900) are given constants and dist(119902 119900) is thelength of the shortest path among multiple paths from 119902 and119900
Figure 7 shows an example of the change in dist(119902 119900)depending on the location of query point 119902 isin 119899
2119899511989961198993 For
simplicity we assume that the number of NNs requested atquery point 119902 is 119896 = 1 Then as shown in Figure 7(a) 1198741198992
119896
1198741198993
119896 and 119874(119899
2119899511989961198993) are evaluated as 1198741198992
119896= 119900 1198741198993
119896= 119900
and119874(1198992119899511989961198993) = 119900 respectively As shown in Figure 7(b)
the distance from 119902 to 119900 represented by the bold lines isdist(119902 119900) = len(119902 119900) if 119902 isin 119899
211989951198996 otherwise it is dist(119902 119900) =
len(119902 1198993) + 3 because dist(119899
2 119900) = 1 dist(119899
3 119900) = 3 and
len(1198992 119900) = 1 are given
Next we explore the change in network distance dist(119902 119900)for object 119900 isin 119874120572
119896cup 119874
120573
119896cup 119874(
997888rarr120572120573) when a query point 119902 is
located in a directed segment997888rarr120572120573 Figure 8 shows the change
in dist(119902 119900) for three cases 119900 isin 119874120572
119896 119900 isin 119874120573
119896 and 119900 isin 119874(
997888rarr120572120573)
1
2
1 2
1 16 5
n1 n4n2 n3
n5
n6o
q
(a) q isin n2n5n6n3
9
7
5
3
112 2
n2 n3n5 n6
o
o
o
(b) dist(q o) = len(q o) if q isin n2n5n6
len(q n3) + 3 otherwise
Figure 7 Computation of ist(119902 119900) where 119902 isin 1198992119899511989961198993and 119900 isin
1198741198992
119896cap 119874
1198993
119896cap 119874(119899
2119899511989961198993)
Note that the dotted lines indicate that no paths exist from119902 to 119900 for the corresponding intervals which are denoted bydist(119902 119900) = infin For object 119900 isin 119874120572
119896 as shown in Figure 8(a)
8 Mobile Information Systems
asympasymp
dist(120572 o) o
120572 q 120573
infin
(a) If o isin O120572k then dist(q o) = dist(120572 o) if q = 120572
infin otherwise
o
120572 q 120573
len(120572 120573)+dist(120573 o)
dist(120573 o)
(b) If o isin O120573
k then dist(q o) = len(q 120573) + dist(120573 o)
asympasymp
120572 qo 120573
len(120572 o)
infin
(997888rarr120572120573
997888rarr120572(c) If o isin O then dist(q o) =len(q o) if q isin o
infin otherwise)
Figure 8 Evaluation of dist(119902 119900) where 119902 isin997888rarr120572120573 and 119900 isin 119874120572
119896cup 119874
120573
119896cup
119874(997888rarr120572120573)
if 119902 = 120572 then dist(119902 119900) = dist(120572 119900) otherwise (ie 119902 isin997888rarr120572120573minus120572) dist(119902 119900) = infin Similarly if 119900 isin 119874120573
119896 then dist(119902 119900) =
len(119902 120573) + dist(120573 119900) as shown in Figure 8(b) Finally forobject 119900 isin 119874(
997888rarr120572120573) as shown in Figure 8(c) if 119902 isin 997888rarr120572119900 then
dist(119902 119900) = len(119902 119900) otherwise (ie 119902 isinlarr997888120573119900) dist(119902 119900) = infin
Here dist(119902 119900) is the length of the shortest path from 119902 and119900 where query point 119902 isin
997888rarr120572120573 and is thus determined using
Table 2 in the same way as 119902 isin 120572120573Figure 9 shows an example of the change in dist(119902 119900)
depending on the location of query point 119902 isin 997888997888997888997888997888rarr119899211989951198993 For
simplicity we assume that the number of NNs requested atquery point 119902 is 119896 = 1 Then as shown in Figure 9(a) 1198741198992
119896
1198741198993
119896 and 119874(997888997888997888997888997888rarr119899
211989951198993) are evaluated as 1198741198992
119896= 119900 1198741198993
119896= 119900
and 119874(997888997888997888997888997888rarr119899211989951198993) = 119900 respectively As shown in Figure 9(b)
the distance from 119902 to 119900 represented by the bold lines isdist(119902 119900) = len(119902 119900) if 119902 isin 997888997888rarr119899
2119900 otherwise it is dist(119902 119900) =
len(119902 1198993) + 3 because dist(119899
2 119900) = 1 dist(119899
3 119900) = 3 and
len(1198992 119900) = 1 are given
1
2
3
1
16 5
n1 n4n2 n3
n5
o
q
(a) q isin 997888997888997888997888997888rarrn2n5n3
21
3
3
9
n2 n3n5o
o
o
asympasymp
infin
997888997888rarrn2o(b) dist(q o) =len(q o) if q isinlen(q n3) + 3 otherwise
Figure 9 Computation of dist(119902 119900) where 119902 isin 997888997888997888997888997888rarr119899211989951198993and 119900 isin 1198741198992
119896cap
1198741198993
119896cap 119874(
997888997888997888997888997888rarr119899211989951198993)
43 Partitioning Example Query Region into Safe SegmentsWe now discuss the construction of safe segments for queryregion 119876 in Figure 3(a) Recall that the number of requestedNNs is 119896 = 2 and the query region includes three segmentsthat is 119876 = larr997888997888997888119899
11198993 119899
21198993larr99788899788899788811989931198994 Table 3 summarizes the com-
putation of the safe segments in query region 119876 Clearly thekNN set at a node 119899
3is evaluated only once and it is reused
multiple timesAs shown in Algorithm 1 MORAN determines the safe
segments for each segment in query region 119876 Therefore weshow the successive determination of the safe segments inlarr99788899788899788811989911198993 119899
21198993 and larr997888997888997888119899
31198994 It is clear that adjacent safe segments
with the same query result can be merged Recall that we candraw dist(119902 119900) by using a query point 119902 isin 120572120573 and an object119900 isin 119874
120572
119896cup 119874
120573
119896cup 119874(120572120573)
Figure 10 depicts dist(119902 119900) using a query point 119902 isin larr99788899788899788811989911198993
and each object 119900 isin 1198741198991
119896cup 119874
1198993
119896cup 119874(
larr99788899788899788811989911198993) Here the union
of 1198741198991
119896 1198741198993
119896 and 119874(larr997888997888997888119899
11198993) becomes 1198741198991
119896cup 119874
1198993
119896cup 119874(
larr99788899788899788811989911198993) =
1199001 119900
2 119900
3 119900
4 because 1198741198991
119896= 119900
1 119900
2 1198741198993
119896= 119900
3 119900
4 and
119874(larr99788899788899788811989911198993) = 119900
3 are given Figures 10(a) 10(b) 10(c) and 10(d)
illustrate dist(119902 1199001) dist(119902 119900
2) dist(119902 119900
3) and dist(119902 119900
4)
respectively Recall that 1199001isin 119874
1198991
119896 119900
2isin 119874
1198991
119896 119900
3isin 119874
1198993
119896cup
119874(larr99788899788899788811989911198993) and 119900
4isin 119874
1198993
119896hold
To partition a segment 120572120573 into safe segments it isessential to identify the 119896th NN 119900
119896th at a query point 119902 isin120572120573 among the qualifying objects 119900 isin 119874
120572
119896cup 119874
120573
119896cup 119874(120572120573)
Mobile Information Systems 9
Table 3 Computation of safe segments for the example query region
120572120573 120572 120573 119874120572
119896119874120573
119896119874(120572120573) Ω(120572120573)
larr99788899788899788811989911198993
1198991
1198993
1199001 119900
2 119900
3 119900
4 119900
3 ⟨
larr99788899788899788811989911199003 119900
1 119900
2⟩ ⟨
997888997888997888rarr11989931199003 119900
2 119900
3⟩ ⟨119899
3 119900
3 119900
4⟩
11989921198993
1198992
1198993
1199004 119900
5 119900
3 119900
4 119900
4 ⟨119899
2119904 119900
4 119900
5⟩ ⟨119899
3119904 119900
3 119900
4⟩
larr99788899788899788811989931198994
1198993
1198994
1199003 119900
4 119900
3 119900
4 0 ⟨
larr99788899788899788811989931198994 119900
3 119900
4⟩
10
3
7
n1 n3
o1
(a) dist(q o1) = len(q n1) + 3
7
2
9
n1 n3
o2
(b) dist(q o2) = len(q n1) + 2
4
43
n1 n3
o3
o3
asympasymp
infin
997888997888997888rarrn3o3(c) dist(q o3) =len(q o3) if q isininfin otherwise
7
3
n1 n3
o4
asymp asymp
infin
q = n3infin otherwise(d) dist(q o4) =3 if
Figure 10 Plot of ist(119902 119900) where 119902 isin larr99788899788899788811989911198993and 119900 isin 119900
1 119900
2 119900
3 119900
4
Algorithm 2determines the skyline119874119896th that consists of (119909 119910)
pairs such that 119909 = len(120572 119902) and 119910 = dist(119902 119900119896th) hold for
each query point 119902 isin 120572120573The variable count keeps the numberof qualifying objects processed thus far which is initializedto 0 (line (1)) If count is less than 119896 then the skyline for119900119896th is determined by 119874
119896th = (119909 119910) | 119909 = len(120572 119902) 119910 =max(dist(119902 120579
119896th) dist(119902 119900)) for 119902 isin 120572120573 where 120579119896th keeps the119896th NN determined thus far (lines (4)-(5)) Otherwise (ie119888119900119906119899119905 ge 119896) the skyline for 119900
119896th is determined by 119874119896th =
(119909 119910) | 119909 = len(120572 119902) 119910 = min(dist(119902 120579119896th) dist(119902 119900))
for 119902 isin 120572120573 (lines (6)-(7)) Naturally count increases by 1whenever an object o is processed (line (8))
Figure 11 illustrates the partitioning of a segment larr99788899788899788811989911198993
into three safe segments using dist(119902 119900) for each object 119900 isin1198741198991
119896cup 119874
1198993
119896cup 119874(
larr99788899788899788811989911198993) Figure 11(a) shows the plot of dist(119902 119900)
for each object 119900 isin 1199001 119900
2 119900
3 119900
4 Note that to simplify the
presentation the interval in which dist(119902 119900) = infin holds isnot represented When a query point 119902 moves in a segmentlarr99788899788899788811989911198993 its 119896th NN 119900
119896th is determined using Algorithm 2 andis represented by the bold lines in Figure 11(b) Specificallyfor 119902 isin larr997888997888997888119899
11199003 the 119896th NN 119900
119896th is 1199001and thus the kNN set is
1199001 119900
2 Similarly for 119902 isin 997888997888997888rarr119899
31199003 the 119896th NN 119900
119896th is 1199002and
thus the kNN set is 1199002 119900
3 Finally for 119902 = 119899
3 the 119896th NN
119900119896th is 119900
3and thus the 119896NN set is 119900
3 119900
4 Consequently a
segmentlarr99788899788899788811989911198993is divided into three safe segments represented
by Ω(larr99788899788899788811989911198993) = ⟨
larr99788899788899788811989911199003 119900
1 119900
2⟩ ⟨997888997888997888rarr11989931199003 119900
2 119900
3⟩ ⟨119899
3 119900
3 119900
4⟩
Figures 12(a) 12(b) and 12(c) illustrate dist(119902 1199003)
dist(119902 1199004) and dist(119902 119900
5) respectively where 119902 refers to a
query point in a segment 11989921198993and 119900
3 119900
4 and 119900
5refer to
qualifying objects for the segment 11989921198993 Note that 119900
3isin 119874
1198993
119896
1199004isin 119874
1198992
119896cup 119874
1198993
119896cup 119874(119899
21198993) and 119900
5isin 119874
1198992
119896hold
Figure 13 illustrates the partitioning of a segment 11989921198993
into two safe segments using dist(119902 119900) for each object 119900 isin1198741198992
119896cup 119874
1198993
119896cup 119874(119899
21198993) Figure 13(a) shows the plot of dist(119902 119900)
for each object 119900 isin 1199003 119900
4 119900
5 When a query point 119902
moves in a segment 11989921198993 its 119896th NN 119900
119896th is represented bythe bold lines in Figure 13(b) where a point 119904 marked by afive-pointed star indicates the middle of the segment 119899
21198993
Specifically for 119902 isin 1198992119904 the 119896th NN 119900
119896th is 1199005and thus
the kNN set is 1199004 119900
5 Similarly for 119902 isin 119899
3119904 the 119896th NN
119900119896th is 119900
3and thus the kNN set is 119900
3 119900
4 Consequently
a segment 11989921198993is divided into two safe segments which
are represented as Ω(11989921198993) = ⟨119899
2119904 119900
4 119900
5⟩ ⟨119899
3119904 119900
3 119900
4⟩
Finally a segment larr99788899788899788811989931198994becomes a safe segment that is
10 Mobile Information Systems
Input k the number of requested NNs 119874120572
119896cup 119874
120573
119896cup 119874(120572120573) the set of qualifying objects for a segment 120572120573
Output 119874119896th the set of distances from q to its kth NN 119900
119896th (ie 119874119896th = (119909 119910) | 119909 = len(120572 119902) 119910 = dist(119902 119900119896th))
(1) 119888119900119906119899119905 larr 0 count keeps the number of objects processed thus far(2) 119874
119896th = (119909 119910) | 119909 = len(120572 119902) 119910 = 0 for 119902 isin 120572120573 119910 = dist(119902 119900119896th) is initialized to 0 for 119902 isin 120572120573
(3) for each object 119900 isin 119874120572
119896cup 119874
120573
119896cup 119874(120572120573) do qualifying objects are handled sequentially
(4) if 119888119900119906119899119905 lt 119896 then if the number of objects processed thus far is less than 119896(5) 119874
119896th = (119909 119910) | 119909 = len(120572 119902) 119910 = max(dist(119902 120579119896th) dist(119902 119900)) for 119902 isin 120572120573 120579
119896th is the 119896th NN thus far(6) else(7) 119874
119896th = (119909 119910) | 119909 = len(120572 119902) 119910 = min(dist(119902 120579119896th) dist(119902 119900)) for 119902 isin 120572120573
(8) 119888119900119906119899119905 larr 119888119900119906119899119905 + 1 count increases by 1 whenever an object 119900 is processed(9) return 119874
119896th
Algorithm 2 Determine skyline for kth NN (k 119874120572
119896cup 119874
120573
119896cup 119874(120572120573))
3 3
3 4
4
9
10
2
n1 n3o3
o1o2
o4
(a) Plot of dist(119902 119900) for119900 isin 119900
1 1199002 1199003 1199004
3 34
9
10
2
n1 n3o3
3 4
o1o2
o4
okth
(b) Ω(larr99788899788899788811989911198993) = ⟨
larr99788899788899788811989911199003
11990011199002⟩ ⟨997888997888997888rarr119899
31199003 119900
2 1199003⟩
⟨1198993 119900
3 1199004⟩
Figure 11 Partitioning of a segmentlarr99788899788899788811989911198993into three safe segments
9
4
5
n2 n3
o3
(a) dist(119902 1199003) =
len(119902 1198993) + 4
87
32
2 3n2 n3o4
o4
o4
(b) dist(119902 1199004) =
len(119902 1199004)
4
9
5n2 n3
o5
(c) dist(119902 1199005) =
len(119902 1198992) + 4
Figure 12 Plot of dist(119902 119900) where 119902 isin 11989921198993and 119900 isin 119900
3 119900
4 119900
5
Ω(larr99788899788899788811989931198994) = ⟨
larr99788899788899788811989931198994 119900
3 119900
4⟩ This is because 1198741198993
119896equals 1198741198994
119896
and 119874(larr99788899788899788811989931198994) is a subset of 1198741198993
119896 that is 1198741198993
119896= 119874
1198994
119896and
119874(larr99788899788899788811989931198994) sub 119874
1198993
119896
5 Monitoring Safe Segments inDynamic Spatial Networks
Figure 14 illustrates an example of changing the weight of anedge 997888997888997888rarr119899
11199001in a spatial network where it is assumed that 119896 = 2
is given For convenience we consider the query region 119876
4 4
2
2 3n2 n3o4
o5 o3
(a) Plot of dist(119902119900) for 119900 isin 119900
3 1199004
1199005
4
2
2 3
34
n2 n3o4 s
o5 o3
okth
(b) Ω(11989921198993) =
⟨1198992119904 119900
4 1199005⟩
⟨1198993119904 119900
3 1199004⟩
Figure 13 Partitioning of a segment 11989921198993into two safe segments
that consists of an edgelarr99788899788899788811989911198993 that is 119876 = larr997888997888997888119899
11198993 As shown
in Figure 14(b) when the weight of an edge 997888997888997888rarr11989911199001has been
updated from 3 to 5 at time 119905119895 this update may invalidate
the safe segments in the query region 119876 Therefore it isnecessary to monitor the validity of safe segments in a queryregion when the change occurs To this end we introduce aninfluential region to monitor the validity of safe segmentsThe influential region Ψ
119902for a query point 119902 is defined as a
set of points 119901 such that dist(119902 119901) le dist(119902 119900119896th) holds If the
weight of an edge changes inside influential region Ψ119902 the
kNN query at query point 119902 should be reevaluated to reflectthe change in the weight However if the weight of an edgechanges outside influential regionΨ
119902 the change can be safely
ignored Suppose that a query region 119876 is represented by aset 119876119904 of 119897 connected segments and a set 119876119887 of 119898 boundarypoints that is 119876119904
= 1199041 1199042 119904
119897 and 119876119887
= 1198871 1198872 119887
119898
Then the influential region Ψ119876for query region 119876 becomes
the union of the influential region for each query point 119902 isin 119876that isΨ
119876= ⋃
119902isin119876Ψ119902This can be represented simply asΨ
119876=
119876cup(⋃119898
119894=1Ψ119887119894) whereΨ
119887119894refers to the influential region at each
boundary point 119887119894of the query region119876 SpecificallyΨ
119887119894is the
set of points 119901 such that dist(119887119894 119901) le dist(119887
119894 119900
119887119894
119896th) holds Here119900119887119894
119896th is the farthest answer object from boundary point 119887119894 that
Mobile Information Systems 11
3 4
4 63
3
3
2
4
1
3
2
2
2
n1
n2n3
n6n5
n4
o5
o1
o4
o3
o2
(a) Query region119876 = larr99788899788899788811989911198993 at time 119905
119894
3
3
32
4
5 2
3
46
1
2
2
4
n1
n2n3
n6n5
n4
o5
o1
o4
o3
o2
(b) Updating the weight of 997888997888997888rarr11989911199001at time 119905
119895
Figure 14 Changing the weight of an edge in a dynamic spatial network where 119905119894lt 119905
119895
46
3
3
3
2
4
1
1
1
1
3
2
2
2 2 2
n1
n2n3
n6n5
n4
o5
o1
o4
o3
o2
1205951
1205952 1205953
(a) Influence region Ψ119876at time 119905
119894
41 1 3 4
4
3
5 2
2
2
2
2
2
21
2
1
1
n1
n2n3
n6n5
n4
o5
o1
o4
o3
o2
1205951
1205953
1205955
1205952
1205954
(b) Updated influence region Ψ119876at time 119905
119895
Figure 15 Updating the influence region for 119876
is for each answer object 119900 isin 119874119887119894
119896 dist(119887
119894 119900) le dist(119887
119894 119900
119887119894
119896th)holds
Figure 15(a) illustrates the influential region for the queryregion 119876 at time 119905
119894 where the dotted line and square
brackets mark the influential region and its boundary pointsrespectively A set of the two NNs at boundary point 119899
1is
1198741198991
119896= 119900
1 119900
2 and the 119896th NN of 119899
1is 1199001198991
119896th = 1199001 Thus thedistance from 119899
1to its 119896th NN 119900
1is dist(119899
1 119900
1) = 3 and thus
the influential region Ψ1198991
for a boundary point 1198991becomes
Ψ1198991= 997888997888997888rarr11989911199001997888997888997888997888997888rarr119899111990021198994 Similarly the influential regionΨ
1198993for a
boundary point 1198993evaluates Ψ
1198993= 997888997888997888rarr11989931199003 119899
311990041205951 119899
31198995 119899
51205952
11989951205953 because 1198741198993
119896= 119900
3 119900
4 1199001198993
119896th = 1199003 and dist(1198993 119900
3) = 4
are given Consequently the influential region Ψ119876for query
region119876 becomesΨ119876=larr99788899788899788811989911198993cupΨ
1198991cupΨ
1198993= larr99788899788899788811989911198993997888997888997888997888997888rarr119899111990021198994997888997888997888rarr11989931199003
119899311990041205951 119899
31198995 119899
51205952 119899
51205953 As shown in Figure 15(b) updating
the weight of edge 997888997888997888rarr11989911199001from 3 to 5 may affect the safe
segments for the query region119876This is because updated edge997888997888997888rarr11989911199001overlaps the influential region Ψ
119876for query region 119876
In this case the server reevaluates the qualifying objects forquery region 119876 and provides updated qualifying objects sothat the user can update safe segments If the safe segmentsare updated the influential region should be also updatedaccordinglyThus the influential region for query region119876 isupdated at time 119905
119895 as shown in Figure 15(b) Finally updates
to the weights of the edges for examplelarr99788899788899788811989921199001 119899
21199005larr997888997888997888119899
31198994 and
11989941198996 that do not overlap the influential region can be safely
ignoredAlgorithm 3 monitors the validity of safe segments in a
query region when the weight of edges changes over timeAssume that the weight of edge 119899
119894119899119895is updated Subsequently
the server checks if edge 119899119894119899119895overlaps the influential region
Ψ119876for query region 119876 If the edge with the updated weight
does not overlap the influential region the update is safelyignored (lines (1)-(2)) Otherwise (ie Ψ
119876cap 119899
119894119899119895= 0) the
server requests that query object 119902 updates the query region(line (4)) Consequently 119902 submits a kRNNquery for updatedquery region119876updThe server then evaluates the kRNNqueryfor 119876upd and returns the kRNN query result Σ
119876updto 119902 (line
(5)) The query object then determines safe segments usingΣ119876upd
(line (6)) Finally the server updates the influentialregion accordingly (line (7))
6 Performance Evaluation
We describe our experimental settings in Section 61 andpresent the results of our experiments using real-life roadmaps in Section 62
61 Experimental Settings In the experiments we use tworeal-life roadmaps obtained from [27] to explore the impact
12 Mobile Information Systems
Input Ψ119876 influential region 119899
119894119899119895 updated edge
Output none(1) if Ψ
119876cap 119899
119894119899119895= 0 then an update to edge 119899
119894119899119895that does not overlap Ψ
119876is ignored
(2) ignore the update in the weight of edge 119899119894119899119895
(3) else this means that Ψ119876cap 119899
119894119899119895= 0
(4) 119876upd larr Update query region () server requests that 119902 update the query region(5) Σ
119876updlarr Evaluate 119896RNN query (119876upd 119896) server evaluates 119896RNN query for an updated query region
(6) Ω119876upd
larr Update safe segments (Σ119876upd
119896) 119902 determines safe segments inside the updated query region(7) Ψ
119876updlarr Update influential region (119876upd 119896) server updates influential region accordingly
Algorithm 3 Monitor safe segments (Ψ119876 119899
119894119899119895)
Table 4 Experimental parameter settings
Parameter RangeNumber of requested NNs (119896) 2 4 8 16 32Ratio of directed edge sequences to total edge sequences (119877dir) 0 5 10 20 50 ()Ratio of updated edge sequences to total edge sequences per timestamp (119877upd) 0 03 05 07 1 ()Size of query region (119876sz) 1 2 4 8 16
Number of data points (119873data)1 3 5 7 10 (times104) for NA1 3 5 7 10 (times103) for SJ
Speed of query points (119881qry)20 40 60 80 100 (kmh) for NA20 40 60 80 100 (kmh) for SJ
Distribution of data points (119863data) UniformDistribution of query points (119863qry) UniformNumber of query points (119873qry) 1000Road map NA SJ
of the edge sequence length on the performance of MORANThe first road map comprising 175813 nodes and 179179edges includes major roads in North America (NA) andcorresponds approximately to a data universe of 25times107 km2The second road map comprising 18263 nodes and 23874edges includes major roads in San Joaquin County (SJ)California and corresponds approximately to a data universeof 36 times 103 km2 For the first road map NA the numberof edge sequences and their average length are 12416 and29052m respectively For the second road map SJ thenumber of edge sequences and their average length are 20040and 248m respectively Table 4 summarizes the parametersused in the experiments In each experiment we vary a singleparameter in the range shown and set the other parameters tothe default values marked in boldWe simulate moving querypoints using a network-based moving objects generator [28]The number of query objects is set to 1000The size of a queryregion is determined by the number of edge sequences thatconstitute the query region The directed and updated edgesequences are selected randomly irrespective of the locationsof the data and query objects The length of an updated edgesequence is selected randomly to be between 01 and 10 timesthe original length For example if 119877upd is set to 05 and thenumber of edge sequences is 12416 then 62 edge sequences
are selected randomly every timestamp and their weights areupdated
As a benchmark against MORAN we use kRNN-E [5]without information of the precomputed shortest distancesbased on a shared execution paradigm to remove the redun-dant search overhead We choose kRNN-E instead of kRNN-F [5] with information of all the precomputed shortestdistances although kRNN-F typically outperforms kRNN-E The reason for this is that the precomputed distancesamong nodes are frequently invalidated by the updates tothe weights of the edges which makes it difficult to maintainthe precomputed distances To make kRNN-F applicable toour problem scenarios we can consider applying hierarchicaland goal-directed speed-up techniques [29] for DijkstrarsquosalgorithmThis approach can help to reduce the computationtime only at the server side and thus would not affect ourexperimental results Recall that the query processing at theserver is orthogonal to this study and that MORAN focuseson reducing the computation frequency and time taken atthe client side to evaluateMkRNN queries Our experimentalresults provide the average values per timestamp while 1000query points run for 600 timestamps Note that for roadmapNA the speed of the query points is 100 kmh by defaultwhereas for road map SJ the speed is 60 kmh by default
Mobile Information Systems 13
All algorithms are implemented in C++ and executed on adesktop PC with a 34GHz processor and 16GB of memory
62 Experimental Results Figure 16 shows a comparison ofthe query processing times at the client side of MORANand kRNN-E for evaluating MkRNN queries in road mapNA where each chart illustrates the effect of varying asingle parameter in Table 4 The values in the parenthesesindicate the computation frequency per timestamp Clearlythe computation frequency of kRNN-E equals the numberof query points and thus is omitted It should be noted thatthe server evaluates the MkRNN queries whenever the querypoints exit their query regions and thus the query processingtimes at the server side are the same forMORAN and kRNN-E Therefore we focus on comparing the query processingtimes at the client side
Figure 16(a) shows the query processing time as a func-tion of the number of requested NNs that is k Clearly thequery processing time at the client side increaseswith k How-ever the query processing time of MORAN is significantlyshorter than that of kRNN-E for all cases The reason for thisis that kRNN-E evaluates kNNquerieswhenever query pointsmove Conversely MORAN determines safe segments whenquery points enter new edge sequences or when the queryresults provided by the server become invalidated because ofupdated traffic conditions
Figure 16(b) shows the query processing time as a func-tion of the ratio of directed edge sequences to the totalnumber of edge sequences that is 119877dir Clearly 119877dir = 0refers to an undirected spatial networkThe query processingtimes at the client side of both methods are insensitive to thevalue of119877dirThe query processing time ofMORAN is shorterthan that of kRNN-E regardless of the value of 119877dir
Figure 16(c) shows the query processing time as a func-tion of the ratio of updated edge sequences to the totalnumber of edge sequences per timestamp that is 119877upd Here119877upd = 0 refers to a static spatial network The length of anupdated edge sequence is selected randomly frombetween 01and 10 times the original length Clearly the query processingtime of kRNN-E is almost constant regardless of the valueof 119877upd because query points in kRNN-E issue kNN queriesat each timestamp However the query processing time ofMORAN increases linearly with 119877upd because the probabilitythat the influential region of a query region overlaps anyupdated edge sequence increases with 119877upd Therefore alarger value of 119877upd leads to a longer query processing time
Figure 16(d) shows the query processing time as a func-tion of the size of the query region that is 119876sz Clearly thequery processing time increases with119876sz However the queryprocessing time of MORAN is clearly shorter than that ofkRNN-E regardless of the value of 119876sz
Figure 16(e) shows the query processing time as a func-tion of the number of data points that is 119873data In generalas 119873data increases the search space decreases and thus thequery processing time at the server side decreases accord-ingly However the query processing time at the client sideincreases with119873dataThis is because the number of qualifyingdata points handled at the client side increases with 119873data
Although the query processing time of MORAN increasesmore rapidly with 119873data than that of kRNN-E the queryprocessing time of MORAN is still shorter than that ofkRNN-E for 10 k le 119873data le 70 k However for119873data = 100 kthe query processing time of MORAN is 129 times longerthan that of kRNN-E
Figure 16(f) shows the query processing time as a func-tion of the speed of the query points that is 119881qry The queryprocessing time ofMORAN ismore sensitive to119881qry than thatof kRNN-E However the query processing time of MORANis clearly shorter than that of kRNN-E for all cases
Figure 17 shows a comparison of the query processingtimes at the client side of MORAN and kRNN-E for eval-uating MkRNN queries in road map SJ As when road mapNA is used when road map SJ is used the query processingtime of MORAN is clearly shorter than that of kRNN-E Asshown in Figure 17(a) the query processing time increaseswith k for the same reason as discussed earlier in the case ofFigure 16(a) As shown in Figure 17(b) the query processingtimes are not sensitive to the value of 119877dir As shown inFigure 17(c) the query processing time of kRNN-E remainsstable regardless of the value of 119877upd Conversely the queryprocessing time of MORAN increases with 119877upd because alarger value of 119877upd affects the influential regions of morequery points As shown in Figure 17(d) the query processingtime increases with 119876sz because the number of qualifyingdata points handled at the client side also increases with119876sz As shown in Figure 17(e) as 119873data increases the queryprocessing times decrease This is closely related to the sizeof the influential regions Specifically as 119873data increasesthe influential region decreases and thus updating weightsof edge sequences affects the influential regions of morequery points As shown in Figure 17(f) the query processingtime of MORAN increases with 119881qry for the same reason asdiscussed earlier in the case of Figure 16(f) whereas the queryprocessing time of kRNN-E remains stable regardless of thevalue of 119881qry
7 Conclusion
We proposed a new algorithm called MORAN for pro-cessing MkRNN queries in directed and dynamic spatialnetworks Existing studies focus on reducing redundant com-putation costs at the server side while processing snapshotkRNN queries in undirected and static spatial networksHowever MORAN clearly decreases the computation timeand frequency at the client side by dividing the query regioninto safe segments while processing MkRNN queries indirected and dynamic spatial networksThe influential regionfor a query region is introduced to monitor the impact of theupdated traffic conditions on the safe segments The resultsof experiments using real-life road maps demonstrate thatMORAN clearly outperforms kRNN-E for various workloadsin terms of the computation time and frequency We plan toextend our approach to processing sophisticated queries suchas kNN joins and top-k spatial preference queries in directedand dynamic spatial networks
14 Mobile Information Systems
k
(67)
2
MORAN
4 8 16 32
(73)
(83) (106)
(137)
0
10
20
30
40
CPU
tim
e at c
lient
side
(ms)
kRNN-E
(a) Effect of 119896
0 5 10 20 50
(90) (83) (83) (83) (81)
MORAN
0
5
10
15
20
CPU
tim
e at c
lient
side
(ms)
Rdir ()
kRNN-E
(b) Effect of 119877dir
00 03 05 07 10
(1)
(72) (83)
(157) (158)
MORAN
0
5
10
15
20
CPU
tim
e at c
lient
side
(ms)
Rupd ()
kRNN-E
(c) Effect of 119877upd
1 2 4 8 16
(66) (68) (83) (98)
(144)
MORAN
0
8
16
24
32CP
U ti
me a
t clie
nt si
de (m
s)
Qsz
kRNN-E
(d) Effect of119876sz
(163) (99)
(83) (80)
(79)
MORAN
0
8
16
24
32
CPU
tim
e at c
lient
side
(ms)
10 30 50 70 100
kRNN-E
Ndata (k)
(e) Effect of119873data
20 40 60 80 100
(95) (74) (81) (70) (83)
MORANkRNN-E
0
8
16
24
32
CPU
tim
e at c
lient
side
(ms)
Vqry (kmh)
(f) Effect of 119881qry
Figure 16 Comparison of CPU time at the client side for road map NA
Mobile Information Systems 15
(157) (209)(280)
(383)
(536)
k
2
MORAN
4 8 16 320
8
16
24
32
CPU
tim
e at c
lient
side
(ms)
kRNN-E
(a) Effect of 119896
(366) (286) (280) (272) (243)
MORAN
0 5 10 20 500
5
10
15
20
CPU
tim
e at c
lient
side
(ms)
Rdir ()
kRNN-E
(b) Effect of 119877dir
(26)(230) (280) (391) (429)
MORAN
00 03 05 07 10Rupd ()
0
5
10
15
20
CPU
tim
e at c
lient
side
(ms)
kRNN-E
(c) Effect of 119877upd
(277) (276) (280)(307)
(371)
MORAN
1 2 4 8 160
8
16
24
32CP
U ti
me a
t clie
nt si
de (m
s)
Qsz
kRNN-E
(d) Effect of119876sz
(612)
(359) (280) (232) (211)
MORAN
0
8
16
24
32
CPU
tim
e at c
lient
side
(ms)
1 3 5 7 10
kRNN-E
Ndata (k)
(e) Effect of119873data
(248) (265) (280) (286) (328)
MORAN
20 40 60 80 1000
5
10
15
20
CPU
tim
e at c
lient
side
(ms)
Vqry (kmh)
kRNN-E
(f) Effect of 119881qry
Figure 17 Comparison of CPU time at the client side for road map SJ
16 Mobile Information Systems
Notations and Their Definitions
119899119894119899119895 Edge connecting two adjacent nodes 119899
119894
and 119899119895
119899119904119899119904+1sdot sdot sdot 119899
119890 Edge sequence where 119899
119904(or 119899
119890) is the
start (or end) boundary node and theother nodes 119899
119904+1 119899
119890minus1 are
intermediate nodesdist(119901
1 119901
2) Length of the shortest path from point 119901
1
to point 1199012
len(1199011 119901
2) Length of the segment connecting two
points 1199011and 119901
2 such that 119901
1and 119901
2are
located in the same edge sequence119899119904119899119904+1sdot sdot sdot 119899
119890
119902 Query point119896 Number of requested NNs119874119901
119896 Set of kNNs at point 119901
120572120573 Segment that belongs to an edgesequence
119874(120572120573) Set of objects in segment 120572120573119900119896th The 119896th NN of query point 119902Ψ119902 Influence region for query point 119902
Ψ119876 Influence region for query region 119876
Conflict of Interests
The authors declare that there is no conflict of interestsregarding the publication of this paper
Acknowledgment
This research was supported by Kyungpook National Univer-sity Research Fund 2014
References
[1] U Demiryurek F Banaei-Kashani and C Shahabi ldquoEfficientcontinuous nearest neighbor query in spatial networks usingEuclidean restrictionrdquo in Advances in Spatial and TemporalDatabases 11th International Symposium SSTD 2009 AalborgDenmark July 8ndash10 2009 Proceedings vol 5644 of Lecture Notesin Computer Science pp 25ndash43 Springer Berlin Germany2009
[2] M R Kolahdouzan and C Shahabi ldquoAlternative solutionsfor continuous K nearest neighbor queries in spatial networkdatabasesrdquo GeoInformatica vol 9 no 4 pp 321ndash341 2005
[3] E W Dijkstra ldquoA note on two problems in connexion withgraphsrdquoNumerischeMathematik vol 1 no 1 pp 269ndash271 1959
[4] H Samet J Sankaranarayanan and H Alborzi ldquoScalablenetwork distance browsing in spatial databasesrdquo in Proceedingsof the SIGMOD International Conference on Management ofData (SIGMOD rsquo08) pp 43ndash54 Vancouver Canada June 2008
[5] J Bao C-Y ChowM FMokbel andW-S Ku ldquoEfficient evalu-ation of k-range nearest neighbor queries in road networksrdquo inProceedings of the 11th IEEE International Conference on MobileData Management (MDM rsquo10) pp 115ndash124 Kansas City MoUSA May 2010
[6] W-S Ku Y Chen and R Zimmermann ldquoPrivacy protectedspatial query processing for advanced location based servicesrdquo
Wireless Personal Communications vol 51 no 1 pp 53ndash652009
[7] K Mouratidis and M L Yiu ldquoAnonymous query processingin road networksrdquo IEEE Transactions on Knowledge and DataEngineering vol 22 no 1 pp 2ndash15 2010
[8] T Wang and L Liu ldquoPrivacy-aware mobile services over roadnetworksrdquo Proceedings of the VLDB Endowment vol 2 no 1pp 1042ndash1053 2009
[9] G Ghinita P Kalnis and S Skiadopoulos ldquoMobiHide amobilea peer-to-peer system for anonymous location-basedqueriesrdquo in Proceedings of the 10th International Symposium onSpatial and Temporal Databases (SSTD rsquo07) Boston MA USAJuly 2007 pp 221ndash238 Springer 2007
[10] S Ilarri E Mena and A Illarramendi ldquoLocation-dependentquery processing where we are and where we are headingrdquoACM Computing Surveys vol 42 no 3 article 12 2010
[11] H Al-Khalidi D Taniar J Betts and S Alamri ldquoDynamicsafe regions for moving range queries in mobile navigationrdquoInternational Journal of Ad Hoc and Ubiquitous Computing vol16 no 4 pp 250ndash259 2014
[12] H Al-Khalidi D Taniar J Betts and S Alamri ldquoMonitoringmoving queries inside a safe regionrdquo The Scientific WorldJournal vol 2014 Article ID 630396 13 pages 2014
[13] H-J Cho S J Kwon and T-S Chung ldquoA safe exit algorithmfor continuous nearest neighbor monitoring in road networksrdquoMobile Information Systems vol 9 no 1 pp 37ndash53 2013
[14] H-J Cho K Ryu and T-S Chung ldquoAn efficient algorithm forcomputing safe exit points of moving range queries in directedroad networksrdquo Information Systems vol 41 pp 1ndash19 2014
[15] C Li Y Gu J Qi G Yu R Zhang andW Yi ldquoProcessing mov-ing kNN queries using influential neighbor setsrdquo Proceedings ofthe VLDB Endowment vol 8 no 2 pp 113ndash124 2014
[16] S Nutanong R Zhang E Tanin and L Kulik ldquoAnalysis andevaluation of V-kNN an efficient algorithm for moving kNNqueriesrdquo VLDB Journal vol 19 no 3 pp 307ndash332 2010
[17] D Yung M L Yiu and E Lo ldquoA safe-exit approach for efficientnetwork-based moving range queriesrdquo Data and KnowledgeEngineering vol 72 pp 126ndash147 2012
[18] Y Gao B Zheng G Chen C Chen and Q Li ldquoContinuousnearest-neighbor search in the presence of obstaclesrdquo ACMTransactions on Database Systems vol 36 no 2 article 9 2011
[19] Y Tao D Papadias and Q Shen ldquoContinuous nearest neighborsearchrdquo in Proceedings of the 28th International Conference onVery Large Data Bases (VLDB rsquo02) pp 287ndash298 Hong KongAugust 2002
[20] M Mokbel C Chow and W Aref ldquoThe new casper queryprocessing for location serviceswithout compromising privacyrdquoin Proceedings of the 32nd International Conference on VeryLarge Data Bases (VLDB rsquo06) pp 763ndash774 Seoul Republic ofKorea 2006
[21] P Kalnis G Ghinita K Mouratidis and D Papadias ldquoPre-venting location-based identity inference in anonymous spatialqueriesrdquo IEEE Transactions on Knowledge and Data Engineer-ing vol 19 no 12 pp 1719ndash1733 2007
[22] C Chow M Mokbel J Naps and S Nath ldquoApproximateevaluation of range nearest neighbor queries with qualityguaranteerdquo in Advances in Spatial and Temporal Databases 11thInternational Symposium SSTD 2009 Aalborg Denmark July 8ndash10 2009 Proceedings vol 5644 of Lecture Notes in ComputerScience pp 283ndash301 Springer Berlin Germany 2009
Mobile Information Systems 17
[23] J Xu X Tang H Hu and J Du ldquoPrivacy-conscious location-based queries in mobile environmentsrdquo IEEE Transactions onParallel and Distributed Systems vol 21 no 3 pp 313ndash326 2010
[24] A M Aly W G Aref and M Ouzzani ldquoSpatial queries withtwo kNN predicatesrdquo Proceedings of the VLDB Endowment vol5 no 11 pp 1100ndash1111 2012
[25] Y Gu G Yu and X Yu ldquoAn efficient method for k nearestneighbor searching in obstructed spatial databasesrdquo Journal ofInformation Science and Engineering vol 30 no 5 pp 1569ndash1583 2014
[26] K Mouratidis M L Yiu D Papadias and N MamoulisldquoContinuous nearest neighbormonitoring in road networksrdquo inProceedings of the 32nd International Conference on Very LargeData Bases (VLDB rsquo06) pp 43ndash54 Seoul Republic of KoreaSeptember 2006
[27] Real Datasets for Spatial Databases httpwwwcsfsuedusimlifeifeiSpatialDatasethtm
[28] T Brinkhoff ldquoA framework for generating network-based mov-ing objectsrdquo GeoInformatica vol 6 no 2 pp 153ndash180 2002
[29] R Bauer D Delling P Sanders D Schieferdecker D Schultesand D Wagner ldquoCombining hierarchical and goal-directedspeed-up techniques for dijkstrarsquos algorithmrdquo Journal of Exper-imental Algorithmics vol 15 article 23 2010
[30] M Kolahdouzan C Shahabi and M Kolahdouzan ldquoVoronoi-based k nearest neighbor search for spatial network databasesrdquoinProceedings of the 30th International Conference onVery LargeData Bases (VLDB rsquo04) vol 30 pp 840ndash851 2004
[31] D Papadias J Zhang N Mamoulis and Y Tao ldquoQueryprocessing in spatial network databasesrdquo in Proceedings of the29th International Conference on Very Large Data Bases (VLDBrsquo03) vol 29 pp 802ndash813 2003
Submit your manuscripts athttpwwwhindawicom
Computer Games Technology
International Journal of
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Distributed Sensor Networks
International Journal of
Advances in
FuzzySystems
Hindawi Publishing Corporationhttpwwwhindawicom
Volume 2014
International Journal of
ReconfigurableComputing
Hindawi Publishing Corporation httpwwwhindawicom Volume 2014
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Applied Computational Intelligence and Soft Computing
thinspAdvancesthinspinthinsp
Artificial Intelligence
HindawithinspPublishingthinspCorporationhttpwwwhindawicom Volumethinsp2014
Advances inSoftware EngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Electrical and Computer Engineering
Journal of
Journal of
Computer Networks and Communications
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Hindawi Publishing Corporation
httpwwwhindawicom Volume 2014
Advances in
Multimedia
International Journal of
Biomedical Imaging
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
ArtificialNeural Systems
Advances in
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
RoboticsJournal of
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Computational Intelligence and Neuroscience
Industrial EngineeringJournal of
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014
The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Human-ComputerInteraction
Advances in
Computer EngineeringAdvances in
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
4 Mobile Information Systems
16 2 4
2
3
4
3
n1 n2
n3 n4
n5 n6
o1o2
Figure 2 dist(1199001 119900
2) = 6 dist(119900
2 119900
1) = 9 and len(119900
1 119900
2) = 9
To simplify the presentation Notations and Their Def-initions summarizes the notations used in this paper Thedistance between two points in a directed spatial network 119866is not symmetric that is for two points 119901
1 119901
2isin 119866 there is
no guarantee that dist(1199011 119901
2) equals dist(119901
2 119901
1) Note that
if the algorithms for MORAN operate in the same mannerfor undirected and directed spatial segments an undirectedsegment is used for convenience to describe the algorithms
Figure 2 depicts the distances and segment lengthbetween two objects 119900
1and 119900
2in a directed spatial network
In this figure the shortest path from 1199001to 119900
2is 119900
1rarr
1198992rarr 119899
5rarr 119900
2and thus the distance from 119900
1to 119900
2is
dist(1199001 119900
2) = 6 Conversely the shortest path from 119900
2to 119900
1
is 1199002rarr 119899
4rarr 119899
3rarr 119900
1and thus the distance from 119900
2to
1199001is dist(119900
2 119900
1) = 9 This proves that the network distance
is not symmetric in a directed spatial network The segmentconnecting 119900
1and 119900
2in the same edge sequence larr997888997888997888997888997888997888997888119899
2119899311989941198995
becomes 1199001rarr 119899
3rarr 119899
4rarr 119900
2and thus its length is
len(1199001 119900
2) = 9 Recall that len(119901
1 119901
2) is defined if and only
if the two points 1199011and 119901
2 are located in the same edge
sequence
32 Problem Formulation Figure 3 shows an example of anM119896RNN query in a directed and dynamic spatial networkHere data objects 119900
1through 119900
5are represented by the
rectangles and a query region 119876 is represented by a set ofbold line segments that is 119876 =
larr99788899788899788811989911198993 119899
21198993larr99788899788899788811989931198994 The
boundary point of a query region indicates the point wherethe query region and nonquery region meet In this examplequery region119876 has four boundary points 119899
1through 119899
4 The
number next to an edge indicates the distance between thetwo adjacent objects Suppose that a query object 119902 in queryregion 119876 requests two NNs from the server while hiding itslocation from the server Then the kRNN query result for119876 should include the two closest data objects to each pointin query region 119876 The query result can be represented bya set of ⟨119878 119877⟩ tuples where 119878 is a safe segment in 119876 and119877 is the query result for the safe segment 119878 As shown inFigure 3(a) query region 119876 can be partitioned into four safesegments that is Ω
1= ⟨larr99788899788899788811989911199003 119900
1 119900
2⟩ Ω
2= ⟨997888997888997888rarr11989931199003 119900
2 119900
3⟩
Ω3= ⟨119899
2119904 119900
4 119900
5⟩ andΩ
4= ⟨119899
3119904cuplarr99788899788899788811989931198994 119900
3 119900
4⟩ Clearly if
query object 119902 is located in a safe segmentlarr99788899788899788811989911199003(ie 119902 isin larr997888997888997888119899
11199003)
then the kNN set of 119902 is 1199001 119900
2 Similarly if 119902 isin 997888997888997888rarr119899
31199003 then
the kNN set of 119902 is 1199002 119900
3 if 119902 isin 119899
2119904 then the kNN set for
119902 is 1199004 119900
5 and if 119902 isin 119899
3119904 cuplarr99788899788899788811989931198994 then the kNN set of 119902 is
1199003 119900
4 As shown in Figure 3(b) if the weight of an edge997888997888997888rarr119899
11199001
represented by the bold dotted line is updated from 3 to 5 at
time 119905119895 this update may affect the safe segments computed at
time 119905119894 which leads to nullifying the kNN set of 119902 isin 119876
The query region 119876 consists of a set 119876119904 of 119897 segments anda set 119876119887 of 119898 boundary points that is 119876119904
= 1199041 1199042 119904
119897
and 119876119887
= 1198871 1198872 119887
119898 Clearly a query object 119902 is located
inside query region 119876 while hiding its exact location fromthe server to ensure location privacy Note that we use theterms ldquoquery object 119902rdquo and ldquoquery point 119902rdquo interchangeablyfor convenience of discussion Clearly for a query point 119902 isin119876 119874119902
119896sube (⋃
119898
119894=1119874119887119894
119896) cap (⋃
119897
119895=1119874(119904
119895)) holds where 119874119887119894
119896refers to
a set of 119896NNs at a boundary point 119887119894isin 119876
119887 and 119874(119904119895) refers to
a set of objects inside a segment 119904119895isin 119876
119904 It should be notedthat processing kRNN queries at the server is orthogonal tothis studyTherefore any kRNN query processing algorithms(eg [5 6]) can be used to evaluate the kRNN queries atthe server The server evaluates a kRNN query for a queryregion 119876 and then provides a set of candidate data objects toquery object 119902 Finally 119902 determines safe segments using a setof candidate data objects for the query region 119876 Recall thatgiven a safe segment 119878 for two points 119902
1 119902
2isin 119878 1198741199021
119896is equal
to 1198741199022
119896
Figure 4 illustrates three scenarios that can arise when aquery object 119902 issues kRNN queries As shown in Figure 4(a)at time 119905
119894 a query object 119902 submits a kRNN query for a
query region 119876119894to the server On receiving the query the
server evaluates the kRNN query and returns the queryresult to 119902 isin 119876
119894 Clearly 119902 determines safe segments inside
query region 119876119894using the kRNN query result As shown in
Figure 4(b) when 119902 leaves the query region 119876119894at time 119905
119895 it
submits a kRNN query for an updated query region 119876119895to
the server Then the server evaluates the kRNN query andreturns the query result to 119902 isin 119876
119895 Clearly 119902 determines safe
segments inside query region 119876119895 As shown in Figure 4(c)
while 119902 is inside 119876119895at time 119905
119896 a query region 119876
119895overlaps a
traffic congestion area119879 marked by a gray rectangle inwhichthe weight of the edges changes The server realizes that thetraffic congestion area 119879 invalidates the kRNN query resultfor 119876
119895and thus requests that 119902 updates the query region
Consequently 119902 submits a kRNN query for an updated queryregion 119876
119896to the server which evaluates the kRNN query
and returns the query result to 119902 isin 119876119896 Clearly 119902 determines
the safe segments inside query region 119876119896 In Section 5 we
elaborate on a method to verify that an updated trafficcondition invalidates current kRNN query results
4 Processing MkRNN Queries inDirected Spatial Networks
In Section 41 we give an overview of MORAN InSection 42 we present an algorithm for determiningsafe segments in a query region Finally in Section 43 wediscuss the construction of the safe segments of an MkRNNquery for the example of directed spatial network
41 Overview As stated before we focus on query processingat the client side while processing MkRNN queries in adirected and dynamic spatial network If either of the two
Mobile Information Systems 5
3 2
2
4
1
2
3
3
3 6
4
4
3
2
3 2
2
4
1
2
3
3
25 6
4
4
3
2
s
n1n1
n2n2 n3n3n4n4
n5n5n6n6
o1o1
o5
o4
o3
o2
o3
o4
o5
o2
Ω1
Ω2
Ω3 Ω4
Ω3 = ⟨n2s o4 o5⟩
Ω1 = ⟨larr997888997888997888n1o3 o1 o2⟩
Ω2 = ⟨997888997888997888rarrn3o3 o2 o3⟩
Ω4 = ⟨ n3s cuplarr997888997888997888n3n4 o3 o4⟩
(a) MkRNN query with 119896 = 2 and its safe segments at time 119905119894
5 2
2
4
1
2
3
3
3 6
4
4
3
2
n1
n2 n3n4
n6n5
o1
o5
o4
o3
o2
(b) Updated traffic conditions at time 119905119895
Figure 3 Example of MkRNN query in a spatial network where 119896 = 2 and 119905119894lt 119905
119895
Qi
q
(1) q submits kRNN query for a query region Qi
(2) Server returns a set of candidate objects to qisin Qi
LBS server
(a) 119902 submits a 119896RNN query for a query region119876119894to the server at time 119905
119894 where 119902 isin 119876
119894
q
Qj
(1) q submits kRNN query for a query region Qj
(2) Server returns a set of candidate objects to qisin Qj
LBS server
(b) 119902 submits a 119896RNN query for an updated query region119876119895to the server when 119902 leaves119876
119894at 119905
119895
q
Qj
T(1) Server requests thatq updates the query region
(2)q submits kRNN query for an updated query region Qk
LBS server
(c) Server requests that 119902 updates the query region when a set of candidate objects is invalidated at 119905119896
Figure 4 Three scenarios for processing MkRNN queries
events in Figure 5 occurs the server should evaluate thekRNN query and provide query object 119902 with an updatedkRNN query result The first event is 119902 leaving the cur-rent query region For example as shown in Figure 5(a)if 119902 moves to 1199021015840 outside of 119876 a kRNN query should bereevaluated with the updated query regionThe second event
is invalidation of the current kRNN query result providedto query object 119902 because of an updated traffic conditionFor example as shown in Figure 5(b) if query region 119876overlaps traffic congestion area 119879 the kRNN query shouldbe reevaluated to reflect the updated traffic condition Whenthe query object receives an updated kRNNquery result from
6 Mobile Information Systems
Q
qq998400
(a) 119902 leaves query region119876
Q
q
T
(b) Congestion area 119879 nullifies 119896RNN query resultfor119876
Figure 5 Two events that trigger the evaluation of MkRNN queries
Input Q query region k the number of requested NNsOutputΩ the set of safe segments in 119876(1)Ω larr 0 Ω is initialized to an empty set(2) for each segment 120572120573 isin 119876 do(3) 119874
120572
119896larr evaluate kNN query at point (120572 k) a kNN query is evaluated at a boundary point 120572
(4) 119874120573
119896larr evaluate kNN query at point (120573 k) a kNN query is evaluated at a boundary point 120573
(5) 119874(120572120573) larr evaluate range query (120572120573) a range query is evaluated for a segment 120572120573(6) Ω(120572120573) larr find safe segments (119874120572
119896 119874120573
119896 119874(120572120573)) the function is detailed in Section 42
(7) Ω larr Ω cup Ω(120572120573)
(8) return Ω the set of safe segments is provided to the query issuer
Algorithm 1 MORAN (Q k)
the server it should reevaluate safe segments inside the queryregion Using safe segments reduces the computation timeand frequency because the query object does not have toevaluate kNN queries while inside the safe segments
Algorithm 1 outlines the process of determining the safesegments in a query region 119876 in a directed spatial networkThe algorithm starts by initializing Ω to an empty set whichstores the safe segments found thus far Each segment 120572120573in query region 119876 is explored sequentially to find the safesegments in segment120572120573 For this purposeMORANevaluatestwo kNN queries issued at boundary points 120572 and 120573 ofsegment 120572120573 The query results are stored to 119874120572
119896and 119874120573
119896
respectively The objects in 120572120573 are explored and stored to119874(120572120573) The function find safe segments is called with 119874120572
119896
119874120573
119896 and 119874(120572120573) in order to find safe segments in segment
120572120573 The found safe segments are added to the result set ΩWhen all the segments in 119876 have been examined a set Ωof safe segments in query region 119876 is returned to the queryissuer It should be noted that if updates in the weight of edgesfrequently occur in a spatial network it is better to determinethe safe segments in the current segment including the querypoint rather than all the safe segments in the query regionWe employ a shared execution approach [5] which is widely
used to avoidmultiple visits to the samenodes and edgesThisclearly reduces the query processing time while determiningsafe segments in a query region
42 Partitioning Query Region into Safe Segments We con-sider an undirected segment 120572120573 followed by a directedsegment
997888rarr120572120573 We present a method for finding safe segments
in segment 120572120573 by using119874120572
119896119874120573
119896 and119874(120572120573) Here119874120572
119896and119874120573
119896
refer to sets of 119896NNs at boundary points 120572 and 120573 respectivelyand 119874(120572120573) refers to a set of objects inside segment 120572120573 Anobject 119900 that belongs to the union of 119874120572
119896 119874120573
119896 and 119874(120572120573) that
is 119900 isin 119874120572
119896cup 119874
120573
119896cup 119874(120572120573) is referred to as a qualifying object
Clearly the set 119874119902
119896of 119896NNs at a query point 119902 isin 120572120573 is a
subset of the union of 119874120572
119896 119874120573
119896 and 119874(120572120573) [5 13 26] that is
119874119902
119896sube (119874
120572
119896cup119874
120573
119896cup119874(120572120573)) If119874120572
119896equals119874120573
119896and119874(120572120573) is a subset
of119874120572
119896 segment 120572120573 becomes a safe segment Otherwise it has
two or more safe segmentsWe first explore the change in a network distance
dist(119902 119900) for a qualifying object 119900 isin 119874120572
119896cup 119874
120573
119896cup 119874(120572120573)
when a query point 119902 is located in an undirected segment120572120573 [13 14] Figure 6 shows the change in dist(119902 119900) for three
Mobile Information Systems 7
Table 2 Computation of dist(119902 119900) where 119902 isin 120572120573 and 119900 isin 119874120572
119896cup 119874
120573
119896cup 119874(120572120573)
Condition dist(119902 119900)
119900 isin 119874120572
119896minus (119874
120573
119896cup 119874(120572120573)) dist (119902 119900) = len (119902 120572) + dist (120572 119900)
119900 isin 119874120573
119896minus (119874
120572
119896cup 119874(120572120573)) dist (119902 119900) = len (119902 120573) + dist (120573 119900)
119900 isin 119874(120572120573) minus (119874120572
119896cup 119874
120573
119896) dist (119902 119900) = len (119902 119900)
119900 isin 119874120572
119896cap 119874
120573
119896minus 119874(120572120573) dist (119902 119900) = min (len (119902 120572) + dist (120572 119900) len (119902 120573) + dist (120573 119900))
119900 isin 119874120572
119896cap 119874(120572120573) minus 119874
120573
119896dist (119902 119900) = min (len (119902 120572) + dist (120572 119900) len (119902 119900))
119900 isin 119874120573
119896cap 119874(120572120573) minus 119874
120572
119896dist (119902 119900) = min (len (119902 120573) + dist (120573 119900) len (119902 119900))
119900 isin 119874120572
119896cap 119874
120573
119896cap 119874(120572120573) dist (119902 119900) = min (len (119902 120572) + dist (120572 119900) len (119902 120573) + dist (120573 119900) len (119902 119900))
120572
o
q 120573
dist(120572 o)
dist(120572 o) + len(120572 120573)
(a) If 119900 isin 119874120572
119896 then dist(119902 119900) = len(119902 120572) +
dist(120572 119900)
120572
o
120573
len(120572 120573) + dist(120573 o)
dist(120573 o)
(b) If 119900 isin 119874
120573
119896
then dist(119902 119900) = len(119902 120573) +dist(120573 119900)
o120572 q 120573
len(120572 o)
len(o 120573)
(c) If 119900 isin 119874(120572120573) thendist(119902 119900) = len(119902 119900)
Figure 6 Evaluation of dist(119902 119900) where 119902 isin 120572120573 and 119900 isin 119874120572
119896cup 119874
120573
119896cup 119874(120572120573)
cases 119900 isin 119874120572
119896 119900 isin 119874120573
119896 and 119900 isin 119874(120572120573) In this figure the
119910-axis represents dist(119902 119900) and the 119909-axis represents len(120572 119902)for 0 le len(120572 119902) le len(120572 120573) If 119900 isin 119874120572
119896 then dist(119902 119900) =
len(119902 120572) + dist(120572 119900) as shown in Figure 6(a) Similarly if119900 isin 119874
120573
119896 then dist(119902 119900) = len(119902 120573) + dist(120573 119900) as shown in
Figure 6(b) Finally if 119900 isin 119874(120572120573) then dist(119902 119900) = len(119902 119900)as shown in Figure 6(c)
Table 2 summarizes the evaluation of dist(119902 119900) for 119902 isin 120572120573and 119900 isin 119874120572
119896cup 119874
120573
119896cup 119874(120572120573) where MIN returns the minimum
of the values in the input array Because a qualifying object 119900belongs to a combination of119874120572
119896119874120573
119896 or119874(120572120573) a total of seven
possible cases are considered Note that dist(120572 119900) dist(120573 119900)len(120572 119900) and len(120573 119900) are given constants and dist(119902 119900) is thelength of the shortest path among multiple paths from 119902 and119900
Figure 7 shows an example of the change in dist(119902 119900)depending on the location of query point 119902 isin 119899
2119899511989961198993 For
simplicity we assume that the number of NNs requested atquery point 119902 is 119896 = 1 Then as shown in Figure 7(a) 1198741198992
119896
1198741198993
119896 and 119874(119899
2119899511989961198993) are evaluated as 1198741198992
119896= 119900 1198741198993
119896= 119900
and119874(1198992119899511989961198993) = 119900 respectively As shown in Figure 7(b)
the distance from 119902 to 119900 represented by the bold lines isdist(119902 119900) = len(119902 119900) if 119902 isin 119899
211989951198996 otherwise it is dist(119902 119900) =
len(119902 1198993) + 3 because dist(119899
2 119900) = 1 dist(119899
3 119900) = 3 and
len(1198992 119900) = 1 are given
Next we explore the change in network distance dist(119902 119900)for object 119900 isin 119874120572
119896cup 119874
120573
119896cup 119874(
997888rarr120572120573) when a query point 119902 is
located in a directed segment997888rarr120572120573 Figure 8 shows the change
in dist(119902 119900) for three cases 119900 isin 119874120572
119896 119900 isin 119874120573
119896 and 119900 isin 119874(
997888rarr120572120573)
1
2
1 2
1 16 5
n1 n4n2 n3
n5
n6o
q
(a) q isin n2n5n6n3
9
7
5
3
112 2
n2 n3n5 n6
o
o
o
(b) dist(q o) = len(q o) if q isin n2n5n6
len(q n3) + 3 otherwise
Figure 7 Computation of ist(119902 119900) where 119902 isin 1198992119899511989961198993and 119900 isin
1198741198992
119896cap 119874
1198993
119896cap 119874(119899
2119899511989961198993)
Note that the dotted lines indicate that no paths exist from119902 to 119900 for the corresponding intervals which are denoted bydist(119902 119900) = infin For object 119900 isin 119874120572
119896 as shown in Figure 8(a)
8 Mobile Information Systems
asympasymp
dist(120572 o) o
120572 q 120573
infin
(a) If o isin O120572k then dist(q o) = dist(120572 o) if q = 120572
infin otherwise
o
120572 q 120573
len(120572 120573)+dist(120573 o)
dist(120573 o)
(b) If o isin O120573
k then dist(q o) = len(q 120573) + dist(120573 o)
asympasymp
120572 qo 120573
len(120572 o)
infin
(997888rarr120572120573
997888rarr120572(c) If o isin O then dist(q o) =len(q o) if q isin o
infin otherwise)
Figure 8 Evaluation of dist(119902 119900) where 119902 isin997888rarr120572120573 and 119900 isin 119874120572
119896cup 119874
120573
119896cup
119874(997888rarr120572120573)
if 119902 = 120572 then dist(119902 119900) = dist(120572 119900) otherwise (ie 119902 isin997888rarr120572120573minus120572) dist(119902 119900) = infin Similarly if 119900 isin 119874120573
119896 then dist(119902 119900) =
len(119902 120573) + dist(120573 119900) as shown in Figure 8(b) Finally forobject 119900 isin 119874(
997888rarr120572120573) as shown in Figure 8(c) if 119902 isin 997888rarr120572119900 then
dist(119902 119900) = len(119902 119900) otherwise (ie 119902 isinlarr997888120573119900) dist(119902 119900) = infin
Here dist(119902 119900) is the length of the shortest path from 119902 and119900 where query point 119902 isin
997888rarr120572120573 and is thus determined using
Table 2 in the same way as 119902 isin 120572120573Figure 9 shows an example of the change in dist(119902 119900)
depending on the location of query point 119902 isin 997888997888997888997888997888rarr119899211989951198993 For
simplicity we assume that the number of NNs requested atquery point 119902 is 119896 = 1 Then as shown in Figure 9(a) 1198741198992
119896
1198741198993
119896 and 119874(997888997888997888997888997888rarr119899
211989951198993) are evaluated as 1198741198992
119896= 119900 1198741198993
119896= 119900
and 119874(997888997888997888997888997888rarr119899211989951198993) = 119900 respectively As shown in Figure 9(b)
the distance from 119902 to 119900 represented by the bold lines isdist(119902 119900) = len(119902 119900) if 119902 isin 997888997888rarr119899
2119900 otherwise it is dist(119902 119900) =
len(119902 1198993) + 3 because dist(119899
2 119900) = 1 dist(119899
3 119900) = 3 and
len(1198992 119900) = 1 are given
1
2
3
1
16 5
n1 n4n2 n3
n5
o
q
(a) q isin 997888997888997888997888997888rarrn2n5n3
21
3
3
9
n2 n3n5o
o
o
asympasymp
infin
997888997888rarrn2o(b) dist(q o) =len(q o) if q isinlen(q n3) + 3 otherwise
Figure 9 Computation of dist(119902 119900) where 119902 isin 997888997888997888997888997888rarr119899211989951198993and 119900 isin 1198741198992
119896cap
1198741198993
119896cap 119874(
997888997888997888997888997888rarr119899211989951198993)
43 Partitioning Example Query Region into Safe SegmentsWe now discuss the construction of safe segments for queryregion 119876 in Figure 3(a) Recall that the number of requestedNNs is 119896 = 2 and the query region includes three segmentsthat is 119876 = larr997888997888997888119899
11198993 119899
21198993larr99788899788899788811989931198994 Table 3 summarizes the com-
putation of the safe segments in query region 119876 Clearly thekNN set at a node 119899
3is evaluated only once and it is reused
multiple timesAs shown in Algorithm 1 MORAN determines the safe
segments for each segment in query region 119876 Therefore weshow the successive determination of the safe segments inlarr99788899788899788811989911198993 119899
21198993 and larr997888997888997888119899
31198994 It is clear that adjacent safe segments
with the same query result can be merged Recall that we candraw dist(119902 119900) by using a query point 119902 isin 120572120573 and an object119900 isin 119874
120572
119896cup 119874
120573
119896cup 119874(120572120573)
Figure 10 depicts dist(119902 119900) using a query point 119902 isin larr99788899788899788811989911198993
and each object 119900 isin 1198741198991
119896cup 119874
1198993
119896cup 119874(
larr99788899788899788811989911198993) Here the union
of 1198741198991
119896 1198741198993
119896 and 119874(larr997888997888997888119899
11198993) becomes 1198741198991
119896cup 119874
1198993
119896cup 119874(
larr99788899788899788811989911198993) =
1199001 119900
2 119900
3 119900
4 because 1198741198991
119896= 119900
1 119900
2 1198741198993
119896= 119900
3 119900
4 and
119874(larr99788899788899788811989911198993) = 119900
3 are given Figures 10(a) 10(b) 10(c) and 10(d)
illustrate dist(119902 1199001) dist(119902 119900
2) dist(119902 119900
3) and dist(119902 119900
4)
respectively Recall that 1199001isin 119874
1198991
119896 119900
2isin 119874
1198991
119896 119900
3isin 119874
1198993
119896cup
119874(larr99788899788899788811989911198993) and 119900
4isin 119874
1198993
119896hold
To partition a segment 120572120573 into safe segments it isessential to identify the 119896th NN 119900
119896th at a query point 119902 isin120572120573 among the qualifying objects 119900 isin 119874
120572
119896cup 119874
120573
119896cup 119874(120572120573)
Mobile Information Systems 9
Table 3 Computation of safe segments for the example query region
120572120573 120572 120573 119874120572
119896119874120573
119896119874(120572120573) Ω(120572120573)
larr99788899788899788811989911198993
1198991
1198993
1199001 119900
2 119900
3 119900
4 119900
3 ⟨
larr99788899788899788811989911199003 119900
1 119900
2⟩ ⟨
997888997888997888rarr11989931199003 119900
2 119900
3⟩ ⟨119899
3 119900
3 119900
4⟩
11989921198993
1198992
1198993
1199004 119900
5 119900
3 119900
4 119900
4 ⟨119899
2119904 119900
4 119900
5⟩ ⟨119899
3119904 119900
3 119900
4⟩
larr99788899788899788811989931198994
1198993
1198994
1199003 119900
4 119900
3 119900
4 0 ⟨
larr99788899788899788811989931198994 119900
3 119900
4⟩
10
3
7
n1 n3
o1
(a) dist(q o1) = len(q n1) + 3
7
2
9
n1 n3
o2
(b) dist(q o2) = len(q n1) + 2
4
43
n1 n3
o3
o3
asympasymp
infin
997888997888997888rarrn3o3(c) dist(q o3) =len(q o3) if q isininfin otherwise
7
3
n1 n3
o4
asymp asymp
infin
q = n3infin otherwise(d) dist(q o4) =3 if
Figure 10 Plot of ist(119902 119900) where 119902 isin larr99788899788899788811989911198993and 119900 isin 119900
1 119900
2 119900
3 119900
4
Algorithm 2determines the skyline119874119896th that consists of (119909 119910)
pairs such that 119909 = len(120572 119902) and 119910 = dist(119902 119900119896th) hold for
each query point 119902 isin 120572120573The variable count keeps the numberof qualifying objects processed thus far which is initializedto 0 (line (1)) If count is less than 119896 then the skyline for119900119896th is determined by 119874
119896th = (119909 119910) | 119909 = len(120572 119902) 119910 =max(dist(119902 120579
119896th) dist(119902 119900)) for 119902 isin 120572120573 where 120579119896th keeps the119896th NN determined thus far (lines (4)-(5)) Otherwise (ie119888119900119906119899119905 ge 119896) the skyline for 119900
119896th is determined by 119874119896th =
(119909 119910) | 119909 = len(120572 119902) 119910 = min(dist(119902 120579119896th) dist(119902 119900))
for 119902 isin 120572120573 (lines (6)-(7)) Naturally count increases by 1whenever an object o is processed (line (8))
Figure 11 illustrates the partitioning of a segment larr99788899788899788811989911198993
into three safe segments using dist(119902 119900) for each object 119900 isin1198741198991
119896cup 119874
1198993
119896cup 119874(
larr99788899788899788811989911198993) Figure 11(a) shows the plot of dist(119902 119900)
for each object 119900 isin 1199001 119900
2 119900
3 119900
4 Note that to simplify the
presentation the interval in which dist(119902 119900) = infin holds isnot represented When a query point 119902 moves in a segmentlarr99788899788899788811989911198993 its 119896th NN 119900
119896th is determined using Algorithm 2 andis represented by the bold lines in Figure 11(b) Specificallyfor 119902 isin larr997888997888997888119899
11199003 the 119896th NN 119900
119896th is 1199001and thus the kNN set is
1199001 119900
2 Similarly for 119902 isin 997888997888997888rarr119899
31199003 the 119896th NN 119900
119896th is 1199002and
thus the kNN set is 1199002 119900
3 Finally for 119902 = 119899
3 the 119896th NN
119900119896th is 119900
3and thus the 119896NN set is 119900
3 119900
4 Consequently a
segmentlarr99788899788899788811989911198993is divided into three safe segments represented
by Ω(larr99788899788899788811989911198993) = ⟨
larr99788899788899788811989911199003 119900
1 119900
2⟩ ⟨997888997888997888rarr11989931199003 119900
2 119900
3⟩ ⟨119899
3 119900
3 119900
4⟩
Figures 12(a) 12(b) and 12(c) illustrate dist(119902 1199003)
dist(119902 1199004) and dist(119902 119900
5) respectively where 119902 refers to a
query point in a segment 11989921198993and 119900
3 119900
4 and 119900
5refer to
qualifying objects for the segment 11989921198993 Note that 119900
3isin 119874
1198993
119896
1199004isin 119874
1198992
119896cup 119874
1198993
119896cup 119874(119899
21198993) and 119900
5isin 119874
1198992
119896hold
Figure 13 illustrates the partitioning of a segment 11989921198993
into two safe segments using dist(119902 119900) for each object 119900 isin1198741198992
119896cup 119874
1198993
119896cup 119874(119899
21198993) Figure 13(a) shows the plot of dist(119902 119900)
for each object 119900 isin 1199003 119900
4 119900
5 When a query point 119902
moves in a segment 11989921198993 its 119896th NN 119900
119896th is represented bythe bold lines in Figure 13(b) where a point 119904 marked by afive-pointed star indicates the middle of the segment 119899
21198993
Specifically for 119902 isin 1198992119904 the 119896th NN 119900
119896th is 1199005and thus
the kNN set is 1199004 119900
5 Similarly for 119902 isin 119899
3119904 the 119896th NN
119900119896th is 119900
3and thus the kNN set is 119900
3 119900
4 Consequently
a segment 11989921198993is divided into two safe segments which
are represented as Ω(11989921198993) = ⟨119899
2119904 119900
4 119900
5⟩ ⟨119899
3119904 119900
3 119900
4⟩
Finally a segment larr99788899788899788811989931198994becomes a safe segment that is
10 Mobile Information Systems
Input k the number of requested NNs 119874120572
119896cup 119874
120573
119896cup 119874(120572120573) the set of qualifying objects for a segment 120572120573
Output 119874119896th the set of distances from q to its kth NN 119900
119896th (ie 119874119896th = (119909 119910) | 119909 = len(120572 119902) 119910 = dist(119902 119900119896th))
(1) 119888119900119906119899119905 larr 0 count keeps the number of objects processed thus far(2) 119874
119896th = (119909 119910) | 119909 = len(120572 119902) 119910 = 0 for 119902 isin 120572120573 119910 = dist(119902 119900119896th) is initialized to 0 for 119902 isin 120572120573
(3) for each object 119900 isin 119874120572
119896cup 119874
120573
119896cup 119874(120572120573) do qualifying objects are handled sequentially
(4) if 119888119900119906119899119905 lt 119896 then if the number of objects processed thus far is less than 119896(5) 119874
119896th = (119909 119910) | 119909 = len(120572 119902) 119910 = max(dist(119902 120579119896th) dist(119902 119900)) for 119902 isin 120572120573 120579
119896th is the 119896th NN thus far(6) else(7) 119874
119896th = (119909 119910) | 119909 = len(120572 119902) 119910 = min(dist(119902 120579119896th) dist(119902 119900)) for 119902 isin 120572120573
(8) 119888119900119906119899119905 larr 119888119900119906119899119905 + 1 count increases by 1 whenever an object 119900 is processed(9) return 119874
119896th
Algorithm 2 Determine skyline for kth NN (k 119874120572
119896cup 119874
120573
119896cup 119874(120572120573))
3 3
3 4
4
9
10
2
n1 n3o3
o1o2
o4
(a) Plot of dist(119902 119900) for119900 isin 119900
1 1199002 1199003 1199004
3 34
9
10
2
n1 n3o3
3 4
o1o2
o4
okth
(b) Ω(larr99788899788899788811989911198993) = ⟨
larr99788899788899788811989911199003
11990011199002⟩ ⟨997888997888997888rarr119899
31199003 119900
2 1199003⟩
⟨1198993 119900
3 1199004⟩
Figure 11 Partitioning of a segmentlarr99788899788899788811989911198993into three safe segments
9
4
5
n2 n3
o3
(a) dist(119902 1199003) =
len(119902 1198993) + 4
87
32
2 3n2 n3o4
o4
o4
(b) dist(119902 1199004) =
len(119902 1199004)
4
9
5n2 n3
o5
(c) dist(119902 1199005) =
len(119902 1198992) + 4
Figure 12 Plot of dist(119902 119900) where 119902 isin 11989921198993and 119900 isin 119900
3 119900
4 119900
5
Ω(larr99788899788899788811989931198994) = ⟨
larr99788899788899788811989931198994 119900
3 119900
4⟩ This is because 1198741198993
119896equals 1198741198994
119896
and 119874(larr99788899788899788811989931198994) is a subset of 1198741198993
119896 that is 1198741198993
119896= 119874
1198994
119896and
119874(larr99788899788899788811989931198994) sub 119874
1198993
119896
5 Monitoring Safe Segments inDynamic Spatial Networks
Figure 14 illustrates an example of changing the weight of anedge 997888997888997888rarr119899
11199001in a spatial network where it is assumed that 119896 = 2
is given For convenience we consider the query region 119876
4 4
2
2 3n2 n3o4
o5 o3
(a) Plot of dist(119902119900) for 119900 isin 119900
3 1199004
1199005
4
2
2 3
34
n2 n3o4 s
o5 o3
okth
(b) Ω(11989921198993) =
⟨1198992119904 119900
4 1199005⟩
⟨1198993119904 119900
3 1199004⟩
Figure 13 Partitioning of a segment 11989921198993into two safe segments
that consists of an edgelarr99788899788899788811989911198993 that is 119876 = larr997888997888997888119899
11198993 As shown
in Figure 14(b) when the weight of an edge 997888997888997888rarr11989911199001has been
updated from 3 to 5 at time 119905119895 this update may invalidate
the safe segments in the query region 119876 Therefore it isnecessary to monitor the validity of safe segments in a queryregion when the change occurs To this end we introduce aninfluential region to monitor the validity of safe segmentsThe influential region Ψ
119902for a query point 119902 is defined as a
set of points 119901 such that dist(119902 119901) le dist(119902 119900119896th) holds If the
weight of an edge changes inside influential region Ψ119902 the
kNN query at query point 119902 should be reevaluated to reflectthe change in the weight However if the weight of an edgechanges outside influential regionΨ
119902 the change can be safely
ignored Suppose that a query region 119876 is represented by aset 119876119904 of 119897 connected segments and a set 119876119887 of 119898 boundarypoints that is 119876119904
= 1199041 1199042 119904
119897 and 119876119887
= 1198871 1198872 119887
119898
Then the influential region Ψ119876for query region 119876 becomes
the union of the influential region for each query point 119902 isin 119876that isΨ
119876= ⋃
119902isin119876Ψ119902This can be represented simply asΨ
119876=
119876cup(⋃119898
119894=1Ψ119887119894) whereΨ
119887119894refers to the influential region at each
boundary point 119887119894of the query region119876 SpecificallyΨ
119887119894is the
set of points 119901 such that dist(119887119894 119901) le dist(119887
119894 119900
119887119894
119896th) holds Here119900119887119894
119896th is the farthest answer object from boundary point 119887119894 that
Mobile Information Systems 11
3 4
4 63
3
3
2
4
1
3
2
2
2
n1
n2n3
n6n5
n4
o5
o1
o4
o3
o2
(a) Query region119876 = larr99788899788899788811989911198993 at time 119905
119894
3
3
32
4
5 2
3
46
1
2
2
4
n1
n2n3
n6n5
n4
o5
o1
o4
o3
o2
(b) Updating the weight of 997888997888997888rarr11989911199001at time 119905
119895
Figure 14 Changing the weight of an edge in a dynamic spatial network where 119905119894lt 119905
119895
46
3
3
3
2
4
1
1
1
1
3
2
2
2 2 2
n1
n2n3
n6n5
n4
o5
o1
o4
o3
o2
1205951
1205952 1205953
(a) Influence region Ψ119876at time 119905
119894
41 1 3 4
4
3
5 2
2
2
2
2
2
21
2
1
1
n1
n2n3
n6n5
n4
o5
o1
o4
o3
o2
1205951
1205953
1205955
1205952
1205954
(b) Updated influence region Ψ119876at time 119905
119895
Figure 15 Updating the influence region for 119876
is for each answer object 119900 isin 119874119887119894
119896 dist(119887
119894 119900) le dist(119887
119894 119900
119887119894
119896th)holds
Figure 15(a) illustrates the influential region for the queryregion 119876 at time 119905
119894 where the dotted line and square
brackets mark the influential region and its boundary pointsrespectively A set of the two NNs at boundary point 119899
1is
1198741198991
119896= 119900
1 119900
2 and the 119896th NN of 119899
1is 1199001198991
119896th = 1199001 Thus thedistance from 119899
1to its 119896th NN 119900
1is dist(119899
1 119900
1) = 3 and thus
the influential region Ψ1198991
for a boundary point 1198991becomes
Ψ1198991= 997888997888997888rarr11989911199001997888997888997888997888997888rarr119899111990021198994 Similarly the influential regionΨ
1198993for a
boundary point 1198993evaluates Ψ
1198993= 997888997888997888rarr11989931199003 119899
311990041205951 119899
31198995 119899
51205952
11989951205953 because 1198741198993
119896= 119900
3 119900
4 1199001198993
119896th = 1199003 and dist(1198993 119900
3) = 4
are given Consequently the influential region Ψ119876for query
region119876 becomesΨ119876=larr99788899788899788811989911198993cupΨ
1198991cupΨ
1198993= larr99788899788899788811989911198993997888997888997888997888997888rarr119899111990021198994997888997888997888rarr11989931199003
119899311990041205951 119899
31198995 119899
51205952 119899
51205953 As shown in Figure 15(b) updating
the weight of edge 997888997888997888rarr11989911199001from 3 to 5 may affect the safe
segments for the query region119876This is because updated edge997888997888997888rarr11989911199001overlaps the influential region Ψ
119876for query region 119876
In this case the server reevaluates the qualifying objects forquery region 119876 and provides updated qualifying objects sothat the user can update safe segments If the safe segmentsare updated the influential region should be also updatedaccordinglyThus the influential region for query region119876 isupdated at time 119905
119895 as shown in Figure 15(b) Finally updates
to the weights of the edges for examplelarr99788899788899788811989921199001 119899
21199005larr997888997888997888119899
31198994 and
11989941198996 that do not overlap the influential region can be safely
ignoredAlgorithm 3 monitors the validity of safe segments in a
query region when the weight of edges changes over timeAssume that the weight of edge 119899
119894119899119895is updated Subsequently
the server checks if edge 119899119894119899119895overlaps the influential region
Ψ119876for query region 119876 If the edge with the updated weight
does not overlap the influential region the update is safelyignored (lines (1)-(2)) Otherwise (ie Ψ
119876cap 119899
119894119899119895= 0) the
server requests that query object 119902 updates the query region(line (4)) Consequently 119902 submits a kRNNquery for updatedquery region119876updThe server then evaluates the kRNNqueryfor 119876upd and returns the kRNN query result Σ
119876updto 119902 (line
(5)) The query object then determines safe segments usingΣ119876upd
(line (6)) Finally the server updates the influentialregion accordingly (line (7))
6 Performance Evaluation
We describe our experimental settings in Section 61 andpresent the results of our experiments using real-life roadmaps in Section 62
61 Experimental Settings In the experiments we use tworeal-life roadmaps obtained from [27] to explore the impact
12 Mobile Information Systems
Input Ψ119876 influential region 119899
119894119899119895 updated edge
Output none(1) if Ψ
119876cap 119899
119894119899119895= 0 then an update to edge 119899
119894119899119895that does not overlap Ψ
119876is ignored
(2) ignore the update in the weight of edge 119899119894119899119895
(3) else this means that Ψ119876cap 119899
119894119899119895= 0
(4) 119876upd larr Update query region () server requests that 119902 update the query region(5) Σ
119876updlarr Evaluate 119896RNN query (119876upd 119896) server evaluates 119896RNN query for an updated query region
(6) Ω119876upd
larr Update safe segments (Σ119876upd
119896) 119902 determines safe segments inside the updated query region(7) Ψ
119876updlarr Update influential region (119876upd 119896) server updates influential region accordingly
Algorithm 3 Monitor safe segments (Ψ119876 119899
119894119899119895)
Table 4 Experimental parameter settings
Parameter RangeNumber of requested NNs (119896) 2 4 8 16 32Ratio of directed edge sequences to total edge sequences (119877dir) 0 5 10 20 50 ()Ratio of updated edge sequences to total edge sequences per timestamp (119877upd) 0 03 05 07 1 ()Size of query region (119876sz) 1 2 4 8 16
Number of data points (119873data)1 3 5 7 10 (times104) for NA1 3 5 7 10 (times103) for SJ
Speed of query points (119881qry)20 40 60 80 100 (kmh) for NA20 40 60 80 100 (kmh) for SJ
Distribution of data points (119863data) UniformDistribution of query points (119863qry) UniformNumber of query points (119873qry) 1000Road map NA SJ
of the edge sequence length on the performance of MORANThe first road map comprising 175813 nodes and 179179edges includes major roads in North America (NA) andcorresponds approximately to a data universe of 25times107 km2The second road map comprising 18263 nodes and 23874edges includes major roads in San Joaquin County (SJ)California and corresponds approximately to a data universeof 36 times 103 km2 For the first road map NA the numberof edge sequences and their average length are 12416 and29052m respectively For the second road map SJ thenumber of edge sequences and their average length are 20040and 248m respectively Table 4 summarizes the parametersused in the experiments In each experiment we vary a singleparameter in the range shown and set the other parameters tothe default values marked in boldWe simulate moving querypoints using a network-based moving objects generator [28]The number of query objects is set to 1000The size of a queryregion is determined by the number of edge sequences thatconstitute the query region The directed and updated edgesequences are selected randomly irrespective of the locationsof the data and query objects The length of an updated edgesequence is selected randomly to be between 01 and 10 timesthe original length For example if 119877upd is set to 05 and thenumber of edge sequences is 12416 then 62 edge sequences
are selected randomly every timestamp and their weights areupdated
As a benchmark against MORAN we use kRNN-E [5]without information of the precomputed shortest distancesbased on a shared execution paradigm to remove the redun-dant search overhead We choose kRNN-E instead of kRNN-F [5] with information of all the precomputed shortestdistances although kRNN-F typically outperforms kRNN-E The reason for this is that the precomputed distancesamong nodes are frequently invalidated by the updates tothe weights of the edges which makes it difficult to maintainthe precomputed distances To make kRNN-F applicable toour problem scenarios we can consider applying hierarchicaland goal-directed speed-up techniques [29] for DijkstrarsquosalgorithmThis approach can help to reduce the computationtime only at the server side and thus would not affect ourexperimental results Recall that the query processing at theserver is orthogonal to this study and that MORAN focuseson reducing the computation frequency and time taken atthe client side to evaluateMkRNN queries Our experimentalresults provide the average values per timestamp while 1000query points run for 600 timestamps Note that for roadmapNA the speed of the query points is 100 kmh by defaultwhereas for road map SJ the speed is 60 kmh by default
Mobile Information Systems 13
All algorithms are implemented in C++ and executed on adesktop PC with a 34GHz processor and 16GB of memory
62 Experimental Results Figure 16 shows a comparison ofthe query processing times at the client side of MORANand kRNN-E for evaluating MkRNN queries in road mapNA where each chart illustrates the effect of varying asingle parameter in Table 4 The values in the parenthesesindicate the computation frequency per timestamp Clearlythe computation frequency of kRNN-E equals the numberof query points and thus is omitted It should be noted thatthe server evaluates the MkRNN queries whenever the querypoints exit their query regions and thus the query processingtimes at the server side are the same forMORAN and kRNN-E Therefore we focus on comparing the query processingtimes at the client side
Figure 16(a) shows the query processing time as a func-tion of the number of requested NNs that is k Clearly thequery processing time at the client side increaseswith k How-ever the query processing time of MORAN is significantlyshorter than that of kRNN-E for all cases The reason for thisis that kRNN-E evaluates kNNquerieswhenever query pointsmove Conversely MORAN determines safe segments whenquery points enter new edge sequences or when the queryresults provided by the server become invalidated because ofupdated traffic conditions
Figure 16(b) shows the query processing time as a func-tion of the ratio of directed edge sequences to the totalnumber of edge sequences that is 119877dir Clearly 119877dir = 0refers to an undirected spatial networkThe query processingtimes at the client side of both methods are insensitive to thevalue of119877dirThe query processing time ofMORAN is shorterthan that of kRNN-E regardless of the value of 119877dir
Figure 16(c) shows the query processing time as a func-tion of the ratio of updated edge sequences to the totalnumber of edge sequences per timestamp that is 119877upd Here119877upd = 0 refers to a static spatial network The length of anupdated edge sequence is selected randomly frombetween 01and 10 times the original length Clearly the query processingtime of kRNN-E is almost constant regardless of the valueof 119877upd because query points in kRNN-E issue kNN queriesat each timestamp However the query processing time ofMORAN increases linearly with 119877upd because the probabilitythat the influential region of a query region overlaps anyupdated edge sequence increases with 119877upd Therefore alarger value of 119877upd leads to a longer query processing time
Figure 16(d) shows the query processing time as a func-tion of the size of the query region that is 119876sz Clearly thequery processing time increases with119876sz However the queryprocessing time of MORAN is clearly shorter than that ofkRNN-E regardless of the value of 119876sz
Figure 16(e) shows the query processing time as a func-tion of the number of data points that is 119873data In generalas 119873data increases the search space decreases and thus thequery processing time at the server side decreases accord-ingly However the query processing time at the client sideincreases with119873dataThis is because the number of qualifyingdata points handled at the client side increases with 119873data
Although the query processing time of MORAN increasesmore rapidly with 119873data than that of kRNN-E the queryprocessing time of MORAN is still shorter than that ofkRNN-E for 10 k le 119873data le 70 k However for119873data = 100 kthe query processing time of MORAN is 129 times longerthan that of kRNN-E
Figure 16(f) shows the query processing time as a func-tion of the speed of the query points that is 119881qry The queryprocessing time ofMORAN ismore sensitive to119881qry than thatof kRNN-E However the query processing time of MORANis clearly shorter than that of kRNN-E for all cases
Figure 17 shows a comparison of the query processingtimes at the client side of MORAN and kRNN-E for eval-uating MkRNN queries in road map SJ As when road mapNA is used when road map SJ is used the query processingtime of MORAN is clearly shorter than that of kRNN-E Asshown in Figure 17(a) the query processing time increaseswith k for the same reason as discussed earlier in the case ofFigure 16(a) As shown in Figure 17(b) the query processingtimes are not sensitive to the value of 119877dir As shown inFigure 17(c) the query processing time of kRNN-E remainsstable regardless of the value of 119877upd Conversely the queryprocessing time of MORAN increases with 119877upd because alarger value of 119877upd affects the influential regions of morequery points As shown in Figure 17(d) the query processingtime increases with 119876sz because the number of qualifyingdata points handled at the client side also increases with119876sz As shown in Figure 17(e) as 119873data increases the queryprocessing times decrease This is closely related to the sizeof the influential regions Specifically as 119873data increasesthe influential region decreases and thus updating weightsof edge sequences affects the influential regions of morequery points As shown in Figure 17(f) the query processingtime of MORAN increases with 119881qry for the same reason asdiscussed earlier in the case of Figure 16(f) whereas the queryprocessing time of kRNN-E remains stable regardless of thevalue of 119881qry
7 Conclusion
We proposed a new algorithm called MORAN for pro-cessing MkRNN queries in directed and dynamic spatialnetworks Existing studies focus on reducing redundant com-putation costs at the server side while processing snapshotkRNN queries in undirected and static spatial networksHowever MORAN clearly decreases the computation timeand frequency at the client side by dividing the query regioninto safe segments while processing MkRNN queries indirected and dynamic spatial networksThe influential regionfor a query region is introduced to monitor the impact of theupdated traffic conditions on the safe segments The resultsof experiments using real-life road maps demonstrate thatMORAN clearly outperforms kRNN-E for various workloadsin terms of the computation time and frequency We plan toextend our approach to processing sophisticated queries suchas kNN joins and top-k spatial preference queries in directedand dynamic spatial networks
14 Mobile Information Systems
k
(67)
2
MORAN
4 8 16 32
(73)
(83) (106)
(137)
0
10
20
30
40
CPU
tim
e at c
lient
side
(ms)
kRNN-E
(a) Effect of 119896
0 5 10 20 50
(90) (83) (83) (83) (81)
MORAN
0
5
10
15
20
CPU
tim
e at c
lient
side
(ms)
Rdir ()
kRNN-E
(b) Effect of 119877dir
00 03 05 07 10
(1)
(72) (83)
(157) (158)
MORAN
0
5
10
15
20
CPU
tim
e at c
lient
side
(ms)
Rupd ()
kRNN-E
(c) Effect of 119877upd
1 2 4 8 16
(66) (68) (83) (98)
(144)
MORAN
0
8
16
24
32CP
U ti
me a
t clie
nt si
de (m
s)
Qsz
kRNN-E
(d) Effect of119876sz
(163) (99)
(83) (80)
(79)
MORAN
0
8
16
24
32
CPU
tim
e at c
lient
side
(ms)
10 30 50 70 100
kRNN-E
Ndata (k)
(e) Effect of119873data
20 40 60 80 100
(95) (74) (81) (70) (83)
MORANkRNN-E
0
8
16
24
32
CPU
tim
e at c
lient
side
(ms)
Vqry (kmh)
(f) Effect of 119881qry
Figure 16 Comparison of CPU time at the client side for road map NA
Mobile Information Systems 15
(157) (209)(280)
(383)
(536)
k
2
MORAN
4 8 16 320
8
16
24
32
CPU
tim
e at c
lient
side
(ms)
kRNN-E
(a) Effect of 119896
(366) (286) (280) (272) (243)
MORAN
0 5 10 20 500
5
10
15
20
CPU
tim
e at c
lient
side
(ms)
Rdir ()
kRNN-E
(b) Effect of 119877dir
(26)(230) (280) (391) (429)
MORAN
00 03 05 07 10Rupd ()
0
5
10
15
20
CPU
tim
e at c
lient
side
(ms)
kRNN-E
(c) Effect of 119877upd
(277) (276) (280)(307)
(371)
MORAN
1 2 4 8 160
8
16
24
32CP
U ti
me a
t clie
nt si
de (m
s)
Qsz
kRNN-E
(d) Effect of119876sz
(612)
(359) (280) (232) (211)
MORAN
0
8
16
24
32
CPU
tim
e at c
lient
side
(ms)
1 3 5 7 10
kRNN-E
Ndata (k)
(e) Effect of119873data
(248) (265) (280) (286) (328)
MORAN
20 40 60 80 1000
5
10
15
20
CPU
tim
e at c
lient
side
(ms)
Vqry (kmh)
kRNN-E
(f) Effect of 119881qry
Figure 17 Comparison of CPU time at the client side for road map SJ
16 Mobile Information Systems
Notations and Their Definitions
119899119894119899119895 Edge connecting two adjacent nodes 119899
119894
and 119899119895
119899119904119899119904+1sdot sdot sdot 119899
119890 Edge sequence where 119899
119904(or 119899
119890) is the
start (or end) boundary node and theother nodes 119899
119904+1 119899
119890minus1 are
intermediate nodesdist(119901
1 119901
2) Length of the shortest path from point 119901
1
to point 1199012
len(1199011 119901
2) Length of the segment connecting two
points 1199011and 119901
2 such that 119901
1and 119901
2are
located in the same edge sequence119899119904119899119904+1sdot sdot sdot 119899
119890
119902 Query point119896 Number of requested NNs119874119901
119896 Set of kNNs at point 119901
120572120573 Segment that belongs to an edgesequence
119874(120572120573) Set of objects in segment 120572120573119900119896th The 119896th NN of query point 119902Ψ119902 Influence region for query point 119902
Ψ119876 Influence region for query region 119876
Conflict of Interests
The authors declare that there is no conflict of interestsregarding the publication of this paper
Acknowledgment
This research was supported by Kyungpook National Univer-sity Research Fund 2014
References
[1] U Demiryurek F Banaei-Kashani and C Shahabi ldquoEfficientcontinuous nearest neighbor query in spatial networks usingEuclidean restrictionrdquo in Advances in Spatial and TemporalDatabases 11th International Symposium SSTD 2009 AalborgDenmark July 8ndash10 2009 Proceedings vol 5644 of Lecture Notesin Computer Science pp 25ndash43 Springer Berlin Germany2009
[2] M R Kolahdouzan and C Shahabi ldquoAlternative solutionsfor continuous K nearest neighbor queries in spatial networkdatabasesrdquo GeoInformatica vol 9 no 4 pp 321ndash341 2005
[3] E W Dijkstra ldquoA note on two problems in connexion withgraphsrdquoNumerischeMathematik vol 1 no 1 pp 269ndash271 1959
[4] H Samet J Sankaranarayanan and H Alborzi ldquoScalablenetwork distance browsing in spatial databasesrdquo in Proceedingsof the SIGMOD International Conference on Management ofData (SIGMOD rsquo08) pp 43ndash54 Vancouver Canada June 2008
[5] J Bao C-Y ChowM FMokbel andW-S Ku ldquoEfficient evalu-ation of k-range nearest neighbor queries in road networksrdquo inProceedings of the 11th IEEE International Conference on MobileData Management (MDM rsquo10) pp 115ndash124 Kansas City MoUSA May 2010
[6] W-S Ku Y Chen and R Zimmermann ldquoPrivacy protectedspatial query processing for advanced location based servicesrdquo
Wireless Personal Communications vol 51 no 1 pp 53ndash652009
[7] K Mouratidis and M L Yiu ldquoAnonymous query processingin road networksrdquo IEEE Transactions on Knowledge and DataEngineering vol 22 no 1 pp 2ndash15 2010
[8] T Wang and L Liu ldquoPrivacy-aware mobile services over roadnetworksrdquo Proceedings of the VLDB Endowment vol 2 no 1pp 1042ndash1053 2009
[9] G Ghinita P Kalnis and S Skiadopoulos ldquoMobiHide amobilea peer-to-peer system for anonymous location-basedqueriesrdquo in Proceedings of the 10th International Symposium onSpatial and Temporal Databases (SSTD rsquo07) Boston MA USAJuly 2007 pp 221ndash238 Springer 2007
[10] S Ilarri E Mena and A Illarramendi ldquoLocation-dependentquery processing where we are and where we are headingrdquoACM Computing Surveys vol 42 no 3 article 12 2010
[11] H Al-Khalidi D Taniar J Betts and S Alamri ldquoDynamicsafe regions for moving range queries in mobile navigationrdquoInternational Journal of Ad Hoc and Ubiquitous Computing vol16 no 4 pp 250ndash259 2014
[12] H Al-Khalidi D Taniar J Betts and S Alamri ldquoMonitoringmoving queries inside a safe regionrdquo The Scientific WorldJournal vol 2014 Article ID 630396 13 pages 2014
[13] H-J Cho S J Kwon and T-S Chung ldquoA safe exit algorithmfor continuous nearest neighbor monitoring in road networksrdquoMobile Information Systems vol 9 no 1 pp 37ndash53 2013
[14] H-J Cho K Ryu and T-S Chung ldquoAn efficient algorithm forcomputing safe exit points of moving range queries in directedroad networksrdquo Information Systems vol 41 pp 1ndash19 2014
[15] C Li Y Gu J Qi G Yu R Zhang andW Yi ldquoProcessing mov-ing kNN queries using influential neighbor setsrdquo Proceedings ofthe VLDB Endowment vol 8 no 2 pp 113ndash124 2014
[16] S Nutanong R Zhang E Tanin and L Kulik ldquoAnalysis andevaluation of V-kNN an efficient algorithm for moving kNNqueriesrdquo VLDB Journal vol 19 no 3 pp 307ndash332 2010
[17] D Yung M L Yiu and E Lo ldquoA safe-exit approach for efficientnetwork-based moving range queriesrdquo Data and KnowledgeEngineering vol 72 pp 126ndash147 2012
[18] Y Gao B Zheng G Chen C Chen and Q Li ldquoContinuousnearest-neighbor search in the presence of obstaclesrdquo ACMTransactions on Database Systems vol 36 no 2 article 9 2011
[19] Y Tao D Papadias and Q Shen ldquoContinuous nearest neighborsearchrdquo in Proceedings of the 28th International Conference onVery Large Data Bases (VLDB rsquo02) pp 287ndash298 Hong KongAugust 2002
[20] M Mokbel C Chow and W Aref ldquoThe new casper queryprocessing for location serviceswithout compromising privacyrdquoin Proceedings of the 32nd International Conference on VeryLarge Data Bases (VLDB rsquo06) pp 763ndash774 Seoul Republic ofKorea 2006
[21] P Kalnis G Ghinita K Mouratidis and D Papadias ldquoPre-venting location-based identity inference in anonymous spatialqueriesrdquo IEEE Transactions on Knowledge and Data Engineer-ing vol 19 no 12 pp 1719ndash1733 2007
[22] C Chow M Mokbel J Naps and S Nath ldquoApproximateevaluation of range nearest neighbor queries with qualityguaranteerdquo in Advances in Spatial and Temporal Databases 11thInternational Symposium SSTD 2009 Aalborg Denmark July 8ndash10 2009 Proceedings vol 5644 of Lecture Notes in ComputerScience pp 283ndash301 Springer Berlin Germany 2009
Mobile Information Systems 17
[23] J Xu X Tang H Hu and J Du ldquoPrivacy-conscious location-based queries in mobile environmentsrdquo IEEE Transactions onParallel and Distributed Systems vol 21 no 3 pp 313ndash326 2010
[24] A M Aly W G Aref and M Ouzzani ldquoSpatial queries withtwo kNN predicatesrdquo Proceedings of the VLDB Endowment vol5 no 11 pp 1100ndash1111 2012
[25] Y Gu G Yu and X Yu ldquoAn efficient method for k nearestneighbor searching in obstructed spatial databasesrdquo Journal ofInformation Science and Engineering vol 30 no 5 pp 1569ndash1583 2014
[26] K Mouratidis M L Yiu D Papadias and N MamoulisldquoContinuous nearest neighbormonitoring in road networksrdquo inProceedings of the 32nd International Conference on Very LargeData Bases (VLDB rsquo06) pp 43ndash54 Seoul Republic of KoreaSeptember 2006
[27] Real Datasets for Spatial Databases httpwwwcsfsuedusimlifeifeiSpatialDatasethtm
[28] T Brinkhoff ldquoA framework for generating network-based mov-ing objectsrdquo GeoInformatica vol 6 no 2 pp 153ndash180 2002
[29] R Bauer D Delling P Sanders D Schieferdecker D Schultesand D Wagner ldquoCombining hierarchical and goal-directedspeed-up techniques for dijkstrarsquos algorithmrdquo Journal of Exper-imental Algorithmics vol 15 article 23 2010
[30] M Kolahdouzan C Shahabi and M Kolahdouzan ldquoVoronoi-based k nearest neighbor search for spatial network databasesrdquoinProceedings of the 30th International Conference onVery LargeData Bases (VLDB rsquo04) vol 30 pp 840ndash851 2004
[31] D Papadias J Zhang N Mamoulis and Y Tao ldquoQueryprocessing in spatial network databasesrdquo in Proceedings of the29th International Conference on Very Large Data Bases (VLDBrsquo03) vol 29 pp 802ndash813 2003
Submit your manuscripts athttpwwwhindawicom
Computer Games Technology
International Journal of
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Distributed Sensor Networks
International Journal of
Advances in
FuzzySystems
Hindawi Publishing Corporationhttpwwwhindawicom
Volume 2014
International Journal of
ReconfigurableComputing
Hindawi Publishing Corporation httpwwwhindawicom Volume 2014
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Applied Computational Intelligence and Soft Computing
thinspAdvancesthinspinthinsp
Artificial Intelligence
HindawithinspPublishingthinspCorporationhttpwwwhindawicom Volumethinsp2014
Advances inSoftware EngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Electrical and Computer Engineering
Journal of
Journal of
Computer Networks and Communications
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Hindawi Publishing Corporation
httpwwwhindawicom Volume 2014
Advances in
Multimedia
International Journal of
Biomedical Imaging
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
ArtificialNeural Systems
Advances in
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
RoboticsJournal of
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Computational Intelligence and Neuroscience
Industrial EngineeringJournal of
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014
The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Human-ComputerInteraction
Advances in
Computer EngineeringAdvances in
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Mobile Information Systems 5
3 2
2
4
1
2
3
3
3 6
4
4
3
2
3 2
2
4
1
2
3
3
25 6
4
4
3
2
s
n1n1
n2n2 n3n3n4n4
n5n5n6n6
o1o1
o5
o4
o3
o2
o3
o4
o5
o2
Ω1
Ω2
Ω3 Ω4
Ω3 = ⟨n2s o4 o5⟩
Ω1 = ⟨larr997888997888997888n1o3 o1 o2⟩
Ω2 = ⟨997888997888997888rarrn3o3 o2 o3⟩
Ω4 = ⟨ n3s cuplarr997888997888997888n3n4 o3 o4⟩
(a) MkRNN query with 119896 = 2 and its safe segments at time 119905119894
5 2
2
4
1
2
3
3
3 6
4
4
3
2
n1
n2 n3n4
n6n5
o1
o5
o4
o3
o2
(b) Updated traffic conditions at time 119905119895
Figure 3 Example of MkRNN query in a spatial network where 119896 = 2 and 119905119894lt 119905
119895
Qi
q
(1) q submits kRNN query for a query region Qi
(2) Server returns a set of candidate objects to qisin Qi
LBS server
(a) 119902 submits a 119896RNN query for a query region119876119894to the server at time 119905
119894 where 119902 isin 119876
119894
q
Qj
(1) q submits kRNN query for a query region Qj
(2) Server returns a set of candidate objects to qisin Qj
LBS server
(b) 119902 submits a 119896RNN query for an updated query region119876119895to the server when 119902 leaves119876
119894at 119905
119895
q
Qj
T(1) Server requests thatq updates the query region
(2)q submits kRNN query for an updated query region Qk
LBS server
(c) Server requests that 119902 updates the query region when a set of candidate objects is invalidated at 119905119896
Figure 4 Three scenarios for processing MkRNN queries
events in Figure 5 occurs the server should evaluate thekRNN query and provide query object 119902 with an updatedkRNN query result The first event is 119902 leaving the cur-rent query region For example as shown in Figure 5(a)if 119902 moves to 1199021015840 outside of 119876 a kRNN query should bereevaluated with the updated query regionThe second event
is invalidation of the current kRNN query result providedto query object 119902 because of an updated traffic conditionFor example as shown in Figure 5(b) if query region 119876overlaps traffic congestion area 119879 the kRNN query shouldbe reevaluated to reflect the updated traffic condition Whenthe query object receives an updated kRNNquery result from
6 Mobile Information Systems
Q
qq998400
(a) 119902 leaves query region119876
Q
q
T
(b) Congestion area 119879 nullifies 119896RNN query resultfor119876
Figure 5 Two events that trigger the evaluation of MkRNN queries
Input Q query region k the number of requested NNsOutputΩ the set of safe segments in 119876(1)Ω larr 0 Ω is initialized to an empty set(2) for each segment 120572120573 isin 119876 do(3) 119874
120572
119896larr evaluate kNN query at point (120572 k) a kNN query is evaluated at a boundary point 120572
(4) 119874120573
119896larr evaluate kNN query at point (120573 k) a kNN query is evaluated at a boundary point 120573
(5) 119874(120572120573) larr evaluate range query (120572120573) a range query is evaluated for a segment 120572120573(6) Ω(120572120573) larr find safe segments (119874120572
119896 119874120573
119896 119874(120572120573)) the function is detailed in Section 42
(7) Ω larr Ω cup Ω(120572120573)
(8) return Ω the set of safe segments is provided to the query issuer
Algorithm 1 MORAN (Q k)
the server it should reevaluate safe segments inside the queryregion Using safe segments reduces the computation timeand frequency because the query object does not have toevaluate kNN queries while inside the safe segments
Algorithm 1 outlines the process of determining the safesegments in a query region 119876 in a directed spatial networkThe algorithm starts by initializing Ω to an empty set whichstores the safe segments found thus far Each segment 120572120573in query region 119876 is explored sequentially to find the safesegments in segment120572120573 For this purposeMORANevaluatestwo kNN queries issued at boundary points 120572 and 120573 ofsegment 120572120573 The query results are stored to 119874120572
119896and 119874120573
119896
respectively The objects in 120572120573 are explored and stored to119874(120572120573) The function find safe segments is called with 119874120572
119896
119874120573
119896 and 119874(120572120573) in order to find safe segments in segment
120572120573 The found safe segments are added to the result set ΩWhen all the segments in 119876 have been examined a set Ωof safe segments in query region 119876 is returned to the queryissuer It should be noted that if updates in the weight of edgesfrequently occur in a spatial network it is better to determinethe safe segments in the current segment including the querypoint rather than all the safe segments in the query regionWe employ a shared execution approach [5] which is widely
used to avoidmultiple visits to the samenodes and edgesThisclearly reduces the query processing time while determiningsafe segments in a query region
42 Partitioning Query Region into Safe Segments We con-sider an undirected segment 120572120573 followed by a directedsegment
997888rarr120572120573 We present a method for finding safe segments
in segment 120572120573 by using119874120572
119896119874120573
119896 and119874(120572120573) Here119874120572
119896and119874120573
119896
refer to sets of 119896NNs at boundary points 120572 and 120573 respectivelyand 119874(120572120573) refers to a set of objects inside segment 120572120573 Anobject 119900 that belongs to the union of 119874120572
119896 119874120573
119896 and 119874(120572120573) that
is 119900 isin 119874120572
119896cup 119874
120573
119896cup 119874(120572120573) is referred to as a qualifying object
Clearly the set 119874119902
119896of 119896NNs at a query point 119902 isin 120572120573 is a
subset of the union of 119874120572
119896 119874120573
119896 and 119874(120572120573) [5 13 26] that is
119874119902
119896sube (119874
120572
119896cup119874
120573
119896cup119874(120572120573)) If119874120572
119896equals119874120573
119896and119874(120572120573) is a subset
of119874120572
119896 segment 120572120573 becomes a safe segment Otherwise it has
two or more safe segmentsWe first explore the change in a network distance
dist(119902 119900) for a qualifying object 119900 isin 119874120572
119896cup 119874
120573
119896cup 119874(120572120573)
when a query point 119902 is located in an undirected segment120572120573 [13 14] Figure 6 shows the change in dist(119902 119900) for three
Mobile Information Systems 7
Table 2 Computation of dist(119902 119900) where 119902 isin 120572120573 and 119900 isin 119874120572
119896cup 119874
120573
119896cup 119874(120572120573)
Condition dist(119902 119900)
119900 isin 119874120572
119896minus (119874
120573
119896cup 119874(120572120573)) dist (119902 119900) = len (119902 120572) + dist (120572 119900)
119900 isin 119874120573
119896minus (119874
120572
119896cup 119874(120572120573)) dist (119902 119900) = len (119902 120573) + dist (120573 119900)
119900 isin 119874(120572120573) minus (119874120572
119896cup 119874
120573
119896) dist (119902 119900) = len (119902 119900)
119900 isin 119874120572
119896cap 119874
120573
119896minus 119874(120572120573) dist (119902 119900) = min (len (119902 120572) + dist (120572 119900) len (119902 120573) + dist (120573 119900))
119900 isin 119874120572
119896cap 119874(120572120573) minus 119874
120573
119896dist (119902 119900) = min (len (119902 120572) + dist (120572 119900) len (119902 119900))
119900 isin 119874120573
119896cap 119874(120572120573) minus 119874
120572
119896dist (119902 119900) = min (len (119902 120573) + dist (120573 119900) len (119902 119900))
119900 isin 119874120572
119896cap 119874
120573
119896cap 119874(120572120573) dist (119902 119900) = min (len (119902 120572) + dist (120572 119900) len (119902 120573) + dist (120573 119900) len (119902 119900))
120572
o
q 120573
dist(120572 o)
dist(120572 o) + len(120572 120573)
(a) If 119900 isin 119874120572
119896 then dist(119902 119900) = len(119902 120572) +
dist(120572 119900)
120572
o
120573
len(120572 120573) + dist(120573 o)
dist(120573 o)
(b) If 119900 isin 119874
120573
119896
then dist(119902 119900) = len(119902 120573) +dist(120573 119900)
o120572 q 120573
len(120572 o)
len(o 120573)
(c) If 119900 isin 119874(120572120573) thendist(119902 119900) = len(119902 119900)
Figure 6 Evaluation of dist(119902 119900) where 119902 isin 120572120573 and 119900 isin 119874120572
119896cup 119874
120573
119896cup 119874(120572120573)
cases 119900 isin 119874120572
119896 119900 isin 119874120573
119896 and 119900 isin 119874(120572120573) In this figure the
119910-axis represents dist(119902 119900) and the 119909-axis represents len(120572 119902)for 0 le len(120572 119902) le len(120572 120573) If 119900 isin 119874120572
119896 then dist(119902 119900) =
len(119902 120572) + dist(120572 119900) as shown in Figure 6(a) Similarly if119900 isin 119874
120573
119896 then dist(119902 119900) = len(119902 120573) + dist(120573 119900) as shown in
Figure 6(b) Finally if 119900 isin 119874(120572120573) then dist(119902 119900) = len(119902 119900)as shown in Figure 6(c)
Table 2 summarizes the evaluation of dist(119902 119900) for 119902 isin 120572120573and 119900 isin 119874120572
119896cup 119874
120573
119896cup 119874(120572120573) where MIN returns the minimum
of the values in the input array Because a qualifying object 119900belongs to a combination of119874120572
119896119874120573
119896 or119874(120572120573) a total of seven
possible cases are considered Note that dist(120572 119900) dist(120573 119900)len(120572 119900) and len(120573 119900) are given constants and dist(119902 119900) is thelength of the shortest path among multiple paths from 119902 and119900
Figure 7 shows an example of the change in dist(119902 119900)depending on the location of query point 119902 isin 119899
2119899511989961198993 For
simplicity we assume that the number of NNs requested atquery point 119902 is 119896 = 1 Then as shown in Figure 7(a) 1198741198992
119896
1198741198993
119896 and 119874(119899
2119899511989961198993) are evaluated as 1198741198992
119896= 119900 1198741198993
119896= 119900
and119874(1198992119899511989961198993) = 119900 respectively As shown in Figure 7(b)
the distance from 119902 to 119900 represented by the bold lines isdist(119902 119900) = len(119902 119900) if 119902 isin 119899
211989951198996 otherwise it is dist(119902 119900) =
len(119902 1198993) + 3 because dist(119899
2 119900) = 1 dist(119899
3 119900) = 3 and
len(1198992 119900) = 1 are given
Next we explore the change in network distance dist(119902 119900)for object 119900 isin 119874120572
119896cup 119874
120573
119896cup 119874(
997888rarr120572120573) when a query point 119902 is
located in a directed segment997888rarr120572120573 Figure 8 shows the change
in dist(119902 119900) for three cases 119900 isin 119874120572
119896 119900 isin 119874120573
119896 and 119900 isin 119874(
997888rarr120572120573)
1
2
1 2
1 16 5
n1 n4n2 n3
n5
n6o
q
(a) q isin n2n5n6n3
9
7
5
3
112 2
n2 n3n5 n6
o
o
o
(b) dist(q o) = len(q o) if q isin n2n5n6
len(q n3) + 3 otherwise
Figure 7 Computation of ist(119902 119900) where 119902 isin 1198992119899511989961198993and 119900 isin
1198741198992
119896cap 119874
1198993
119896cap 119874(119899
2119899511989961198993)
Note that the dotted lines indicate that no paths exist from119902 to 119900 for the corresponding intervals which are denoted bydist(119902 119900) = infin For object 119900 isin 119874120572
119896 as shown in Figure 8(a)
8 Mobile Information Systems
asympasymp
dist(120572 o) o
120572 q 120573
infin
(a) If o isin O120572k then dist(q o) = dist(120572 o) if q = 120572
infin otherwise
o
120572 q 120573
len(120572 120573)+dist(120573 o)
dist(120573 o)
(b) If o isin O120573
k then dist(q o) = len(q 120573) + dist(120573 o)
asympasymp
120572 qo 120573
len(120572 o)
infin
(997888rarr120572120573
997888rarr120572(c) If o isin O then dist(q o) =len(q o) if q isin o
infin otherwise)
Figure 8 Evaluation of dist(119902 119900) where 119902 isin997888rarr120572120573 and 119900 isin 119874120572
119896cup 119874
120573
119896cup
119874(997888rarr120572120573)
if 119902 = 120572 then dist(119902 119900) = dist(120572 119900) otherwise (ie 119902 isin997888rarr120572120573minus120572) dist(119902 119900) = infin Similarly if 119900 isin 119874120573
119896 then dist(119902 119900) =
len(119902 120573) + dist(120573 119900) as shown in Figure 8(b) Finally forobject 119900 isin 119874(
997888rarr120572120573) as shown in Figure 8(c) if 119902 isin 997888rarr120572119900 then
dist(119902 119900) = len(119902 119900) otherwise (ie 119902 isinlarr997888120573119900) dist(119902 119900) = infin
Here dist(119902 119900) is the length of the shortest path from 119902 and119900 where query point 119902 isin
997888rarr120572120573 and is thus determined using
Table 2 in the same way as 119902 isin 120572120573Figure 9 shows an example of the change in dist(119902 119900)
depending on the location of query point 119902 isin 997888997888997888997888997888rarr119899211989951198993 For
simplicity we assume that the number of NNs requested atquery point 119902 is 119896 = 1 Then as shown in Figure 9(a) 1198741198992
119896
1198741198993
119896 and 119874(997888997888997888997888997888rarr119899
211989951198993) are evaluated as 1198741198992
119896= 119900 1198741198993
119896= 119900
and 119874(997888997888997888997888997888rarr119899211989951198993) = 119900 respectively As shown in Figure 9(b)
the distance from 119902 to 119900 represented by the bold lines isdist(119902 119900) = len(119902 119900) if 119902 isin 997888997888rarr119899
2119900 otherwise it is dist(119902 119900) =
len(119902 1198993) + 3 because dist(119899
2 119900) = 1 dist(119899
3 119900) = 3 and
len(1198992 119900) = 1 are given
1
2
3
1
16 5
n1 n4n2 n3
n5
o
q
(a) q isin 997888997888997888997888997888rarrn2n5n3
21
3
3
9
n2 n3n5o
o
o
asympasymp
infin
997888997888rarrn2o(b) dist(q o) =len(q o) if q isinlen(q n3) + 3 otherwise
Figure 9 Computation of dist(119902 119900) where 119902 isin 997888997888997888997888997888rarr119899211989951198993and 119900 isin 1198741198992
119896cap
1198741198993
119896cap 119874(
997888997888997888997888997888rarr119899211989951198993)
43 Partitioning Example Query Region into Safe SegmentsWe now discuss the construction of safe segments for queryregion 119876 in Figure 3(a) Recall that the number of requestedNNs is 119896 = 2 and the query region includes three segmentsthat is 119876 = larr997888997888997888119899
11198993 119899
21198993larr99788899788899788811989931198994 Table 3 summarizes the com-
putation of the safe segments in query region 119876 Clearly thekNN set at a node 119899
3is evaluated only once and it is reused
multiple timesAs shown in Algorithm 1 MORAN determines the safe
segments for each segment in query region 119876 Therefore weshow the successive determination of the safe segments inlarr99788899788899788811989911198993 119899
21198993 and larr997888997888997888119899
31198994 It is clear that adjacent safe segments
with the same query result can be merged Recall that we candraw dist(119902 119900) by using a query point 119902 isin 120572120573 and an object119900 isin 119874
120572
119896cup 119874
120573
119896cup 119874(120572120573)
Figure 10 depicts dist(119902 119900) using a query point 119902 isin larr99788899788899788811989911198993
and each object 119900 isin 1198741198991
119896cup 119874
1198993
119896cup 119874(
larr99788899788899788811989911198993) Here the union
of 1198741198991
119896 1198741198993
119896 and 119874(larr997888997888997888119899
11198993) becomes 1198741198991
119896cup 119874
1198993
119896cup 119874(
larr99788899788899788811989911198993) =
1199001 119900
2 119900
3 119900
4 because 1198741198991
119896= 119900
1 119900
2 1198741198993
119896= 119900
3 119900
4 and
119874(larr99788899788899788811989911198993) = 119900
3 are given Figures 10(a) 10(b) 10(c) and 10(d)
illustrate dist(119902 1199001) dist(119902 119900
2) dist(119902 119900
3) and dist(119902 119900
4)
respectively Recall that 1199001isin 119874
1198991
119896 119900
2isin 119874
1198991
119896 119900
3isin 119874
1198993
119896cup
119874(larr99788899788899788811989911198993) and 119900
4isin 119874
1198993
119896hold
To partition a segment 120572120573 into safe segments it isessential to identify the 119896th NN 119900
119896th at a query point 119902 isin120572120573 among the qualifying objects 119900 isin 119874
120572
119896cup 119874
120573
119896cup 119874(120572120573)
Mobile Information Systems 9
Table 3 Computation of safe segments for the example query region
120572120573 120572 120573 119874120572
119896119874120573
119896119874(120572120573) Ω(120572120573)
larr99788899788899788811989911198993
1198991
1198993
1199001 119900
2 119900
3 119900
4 119900
3 ⟨
larr99788899788899788811989911199003 119900
1 119900
2⟩ ⟨
997888997888997888rarr11989931199003 119900
2 119900
3⟩ ⟨119899
3 119900
3 119900
4⟩
11989921198993
1198992
1198993
1199004 119900
5 119900
3 119900
4 119900
4 ⟨119899
2119904 119900
4 119900
5⟩ ⟨119899
3119904 119900
3 119900
4⟩
larr99788899788899788811989931198994
1198993
1198994
1199003 119900
4 119900
3 119900
4 0 ⟨
larr99788899788899788811989931198994 119900
3 119900
4⟩
10
3
7
n1 n3
o1
(a) dist(q o1) = len(q n1) + 3
7
2
9
n1 n3
o2
(b) dist(q o2) = len(q n1) + 2
4
43
n1 n3
o3
o3
asympasymp
infin
997888997888997888rarrn3o3(c) dist(q o3) =len(q o3) if q isininfin otherwise
7
3
n1 n3
o4
asymp asymp
infin
q = n3infin otherwise(d) dist(q o4) =3 if
Figure 10 Plot of ist(119902 119900) where 119902 isin larr99788899788899788811989911198993and 119900 isin 119900
1 119900
2 119900
3 119900
4
Algorithm 2determines the skyline119874119896th that consists of (119909 119910)
pairs such that 119909 = len(120572 119902) and 119910 = dist(119902 119900119896th) hold for
each query point 119902 isin 120572120573The variable count keeps the numberof qualifying objects processed thus far which is initializedto 0 (line (1)) If count is less than 119896 then the skyline for119900119896th is determined by 119874
119896th = (119909 119910) | 119909 = len(120572 119902) 119910 =max(dist(119902 120579
119896th) dist(119902 119900)) for 119902 isin 120572120573 where 120579119896th keeps the119896th NN determined thus far (lines (4)-(5)) Otherwise (ie119888119900119906119899119905 ge 119896) the skyline for 119900
119896th is determined by 119874119896th =
(119909 119910) | 119909 = len(120572 119902) 119910 = min(dist(119902 120579119896th) dist(119902 119900))
for 119902 isin 120572120573 (lines (6)-(7)) Naturally count increases by 1whenever an object o is processed (line (8))
Figure 11 illustrates the partitioning of a segment larr99788899788899788811989911198993
into three safe segments using dist(119902 119900) for each object 119900 isin1198741198991
119896cup 119874
1198993
119896cup 119874(
larr99788899788899788811989911198993) Figure 11(a) shows the plot of dist(119902 119900)
for each object 119900 isin 1199001 119900
2 119900
3 119900
4 Note that to simplify the
presentation the interval in which dist(119902 119900) = infin holds isnot represented When a query point 119902 moves in a segmentlarr99788899788899788811989911198993 its 119896th NN 119900
119896th is determined using Algorithm 2 andis represented by the bold lines in Figure 11(b) Specificallyfor 119902 isin larr997888997888997888119899
11199003 the 119896th NN 119900
119896th is 1199001and thus the kNN set is
1199001 119900
2 Similarly for 119902 isin 997888997888997888rarr119899
31199003 the 119896th NN 119900
119896th is 1199002and
thus the kNN set is 1199002 119900
3 Finally for 119902 = 119899
3 the 119896th NN
119900119896th is 119900
3and thus the 119896NN set is 119900
3 119900
4 Consequently a
segmentlarr99788899788899788811989911198993is divided into three safe segments represented
by Ω(larr99788899788899788811989911198993) = ⟨
larr99788899788899788811989911199003 119900
1 119900
2⟩ ⟨997888997888997888rarr11989931199003 119900
2 119900
3⟩ ⟨119899
3 119900
3 119900
4⟩
Figures 12(a) 12(b) and 12(c) illustrate dist(119902 1199003)
dist(119902 1199004) and dist(119902 119900
5) respectively where 119902 refers to a
query point in a segment 11989921198993and 119900
3 119900
4 and 119900
5refer to
qualifying objects for the segment 11989921198993 Note that 119900
3isin 119874
1198993
119896
1199004isin 119874
1198992
119896cup 119874
1198993
119896cup 119874(119899
21198993) and 119900
5isin 119874
1198992
119896hold
Figure 13 illustrates the partitioning of a segment 11989921198993
into two safe segments using dist(119902 119900) for each object 119900 isin1198741198992
119896cup 119874
1198993
119896cup 119874(119899
21198993) Figure 13(a) shows the plot of dist(119902 119900)
for each object 119900 isin 1199003 119900
4 119900
5 When a query point 119902
moves in a segment 11989921198993 its 119896th NN 119900
119896th is represented bythe bold lines in Figure 13(b) where a point 119904 marked by afive-pointed star indicates the middle of the segment 119899
21198993
Specifically for 119902 isin 1198992119904 the 119896th NN 119900
119896th is 1199005and thus
the kNN set is 1199004 119900
5 Similarly for 119902 isin 119899
3119904 the 119896th NN
119900119896th is 119900
3and thus the kNN set is 119900
3 119900
4 Consequently
a segment 11989921198993is divided into two safe segments which
are represented as Ω(11989921198993) = ⟨119899
2119904 119900
4 119900
5⟩ ⟨119899
3119904 119900
3 119900
4⟩
Finally a segment larr99788899788899788811989931198994becomes a safe segment that is
10 Mobile Information Systems
Input k the number of requested NNs 119874120572
119896cup 119874
120573
119896cup 119874(120572120573) the set of qualifying objects for a segment 120572120573
Output 119874119896th the set of distances from q to its kth NN 119900
119896th (ie 119874119896th = (119909 119910) | 119909 = len(120572 119902) 119910 = dist(119902 119900119896th))
(1) 119888119900119906119899119905 larr 0 count keeps the number of objects processed thus far(2) 119874
119896th = (119909 119910) | 119909 = len(120572 119902) 119910 = 0 for 119902 isin 120572120573 119910 = dist(119902 119900119896th) is initialized to 0 for 119902 isin 120572120573
(3) for each object 119900 isin 119874120572
119896cup 119874
120573
119896cup 119874(120572120573) do qualifying objects are handled sequentially
(4) if 119888119900119906119899119905 lt 119896 then if the number of objects processed thus far is less than 119896(5) 119874
119896th = (119909 119910) | 119909 = len(120572 119902) 119910 = max(dist(119902 120579119896th) dist(119902 119900)) for 119902 isin 120572120573 120579
119896th is the 119896th NN thus far(6) else(7) 119874
119896th = (119909 119910) | 119909 = len(120572 119902) 119910 = min(dist(119902 120579119896th) dist(119902 119900)) for 119902 isin 120572120573
(8) 119888119900119906119899119905 larr 119888119900119906119899119905 + 1 count increases by 1 whenever an object 119900 is processed(9) return 119874
119896th
Algorithm 2 Determine skyline for kth NN (k 119874120572
119896cup 119874
120573
119896cup 119874(120572120573))
3 3
3 4
4
9
10
2
n1 n3o3
o1o2
o4
(a) Plot of dist(119902 119900) for119900 isin 119900
1 1199002 1199003 1199004
3 34
9
10
2
n1 n3o3
3 4
o1o2
o4
okth
(b) Ω(larr99788899788899788811989911198993) = ⟨
larr99788899788899788811989911199003
11990011199002⟩ ⟨997888997888997888rarr119899
31199003 119900
2 1199003⟩
⟨1198993 119900
3 1199004⟩
Figure 11 Partitioning of a segmentlarr99788899788899788811989911198993into three safe segments
9
4
5
n2 n3
o3
(a) dist(119902 1199003) =
len(119902 1198993) + 4
87
32
2 3n2 n3o4
o4
o4
(b) dist(119902 1199004) =
len(119902 1199004)
4
9
5n2 n3
o5
(c) dist(119902 1199005) =
len(119902 1198992) + 4
Figure 12 Plot of dist(119902 119900) where 119902 isin 11989921198993and 119900 isin 119900
3 119900
4 119900
5
Ω(larr99788899788899788811989931198994) = ⟨
larr99788899788899788811989931198994 119900
3 119900
4⟩ This is because 1198741198993
119896equals 1198741198994
119896
and 119874(larr99788899788899788811989931198994) is a subset of 1198741198993
119896 that is 1198741198993
119896= 119874
1198994
119896and
119874(larr99788899788899788811989931198994) sub 119874
1198993
119896
5 Monitoring Safe Segments inDynamic Spatial Networks
Figure 14 illustrates an example of changing the weight of anedge 997888997888997888rarr119899
11199001in a spatial network where it is assumed that 119896 = 2
is given For convenience we consider the query region 119876
4 4
2
2 3n2 n3o4
o5 o3
(a) Plot of dist(119902119900) for 119900 isin 119900
3 1199004
1199005
4
2
2 3
34
n2 n3o4 s
o5 o3
okth
(b) Ω(11989921198993) =
⟨1198992119904 119900
4 1199005⟩
⟨1198993119904 119900
3 1199004⟩
Figure 13 Partitioning of a segment 11989921198993into two safe segments
that consists of an edgelarr99788899788899788811989911198993 that is 119876 = larr997888997888997888119899
11198993 As shown
in Figure 14(b) when the weight of an edge 997888997888997888rarr11989911199001has been
updated from 3 to 5 at time 119905119895 this update may invalidate
the safe segments in the query region 119876 Therefore it isnecessary to monitor the validity of safe segments in a queryregion when the change occurs To this end we introduce aninfluential region to monitor the validity of safe segmentsThe influential region Ψ
119902for a query point 119902 is defined as a
set of points 119901 such that dist(119902 119901) le dist(119902 119900119896th) holds If the
weight of an edge changes inside influential region Ψ119902 the
kNN query at query point 119902 should be reevaluated to reflectthe change in the weight However if the weight of an edgechanges outside influential regionΨ
119902 the change can be safely
ignored Suppose that a query region 119876 is represented by aset 119876119904 of 119897 connected segments and a set 119876119887 of 119898 boundarypoints that is 119876119904
= 1199041 1199042 119904
119897 and 119876119887
= 1198871 1198872 119887
119898
Then the influential region Ψ119876for query region 119876 becomes
the union of the influential region for each query point 119902 isin 119876that isΨ
119876= ⋃
119902isin119876Ψ119902This can be represented simply asΨ
119876=
119876cup(⋃119898
119894=1Ψ119887119894) whereΨ
119887119894refers to the influential region at each
boundary point 119887119894of the query region119876 SpecificallyΨ
119887119894is the
set of points 119901 such that dist(119887119894 119901) le dist(119887
119894 119900
119887119894
119896th) holds Here119900119887119894
119896th is the farthest answer object from boundary point 119887119894 that
Mobile Information Systems 11
3 4
4 63
3
3
2
4
1
3
2
2
2
n1
n2n3
n6n5
n4
o5
o1
o4
o3
o2
(a) Query region119876 = larr99788899788899788811989911198993 at time 119905
119894
3
3
32
4
5 2
3
46
1
2
2
4
n1
n2n3
n6n5
n4
o5
o1
o4
o3
o2
(b) Updating the weight of 997888997888997888rarr11989911199001at time 119905
119895
Figure 14 Changing the weight of an edge in a dynamic spatial network where 119905119894lt 119905
119895
46
3
3
3
2
4
1
1
1
1
3
2
2
2 2 2
n1
n2n3
n6n5
n4
o5
o1
o4
o3
o2
1205951
1205952 1205953
(a) Influence region Ψ119876at time 119905
119894
41 1 3 4
4
3
5 2
2
2
2
2
2
21
2
1
1
n1
n2n3
n6n5
n4
o5
o1
o4
o3
o2
1205951
1205953
1205955
1205952
1205954
(b) Updated influence region Ψ119876at time 119905
119895
Figure 15 Updating the influence region for 119876
is for each answer object 119900 isin 119874119887119894
119896 dist(119887
119894 119900) le dist(119887
119894 119900
119887119894
119896th)holds
Figure 15(a) illustrates the influential region for the queryregion 119876 at time 119905
119894 where the dotted line and square
brackets mark the influential region and its boundary pointsrespectively A set of the two NNs at boundary point 119899
1is
1198741198991
119896= 119900
1 119900
2 and the 119896th NN of 119899
1is 1199001198991
119896th = 1199001 Thus thedistance from 119899
1to its 119896th NN 119900
1is dist(119899
1 119900
1) = 3 and thus
the influential region Ψ1198991
for a boundary point 1198991becomes
Ψ1198991= 997888997888997888rarr11989911199001997888997888997888997888997888rarr119899111990021198994 Similarly the influential regionΨ
1198993for a
boundary point 1198993evaluates Ψ
1198993= 997888997888997888rarr11989931199003 119899
311990041205951 119899
31198995 119899
51205952
11989951205953 because 1198741198993
119896= 119900
3 119900
4 1199001198993
119896th = 1199003 and dist(1198993 119900
3) = 4
are given Consequently the influential region Ψ119876for query
region119876 becomesΨ119876=larr99788899788899788811989911198993cupΨ
1198991cupΨ
1198993= larr99788899788899788811989911198993997888997888997888997888997888rarr119899111990021198994997888997888997888rarr11989931199003
119899311990041205951 119899
31198995 119899
51205952 119899
51205953 As shown in Figure 15(b) updating
the weight of edge 997888997888997888rarr11989911199001from 3 to 5 may affect the safe
segments for the query region119876This is because updated edge997888997888997888rarr11989911199001overlaps the influential region Ψ
119876for query region 119876
In this case the server reevaluates the qualifying objects forquery region 119876 and provides updated qualifying objects sothat the user can update safe segments If the safe segmentsare updated the influential region should be also updatedaccordinglyThus the influential region for query region119876 isupdated at time 119905
119895 as shown in Figure 15(b) Finally updates
to the weights of the edges for examplelarr99788899788899788811989921199001 119899
21199005larr997888997888997888119899
31198994 and
11989941198996 that do not overlap the influential region can be safely
ignoredAlgorithm 3 monitors the validity of safe segments in a
query region when the weight of edges changes over timeAssume that the weight of edge 119899
119894119899119895is updated Subsequently
the server checks if edge 119899119894119899119895overlaps the influential region
Ψ119876for query region 119876 If the edge with the updated weight
does not overlap the influential region the update is safelyignored (lines (1)-(2)) Otherwise (ie Ψ
119876cap 119899
119894119899119895= 0) the
server requests that query object 119902 updates the query region(line (4)) Consequently 119902 submits a kRNNquery for updatedquery region119876updThe server then evaluates the kRNNqueryfor 119876upd and returns the kRNN query result Σ
119876updto 119902 (line
(5)) The query object then determines safe segments usingΣ119876upd
(line (6)) Finally the server updates the influentialregion accordingly (line (7))
6 Performance Evaluation
We describe our experimental settings in Section 61 andpresent the results of our experiments using real-life roadmaps in Section 62
61 Experimental Settings In the experiments we use tworeal-life roadmaps obtained from [27] to explore the impact
12 Mobile Information Systems
Input Ψ119876 influential region 119899
119894119899119895 updated edge
Output none(1) if Ψ
119876cap 119899
119894119899119895= 0 then an update to edge 119899
119894119899119895that does not overlap Ψ
119876is ignored
(2) ignore the update in the weight of edge 119899119894119899119895
(3) else this means that Ψ119876cap 119899
119894119899119895= 0
(4) 119876upd larr Update query region () server requests that 119902 update the query region(5) Σ
119876updlarr Evaluate 119896RNN query (119876upd 119896) server evaluates 119896RNN query for an updated query region
(6) Ω119876upd
larr Update safe segments (Σ119876upd
119896) 119902 determines safe segments inside the updated query region(7) Ψ
119876updlarr Update influential region (119876upd 119896) server updates influential region accordingly
Algorithm 3 Monitor safe segments (Ψ119876 119899
119894119899119895)
Table 4 Experimental parameter settings
Parameter RangeNumber of requested NNs (119896) 2 4 8 16 32Ratio of directed edge sequences to total edge sequences (119877dir) 0 5 10 20 50 ()Ratio of updated edge sequences to total edge sequences per timestamp (119877upd) 0 03 05 07 1 ()Size of query region (119876sz) 1 2 4 8 16
Number of data points (119873data)1 3 5 7 10 (times104) for NA1 3 5 7 10 (times103) for SJ
Speed of query points (119881qry)20 40 60 80 100 (kmh) for NA20 40 60 80 100 (kmh) for SJ
Distribution of data points (119863data) UniformDistribution of query points (119863qry) UniformNumber of query points (119873qry) 1000Road map NA SJ
of the edge sequence length on the performance of MORANThe first road map comprising 175813 nodes and 179179edges includes major roads in North America (NA) andcorresponds approximately to a data universe of 25times107 km2The second road map comprising 18263 nodes and 23874edges includes major roads in San Joaquin County (SJ)California and corresponds approximately to a data universeof 36 times 103 km2 For the first road map NA the numberof edge sequences and their average length are 12416 and29052m respectively For the second road map SJ thenumber of edge sequences and their average length are 20040and 248m respectively Table 4 summarizes the parametersused in the experiments In each experiment we vary a singleparameter in the range shown and set the other parameters tothe default values marked in boldWe simulate moving querypoints using a network-based moving objects generator [28]The number of query objects is set to 1000The size of a queryregion is determined by the number of edge sequences thatconstitute the query region The directed and updated edgesequences are selected randomly irrespective of the locationsof the data and query objects The length of an updated edgesequence is selected randomly to be between 01 and 10 timesthe original length For example if 119877upd is set to 05 and thenumber of edge sequences is 12416 then 62 edge sequences
are selected randomly every timestamp and their weights areupdated
As a benchmark against MORAN we use kRNN-E [5]without information of the precomputed shortest distancesbased on a shared execution paradigm to remove the redun-dant search overhead We choose kRNN-E instead of kRNN-F [5] with information of all the precomputed shortestdistances although kRNN-F typically outperforms kRNN-E The reason for this is that the precomputed distancesamong nodes are frequently invalidated by the updates tothe weights of the edges which makes it difficult to maintainthe precomputed distances To make kRNN-F applicable toour problem scenarios we can consider applying hierarchicaland goal-directed speed-up techniques [29] for DijkstrarsquosalgorithmThis approach can help to reduce the computationtime only at the server side and thus would not affect ourexperimental results Recall that the query processing at theserver is orthogonal to this study and that MORAN focuseson reducing the computation frequency and time taken atthe client side to evaluateMkRNN queries Our experimentalresults provide the average values per timestamp while 1000query points run for 600 timestamps Note that for roadmapNA the speed of the query points is 100 kmh by defaultwhereas for road map SJ the speed is 60 kmh by default
Mobile Information Systems 13
All algorithms are implemented in C++ and executed on adesktop PC with a 34GHz processor and 16GB of memory
62 Experimental Results Figure 16 shows a comparison ofthe query processing times at the client side of MORANand kRNN-E for evaluating MkRNN queries in road mapNA where each chart illustrates the effect of varying asingle parameter in Table 4 The values in the parenthesesindicate the computation frequency per timestamp Clearlythe computation frequency of kRNN-E equals the numberof query points and thus is omitted It should be noted thatthe server evaluates the MkRNN queries whenever the querypoints exit their query regions and thus the query processingtimes at the server side are the same forMORAN and kRNN-E Therefore we focus on comparing the query processingtimes at the client side
Figure 16(a) shows the query processing time as a func-tion of the number of requested NNs that is k Clearly thequery processing time at the client side increaseswith k How-ever the query processing time of MORAN is significantlyshorter than that of kRNN-E for all cases The reason for thisis that kRNN-E evaluates kNNquerieswhenever query pointsmove Conversely MORAN determines safe segments whenquery points enter new edge sequences or when the queryresults provided by the server become invalidated because ofupdated traffic conditions
Figure 16(b) shows the query processing time as a func-tion of the ratio of directed edge sequences to the totalnumber of edge sequences that is 119877dir Clearly 119877dir = 0refers to an undirected spatial networkThe query processingtimes at the client side of both methods are insensitive to thevalue of119877dirThe query processing time ofMORAN is shorterthan that of kRNN-E regardless of the value of 119877dir
Figure 16(c) shows the query processing time as a func-tion of the ratio of updated edge sequences to the totalnumber of edge sequences per timestamp that is 119877upd Here119877upd = 0 refers to a static spatial network The length of anupdated edge sequence is selected randomly frombetween 01and 10 times the original length Clearly the query processingtime of kRNN-E is almost constant regardless of the valueof 119877upd because query points in kRNN-E issue kNN queriesat each timestamp However the query processing time ofMORAN increases linearly with 119877upd because the probabilitythat the influential region of a query region overlaps anyupdated edge sequence increases with 119877upd Therefore alarger value of 119877upd leads to a longer query processing time
Figure 16(d) shows the query processing time as a func-tion of the size of the query region that is 119876sz Clearly thequery processing time increases with119876sz However the queryprocessing time of MORAN is clearly shorter than that ofkRNN-E regardless of the value of 119876sz
Figure 16(e) shows the query processing time as a func-tion of the number of data points that is 119873data In generalas 119873data increases the search space decreases and thus thequery processing time at the server side decreases accord-ingly However the query processing time at the client sideincreases with119873dataThis is because the number of qualifyingdata points handled at the client side increases with 119873data
Although the query processing time of MORAN increasesmore rapidly with 119873data than that of kRNN-E the queryprocessing time of MORAN is still shorter than that ofkRNN-E for 10 k le 119873data le 70 k However for119873data = 100 kthe query processing time of MORAN is 129 times longerthan that of kRNN-E
Figure 16(f) shows the query processing time as a func-tion of the speed of the query points that is 119881qry The queryprocessing time ofMORAN ismore sensitive to119881qry than thatof kRNN-E However the query processing time of MORANis clearly shorter than that of kRNN-E for all cases
Figure 17 shows a comparison of the query processingtimes at the client side of MORAN and kRNN-E for eval-uating MkRNN queries in road map SJ As when road mapNA is used when road map SJ is used the query processingtime of MORAN is clearly shorter than that of kRNN-E Asshown in Figure 17(a) the query processing time increaseswith k for the same reason as discussed earlier in the case ofFigure 16(a) As shown in Figure 17(b) the query processingtimes are not sensitive to the value of 119877dir As shown inFigure 17(c) the query processing time of kRNN-E remainsstable regardless of the value of 119877upd Conversely the queryprocessing time of MORAN increases with 119877upd because alarger value of 119877upd affects the influential regions of morequery points As shown in Figure 17(d) the query processingtime increases with 119876sz because the number of qualifyingdata points handled at the client side also increases with119876sz As shown in Figure 17(e) as 119873data increases the queryprocessing times decrease This is closely related to the sizeof the influential regions Specifically as 119873data increasesthe influential region decreases and thus updating weightsof edge sequences affects the influential regions of morequery points As shown in Figure 17(f) the query processingtime of MORAN increases with 119881qry for the same reason asdiscussed earlier in the case of Figure 16(f) whereas the queryprocessing time of kRNN-E remains stable regardless of thevalue of 119881qry
7 Conclusion
We proposed a new algorithm called MORAN for pro-cessing MkRNN queries in directed and dynamic spatialnetworks Existing studies focus on reducing redundant com-putation costs at the server side while processing snapshotkRNN queries in undirected and static spatial networksHowever MORAN clearly decreases the computation timeand frequency at the client side by dividing the query regioninto safe segments while processing MkRNN queries indirected and dynamic spatial networksThe influential regionfor a query region is introduced to monitor the impact of theupdated traffic conditions on the safe segments The resultsof experiments using real-life road maps demonstrate thatMORAN clearly outperforms kRNN-E for various workloadsin terms of the computation time and frequency We plan toextend our approach to processing sophisticated queries suchas kNN joins and top-k spatial preference queries in directedand dynamic spatial networks
14 Mobile Information Systems
k
(67)
2
MORAN
4 8 16 32
(73)
(83) (106)
(137)
0
10
20
30
40
CPU
tim
e at c
lient
side
(ms)
kRNN-E
(a) Effect of 119896
0 5 10 20 50
(90) (83) (83) (83) (81)
MORAN
0
5
10
15
20
CPU
tim
e at c
lient
side
(ms)
Rdir ()
kRNN-E
(b) Effect of 119877dir
00 03 05 07 10
(1)
(72) (83)
(157) (158)
MORAN
0
5
10
15
20
CPU
tim
e at c
lient
side
(ms)
Rupd ()
kRNN-E
(c) Effect of 119877upd
1 2 4 8 16
(66) (68) (83) (98)
(144)
MORAN
0
8
16
24
32CP
U ti
me a
t clie
nt si
de (m
s)
Qsz
kRNN-E
(d) Effect of119876sz
(163) (99)
(83) (80)
(79)
MORAN
0
8
16
24
32
CPU
tim
e at c
lient
side
(ms)
10 30 50 70 100
kRNN-E
Ndata (k)
(e) Effect of119873data
20 40 60 80 100
(95) (74) (81) (70) (83)
MORANkRNN-E
0
8
16
24
32
CPU
tim
e at c
lient
side
(ms)
Vqry (kmh)
(f) Effect of 119881qry
Figure 16 Comparison of CPU time at the client side for road map NA
Mobile Information Systems 15
(157) (209)(280)
(383)
(536)
k
2
MORAN
4 8 16 320
8
16
24
32
CPU
tim
e at c
lient
side
(ms)
kRNN-E
(a) Effect of 119896
(366) (286) (280) (272) (243)
MORAN
0 5 10 20 500
5
10
15
20
CPU
tim
e at c
lient
side
(ms)
Rdir ()
kRNN-E
(b) Effect of 119877dir
(26)(230) (280) (391) (429)
MORAN
00 03 05 07 10Rupd ()
0
5
10
15
20
CPU
tim
e at c
lient
side
(ms)
kRNN-E
(c) Effect of 119877upd
(277) (276) (280)(307)
(371)
MORAN
1 2 4 8 160
8
16
24
32CP
U ti
me a
t clie
nt si
de (m
s)
Qsz
kRNN-E
(d) Effect of119876sz
(612)
(359) (280) (232) (211)
MORAN
0
8
16
24
32
CPU
tim
e at c
lient
side
(ms)
1 3 5 7 10
kRNN-E
Ndata (k)
(e) Effect of119873data
(248) (265) (280) (286) (328)
MORAN
20 40 60 80 1000
5
10
15
20
CPU
tim
e at c
lient
side
(ms)
Vqry (kmh)
kRNN-E
(f) Effect of 119881qry
Figure 17 Comparison of CPU time at the client side for road map SJ
16 Mobile Information Systems
Notations and Their Definitions
119899119894119899119895 Edge connecting two adjacent nodes 119899
119894
and 119899119895
119899119904119899119904+1sdot sdot sdot 119899
119890 Edge sequence where 119899
119904(or 119899
119890) is the
start (or end) boundary node and theother nodes 119899
119904+1 119899
119890minus1 are
intermediate nodesdist(119901
1 119901
2) Length of the shortest path from point 119901
1
to point 1199012
len(1199011 119901
2) Length of the segment connecting two
points 1199011and 119901
2 such that 119901
1and 119901
2are
located in the same edge sequence119899119904119899119904+1sdot sdot sdot 119899
119890
119902 Query point119896 Number of requested NNs119874119901
119896 Set of kNNs at point 119901
120572120573 Segment that belongs to an edgesequence
119874(120572120573) Set of objects in segment 120572120573119900119896th The 119896th NN of query point 119902Ψ119902 Influence region for query point 119902
Ψ119876 Influence region for query region 119876
Conflict of Interests
The authors declare that there is no conflict of interestsregarding the publication of this paper
Acknowledgment
This research was supported by Kyungpook National Univer-sity Research Fund 2014
References
[1] U Demiryurek F Banaei-Kashani and C Shahabi ldquoEfficientcontinuous nearest neighbor query in spatial networks usingEuclidean restrictionrdquo in Advances in Spatial and TemporalDatabases 11th International Symposium SSTD 2009 AalborgDenmark July 8ndash10 2009 Proceedings vol 5644 of Lecture Notesin Computer Science pp 25ndash43 Springer Berlin Germany2009
[2] M R Kolahdouzan and C Shahabi ldquoAlternative solutionsfor continuous K nearest neighbor queries in spatial networkdatabasesrdquo GeoInformatica vol 9 no 4 pp 321ndash341 2005
[3] E W Dijkstra ldquoA note on two problems in connexion withgraphsrdquoNumerischeMathematik vol 1 no 1 pp 269ndash271 1959
[4] H Samet J Sankaranarayanan and H Alborzi ldquoScalablenetwork distance browsing in spatial databasesrdquo in Proceedingsof the SIGMOD International Conference on Management ofData (SIGMOD rsquo08) pp 43ndash54 Vancouver Canada June 2008
[5] J Bao C-Y ChowM FMokbel andW-S Ku ldquoEfficient evalu-ation of k-range nearest neighbor queries in road networksrdquo inProceedings of the 11th IEEE International Conference on MobileData Management (MDM rsquo10) pp 115ndash124 Kansas City MoUSA May 2010
[6] W-S Ku Y Chen and R Zimmermann ldquoPrivacy protectedspatial query processing for advanced location based servicesrdquo
Wireless Personal Communications vol 51 no 1 pp 53ndash652009
[7] K Mouratidis and M L Yiu ldquoAnonymous query processingin road networksrdquo IEEE Transactions on Knowledge and DataEngineering vol 22 no 1 pp 2ndash15 2010
[8] T Wang and L Liu ldquoPrivacy-aware mobile services over roadnetworksrdquo Proceedings of the VLDB Endowment vol 2 no 1pp 1042ndash1053 2009
[9] G Ghinita P Kalnis and S Skiadopoulos ldquoMobiHide amobilea peer-to-peer system for anonymous location-basedqueriesrdquo in Proceedings of the 10th International Symposium onSpatial and Temporal Databases (SSTD rsquo07) Boston MA USAJuly 2007 pp 221ndash238 Springer 2007
[10] S Ilarri E Mena and A Illarramendi ldquoLocation-dependentquery processing where we are and where we are headingrdquoACM Computing Surveys vol 42 no 3 article 12 2010
[11] H Al-Khalidi D Taniar J Betts and S Alamri ldquoDynamicsafe regions for moving range queries in mobile navigationrdquoInternational Journal of Ad Hoc and Ubiquitous Computing vol16 no 4 pp 250ndash259 2014
[12] H Al-Khalidi D Taniar J Betts and S Alamri ldquoMonitoringmoving queries inside a safe regionrdquo The Scientific WorldJournal vol 2014 Article ID 630396 13 pages 2014
[13] H-J Cho S J Kwon and T-S Chung ldquoA safe exit algorithmfor continuous nearest neighbor monitoring in road networksrdquoMobile Information Systems vol 9 no 1 pp 37ndash53 2013
[14] H-J Cho K Ryu and T-S Chung ldquoAn efficient algorithm forcomputing safe exit points of moving range queries in directedroad networksrdquo Information Systems vol 41 pp 1ndash19 2014
[15] C Li Y Gu J Qi G Yu R Zhang andW Yi ldquoProcessing mov-ing kNN queries using influential neighbor setsrdquo Proceedings ofthe VLDB Endowment vol 8 no 2 pp 113ndash124 2014
[16] S Nutanong R Zhang E Tanin and L Kulik ldquoAnalysis andevaluation of V-kNN an efficient algorithm for moving kNNqueriesrdquo VLDB Journal vol 19 no 3 pp 307ndash332 2010
[17] D Yung M L Yiu and E Lo ldquoA safe-exit approach for efficientnetwork-based moving range queriesrdquo Data and KnowledgeEngineering vol 72 pp 126ndash147 2012
[18] Y Gao B Zheng G Chen C Chen and Q Li ldquoContinuousnearest-neighbor search in the presence of obstaclesrdquo ACMTransactions on Database Systems vol 36 no 2 article 9 2011
[19] Y Tao D Papadias and Q Shen ldquoContinuous nearest neighborsearchrdquo in Proceedings of the 28th International Conference onVery Large Data Bases (VLDB rsquo02) pp 287ndash298 Hong KongAugust 2002
[20] M Mokbel C Chow and W Aref ldquoThe new casper queryprocessing for location serviceswithout compromising privacyrdquoin Proceedings of the 32nd International Conference on VeryLarge Data Bases (VLDB rsquo06) pp 763ndash774 Seoul Republic ofKorea 2006
[21] P Kalnis G Ghinita K Mouratidis and D Papadias ldquoPre-venting location-based identity inference in anonymous spatialqueriesrdquo IEEE Transactions on Knowledge and Data Engineer-ing vol 19 no 12 pp 1719ndash1733 2007
[22] C Chow M Mokbel J Naps and S Nath ldquoApproximateevaluation of range nearest neighbor queries with qualityguaranteerdquo in Advances in Spatial and Temporal Databases 11thInternational Symposium SSTD 2009 Aalborg Denmark July 8ndash10 2009 Proceedings vol 5644 of Lecture Notes in ComputerScience pp 283ndash301 Springer Berlin Germany 2009
Mobile Information Systems 17
[23] J Xu X Tang H Hu and J Du ldquoPrivacy-conscious location-based queries in mobile environmentsrdquo IEEE Transactions onParallel and Distributed Systems vol 21 no 3 pp 313ndash326 2010
[24] A M Aly W G Aref and M Ouzzani ldquoSpatial queries withtwo kNN predicatesrdquo Proceedings of the VLDB Endowment vol5 no 11 pp 1100ndash1111 2012
[25] Y Gu G Yu and X Yu ldquoAn efficient method for k nearestneighbor searching in obstructed spatial databasesrdquo Journal ofInformation Science and Engineering vol 30 no 5 pp 1569ndash1583 2014
[26] K Mouratidis M L Yiu D Papadias and N MamoulisldquoContinuous nearest neighbormonitoring in road networksrdquo inProceedings of the 32nd International Conference on Very LargeData Bases (VLDB rsquo06) pp 43ndash54 Seoul Republic of KoreaSeptember 2006
[27] Real Datasets for Spatial Databases httpwwwcsfsuedusimlifeifeiSpatialDatasethtm
[28] T Brinkhoff ldquoA framework for generating network-based mov-ing objectsrdquo GeoInformatica vol 6 no 2 pp 153ndash180 2002
[29] R Bauer D Delling P Sanders D Schieferdecker D Schultesand D Wagner ldquoCombining hierarchical and goal-directedspeed-up techniques for dijkstrarsquos algorithmrdquo Journal of Exper-imental Algorithmics vol 15 article 23 2010
[30] M Kolahdouzan C Shahabi and M Kolahdouzan ldquoVoronoi-based k nearest neighbor search for spatial network databasesrdquoinProceedings of the 30th International Conference onVery LargeData Bases (VLDB rsquo04) vol 30 pp 840ndash851 2004
[31] D Papadias J Zhang N Mamoulis and Y Tao ldquoQueryprocessing in spatial network databasesrdquo in Proceedings of the29th International Conference on Very Large Data Bases (VLDBrsquo03) vol 29 pp 802ndash813 2003
Submit your manuscripts athttpwwwhindawicom
Computer Games Technology
International Journal of
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Distributed Sensor Networks
International Journal of
Advances in
FuzzySystems
Hindawi Publishing Corporationhttpwwwhindawicom
Volume 2014
International Journal of
ReconfigurableComputing
Hindawi Publishing Corporation httpwwwhindawicom Volume 2014
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Applied Computational Intelligence and Soft Computing
thinspAdvancesthinspinthinsp
Artificial Intelligence
HindawithinspPublishingthinspCorporationhttpwwwhindawicom Volumethinsp2014
Advances inSoftware EngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Electrical and Computer Engineering
Journal of
Journal of
Computer Networks and Communications
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Hindawi Publishing Corporation
httpwwwhindawicom Volume 2014
Advances in
Multimedia
International Journal of
Biomedical Imaging
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
ArtificialNeural Systems
Advances in
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
RoboticsJournal of
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Computational Intelligence and Neuroscience
Industrial EngineeringJournal of
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014
The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Human-ComputerInteraction
Advances in
Computer EngineeringAdvances in
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
6 Mobile Information Systems
Q
qq998400
(a) 119902 leaves query region119876
Q
q
T
(b) Congestion area 119879 nullifies 119896RNN query resultfor119876
Figure 5 Two events that trigger the evaluation of MkRNN queries
Input Q query region k the number of requested NNsOutputΩ the set of safe segments in 119876(1)Ω larr 0 Ω is initialized to an empty set(2) for each segment 120572120573 isin 119876 do(3) 119874
120572
119896larr evaluate kNN query at point (120572 k) a kNN query is evaluated at a boundary point 120572
(4) 119874120573
119896larr evaluate kNN query at point (120573 k) a kNN query is evaluated at a boundary point 120573
(5) 119874(120572120573) larr evaluate range query (120572120573) a range query is evaluated for a segment 120572120573(6) Ω(120572120573) larr find safe segments (119874120572
119896 119874120573
119896 119874(120572120573)) the function is detailed in Section 42
(7) Ω larr Ω cup Ω(120572120573)
(8) return Ω the set of safe segments is provided to the query issuer
Algorithm 1 MORAN (Q k)
the server it should reevaluate safe segments inside the queryregion Using safe segments reduces the computation timeand frequency because the query object does not have toevaluate kNN queries while inside the safe segments
Algorithm 1 outlines the process of determining the safesegments in a query region 119876 in a directed spatial networkThe algorithm starts by initializing Ω to an empty set whichstores the safe segments found thus far Each segment 120572120573in query region 119876 is explored sequentially to find the safesegments in segment120572120573 For this purposeMORANevaluatestwo kNN queries issued at boundary points 120572 and 120573 ofsegment 120572120573 The query results are stored to 119874120572
119896and 119874120573
119896
respectively The objects in 120572120573 are explored and stored to119874(120572120573) The function find safe segments is called with 119874120572
119896
119874120573
119896 and 119874(120572120573) in order to find safe segments in segment
120572120573 The found safe segments are added to the result set ΩWhen all the segments in 119876 have been examined a set Ωof safe segments in query region 119876 is returned to the queryissuer It should be noted that if updates in the weight of edgesfrequently occur in a spatial network it is better to determinethe safe segments in the current segment including the querypoint rather than all the safe segments in the query regionWe employ a shared execution approach [5] which is widely
used to avoidmultiple visits to the samenodes and edgesThisclearly reduces the query processing time while determiningsafe segments in a query region
42 Partitioning Query Region into Safe Segments We con-sider an undirected segment 120572120573 followed by a directedsegment
997888rarr120572120573 We present a method for finding safe segments
in segment 120572120573 by using119874120572
119896119874120573
119896 and119874(120572120573) Here119874120572
119896and119874120573
119896
refer to sets of 119896NNs at boundary points 120572 and 120573 respectivelyand 119874(120572120573) refers to a set of objects inside segment 120572120573 Anobject 119900 that belongs to the union of 119874120572
119896 119874120573
119896 and 119874(120572120573) that
is 119900 isin 119874120572
119896cup 119874
120573
119896cup 119874(120572120573) is referred to as a qualifying object
Clearly the set 119874119902
119896of 119896NNs at a query point 119902 isin 120572120573 is a
subset of the union of 119874120572
119896 119874120573
119896 and 119874(120572120573) [5 13 26] that is
119874119902
119896sube (119874
120572
119896cup119874
120573
119896cup119874(120572120573)) If119874120572
119896equals119874120573
119896and119874(120572120573) is a subset
of119874120572
119896 segment 120572120573 becomes a safe segment Otherwise it has
two or more safe segmentsWe first explore the change in a network distance
dist(119902 119900) for a qualifying object 119900 isin 119874120572
119896cup 119874
120573
119896cup 119874(120572120573)
when a query point 119902 is located in an undirected segment120572120573 [13 14] Figure 6 shows the change in dist(119902 119900) for three
Mobile Information Systems 7
Table 2 Computation of dist(119902 119900) where 119902 isin 120572120573 and 119900 isin 119874120572
119896cup 119874
120573
119896cup 119874(120572120573)
Condition dist(119902 119900)
119900 isin 119874120572
119896minus (119874
120573
119896cup 119874(120572120573)) dist (119902 119900) = len (119902 120572) + dist (120572 119900)
119900 isin 119874120573
119896minus (119874
120572
119896cup 119874(120572120573)) dist (119902 119900) = len (119902 120573) + dist (120573 119900)
119900 isin 119874(120572120573) minus (119874120572
119896cup 119874
120573
119896) dist (119902 119900) = len (119902 119900)
119900 isin 119874120572
119896cap 119874
120573
119896minus 119874(120572120573) dist (119902 119900) = min (len (119902 120572) + dist (120572 119900) len (119902 120573) + dist (120573 119900))
119900 isin 119874120572
119896cap 119874(120572120573) minus 119874
120573
119896dist (119902 119900) = min (len (119902 120572) + dist (120572 119900) len (119902 119900))
119900 isin 119874120573
119896cap 119874(120572120573) minus 119874
120572
119896dist (119902 119900) = min (len (119902 120573) + dist (120573 119900) len (119902 119900))
119900 isin 119874120572
119896cap 119874
120573
119896cap 119874(120572120573) dist (119902 119900) = min (len (119902 120572) + dist (120572 119900) len (119902 120573) + dist (120573 119900) len (119902 119900))
120572
o
q 120573
dist(120572 o)
dist(120572 o) + len(120572 120573)
(a) If 119900 isin 119874120572
119896 then dist(119902 119900) = len(119902 120572) +
dist(120572 119900)
120572
o
120573
len(120572 120573) + dist(120573 o)
dist(120573 o)
(b) If 119900 isin 119874
120573
119896
then dist(119902 119900) = len(119902 120573) +dist(120573 119900)
o120572 q 120573
len(120572 o)
len(o 120573)
(c) If 119900 isin 119874(120572120573) thendist(119902 119900) = len(119902 119900)
Figure 6 Evaluation of dist(119902 119900) where 119902 isin 120572120573 and 119900 isin 119874120572
119896cup 119874
120573
119896cup 119874(120572120573)
cases 119900 isin 119874120572
119896 119900 isin 119874120573
119896 and 119900 isin 119874(120572120573) In this figure the
119910-axis represents dist(119902 119900) and the 119909-axis represents len(120572 119902)for 0 le len(120572 119902) le len(120572 120573) If 119900 isin 119874120572
119896 then dist(119902 119900) =
len(119902 120572) + dist(120572 119900) as shown in Figure 6(a) Similarly if119900 isin 119874
120573
119896 then dist(119902 119900) = len(119902 120573) + dist(120573 119900) as shown in
Figure 6(b) Finally if 119900 isin 119874(120572120573) then dist(119902 119900) = len(119902 119900)as shown in Figure 6(c)
Table 2 summarizes the evaluation of dist(119902 119900) for 119902 isin 120572120573and 119900 isin 119874120572
119896cup 119874
120573
119896cup 119874(120572120573) where MIN returns the minimum
of the values in the input array Because a qualifying object 119900belongs to a combination of119874120572
119896119874120573
119896 or119874(120572120573) a total of seven
possible cases are considered Note that dist(120572 119900) dist(120573 119900)len(120572 119900) and len(120573 119900) are given constants and dist(119902 119900) is thelength of the shortest path among multiple paths from 119902 and119900
Figure 7 shows an example of the change in dist(119902 119900)depending on the location of query point 119902 isin 119899
2119899511989961198993 For
simplicity we assume that the number of NNs requested atquery point 119902 is 119896 = 1 Then as shown in Figure 7(a) 1198741198992
119896
1198741198993
119896 and 119874(119899
2119899511989961198993) are evaluated as 1198741198992
119896= 119900 1198741198993
119896= 119900
and119874(1198992119899511989961198993) = 119900 respectively As shown in Figure 7(b)
the distance from 119902 to 119900 represented by the bold lines isdist(119902 119900) = len(119902 119900) if 119902 isin 119899
211989951198996 otherwise it is dist(119902 119900) =
len(119902 1198993) + 3 because dist(119899
2 119900) = 1 dist(119899
3 119900) = 3 and
len(1198992 119900) = 1 are given
Next we explore the change in network distance dist(119902 119900)for object 119900 isin 119874120572
119896cup 119874
120573
119896cup 119874(
997888rarr120572120573) when a query point 119902 is
located in a directed segment997888rarr120572120573 Figure 8 shows the change
in dist(119902 119900) for three cases 119900 isin 119874120572
119896 119900 isin 119874120573
119896 and 119900 isin 119874(
997888rarr120572120573)
1
2
1 2
1 16 5
n1 n4n2 n3
n5
n6o
q
(a) q isin n2n5n6n3
9
7
5
3
112 2
n2 n3n5 n6
o
o
o
(b) dist(q o) = len(q o) if q isin n2n5n6
len(q n3) + 3 otherwise
Figure 7 Computation of ist(119902 119900) where 119902 isin 1198992119899511989961198993and 119900 isin
1198741198992
119896cap 119874
1198993
119896cap 119874(119899
2119899511989961198993)
Note that the dotted lines indicate that no paths exist from119902 to 119900 for the corresponding intervals which are denoted bydist(119902 119900) = infin For object 119900 isin 119874120572
119896 as shown in Figure 8(a)
8 Mobile Information Systems
asympasymp
dist(120572 o) o
120572 q 120573
infin
(a) If o isin O120572k then dist(q o) = dist(120572 o) if q = 120572
infin otherwise
o
120572 q 120573
len(120572 120573)+dist(120573 o)
dist(120573 o)
(b) If o isin O120573
k then dist(q o) = len(q 120573) + dist(120573 o)
asympasymp
120572 qo 120573
len(120572 o)
infin
(997888rarr120572120573
997888rarr120572(c) If o isin O then dist(q o) =len(q o) if q isin o
infin otherwise)
Figure 8 Evaluation of dist(119902 119900) where 119902 isin997888rarr120572120573 and 119900 isin 119874120572
119896cup 119874
120573
119896cup
119874(997888rarr120572120573)
if 119902 = 120572 then dist(119902 119900) = dist(120572 119900) otherwise (ie 119902 isin997888rarr120572120573minus120572) dist(119902 119900) = infin Similarly if 119900 isin 119874120573
119896 then dist(119902 119900) =
len(119902 120573) + dist(120573 119900) as shown in Figure 8(b) Finally forobject 119900 isin 119874(
997888rarr120572120573) as shown in Figure 8(c) if 119902 isin 997888rarr120572119900 then
dist(119902 119900) = len(119902 119900) otherwise (ie 119902 isinlarr997888120573119900) dist(119902 119900) = infin
Here dist(119902 119900) is the length of the shortest path from 119902 and119900 where query point 119902 isin
997888rarr120572120573 and is thus determined using
Table 2 in the same way as 119902 isin 120572120573Figure 9 shows an example of the change in dist(119902 119900)
depending on the location of query point 119902 isin 997888997888997888997888997888rarr119899211989951198993 For
simplicity we assume that the number of NNs requested atquery point 119902 is 119896 = 1 Then as shown in Figure 9(a) 1198741198992
119896
1198741198993
119896 and 119874(997888997888997888997888997888rarr119899
211989951198993) are evaluated as 1198741198992
119896= 119900 1198741198993
119896= 119900
and 119874(997888997888997888997888997888rarr119899211989951198993) = 119900 respectively As shown in Figure 9(b)
the distance from 119902 to 119900 represented by the bold lines isdist(119902 119900) = len(119902 119900) if 119902 isin 997888997888rarr119899
2119900 otherwise it is dist(119902 119900) =
len(119902 1198993) + 3 because dist(119899
2 119900) = 1 dist(119899
3 119900) = 3 and
len(1198992 119900) = 1 are given
1
2
3
1
16 5
n1 n4n2 n3
n5
o
q
(a) q isin 997888997888997888997888997888rarrn2n5n3
21
3
3
9
n2 n3n5o
o
o
asympasymp
infin
997888997888rarrn2o(b) dist(q o) =len(q o) if q isinlen(q n3) + 3 otherwise
Figure 9 Computation of dist(119902 119900) where 119902 isin 997888997888997888997888997888rarr119899211989951198993and 119900 isin 1198741198992
119896cap
1198741198993
119896cap 119874(
997888997888997888997888997888rarr119899211989951198993)
43 Partitioning Example Query Region into Safe SegmentsWe now discuss the construction of safe segments for queryregion 119876 in Figure 3(a) Recall that the number of requestedNNs is 119896 = 2 and the query region includes three segmentsthat is 119876 = larr997888997888997888119899
11198993 119899
21198993larr99788899788899788811989931198994 Table 3 summarizes the com-
putation of the safe segments in query region 119876 Clearly thekNN set at a node 119899
3is evaluated only once and it is reused
multiple timesAs shown in Algorithm 1 MORAN determines the safe
segments for each segment in query region 119876 Therefore weshow the successive determination of the safe segments inlarr99788899788899788811989911198993 119899
21198993 and larr997888997888997888119899
31198994 It is clear that adjacent safe segments
with the same query result can be merged Recall that we candraw dist(119902 119900) by using a query point 119902 isin 120572120573 and an object119900 isin 119874
120572
119896cup 119874
120573
119896cup 119874(120572120573)
Figure 10 depicts dist(119902 119900) using a query point 119902 isin larr99788899788899788811989911198993
and each object 119900 isin 1198741198991
119896cup 119874
1198993
119896cup 119874(
larr99788899788899788811989911198993) Here the union
of 1198741198991
119896 1198741198993
119896 and 119874(larr997888997888997888119899
11198993) becomes 1198741198991
119896cup 119874
1198993
119896cup 119874(
larr99788899788899788811989911198993) =
1199001 119900
2 119900
3 119900
4 because 1198741198991
119896= 119900
1 119900
2 1198741198993
119896= 119900
3 119900
4 and
119874(larr99788899788899788811989911198993) = 119900
3 are given Figures 10(a) 10(b) 10(c) and 10(d)
illustrate dist(119902 1199001) dist(119902 119900
2) dist(119902 119900
3) and dist(119902 119900
4)
respectively Recall that 1199001isin 119874
1198991
119896 119900
2isin 119874
1198991
119896 119900
3isin 119874
1198993
119896cup
119874(larr99788899788899788811989911198993) and 119900
4isin 119874
1198993
119896hold
To partition a segment 120572120573 into safe segments it isessential to identify the 119896th NN 119900
119896th at a query point 119902 isin120572120573 among the qualifying objects 119900 isin 119874
120572
119896cup 119874
120573
119896cup 119874(120572120573)
Mobile Information Systems 9
Table 3 Computation of safe segments for the example query region
120572120573 120572 120573 119874120572
119896119874120573
119896119874(120572120573) Ω(120572120573)
larr99788899788899788811989911198993
1198991
1198993
1199001 119900
2 119900
3 119900
4 119900
3 ⟨
larr99788899788899788811989911199003 119900
1 119900
2⟩ ⟨
997888997888997888rarr11989931199003 119900
2 119900
3⟩ ⟨119899
3 119900
3 119900
4⟩
11989921198993
1198992
1198993
1199004 119900
5 119900
3 119900
4 119900
4 ⟨119899
2119904 119900
4 119900
5⟩ ⟨119899
3119904 119900
3 119900
4⟩
larr99788899788899788811989931198994
1198993
1198994
1199003 119900
4 119900
3 119900
4 0 ⟨
larr99788899788899788811989931198994 119900
3 119900
4⟩
10
3
7
n1 n3
o1
(a) dist(q o1) = len(q n1) + 3
7
2
9
n1 n3
o2
(b) dist(q o2) = len(q n1) + 2
4
43
n1 n3
o3
o3
asympasymp
infin
997888997888997888rarrn3o3(c) dist(q o3) =len(q o3) if q isininfin otherwise
7
3
n1 n3
o4
asymp asymp
infin
q = n3infin otherwise(d) dist(q o4) =3 if
Figure 10 Plot of ist(119902 119900) where 119902 isin larr99788899788899788811989911198993and 119900 isin 119900
1 119900
2 119900
3 119900
4
Algorithm 2determines the skyline119874119896th that consists of (119909 119910)
pairs such that 119909 = len(120572 119902) and 119910 = dist(119902 119900119896th) hold for
each query point 119902 isin 120572120573The variable count keeps the numberof qualifying objects processed thus far which is initializedto 0 (line (1)) If count is less than 119896 then the skyline for119900119896th is determined by 119874
119896th = (119909 119910) | 119909 = len(120572 119902) 119910 =max(dist(119902 120579
119896th) dist(119902 119900)) for 119902 isin 120572120573 where 120579119896th keeps the119896th NN determined thus far (lines (4)-(5)) Otherwise (ie119888119900119906119899119905 ge 119896) the skyline for 119900
119896th is determined by 119874119896th =
(119909 119910) | 119909 = len(120572 119902) 119910 = min(dist(119902 120579119896th) dist(119902 119900))
for 119902 isin 120572120573 (lines (6)-(7)) Naturally count increases by 1whenever an object o is processed (line (8))
Figure 11 illustrates the partitioning of a segment larr99788899788899788811989911198993
into three safe segments using dist(119902 119900) for each object 119900 isin1198741198991
119896cup 119874
1198993
119896cup 119874(
larr99788899788899788811989911198993) Figure 11(a) shows the plot of dist(119902 119900)
for each object 119900 isin 1199001 119900
2 119900
3 119900
4 Note that to simplify the
presentation the interval in which dist(119902 119900) = infin holds isnot represented When a query point 119902 moves in a segmentlarr99788899788899788811989911198993 its 119896th NN 119900
119896th is determined using Algorithm 2 andis represented by the bold lines in Figure 11(b) Specificallyfor 119902 isin larr997888997888997888119899
11199003 the 119896th NN 119900
119896th is 1199001and thus the kNN set is
1199001 119900
2 Similarly for 119902 isin 997888997888997888rarr119899
31199003 the 119896th NN 119900
119896th is 1199002and
thus the kNN set is 1199002 119900
3 Finally for 119902 = 119899
3 the 119896th NN
119900119896th is 119900
3and thus the 119896NN set is 119900
3 119900
4 Consequently a
segmentlarr99788899788899788811989911198993is divided into three safe segments represented
by Ω(larr99788899788899788811989911198993) = ⟨
larr99788899788899788811989911199003 119900
1 119900
2⟩ ⟨997888997888997888rarr11989931199003 119900
2 119900
3⟩ ⟨119899
3 119900
3 119900
4⟩
Figures 12(a) 12(b) and 12(c) illustrate dist(119902 1199003)
dist(119902 1199004) and dist(119902 119900
5) respectively where 119902 refers to a
query point in a segment 11989921198993and 119900
3 119900
4 and 119900
5refer to
qualifying objects for the segment 11989921198993 Note that 119900
3isin 119874
1198993
119896
1199004isin 119874
1198992
119896cup 119874
1198993
119896cup 119874(119899
21198993) and 119900
5isin 119874
1198992
119896hold
Figure 13 illustrates the partitioning of a segment 11989921198993
into two safe segments using dist(119902 119900) for each object 119900 isin1198741198992
119896cup 119874
1198993
119896cup 119874(119899
21198993) Figure 13(a) shows the plot of dist(119902 119900)
for each object 119900 isin 1199003 119900
4 119900
5 When a query point 119902
moves in a segment 11989921198993 its 119896th NN 119900
119896th is represented bythe bold lines in Figure 13(b) where a point 119904 marked by afive-pointed star indicates the middle of the segment 119899
21198993
Specifically for 119902 isin 1198992119904 the 119896th NN 119900
119896th is 1199005and thus
the kNN set is 1199004 119900
5 Similarly for 119902 isin 119899
3119904 the 119896th NN
119900119896th is 119900
3and thus the kNN set is 119900
3 119900
4 Consequently
a segment 11989921198993is divided into two safe segments which
are represented as Ω(11989921198993) = ⟨119899
2119904 119900
4 119900
5⟩ ⟨119899
3119904 119900
3 119900
4⟩
Finally a segment larr99788899788899788811989931198994becomes a safe segment that is
10 Mobile Information Systems
Input k the number of requested NNs 119874120572
119896cup 119874
120573
119896cup 119874(120572120573) the set of qualifying objects for a segment 120572120573
Output 119874119896th the set of distances from q to its kth NN 119900
119896th (ie 119874119896th = (119909 119910) | 119909 = len(120572 119902) 119910 = dist(119902 119900119896th))
(1) 119888119900119906119899119905 larr 0 count keeps the number of objects processed thus far(2) 119874
119896th = (119909 119910) | 119909 = len(120572 119902) 119910 = 0 for 119902 isin 120572120573 119910 = dist(119902 119900119896th) is initialized to 0 for 119902 isin 120572120573
(3) for each object 119900 isin 119874120572
119896cup 119874
120573
119896cup 119874(120572120573) do qualifying objects are handled sequentially
(4) if 119888119900119906119899119905 lt 119896 then if the number of objects processed thus far is less than 119896(5) 119874
119896th = (119909 119910) | 119909 = len(120572 119902) 119910 = max(dist(119902 120579119896th) dist(119902 119900)) for 119902 isin 120572120573 120579
119896th is the 119896th NN thus far(6) else(7) 119874
119896th = (119909 119910) | 119909 = len(120572 119902) 119910 = min(dist(119902 120579119896th) dist(119902 119900)) for 119902 isin 120572120573
(8) 119888119900119906119899119905 larr 119888119900119906119899119905 + 1 count increases by 1 whenever an object 119900 is processed(9) return 119874
119896th
Algorithm 2 Determine skyline for kth NN (k 119874120572
119896cup 119874
120573
119896cup 119874(120572120573))
3 3
3 4
4
9
10
2
n1 n3o3
o1o2
o4
(a) Plot of dist(119902 119900) for119900 isin 119900
1 1199002 1199003 1199004
3 34
9
10
2
n1 n3o3
3 4
o1o2
o4
okth
(b) Ω(larr99788899788899788811989911198993) = ⟨
larr99788899788899788811989911199003
11990011199002⟩ ⟨997888997888997888rarr119899
31199003 119900
2 1199003⟩
⟨1198993 119900
3 1199004⟩
Figure 11 Partitioning of a segmentlarr99788899788899788811989911198993into three safe segments
9
4
5
n2 n3
o3
(a) dist(119902 1199003) =
len(119902 1198993) + 4
87
32
2 3n2 n3o4
o4
o4
(b) dist(119902 1199004) =
len(119902 1199004)
4
9
5n2 n3
o5
(c) dist(119902 1199005) =
len(119902 1198992) + 4
Figure 12 Plot of dist(119902 119900) where 119902 isin 11989921198993and 119900 isin 119900
3 119900
4 119900
5
Ω(larr99788899788899788811989931198994) = ⟨
larr99788899788899788811989931198994 119900
3 119900
4⟩ This is because 1198741198993
119896equals 1198741198994
119896
and 119874(larr99788899788899788811989931198994) is a subset of 1198741198993
119896 that is 1198741198993
119896= 119874
1198994
119896and
119874(larr99788899788899788811989931198994) sub 119874
1198993
119896
5 Monitoring Safe Segments inDynamic Spatial Networks
Figure 14 illustrates an example of changing the weight of anedge 997888997888997888rarr119899
11199001in a spatial network where it is assumed that 119896 = 2
is given For convenience we consider the query region 119876
4 4
2
2 3n2 n3o4
o5 o3
(a) Plot of dist(119902119900) for 119900 isin 119900
3 1199004
1199005
4
2
2 3
34
n2 n3o4 s
o5 o3
okth
(b) Ω(11989921198993) =
⟨1198992119904 119900
4 1199005⟩
⟨1198993119904 119900
3 1199004⟩
Figure 13 Partitioning of a segment 11989921198993into two safe segments
that consists of an edgelarr99788899788899788811989911198993 that is 119876 = larr997888997888997888119899
11198993 As shown
in Figure 14(b) when the weight of an edge 997888997888997888rarr11989911199001has been
updated from 3 to 5 at time 119905119895 this update may invalidate
the safe segments in the query region 119876 Therefore it isnecessary to monitor the validity of safe segments in a queryregion when the change occurs To this end we introduce aninfluential region to monitor the validity of safe segmentsThe influential region Ψ
119902for a query point 119902 is defined as a
set of points 119901 such that dist(119902 119901) le dist(119902 119900119896th) holds If the
weight of an edge changes inside influential region Ψ119902 the
kNN query at query point 119902 should be reevaluated to reflectthe change in the weight However if the weight of an edgechanges outside influential regionΨ
119902 the change can be safely
ignored Suppose that a query region 119876 is represented by aset 119876119904 of 119897 connected segments and a set 119876119887 of 119898 boundarypoints that is 119876119904
= 1199041 1199042 119904
119897 and 119876119887
= 1198871 1198872 119887
119898
Then the influential region Ψ119876for query region 119876 becomes
the union of the influential region for each query point 119902 isin 119876that isΨ
119876= ⋃
119902isin119876Ψ119902This can be represented simply asΨ
119876=
119876cup(⋃119898
119894=1Ψ119887119894) whereΨ
119887119894refers to the influential region at each
boundary point 119887119894of the query region119876 SpecificallyΨ
119887119894is the
set of points 119901 such that dist(119887119894 119901) le dist(119887
119894 119900
119887119894
119896th) holds Here119900119887119894
119896th is the farthest answer object from boundary point 119887119894 that
Mobile Information Systems 11
3 4
4 63
3
3
2
4
1
3
2
2
2
n1
n2n3
n6n5
n4
o5
o1
o4
o3
o2
(a) Query region119876 = larr99788899788899788811989911198993 at time 119905
119894
3
3
32
4
5 2
3
46
1
2
2
4
n1
n2n3
n6n5
n4
o5
o1
o4
o3
o2
(b) Updating the weight of 997888997888997888rarr11989911199001at time 119905
119895
Figure 14 Changing the weight of an edge in a dynamic spatial network where 119905119894lt 119905
119895
46
3
3
3
2
4
1
1
1
1
3
2
2
2 2 2
n1
n2n3
n6n5
n4
o5
o1
o4
o3
o2
1205951
1205952 1205953
(a) Influence region Ψ119876at time 119905
119894
41 1 3 4
4
3
5 2
2
2
2
2
2
21
2
1
1
n1
n2n3
n6n5
n4
o5
o1
o4
o3
o2
1205951
1205953
1205955
1205952
1205954
(b) Updated influence region Ψ119876at time 119905
119895
Figure 15 Updating the influence region for 119876
is for each answer object 119900 isin 119874119887119894
119896 dist(119887
119894 119900) le dist(119887
119894 119900
119887119894
119896th)holds
Figure 15(a) illustrates the influential region for the queryregion 119876 at time 119905
119894 where the dotted line and square
brackets mark the influential region and its boundary pointsrespectively A set of the two NNs at boundary point 119899
1is
1198741198991
119896= 119900
1 119900
2 and the 119896th NN of 119899
1is 1199001198991
119896th = 1199001 Thus thedistance from 119899
1to its 119896th NN 119900
1is dist(119899
1 119900
1) = 3 and thus
the influential region Ψ1198991
for a boundary point 1198991becomes
Ψ1198991= 997888997888997888rarr11989911199001997888997888997888997888997888rarr119899111990021198994 Similarly the influential regionΨ
1198993for a
boundary point 1198993evaluates Ψ
1198993= 997888997888997888rarr11989931199003 119899
311990041205951 119899
31198995 119899
51205952
11989951205953 because 1198741198993
119896= 119900
3 119900
4 1199001198993
119896th = 1199003 and dist(1198993 119900
3) = 4
are given Consequently the influential region Ψ119876for query
region119876 becomesΨ119876=larr99788899788899788811989911198993cupΨ
1198991cupΨ
1198993= larr99788899788899788811989911198993997888997888997888997888997888rarr119899111990021198994997888997888997888rarr11989931199003
119899311990041205951 119899
31198995 119899
51205952 119899
51205953 As shown in Figure 15(b) updating
the weight of edge 997888997888997888rarr11989911199001from 3 to 5 may affect the safe
segments for the query region119876This is because updated edge997888997888997888rarr11989911199001overlaps the influential region Ψ
119876for query region 119876
In this case the server reevaluates the qualifying objects forquery region 119876 and provides updated qualifying objects sothat the user can update safe segments If the safe segmentsare updated the influential region should be also updatedaccordinglyThus the influential region for query region119876 isupdated at time 119905
119895 as shown in Figure 15(b) Finally updates
to the weights of the edges for examplelarr99788899788899788811989921199001 119899
21199005larr997888997888997888119899
31198994 and
11989941198996 that do not overlap the influential region can be safely
ignoredAlgorithm 3 monitors the validity of safe segments in a
query region when the weight of edges changes over timeAssume that the weight of edge 119899
119894119899119895is updated Subsequently
the server checks if edge 119899119894119899119895overlaps the influential region
Ψ119876for query region 119876 If the edge with the updated weight
does not overlap the influential region the update is safelyignored (lines (1)-(2)) Otherwise (ie Ψ
119876cap 119899
119894119899119895= 0) the
server requests that query object 119902 updates the query region(line (4)) Consequently 119902 submits a kRNNquery for updatedquery region119876updThe server then evaluates the kRNNqueryfor 119876upd and returns the kRNN query result Σ
119876updto 119902 (line
(5)) The query object then determines safe segments usingΣ119876upd
(line (6)) Finally the server updates the influentialregion accordingly (line (7))
6 Performance Evaluation
We describe our experimental settings in Section 61 andpresent the results of our experiments using real-life roadmaps in Section 62
61 Experimental Settings In the experiments we use tworeal-life roadmaps obtained from [27] to explore the impact
12 Mobile Information Systems
Input Ψ119876 influential region 119899
119894119899119895 updated edge
Output none(1) if Ψ
119876cap 119899
119894119899119895= 0 then an update to edge 119899
119894119899119895that does not overlap Ψ
119876is ignored
(2) ignore the update in the weight of edge 119899119894119899119895
(3) else this means that Ψ119876cap 119899
119894119899119895= 0
(4) 119876upd larr Update query region () server requests that 119902 update the query region(5) Σ
119876updlarr Evaluate 119896RNN query (119876upd 119896) server evaluates 119896RNN query for an updated query region
(6) Ω119876upd
larr Update safe segments (Σ119876upd
119896) 119902 determines safe segments inside the updated query region(7) Ψ
119876updlarr Update influential region (119876upd 119896) server updates influential region accordingly
Algorithm 3 Monitor safe segments (Ψ119876 119899
119894119899119895)
Table 4 Experimental parameter settings
Parameter RangeNumber of requested NNs (119896) 2 4 8 16 32Ratio of directed edge sequences to total edge sequences (119877dir) 0 5 10 20 50 ()Ratio of updated edge sequences to total edge sequences per timestamp (119877upd) 0 03 05 07 1 ()Size of query region (119876sz) 1 2 4 8 16
Number of data points (119873data)1 3 5 7 10 (times104) for NA1 3 5 7 10 (times103) for SJ
Speed of query points (119881qry)20 40 60 80 100 (kmh) for NA20 40 60 80 100 (kmh) for SJ
Distribution of data points (119863data) UniformDistribution of query points (119863qry) UniformNumber of query points (119873qry) 1000Road map NA SJ
of the edge sequence length on the performance of MORANThe first road map comprising 175813 nodes and 179179edges includes major roads in North America (NA) andcorresponds approximately to a data universe of 25times107 km2The second road map comprising 18263 nodes and 23874edges includes major roads in San Joaquin County (SJ)California and corresponds approximately to a data universeof 36 times 103 km2 For the first road map NA the numberof edge sequences and their average length are 12416 and29052m respectively For the second road map SJ thenumber of edge sequences and their average length are 20040and 248m respectively Table 4 summarizes the parametersused in the experiments In each experiment we vary a singleparameter in the range shown and set the other parameters tothe default values marked in boldWe simulate moving querypoints using a network-based moving objects generator [28]The number of query objects is set to 1000The size of a queryregion is determined by the number of edge sequences thatconstitute the query region The directed and updated edgesequences are selected randomly irrespective of the locationsof the data and query objects The length of an updated edgesequence is selected randomly to be between 01 and 10 timesthe original length For example if 119877upd is set to 05 and thenumber of edge sequences is 12416 then 62 edge sequences
are selected randomly every timestamp and their weights areupdated
As a benchmark against MORAN we use kRNN-E [5]without information of the precomputed shortest distancesbased on a shared execution paradigm to remove the redun-dant search overhead We choose kRNN-E instead of kRNN-F [5] with information of all the precomputed shortestdistances although kRNN-F typically outperforms kRNN-E The reason for this is that the precomputed distancesamong nodes are frequently invalidated by the updates tothe weights of the edges which makes it difficult to maintainthe precomputed distances To make kRNN-F applicable toour problem scenarios we can consider applying hierarchicaland goal-directed speed-up techniques [29] for DijkstrarsquosalgorithmThis approach can help to reduce the computationtime only at the server side and thus would not affect ourexperimental results Recall that the query processing at theserver is orthogonal to this study and that MORAN focuseson reducing the computation frequency and time taken atthe client side to evaluateMkRNN queries Our experimentalresults provide the average values per timestamp while 1000query points run for 600 timestamps Note that for roadmapNA the speed of the query points is 100 kmh by defaultwhereas for road map SJ the speed is 60 kmh by default
Mobile Information Systems 13
All algorithms are implemented in C++ and executed on adesktop PC with a 34GHz processor and 16GB of memory
62 Experimental Results Figure 16 shows a comparison ofthe query processing times at the client side of MORANand kRNN-E for evaluating MkRNN queries in road mapNA where each chart illustrates the effect of varying asingle parameter in Table 4 The values in the parenthesesindicate the computation frequency per timestamp Clearlythe computation frequency of kRNN-E equals the numberof query points and thus is omitted It should be noted thatthe server evaluates the MkRNN queries whenever the querypoints exit their query regions and thus the query processingtimes at the server side are the same forMORAN and kRNN-E Therefore we focus on comparing the query processingtimes at the client side
Figure 16(a) shows the query processing time as a func-tion of the number of requested NNs that is k Clearly thequery processing time at the client side increaseswith k How-ever the query processing time of MORAN is significantlyshorter than that of kRNN-E for all cases The reason for thisis that kRNN-E evaluates kNNquerieswhenever query pointsmove Conversely MORAN determines safe segments whenquery points enter new edge sequences or when the queryresults provided by the server become invalidated because ofupdated traffic conditions
Figure 16(b) shows the query processing time as a func-tion of the ratio of directed edge sequences to the totalnumber of edge sequences that is 119877dir Clearly 119877dir = 0refers to an undirected spatial networkThe query processingtimes at the client side of both methods are insensitive to thevalue of119877dirThe query processing time ofMORAN is shorterthan that of kRNN-E regardless of the value of 119877dir
Figure 16(c) shows the query processing time as a func-tion of the ratio of updated edge sequences to the totalnumber of edge sequences per timestamp that is 119877upd Here119877upd = 0 refers to a static spatial network The length of anupdated edge sequence is selected randomly frombetween 01and 10 times the original length Clearly the query processingtime of kRNN-E is almost constant regardless of the valueof 119877upd because query points in kRNN-E issue kNN queriesat each timestamp However the query processing time ofMORAN increases linearly with 119877upd because the probabilitythat the influential region of a query region overlaps anyupdated edge sequence increases with 119877upd Therefore alarger value of 119877upd leads to a longer query processing time
Figure 16(d) shows the query processing time as a func-tion of the size of the query region that is 119876sz Clearly thequery processing time increases with119876sz However the queryprocessing time of MORAN is clearly shorter than that ofkRNN-E regardless of the value of 119876sz
Figure 16(e) shows the query processing time as a func-tion of the number of data points that is 119873data In generalas 119873data increases the search space decreases and thus thequery processing time at the server side decreases accord-ingly However the query processing time at the client sideincreases with119873dataThis is because the number of qualifyingdata points handled at the client side increases with 119873data
Although the query processing time of MORAN increasesmore rapidly with 119873data than that of kRNN-E the queryprocessing time of MORAN is still shorter than that ofkRNN-E for 10 k le 119873data le 70 k However for119873data = 100 kthe query processing time of MORAN is 129 times longerthan that of kRNN-E
Figure 16(f) shows the query processing time as a func-tion of the speed of the query points that is 119881qry The queryprocessing time ofMORAN ismore sensitive to119881qry than thatof kRNN-E However the query processing time of MORANis clearly shorter than that of kRNN-E for all cases
Figure 17 shows a comparison of the query processingtimes at the client side of MORAN and kRNN-E for eval-uating MkRNN queries in road map SJ As when road mapNA is used when road map SJ is used the query processingtime of MORAN is clearly shorter than that of kRNN-E Asshown in Figure 17(a) the query processing time increaseswith k for the same reason as discussed earlier in the case ofFigure 16(a) As shown in Figure 17(b) the query processingtimes are not sensitive to the value of 119877dir As shown inFigure 17(c) the query processing time of kRNN-E remainsstable regardless of the value of 119877upd Conversely the queryprocessing time of MORAN increases with 119877upd because alarger value of 119877upd affects the influential regions of morequery points As shown in Figure 17(d) the query processingtime increases with 119876sz because the number of qualifyingdata points handled at the client side also increases with119876sz As shown in Figure 17(e) as 119873data increases the queryprocessing times decrease This is closely related to the sizeof the influential regions Specifically as 119873data increasesthe influential region decreases and thus updating weightsof edge sequences affects the influential regions of morequery points As shown in Figure 17(f) the query processingtime of MORAN increases with 119881qry for the same reason asdiscussed earlier in the case of Figure 16(f) whereas the queryprocessing time of kRNN-E remains stable regardless of thevalue of 119881qry
7 Conclusion
We proposed a new algorithm called MORAN for pro-cessing MkRNN queries in directed and dynamic spatialnetworks Existing studies focus on reducing redundant com-putation costs at the server side while processing snapshotkRNN queries in undirected and static spatial networksHowever MORAN clearly decreases the computation timeand frequency at the client side by dividing the query regioninto safe segments while processing MkRNN queries indirected and dynamic spatial networksThe influential regionfor a query region is introduced to monitor the impact of theupdated traffic conditions on the safe segments The resultsof experiments using real-life road maps demonstrate thatMORAN clearly outperforms kRNN-E for various workloadsin terms of the computation time and frequency We plan toextend our approach to processing sophisticated queries suchas kNN joins and top-k spatial preference queries in directedand dynamic spatial networks
14 Mobile Information Systems
k
(67)
2
MORAN
4 8 16 32
(73)
(83) (106)
(137)
0
10
20
30
40
CPU
tim
e at c
lient
side
(ms)
kRNN-E
(a) Effect of 119896
0 5 10 20 50
(90) (83) (83) (83) (81)
MORAN
0
5
10
15
20
CPU
tim
e at c
lient
side
(ms)
Rdir ()
kRNN-E
(b) Effect of 119877dir
00 03 05 07 10
(1)
(72) (83)
(157) (158)
MORAN
0
5
10
15
20
CPU
tim
e at c
lient
side
(ms)
Rupd ()
kRNN-E
(c) Effect of 119877upd
1 2 4 8 16
(66) (68) (83) (98)
(144)
MORAN
0
8
16
24
32CP
U ti
me a
t clie
nt si
de (m
s)
Qsz
kRNN-E
(d) Effect of119876sz
(163) (99)
(83) (80)
(79)
MORAN
0
8
16
24
32
CPU
tim
e at c
lient
side
(ms)
10 30 50 70 100
kRNN-E
Ndata (k)
(e) Effect of119873data
20 40 60 80 100
(95) (74) (81) (70) (83)
MORANkRNN-E
0
8
16
24
32
CPU
tim
e at c
lient
side
(ms)
Vqry (kmh)
(f) Effect of 119881qry
Figure 16 Comparison of CPU time at the client side for road map NA
Mobile Information Systems 15
(157) (209)(280)
(383)
(536)
k
2
MORAN
4 8 16 320
8
16
24
32
CPU
tim
e at c
lient
side
(ms)
kRNN-E
(a) Effect of 119896
(366) (286) (280) (272) (243)
MORAN
0 5 10 20 500
5
10
15
20
CPU
tim
e at c
lient
side
(ms)
Rdir ()
kRNN-E
(b) Effect of 119877dir
(26)(230) (280) (391) (429)
MORAN
00 03 05 07 10Rupd ()
0
5
10
15
20
CPU
tim
e at c
lient
side
(ms)
kRNN-E
(c) Effect of 119877upd
(277) (276) (280)(307)
(371)
MORAN
1 2 4 8 160
8
16
24
32CP
U ti
me a
t clie
nt si
de (m
s)
Qsz
kRNN-E
(d) Effect of119876sz
(612)
(359) (280) (232) (211)
MORAN
0
8
16
24
32
CPU
tim
e at c
lient
side
(ms)
1 3 5 7 10
kRNN-E
Ndata (k)
(e) Effect of119873data
(248) (265) (280) (286) (328)
MORAN
20 40 60 80 1000
5
10
15
20
CPU
tim
e at c
lient
side
(ms)
Vqry (kmh)
kRNN-E
(f) Effect of 119881qry
Figure 17 Comparison of CPU time at the client side for road map SJ
16 Mobile Information Systems
Notations and Their Definitions
119899119894119899119895 Edge connecting two adjacent nodes 119899
119894
and 119899119895
119899119904119899119904+1sdot sdot sdot 119899
119890 Edge sequence where 119899
119904(or 119899
119890) is the
start (or end) boundary node and theother nodes 119899
119904+1 119899
119890minus1 are
intermediate nodesdist(119901
1 119901
2) Length of the shortest path from point 119901
1
to point 1199012
len(1199011 119901
2) Length of the segment connecting two
points 1199011and 119901
2 such that 119901
1and 119901
2are
located in the same edge sequence119899119904119899119904+1sdot sdot sdot 119899
119890
119902 Query point119896 Number of requested NNs119874119901
119896 Set of kNNs at point 119901
120572120573 Segment that belongs to an edgesequence
119874(120572120573) Set of objects in segment 120572120573119900119896th The 119896th NN of query point 119902Ψ119902 Influence region for query point 119902
Ψ119876 Influence region for query region 119876
Conflict of Interests
The authors declare that there is no conflict of interestsregarding the publication of this paper
Acknowledgment
This research was supported by Kyungpook National Univer-sity Research Fund 2014
References
[1] U Demiryurek F Banaei-Kashani and C Shahabi ldquoEfficientcontinuous nearest neighbor query in spatial networks usingEuclidean restrictionrdquo in Advances in Spatial and TemporalDatabases 11th International Symposium SSTD 2009 AalborgDenmark July 8ndash10 2009 Proceedings vol 5644 of Lecture Notesin Computer Science pp 25ndash43 Springer Berlin Germany2009
[2] M R Kolahdouzan and C Shahabi ldquoAlternative solutionsfor continuous K nearest neighbor queries in spatial networkdatabasesrdquo GeoInformatica vol 9 no 4 pp 321ndash341 2005
[3] E W Dijkstra ldquoA note on two problems in connexion withgraphsrdquoNumerischeMathematik vol 1 no 1 pp 269ndash271 1959
[4] H Samet J Sankaranarayanan and H Alborzi ldquoScalablenetwork distance browsing in spatial databasesrdquo in Proceedingsof the SIGMOD International Conference on Management ofData (SIGMOD rsquo08) pp 43ndash54 Vancouver Canada June 2008
[5] J Bao C-Y ChowM FMokbel andW-S Ku ldquoEfficient evalu-ation of k-range nearest neighbor queries in road networksrdquo inProceedings of the 11th IEEE International Conference on MobileData Management (MDM rsquo10) pp 115ndash124 Kansas City MoUSA May 2010
[6] W-S Ku Y Chen and R Zimmermann ldquoPrivacy protectedspatial query processing for advanced location based servicesrdquo
Wireless Personal Communications vol 51 no 1 pp 53ndash652009
[7] K Mouratidis and M L Yiu ldquoAnonymous query processingin road networksrdquo IEEE Transactions on Knowledge and DataEngineering vol 22 no 1 pp 2ndash15 2010
[8] T Wang and L Liu ldquoPrivacy-aware mobile services over roadnetworksrdquo Proceedings of the VLDB Endowment vol 2 no 1pp 1042ndash1053 2009
[9] G Ghinita P Kalnis and S Skiadopoulos ldquoMobiHide amobilea peer-to-peer system for anonymous location-basedqueriesrdquo in Proceedings of the 10th International Symposium onSpatial and Temporal Databases (SSTD rsquo07) Boston MA USAJuly 2007 pp 221ndash238 Springer 2007
[10] S Ilarri E Mena and A Illarramendi ldquoLocation-dependentquery processing where we are and where we are headingrdquoACM Computing Surveys vol 42 no 3 article 12 2010
[11] H Al-Khalidi D Taniar J Betts and S Alamri ldquoDynamicsafe regions for moving range queries in mobile navigationrdquoInternational Journal of Ad Hoc and Ubiquitous Computing vol16 no 4 pp 250ndash259 2014
[12] H Al-Khalidi D Taniar J Betts and S Alamri ldquoMonitoringmoving queries inside a safe regionrdquo The Scientific WorldJournal vol 2014 Article ID 630396 13 pages 2014
[13] H-J Cho S J Kwon and T-S Chung ldquoA safe exit algorithmfor continuous nearest neighbor monitoring in road networksrdquoMobile Information Systems vol 9 no 1 pp 37ndash53 2013
[14] H-J Cho K Ryu and T-S Chung ldquoAn efficient algorithm forcomputing safe exit points of moving range queries in directedroad networksrdquo Information Systems vol 41 pp 1ndash19 2014
[15] C Li Y Gu J Qi G Yu R Zhang andW Yi ldquoProcessing mov-ing kNN queries using influential neighbor setsrdquo Proceedings ofthe VLDB Endowment vol 8 no 2 pp 113ndash124 2014
[16] S Nutanong R Zhang E Tanin and L Kulik ldquoAnalysis andevaluation of V-kNN an efficient algorithm for moving kNNqueriesrdquo VLDB Journal vol 19 no 3 pp 307ndash332 2010
[17] D Yung M L Yiu and E Lo ldquoA safe-exit approach for efficientnetwork-based moving range queriesrdquo Data and KnowledgeEngineering vol 72 pp 126ndash147 2012
[18] Y Gao B Zheng G Chen C Chen and Q Li ldquoContinuousnearest-neighbor search in the presence of obstaclesrdquo ACMTransactions on Database Systems vol 36 no 2 article 9 2011
[19] Y Tao D Papadias and Q Shen ldquoContinuous nearest neighborsearchrdquo in Proceedings of the 28th International Conference onVery Large Data Bases (VLDB rsquo02) pp 287ndash298 Hong KongAugust 2002
[20] M Mokbel C Chow and W Aref ldquoThe new casper queryprocessing for location serviceswithout compromising privacyrdquoin Proceedings of the 32nd International Conference on VeryLarge Data Bases (VLDB rsquo06) pp 763ndash774 Seoul Republic ofKorea 2006
[21] P Kalnis G Ghinita K Mouratidis and D Papadias ldquoPre-venting location-based identity inference in anonymous spatialqueriesrdquo IEEE Transactions on Knowledge and Data Engineer-ing vol 19 no 12 pp 1719ndash1733 2007
[22] C Chow M Mokbel J Naps and S Nath ldquoApproximateevaluation of range nearest neighbor queries with qualityguaranteerdquo in Advances in Spatial and Temporal Databases 11thInternational Symposium SSTD 2009 Aalborg Denmark July 8ndash10 2009 Proceedings vol 5644 of Lecture Notes in ComputerScience pp 283ndash301 Springer Berlin Germany 2009
Mobile Information Systems 17
[23] J Xu X Tang H Hu and J Du ldquoPrivacy-conscious location-based queries in mobile environmentsrdquo IEEE Transactions onParallel and Distributed Systems vol 21 no 3 pp 313ndash326 2010
[24] A M Aly W G Aref and M Ouzzani ldquoSpatial queries withtwo kNN predicatesrdquo Proceedings of the VLDB Endowment vol5 no 11 pp 1100ndash1111 2012
[25] Y Gu G Yu and X Yu ldquoAn efficient method for k nearestneighbor searching in obstructed spatial databasesrdquo Journal ofInformation Science and Engineering vol 30 no 5 pp 1569ndash1583 2014
[26] K Mouratidis M L Yiu D Papadias and N MamoulisldquoContinuous nearest neighbormonitoring in road networksrdquo inProceedings of the 32nd International Conference on Very LargeData Bases (VLDB rsquo06) pp 43ndash54 Seoul Republic of KoreaSeptember 2006
[27] Real Datasets for Spatial Databases httpwwwcsfsuedusimlifeifeiSpatialDatasethtm
[28] T Brinkhoff ldquoA framework for generating network-based mov-ing objectsrdquo GeoInformatica vol 6 no 2 pp 153ndash180 2002
[29] R Bauer D Delling P Sanders D Schieferdecker D Schultesand D Wagner ldquoCombining hierarchical and goal-directedspeed-up techniques for dijkstrarsquos algorithmrdquo Journal of Exper-imental Algorithmics vol 15 article 23 2010
[30] M Kolahdouzan C Shahabi and M Kolahdouzan ldquoVoronoi-based k nearest neighbor search for spatial network databasesrdquoinProceedings of the 30th International Conference onVery LargeData Bases (VLDB rsquo04) vol 30 pp 840ndash851 2004
[31] D Papadias J Zhang N Mamoulis and Y Tao ldquoQueryprocessing in spatial network databasesrdquo in Proceedings of the29th International Conference on Very Large Data Bases (VLDBrsquo03) vol 29 pp 802ndash813 2003
Submit your manuscripts athttpwwwhindawicom
Computer Games Technology
International Journal of
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Distributed Sensor Networks
International Journal of
Advances in
FuzzySystems
Hindawi Publishing Corporationhttpwwwhindawicom
Volume 2014
International Journal of
ReconfigurableComputing
Hindawi Publishing Corporation httpwwwhindawicom Volume 2014
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Applied Computational Intelligence and Soft Computing
thinspAdvancesthinspinthinsp
Artificial Intelligence
HindawithinspPublishingthinspCorporationhttpwwwhindawicom Volumethinsp2014
Advances inSoftware EngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Electrical and Computer Engineering
Journal of
Journal of
Computer Networks and Communications
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Hindawi Publishing Corporation
httpwwwhindawicom Volume 2014
Advances in
Multimedia
International Journal of
Biomedical Imaging
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
ArtificialNeural Systems
Advances in
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
RoboticsJournal of
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Computational Intelligence and Neuroscience
Industrial EngineeringJournal of
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014
The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Human-ComputerInteraction
Advances in
Computer EngineeringAdvances in
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Mobile Information Systems 7
Table 2 Computation of dist(119902 119900) where 119902 isin 120572120573 and 119900 isin 119874120572
119896cup 119874
120573
119896cup 119874(120572120573)
Condition dist(119902 119900)
119900 isin 119874120572
119896minus (119874
120573
119896cup 119874(120572120573)) dist (119902 119900) = len (119902 120572) + dist (120572 119900)
119900 isin 119874120573
119896minus (119874
120572
119896cup 119874(120572120573)) dist (119902 119900) = len (119902 120573) + dist (120573 119900)
119900 isin 119874(120572120573) minus (119874120572
119896cup 119874
120573
119896) dist (119902 119900) = len (119902 119900)
119900 isin 119874120572
119896cap 119874
120573
119896minus 119874(120572120573) dist (119902 119900) = min (len (119902 120572) + dist (120572 119900) len (119902 120573) + dist (120573 119900))
119900 isin 119874120572
119896cap 119874(120572120573) minus 119874
120573
119896dist (119902 119900) = min (len (119902 120572) + dist (120572 119900) len (119902 119900))
119900 isin 119874120573
119896cap 119874(120572120573) minus 119874
120572
119896dist (119902 119900) = min (len (119902 120573) + dist (120573 119900) len (119902 119900))
119900 isin 119874120572
119896cap 119874
120573
119896cap 119874(120572120573) dist (119902 119900) = min (len (119902 120572) + dist (120572 119900) len (119902 120573) + dist (120573 119900) len (119902 119900))
120572
o
q 120573
dist(120572 o)
dist(120572 o) + len(120572 120573)
(a) If 119900 isin 119874120572
119896 then dist(119902 119900) = len(119902 120572) +
dist(120572 119900)
120572
o
120573
len(120572 120573) + dist(120573 o)
dist(120573 o)
(b) If 119900 isin 119874
120573
119896
then dist(119902 119900) = len(119902 120573) +dist(120573 119900)
o120572 q 120573
len(120572 o)
len(o 120573)
(c) If 119900 isin 119874(120572120573) thendist(119902 119900) = len(119902 119900)
Figure 6 Evaluation of dist(119902 119900) where 119902 isin 120572120573 and 119900 isin 119874120572
119896cup 119874
120573
119896cup 119874(120572120573)
cases 119900 isin 119874120572
119896 119900 isin 119874120573
119896 and 119900 isin 119874(120572120573) In this figure the
119910-axis represents dist(119902 119900) and the 119909-axis represents len(120572 119902)for 0 le len(120572 119902) le len(120572 120573) If 119900 isin 119874120572
119896 then dist(119902 119900) =
len(119902 120572) + dist(120572 119900) as shown in Figure 6(a) Similarly if119900 isin 119874
120573
119896 then dist(119902 119900) = len(119902 120573) + dist(120573 119900) as shown in
Figure 6(b) Finally if 119900 isin 119874(120572120573) then dist(119902 119900) = len(119902 119900)as shown in Figure 6(c)
Table 2 summarizes the evaluation of dist(119902 119900) for 119902 isin 120572120573and 119900 isin 119874120572
119896cup 119874
120573
119896cup 119874(120572120573) where MIN returns the minimum
of the values in the input array Because a qualifying object 119900belongs to a combination of119874120572
119896119874120573
119896 or119874(120572120573) a total of seven
possible cases are considered Note that dist(120572 119900) dist(120573 119900)len(120572 119900) and len(120573 119900) are given constants and dist(119902 119900) is thelength of the shortest path among multiple paths from 119902 and119900
Figure 7 shows an example of the change in dist(119902 119900)depending on the location of query point 119902 isin 119899
2119899511989961198993 For
simplicity we assume that the number of NNs requested atquery point 119902 is 119896 = 1 Then as shown in Figure 7(a) 1198741198992
119896
1198741198993
119896 and 119874(119899
2119899511989961198993) are evaluated as 1198741198992
119896= 119900 1198741198993
119896= 119900
and119874(1198992119899511989961198993) = 119900 respectively As shown in Figure 7(b)
the distance from 119902 to 119900 represented by the bold lines isdist(119902 119900) = len(119902 119900) if 119902 isin 119899
211989951198996 otherwise it is dist(119902 119900) =
len(119902 1198993) + 3 because dist(119899
2 119900) = 1 dist(119899
3 119900) = 3 and
len(1198992 119900) = 1 are given
Next we explore the change in network distance dist(119902 119900)for object 119900 isin 119874120572
119896cup 119874
120573
119896cup 119874(
997888rarr120572120573) when a query point 119902 is
located in a directed segment997888rarr120572120573 Figure 8 shows the change
in dist(119902 119900) for three cases 119900 isin 119874120572
119896 119900 isin 119874120573
119896 and 119900 isin 119874(
997888rarr120572120573)
1
2
1 2
1 16 5
n1 n4n2 n3
n5
n6o
q
(a) q isin n2n5n6n3
9
7
5
3
112 2
n2 n3n5 n6
o
o
o
(b) dist(q o) = len(q o) if q isin n2n5n6
len(q n3) + 3 otherwise
Figure 7 Computation of ist(119902 119900) where 119902 isin 1198992119899511989961198993and 119900 isin
1198741198992
119896cap 119874
1198993
119896cap 119874(119899
2119899511989961198993)
Note that the dotted lines indicate that no paths exist from119902 to 119900 for the corresponding intervals which are denoted bydist(119902 119900) = infin For object 119900 isin 119874120572
119896 as shown in Figure 8(a)
8 Mobile Information Systems
asympasymp
dist(120572 o) o
120572 q 120573
infin
(a) If o isin O120572k then dist(q o) = dist(120572 o) if q = 120572
infin otherwise
o
120572 q 120573
len(120572 120573)+dist(120573 o)
dist(120573 o)
(b) If o isin O120573
k then dist(q o) = len(q 120573) + dist(120573 o)
asympasymp
120572 qo 120573
len(120572 o)
infin
(997888rarr120572120573
997888rarr120572(c) If o isin O then dist(q o) =len(q o) if q isin o
infin otherwise)
Figure 8 Evaluation of dist(119902 119900) where 119902 isin997888rarr120572120573 and 119900 isin 119874120572
119896cup 119874
120573
119896cup
119874(997888rarr120572120573)
if 119902 = 120572 then dist(119902 119900) = dist(120572 119900) otherwise (ie 119902 isin997888rarr120572120573minus120572) dist(119902 119900) = infin Similarly if 119900 isin 119874120573
119896 then dist(119902 119900) =
len(119902 120573) + dist(120573 119900) as shown in Figure 8(b) Finally forobject 119900 isin 119874(
997888rarr120572120573) as shown in Figure 8(c) if 119902 isin 997888rarr120572119900 then
dist(119902 119900) = len(119902 119900) otherwise (ie 119902 isinlarr997888120573119900) dist(119902 119900) = infin
Here dist(119902 119900) is the length of the shortest path from 119902 and119900 where query point 119902 isin
997888rarr120572120573 and is thus determined using
Table 2 in the same way as 119902 isin 120572120573Figure 9 shows an example of the change in dist(119902 119900)
depending on the location of query point 119902 isin 997888997888997888997888997888rarr119899211989951198993 For
simplicity we assume that the number of NNs requested atquery point 119902 is 119896 = 1 Then as shown in Figure 9(a) 1198741198992
119896
1198741198993
119896 and 119874(997888997888997888997888997888rarr119899
211989951198993) are evaluated as 1198741198992
119896= 119900 1198741198993
119896= 119900
and 119874(997888997888997888997888997888rarr119899211989951198993) = 119900 respectively As shown in Figure 9(b)
the distance from 119902 to 119900 represented by the bold lines isdist(119902 119900) = len(119902 119900) if 119902 isin 997888997888rarr119899
2119900 otherwise it is dist(119902 119900) =
len(119902 1198993) + 3 because dist(119899
2 119900) = 1 dist(119899
3 119900) = 3 and
len(1198992 119900) = 1 are given
1
2
3
1
16 5
n1 n4n2 n3
n5
o
q
(a) q isin 997888997888997888997888997888rarrn2n5n3
21
3
3
9
n2 n3n5o
o
o
asympasymp
infin
997888997888rarrn2o(b) dist(q o) =len(q o) if q isinlen(q n3) + 3 otherwise
Figure 9 Computation of dist(119902 119900) where 119902 isin 997888997888997888997888997888rarr119899211989951198993and 119900 isin 1198741198992
119896cap
1198741198993
119896cap 119874(
997888997888997888997888997888rarr119899211989951198993)
43 Partitioning Example Query Region into Safe SegmentsWe now discuss the construction of safe segments for queryregion 119876 in Figure 3(a) Recall that the number of requestedNNs is 119896 = 2 and the query region includes three segmentsthat is 119876 = larr997888997888997888119899
11198993 119899
21198993larr99788899788899788811989931198994 Table 3 summarizes the com-
putation of the safe segments in query region 119876 Clearly thekNN set at a node 119899
3is evaluated only once and it is reused
multiple timesAs shown in Algorithm 1 MORAN determines the safe
segments for each segment in query region 119876 Therefore weshow the successive determination of the safe segments inlarr99788899788899788811989911198993 119899
21198993 and larr997888997888997888119899
31198994 It is clear that adjacent safe segments
with the same query result can be merged Recall that we candraw dist(119902 119900) by using a query point 119902 isin 120572120573 and an object119900 isin 119874
120572
119896cup 119874
120573
119896cup 119874(120572120573)
Figure 10 depicts dist(119902 119900) using a query point 119902 isin larr99788899788899788811989911198993
and each object 119900 isin 1198741198991
119896cup 119874
1198993
119896cup 119874(
larr99788899788899788811989911198993) Here the union
of 1198741198991
119896 1198741198993
119896 and 119874(larr997888997888997888119899
11198993) becomes 1198741198991
119896cup 119874
1198993
119896cup 119874(
larr99788899788899788811989911198993) =
1199001 119900
2 119900
3 119900
4 because 1198741198991
119896= 119900
1 119900
2 1198741198993
119896= 119900
3 119900
4 and
119874(larr99788899788899788811989911198993) = 119900
3 are given Figures 10(a) 10(b) 10(c) and 10(d)
illustrate dist(119902 1199001) dist(119902 119900
2) dist(119902 119900
3) and dist(119902 119900
4)
respectively Recall that 1199001isin 119874
1198991
119896 119900
2isin 119874
1198991
119896 119900
3isin 119874
1198993
119896cup
119874(larr99788899788899788811989911198993) and 119900
4isin 119874
1198993
119896hold
To partition a segment 120572120573 into safe segments it isessential to identify the 119896th NN 119900
119896th at a query point 119902 isin120572120573 among the qualifying objects 119900 isin 119874
120572
119896cup 119874
120573
119896cup 119874(120572120573)
Mobile Information Systems 9
Table 3 Computation of safe segments for the example query region
120572120573 120572 120573 119874120572
119896119874120573
119896119874(120572120573) Ω(120572120573)
larr99788899788899788811989911198993
1198991
1198993
1199001 119900
2 119900
3 119900
4 119900
3 ⟨
larr99788899788899788811989911199003 119900
1 119900
2⟩ ⟨
997888997888997888rarr11989931199003 119900
2 119900
3⟩ ⟨119899
3 119900
3 119900
4⟩
11989921198993
1198992
1198993
1199004 119900
5 119900
3 119900
4 119900
4 ⟨119899
2119904 119900
4 119900
5⟩ ⟨119899
3119904 119900
3 119900
4⟩
larr99788899788899788811989931198994
1198993
1198994
1199003 119900
4 119900
3 119900
4 0 ⟨
larr99788899788899788811989931198994 119900
3 119900
4⟩
10
3
7
n1 n3
o1
(a) dist(q o1) = len(q n1) + 3
7
2
9
n1 n3
o2
(b) dist(q o2) = len(q n1) + 2
4
43
n1 n3
o3
o3
asympasymp
infin
997888997888997888rarrn3o3(c) dist(q o3) =len(q o3) if q isininfin otherwise
7
3
n1 n3
o4
asymp asymp
infin
q = n3infin otherwise(d) dist(q o4) =3 if
Figure 10 Plot of ist(119902 119900) where 119902 isin larr99788899788899788811989911198993and 119900 isin 119900
1 119900
2 119900
3 119900
4
Algorithm 2determines the skyline119874119896th that consists of (119909 119910)
pairs such that 119909 = len(120572 119902) and 119910 = dist(119902 119900119896th) hold for
each query point 119902 isin 120572120573The variable count keeps the numberof qualifying objects processed thus far which is initializedto 0 (line (1)) If count is less than 119896 then the skyline for119900119896th is determined by 119874
119896th = (119909 119910) | 119909 = len(120572 119902) 119910 =max(dist(119902 120579
119896th) dist(119902 119900)) for 119902 isin 120572120573 where 120579119896th keeps the119896th NN determined thus far (lines (4)-(5)) Otherwise (ie119888119900119906119899119905 ge 119896) the skyline for 119900
119896th is determined by 119874119896th =
(119909 119910) | 119909 = len(120572 119902) 119910 = min(dist(119902 120579119896th) dist(119902 119900))
for 119902 isin 120572120573 (lines (6)-(7)) Naturally count increases by 1whenever an object o is processed (line (8))
Figure 11 illustrates the partitioning of a segment larr99788899788899788811989911198993
into three safe segments using dist(119902 119900) for each object 119900 isin1198741198991
119896cup 119874
1198993
119896cup 119874(
larr99788899788899788811989911198993) Figure 11(a) shows the plot of dist(119902 119900)
for each object 119900 isin 1199001 119900
2 119900
3 119900
4 Note that to simplify the
presentation the interval in which dist(119902 119900) = infin holds isnot represented When a query point 119902 moves in a segmentlarr99788899788899788811989911198993 its 119896th NN 119900
119896th is determined using Algorithm 2 andis represented by the bold lines in Figure 11(b) Specificallyfor 119902 isin larr997888997888997888119899
11199003 the 119896th NN 119900
119896th is 1199001and thus the kNN set is
1199001 119900
2 Similarly for 119902 isin 997888997888997888rarr119899
31199003 the 119896th NN 119900
119896th is 1199002and
thus the kNN set is 1199002 119900
3 Finally for 119902 = 119899
3 the 119896th NN
119900119896th is 119900
3and thus the 119896NN set is 119900
3 119900
4 Consequently a
segmentlarr99788899788899788811989911198993is divided into three safe segments represented
by Ω(larr99788899788899788811989911198993) = ⟨
larr99788899788899788811989911199003 119900
1 119900
2⟩ ⟨997888997888997888rarr11989931199003 119900
2 119900
3⟩ ⟨119899
3 119900
3 119900
4⟩
Figures 12(a) 12(b) and 12(c) illustrate dist(119902 1199003)
dist(119902 1199004) and dist(119902 119900
5) respectively where 119902 refers to a
query point in a segment 11989921198993and 119900
3 119900
4 and 119900
5refer to
qualifying objects for the segment 11989921198993 Note that 119900
3isin 119874
1198993
119896
1199004isin 119874
1198992
119896cup 119874
1198993
119896cup 119874(119899
21198993) and 119900
5isin 119874
1198992
119896hold
Figure 13 illustrates the partitioning of a segment 11989921198993
into two safe segments using dist(119902 119900) for each object 119900 isin1198741198992
119896cup 119874
1198993
119896cup 119874(119899
21198993) Figure 13(a) shows the plot of dist(119902 119900)
for each object 119900 isin 1199003 119900
4 119900
5 When a query point 119902
moves in a segment 11989921198993 its 119896th NN 119900
119896th is represented bythe bold lines in Figure 13(b) where a point 119904 marked by afive-pointed star indicates the middle of the segment 119899
21198993
Specifically for 119902 isin 1198992119904 the 119896th NN 119900
119896th is 1199005and thus
the kNN set is 1199004 119900
5 Similarly for 119902 isin 119899
3119904 the 119896th NN
119900119896th is 119900
3and thus the kNN set is 119900
3 119900
4 Consequently
a segment 11989921198993is divided into two safe segments which
are represented as Ω(11989921198993) = ⟨119899
2119904 119900
4 119900
5⟩ ⟨119899
3119904 119900
3 119900
4⟩
Finally a segment larr99788899788899788811989931198994becomes a safe segment that is
10 Mobile Information Systems
Input k the number of requested NNs 119874120572
119896cup 119874
120573
119896cup 119874(120572120573) the set of qualifying objects for a segment 120572120573
Output 119874119896th the set of distances from q to its kth NN 119900
119896th (ie 119874119896th = (119909 119910) | 119909 = len(120572 119902) 119910 = dist(119902 119900119896th))
(1) 119888119900119906119899119905 larr 0 count keeps the number of objects processed thus far(2) 119874
119896th = (119909 119910) | 119909 = len(120572 119902) 119910 = 0 for 119902 isin 120572120573 119910 = dist(119902 119900119896th) is initialized to 0 for 119902 isin 120572120573
(3) for each object 119900 isin 119874120572
119896cup 119874
120573
119896cup 119874(120572120573) do qualifying objects are handled sequentially
(4) if 119888119900119906119899119905 lt 119896 then if the number of objects processed thus far is less than 119896(5) 119874
119896th = (119909 119910) | 119909 = len(120572 119902) 119910 = max(dist(119902 120579119896th) dist(119902 119900)) for 119902 isin 120572120573 120579
119896th is the 119896th NN thus far(6) else(7) 119874
119896th = (119909 119910) | 119909 = len(120572 119902) 119910 = min(dist(119902 120579119896th) dist(119902 119900)) for 119902 isin 120572120573
(8) 119888119900119906119899119905 larr 119888119900119906119899119905 + 1 count increases by 1 whenever an object 119900 is processed(9) return 119874
119896th
Algorithm 2 Determine skyline for kth NN (k 119874120572
119896cup 119874
120573
119896cup 119874(120572120573))
3 3
3 4
4
9
10
2
n1 n3o3
o1o2
o4
(a) Plot of dist(119902 119900) for119900 isin 119900
1 1199002 1199003 1199004
3 34
9
10
2
n1 n3o3
3 4
o1o2
o4
okth
(b) Ω(larr99788899788899788811989911198993) = ⟨
larr99788899788899788811989911199003
11990011199002⟩ ⟨997888997888997888rarr119899
31199003 119900
2 1199003⟩
⟨1198993 119900
3 1199004⟩
Figure 11 Partitioning of a segmentlarr99788899788899788811989911198993into three safe segments
9
4
5
n2 n3
o3
(a) dist(119902 1199003) =
len(119902 1198993) + 4
87
32
2 3n2 n3o4
o4
o4
(b) dist(119902 1199004) =
len(119902 1199004)
4
9
5n2 n3
o5
(c) dist(119902 1199005) =
len(119902 1198992) + 4
Figure 12 Plot of dist(119902 119900) where 119902 isin 11989921198993and 119900 isin 119900
3 119900
4 119900
5
Ω(larr99788899788899788811989931198994) = ⟨
larr99788899788899788811989931198994 119900
3 119900
4⟩ This is because 1198741198993
119896equals 1198741198994
119896
and 119874(larr99788899788899788811989931198994) is a subset of 1198741198993
119896 that is 1198741198993
119896= 119874
1198994
119896and
119874(larr99788899788899788811989931198994) sub 119874
1198993
119896
5 Monitoring Safe Segments inDynamic Spatial Networks
Figure 14 illustrates an example of changing the weight of anedge 997888997888997888rarr119899
11199001in a spatial network where it is assumed that 119896 = 2
is given For convenience we consider the query region 119876
4 4
2
2 3n2 n3o4
o5 o3
(a) Plot of dist(119902119900) for 119900 isin 119900
3 1199004
1199005
4
2
2 3
34
n2 n3o4 s
o5 o3
okth
(b) Ω(11989921198993) =
⟨1198992119904 119900
4 1199005⟩
⟨1198993119904 119900
3 1199004⟩
Figure 13 Partitioning of a segment 11989921198993into two safe segments
that consists of an edgelarr99788899788899788811989911198993 that is 119876 = larr997888997888997888119899
11198993 As shown
in Figure 14(b) when the weight of an edge 997888997888997888rarr11989911199001has been
updated from 3 to 5 at time 119905119895 this update may invalidate
the safe segments in the query region 119876 Therefore it isnecessary to monitor the validity of safe segments in a queryregion when the change occurs To this end we introduce aninfluential region to monitor the validity of safe segmentsThe influential region Ψ
119902for a query point 119902 is defined as a
set of points 119901 such that dist(119902 119901) le dist(119902 119900119896th) holds If the
weight of an edge changes inside influential region Ψ119902 the
kNN query at query point 119902 should be reevaluated to reflectthe change in the weight However if the weight of an edgechanges outside influential regionΨ
119902 the change can be safely
ignored Suppose that a query region 119876 is represented by aset 119876119904 of 119897 connected segments and a set 119876119887 of 119898 boundarypoints that is 119876119904
= 1199041 1199042 119904
119897 and 119876119887
= 1198871 1198872 119887
119898
Then the influential region Ψ119876for query region 119876 becomes
the union of the influential region for each query point 119902 isin 119876that isΨ
119876= ⋃
119902isin119876Ψ119902This can be represented simply asΨ
119876=
119876cup(⋃119898
119894=1Ψ119887119894) whereΨ
119887119894refers to the influential region at each
boundary point 119887119894of the query region119876 SpecificallyΨ
119887119894is the
set of points 119901 such that dist(119887119894 119901) le dist(119887
119894 119900
119887119894
119896th) holds Here119900119887119894
119896th is the farthest answer object from boundary point 119887119894 that
Mobile Information Systems 11
3 4
4 63
3
3
2
4
1
3
2
2
2
n1
n2n3
n6n5
n4
o5
o1
o4
o3
o2
(a) Query region119876 = larr99788899788899788811989911198993 at time 119905
119894
3
3
32
4
5 2
3
46
1
2
2
4
n1
n2n3
n6n5
n4
o5
o1
o4
o3
o2
(b) Updating the weight of 997888997888997888rarr11989911199001at time 119905
119895
Figure 14 Changing the weight of an edge in a dynamic spatial network where 119905119894lt 119905
119895
46
3
3
3
2
4
1
1
1
1
3
2
2
2 2 2
n1
n2n3
n6n5
n4
o5
o1
o4
o3
o2
1205951
1205952 1205953
(a) Influence region Ψ119876at time 119905
119894
41 1 3 4
4
3
5 2
2
2
2
2
2
21
2
1
1
n1
n2n3
n6n5
n4
o5
o1
o4
o3
o2
1205951
1205953
1205955
1205952
1205954
(b) Updated influence region Ψ119876at time 119905
119895
Figure 15 Updating the influence region for 119876
is for each answer object 119900 isin 119874119887119894
119896 dist(119887
119894 119900) le dist(119887
119894 119900
119887119894
119896th)holds
Figure 15(a) illustrates the influential region for the queryregion 119876 at time 119905
119894 where the dotted line and square
brackets mark the influential region and its boundary pointsrespectively A set of the two NNs at boundary point 119899
1is
1198741198991
119896= 119900
1 119900
2 and the 119896th NN of 119899
1is 1199001198991
119896th = 1199001 Thus thedistance from 119899
1to its 119896th NN 119900
1is dist(119899
1 119900
1) = 3 and thus
the influential region Ψ1198991
for a boundary point 1198991becomes
Ψ1198991= 997888997888997888rarr11989911199001997888997888997888997888997888rarr119899111990021198994 Similarly the influential regionΨ
1198993for a
boundary point 1198993evaluates Ψ
1198993= 997888997888997888rarr11989931199003 119899
311990041205951 119899
31198995 119899
51205952
11989951205953 because 1198741198993
119896= 119900
3 119900
4 1199001198993
119896th = 1199003 and dist(1198993 119900
3) = 4
are given Consequently the influential region Ψ119876for query
region119876 becomesΨ119876=larr99788899788899788811989911198993cupΨ
1198991cupΨ
1198993= larr99788899788899788811989911198993997888997888997888997888997888rarr119899111990021198994997888997888997888rarr11989931199003
119899311990041205951 119899
31198995 119899
51205952 119899
51205953 As shown in Figure 15(b) updating
the weight of edge 997888997888997888rarr11989911199001from 3 to 5 may affect the safe
segments for the query region119876This is because updated edge997888997888997888rarr11989911199001overlaps the influential region Ψ
119876for query region 119876
In this case the server reevaluates the qualifying objects forquery region 119876 and provides updated qualifying objects sothat the user can update safe segments If the safe segmentsare updated the influential region should be also updatedaccordinglyThus the influential region for query region119876 isupdated at time 119905
119895 as shown in Figure 15(b) Finally updates
to the weights of the edges for examplelarr99788899788899788811989921199001 119899
21199005larr997888997888997888119899
31198994 and
11989941198996 that do not overlap the influential region can be safely
ignoredAlgorithm 3 monitors the validity of safe segments in a
query region when the weight of edges changes over timeAssume that the weight of edge 119899
119894119899119895is updated Subsequently
the server checks if edge 119899119894119899119895overlaps the influential region
Ψ119876for query region 119876 If the edge with the updated weight
does not overlap the influential region the update is safelyignored (lines (1)-(2)) Otherwise (ie Ψ
119876cap 119899
119894119899119895= 0) the
server requests that query object 119902 updates the query region(line (4)) Consequently 119902 submits a kRNNquery for updatedquery region119876updThe server then evaluates the kRNNqueryfor 119876upd and returns the kRNN query result Σ
119876updto 119902 (line
(5)) The query object then determines safe segments usingΣ119876upd
(line (6)) Finally the server updates the influentialregion accordingly (line (7))
6 Performance Evaluation
We describe our experimental settings in Section 61 andpresent the results of our experiments using real-life roadmaps in Section 62
61 Experimental Settings In the experiments we use tworeal-life roadmaps obtained from [27] to explore the impact
12 Mobile Information Systems
Input Ψ119876 influential region 119899
119894119899119895 updated edge
Output none(1) if Ψ
119876cap 119899
119894119899119895= 0 then an update to edge 119899
119894119899119895that does not overlap Ψ
119876is ignored
(2) ignore the update in the weight of edge 119899119894119899119895
(3) else this means that Ψ119876cap 119899
119894119899119895= 0
(4) 119876upd larr Update query region () server requests that 119902 update the query region(5) Σ
119876updlarr Evaluate 119896RNN query (119876upd 119896) server evaluates 119896RNN query for an updated query region
(6) Ω119876upd
larr Update safe segments (Σ119876upd
119896) 119902 determines safe segments inside the updated query region(7) Ψ
119876updlarr Update influential region (119876upd 119896) server updates influential region accordingly
Algorithm 3 Monitor safe segments (Ψ119876 119899
119894119899119895)
Table 4 Experimental parameter settings
Parameter RangeNumber of requested NNs (119896) 2 4 8 16 32Ratio of directed edge sequences to total edge sequences (119877dir) 0 5 10 20 50 ()Ratio of updated edge sequences to total edge sequences per timestamp (119877upd) 0 03 05 07 1 ()Size of query region (119876sz) 1 2 4 8 16
Number of data points (119873data)1 3 5 7 10 (times104) for NA1 3 5 7 10 (times103) for SJ
Speed of query points (119881qry)20 40 60 80 100 (kmh) for NA20 40 60 80 100 (kmh) for SJ
Distribution of data points (119863data) UniformDistribution of query points (119863qry) UniformNumber of query points (119873qry) 1000Road map NA SJ
of the edge sequence length on the performance of MORANThe first road map comprising 175813 nodes and 179179edges includes major roads in North America (NA) andcorresponds approximately to a data universe of 25times107 km2The second road map comprising 18263 nodes and 23874edges includes major roads in San Joaquin County (SJ)California and corresponds approximately to a data universeof 36 times 103 km2 For the first road map NA the numberof edge sequences and their average length are 12416 and29052m respectively For the second road map SJ thenumber of edge sequences and their average length are 20040and 248m respectively Table 4 summarizes the parametersused in the experiments In each experiment we vary a singleparameter in the range shown and set the other parameters tothe default values marked in boldWe simulate moving querypoints using a network-based moving objects generator [28]The number of query objects is set to 1000The size of a queryregion is determined by the number of edge sequences thatconstitute the query region The directed and updated edgesequences are selected randomly irrespective of the locationsof the data and query objects The length of an updated edgesequence is selected randomly to be between 01 and 10 timesthe original length For example if 119877upd is set to 05 and thenumber of edge sequences is 12416 then 62 edge sequences
are selected randomly every timestamp and their weights areupdated
As a benchmark against MORAN we use kRNN-E [5]without information of the precomputed shortest distancesbased on a shared execution paradigm to remove the redun-dant search overhead We choose kRNN-E instead of kRNN-F [5] with information of all the precomputed shortestdistances although kRNN-F typically outperforms kRNN-E The reason for this is that the precomputed distancesamong nodes are frequently invalidated by the updates tothe weights of the edges which makes it difficult to maintainthe precomputed distances To make kRNN-F applicable toour problem scenarios we can consider applying hierarchicaland goal-directed speed-up techniques [29] for DijkstrarsquosalgorithmThis approach can help to reduce the computationtime only at the server side and thus would not affect ourexperimental results Recall that the query processing at theserver is orthogonal to this study and that MORAN focuseson reducing the computation frequency and time taken atthe client side to evaluateMkRNN queries Our experimentalresults provide the average values per timestamp while 1000query points run for 600 timestamps Note that for roadmapNA the speed of the query points is 100 kmh by defaultwhereas for road map SJ the speed is 60 kmh by default
Mobile Information Systems 13
All algorithms are implemented in C++ and executed on adesktop PC with a 34GHz processor and 16GB of memory
62 Experimental Results Figure 16 shows a comparison ofthe query processing times at the client side of MORANand kRNN-E for evaluating MkRNN queries in road mapNA where each chart illustrates the effect of varying asingle parameter in Table 4 The values in the parenthesesindicate the computation frequency per timestamp Clearlythe computation frequency of kRNN-E equals the numberof query points and thus is omitted It should be noted thatthe server evaluates the MkRNN queries whenever the querypoints exit their query regions and thus the query processingtimes at the server side are the same forMORAN and kRNN-E Therefore we focus on comparing the query processingtimes at the client side
Figure 16(a) shows the query processing time as a func-tion of the number of requested NNs that is k Clearly thequery processing time at the client side increaseswith k How-ever the query processing time of MORAN is significantlyshorter than that of kRNN-E for all cases The reason for thisis that kRNN-E evaluates kNNquerieswhenever query pointsmove Conversely MORAN determines safe segments whenquery points enter new edge sequences or when the queryresults provided by the server become invalidated because ofupdated traffic conditions
Figure 16(b) shows the query processing time as a func-tion of the ratio of directed edge sequences to the totalnumber of edge sequences that is 119877dir Clearly 119877dir = 0refers to an undirected spatial networkThe query processingtimes at the client side of both methods are insensitive to thevalue of119877dirThe query processing time ofMORAN is shorterthan that of kRNN-E regardless of the value of 119877dir
Figure 16(c) shows the query processing time as a func-tion of the ratio of updated edge sequences to the totalnumber of edge sequences per timestamp that is 119877upd Here119877upd = 0 refers to a static spatial network The length of anupdated edge sequence is selected randomly frombetween 01and 10 times the original length Clearly the query processingtime of kRNN-E is almost constant regardless of the valueof 119877upd because query points in kRNN-E issue kNN queriesat each timestamp However the query processing time ofMORAN increases linearly with 119877upd because the probabilitythat the influential region of a query region overlaps anyupdated edge sequence increases with 119877upd Therefore alarger value of 119877upd leads to a longer query processing time
Figure 16(d) shows the query processing time as a func-tion of the size of the query region that is 119876sz Clearly thequery processing time increases with119876sz However the queryprocessing time of MORAN is clearly shorter than that ofkRNN-E regardless of the value of 119876sz
Figure 16(e) shows the query processing time as a func-tion of the number of data points that is 119873data In generalas 119873data increases the search space decreases and thus thequery processing time at the server side decreases accord-ingly However the query processing time at the client sideincreases with119873dataThis is because the number of qualifyingdata points handled at the client side increases with 119873data
Although the query processing time of MORAN increasesmore rapidly with 119873data than that of kRNN-E the queryprocessing time of MORAN is still shorter than that ofkRNN-E for 10 k le 119873data le 70 k However for119873data = 100 kthe query processing time of MORAN is 129 times longerthan that of kRNN-E
Figure 16(f) shows the query processing time as a func-tion of the speed of the query points that is 119881qry The queryprocessing time ofMORAN ismore sensitive to119881qry than thatof kRNN-E However the query processing time of MORANis clearly shorter than that of kRNN-E for all cases
Figure 17 shows a comparison of the query processingtimes at the client side of MORAN and kRNN-E for eval-uating MkRNN queries in road map SJ As when road mapNA is used when road map SJ is used the query processingtime of MORAN is clearly shorter than that of kRNN-E Asshown in Figure 17(a) the query processing time increaseswith k for the same reason as discussed earlier in the case ofFigure 16(a) As shown in Figure 17(b) the query processingtimes are not sensitive to the value of 119877dir As shown inFigure 17(c) the query processing time of kRNN-E remainsstable regardless of the value of 119877upd Conversely the queryprocessing time of MORAN increases with 119877upd because alarger value of 119877upd affects the influential regions of morequery points As shown in Figure 17(d) the query processingtime increases with 119876sz because the number of qualifyingdata points handled at the client side also increases with119876sz As shown in Figure 17(e) as 119873data increases the queryprocessing times decrease This is closely related to the sizeof the influential regions Specifically as 119873data increasesthe influential region decreases and thus updating weightsof edge sequences affects the influential regions of morequery points As shown in Figure 17(f) the query processingtime of MORAN increases with 119881qry for the same reason asdiscussed earlier in the case of Figure 16(f) whereas the queryprocessing time of kRNN-E remains stable regardless of thevalue of 119881qry
7 Conclusion
We proposed a new algorithm called MORAN for pro-cessing MkRNN queries in directed and dynamic spatialnetworks Existing studies focus on reducing redundant com-putation costs at the server side while processing snapshotkRNN queries in undirected and static spatial networksHowever MORAN clearly decreases the computation timeand frequency at the client side by dividing the query regioninto safe segments while processing MkRNN queries indirected and dynamic spatial networksThe influential regionfor a query region is introduced to monitor the impact of theupdated traffic conditions on the safe segments The resultsof experiments using real-life road maps demonstrate thatMORAN clearly outperforms kRNN-E for various workloadsin terms of the computation time and frequency We plan toextend our approach to processing sophisticated queries suchas kNN joins and top-k spatial preference queries in directedand dynamic spatial networks
14 Mobile Information Systems
k
(67)
2
MORAN
4 8 16 32
(73)
(83) (106)
(137)
0
10
20
30
40
CPU
tim
e at c
lient
side
(ms)
kRNN-E
(a) Effect of 119896
0 5 10 20 50
(90) (83) (83) (83) (81)
MORAN
0
5
10
15
20
CPU
tim
e at c
lient
side
(ms)
Rdir ()
kRNN-E
(b) Effect of 119877dir
00 03 05 07 10
(1)
(72) (83)
(157) (158)
MORAN
0
5
10
15
20
CPU
tim
e at c
lient
side
(ms)
Rupd ()
kRNN-E
(c) Effect of 119877upd
1 2 4 8 16
(66) (68) (83) (98)
(144)
MORAN
0
8
16
24
32CP
U ti
me a
t clie
nt si
de (m
s)
Qsz
kRNN-E
(d) Effect of119876sz
(163) (99)
(83) (80)
(79)
MORAN
0
8
16
24
32
CPU
tim
e at c
lient
side
(ms)
10 30 50 70 100
kRNN-E
Ndata (k)
(e) Effect of119873data
20 40 60 80 100
(95) (74) (81) (70) (83)
MORANkRNN-E
0
8
16
24
32
CPU
tim
e at c
lient
side
(ms)
Vqry (kmh)
(f) Effect of 119881qry
Figure 16 Comparison of CPU time at the client side for road map NA
Mobile Information Systems 15
(157) (209)(280)
(383)
(536)
k
2
MORAN
4 8 16 320
8
16
24
32
CPU
tim
e at c
lient
side
(ms)
kRNN-E
(a) Effect of 119896
(366) (286) (280) (272) (243)
MORAN
0 5 10 20 500
5
10
15
20
CPU
tim
e at c
lient
side
(ms)
Rdir ()
kRNN-E
(b) Effect of 119877dir
(26)(230) (280) (391) (429)
MORAN
00 03 05 07 10Rupd ()
0
5
10
15
20
CPU
tim
e at c
lient
side
(ms)
kRNN-E
(c) Effect of 119877upd
(277) (276) (280)(307)
(371)
MORAN
1 2 4 8 160
8
16
24
32CP
U ti
me a
t clie
nt si
de (m
s)
Qsz
kRNN-E
(d) Effect of119876sz
(612)
(359) (280) (232) (211)
MORAN
0
8
16
24
32
CPU
tim
e at c
lient
side
(ms)
1 3 5 7 10
kRNN-E
Ndata (k)
(e) Effect of119873data
(248) (265) (280) (286) (328)
MORAN
20 40 60 80 1000
5
10
15
20
CPU
tim
e at c
lient
side
(ms)
Vqry (kmh)
kRNN-E
(f) Effect of 119881qry
Figure 17 Comparison of CPU time at the client side for road map SJ
16 Mobile Information Systems
Notations and Their Definitions
119899119894119899119895 Edge connecting two adjacent nodes 119899
119894
and 119899119895
119899119904119899119904+1sdot sdot sdot 119899
119890 Edge sequence where 119899
119904(or 119899
119890) is the
start (or end) boundary node and theother nodes 119899
119904+1 119899
119890minus1 are
intermediate nodesdist(119901
1 119901
2) Length of the shortest path from point 119901
1
to point 1199012
len(1199011 119901
2) Length of the segment connecting two
points 1199011and 119901
2 such that 119901
1and 119901
2are
located in the same edge sequence119899119904119899119904+1sdot sdot sdot 119899
119890
119902 Query point119896 Number of requested NNs119874119901
119896 Set of kNNs at point 119901
120572120573 Segment that belongs to an edgesequence
119874(120572120573) Set of objects in segment 120572120573119900119896th The 119896th NN of query point 119902Ψ119902 Influence region for query point 119902
Ψ119876 Influence region for query region 119876
Conflict of Interests
The authors declare that there is no conflict of interestsregarding the publication of this paper
Acknowledgment
This research was supported by Kyungpook National Univer-sity Research Fund 2014
References
[1] U Demiryurek F Banaei-Kashani and C Shahabi ldquoEfficientcontinuous nearest neighbor query in spatial networks usingEuclidean restrictionrdquo in Advances in Spatial and TemporalDatabases 11th International Symposium SSTD 2009 AalborgDenmark July 8ndash10 2009 Proceedings vol 5644 of Lecture Notesin Computer Science pp 25ndash43 Springer Berlin Germany2009
[2] M R Kolahdouzan and C Shahabi ldquoAlternative solutionsfor continuous K nearest neighbor queries in spatial networkdatabasesrdquo GeoInformatica vol 9 no 4 pp 321ndash341 2005
[3] E W Dijkstra ldquoA note on two problems in connexion withgraphsrdquoNumerischeMathematik vol 1 no 1 pp 269ndash271 1959
[4] H Samet J Sankaranarayanan and H Alborzi ldquoScalablenetwork distance browsing in spatial databasesrdquo in Proceedingsof the SIGMOD International Conference on Management ofData (SIGMOD rsquo08) pp 43ndash54 Vancouver Canada June 2008
[5] J Bao C-Y ChowM FMokbel andW-S Ku ldquoEfficient evalu-ation of k-range nearest neighbor queries in road networksrdquo inProceedings of the 11th IEEE International Conference on MobileData Management (MDM rsquo10) pp 115ndash124 Kansas City MoUSA May 2010
[6] W-S Ku Y Chen and R Zimmermann ldquoPrivacy protectedspatial query processing for advanced location based servicesrdquo
Wireless Personal Communications vol 51 no 1 pp 53ndash652009
[7] K Mouratidis and M L Yiu ldquoAnonymous query processingin road networksrdquo IEEE Transactions on Knowledge and DataEngineering vol 22 no 1 pp 2ndash15 2010
[8] T Wang and L Liu ldquoPrivacy-aware mobile services over roadnetworksrdquo Proceedings of the VLDB Endowment vol 2 no 1pp 1042ndash1053 2009
[9] G Ghinita P Kalnis and S Skiadopoulos ldquoMobiHide amobilea peer-to-peer system for anonymous location-basedqueriesrdquo in Proceedings of the 10th International Symposium onSpatial and Temporal Databases (SSTD rsquo07) Boston MA USAJuly 2007 pp 221ndash238 Springer 2007
[10] S Ilarri E Mena and A Illarramendi ldquoLocation-dependentquery processing where we are and where we are headingrdquoACM Computing Surveys vol 42 no 3 article 12 2010
[11] H Al-Khalidi D Taniar J Betts and S Alamri ldquoDynamicsafe regions for moving range queries in mobile navigationrdquoInternational Journal of Ad Hoc and Ubiquitous Computing vol16 no 4 pp 250ndash259 2014
[12] H Al-Khalidi D Taniar J Betts and S Alamri ldquoMonitoringmoving queries inside a safe regionrdquo The Scientific WorldJournal vol 2014 Article ID 630396 13 pages 2014
[13] H-J Cho S J Kwon and T-S Chung ldquoA safe exit algorithmfor continuous nearest neighbor monitoring in road networksrdquoMobile Information Systems vol 9 no 1 pp 37ndash53 2013
[14] H-J Cho K Ryu and T-S Chung ldquoAn efficient algorithm forcomputing safe exit points of moving range queries in directedroad networksrdquo Information Systems vol 41 pp 1ndash19 2014
[15] C Li Y Gu J Qi G Yu R Zhang andW Yi ldquoProcessing mov-ing kNN queries using influential neighbor setsrdquo Proceedings ofthe VLDB Endowment vol 8 no 2 pp 113ndash124 2014
[16] S Nutanong R Zhang E Tanin and L Kulik ldquoAnalysis andevaluation of V-kNN an efficient algorithm for moving kNNqueriesrdquo VLDB Journal vol 19 no 3 pp 307ndash332 2010
[17] D Yung M L Yiu and E Lo ldquoA safe-exit approach for efficientnetwork-based moving range queriesrdquo Data and KnowledgeEngineering vol 72 pp 126ndash147 2012
[18] Y Gao B Zheng G Chen C Chen and Q Li ldquoContinuousnearest-neighbor search in the presence of obstaclesrdquo ACMTransactions on Database Systems vol 36 no 2 article 9 2011
[19] Y Tao D Papadias and Q Shen ldquoContinuous nearest neighborsearchrdquo in Proceedings of the 28th International Conference onVery Large Data Bases (VLDB rsquo02) pp 287ndash298 Hong KongAugust 2002
[20] M Mokbel C Chow and W Aref ldquoThe new casper queryprocessing for location serviceswithout compromising privacyrdquoin Proceedings of the 32nd International Conference on VeryLarge Data Bases (VLDB rsquo06) pp 763ndash774 Seoul Republic ofKorea 2006
[21] P Kalnis G Ghinita K Mouratidis and D Papadias ldquoPre-venting location-based identity inference in anonymous spatialqueriesrdquo IEEE Transactions on Knowledge and Data Engineer-ing vol 19 no 12 pp 1719ndash1733 2007
[22] C Chow M Mokbel J Naps and S Nath ldquoApproximateevaluation of range nearest neighbor queries with qualityguaranteerdquo in Advances in Spatial and Temporal Databases 11thInternational Symposium SSTD 2009 Aalborg Denmark July 8ndash10 2009 Proceedings vol 5644 of Lecture Notes in ComputerScience pp 283ndash301 Springer Berlin Germany 2009
Mobile Information Systems 17
[23] J Xu X Tang H Hu and J Du ldquoPrivacy-conscious location-based queries in mobile environmentsrdquo IEEE Transactions onParallel and Distributed Systems vol 21 no 3 pp 313ndash326 2010
[24] A M Aly W G Aref and M Ouzzani ldquoSpatial queries withtwo kNN predicatesrdquo Proceedings of the VLDB Endowment vol5 no 11 pp 1100ndash1111 2012
[25] Y Gu G Yu and X Yu ldquoAn efficient method for k nearestneighbor searching in obstructed spatial databasesrdquo Journal ofInformation Science and Engineering vol 30 no 5 pp 1569ndash1583 2014
[26] K Mouratidis M L Yiu D Papadias and N MamoulisldquoContinuous nearest neighbormonitoring in road networksrdquo inProceedings of the 32nd International Conference on Very LargeData Bases (VLDB rsquo06) pp 43ndash54 Seoul Republic of KoreaSeptember 2006
[27] Real Datasets for Spatial Databases httpwwwcsfsuedusimlifeifeiSpatialDatasethtm
[28] T Brinkhoff ldquoA framework for generating network-based mov-ing objectsrdquo GeoInformatica vol 6 no 2 pp 153ndash180 2002
[29] R Bauer D Delling P Sanders D Schieferdecker D Schultesand D Wagner ldquoCombining hierarchical and goal-directedspeed-up techniques for dijkstrarsquos algorithmrdquo Journal of Exper-imental Algorithmics vol 15 article 23 2010
[30] M Kolahdouzan C Shahabi and M Kolahdouzan ldquoVoronoi-based k nearest neighbor search for spatial network databasesrdquoinProceedings of the 30th International Conference onVery LargeData Bases (VLDB rsquo04) vol 30 pp 840ndash851 2004
[31] D Papadias J Zhang N Mamoulis and Y Tao ldquoQueryprocessing in spatial network databasesrdquo in Proceedings of the29th International Conference on Very Large Data Bases (VLDBrsquo03) vol 29 pp 802ndash813 2003
Submit your manuscripts athttpwwwhindawicom
Computer Games Technology
International Journal of
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Distributed Sensor Networks
International Journal of
Advances in
FuzzySystems
Hindawi Publishing Corporationhttpwwwhindawicom
Volume 2014
International Journal of
ReconfigurableComputing
Hindawi Publishing Corporation httpwwwhindawicom Volume 2014
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Applied Computational Intelligence and Soft Computing
thinspAdvancesthinspinthinsp
Artificial Intelligence
HindawithinspPublishingthinspCorporationhttpwwwhindawicom Volumethinsp2014
Advances inSoftware EngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Electrical and Computer Engineering
Journal of
Journal of
Computer Networks and Communications
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Hindawi Publishing Corporation
httpwwwhindawicom Volume 2014
Advances in
Multimedia
International Journal of
Biomedical Imaging
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
ArtificialNeural Systems
Advances in
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
RoboticsJournal of
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Computational Intelligence and Neuroscience
Industrial EngineeringJournal of
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014
The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Human-ComputerInteraction
Advances in
Computer EngineeringAdvances in
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
8 Mobile Information Systems
asympasymp
dist(120572 o) o
120572 q 120573
infin
(a) If o isin O120572k then dist(q o) = dist(120572 o) if q = 120572
infin otherwise
o
120572 q 120573
len(120572 120573)+dist(120573 o)
dist(120573 o)
(b) If o isin O120573
k then dist(q o) = len(q 120573) + dist(120573 o)
asympasymp
120572 qo 120573
len(120572 o)
infin
(997888rarr120572120573
997888rarr120572(c) If o isin O then dist(q o) =len(q o) if q isin o
infin otherwise)
Figure 8 Evaluation of dist(119902 119900) where 119902 isin997888rarr120572120573 and 119900 isin 119874120572
119896cup 119874
120573
119896cup
119874(997888rarr120572120573)
if 119902 = 120572 then dist(119902 119900) = dist(120572 119900) otherwise (ie 119902 isin997888rarr120572120573minus120572) dist(119902 119900) = infin Similarly if 119900 isin 119874120573
119896 then dist(119902 119900) =
len(119902 120573) + dist(120573 119900) as shown in Figure 8(b) Finally forobject 119900 isin 119874(
997888rarr120572120573) as shown in Figure 8(c) if 119902 isin 997888rarr120572119900 then
dist(119902 119900) = len(119902 119900) otherwise (ie 119902 isinlarr997888120573119900) dist(119902 119900) = infin
Here dist(119902 119900) is the length of the shortest path from 119902 and119900 where query point 119902 isin
997888rarr120572120573 and is thus determined using
Table 2 in the same way as 119902 isin 120572120573Figure 9 shows an example of the change in dist(119902 119900)
depending on the location of query point 119902 isin 997888997888997888997888997888rarr119899211989951198993 For
simplicity we assume that the number of NNs requested atquery point 119902 is 119896 = 1 Then as shown in Figure 9(a) 1198741198992
119896
1198741198993
119896 and 119874(997888997888997888997888997888rarr119899
211989951198993) are evaluated as 1198741198992
119896= 119900 1198741198993
119896= 119900
and 119874(997888997888997888997888997888rarr119899211989951198993) = 119900 respectively As shown in Figure 9(b)
the distance from 119902 to 119900 represented by the bold lines isdist(119902 119900) = len(119902 119900) if 119902 isin 997888997888rarr119899
2119900 otherwise it is dist(119902 119900) =
len(119902 1198993) + 3 because dist(119899
2 119900) = 1 dist(119899
3 119900) = 3 and
len(1198992 119900) = 1 are given
1
2
3
1
16 5
n1 n4n2 n3
n5
o
q
(a) q isin 997888997888997888997888997888rarrn2n5n3
21
3
3
9
n2 n3n5o
o
o
asympasymp
infin
997888997888rarrn2o(b) dist(q o) =len(q o) if q isinlen(q n3) + 3 otherwise
Figure 9 Computation of dist(119902 119900) where 119902 isin 997888997888997888997888997888rarr119899211989951198993and 119900 isin 1198741198992
119896cap
1198741198993
119896cap 119874(
997888997888997888997888997888rarr119899211989951198993)
43 Partitioning Example Query Region into Safe SegmentsWe now discuss the construction of safe segments for queryregion 119876 in Figure 3(a) Recall that the number of requestedNNs is 119896 = 2 and the query region includes three segmentsthat is 119876 = larr997888997888997888119899
11198993 119899
21198993larr99788899788899788811989931198994 Table 3 summarizes the com-
putation of the safe segments in query region 119876 Clearly thekNN set at a node 119899
3is evaluated only once and it is reused
multiple timesAs shown in Algorithm 1 MORAN determines the safe
segments for each segment in query region 119876 Therefore weshow the successive determination of the safe segments inlarr99788899788899788811989911198993 119899
21198993 and larr997888997888997888119899
31198994 It is clear that adjacent safe segments
with the same query result can be merged Recall that we candraw dist(119902 119900) by using a query point 119902 isin 120572120573 and an object119900 isin 119874
120572
119896cup 119874
120573
119896cup 119874(120572120573)
Figure 10 depicts dist(119902 119900) using a query point 119902 isin larr99788899788899788811989911198993
and each object 119900 isin 1198741198991
119896cup 119874
1198993
119896cup 119874(
larr99788899788899788811989911198993) Here the union
of 1198741198991
119896 1198741198993
119896 and 119874(larr997888997888997888119899
11198993) becomes 1198741198991
119896cup 119874
1198993
119896cup 119874(
larr99788899788899788811989911198993) =
1199001 119900
2 119900
3 119900
4 because 1198741198991
119896= 119900
1 119900
2 1198741198993
119896= 119900
3 119900
4 and
119874(larr99788899788899788811989911198993) = 119900
3 are given Figures 10(a) 10(b) 10(c) and 10(d)
illustrate dist(119902 1199001) dist(119902 119900
2) dist(119902 119900
3) and dist(119902 119900
4)
respectively Recall that 1199001isin 119874
1198991
119896 119900
2isin 119874
1198991
119896 119900
3isin 119874
1198993
119896cup
119874(larr99788899788899788811989911198993) and 119900
4isin 119874
1198993
119896hold
To partition a segment 120572120573 into safe segments it isessential to identify the 119896th NN 119900
119896th at a query point 119902 isin120572120573 among the qualifying objects 119900 isin 119874
120572
119896cup 119874
120573
119896cup 119874(120572120573)
Mobile Information Systems 9
Table 3 Computation of safe segments for the example query region
120572120573 120572 120573 119874120572
119896119874120573
119896119874(120572120573) Ω(120572120573)
larr99788899788899788811989911198993
1198991
1198993
1199001 119900
2 119900
3 119900
4 119900
3 ⟨
larr99788899788899788811989911199003 119900
1 119900
2⟩ ⟨
997888997888997888rarr11989931199003 119900
2 119900
3⟩ ⟨119899
3 119900
3 119900
4⟩
11989921198993
1198992
1198993
1199004 119900
5 119900
3 119900
4 119900
4 ⟨119899
2119904 119900
4 119900
5⟩ ⟨119899
3119904 119900
3 119900
4⟩
larr99788899788899788811989931198994
1198993
1198994
1199003 119900
4 119900
3 119900
4 0 ⟨
larr99788899788899788811989931198994 119900
3 119900
4⟩
10
3
7
n1 n3
o1
(a) dist(q o1) = len(q n1) + 3
7
2
9
n1 n3
o2
(b) dist(q o2) = len(q n1) + 2
4
43
n1 n3
o3
o3
asympasymp
infin
997888997888997888rarrn3o3(c) dist(q o3) =len(q o3) if q isininfin otherwise
7
3
n1 n3
o4
asymp asymp
infin
q = n3infin otherwise(d) dist(q o4) =3 if
Figure 10 Plot of ist(119902 119900) where 119902 isin larr99788899788899788811989911198993and 119900 isin 119900
1 119900
2 119900
3 119900
4
Algorithm 2determines the skyline119874119896th that consists of (119909 119910)
pairs such that 119909 = len(120572 119902) and 119910 = dist(119902 119900119896th) hold for
each query point 119902 isin 120572120573The variable count keeps the numberof qualifying objects processed thus far which is initializedto 0 (line (1)) If count is less than 119896 then the skyline for119900119896th is determined by 119874
119896th = (119909 119910) | 119909 = len(120572 119902) 119910 =max(dist(119902 120579
119896th) dist(119902 119900)) for 119902 isin 120572120573 where 120579119896th keeps the119896th NN determined thus far (lines (4)-(5)) Otherwise (ie119888119900119906119899119905 ge 119896) the skyline for 119900
119896th is determined by 119874119896th =
(119909 119910) | 119909 = len(120572 119902) 119910 = min(dist(119902 120579119896th) dist(119902 119900))
for 119902 isin 120572120573 (lines (6)-(7)) Naturally count increases by 1whenever an object o is processed (line (8))
Figure 11 illustrates the partitioning of a segment larr99788899788899788811989911198993
into three safe segments using dist(119902 119900) for each object 119900 isin1198741198991
119896cup 119874
1198993
119896cup 119874(
larr99788899788899788811989911198993) Figure 11(a) shows the plot of dist(119902 119900)
for each object 119900 isin 1199001 119900
2 119900
3 119900
4 Note that to simplify the
presentation the interval in which dist(119902 119900) = infin holds isnot represented When a query point 119902 moves in a segmentlarr99788899788899788811989911198993 its 119896th NN 119900
119896th is determined using Algorithm 2 andis represented by the bold lines in Figure 11(b) Specificallyfor 119902 isin larr997888997888997888119899
11199003 the 119896th NN 119900
119896th is 1199001and thus the kNN set is
1199001 119900
2 Similarly for 119902 isin 997888997888997888rarr119899
31199003 the 119896th NN 119900
119896th is 1199002and
thus the kNN set is 1199002 119900
3 Finally for 119902 = 119899
3 the 119896th NN
119900119896th is 119900
3and thus the 119896NN set is 119900
3 119900
4 Consequently a
segmentlarr99788899788899788811989911198993is divided into three safe segments represented
by Ω(larr99788899788899788811989911198993) = ⟨
larr99788899788899788811989911199003 119900
1 119900
2⟩ ⟨997888997888997888rarr11989931199003 119900
2 119900
3⟩ ⟨119899
3 119900
3 119900
4⟩
Figures 12(a) 12(b) and 12(c) illustrate dist(119902 1199003)
dist(119902 1199004) and dist(119902 119900
5) respectively where 119902 refers to a
query point in a segment 11989921198993and 119900
3 119900
4 and 119900
5refer to
qualifying objects for the segment 11989921198993 Note that 119900
3isin 119874
1198993
119896
1199004isin 119874
1198992
119896cup 119874
1198993
119896cup 119874(119899
21198993) and 119900
5isin 119874
1198992
119896hold
Figure 13 illustrates the partitioning of a segment 11989921198993
into two safe segments using dist(119902 119900) for each object 119900 isin1198741198992
119896cup 119874
1198993
119896cup 119874(119899
21198993) Figure 13(a) shows the plot of dist(119902 119900)
for each object 119900 isin 1199003 119900
4 119900
5 When a query point 119902
moves in a segment 11989921198993 its 119896th NN 119900
119896th is represented bythe bold lines in Figure 13(b) where a point 119904 marked by afive-pointed star indicates the middle of the segment 119899
21198993
Specifically for 119902 isin 1198992119904 the 119896th NN 119900
119896th is 1199005and thus
the kNN set is 1199004 119900
5 Similarly for 119902 isin 119899
3119904 the 119896th NN
119900119896th is 119900
3and thus the kNN set is 119900
3 119900
4 Consequently
a segment 11989921198993is divided into two safe segments which
are represented as Ω(11989921198993) = ⟨119899
2119904 119900
4 119900
5⟩ ⟨119899
3119904 119900
3 119900
4⟩
Finally a segment larr99788899788899788811989931198994becomes a safe segment that is
10 Mobile Information Systems
Input k the number of requested NNs 119874120572
119896cup 119874
120573
119896cup 119874(120572120573) the set of qualifying objects for a segment 120572120573
Output 119874119896th the set of distances from q to its kth NN 119900
119896th (ie 119874119896th = (119909 119910) | 119909 = len(120572 119902) 119910 = dist(119902 119900119896th))
(1) 119888119900119906119899119905 larr 0 count keeps the number of objects processed thus far(2) 119874
119896th = (119909 119910) | 119909 = len(120572 119902) 119910 = 0 for 119902 isin 120572120573 119910 = dist(119902 119900119896th) is initialized to 0 for 119902 isin 120572120573
(3) for each object 119900 isin 119874120572
119896cup 119874
120573
119896cup 119874(120572120573) do qualifying objects are handled sequentially
(4) if 119888119900119906119899119905 lt 119896 then if the number of objects processed thus far is less than 119896(5) 119874
119896th = (119909 119910) | 119909 = len(120572 119902) 119910 = max(dist(119902 120579119896th) dist(119902 119900)) for 119902 isin 120572120573 120579
119896th is the 119896th NN thus far(6) else(7) 119874
119896th = (119909 119910) | 119909 = len(120572 119902) 119910 = min(dist(119902 120579119896th) dist(119902 119900)) for 119902 isin 120572120573
(8) 119888119900119906119899119905 larr 119888119900119906119899119905 + 1 count increases by 1 whenever an object 119900 is processed(9) return 119874
119896th
Algorithm 2 Determine skyline for kth NN (k 119874120572
119896cup 119874
120573
119896cup 119874(120572120573))
3 3
3 4
4
9
10
2
n1 n3o3
o1o2
o4
(a) Plot of dist(119902 119900) for119900 isin 119900
1 1199002 1199003 1199004
3 34
9
10
2
n1 n3o3
3 4
o1o2
o4
okth
(b) Ω(larr99788899788899788811989911198993) = ⟨
larr99788899788899788811989911199003
11990011199002⟩ ⟨997888997888997888rarr119899
31199003 119900
2 1199003⟩
⟨1198993 119900
3 1199004⟩
Figure 11 Partitioning of a segmentlarr99788899788899788811989911198993into three safe segments
9
4
5
n2 n3
o3
(a) dist(119902 1199003) =
len(119902 1198993) + 4
87
32
2 3n2 n3o4
o4
o4
(b) dist(119902 1199004) =
len(119902 1199004)
4
9
5n2 n3
o5
(c) dist(119902 1199005) =
len(119902 1198992) + 4
Figure 12 Plot of dist(119902 119900) where 119902 isin 11989921198993and 119900 isin 119900
3 119900
4 119900
5
Ω(larr99788899788899788811989931198994) = ⟨
larr99788899788899788811989931198994 119900
3 119900
4⟩ This is because 1198741198993
119896equals 1198741198994
119896
and 119874(larr99788899788899788811989931198994) is a subset of 1198741198993
119896 that is 1198741198993
119896= 119874
1198994
119896and
119874(larr99788899788899788811989931198994) sub 119874
1198993
119896
5 Monitoring Safe Segments inDynamic Spatial Networks
Figure 14 illustrates an example of changing the weight of anedge 997888997888997888rarr119899
11199001in a spatial network where it is assumed that 119896 = 2
is given For convenience we consider the query region 119876
4 4
2
2 3n2 n3o4
o5 o3
(a) Plot of dist(119902119900) for 119900 isin 119900
3 1199004
1199005
4
2
2 3
34
n2 n3o4 s
o5 o3
okth
(b) Ω(11989921198993) =
⟨1198992119904 119900
4 1199005⟩
⟨1198993119904 119900
3 1199004⟩
Figure 13 Partitioning of a segment 11989921198993into two safe segments
that consists of an edgelarr99788899788899788811989911198993 that is 119876 = larr997888997888997888119899
11198993 As shown
in Figure 14(b) when the weight of an edge 997888997888997888rarr11989911199001has been
updated from 3 to 5 at time 119905119895 this update may invalidate
the safe segments in the query region 119876 Therefore it isnecessary to monitor the validity of safe segments in a queryregion when the change occurs To this end we introduce aninfluential region to monitor the validity of safe segmentsThe influential region Ψ
119902for a query point 119902 is defined as a
set of points 119901 such that dist(119902 119901) le dist(119902 119900119896th) holds If the
weight of an edge changes inside influential region Ψ119902 the
kNN query at query point 119902 should be reevaluated to reflectthe change in the weight However if the weight of an edgechanges outside influential regionΨ
119902 the change can be safely
ignored Suppose that a query region 119876 is represented by aset 119876119904 of 119897 connected segments and a set 119876119887 of 119898 boundarypoints that is 119876119904
= 1199041 1199042 119904
119897 and 119876119887
= 1198871 1198872 119887
119898
Then the influential region Ψ119876for query region 119876 becomes
the union of the influential region for each query point 119902 isin 119876that isΨ
119876= ⋃
119902isin119876Ψ119902This can be represented simply asΨ
119876=
119876cup(⋃119898
119894=1Ψ119887119894) whereΨ
119887119894refers to the influential region at each
boundary point 119887119894of the query region119876 SpecificallyΨ
119887119894is the
set of points 119901 such that dist(119887119894 119901) le dist(119887
119894 119900
119887119894
119896th) holds Here119900119887119894
119896th is the farthest answer object from boundary point 119887119894 that
Mobile Information Systems 11
3 4
4 63
3
3
2
4
1
3
2
2
2
n1
n2n3
n6n5
n4
o5
o1
o4
o3
o2
(a) Query region119876 = larr99788899788899788811989911198993 at time 119905
119894
3
3
32
4
5 2
3
46
1
2
2
4
n1
n2n3
n6n5
n4
o5
o1
o4
o3
o2
(b) Updating the weight of 997888997888997888rarr11989911199001at time 119905
119895
Figure 14 Changing the weight of an edge in a dynamic spatial network where 119905119894lt 119905
119895
46
3
3
3
2
4
1
1
1
1
3
2
2
2 2 2
n1
n2n3
n6n5
n4
o5
o1
o4
o3
o2
1205951
1205952 1205953
(a) Influence region Ψ119876at time 119905
119894
41 1 3 4
4
3
5 2
2
2
2
2
2
21
2
1
1
n1
n2n3
n6n5
n4
o5
o1
o4
o3
o2
1205951
1205953
1205955
1205952
1205954
(b) Updated influence region Ψ119876at time 119905
119895
Figure 15 Updating the influence region for 119876
is for each answer object 119900 isin 119874119887119894
119896 dist(119887
119894 119900) le dist(119887
119894 119900
119887119894
119896th)holds
Figure 15(a) illustrates the influential region for the queryregion 119876 at time 119905
119894 where the dotted line and square
brackets mark the influential region and its boundary pointsrespectively A set of the two NNs at boundary point 119899
1is
1198741198991
119896= 119900
1 119900
2 and the 119896th NN of 119899
1is 1199001198991
119896th = 1199001 Thus thedistance from 119899
1to its 119896th NN 119900
1is dist(119899
1 119900
1) = 3 and thus
the influential region Ψ1198991
for a boundary point 1198991becomes
Ψ1198991= 997888997888997888rarr11989911199001997888997888997888997888997888rarr119899111990021198994 Similarly the influential regionΨ
1198993for a
boundary point 1198993evaluates Ψ
1198993= 997888997888997888rarr11989931199003 119899
311990041205951 119899
31198995 119899
51205952
11989951205953 because 1198741198993
119896= 119900
3 119900
4 1199001198993
119896th = 1199003 and dist(1198993 119900
3) = 4
are given Consequently the influential region Ψ119876for query
region119876 becomesΨ119876=larr99788899788899788811989911198993cupΨ
1198991cupΨ
1198993= larr99788899788899788811989911198993997888997888997888997888997888rarr119899111990021198994997888997888997888rarr11989931199003
119899311990041205951 119899
31198995 119899
51205952 119899
51205953 As shown in Figure 15(b) updating
the weight of edge 997888997888997888rarr11989911199001from 3 to 5 may affect the safe
segments for the query region119876This is because updated edge997888997888997888rarr11989911199001overlaps the influential region Ψ
119876for query region 119876
In this case the server reevaluates the qualifying objects forquery region 119876 and provides updated qualifying objects sothat the user can update safe segments If the safe segmentsare updated the influential region should be also updatedaccordinglyThus the influential region for query region119876 isupdated at time 119905
119895 as shown in Figure 15(b) Finally updates
to the weights of the edges for examplelarr99788899788899788811989921199001 119899
21199005larr997888997888997888119899
31198994 and
11989941198996 that do not overlap the influential region can be safely
ignoredAlgorithm 3 monitors the validity of safe segments in a
query region when the weight of edges changes over timeAssume that the weight of edge 119899
119894119899119895is updated Subsequently
the server checks if edge 119899119894119899119895overlaps the influential region
Ψ119876for query region 119876 If the edge with the updated weight
does not overlap the influential region the update is safelyignored (lines (1)-(2)) Otherwise (ie Ψ
119876cap 119899
119894119899119895= 0) the
server requests that query object 119902 updates the query region(line (4)) Consequently 119902 submits a kRNNquery for updatedquery region119876updThe server then evaluates the kRNNqueryfor 119876upd and returns the kRNN query result Σ
119876updto 119902 (line
(5)) The query object then determines safe segments usingΣ119876upd
(line (6)) Finally the server updates the influentialregion accordingly (line (7))
6 Performance Evaluation
We describe our experimental settings in Section 61 andpresent the results of our experiments using real-life roadmaps in Section 62
61 Experimental Settings In the experiments we use tworeal-life roadmaps obtained from [27] to explore the impact
12 Mobile Information Systems
Input Ψ119876 influential region 119899
119894119899119895 updated edge
Output none(1) if Ψ
119876cap 119899
119894119899119895= 0 then an update to edge 119899
119894119899119895that does not overlap Ψ
119876is ignored
(2) ignore the update in the weight of edge 119899119894119899119895
(3) else this means that Ψ119876cap 119899
119894119899119895= 0
(4) 119876upd larr Update query region () server requests that 119902 update the query region(5) Σ
119876updlarr Evaluate 119896RNN query (119876upd 119896) server evaluates 119896RNN query for an updated query region
(6) Ω119876upd
larr Update safe segments (Σ119876upd
119896) 119902 determines safe segments inside the updated query region(7) Ψ
119876updlarr Update influential region (119876upd 119896) server updates influential region accordingly
Algorithm 3 Monitor safe segments (Ψ119876 119899
119894119899119895)
Table 4 Experimental parameter settings
Parameter RangeNumber of requested NNs (119896) 2 4 8 16 32Ratio of directed edge sequences to total edge sequences (119877dir) 0 5 10 20 50 ()Ratio of updated edge sequences to total edge sequences per timestamp (119877upd) 0 03 05 07 1 ()Size of query region (119876sz) 1 2 4 8 16
Number of data points (119873data)1 3 5 7 10 (times104) for NA1 3 5 7 10 (times103) for SJ
Speed of query points (119881qry)20 40 60 80 100 (kmh) for NA20 40 60 80 100 (kmh) for SJ
Distribution of data points (119863data) UniformDistribution of query points (119863qry) UniformNumber of query points (119873qry) 1000Road map NA SJ
of the edge sequence length on the performance of MORANThe first road map comprising 175813 nodes and 179179edges includes major roads in North America (NA) andcorresponds approximately to a data universe of 25times107 km2The second road map comprising 18263 nodes and 23874edges includes major roads in San Joaquin County (SJ)California and corresponds approximately to a data universeof 36 times 103 km2 For the first road map NA the numberof edge sequences and their average length are 12416 and29052m respectively For the second road map SJ thenumber of edge sequences and their average length are 20040and 248m respectively Table 4 summarizes the parametersused in the experiments In each experiment we vary a singleparameter in the range shown and set the other parameters tothe default values marked in boldWe simulate moving querypoints using a network-based moving objects generator [28]The number of query objects is set to 1000The size of a queryregion is determined by the number of edge sequences thatconstitute the query region The directed and updated edgesequences are selected randomly irrespective of the locationsof the data and query objects The length of an updated edgesequence is selected randomly to be between 01 and 10 timesthe original length For example if 119877upd is set to 05 and thenumber of edge sequences is 12416 then 62 edge sequences
are selected randomly every timestamp and their weights areupdated
As a benchmark against MORAN we use kRNN-E [5]without information of the precomputed shortest distancesbased on a shared execution paradigm to remove the redun-dant search overhead We choose kRNN-E instead of kRNN-F [5] with information of all the precomputed shortestdistances although kRNN-F typically outperforms kRNN-E The reason for this is that the precomputed distancesamong nodes are frequently invalidated by the updates tothe weights of the edges which makes it difficult to maintainthe precomputed distances To make kRNN-F applicable toour problem scenarios we can consider applying hierarchicaland goal-directed speed-up techniques [29] for DijkstrarsquosalgorithmThis approach can help to reduce the computationtime only at the server side and thus would not affect ourexperimental results Recall that the query processing at theserver is orthogonal to this study and that MORAN focuseson reducing the computation frequency and time taken atthe client side to evaluateMkRNN queries Our experimentalresults provide the average values per timestamp while 1000query points run for 600 timestamps Note that for roadmapNA the speed of the query points is 100 kmh by defaultwhereas for road map SJ the speed is 60 kmh by default
Mobile Information Systems 13
All algorithms are implemented in C++ and executed on adesktop PC with a 34GHz processor and 16GB of memory
62 Experimental Results Figure 16 shows a comparison ofthe query processing times at the client side of MORANand kRNN-E for evaluating MkRNN queries in road mapNA where each chart illustrates the effect of varying asingle parameter in Table 4 The values in the parenthesesindicate the computation frequency per timestamp Clearlythe computation frequency of kRNN-E equals the numberof query points and thus is omitted It should be noted thatthe server evaluates the MkRNN queries whenever the querypoints exit their query regions and thus the query processingtimes at the server side are the same forMORAN and kRNN-E Therefore we focus on comparing the query processingtimes at the client side
Figure 16(a) shows the query processing time as a func-tion of the number of requested NNs that is k Clearly thequery processing time at the client side increaseswith k How-ever the query processing time of MORAN is significantlyshorter than that of kRNN-E for all cases The reason for thisis that kRNN-E evaluates kNNquerieswhenever query pointsmove Conversely MORAN determines safe segments whenquery points enter new edge sequences or when the queryresults provided by the server become invalidated because ofupdated traffic conditions
Figure 16(b) shows the query processing time as a func-tion of the ratio of directed edge sequences to the totalnumber of edge sequences that is 119877dir Clearly 119877dir = 0refers to an undirected spatial networkThe query processingtimes at the client side of both methods are insensitive to thevalue of119877dirThe query processing time ofMORAN is shorterthan that of kRNN-E regardless of the value of 119877dir
Figure 16(c) shows the query processing time as a func-tion of the ratio of updated edge sequences to the totalnumber of edge sequences per timestamp that is 119877upd Here119877upd = 0 refers to a static spatial network The length of anupdated edge sequence is selected randomly frombetween 01and 10 times the original length Clearly the query processingtime of kRNN-E is almost constant regardless of the valueof 119877upd because query points in kRNN-E issue kNN queriesat each timestamp However the query processing time ofMORAN increases linearly with 119877upd because the probabilitythat the influential region of a query region overlaps anyupdated edge sequence increases with 119877upd Therefore alarger value of 119877upd leads to a longer query processing time
Figure 16(d) shows the query processing time as a func-tion of the size of the query region that is 119876sz Clearly thequery processing time increases with119876sz However the queryprocessing time of MORAN is clearly shorter than that ofkRNN-E regardless of the value of 119876sz
Figure 16(e) shows the query processing time as a func-tion of the number of data points that is 119873data In generalas 119873data increases the search space decreases and thus thequery processing time at the server side decreases accord-ingly However the query processing time at the client sideincreases with119873dataThis is because the number of qualifyingdata points handled at the client side increases with 119873data
Although the query processing time of MORAN increasesmore rapidly with 119873data than that of kRNN-E the queryprocessing time of MORAN is still shorter than that ofkRNN-E for 10 k le 119873data le 70 k However for119873data = 100 kthe query processing time of MORAN is 129 times longerthan that of kRNN-E
Figure 16(f) shows the query processing time as a func-tion of the speed of the query points that is 119881qry The queryprocessing time ofMORAN ismore sensitive to119881qry than thatof kRNN-E However the query processing time of MORANis clearly shorter than that of kRNN-E for all cases
Figure 17 shows a comparison of the query processingtimes at the client side of MORAN and kRNN-E for eval-uating MkRNN queries in road map SJ As when road mapNA is used when road map SJ is used the query processingtime of MORAN is clearly shorter than that of kRNN-E Asshown in Figure 17(a) the query processing time increaseswith k for the same reason as discussed earlier in the case ofFigure 16(a) As shown in Figure 17(b) the query processingtimes are not sensitive to the value of 119877dir As shown inFigure 17(c) the query processing time of kRNN-E remainsstable regardless of the value of 119877upd Conversely the queryprocessing time of MORAN increases with 119877upd because alarger value of 119877upd affects the influential regions of morequery points As shown in Figure 17(d) the query processingtime increases with 119876sz because the number of qualifyingdata points handled at the client side also increases with119876sz As shown in Figure 17(e) as 119873data increases the queryprocessing times decrease This is closely related to the sizeof the influential regions Specifically as 119873data increasesthe influential region decreases and thus updating weightsof edge sequences affects the influential regions of morequery points As shown in Figure 17(f) the query processingtime of MORAN increases with 119881qry for the same reason asdiscussed earlier in the case of Figure 16(f) whereas the queryprocessing time of kRNN-E remains stable regardless of thevalue of 119881qry
7 Conclusion
We proposed a new algorithm called MORAN for pro-cessing MkRNN queries in directed and dynamic spatialnetworks Existing studies focus on reducing redundant com-putation costs at the server side while processing snapshotkRNN queries in undirected and static spatial networksHowever MORAN clearly decreases the computation timeand frequency at the client side by dividing the query regioninto safe segments while processing MkRNN queries indirected and dynamic spatial networksThe influential regionfor a query region is introduced to monitor the impact of theupdated traffic conditions on the safe segments The resultsof experiments using real-life road maps demonstrate thatMORAN clearly outperforms kRNN-E for various workloadsin terms of the computation time and frequency We plan toextend our approach to processing sophisticated queries suchas kNN joins and top-k spatial preference queries in directedand dynamic spatial networks
14 Mobile Information Systems
k
(67)
2
MORAN
4 8 16 32
(73)
(83) (106)
(137)
0
10
20
30
40
CPU
tim
e at c
lient
side
(ms)
kRNN-E
(a) Effect of 119896
0 5 10 20 50
(90) (83) (83) (83) (81)
MORAN
0
5
10
15
20
CPU
tim
e at c
lient
side
(ms)
Rdir ()
kRNN-E
(b) Effect of 119877dir
00 03 05 07 10
(1)
(72) (83)
(157) (158)
MORAN
0
5
10
15
20
CPU
tim
e at c
lient
side
(ms)
Rupd ()
kRNN-E
(c) Effect of 119877upd
1 2 4 8 16
(66) (68) (83) (98)
(144)
MORAN
0
8
16
24
32CP
U ti
me a
t clie
nt si
de (m
s)
Qsz
kRNN-E
(d) Effect of119876sz
(163) (99)
(83) (80)
(79)
MORAN
0
8
16
24
32
CPU
tim
e at c
lient
side
(ms)
10 30 50 70 100
kRNN-E
Ndata (k)
(e) Effect of119873data
20 40 60 80 100
(95) (74) (81) (70) (83)
MORANkRNN-E
0
8
16
24
32
CPU
tim
e at c
lient
side
(ms)
Vqry (kmh)
(f) Effect of 119881qry
Figure 16 Comparison of CPU time at the client side for road map NA
Mobile Information Systems 15
(157) (209)(280)
(383)
(536)
k
2
MORAN
4 8 16 320
8
16
24
32
CPU
tim
e at c
lient
side
(ms)
kRNN-E
(a) Effect of 119896
(366) (286) (280) (272) (243)
MORAN
0 5 10 20 500
5
10
15
20
CPU
tim
e at c
lient
side
(ms)
Rdir ()
kRNN-E
(b) Effect of 119877dir
(26)(230) (280) (391) (429)
MORAN
00 03 05 07 10Rupd ()
0
5
10
15
20
CPU
tim
e at c
lient
side
(ms)
kRNN-E
(c) Effect of 119877upd
(277) (276) (280)(307)
(371)
MORAN
1 2 4 8 160
8
16
24
32CP
U ti
me a
t clie
nt si
de (m
s)
Qsz
kRNN-E
(d) Effect of119876sz
(612)
(359) (280) (232) (211)
MORAN
0
8
16
24
32
CPU
tim
e at c
lient
side
(ms)
1 3 5 7 10
kRNN-E
Ndata (k)
(e) Effect of119873data
(248) (265) (280) (286) (328)
MORAN
20 40 60 80 1000
5
10
15
20
CPU
tim
e at c
lient
side
(ms)
Vqry (kmh)
kRNN-E
(f) Effect of 119881qry
Figure 17 Comparison of CPU time at the client side for road map SJ
16 Mobile Information Systems
Notations and Their Definitions
119899119894119899119895 Edge connecting two adjacent nodes 119899
119894
and 119899119895
119899119904119899119904+1sdot sdot sdot 119899
119890 Edge sequence where 119899
119904(or 119899
119890) is the
start (or end) boundary node and theother nodes 119899
119904+1 119899
119890minus1 are
intermediate nodesdist(119901
1 119901
2) Length of the shortest path from point 119901
1
to point 1199012
len(1199011 119901
2) Length of the segment connecting two
points 1199011and 119901
2 such that 119901
1and 119901
2are
located in the same edge sequence119899119904119899119904+1sdot sdot sdot 119899
119890
119902 Query point119896 Number of requested NNs119874119901
119896 Set of kNNs at point 119901
120572120573 Segment that belongs to an edgesequence
119874(120572120573) Set of objects in segment 120572120573119900119896th The 119896th NN of query point 119902Ψ119902 Influence region for query point 119902
Ψ119876 Influence region for query region 119876
Conflict of Interests
The authors declare that there is no conflict of interestsregarding the publication of this paper
Acknowledgment
This research was supported by Kyungpook National Univer-sity Research Fund 2014
References
[1] U Demiryurek F Banaei-Kashani and C Shahabi ldquoEfficientcontinuous nearest neighbor query in spatial networks usingEuclidean restrictionrdquo in Advances in Spatial and TemporalDatabases 11th International Symposium SSTD 2009 AalborgDenmark July 8ndash10 2009 Proceedings vol 5644 of Lecture Notesin Computer Science pp 25ndash43 Springer Berlin Germany2009
[2] M R Kolahdouzan and C Shahabi ldquoAlternative solutionsfor continuous K nearest neighbor queries in spatial networkdatabasesrdquo GeoInformatica vol 9 no 4 pp 321ndash341 2005
[3] E W Dijkstra ldquoA note on two problems in connexion withgraphsrdquoNumerischeMathematik vol 1 no 1 pp 269ndash271 1959
[4] H Samet J Sankaranarayanan and H Alborzi ldquoScalablenetwork distance browsing in spatial databasesrdquo in Proceedingsof the SIGMOD International Conference on Management ofData (SIGMOD rsquo08) pp 43ndash54 Vancouver Canada June 2008
[5] J Bao C-Y ChowM FMokbel andW-S Ku ldquoEfficient evalu-ation of k-range nearest neighbor queries in road networksrdquo inProceedings of the 11th IEEE International Conference on MobileData Management (MDM rsquo10) pp 115ndash124 Kansas City MoUSA May 2010
[6] W-S Ku Y Chen and R Zimmermann ldquoPrivacy protectedspatial query processing for advanced location based servicesrdquo
Wireless Personal Communications vol 51 no 1 pp 53ndash652009
[7] K Mouratidis and M L Yiu ldquoAnonymous query processingin road networksrdquo IEEE Transactions on Knowledge and DataEngineering vol 22 no 1 pp 2ndash15 2010
[8] T Wang and L Liu ldquoPrivacy-aware mobile services over roadnetworksrdquo Proceedings of the VLDB Endowment vol 2 no 1pp 1042ndash1053 2009
[9] G Ghinita P Kalnis and S Skiadopoulos ldquoMobiHide amobilea peer-to-peer system for anonymous location-basedqueriesrdquo in Proceedings of the 10th International Symposium onSpatial and Temporal Databases (SSTD rsquo07) Boston MA USAJuly 2007 pp 221ndash238 Springer 2007
[10] S Ilarri E Mena and A Illarramendi ldquoLocation-dependentquery processing where we are and where we are headingrdquoACM Computing Surveys vol 42 no 3 article 12 2010
[11] H Al-Khalidi D Taniar J Betts and S Alamri ldquoDynamicsafe regions for moving range queries in mobile navigationrdquoInternational Journal of Ad Hoc and Ubiquitous Computing vol16 no 4 pp 250ndash259 2014
[12] H Al-Khalidi D Taniar J Betts and S Alamri ldquoMonitoringmoving queries inside a safe regionrdquo The Scientific WorldJournal vol 2014 Article ID 630396 13 pages 2014
[13] H-J Cho S J Kwon and T-S Chung ldquoA safe exit algorithmfor continuous nearest neighbor monitoring in road networksrdquoMobile Information Systems vol 9 no 1 pp 37ndash53 2013
[14] H-J Cho K Ryu and T-S Chung ldquoAn efficient algorithm forcomputing safe exit points of moving range queries in directedroad networksrdquo Information Systems vol 41 pp 1ndash19 2014
[15] C Li Y Gu J Qi G Yu R Zhang andW Yi ldquoProcessing mov-ing kNN queries using influential neighbor setsrdquo Proceedings ofthe VLDB Endowment vol 8 no 2 pp 113ndash124 2014
[16] S Nutanong R Zhang E Tanin and L Kulik ldquoAnalysis andevaluation of V-kNN an efficient algorithm for moving kNNqueriesrdquo VLDB Journal vol 19 no 3 pp 307ndash332 2010
[17] D Yung M L Yiu and E Lo ldquoA safe-exit approach for efficientnetwork-based moving range queriesrdquo Data and KnowledgeEngineering vol 72 pp 126ndash147 2012
[18] Y Gao B Zheng G Chen C Chen and Q Li ldquoContinuousnearest-neighbor search in the presence of obstaclesrdquo ACMTransactions on Database Systems vol 36 no 2 article 9 2011
[19] Y Tao D Papadias and Q Shen ldquoContinuous nearest neighborsearchrdquo in Proceedings of the 28th International Conference onVery Large Data Bases (VLDB rsquo02) pp 287ndash298 Hong KongAugust 2002
[20] M Mokbel C Chow and W Aref ldquoThe new casper queryprocessing for location serviceswithout compromising privacyrdquoin Proceedings of the 32nd International Conference on VeryLarge Data Bases (VLDB rsquo06) pp 763ndash774 Seoul Republic ofKorea 2006
[21] P Kalnis G Ghinita K Mouratidis and D Papadias ldquoPre-venting location-based identity inference in anonymous spatialqueriesrdquo IEEE Transactions on Knowledge and Data Engineer-ing vol 19 no 12 pp 1719ndash1733 2007
[22] C Chow M Mokbel J Naps and S Nath ldquoApproximateevaluation of range nearest neighbor queries with qualityguaranteerdquo in Advances in Spatial and Temporal Databases 11thInternational Symposium SSTD 2009 Aalborg Denmark July 8ndash10 2009 Proceedings vol 5644 of Lecture Notes in ComputerScience pp 283ndash301 Springer Berlin Germany 2009
Mobile Information Systems 17
[23] J Xu X Tang H Hu and J Du ldquoPrivacy-conscious location-based queries in mobile environmentsrdquo IEEE Transactions onParallel and Distributed Systems vol 21 no 3 pp 313ndash326 2010
[24] A M Aly W G Aref and M Ouzzani ldquoSpatial queries withtwo kNN predicatesrdquo Proceedings of the VLDB Endowment vol5 no 11 pp 1100ndash1111 2012
[25] Y Gu G Yu and X Yu ldquoAn efficient method for k nearestneighbor searching in obstructed spatial databasesrdquo Journal ofInformation Science and Engineering vol 30 no 5 pp 1569ndash1583 2014
[26] K Mouratidis M L Yiu D Papadias and N MamoulisldquoContinuous nearest neighbormonitoring in road networksrdquo inProceedings of the 32nd International Conference on Very LargeData Bases (VLDB rsquo06) pp 43ndash54 Seoul Republic of KoreaSeptember 2006
[27] Real Datasets for Spatial Databases httpwwwcsfsuedusimlifeifeiSpatialDatasethtm
[28] T Brinkhoff ldquoA framework for generating network-based mov-ing objectsrdquo GeoInformatica vol 6 no 2 pp 153ndash180 2002
[29] R Bauer D Delling P Sanders D Schieferdecker D Schultesand D Wagner ldquoCombining hierarchical and goal-directedspeed-up techniques for dijkstrarsquos algorithmrdquo Journal of Exper-imental Algorithmics vol 15 article 23 2010
[30] M Kolahdouzan C Shahabi and M Kolahdouzan ldquoVoronoi-based k nearest neighbor search for spatial network databasesrdquoinProceedings of the 30th International Conference onVery LargeData Bases (VLDB rsquo04) vol 30 pp 840ndash851 2004
[31] D Papadias J Zhang N Mamoulis and Y Tao ldquoQueryprocessing in spatial network databasesrdquo in Proceedings of the29th International Conference on Very Large Data Bases (VLDBrsquo03) vol 29 pp 802ndash813 2003
Submit your manuscripts athttpwwwhindawicom
Computer Games Technology
International Journal of
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Distributed Sensor Networks
International Journal of
Advances in
FuzzySystems
Hindawi Publishing Corporationhttpwwwhindawicom
Volume 2014
International Journal of
ReconfigurableComputing
Hindawi Publishing Corporation httpwwwhindawicom Volume 2014
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Applied Computational Intelligence and Soft Computing
thinspAdvancesthinspinthinsp
Artificial Intelligence
HindawithinspPublishingthinspCorporationhttpwwwhindawicom Volumethinsp2014
Advances inSoftware EngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Electrical and Computer Engineering
Journal of
Journal of
Computer Networks and Communications
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Hindawi Publishing Corporation
httpwwwhindawicom Volume 2014
Advances in
Multimedia
International Journal of
Biomedical Imaging
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
ArtificialNeural Systems
Advances in
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
RoboticsJournal of
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Computational Intelligence and Neuroscience
Industrial EngineeringJournal of
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014
The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Human-ComputerInteraction
Advances in
Computer EngineeringAdvances in
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Mobile Information Systems 9
Table 3 Computation of safe segments for the example query region
120572120573 120572 120573 119874120572
119896119874120573
119896119874(120572120573) Ω(120572120573)
larr99788899788899788811989911198993
1198991
1198993
1199001 119900
2 119900
3 119900
4 119900
3 ⟨
larr99788899788899788811989911199003 119900
1 119900
2⟩ ⟨
997888997888997888rarr11989931199003 119900
2 119900
3⟩ ⟨119899
3 119900
3 119900
4⟩
11989921198993
1198992
1198993
1199004 119900
5 119900
3 119900
4 119900
4 ⟨119899
2119904 119900
4 119900
5⟩ ⟨119899
3119904 119900
3 119900
4⟩
larr99788899788899788811989931198994
1198993
1198994
1199003 119900
4 119900
3 119900
4 0 ⟨
larr99788899788899788811989931198994 119900
3 119900
4⟩
10
3
7
n1 n3
o1
(a) dist(q o1) = len(q n1) + 3
7
2
9
n1 n3
o2
(b) dist(q o2) = len(q n1) + 2
4
43
n1 n3
o3
o3
asympasymp
infin
997888997888997888rarrn3o3(c) dist(q o3) =len(q o3) if q isininfin otherwise
7
3
n1 n3
o4
asymp asymp
infin
q = n3infin otherwise(d) dist(q o4) =3 if
Figure 10 Plot of ist(119902 119900) where 119902 isin larr99788899788899788811989911198993and 119900 isin 119900
1 119900
2 119900
3 119900
4
Algorithm 2determines the skyline119874119896th that consists of (119909 119910)
pairs such that 119909 = len(120572 119902) and 119910 = dist(119902 119900119896th) hold for
each query point 119902 isin 120572120573The variable count keeps the numberof qualifying objects processed thus far which is initializedto 0 (line (1)) If count is less than 119896 then the skyline for119900119896th is determined by 119874
119896th = (119909 119910) | 119909 = len(120572 119902) 119910 =max(dist(119902 120579
119896th) dist(119902 119900)) for 119902 isin 120572120573 where 120579119896th keeps the119896th NN determined thus far (lines (4)-(5)) Otherwise (ie119888119900119906119899119905 ge 119896) the skyline for 119900
119896th is determined by 119874119896th =
(119909 119910) | 119909 = len(120572 119902) 119910 = min(dist(119902 120579119896th) dist(119902 119900))
for 119902 isin 120572120573 (lines (6)-(7)) Naturally count increases by 1whenever an object o is processed (line (8))
Figure 11 illustrates the partitioning of a segment larr99788899788899788811989911198993
into three safe segments using dist(119902 119900) for each object 119900 isin1198741198991
119896cup 119874
1198993
119896cup 119874(
larr99788899788899788811989911198993) Figure 11(a) shows the plot of dist(119902 119900)
for each object 119900 isin 1199001 119900
2 119900
3 119900
4 Note that to simplify the
presentation the interval in which dist(119902 119900) = infin holds isnot represented When a query point 119902 moves in a segmentlarr99788899788899788811989911198993 its 119896th NN 119900
119896th is determined using Algorithm 2 andis represented by the bold lines in Figure 11(b) Specificallyfor 119902 isin larr997888997888997888119899
11199003 the 119896th NN 119900
119896th is 1199001and thus the kNN set is
1199001 119900
2 Similarly for 119902 isin 997888997888997888rarr119899
31199003 the 119896th NN 119900
119896th is 1199002and
thus the kNN set is 1199002 119900
3 Finally for 119902 = 119899
3 the 119896th NN
119900119896th is 119900
3and thus the 119896NN set is 119900
3 119900
4 Consequently a
segmentlarr99788899788899788811989911198993is divided into three safe segments represented
by Ω(larr99788899788899788811989911198993) = ⟨
larr99788899788899788811989911199003 119900
1 119900
2⟩ ⟨997888997888997888rarr11989931199003 119900
2 119900
3⟩ ⟨119899
3 119900
3 119900
4⟩
Figures 12(a) 12(b) and 12(c) illustrate dist(119902 1199003)
dist(119902 1199004) and dist(119902 119900
5) respectively where 119902 refers to a
query point in a segment 11989921198993and 119900
3 119900
4 and 119900
5refer to
qualifying objects for the segment 11989921198993 Note that 119900
3isin 119874
1198993
119896
1199004isin 119874
1198992
119896cup 119874
1198993
119896cup 119874(119899
21198993) and 119900
5isin 119874
1198992
119896hold
Figure 13 illustrates the partitioning of a segment 11989921198993
into two safe segments using dist(119902 119900) for each object 119900 isin1198741198992
119896cup 119874
1198993
119896cup 119874(119899
21198993) Figure 13(a) shows the plot of dist(119902 119900)
for each object 119900 isin 1199003 119900
4 119900
5 When a query point 119902
moves in a segment 11989921198993 its 119896th NN 119900
119896th is represented bythe bold lines in Figure 13(b) where a point 119904 marked by afive-pointed star indicates the middle of the segment 119899
21198993
Specifically for 119902 isin 1198992119904 the 119896th NN 119900
119896th is 1199005and thus
the kNN set is 1199004 119900
5 Similarly for 119902 isin 119899
3119904 the 119896th NN
119900119896th is 119900
3and thus the kNN set is 119900
3 119900
4 Consequently
a segment 11989921198993is divided into two safe segments which
are represented as Ω(11989921198993) = ⟨119899
2119904 119900
4 119900
5⟩ ⟨119899
3119904 119900
3 119900
4⟩
Finally a segment larr99788899788899788811989931198994becomes a safe segment that is
10 Mobile Information Systems
Input k the number of requested NNs 119874120572
119896cup 119874
120573
119896cup 119874(120572120573) the set of qualifying objects for a segment 120572120573
Output 119874119896th the set of distances from q to its kth NN 119900
119896th (ie 119874119896th = (119909 119910) | 119909 = len(120572 119902) 119910 = dist(119902 119900119896th))
(1) 119888119900119906119899119905 larr 0 count keeps the number of objects processed thus far(2) 119874
119896th = (119909 119910) | 119909 = len(120572 119902) 119910 = 0 for 119902 isin 120572120573 119910 = dist(119902 119900119896th) is initialized to 0 for 119902 isin 120572120573
(3) for each object 119900 isin 119874120572
119896cup 119874
120573
119896cup 119874(120572120573) do qualifying objects are handled sequentially
(4) if 119888119900119906119899119905 lt 119896 then if the number of objects processed thus far is less than 119896(5) 119874
119896th = (119909 119910) | 119909 = len(120572 119902) 119910 = max(dist(119902 120579119896th) dist(119902 119900)) for 119902 isin 120572120573 120579
119896th is the 119896th NN thus far(6) else(7) 119874
119896th = (119909 119910) | 119909 = len(120572 119902) 119910 = min(dist(119902 120579119896th) dist(119902 119900)) for 119902 isin 120572120573
(8) 119888119900119906119899119905 larr 119888119900119906119899119905 + 1 count increases by 1 whenever an object 119900 is processed(9) return 119874
119896th
Algorithm 2 Determine skyline for kth NN (k 119874120572
119896cup 119874
120573
119896cup 119874(120572120573))
3 3
3 4
4
9
10
2
n1 n3o3
o1o2
o4
(a) Plot of dist(119902 119900) for119900 isin 119900
1 1199002 1199003 1199004
3 34
9
10
2
n1 n3o3
3 4
o1o2
o4
okth
(b) Ω(larr99788899788899788811989911198993) = ⟨
larr99788899788899788811989911199003
11990011199002⟩ ⟨997888997888997888rarr119899
31199003 119900
2 1199003⟩
⟨1198993 119900
3 1199004⟩
Figure 11 Partitioning of a segmentlarr99788899788899788811989911198993into three safe segments
9
4
5
n2 n3
o3
(a) dist(119902 1199003) =
len(119902 1198993) + 4
87
32
2 3n2 n3o4
o4
o4
(b) dist(119902 1199004) =
len(119902 1199004)
4
9
5n2 n3
o5
(c) dist(119902 1199005) =
len(119902 1198992) + 4
Figure 12 Plot of dist(119902 119900) where 119902 isin 11989921198993and 119900 isin 119900
3 119900
4 119900
5
Ω(larr99788899788899788811989931198994) = ⟨
larr99788899788899788811989931198994 119900
3 119900
4⟩ This is because 1198741198993
119896equals 1198741198994
119896
and 119874(larr99788899788899788811989931198994) is a subset of 1198741198993
119896 that is 1198741198993
119896= 119874
1198994
119896and
119874(larr99788899788899788811989931198994) sub 119874
1198993
119896
5 Monitoring Safe Segments inDynamic Spatial Networks
Figure 14 illustrates an example of changing the weight of anedge 997888997888997888rarr119899
11199001in a spatial network where it is assumed that 119896 = 2
is given For convenience we consider the query region 119876
4 4
2
2 3n2 n3o4
o5 o3
(a) Plot of dist(119902119900) for 119900 isin 119900
3 1199004
1199005
4
2
2 3
34
n2 n3o4 s
o5 o3
okth
(b) Ω(11989921198993) =
⟨1198992119904 119900
4 1199005⟩
⟨1198993119904 119900
3 1199004⟩
Figure 13 Partitioning of a segment 11989921198993into two safe segments
that consists of an edgelarr99788899788899788811989911198993 that is 119876 = larr997888997888997888119899
11198993 As shown
in Figure 14(b) when the weight of an edge 997888997888997888rarr11989911199001has been
updated from 3 to 5 at time 119905119895 this update may invalidate
the safe segments in the query region 119876 Therefore it isnecessary to monitor the validity of safe segments in a queryregion when the change occurs To this end we introduce aninfluential region to monitor the validity of safe segmentsThe influential region Ψ
119902for a query point 119902 is defined as a
set of points 119901 such that dist(119902 119901) le dist(119902 119900119896th) holds If the
weight of an edge changes inside influential region Ψ119902 the
kNN query at query point 119902 should be reevaluated to reflectthe change in the weight However if the weight of an edgechanges outside influential regionΨ
119902 the change can be safely
ignored Suppose that a query region 119876 is represented by aset 119876119904 of 119897 connected segments and a set 119876119887 of 119898 boundarypoints that is 119876119904
= 1199041 1199042 119904
119897 and 119876119887
= 1198871 1198872 119887
119898
Then the influential region Ψ119876for query region 119876 becomes
the union of the influential region for each query point 119902 isin 119876that isΨ
119876= ⋃
119902isin119876Ψ119902This can be represented simply asΨ
119876=
119876cup(⋃119898
119894=1Ψ119887119894) whereΨ
119887119894refers to the influential region at each
boundary point 119887119894of the query region119876 SpecificallyΨ
119887119894is the
set of points 119901 such that dist(119887119894 119901) le dist(119887
119894 119900
119887119894
119896th) holds Here119900119887119894
119896th is the farthest answer object from boundary point 119887119894 that
Mobile Information Systems 11
3 4
4 63
3
3
2
4
1
3
2
2
2
n1
n2n3
n6n5
n4
o5
o1
o4
o3
o2
(a) Query region119876 = larr99788899788899788811989911198993 at time 119905
119894
3
3
32
4
5 2
3
46
1
2
2
4
n1
n2n3
n6n5
n4
o5
o1
o4
o3
o2
(b) Updating the weight of 997888997888997888rarr11989911199001at time 119905
119895
Figure 14 Changing the weight of an edge in a dynamic spatial network where 119905119894lt 119905
119895
46
3
3
3
2
4
1
1
1
1
3
2
2
2 2 2
n1
n2n3
n6n5
n4
o5
o1
o4
o3
o2
1205951
1205952 1205953
(a) Influence region Ψ119876at time 119905
119894
41 1 3 4
4
3
5 2
2
2
2
2
2
21
2
1
1
n1
n2n3
n6n5
n4
o5
o1
o4
o3
o2
1205951
1205953
1205955
1205952
1205954
(b) Updated influence region Ψ119876at time 119905
119895
Figure 15 Updating the influence region for 119876
is for each answer object 119900 isin 119874119887119894
119896 dist(119887
119894 119900) le dist(119887
119894 119900
119887119894
119896th)holds
Figure 15(a) illustrates the influential region for the queryregion 119876 at time 119905
119894 where the dotted line and square
brackets mark the influential region and its boundary pointsrespectively A set of the two NNs at boundary point 119899
1is
1198741198991
119896= 119900
1 119900
2 and the 119896th NN of 119899
1is 1199001198991
119896th = 1199001 Thus thedistance from 119899
1to its 119896th NN 119900
1is dist(119899
1 119900
1) = 3 and thus
the influential region Ψ1198991
for a boundary point 1198991becomes
Ψ1198991= 997888997888997888rarr11989911199001997888997888997888997888997888rarr119899111990021198994 Similarly the influential regionΨ
1198993for a
boundary point 1198993evaluates Ψ
1198993= 997888997888997888rarr11989931199003 119899
311990041205951 119899
31198995 119899
51205952
11989951205953 because 1198741198993
119896= 119900
3 119900
4 1199001198993
119896th = 1199003 and dist(1198993 119900
3) = 4
are given Consequently the influential region Ψ119876for query
region119876 becomesΨ119876=larr99788899788899788811989911198993cupΨ
1198991cupΨ
1198993= larr99788899788899788811989911198993997888997888997888997888997888rarr119899111990021198994997888997888997888rarr11989931199003
119899311990041205951 119899
31198995 119899
51205952 119899
51205953 As shown in Figure 15(b) updating
the weight of edge 997888997888997888rarr11989911199001from 3 to 5 may affect the safe
segments for the query region119876This is because updated edge997888997888997888rarr11989911199001overlaps the influential region Ψ
119876for query region 119876
In this case the server reevaluates the qualifying objects forquery region 119876 and provides updated qualifying objects sothat the user can update safe segments If the safe segmentsare updated the influential region should be also updatedaccordinglyThus the influential region for query region119876 isupdated at time 119905
119895 as shown in Figure 15(b) Finally updates
to the weights of the edges for examplelarr99788899788899788811989921199001 119899
21199005larr997888997888997888119899
31198994 and
11989941198996 that do not overlap the influential region can be safely
ignoredAlgorithm 3 monitors the validity of safe segments in a
query region when the weight of edges changes over timeAssume that the weight of edge 119899
119894119899119895is updated Subsequently
the server checks if edge 119899119894119899119895overlaps the influential region
Ψ119876for query region 119876 If the edge with the updated weight
does not overlap the influential region the update is safelyignored (lines (1)-(2)) Otherwise (ie Ψ
119876cap 119899
119894119899119895= 0) the
server requests that query object 119902 updates the query region(line (4)) Consequently 119902 submits a kRNNquery for updatedquery region119876updThe server then evaluates the kRNNqueryfor 119876upd and returns the kRNN query result Σ
119876updto 119902 (line
(5)) The query object then determines safe segments usingΣ119876upd
(line (6)) Finally the server updates the influentialregion accordingly (line (7))
6 Performance Evaluation
We describe our experimental settings in Section 61 andpresent the results of our experiments using real-life roadmaps in Section 62
61 Experimental Settings In the experiments we use tworeal-life roadmaps obtained from [27] to explore the impact
12 Mobile Information Systems
Input Ψ119876 influential region 119899
119894119899119895 updated edge
Output none(1) if Ψ
119876cap 119899
119894119899119895= 0 then an update to edge 119899
119894119899119895that does not overlap Ψ
119876is ignored
(2) ignore the update in the weight of edge 119899119894119899119895
(3) else this means that Ψ119876cap 119899
119894119899119895= 0
(4) 119876upd larr Update query region () server requests that 119902 update the query region(5) Σ
119876updlarr Evaluate 119896RNN query (119876upd 119896) server evaluates 119896RNN query for an updated query region
(6) Ω119876upd
larr Update safe segments (Σ119876upd
119896) 119902 determines safe segments inside the updated query region(7) Ψ
119876updlarr Update influential region (119876upd 119896) server updates influential region accordingly
Algorithm 3 Monitor safe segments (Ψ119876 119899
119894119899119895)
Table 4 Experimental parameter settings
Parameter RangeNumber of requested NNs (119896) 2 4 8 16 32Ratio of directed edge sequences to total edge sequences (119877dir) 0 5 10 20 50 ()Ratio of updated edge sequences to total edge sequences per timestamp (119877upd) 0 03 05 07 1 ()Size of query region (119876sz) 1 2 4 8 16
Number of data points (119873data)1 3 5 7 10 (times104) for NA1 3 5 7 10 (times103) for SJ
Speed of query points (119881qry)20 40 60 80 100 (kmh) for NA20 40 60 80 100 (kmh) for SJ
Distribution of data points (119863data) UniformDistribution of query points (119863qry) UniformNumber of query points (119873qry) 1000Road map NA SJ
of the edge sequence length on the performance of MORANThe first road map comprising 175813 nodes and 179179edges includes major roads in North America (NA) andcorresponds approximately to a data universe of 25times107 km2The second road map comprising 18263 nodes and 23874edges includes major roads in San Joaquin County (SJ)California and corresponds approximately to a data universeof 36 times 103 km2 For the first road map NA the numberof edge sequences and their average length are 12416 and29052m respectively For the second road map SJ thenumber of edge sequences and their average length are 20040and 248m respectively Table 4 summarizes the parametersused in the experiments In each experiment we vary a singleparameter in the range shown and set the other parameters tothe default values marked in boldWe simulate moving querypoints using a network-based moving objects generator [28]The number of query objects is set to 1000The size of a queryregion is determined by the number of edge sequences thatconstitute the query region The directed and updated edgesequences are selected randomly irrespective of the locationsof the data and query objects The length of an updated edgesequence is selected randomly to be between 01 and 10 timesthe original length For example if 119877upd is set to 05 and thenumber of edge sequences is 12416 then 62 edge sequences
are selected randomly every timestamp and their weights areupdated
As a benchmark against MORAN we use kRNN-E [5]without information of the precomputed shortest distancesbased on a shared execution paradigm to remove the redun-dant search overhead We choose kRNN-E instead of kRNN-F [5] with information of all the precomputed shortestdistances although kRNN-F typically outperforms kRNN-E The reason for this is that the precomputed distancesamong nodes are frequently invalidated by the updates tothe weights of the edges which makes it difficult to maintainthe precomputed distances To make kRNN-F applicable toour problem scenarios we can consider applying hierarchicaland goal-directed speed-up techniques [29] for DijkstrarsquosalgorithmThis approach can help to reduce the computationtime only at the server side and thus would not affect ourexperimental results Recall that the query processing at theserver is orthogonal to this study and that MORAN focuseson reducing the computation frequency and time taken atthe client side to evaluateMkRNN queries Our experimentalresults provide the average values per timestamp while 1000query points run for 600 timestamps Note that for roadmapNA the speed of the query points is 100 kmh by defaultwhereas for road map SJ the speed is 60 kmh by default
Mobile Information Systems 13
All algorithms are implemented in C++ and executed on adesktop PC with a 34GHz processor and 16GB of memory
62 Experimental Results Figure 16 shows a comparison ofthe query processing times at the client side of MORANand kRNN-E for evaluating MkRNN queries in road mapNA where each chart illustrates the effect of varying asingle parameter in Table 4 The values in the parenthesesindicate the computation frequency per timestamp Clearlythe computation frequency of kRNN-E equals the numberof query points and thus is omitted It should be noted thatthe server evaluates the MkRNN queries whenever the querypoints exit their query regions and thus the query processingtimes at the server side are the same forMORAN and kRNN-E Therefore we focus on comparing the query processingtimes at the client side
Figure 16(a) shows the query processing time as a func-tion of the number of requested NNs that is k Clearly thequery processing time at the client side increaseswith k How-ever the query processing time of MORAN is significantlyshorter than that of kRNN-E for all cases The reason for thisis that kRNN-E evaluates kNNquerieswhenever query pointsmove Conversely MORAN determines safe segments whenquery points enter new edge sequences or when the queryresults provided by the server become invalidated because ofupdated traffic conditions
Figure 16(b) shows the query processing time as a func-tion of the ratio of directed edge sequences to the totalnumber of edge sequences that is 119877dir Clearly 119877dir = 0refers to an undirected spatial networkThe query processingtimes at the client side of both methods are insensitive to thevalue of119877dirThe query processing time ofMORAN is shorterthan that of kRNN-E regardless of the value of 119877dir
Figure 16(c) shows the query processing time as a func-tion of the ratio of updated edge sequences to the totalnumber of edge sequences per timestamp that is 119877upd Here119877upd = 0 refers to a static spatial network The length of anupdated edge sequence is selected randomly frombetween 01and 10 times the original length Clearly the query processingtime of kRNN-E is almost constant regardless of the valueof 119877upd because query points in kRNN-E issue kNN queriesat each timestamp However the query processing time ofMORAN increases linearly with 119877upd because the probabilitythat the influential region of a query region overlaps anyupdated edge sequence increases with 119877upd Therefore alarger value of 119877upd leads to a longer query processing time
Figure 16(d) shows the query processing time as a func-tion of the size of the query region that is 119876sz Clearly thequery processing time increases with119876sz However the queryprocessing time of MORAN is clearly shorter than that ofkRNN-E regardless of the value of 119876sz
Figure 16(e) shows the query processing time as a func-tion of the number of data points that is 119873data In generalas 119873data increases the search space decreases and thus thequery processing time at the server side decreases accord-ingly However the query processing time at the client sideincreases with119873dataThis is because the number of qualifyingdata points handled at the client side increases with 119873data
Although the query processing time of MORAN increasesmore rapidly with 119873data than that of kRNN-E the queryprocessing time of MORAN is still shorter than that ofkRNN-E for 10 k le 119873data le 70 k However for119873data = 100 kthe query processing time of MORAN is 129 times longerthan that of kRNN-E
Figure 16(f) shows the query processing time as a func-tion of the speed of the query points that is 119881qry The queryprocessing time ofMORAN ismore sensitive to119881qry than thatof kRNN-E However the query processing time of MORANis clearly shorter than that of kRNN-E for all cases
Figure 17 shows a comparison of the query processingtimes at the client side of MORAN and kRNN-E for eval-uating MkRNN queries in road map SJ As when road mapNA is used when road map SJ is used the query processingtime of MORAN is clearly shorter than that of kRNN-E Asshown in Figure 17(a) the query processing time increaseswith k for the same reason as discussed earlier in the case ofFigure 16(a) As shown in Figure 17(b) the query processingtimes are not sensitive to the value of 119877dir As shown inFigure 17(c) the query processing time of kRNN-E remainsstable regardless of the value of 119877upd Conversely the queryprocessing time of MORAN increases with 119877upd because alarger value of 119877upd affects the influential regions of morequery points As shown in Figure 17(d) the query processingtime increases with 119876sz because the number of qualifyingdata points handled at the client side also increases with119876sz As shown in Figure 17(e) as 119873data increases the queryprocessing times decrease This is closely related to the sizeof the influential regions Specifically as 119873data increasesthe influential region decreases and thus updating weightsof edge sequences affects the influential regions of morequery points As shown in Figure 17(f) the query processingtime of MORAN increases with 119881qry for the same reason asdiscussed earlier in the case of Figure 16(f) whereas the queryprocessing time of kRNN-E remains stable regardless of thevalue of 119881qry
7 Conclusion
We proposed a new algorithm called MORAN for pro-cessing MkRNN queries in directed and dynamic spatialnetworks Existing studies focus on reducing redundant com-putation costs at the server side while processing snapshotkRNN queries in undirected and static spatial networksHowever MORAN clearly decreases the computation timeand frequency at the client side by dividing the query regioninto safe segments while processing MkRNN queries indirected and dynamic spatial networksThe influential regionfor a query region is introduced to monitor the impact of theupdated traffic conditions on the safe segments The resultsof experiments using real-life road maps demonstrate thatMORAN clearly outperforms kRNN-E for various workloadsin terms of the computation time and frequency We plan toextend our approach to processing sophisticated queries suchas kNN joins and top-k spatial preference queries in directedand dynamic spatial networks
14 Mobile Information Systems
k
(67)
2
MORAN
4 8 16 32
(73)
(83) (106)
(137)
0
10
20
30
40
CPU
tim
e at c
lient
side
(ms)
kRNN-E
(a) Effect of 119896
0 5 10 20 50
(90) (83) (83) (83) (81)
MORAN
0
5
10
15
20
CPU
tim
e at c
lient
side
(ms)
Rdir ()
kRNN-E
(b) Effect of 119877dir
00 03 05 07 10
(1)
(72) (83)
(157) (158)
MORAN
0
5
10
15
20
CPU
tim
e at c
lient
side
(ms)
Rupd ()
kRNN-E
(c) Effect of 119877upd
1 2 4 8 16
(66) (68) (83) (98)
(144)
MORAN
0
8
16
24
32CP
U ti
me a
t clie
nt si
de (m
s)
Qsz
kRNN-E
(d) Effect of119876sz
(163) (99)
(83) (80)
(79)
MORAN
0
8
16
24
32
CPU
tim
e at c
lient
side
(ms)
10 30 50 70 100
kRNN-E
Ndata (k)
(e) Effect of119873data
20 40 60 80 100
(95) (74) (81) (70) (83)
MORANkRNN-E
0
8
16
24
32
CPU
tim
e at c
lient
side
(ms)
Vqry (kmh)
(f) Effect of 119881qry
Figure 16 Comparison of CPU time at the client side for road map NA
Mobile Information Systems 15
(157) (209)(280)
(383)
(536)
k
2
MORAN
4 8 16 320
8
16
24
32
CPU
tim
e at c
lient
side
(ms)
kRNN-E
(a) Effect of 119896
(366) (286) (280) (272) (243)
MORAN
0 5 10 20 500
5
10
15
20
CPU
tim
e at c
lient
side
(ms)
Rdir ()
kRNN-E
(b) Effect of 119877dir
(26)(230) (280) (391) (429)
MORAN
00 03 05 07 10Rupd ()
0
5
10
15
20
CPU
tim
e at c
lient
side
(ms)
kRNN-E
(c) Effect of 119877upd
(277) (276) (280)(307)
(371)
MORAN
1 2 4 8 160
8
16
24
32CP
U ti
me a
t clie
nt si
de (m
s)
Qsz
kRNN-E
(d) Effect of119876sz
(612)
(359) (280) (232) (211)
MORAN
0
8
16
24
32
CPU
tim
e at c
lient
side
(ms)
1 3 5 7 10
kRNN-E
Ndata (k)
(e) Effect of119873data
(248) (265) (280) (286) (328)
MORAN
20 40 60 80 1000
5
10
15
20
CPU
tim
e at c
lient
side
(ms)
Vqry (kmh)
kRNN-E
(f) Effect of 119881qry
Figure 17 Comparison of CPU time at the client side for road map SJ
16 Mobile Information Systems
Notations and Their Definitions
119899119894119899119895 Edge connecting two adjacent nodes 119899
119894
and 119899119895
119899119904119899119904+1sdot sdot sdot 119899
119890 Edge sequence where 119899
119904(or 119899
119890) is the
start (or end) boundary node and theother nodes 119899
119904+1 119899
119890minus1 are
intermediate nodesdist(119901
1 119901
2) Length of the shortest path from point 119901
1
to point 1199012
len(1199011 119901
2) Length of the segment connecting two
points 1199011and 119901
2 such that 119901
1and 119901
2are
located in the same edge sequence119899119904119899119904+1sdot sdot sdot 119899
119890
119902 Query point119896 Number of requested NNs119874119901
119896 Set of kNNs at point 119901
120572120573 Segment that belongs to an edgesequence
119874(120572120573) Set of objects in segment 120572120573119900119896th The 119896th NN of query point 119902Ψ119902 Influence region for query point 119902
Ψ119876 Influence region for query region 119876
Conflict of Interests
The authors declare that there is no conflict of interestsregarding the publication of this paper
Acknowledgment
This research was supported by Kyungpook National Univer-sity Research Fund 2014
References
[1] U Demiryurek F Banaei-Kashani and C Shahabi ldquoEfficientcontinuous nearest neighbor query in spatial networks usingEuclidean restrictionrdquo in Advances in Spatial and TemporalDatabases 11th International Symposium SSTD 2009 AalborgDenmark July 8ndash10 2009 Proceedings vol 5644 of Lecture Notesin Computer Science pp 25ndash43 Springer Berlin Germany2009
[2] M R Kolahdouzan and C Shahabi ldquoAlternative solutionsfor continuous K nearest neighbor queries in spatial networkdatabasesrdquo GeoInformatica vol 9 no 4 pp 321ndash341 2005
[3] E W Dijkstra ldquoA note on two problems in connexion withgraphsrdquoNumerischeMathematik vol 1 no 1 pp 269ndash271 1959
[4] H Samet J Sankaranarayanan and H Alborzi ldquoScalablenetwork distance browsing in spatial databasesrdquo in Proceedingsof the SIGMOD International Conference on Management ofData (SIGMOD rsquo08) pp 43ndash54 Vancouver Canada June 2008
[5] J Bao C-Y ChowM FMokbel andW-S Ku ldquoEfficient evalu-ation of k-range nearest neighbor queries in road networksrdquo inProceedings of the 11th IEEE International Conference on MobileData Management (MDM rsquo10) pp 115ndash124 Kansas City MoUSA May 2010
[6] W-S Ku Y Chen and R Zimmermann ldquoPrivacy protectedspatial query processing for advanced location based servicesrdquo
Wireless Personal Communications vol 51 no 1 pp 53ndash652009
[7] K Mouratidis and M L Yiu ldquoAnonymous query processingin road networksrdquo IEEE Transactions on Knowledge and DataEngineering vol 22 no 1 pp 2ndash15 2010
[8] T Wang and L Liu ldquoPrivacy-aware mobile services over roadnetworksrdquo Proceedings of the VLDB Endowment vol 2 no 1pp 1042ndash1053 2009
[9] G Ghinita P Kalnis and S Skiadopoulos ldquoMobiHide amobilea peer-to-peer system for anonymous location-basedqueriesrdquo in Proceedings of the 10th International Symposium onSpatial and Temporal Databases (SSTD rsquo07) Boston MA USAJuly 2007 pp 221ndash238 Springer 2007
[10] S Ilarri E Mena and A Illarramendi ldquoLocation-dependentquery processing where we are and where we are headingrdquoACM Computing Surveys vol 42 no 3 article 12 2010
[11] H Al-Khalidi D Taniar J Betts and S Alamri ldquoDynamicsafe regions for moving range queries in mobile navigationrdquoInternational Journal of Ad Hoc and Ubiquitous Computing vol16 no 4 pp 250ndash259 2014
[12] H Al-Khalidi D Taniar J Betts and S Alamri ldquoMonitoringmoving queries inside a safe regionrdquo The Scientific WorldJournal vol 2014 Article ID 630396 13 pages 2014
[13] H-J Cho S J Kwon and T-S Chung ldquoA safe exit algorithmfor continuous nearest neighbor monitoring in road networksrdquoMobile Information Systems vol 9 no 1 pp 37ndash53 2013
[14] H-J Cho K Ryu and T-S Chung ldquoAn efficient algorithm forcomputing safe exit points of moving range queries in directedroad networksrdquo Information Systems vol 41 pp 1ndash19 2014
[15] C Li Y Gu J Qi G Yu R Zhang andW Yi ldquoProcessing mov-ing kNN queries using influential neighbor setsrdquo Proceedings ofthe VLDB Endowment vol 8 no 2 pp 113ndash124 2014
[16] S Nutanong R Zhang E Tanin and L Kulik ldquoAnalysis andevaluation of V-kNN an efficient algorithm for moving kNNqueriesrdquo VLDB Journal vol 19 no 3 pp 307ndash332 2010
[17] D Yung M L Yiu and E Lo ldquoA safe-exit approach for efficientnetwork-based moving range queriesrdquo Data and KnowledgeEngineering vol 72 pp 126ndash147 2012
[18] Y Gao B Zheng G Chen C Chen and Q Li ldquoContinuousnearest-neighbor search in the presence of obstaclesrdquo ACMTransactions on Database Systems vol 36 no 2 article 9 2011
[19] Y Tao D Papadias and Q Shen ldquoContinuous nearest neighborsearchrdquo in Proceedings of the 28th International Conference onVery Large Data Bases (VLDB rsquo02) pp 287ndash298 Hong KongAugust 2002
[20] M Mokbel C Chow and W Aref ldquoThe new casper queryprocessing for location serviceswithout compromising privacyrdquoin Proceedings of the 32nd International Conference on VeryLarge Data Bases (VLDB rsquo06) pp 763ndash774 Seoul Republic ofKorea 2006
[21] P Kalnis G Ghinita K Mouratidis and D Papadias ldquoPre-venting location-based identity inference in anonymous spatialqueriesrdquo IEEE Transactions on Knowledge and Data Engineer-ing vol 19 no 12 pp 1719ndash1733 2007
[22] C Chow M Mokbel J Naps and S Nath ldquoApproximateevaluation of range nearest neighbor queries with qualityguaranteerdquo in Advances in Spatial and Temporal Databases 11thInternational Symposium SSTD 2009 Aalborg Denmark July 8ndash10 2009 Proceedings vol 5644 of Lecture Notes in ComputerScience pp 283ndash301 Springer Berlin Germany 2009
Mobile Information Systems 17
[23] J Xu X Tang H Hu and J Du ldquoPrivacy-conscious location-based queries in mobile environmentsrdquo IEEE Transactions onParallel and Distributed Systems vol 21 no 3 pp 313ndash326 2010
[24] A M Aly W G Aref and M Ouzzani ldquoSpatial queries withtwo kNN predicatesrdquo Proceedings of the VLDB Endowment vol5 no 11 pp 1100ndash1111 2012
[25] Y Gu G Yu and X Yu ldquoAn efficient method for k nearestneighbor searching in obstructed spatial databasesrdquo Journal ofInformation Science and Engineering vol 30 no 5 pp 1569ndash1583 2014
[26] K Mouratidis M L Yiu D Papadias and N MamoulisldquoContinuous nearest neighbormonitoring in road networksrdquo inProceedings of the 32nd International Conference on Very LargeData Bases (VLDB rsquo06) pp 43ndash54 Seoul Republic of KoreaSeptember 2006
[27] Real Datasets for Spatial Databases httpwwwcsfsuedusimlifeifeiSpatialDatasethtm
[28] T Brinkhoff ldquoA framework for generating network-based mov-ing objectsrdquo GeoInformatica vol 6 no 2 pp 153ndash180 2002
[29] R Bauer D Delling P Sanders D Schieferdecker D Schultesand D Wagner ldquoCombining hierarchical and goal-directedspeed-up techniques for dijkstrarsquos algorithmrdquo Journal of Exper-imental Algorithmics vol 15 article 23 2010
[30] M Kolahdouzan C Shahabi and M Kolahdouzan ldquoVoronoi-based k nearest neighbor search for spatial network databasesrdquoinProceedings of the 30th International Conference onVery LargeData Bases (VLDB rsquo04) vol 30 pp 840ndash851 2004
[31] D Papadias J Zhang N Mamoulis and Y Tao ldquoQueryprocessing in spatial network databasesrdquo in Proceedings of the29th International Conference on Very Large Data Bases (VLDBrsquo03) vol 29 pp 802ndash813 2003
Submit your manuscripts athttpwwwhindawicom
Computer Games Technology
International Journal of
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Distributed Sensor Networks
International Journal of
Advances in
FuzzySystems
Hindawi Publishing Corporationhttpwwwhindawicom
Volume 2014
International Journal of
ReconfigurableComputing
Hindawi Publishing Corporation httpwwwhindawicom Volume 2014
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Applied Computational Intelligence and Soft Computing
thinspAdvancesthinspinthinsp
Artificial Intelligence
HindawithinspPublishingthinspCorporationhttpwwwhindawicom Volumethinsp2014
Advances inSoftware EngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Electrical and Computer Engineering
Journal of
Journal of
Computer Networks and Communications
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Hindawi Publishing Corporation
httpwwwhindawicom Volume 2014
Advances in
Multimedia
International Journal of
Biomedical Imaging
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
ArtificialNeural Systems
Advances in
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
RoboticsJournal of
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Computational Intelligence and Neuroscience
Industrial EngineeringJournal of
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014
The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Human-ComputerInteraction
Advances in
Computer EngineeringAdvances in
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
10 Mobile Information Systems
Input k the number of requested NNs 119874120572
119896cup 119874
120573
119896cup 119874(120572120573) the set of qualifying objects for a segment 120572120573
Output 119874119896th the set of distances from q to its kth NN 119900
119896th (ie 119874119896th = (119909 119910) | 119909 = len(120572 119902) 119910 = dist(119902 119900119896th))
(1) 119888119900119906119899119905 larr 0 count keeps the number of objects processed thus far(2) 119874
119896th = (119909 119910) | 119909 = len(120572 119902) 119910 = 0 for 119902 isin 120572120573 119910 = dist(119902 119900119896th) is initialized to 0 for 119902 isin 120572120573
(3) for each object 119900 isin 119874120572
119896cup 119874
120573
119896cup 119874(120572120573) do qualifying objects are handled sequentially
(4) if 119888119900119906119899119905 lt 119896 then if the number of objects processed thus far is less than 119896(5) 119874
119896th = (119909 119910) | 119909 = len(120572 119902) 119910 = max(dist(119902 120579119896th) dist(119902 119900)) for 119902 isin 120572120573 120579
119896th is the 119896th NN thus far(6) else(7) 119874
119896th = (119909 119910) | 119909 = len(120572 119902) 119910 = min(dist(119902 120579119896th) dist(119902 119900)) for 119902 isin 120572120573
(8) 119888119900119906119899119905 larr 119888119900119906119899119905 + 1 count increases by 1 whenever an object 119900 is processed(9) return 119874
119896th
Algorithm 2 Determine skyline for kth NN (k 119874120572
119896cup 119874
120573
119896cup 119874(120572120573))
3 3
3 4
4
9
10
2
n1 n3o3
o1o2
o4
(a) Plot of dist(119902 119900) for119900 isin 119900
1 1199002 1199003 1199004
3 34
9
10
2
n1 n3o3
3 4
o1o2
o4
okth
(b) Ω(larr99788899788899788811989911198993) = ⟨
larr99788899788899788811989911199003
11990011199002⟩ ⟨997888997888997888rarr119899
31199003 119900
2 1199003⟩
⟨1198993 119900
3 1199004⟩
Figure 11 Partitioning of a segmentlarr99788899788899788811989911198993into three safe segments
9
4
5
n2 n3
o3
(a) dist(119902 1199003) =
len(119902 1198993) + 4
87
32
2 3n2 n3o4
o4
o4
(b) dist(119902 1199004) =
len(119902 1199004)
4
9
5n2 n3
o5
(c) dist(119902 1199005) =
len(119902 1198992) + 4
Figure 12 Plot of dist(119902 119900) where 119902 isin 11989921198993and 119900 isin 119900
3 119900
4 119900
5
Ω(larr99788899788899788811989931198994) = ⟨
larr99788899788899788811989931198994 119900
3 119900
4⟩ This is because 1198741198993
119896equals 1198741198994
119896
and 119874(larr99788899788899788811989931198994) is a subset of 1198741198993
119896 that is 1198741198993
119896= 119874
1198994
119896and
119874(larr99788899788899788811989931198994) sub 119874
1198993
119896
5 Monitoring Safe Segments inDynamic Spatial Networks
Figure 14 illustrates an example of changing the weight of anedge 997888997888997888rarr119899
11199001in a spatial network where it is assumed that 119896 = 2
is given For convenience we consider the query region 119876
4 4
2
2 3n2 n3o4
o5 o3
(a) Plot of dist(119902119900) for 119900 isin 119900
3 1199004
1199005
4
2
2 3
34
n2 n3o4 s
o5 o3
okth
(b) Ω(11989921198993) =
⟨1198992119904 119900
4 1199005⟩
⟨1198993119904 119900
3 1199004⟩
Figure 13 Partitioning of a segment 11989921198993into two safe segments
that consists of an edgelarr99788899788899788811989911198993 that is 119876 = larr997888997888997888119899
11198993 As shown
in Figure 14(b) when the weight of an edge 997888997888997888rarr11989911199001has been
updated from 3 to 5 at time 119905119895 this update may invalidate
the safe segments in the query region 119876 Therefore it isnecessary to monitor the validity of safe segments in a queryregion when the change occurs To this end we introduce aninfluential region to monitor the validity of safe segmentsThe influential region Ψ
119902for a query point 119902 is defined as a
set of points 119901 such that dist(119902 119901) le dist(119902 119900119896th) holds If the
weight of an edge changes inside influential region Ψ119902 the
kNN query at query point 119902 should be reevaluated to reflectthe change in the weight However if the weight of an edgechanges outside influential regionΨ
119902 the change can be safely
ignored Suppose that a query region 119876 is represented by aset 119876119904 of 119897 connected segments and a set 119876119887 of 119898 boundarypoints that is 119876119904
= 1199041 1199042 119904
119897 and 119876119887
= 1198871 1198872 119887
119898
Then the influential region Ψ119876for query region 119876 becomes
the union of the influential region for each query point 119902 isin 119876that isΨ
119876= ⋃
119902isin119876Ψ119902This can be represented simply asΨ
119876=
119876cup(⋃119898
119894=1Ψ119887119894) whereΨ
119887119894refers to the influential region at each
boundary point 119887119894of the query region119876 SpecificallyΨ
119887119894is the
set of points 119901 such that dist(119887119894 119901) le dist(119887
119894 119900
119887119894
119896th) holds Here119900119887119894
119896th is the farthest answer object from boundary point 119887119894 that
Mobile Information Systems 11
3 4
4 63
3
3
2
4
1
3
2
2
2
n1
n2n3
n6n5
n4
o5
o1
o4
o3
o2
(a) Query region119876 = larr99788899788899788811989911198993 at time 119905
119894
3
3
32
4
5 2
3
46
1
2
2
4
n1
n2n3
n6n5
n4
o5
o1
o4
o3
o2
(b) Updating the weight of 997888997888997888rarr11989911199001at time 119905
119895
Figure 14 Changing the weight of an edge in a dynamic spatial network where 119905119894lt 119905
119895
46
3
3
3
2
4
1
1
1
1
3
2
2
2 2 2
n1
n2n3
n6n5
n4
o5
o1
o4
o3
o2
1205951
1205952 1205953
(a) Influence region Ψ119876at time 119905
119894
41 1 3 4
4
3
5 2
2
2
2
2
2
21
2
1
1
n1
n2n3
n6n5
n4
o5
o1
o4
o3
o2
1205951
1205953
1205955
1205952
1205954
(b) Updated influence region Ψ119876at time 119905
119895
Figure 15 Updating the influence region for 119876
is for each answer object 119900 isin 119874119887119894
119896 dist(119887
119894 119900) le dist(119887
119894 119900
119887119894
119896th)holds
Figure 15(a) illustrates the influential region for the queryregion 119876 at time 119905
119894 where the dotted line and square
brackets mark the influential region and its boundary pointsrespectively A set of the two NNs at boundary point 119899
1is
1198741198991
119896= 119900
1 119900
2 and the 119896th NN of 119899
1is 1199001198991
119896th = 1199001 Thus thedistance from 119899
1to its 119896th NN 119900
1is dist(119899
1 119900
1) = 3 and thus
the influential region Ψ1198991
for a boundary point 1198991becomes
Ψ1198991= 997888997888997888rarr11989911199001997888997888997888997888997888rarr119899111990021198994 Similarly the influential regionΨ
1198993for a
boundary point 1198993evaluates Ψ
1198993= 997888997888997888rarr11989931199003 119899
311990041205951 119899
31198995 119899
51205952
11989951205953 because 1198741198993
119896= 119900
3 119900
4 1199001198993
119896th = 1199003 and dist(1198993 119900
3) = 4
are given Consequently the influential region Ψ119876for query
region119876 becomesΨ119876=larr99788899788899788811989911198993cupΨ
1198991cupΨ
1198993= larr99788899788899788811989911198993997888997888997888997888997888rarr119899111990021198994997888997888997888rarr11989931199003
119899311990041205951 119899
31198995 119899
51205952 119899
51205953 As shown in Figure 15(b) updating
the weight of edge 997888997888997888rarr11989911199001from 3 to 5 may affect the safe
segments for the query region119876This is because updated edge997888997888997888rarr11989911199001overlaps the influential region Ψ
119876for query region 119876
In this case the server reevaluates the qualifying objects forquery region 119876 and provides updated qualifying objects sothat the user can update safe segments If the safe segmentsare updated the influential region should be also updatedaccordinglyThus the influential region for query region119876 isupdated at time 119905
119895 as shown in Figure 15(b) Finally updates
to the weights of the edges for examplelarr99788899788899788811989921199001 119899
21199005larr997888997888997888119899
31198994 and
11989941198996 that do not overlap the influential region can be safely
ignoredAlgorithm 3 monitors the validity of safe segments in a
query region when the weight of edges changes over timeAssume that the weight of edge 119899
119894119899119895is updated Subsequently
the server checks if edge 119899119894119899119895overlaps the influential region
Ψ119876for query region 119876 If the edge with the updated weight
does not overlap the influential region the update is safelyignored (lines (1)-(2)) Otherwise (ie Ψ
119876cap 119899
119894119899119895= 0) the
server requests that query object 119902 updates the query region(line (4)) Consequently 119902 submits a kRNNquery for updatedquery region119876updThe server then evaluates the kRNNqueryfor 119876upd and returns the kRNN query result Σ
119876updto 119902 (line
(5)) The query object then determines safe segments usingΣ119876upd
(line (6)) Finally the server updates the influentialregion accordingly (line (7))
6 Performance Evaluation
We describe our experimental settings in Section 61 andpresent the results of our experiments using real-life roadmaps in Section 62
61 Experimental Settings In the experiments we use tworeal-life roadmaps obtained from [27] to explore the impact
12 Mobile Information Systems
Input Ψ119876 influential region 119899
119894119899119895 updated edge
Output none(1) if Ψ
119876cap 119899
119894119899119895= 0 then an update to edge 119899
119894119899119895that does not overlap Ψ
119876is ignored
(2) ignore the update in the weight of edge 119899119894119899119895
(3) else this means that Ψ119876cap 119899
119894119899119895= 0
(4) 119876upd larr Update query region () server requests that 119902 update the query region(5) Σ
119876updlarr Evaluate 119896RNN query (119876upd 119896) server evaluates 119896RNN query for an updated query region
(6) Ω119876upd
larr Update safe segments (Σ119876upd
119896) 119902 determines safe segments inside the updated query region(7) Ψ
119876updlarr Update influential region (119876upd 119896) server updates influential region accordingly
Algorithm 3 Monitor safe segments (Ψ119876 119899
119894119899119895)
Table 4 Experimental parameter settings
Parameter RangeNumber of requested NNs (119896) 2 4 8 16 32Ratio of directed edge sequences to total edge sequences (119877dir) 0 5 10 20 50 ()Ratio of updated edge sequences to total edge sequences per timestamp (119877upd) 0 03 05 07 1 ()Size of query region (119876sz) 1 2 4 8 16
Number of data points (119873data)1 3 5 7 10 (times104) for NA1 3 5 7 10 (times103) for SJ
Speed of query points (119881qry)20 40 60 80 100 (kmh) for NA20 40 60 80 100 (kmh) for SJ
Distribution of data points (119863data) UniformDistribution of query points (119863qry) UniformNumber of query points (119873qry) 1000Road map NA SJ
of the edge sequence length on the performance of MORANThe first road map comprising 175813 nodes and 179179edges includes major roads in North America (NA) andcorresponds approximately to a data universe of 25times107 km2The second road map comprising 18263 nodes and 23874edges includes major roads in San Joaquin County (SJ)California and corresponds approximately to a data universeof 36 times 103 km2 For the first road map NA the numberof edge sequences and their average length are 12416 and29052m respectively For the second road map SJ thenumber of edge sequences and their average length are 20040and 248m respectively Table 4 summarizes the parametersused in the experiments In each experiment we vary a singleparameter in the range shown and set the other parameters tothe default values marked in boldWe simulate moving querypoints using a network-based moving objects generator [28]The number of query objects is set to 1000The size of a queryregion is determined by the number of edge sequences thatconstitute the query region The directed and updated edgesequences are selected randomly irrespective of the locationsof the data and query objects The length of an updated edgesequence is selected randomly to be between 01 and 10 timesthe original length For example if 119877upd is set to 05 and thenumber of edge sequences is 12416 then 62 edge sequences
are selected randomly every timestamp and their weights areupdated
As a benchmark against MORAN we use kRNN-E [5]without information of the precomputed shortest distancesbased on a shared execution paradigm to remove the redun-dant search overhead We choose kRNN-E instead of kRNN-F [5] with information of all the precomputed shortestdistances although kRNN-F typically outperforms kRNN-E The reason for this is that the precomputed distancesamong nodes are frequently invalidated by the updates tothe weights of the edges which makes it difficult to maintainthe precomputed distances To make kRNN-F applicable toour problem scenarios we can consider applying hierarchicaland goal-directed speed-up techniques [29] for DijkstrarsquosalgorithmThis approach can help to reduce the computationtime only at the server side and thus would not affect ourexperimental results Recall that the query processing at theserver is orthogonal to this study and that MORAN focuseson reducing the computation frequency and time taken atthe client side to evaluateMkRNN queries Our experimentalresults provide the average values per timestamp while 1000query points run for 600 timestamps Note that for roadmapNA the speed of the query points is 100 kmh by defaultwhereas for road map SJ the speed is 60 kmh by default
Mobile Information Systems 13
All algorithms are implemented in C++ and executed on adesktop PC with a 34GHz processor and 16GB of memory
62 Experimental Results Figure 16 shows a comparison ofthe query processing times at the client side of MORANand kRNN-E for evaluating MkRNN queries in road mapNA where each chart illustrates the effect of varying asingle parameter in Table 4 The values in the parenthesesindicate the computation frequency per timestamp Clearlythe computation frequency of kRNN-E equals the numberof query points and thus is omitted It should be noted thatthe server evaluates the MkRNN queries whenever the querypoints exit their query regions and thus the query processingtimes at the server side are the same forMORAN and kRNN-E Therefore we focus on comparing the query processingtimes at the client side
Figure 16(a) shows the query processing time as a func-tion of the number of requested NNs that is k Clearly thequery processing time at the client side increaseswith k How-ever the query processing time of MORAN is significantlyshorter than that of kRNN-E for all cases The reason for thisis that kRNN-E evaluates kNNquerieswhenever query pointsmove Conversely MORAN determines safe segments whenquery points enter new edge sequences or when the queryresults provided by the server become invalidated because ofupdated traffic conditions
Figure 16(b) shows the query processing time as a func-tion of the ratio of directed edge sequences to the totalnumber of edge sequences that is 119877dir Clearly 119877dir = 0refers to an undirected spatial networkThe query processingtimes at the client side of both methods are insensitive to thevalue of119877dirThe query processing time ofMORAN is shorterthan that of kRNN-E regardless of the value of 119877dir
Figure 16(c) shows the query processing time as a func-tion of the ratio of updated edge sequences to the totalnumber of edge sequences per timestamp that is 119877upd Here119877upd = 0 refers to a static spatial network The length of anupdated edge sequence is selected randomly frombetween 01and 10 times the original length Clearly the query processingtime of kRNN-E is almost constant regardless of the valueof 119877upd because query points in kRNN-E issue kNN queriesat each timestamp However the query processing time ofMORAN increases linearly with 119877upd because the probabilitythat the influential region of a query region overlaps anyupdated edge sequence increases with 119877upd Therefore alarger value of 119877upd leads to a longer query processing time
Figure 16(d) shows the query processing time as a func-tion of the size of the query region that is 119876sz Clearly thequery processing time increases with119876sz However the queryprocessing time of MORAN is clearly shorter than that ofkRNN-E regardless of the value of 119876sz
Figure 16(e) shows the query processing time as a func-tion of the number of data points that is 119873data In generalas 119873data increases the search space decreases and thus thequery processing time at the server side decreases accord-ingly However the query processing time at the client sideincreases with119873dataThis is because the number of qualifyingdata points handled at the client side increases with 119873data
Although the query processing time of MORAN increasesmore rapidly with 119873data than that of kRNN-E the queryprocessing time of MORAN is still shorter than that ofkRNN-E for 10 k le 119873data le 70 k However for119873data = 100 kthe query processing time of MORAN is 129 times longerthan that of kRNN-E
Figure 16(f) shows the query processing time as a func-tion of the speed of the query points that is 119881qry The queryprocessing time ofMORAN ismore sensitive to119881qry than thatof kRNN-E However the query processing time of MORANis clearly shorter than that of kRNN-E for all cases
Figure 17 shows a comparison of the query processingtimes at the client side of MORAN and kRNN-E for eval-uating MkRNN queries in road map SJ As when road mapNA is used when road map SJ is used the query processingtime of MORAN is clearly shorter than that of kRNN-E Asshown in Figure 17(a) the query processing time increaseswith k for the same reason as discussed earlier in the case ofFigure 16(a) As shown in Figure 17(b) the query processingtimes are not sensitive to the value of 119877dir As shown inFigure 17(c) the query processing time of kRNN-E remainsstable regardless of the value of 119877upd Conversely the queryprocessing time of MORAN increases with 119877upd because alarger value of 119877upd affects the influential regions of morequery points As shown in Figure 17(d) the query processingtime increases with 119876sz because the number of qualifyingdata points handled at the client side also increases with119876sz As shown in Figure 17(e) as 119873data increases the queryprocessing times decrease This is closely related to the sizeof the influential regions Specifically as 119873data increasesthe influential region decreases and thus updating weightsof edge sequences affects the influential regions of morequery points As shown in Figure 17(f) the query processingtime of MORAN increases with 119881qry for the same reason asdiscussed earlier in the case of Figure 16(f) whereas the queryprocessing time of kRNN-E remains stable regardless of thevalue of 119881qry
7 Conclusion
We proposed a new algorithm called MORAN for pro-cessing MkRNN queries in directed and dynamic spatialnetworks Existing studies focus on reducing redundant com-putation costs at the server side while processing snapshotkRNN queries in undirected and static spatial networksHowever MORAN clearly decreases the computation timeand frequency at the client side by dividing the query regioninto safe segments while processing MkRNN queries indirected and dynamic spatial networksThe influential regionfor a query region is introduced to monitor the impact of theupdated traffic conditions on the safe segments The resultsof experiments using real-life road maps demonstrate thatMORAN clearly outperforms kRNN-E for various workloadsin terms of the computation time and frequency We plan toextend our approach to processing sophisticated queries suchas kNN joins and top-k spatial preference queries in directedand dynamic spatial networks
14 Mobile Information Systems
k
(67)
2
MORAN
4 8 16 32
(73)
(83) (106)
(137)
0
10
20
30
40
CPU
tim
e at c
lient
side
(ms)
kRNN-E
(a) Effect of 119896
0 5 10 20 50
(90) (83) (83) (83) (81)
MORAN
0
5
10
15
20
CPU
tim
e at c
lient
side
(ms)
Rdir ()
kRNN-E
(b) Effect of 119877dir
00 03 05 07 10
(1)
(72) (83)
(157) (158)
MORAN
0
5
10
15
20
CPU
tim
e at c
lient
side
(ms)
Rupd ()
kRNN-E
(c) Effect of 119877upd
1 2 4 8 16
(66) (68) (83) (98)
(144)
MORAN
0
8
16
24
32CP
U ti
me a
t clie
nt si
de (m
s)
Qsz
kRNN-E
(d) Effect of119876sz
(163) (99)
(83) (80)
(79)
MORAN
0
8
16
24
32
CPU
tim
e at c
lient
side
(ms)
10 30 50 70 100
kRNN-E
Ndata (k)
(e) Effect of119873data
20 40 60 80 100
(95) (74) (81) (70) (83)
MORANkRNN-E
0
8
16
24
32
CPU
tim
e at c
lient
side
(ms)
Vqry (kmh)
(f) Effect of 119881qry
Figure 16 Comparison of CPU time at the client side for road map NA
Mobile Information Systems 15
(157) (209)(280)
(383)
(536)
k
2
MORAN
4 8 16 320
8
16
24
32
CPU
tim
e at c
lient
side
(ms)
kRNN-E
(a) Effect of 119896
(366) (286) (280) (272) (243)
MORAN
0 5 10 20 500
5
10
15
20
CPU
tim
e at c
lient
side
(ms)
Rdir ()
kRNN-E
(b) Effect of 119877dir
(26)(230) (280) (391) (429)
MORAN
00 03 05 07 10Rupd ()
0
5
10
15
20
CPU
tim
e at c
lient
side
(ms)
kRNN-E
(c) Effect of 119877upd
(277) (276) (280)(307)
(371)
MORAN
1 2 4 8 160
8
16
24
32CP
U ti
me a
t clie
nt si
de (m
s)
Qsz
kRNN-E
(d) Effect of119876sz
(612)
(359) (280) (232) (211)
MORAN
0
8
16
24
32
CPU
tim
e at c
lient
side
(ms)
1 3 5 7 10
kRNN-E
Ndata (k)
(e) Effect of119873data
(248) (265) (280) (286) (328)
MORAN
20 40 60 80 1000
5
10
15
20
CPU
tim
e at c
lient
side
(ms)
Vqry (kmh)
kRNN-E
(f) Effect of 119881qry
Figure 17 Comparison of CPU time at the client side for road map SJ
16 Mobile Information Systems
Notations and Their Definitions
119899119894119899119895 Edge connecting two adjacent nodes 119899
119894
and 119899119895
119899119904119899119904+1sdot sdot sdot 119899
119890 Edge sequence where 119899
119904(or 119899
119890) is the
start (or end) boundary node and theother nodes 119899
119904+1 119899
119890minus1 are
intermediate nodesdist(119901
1 119901
2) Length of the shortest path from point 119901
1
to point 1199012
len(1199011 119901
2) Length of the segment connecting two
points 1199011and 119901
2 such that 119901
1and 119901
2are
located in the same edge sequence119899119904119899119904+1sdot sdot sdot 119899
119890
119902 Query point119896 Number of requested NNs119874119901
119896 Set of kNNs at point 119901
120572120573 Segment that belongs to an edgesequence
119874(120572120573) Set of objects in segment 120572120573119900119896th The 119896th NN of query point 119902Ψ119902 Influence region for query point 119902
Ψ119876 Influence region for query region 119876
Conflict of Interests
The authors declare that there is no conflict of interestsregarding the publication of this paper
Acknowledgment
This research was supported by Kyungpook National Univer-sity Research Fund 2014
References
[1] U Demiryurek F Banaei-Kashani and C Shahabi ldquoEfficientcontinuous nearest neighbor query in spatial networks usingEuclidean restrictionrdquo in Advances in Spatial and TemporalDatabases 11th International Symposium SSTD 2009 AalborgDenmark July 8ndash10 2009 Proceedings vol 5644 of Lecture Notesin Computer Science pp 25ndash43 Springer Berlin Germany2009
[2] M R Kolahdouzan and C Shahabi ldquoAlternative solutionsfor continuous K nearest neighbor queries in spatial networkdatabasesrdquo GeoInformatica vol 9 no 4 pp 321ndash341 2005
[3] E W Dijkstra ldquoA note on two problems in connexion withgraphsrdquoNumerischeMathematik vol 1 no 1 pp 269ndash271 1959
[4] H Samet J Sankaranarayanan and H Alborzi ldquoScalablenetwork distance browsing in spatial databasesrdquo in Proceedingsof the SIGMOD International Conference on Management ofData (SIGMOD rsquo08) pp 43ndash54 Vancouver Canada June 2008
[5] J Bao C-Y ChowM FMokbel andW-S Ku ldquoEfficient evalu-ation of k-range nearest neighbor queries in road networksrdquo inProceedings of the 11th IEEE International Conference on MobileData Management (MDM rsquo10) pp 115ndash124 Kansas City MoUSA May 2010
[6] W-S Ku Y Chen and R Zimmermann ldquoPrivacy protectedspatial query processing for advanced location based servicesrdquo
Wireless Personal Communications vol 51 no 1 pp 53ndash652009
[7] K Mouratidis and M L Yiu ldquoAnonymous query processingin road networksrdquo IEEE Transactions on Knowledge and DataEngineering vol 22 no 1 pp 2ndash15 2010
[8] T Wang and L Liu ldquoPrivacy-aware mobile services over roadnetworksrdquo Proceedings of the VLDB Endowment vol 2 no 1pp 1042ndash1053 2009
[9] G Ghinita P Kalnis and S Skiadopoulos ldquoMobiHide amobilea peer-to-peer system for anonymous location-basedqueriesrdquo in Proceedings of the 10th International Symposium onSpatial and Temporal Databases (SSTD rsquo07) Boston MA USAJuly 2007 pp 221ndash238 Springer 2007
[10] S Ilarri E Mena and A Illarramendi ldquoLocation-dependentquery processing where we are and where we are headingrdquoACM Computing Surveys vol 42 no 3 article 12 2010
[11] H Al-Khalidi D Taniar J Betts and S Alamri ldquoDynamicsafe regions for moving range queries in mobile navigationrdquoInternational Journal of Ad Hoc and Ubiquitous Computing vol16 no 4 pp 250ndash259 2014
[12] H Al-Khalidi D Taniar J Betts and S Alamri ldquoMonitoringmoving queries inside a safe regionrdquo The Scientific WorldJournal vol 2014 Article ID 630396 13 pages 2014
[13] H-J Cho S J Kwon and T-S Chung ldquoA safe exit algorithmfor continuous nearest neighbor monitoring in road networksrdquoMobile Information Systems vol 9 no 1 pp 37ndash53 2013
[14] H-J Cho K Ryu and T-S Chung ldquoAn efficient algorithm forcomputing safe exit points of moving range queries in directedroad networksrdquo Information Systems vol 41 pp 1ndash19 2014
[15] C Li Y Gu J Qi G Yu R Zhang andW Yi ldquoProcessing mov-ing kNN queries using influential neighbor setsrdquo Proceedings ofthe VLDB Endowment vol 8 no 2 pp 113ndash124 2014
[16] S Nutanong R Zhang E Tanin and L Kulik ldquoAnalysis andevaluation of V-kNN an efficient algorithm for moving kNNqueriesrdquo VLDB Journal vol 19 no 3 pp 307ndash332 2010
[17] D Yung M L Yiu and E Lo ldquoA safe-exit approach for efficientnetwork-based moving range queriesrdquo Data and KnowledgeEngineering vol 72 pp 126ndash147 2012
[18] Y Gao B Zheng G Chen C Chen and Q Li ldquoContinuousnearest-neighbor search in the presence of obstaclesrdquo ACMTransactions on Database Systems vol 36 no 2 article 9 2011
[19] Y Tao D Papadias and Q Shen ldquoContinuous nearest neighborsearchrdquo in Proceedings of the 28th International Conference onVery Large Data Bases (VLDB rsquo02) pp 287ndash298 Hong KongAugust 2002
[20] M Mokbel C Chow and W Aref ldquoThe new casper queryprocessing for location serviceswithout compromising privacyrdquoin Proceedings of the 32nd International Conference on VeryLarge Data Bases (VLDB rsquo06) pp 763ndash774 Seoul Republic ofKorea 2006
[21] P Kalnis G Ghinita K Mouratidis and D Papadias ldquoPre-venting location-based identity inference in anonymous spatialqueriesrdquo IEEE Transactions on Knowledge and Data Engineer-ing vol 19 no 12 pp 1719ndash1733 2007
[22] C Chow M Mokbel J Naps and S Nath ldquoApproximateevaluation of range nearest neighbor queries with qualityguaranteerdquo in Advances in Spatial and Temporal Databases 11thInternational Symposium SSTD 2009 Aalborg Denmark July 8ndash10 2009 Proceedings vol 5644 of Lecture Notes in ComputerScience pp 283ndash301 Springer Berlin Germany 2009
Mobile Information Systems 17
[23] J Xu X Tang H Hu and J Du ldquoPrivacy-conscious location-based queries in mobile environmentsrdquo IEEE Transactions onParallel and Distributed Systems vol 21 no 3 pp 313ndash326 2010
[24] A M Aly W G Aref and M Ouzzani ldquoSpatial queries withtwo kNN predicatesrdquo Proceedings of the VLDB Endowment vol5 no 11 pp 1100ndash1111 2012
[25] Y Gu G Yu and X Yu ldquoAn efficient method for k nearestneighbor searching in obstructed spatial databasesrdquo Journal ofInformation Science and Engineering vol 30 no 5 pp 1569ndash1583 2014
[26] K Mouratidis M L Yiu D Papadias and N MamoulisldquoContinuous nearest neighbormonitoring in road networksrdquo inProceedings of the 32nd International Conference on Very LargeData Bases (VLDB rsquo06) pp 43ndash54 Seoul Republic of KoreaSeptember 2006
[27] Real Datasets for Spatial Databases httpwwwcsfsuedusimlifeifeiSpatialDatasethtm
[28] T Brinkhoff ldquoA framework for generating network-based mov-ing objectsrdquo GeoInformatica vol 6 no 2 pp 153ndash180 2002
[29] R Bauer D Delling P Sanders D Schieferdecker D Schultesand D Wagner ldquoCombining hierarchical and goal-directedspeed-up techniques for dijkstrarsquos algorithmrdquo Journal of Exper-imental Algorithmics vol 15 article 23 2010
[30] M Kolahdouzan C Shahabi and M Kolahdouzan ldquoVoronoi-based k nearest neighbor search for spatial network databasesrdquoinProceedings of the 30th International Conference onVery LargeData Bases (VLDB rsquo04) vol 30 pp 840ndash851 2004
[31] D Papadias J Zhang N Mamoulis and Y Tao ldquoQueryprocessing in spatial network databasesrdquo in Proceedings of the29th International Conference on Very Large Data Bases (VLDBrsquo03) vol 29 pp 802ndash813 2003
Submit your manuscripts athttpwwwhindawicom
Computer Games Technology
International Journal of
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Distributed Sensor Networks
International Journal of
Advances in
FuzzySystems
Hindawi Publishing Corporationhttpwwwhindawicom
Volume 2014
International Journal of
ReconfigurableComputing
Hindawi Publishing Corporation httpwwwhindawicom Volume 2014
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Applied Computational Intelligence and Soft Computing
thinspAdvancesthinspinthinsp
Artificial Intelligence
HindawithinspPublishingthinspCorporationhttpwwwhindawicom Volumethinsp2014
Advances inSoftware EngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Electrical and Computer Engineering
Journal of
Journal of
Computer Networks and Communications
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Hindawi Publishing Corporation
httpwwwhindawicom Volume 2014
Advances in
Multimedia
International Journal of
Biomedical Imaging
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
ArtificialNeural Systems
Advances in
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
RoboticsJournal of
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Computational Intelligence and Neuroscience
Industrial EngineeringJournal of
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014
The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Human-ComputerInteraction
Advances in
Computer EngineeringAdvances in
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Mobile Information Systems 11
3 4
4 63
3
3
2
4
1
3
2
2
2
n1
n2n3
n6n5
n4
o5
o1
o4
o3
o2
(a) Query region119876 = larr99788899788899788811989911198993 at time 119905
119894
3
3
32
4
5 2
3
46
1
2
2
4
n1
n2n3
n6n5
n4
o5
o1
o4
o3
o2
(b) Updating the weight of 997888997888997888rarr11989911199001at time 119905
119895
Figure 14 Changing the weight of an edge in a dynamic spatial network where 119905119894lt 119905
119895
46
3
3
3
2
4
1
1
1
1
3
2
2
2 2 2
n1
n2n3
n6n5
n4
o5
o1
o4
o3
o2
1205951
1205952 1205953
(a) Influence region Ψ119876at time 119905
119894
41 1 3 4
4
3
5 2
2
2
2
2
2
21
2
1
1
n1
n2n3
n6n5
n4
o5
o1
o4
o3
o2
1205951
1205953
1205955
1205952
1205954
(b) Updated influence region Ψ119876at time 119905
119895
Figure 15 Updating the influence region for 119876
is for each answer object 119900 isin 119874119887119894
119896 dist(119887
119894 119900) le dist(119887
119894 119900
119887119894
119896th)holds
Figure 15(a) illustrates the influential region for the queryregion 119876 at time 119905
119894 where the dotted line and square
brackets mark the influential region and its boundary pointsrespectively A set of the two NNs at boundary point 119899
1is
1198741198991
119896= 119900
1 119900
2 and the 119896th NN of 119899
1is 1199001198991
119896th = 1199001 Thus thedistance from 119899
1to its 119896th NN 119900
1is dist(119899
1 119900
1) = 3 and thus
the influential region Ψ1198991
for a boundary point 1198991becomes
Ψ1198991= 997888997888997888rarr11989911199001997888997888997888997888997888rarr119899111990021198994 Similarly the influential regionΨ
1198993for a
boundary point 1198993evaluates Ψ
1198993= 997888997888997888rarr11989931199003 119899
311990041205951 119899
31198995 119899
51205952
11989951205953 because 1198741198993
119896= 119900
3 119900
4 1199001198993
119896th = 1199003 and dist(1198993 119900
3) = 4
are given Consequently the influential region Ψ119876for query
region119876 becomesΨ119876=larr99788899788899788811989911198993cupΨ
1198991cupΨ
1198993= larr99788899788899788811989911198993997888997888997888997888997888rarr119899111990021198994997888997888997888rarr11989931199003
119899311990041205951 119899
31198995 119899
51205952 119899
51205953 As shown in Figure 15(b) updating
the weight of edge 997888997888997888rarr11989911199001from 3 to 5 may affect the safe
segments for the query region119876This is because updated edge997888997888997888rarr11989911199001overlaps the influential region Ψ
119876for query region 119876
In this case the server reevaluates the qualifying objects forquery region 119876 and provides updated qualifying objects sothat the user can update safe segments If the safe segmentsare updated the influential region should be also updatedaccordinglyThus the influential region for query region119876 isupdated at time 119905
119895 as shown in Figure 15(b) Finally updates
to the weights of the edges for examplelarr99788899788899788811989921199001 119899
21199005larr997888997888997888119899
31198994 and
11989941198996 that do not overlap the influential region can be safely
ignoredAlgorithm 3 monitors the validity of safe segments in a
query region when the weight of edges changes over timeAssume that the weight of edge 119899
119894119899119895is updated Subsequently
the server checks if edge 119899119894119899119895overlaps the influential region
Ψ119876for query region 119876 If the edge with the updated weight
does not overlap the influential region the update is safelyignored (lines (1)-(2)) Otherwise (ie Ψ
119876cap 119899
119894119899119895= 0) the
server requests that query object 119902 updates the query region(line (4)) Consequently 119902 submits a kRNNquery for updatedquery region119876updThe server then evaluates the kRNNqueryfor 119876upd and returns the kRNN query result Σ
119876updto 119902 (line
(5)) The query object then determines safe segments usingΣ119876upd
(line (6)) Finally the server updates the influentialregion accordingly (line (7))
6 Performance Evaluation
We describe our experimental settings in Section 61 andpresent the results of our experiments using real-life roadmaps in Section 62
61 Experimental Settings In the experiments we use tworeal-life roadmaps obtained from [27] to explore the impact
12 Mobile Information Systems
Input Ψ119876 influential region 119899
119894119899119895 updated edge
Output none(1) if Ψ
119876cap 119899
119894119899119895= 0 then an update to edge 119899
119894119899119895that does not overlap Ψ
119876is ignored
(2) ignore the update in the weight of edge 119899119894119899119895
(3) else this means that Ψ119876cap 119899
119894119899119895= 0
(4) 119876upd larr Update query region () server requests that 119902 update the query region(5) Σ
119876updlarr Evaluate 119896RNN query (119876upd 119896) server evaluates 119896RNN query for an updated query region
(6) Ω119876upd
larr Update safe segments (Σ119876upd
119896) 119902 determines safe segments inside the updated query region(7) Ψ
119876updlarr Update influential region (119876upd 119896) server updates influential region accordingly
Algorithm 3 Monitor safe segments (Ψ119876 119899
119894119899119895)
Table 4 Experimental parameter settings
Parameter RangeNumber of requested NNs (119896) 2 4 8 16 32Ratio of directed edge sequences to total edge sequences (119877dir) 0 5 10 20 50 ()Ratio of updated edge sequences to total edge sequences per timestamp (119877upd) 0 03 05 07 1 ()Size of query region (119876sz) 1 2 4 8 16
Number of data points (119873data)1 3 5 7 10 (times104) for NA1 3 5 7 10 (times103) for SJ
Speed of query points (119881qry)20 40 60 80 100 (kmh) for NA20 40 60 80 100 (kmh) for SJ
Distribution of data points (119863data) UniformDistribution of query points (119863qry) UniformNumber of query points (119873qry) 1000Road map NA SJ
of the edge sequence length on the performance of MORANThe first road map comprising 175813 nodes and 179179edges includes major roads in North America (NA) andcorresponds approximately to a data universe of 25times107 km2The second road map comprising 18263 nodes and 23874edges includes major roads in San Joaquin County (SJ)California and corresponds approximately to a data universeof 36 times 103 km2 For the first road map NA the numberof edge sequences and their average length are 12416 and29052m respectively For the second road map SJ thenumber of edge sequences and their average length are 20040and 248m respectively Table 4 summarizes the parametersused in the experiments In each experiment we vary a singleparameter in the range shown and set the other parameters tothe default values marked in boldWe simulate moving querypoints using a network-based moving objects generator [28]The number of query objects is set to 1000The size of a queryregion is determined by the number of edge sequences thatconstitute the query region The directed and updated edgesequences are selected randomly irrespective of the locationsof the data and query objects The length of an updated edgesequence is selected randomly to be between 01 and 10 timesthe original length For example if 119877upd is set to 05 and thenumber of edge sequences is 12416 then 62 edge sequences
are selected randomly every timestamp and their weights areupdated
As a benchmark against MORAN we use kRNN-E [5]without information of the precomputed shortest distancesbased on a shared execution paradigm to remove the redun-dant search overhead We choose kRNN-E instead of kRNN-F [5] with information of all the precomputed shortestdistances although kRNN-F typically outperforms kRNN-E The reason for this is that the precomputed distancesamong nodes are frequently invalidated by the updates tothe weights of the edges which makes it difficult to maintainthe precomputed distances To make kRNN-F applicable toour problem scenarios we can consider applying hierarchicaland goal-directed speed-up techniques [29] for DijkstrarsquosalgorithmThis approach can help to reduce the computationtime only at the server side and thus would not affect ourexperimental results Recall that the query processing at theserver is orthogonal to this study and that MORAN focuseson reducing the computation frequency and time taken atthe client side to evaluateMkRNN queries Our experimentalresults provide the average values per timestamp while 1000query points run for 600 timestamps Note that for roadmapNA the speed of the query points is 100 kmh by defaultwhereas for road map SJ the speed is 60 kmh by default
Mobile Information Systems 13
All algorithms are implemented in C++ and executed on adesktop PC with a 34GHz processor and 16GB of memory
62 Experimental Results Figure 16 shows a comparison ofthe query processing times at the client side of MORANand kRNN-E for evaluating MkRNN queries in road mapNA where each chart illustrates the effect of varying asingle parameter in Table 4 The values in the parenthesesindicate the computation frequency per timestamp Clearlythe computation frequency of kRNN-E equals the numberof query points and thus is omitted It should be noted thatthe server evaluates the MkRNN queries whenever the querypoints exit their query regions and thus the query processingtimes at the server side are the same forMORAN and kRNN-E Therefore we focus on comparing the query processingtimes at the client side
Figure 16(a) shows the query processing time as a func-tion of the number of requested NNs that is k Clearly thequery processing time at the client side increaseswith k How-ever the query processing time of MORAN is significantlyshorter than that of kRNN-E for all cases The reason for thisis that kRNN-E evaluates kNNquerieswhenever query pointsmove Conversely MORAN determines safe segments whenquery points enter new edge sequences or when the queryresults provided by the server become invalidated because ofupdated traffic conditions
Figure 16(b) shows the query processing time as a func-tion of the ratio of directed edge sequences to the totalnumber of edge sequences that is 119877dir Clearly 119877dir = 0refers to an undirected spatial networkThe query processingtimes at the client side of both methods are insensitive to thevalue of119877dirThe query processing time ofMORAN is shorterthan that of kRNN-E regardless of the value of 119877dir
Figure 16(c) shows the query processing time as a func-tion of the ratio of updated edge sequences to the totalnumber of edge sequences per timestamp that is 119877upd Here119877upd = 0 refers to a static spatial network The length of anupdated edge sequence is selected randomly frombetween 01and 10 times the original length Clearly the query processingtime of kRNN-E is almost constant regardless of the valueof 119877upd because query points in kRNN-E issue kNN queriesat each timestamp However the query processing time ofMORAN increases linearly with 119877upd because the probabilitythat the influential region of a query region overlaps anyupdated edge sequence increases with 119877upd Therefore alarger value of 119877upd leads to a longer query processing time
Figure 16(d) shows the query processing time as a func-tion of the size of the query region that is 119876sz Clearly thequery processing time increases with119876sz However the queryprocessing time of MORAN is clearly shorter than that ofkRNN-E regardless of the value of 119876sz
Figure 16(e) shows the query processing time as a func-tion of the number of data points that is 119873data In generalas 119873data increases the search space decreases and thus thequery processing time at the server side decreases accord-ingly However the query processing time at the client sideincreases with119873dataThis is because the number of qualifyingdata points handled at the client side increases with 119873data
Although the query processing time of MORAN increasesmore rapidly with 119873data than that of kRNN-E the queryprocessing time of MORAN is still shorter than that ofkRNN-E for 10 k le 119873data le 70 k However for119873data = 100 kthe query processing time of MORAN is 129 times longerthan that of kRNN-E
Figure 16(f) shows the query processing time as a func-tion of the speed of the query points that is 119881qry The queryprocessing time ofMORAN ismore sensitive to119881qry than thatof kRNN-E However the query processing time of MORANis clearly shorter than that of kRNN-E for all cases
Figure 17 shows a comparison of the query processingtimes at the client side of MORAN and kRNN-E for eval-uating MkRNN queries in road map SJ As when road mapNA is used when road map SJ is used the query processingtime of MORAN is clearly shorter than that of kRNN-E Asshown in Figure 17(a) the query processing time increaseswith k for the same reason as discussed earlier in the case ofFigure 16(a) As shown in Figure 17(b) the query processingtimes are not sensitive to the value of 119877dir As shown inFigure 17(c) the query processing time of kRNN-E remainsstable regardless of the value of 119877upd Conversely the queryprocessing time of MORAN increases with 119877upd because alarger value of 119877upd affects the influential regions of morequery points As shown in Figure 17(d) the query processingtime increases with 119876sz because the number of qualifyingdata points handled at the client side also increases with119876sz As shown in Figure 17(e) as 119873data increases the queryprocessing times decrease This is closely related to the sizeof the influential regions Specifically as 119873data increasesthe influential region decreases and thus updating weightsof edge sequences affects the influential regions of morequery points As shown in Figure 17(f) the query processingtime of MORAN increases with 119881qry for the same reason asdiscussed earlier in the case of Figure 16(f) whereas the queryprocessing time of kRNN-E remains stable regardless of thevalue of 119881qry
7 Conclusion
We proposed a new algorithm called MORAN for pro-cessing MkRNN queries in directed and dynamic spatialnetworks Existing studies focus on reducing redundant com-putation costs at the server side while processing snapshotkRNN queries in undirected and static spatial networksHowever MORAN clearly decreases the computation timeand frequency at the client side by dividing the query regioninto safe segments while processing MkRNN queries indirected and dynamic spatial networksThe influential regionfor a query region is introduced to monitor the impact of theupdated traffic conditions on the safe segments The resultsof experiments using real-life road maps demonstrate thatMORAN clearly outperforms kRNN-E for various workloadsin terms of the computation time and frequency We plan toextend our approach to processing sophisticated queries suchas kNN joins and top-k spatial preference queries in directedand dynamic spatial networks
14 Mobile Information Systems
k
(67)
2
MORAN
4 8 16 32
(73)
(83) (106)
(137)
0
10
20
30
40
CPU
tim
e at c
lient
side
(ms)
kRNN-E
(a) Effect of 119896
0 5 10 20 50
(90) (83) (83) (83) (81)
MORAN
0
5
10
15
20
CPU
tim
e at c
lient
side
(ms)
Rdir ()
kRNN-E
(b) Effect of 119877dir
00 03 05 07 10
(1)
(72) (83)
(157) (158)
MORAN
0
5
10
15
20
CPU
tim
e at c
lient
side
(ms)
Rupd ()
kRNN-E
(c) Effect of 119877upd
1 2 4 8 16
(66) (68) (83) (98)
(144)
MORAN
0
8
16
24
32CP
U ti
me a
t clie
nt si
de (m
s)
Qsz
kRNN-E
(d) Effect of119876sz
(163) (99)
(83) (80)
(79)
MORAN
0
8
16
24
32
CPU
tim
e at c
lient
side
(ms)
10 30 50 70 100
kRNN-E
Ndata (k)
(e) Effect of119873data
20 40 60 80 100
(95) (74) (81) (70) (83)
MORANkRNN-E
0
8
16
24
32
CPU
tim
e at c
lient
side
(ms)
Vqry (kmh)
(f) Effect of 119881qry
Figure 16 Comparison of CPU time at the client side for road map NA
Mobile Information Systems 15
(157) (209)(280)
(383)
(536)
k
2
MORAN
4 8 16 320
8
16
24
32
CPU
tim
e at c
lient
side
(ms)
kRNN-E
(a) Effect of 119896
(366) (286) (280) (272) (243)
MORAN
0 5 10 20 500
5
10
15
20
CPU
tim
e at c
lient
side
(ms)
Rdir ()
kRNN-E
(b) Effect of 119877dir
(26)(230) (280) (391) (429)
MORAN
00 03 05 07 10Rupd ()
0
5
10
15
20
CPU
tim
e at c
lient
side
(ms)
kRNN-E
(c) Effect of 119877upd
(277) (276) (280)(307)
(371)
MORAN
1 2 4 8 160
8
16
24
32CP
U ti
me a
t clie
nt si
de (m
s)
Qsz
kRNN-E
(d) Effect of119876sz
(612)
(359) (280) (232) (211)
MORAN
0
8
16
24
32
CPU
tim
e at c
lient
side
(ms)
1 3 5 7 10
kRNN-E
Ndata (k)
(e) Effect of119873data
(248) (265) (280) (286) (328)
MORAN
20 40 60 80 1000
5
10
15
20
CPU
tim
e at c
lient
side
(ms)
Vqry (kmh)
kRNN-E
(f) Effect of 119881qry
Figure 17 Comparison of CPU time at the client side for road map SJ
16 Mobile Information Systems
Notations and Their Definitions
119899119894119899119895 Edge connecting two adjacent nodes 119899
119894
and 119899119895
119899119904119899119904+1sdot sdot sdot 119899
119890 Edge sequence where 119899
119904(or 119899
119890) is the
start (or end) boundary node and theother nodes 119899
119904+1 119899
119890minus1 are
intermediate nodesdist(119901
1 119901
2) Length of the shortest path from point 119901
1
to point 1199012
len(1199011 119901
2) Length of the segment connecting two
points 1199011and 119901
2 such that 119901
1and 119901
2are
located in the same edge sequence119899119904119899119904+1sdot sdot sdot 119899
119890
119902 Query point119896 Number of requested NNs119874119901
119896 Set of kNNs at point 119901
120572120573 Segment that belongs to an edgesequence
119874(120572120573) Set of objects in segment 120572120573119900119896th The 119896th NN of query point 119902Ψ119902 Influence region for query point 119902
Ψ119876 Influence region for query region 119876
Conflict of Interests
The authors declare that there is no conflict of interestsregarding the publication of this paper
Acknowledgment
This research was supported by Kyungpook National Univer-sity Research Fund 2014
References
[1] U Demiryurek F Banaei-Kashani and C Shahabi ldquoEfficientcontinuous nearest neighbor query in spatial networks usingEuclidean restrictionrdquo in Advances in Spatial and TemporalDatabases 11th International Symposium SSTD 2009 AalborgDenmark July 8ndash10 2009 Proceedings vol 5644 of Lecture Notesin Computer Science pp 25ndash43 Springer Berlin Germany2009
[2] M R Kolahdouzan and C Shahabi ldquoAlternative solutionsfor continuous K nearest neighbor queries in spatial networkdatabasesrdquo GeoInformatica vol 9 no 4 pp 321ndash341 2005
[3] E W Dijkstra ldquoA note on two problems in connexion withgraphsrdquoNumerischeMathematik vol 1 no 1 pp 269ndash271 1959
[4] H Samet J Sankaranarayanan and H Alborzi ldquoScalablenetwork distance browsing in spatial databasesrdquo in Proceedingsof the SIGMOD International Conference on Management ofData (SIGMOD rsquo08) pp 43ndash54 Vancouver Canada June 2008
[5] J Bao C-Y ChowM FMokbel andW-S Ku ldquoEfficient evalu-ation of k-range nearest neighbor queries in road networksrdquo inProceedings of the 11th IEEE International Conference on MobileData Management (MDM rsquo10) pp 115ndash124 Kansas City MoUSA May 2010
[6] W-S Ku Y Chen and R Zimmermann ldquoPrivacy protectedspatial query processing for advanced location based servicesrdquo
Wireless Personal Communications vol 51 no 1 pp 53ndash652009
[7] K Mouratidis and M L Yiu ldquoAnonymous query processingin road networksrdquo IEEE Transactions on Knowledge and DataEngineering vol 22 no 1 pp 2ndash15 2010
[8] T Wang and L Liu ldquoPrivacy-aware mobile services over roadnetworksrdquo Proceedings of the VLDB Endowment vol 2 no 1pp 1042ndash1053 2009
[9] G Ghinita P Kalnis and S Skiadopoulos ldquoMobiHide amobilea peer-to-peer system for anonymous location-basedqueriesrdquo in Proceedings of the 10th International Symposium onSpatial and Temporal Databases (SSTD rsquo07) Boston MA USAJuly 2007 pp 221ndash238 Springer 2007
[10] S Ilarri E Mena and A Illarramendi ldquoLocation-dependentquery processing where we are and where we are headingrdquoACM Computing Surveys vol 42 no 3 article 12 2010
[11] H Al-Khalidi D Taniar J Betts and S Alamri ldquoDynamicsafe regions for moving range queries in mobile navigationrdquoInternational Journal of Ad Hoc and Ubiquitous Computing vol16 no 4 pp 250ndash259 2014
[12] H Al-Khalidi D Taniar J Betts and S Alamri ldquoMonitoringmoving queries inside a safe regionrdquo The Scientific WorldJournal vol 2014 Article ID 630396 13 pages 2014
[13] H-J Cho S J Kwon and T-S Chung ldquoA safe exit algorithmfor continuous nearest neighbor monitoring in road networksrdquoMobile Information Systems vol 9 no 1 pp 37ndash53 2013
[14] H-J Cho K Ryu and T-S Chung ldquoAn efficient algorithm forcomputing safe exit points of moving range queries in directedroad networksrdquo Information Systems vol 41 pp 1ndash19 2014
[15] C Li Y Gu J Qi G Yu R Zhang andW Yi ldquoProcessing mov-ing kNN queries using influential neighbor setsrdquo Proceedings ofthe VLDB Endowment vol 8 no 2 pp 113ndash124 2014
[16] S Nutanong R Zhang E Tanin and L Kulik ldquoAnalysis andevaluation of V-kNN an efficient algorithm for moving kNNqueriesrdquo VLDB Journal vol 19 no 3 pp 307ndash332 2010
[17] D Yung M L Yiu and E Lo ldquoA safe-exit approach for efficientnetwork-based moving range queriesrdquo Data and KnowledgeEngineering vol 72 pp 126ndash147 2012
[18] Y Gao B Zheng G Chen C Chen and Q Li ldquoContinuousnearest-neighbor search in the presence of obstaclesrdquo ACMTransactions on Database Systems vol 36 no 2 article 9 2011
[19] Y Tao D Papadias and Q Shen ldquoContinuous nearest neighborsearchrdquo in Proceedings of the 28th International Conference onVery Large Data Bases (VLDB rsquo02) pp 287ndash298 Hong KongAugust 2002
[20] M Mokbel C Chow and W Aref ldquoThe new casper queryprocessing for location serviceswithout compromising privacyrdquoin Proceedings of the 32nd International Conference on VeryLarge Data Bases (VLDB rsquo06) pp 763ndash774 Seoul Republic ofKorea 2006
[21] P Kalnis G Ghinita K Mouratidis and D Papadias ldquoPre-venting location-based identity inference in anonymous spatialqueriesrdquo IEEE Transactions on Knowledge and Data Engineer-ing vol 19 no 12 pp 1719ndash1733 2007
[22] C Chow M Mokbel J Naps and S Nath ldquoApproximateevaluation of range nearest neighbor queries with qualityguaranteerdquo in Advances in Spatial and Temporal Databases 11thInternational Symposium SSTD 2009 Aalborg Denmark July 8ndash10 2009 Proceedings vol 5644 of Lecture Notes in ComputerScience pp 283ndash301 Springer Berlin Germany 2009
Mobile Information Systems 17
[23] J Xu X Tang H Hu and J Du ldquoPrivacy-conscious location-based queries in mobile environmentsrdquo IEEE Transactions onParallel and Distributed Systems vol 21 no 3 pp 313ndash326 2010
[24] A M Aly W G Aref and M Ouzzani ldquoSpatial queries withtwo kNN predicatesrdquo Proceedings of the VLDB Endowment vol5 no 11 pp 1100ndash1111 2012
[25] Y Gu G Yu and X Yu ldquoAn efficient method for k nearestneighbor searching in obstructed spatial databasesrdquo Journal ofInformation Science and Engineering vol 30 no 5 pp 1569ndash1583 2014
[26] K Mouratidis M L Yiu D Papadias and N MamoulisldquoContinuous nearest neighbormonitoring in road networksrdquo inProceedings of the 32nd International Conference on Very LargeData Bases (VLDB rsquo06) pp 43ndash54 Seoul Republic of KoreaSeptember 2006
[27] Real Datasets for Spatial Databases httpwwwcsfsuedusimlifeifeiSpatialDatasethtm
[28] T Brinkhoff ldquoA framework for generating network-based mov-ing objectsrdquo GeoInformatica vol 6 no 2 pp 153ndash180 2002
[29] R Bauer D Delling P Sanders D Schieferdecker D Schultesand D Wagner ldquoCombining hierarchical and goal-directedspeed-up techniques for dijkstrarsquos algorithmrdquo Journal of Exper-imental Algorithmics vol 15 article 23 2010
[30] M Kolahdouzan C Shahabi and M Kolahdouzan ldquoVoronoi-based k nearest neighbor search for spatial network databasesrdquoinProceedings of the 30th International Conference onVery LargeData Bases (VLDB rsquo04) vol 30 pp 840ndash851 2004
[31] D Papadias J Zhang N Mamoulis and Y Tao ldquoQueryprocessing in spatial network databasesrdquo in Proceedings of the29th International Conference on Very Large Data Bases (VLDBrsquo03) vol 29 pp 802ndash813 2003
Submit your manuscripts athttpwwwhindawicom
Computer Games Technology
International Journal of
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Distributed Sensor Networks
International Journal of
Advances in
FuzzySystems
Hindawi Publishing Corporationhttpwwwhindawicom
Volume 2014
International Journal of
ReconfigurableComputing
Hindawi Publishing Corporation httpwwwhindawicom Volume 2014
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Applied Computational Intelligence and Soft Computing
thinspAdvancesthinspinthinsp
Artificial Intelligence
HindawithinspPublishingthinspCorporationhttpwwwhindawicom Volumethinsp2014
Advances inSoftware EngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Electrical and Computer Engineering
Journal of
Journal of
Computer Networks and Communications
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Hindawi Publishing Corporation
httpwwwhindawicom Volume 2014
Advances in
Multimedia
International Journal of
Biomedical Imaging
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
ArtificialNeural Systems
Advances in
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
RoboticsJournal of
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Computational Intelligence and Neuroscience
Industrial EngineeringJournal of
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014
The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Human-ComputerInteraction
Advances in
Computer EngineeringAdvances in
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
12 Mobile Information Systems
Input Ψ119876 influential region 119899
119894119899119895 updated edge
Output none(1) if Ψ
119876cap 119899
119894119899119895= 0 then an update to edge 119899
119894119899119895that does not overlap Ψ
119876is ignored
(2) ignore the update in the weight of edge 119899119894119899119895
(3) else this means that Ψ119876cap 119899
119894119899119895= 0
(4) 119876upd larr Update query region () server requests that 119902 update the query region(5) Σ
119876updlarr Evaluate 119896RNN query (119876upd 119896) server evaluates 119896RNN query for an updated query region
(6) Ω119876upd
larr Update safe segments (Σ119876upd
119896) 119902 determines safe segments inside the updated query region(7) Ψ
119876updlarr Update influential region (119876upd 119896) server updates influential region accordingly
Algorithm 3 Monitor safe segments (Ψ119876 119899
119894119899119895)
Table 4 Experimental parameter settings
Parameter RangeNumber of requested NNs (119896) 2 4 8 16 32Ratio of directed edge sequences to total edge sequences (119877dir) 0 5 10 20 50 ()Ratio of updated edge sequences to total edge sequences per timestamp (119877upd) 0 03 05 07 1 ()Size of query region (119876sz) 1 2 4 8 16
Number of data points (119873data)1 3 5 7 10 (times104) for NA1 3 5 7 10 (times103) for SJ
Speed of query points (119881qry)20 40 60 80 100 (kmh) for NA20 40 60 80 100 (kmh) for SJ
Distribution of data points (119863data) UniformDistribution of query points (119863qry) UniformNumber of query points (119873qry) 1000Road map NA SJ
of the edge sequence length on the performance of MORANThe first road map comprising 175813 nodes and 179179edges includes major roads in North America (NA) andcorresponds approximately to a data universe of 25times107 km2The second road map comprising 18263 nodes and 23874edges includes major roads in San Joaquin County (SJ)California and corresponds approximately to a data universeof 36 times 103 km2 For the first road map NA the numberof edge sequences and their average length are 12416 and29052m respectively For the second road map SJ thenumber of edge sequences and their average length are 20040and 248m respectively Table 4 summarizes the parametersused in the experiments In each experiment we vary a singleparameter in the range shown and set the other parameters tothe default values marked in boldWe simulate moving querypoints using a network-based moving objects generator [28]The number of query objects is set to 1000The size of a queryregion is determined by the number of edge sequences thatconstitute the query region The directed and updated edgesequences are selected randomly irrespective of the locationsof the data and query objects The length of an updated edgesequence is selected randomly to be between 01 and 10 timesthe original length For example if 119877upd is set to 05 and thenumber of edge sequences is 12416 then 62 edge sequences
are selected randomly every timestamp and their weights areupdated
As a benchmark against MORAN we use kRNN-E [5]without information of the precomputed shortest distancesbased on a shared execution paradigm to remove the redun-dant search overhead We choose kRNN-E instead of kRNN-F [5] with information of all the precomputed shortestdistances although kRNN-F typically outperforms kRNN-E The reason for this is that the precomputed distancesamong nodes are frequently invalidated by the updates tothe weights of the edges which makes it difficult to maintainthe precomputed distances To make kRNN-F applicable toour problem scenarios we can consider applying hierarchicaland goal-directed speed-up techniques [29] for DijkstrarsquosalgorithmThis approach can help to reduce the computationtime only at the server side and thus would not affect ourexperimental results Recall that the query processing at theserver is orthogonal to this study and that MORAN focuseson reducing the computation frequency and time taken atthe client side to evaluateMkRNN queries Our experimentalresults provide the average values per timestamp while 1000query points run for 600 timestamps Note that for roadmapNA the speed of the query points is 100 kmh by defaultwhereas for road map SJ the speed is 60 kmh by default
Mobile Information Systems 13
All algorithms are implemented in C++ and executed on adesktop PC with a 34GHz processor and 16GB of memory
62 Experimental Results Figure 16 shows a comparison ofthe query processing times at the client side of MORANand kRNN-E for evaluating MkRNN queries in road mapNA where each chart illustrates the effect of varying asingle parameter in Table 4 The values in the parenthesesindicate the computation frequency per timestamp Clearlythe computation frequency of kRNN-E equals the numberof query points and thus is omitted It should be noted thatthe server evaluates the MkRNN queries whenever the querypoints exit their query regions and thus the query processingtimes at the server side are the same forMORAN and kRNN-E Therefore we focus on comparing the query processingtimes at the client side
Figure 16(a) shows the query processing time as a func-tion of the number of requested NNs that is k Clearly thequery processing time at the client side increaseswith k How-ever the query processing time of MORAN is significantlyshorter than that of kRNN-E for all cases The reason for thisis that kRNN-E evaluates kNNquerieswhenever query pointsmove Conversely MORAN determines safe segments whenquery points enter new edge sequences or when the queryresults provided by the server become invalidated because ofupdated traffic conditions
Figure 16(b) shows the query processing time as a func-tion of the ratio of directed edge sequences to the totalnumber of edge sequences that is 119877dir Clearly 119877dir = 0refers to an undirected spatial networkThe query processingtimes at the client side of both methods are insensitive to thevalue of119877dirThe query processing time ofMORAN is shorterthan that of kRNN-E regardless of the value of 119877dir
Figure 16(c) shows the query processing time as a func-tion of the ratio of updated edge sequences to the totalnumber of edge sequences per timestamp that is 119877upd Here119877upd = 0 refers to a static spatial network The length of anupdated edge sequence is selected randomly frombetween 01and 10 times the original length Clearly the query processingtime of kRNN-E is almost constant regardless of the valueof 119877upd because query points in kRNN-E issue kNN queriesat each timestamp However the query processing time ofMORAN increases linearly with 119877upd because the probabilitythat the influential region of a query region overlaps anyupdated edge sequence increases with 119877upd Therefore alarger value of 119877upd leads to a longer query processing time
Figure 16(d) shows the query processing time as a func-tion of the size of the query region that is 119876sz Clearly thequery processing time increases with119876sz However the queryprocessing time of MORAN is clearly shorter than that ofkRNN-E regardless of the value of 119876sz
Figure 16(e) shows the query processing time as a func-tion of the number of data points that is 119873data In generalas 119873data increases the search space decreases and thus thequery processing time at the server side decreases accord-ingly However the query processing time at the client sideincreases with119873dataThis is because the number of qualifyingdata points handled at the client side increases with 119873data
Although the query processing time of MORAN increasesmore rapidly with 119873data than that of kRNN-E the queryprocessing time of MORAN is still shorter than that ofkRNN-E for 10 k le 119873data le 70 k However for119873data = 100 kthe query processing time of MORAN is 129 times longerthan that of kRNN-E
Figure 16(f) shows the query processing time as a func-tion of the speed of the query points that is 119881qry The queryprocessing time ofMORAN ismore sensitive to119881qry than thatof kRNN-E However the query processing time of MORANis clearly shorter than that of kRNN-E for all cases
Figure 17 shows a comparison of the query processingtimes at the client side of MORAN and kRNN-E for eval-uating MkRNN queries in road map SJ As when road mapNA is used when road map SJ is used the query processingtime of MORAN is clearly shorter than that of kRNN-E Asshown in Figure 17(a) the query processing time increaseswith k for the same reason as discussed earlier in the case ofFigure 16(a) As shown in Figure 17(b) the query processingtimes are not sensitive to the value of 119877dir As shown inFigure 17(c) the query processing time of kRNN-E remainsstable regardless of the value of 119877upd Conversely the queryprocessing time of MORAN increases with 119877upd because alarger value of 119877upd affects the influential regions of morequery points As shown in Figure 17(d) the query processingtime increases with 119876sz because the number of qualifyingdata points handled at the client side also increases with119876sz As shown in Figure 17(e) as 119873data increases the queryprocessing times decrease This is closely related to the sizeof the influential regions Specifically as 119873data increasesthe influential region decreases and thus updating weightsof edge sequences affects the influential regions of morequery points As shown in Figure 17(f) the query processingtime of MORAN increases with 119881qry for the same reason asdiscussed earlier in the case of Figure 16(f) whereas the queryprocessing time of kRNN-E remains stable regardless of thevalue of 119881qry
7 Conclusion
We proposed a new algorithm called MORAN for pro-cessing MkRNN queries in directed and dynamic spatialnetworks Existing studies focus on reducing redundant com-putation costs at the server side while processing snapshotkRNN queries in undirected and static spatial networksHowever MORAN clearly decreases the computation timeand frequency at the client side by dividing the query regioninto safe segments while processing MkRNN queries indirected and dynamic spatial networksThe influential regionfor a query region is introduced to monitor the impact of theupdated traffic conditions on the safe segments The resultsof experiments using real-life road maps demonstrate thatMORAN clearly outperforms kRNN-E for various workloadsin terms of the computation time and frequency We plan toextend our approach to processing sophisticated queries suchas kNN joins and top-k spatial preference queries in directedand dynamic spatial networks
14 Mobile Information Systems
k
(67)
2
MORAN
4 8 16 32
(73)
(83) (106)
(137)
0
10
20
30
40
CPU
tim
e at c
lient
side
(ms)
kRNN-E
(a) Effect of 119896
0 5 10 20 50
(90) (83) (83) (83) (81)
MORAN
0
5
10
15
20
CPU
tim
e at c
lient
side
(ms)
Rdir ()
kRNN-E
(b) Effect of 119877dir
00 03 05 07 10
(1)
(72) (83)
(157) (158)
MORAN
0
5
10
15
20
CPU
tim
e at c
lient
side
(ms)
Rupd ()
kRNN-E
(c) Effect of 119877upd
1 2 4 8 16
(66) (68) (83) (98)
(144)
MORAN
0
8
16
24
32CP
U ti
me a
t clie
nt si
de (m
s)
Qsz
kRNN-E
(d) Effect of119876sz
(163) (99)
(83) (80)
(79)
MORAN
0
8
16
24
32
CPU
tim
e at c
lient
side
(ms)
10 30 50 70 100
kRNN-E
Ndata (k)
(e) Effect of119873data
20 40 60 80 100
(95) (74) (81) (70) (83)
MORANkRNN-E
0
8
16
24
32
CPU
tim
e at c
lient
side
(ms)
Vqry (kmh)
(f) Effect of 119881qry
Figure 16 Comparison of CPU time at the client side for road map NA
Mobile Information Systems 15
(157) (209)(280)
(383)
(536)
k
2
MORAN
4 8 16 320
8
16
24
32
CPU
tim
e at c
lient
side
(ms)
kRNN-E
(a) Effect of 119896
(366) (286) (280) (272) (243)
MORAN
0 5 10 20 500
5
10
15
20
CPU
tim
e at c
lient
side
(ms)
Rdir ()
kRNN-E
(b) Effect of 119877dir
(26)(230) (280) (391) (429)
MORAN
00 03 05 07 10Rupd ()
0
5
10
15
20
CPU
tim
e at c
lient
side
(ms)
kRNN-E
(c) Effect of 119877upd
(277) (276) (280)(307)
(371)
MORAN
1 2 4 8 160
8
16
24
32CP
U ti
me a
t clie
nt si
de (m
s)
Qsz
kRNN-E
(d) Effect of119876sz
(612)
(359) (280) (232) (211)
MORAN
0
8
16
24
32
CPU
tim
e at c
lient
side
(ms)
1 3 5 7 10
kRNN-E
Ndata (k)
(e) Effect of119873data
(248) (265) (280) (286) (328)
MORAN
20 40 60 80 1000
5
10
15
20
CPU
tim
e at c
lient
side
(ms)
Vqry (kmh)
kRNN-E
(f) Effect of 119881qry
Figure 17 Comparison of CPU time at the client side for road map SJ
16 Mobile Information Systems
Notations and Their Definitions
119899119894119899119895 Edge connecting two adjacent nodes 119899
119894
and 119899119895
119899119904119899119904+1sdot sdot sdot 119899
119890 Edge sequence where 119899
119904(or 119899
119890) is the
start (or end) boundary node and theother nodes 119899
119904+1 119899
119890minus1 are
intermediate nodesdist(119901
1 119901
2) Length of the shortest path from point 119901
1
to point 1199012
len(1199011 119901
2) Length of the segment connecting two
points 1199011and 119901
2 such that 119901
1and 119901
2are
located in the same edge sequence119899119904119899119904+1sdot sdot sdot 119899
119890
119902 Query point119896 Number of requested NNs119874119901
119896 Set of kNNs at point 119901
120572120573 Segment that belongs to an edgesequence
119874(120572120573) Set of objects in segment 120572120573119900119896th The 119896th NN of query point 119902Ψ119902 Influence region for query point 119902
Ψ119876 Influence region for query region 119876
Conflict of Interests
The authors declare that there is no conflict of interestsregarding the publication of this paper
Acknowledgment
This research was supported by Kyungpook National Univer-sity Research Fund 2014
References
[1] U Demiryurek F Banaei-Kashani and C Shahabi ldquoEfficientcontinuous nearest neighbor query in spatial networks usingEuclidean restrictionrdquo in Advances in Spatial and TemporalDatabases 11th International Symposium SSTD 2009 AalborgDenmark July 8ndash10 2009 Proceedings vol 5644 of Lecture Notesin Computer Science pp 25ndash43 Springer Berlin Germany2009
[2] M R Kolahdouzan and C Shahabi ldquoAlternative solutionsfor continuous K nearest neighbor queries in spatial networkdatabasesrdquo GeoInformatica vol 9 no 4 pp 321ndash341 2005
[3] E W Dijkstra ldquoA note on two problems in connexion withgraphsrdquoNumerischeMathematik vol 1 no 1 pp 269ndash271 1959
[4] H Samet J Sankaranarayanan and H Alborzi ldquoScalablenetwork distance browsing in spatial databasesrdquo in Proceedingsof the SIGMOD International Conference on Management ofData (SIGMOD rsquo08) pp 43ndash54 Vancouver Canada June 2008
[5] J Bao C-Y ChowM FMokbel andW-S Ku ldquoEfficient evalu-ation of k-range nearest neighbor queries in road networksrdquo inProceedings of the 11th IEEE International Conference on MobileData Management (MDM rsquo10) pp 115ndash124 Kansas City MoUSA May 2010
[6] W-S Ku Y Chen and R Zimmermann ldquoPrivacy protectedspatial query processing for advanced location based servicesrdquo
Wireless Personal Communications vol 51 no 1 pp 53ndash652009
[7] K Mouratidis and M L Yiu ldquoAnonymous query processingin road networksrdquo IEEE Transactions on Knowledge and DataEngineering vol 22 no 1 pp 2ndash15 2010
[8] T Wang and L Liu ldquoPrivacy-aware mobile services over roadnetworksrdquo Proceedings of the VLDB Endowment vol 2 no 1pp 1042ndash1053 2009
[9] G Ghinita P Kalnis and S Skiadopoulos ldquoMobiHide amobilea peer-to-peer system for anonymous location-basedqueriesrdquo in Proceedings of the 10th International Symposium onSpatial and Temporal Databases (SSTD rsquo07) Boston MA USAJuly 2007 pp 221ndash238 Springer 2007
[10] S Ilarri E Mena and A Illarramendi ldquoLocation-dependentquery processing where we are and where we are headingrdquoACM Computing Surveys vol 42 no 3 article 12 2010
[11] H Al-Khalidi D Taniar J Betts and S Alamri ldquoDynamicsafe regions for moving range queries in mobile navigationrdquoInternational Journal of Ad Hoc and Ubiquitous Computing vol16 no 4 pp 250ndash259 2014
[12] H Al-Khalidi D Taniar J Betts and S Alamri ldquoMonitoringmoving queries inside a safe regionrdquo The Scientific WorldJournal vol 2014 Article ID 630396 13 pages 2014
[13] H-J Cho S J Kwon and T-S Chung ldquoA safe exit algorithmfor continuous nearest neighbor monitoring in road networksrdquoMobile Information Systems vol 9 no 1 pp 37ndash53 2013
[14] H-J Cho K Ryu and T-S Chung ldquoAn efficient algorithm forcomputing safe exit points of moving range queries in directedroad networksrdquo Information Systems vol 41 pp 1ndash19 2014
[15] C Li Y Gu J Qi G Yu R Zhang andW Yi ldquoProcessing mov-ing kNN queries using influential neighbor setsrdquo Proceedings ofthe VLDB Endowment vol 8 no 2 pp 113ndash124 2014
[16] S Nutanong R Zhang E Tanin and L Kulik ldquoAnalysis andevaluation of V-kNN an efficient algorithm for moving kNNqueriesrdquo VLDB Journal vol 19 no 3 pp 307ndash332 2010
[17] D Yung M L Yiu and E Lo ldquoA safe-exit approach for efficientnetwork-based moving range queriesrdquo Data and KnowledgeEngineering vol 72 pp 126ndash147 2012
[18] Y Gao B Zheng G Chen C Chen and Q Li ldquoContinuousnearest-neighbor search in the presence of obstaclesrdquo ACMTransactions on Database Systems vol 36 no 2 article 9 2011
[19] Y Tao D Papadias and Q Shen ldquoContinuous nearest neighborsearchrdquo in Proceedings of the 28th International Conference onVery Large Data Bases (VLDB rsquo02) pp 287ndash298 Hong KongAugust 2002
[20] M Mokbel C Chow and W Aref ldquoThe new casper queryprocessing for location serviceswithout compromising privacyrdquoin Proceedings of the 32nd International Conference on VeryLarge Data Bases (VLDB rsquo06) pp 763ndash774 Seoul Republic ofKorea 2006
[21] P Kalnis G Ghinita K Mouratidis and D Papadias ldquoPre-venting location-based identity inference in anonymous spatialqueriesrdquo IEEE Transactions on Knowledge and Data Engineer-ing vol 19 no 12 pp 1719ndash1733 2007
[22] C Chow M Mokbel J Naps and S Nath ldquoApproximateevaluation of range nearest neighbor queries with qualityguaranteerdquo in Advances in Spatial and Temporal Databases 11thInternational Symposium SSTD 2009 Aalborg Denmark July 8ndash10 2009 Proceedings vol 5644 of Lecture Notes in ComputerScience pp 283ndash301 Springer Berlin Germany 2009
Mobile Information Systems 17
[23] J Xu X Tang H Hu and J Du ldquoPrivacy-conscious location-based queries in mobile environmentsrdquo IEEE Transactions onParallel and Distributed Systems vol 21 no 3 pp 313ndash326 2010
[24] A M Aly W G Aref and M Ouzzani ldquoSpatial queries withtwo kNN predicatesrdquo Proceedings of the VLDB Endowment vol5 no 11 pp 1100ndash1111 2012
[25] Y Gu G Yu and X Yu ldquoAn efficient method for k nearestneighbor searching in obstructed spatial databasesrdquo Journal ofInformation Science and Engineering vol 30 no 5 pp 1569ndash1583 2014
[26] K Mouratidis M L Yiu D Papadias and N MamoulisldquoContinuous nearest neighbormonitoring in road networksrdquo inProceedings of the 32nd International Conference on Very LargeData Bases (VLDB rsquo06) pp 43ndash54 Seoul Republic of KoreaSeptember 2006
[27] Real Datasets for Spatial Databases httpwwwcsfsuedusimlifeifeiSpatialDatasethtm
[28] T Brinkhoff ldquoA framework for generating network-based mov-ing objectsrdquo GeoInformatica vol 6 no 2 pp 153ndash180 2002
[29] R Bauer D Delling P Sanders D Schieferdecker D Schultesand D Wagner ldquoCombining hierarchical and goal-directedspeed-up techniques for dijkstrarsquos algorithmrdquo Journal of Exper-imental Algorithmics vol 15 article 23 2010
[30] M Kolahdouzan C Shahabi and M Kolahdouzan ldquoVoronoi-based k nearest neighbor search for spatial network databasesrdquoinProceedings of the 30th International Conference onVery LargeData Bases (VLDB rsquo04) vol 30 pp 840ndash851 2004
[31] D Papadias J Zhang N Mamoulis and Y Tao ldquoQueryprocessing in spatial network databasesrdquo in Proceedings of the29th International Conference on Very Large Data Bases (VLDBrsquo03) vol 29 pp 802ndash813 2003
Submit your manuscripts athttpwwwhindawicom
Computer Games Technology
International Journal of
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Distributed Sensor Networks
International Journal of
Advances in
FuzzySystems
Hindawi Publishing Corporationhttpwwwhindawicom
Volume 2014
International Journal of
ReconfigurableComputing
Hindawi Publishing Corporation httpwwwhindawicom Volume 2014
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Applied Computational Intelligence and Soft Computing
thinspAdvancesthinspinthinsp
Artificial Intelligence
HindawithinspPublishingthinspCorporationhttpwwwhindawicom Volumethinsp2014
Advances inSoftware EngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Electrical and Computer Engineering
Journal of
Journal of
Computer Networks and Communications
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Hindawi Publishing Corporation
httpwwwhindawicom Volume 2014
Advances in
Multimedia
International Journal of
Biomedical Imaging
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
ArtificialNeural Systems
Advances in
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
RoboticsJournal of
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Computational Intelligence and Neuroscience
Industrial EngineeringJournal of
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014
The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Human-ComputerInteraction
Advances in
Computer EngineeringAdvances in
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Mobile Information Systems 13
All algorithms are implemented in C++ and executed on adesktop PC with a 34GHz processor and 16GB of memory
62 Experimental Results Figure 16 shows a comparison ofthe query processing times at the client side of MORANand kRNN-E for evaluating MkRNN queries in road mapNA where each chart illustrates the effect of varying asingle parameter in Table 4 The values in the parenthesesindicate the computation frequency per timestamp Clearlythe computation frequency of kRNN-E equals the numberof query points and thus is omitted It should be noted thatthe server evaluates the MkRNN queries whenever the querypoints exit their query regions and thus the query processingtimes at the server side are the same forMORAN and kRNN-E Therefore we focus on comparing the query processingtimes at the client side
Figure 16(a) shows the query processing time as a func-tion of the number of requested NNs that is k Clearly thequery processing time at the client side increaseswith k How-ever the query processing time of MORAN is significantlyshorter than that of kRNN-E for all cases The reason for thisis that kRNN-E evaluates kNNquerieswhenever query pointsmove Conversely MORAN determines safe segments whenquery points enter new edge sequences or when the queryresults provided by the server become invalidated because ofupdated traffic conditions
Figure 16(b) shows the query processing time as a func-tion of the ratio of directed edge sequences to the totalnumber of edge sequences that is 119877dir Clearly 119877dir = 0refers to an undirected spatial networkThe query processingtimes at the client side of both methods are insensitive to thevalue of119877dirThe query processing time ofMORAN is shorterthan that of kRNN-E regardless of the value of 119877dir
Figure 16(c) shows the query processing time as a func-tion of the ratio of updated edge sequences to the totalnumber of edge sequences per timestamp that is 119877upd Here119877upd = 0 refers to a static spatial network The length of anupdated edge sequence is selected randomly frombetween 01and 10 times the original length Clearly the query processingtime of kRNN-E is almost constant regardless of the valueof 119877upd because query points in kRNN-E issue kNN queriesat each timestamp However the query processing time ofMORAN increases linearly with 119877upd because the probabilitythat the influential region of a query region overlaps anyupdated edge sequence increases with 119877upd Therefore alarger value of 119877upd leads to a longer query processing time
Figure 16(d) shows the query processing time as a func-tion of the size of the query region that is 119876sz Clearly thequery processing time increases with119876sz However the queryprocessing time of MORAN is clearly shorter than that ofkRNN-E regardless of the value of 119876sz
Figure 16(e) shows the query processing time as a func-tion of the number of data points that is 119873data In generalas 119873data increases the search space decreases and thus thequery processing time at the server side decreases accord-ingly However the query processing time at the client sideincreases with119873dataThis is because the number of qualifyingdata points handled at the client side increases with 119873data
Although the query processing time of MORAN increasesmore rapidly with 119873data than that of kRNN-E the queryprocessing time of MORAN is still shorter than that ofkRNN-E for 10 k le 119873data le 70 k However for119873data = 100 kthe query processing time of MORAN is 129 times longerthan that of kRNN-E
Figure 16(f) shows the query processing time as a func-tion of the speed of the query points that is 119881qry The queryprocessing time ofMORAN ismore sensitive to119881qry than thatof kRNN-E However the query processing time of MORANis clearly shorter than that of kRNN-E for all cases
Figure 17 shows a comparison of the query processingtimes at the client side of MORAN and kRNN-E for eval-uating MkRNN queries in road map SJ As when road mapNA is used when road map SJ is used the query processingtime of MORAN is clearly shorter than that of kRNN-E Asshown in Figure 17(a) the query processing time increaseswith k for the same reason as discussed earlier in the case ofFigure 16(a) As shown in Figure 17(b) the query processingtimes are not sensitive to the value of 119877dir As shown inFigure 17(c) the query processing time of kRNN-E remainsstable regardless of the value of 119877upd Conversely the queryprocessing time of MORAN increases with 119877upd because alarger value of 119877upd affects the influential regions of morequery points As shown in Figure 17(d) the query processingtime increases with 119876sz because the number of qualifyingdata points handled at the client side also increases with119876sz As shown in Figure 17(e) as 119873data increases the queryprocessing times decrease This is closely related to the sizeof the influential regions Specifically as 119873data increasesthe influential region decreases and thus updating weightsof edge sequences affects the influential regions of morequery points As shown in Figure 17(f) the query processingtime of MORAN increases with 119881qry for the same reason asdiscussed earlier in the case of Figure 16(f) whereas the queryprocessing time of kRNN-E remains stable regardless of thevalue of 119881qry
7 Conclusion
We proposed a new algorithm called MORAN for pro-cessing MkRNN queries in directed and dynamic spatialnetworks Existing studies focus on reducing redundant com-putation costs at the server side while processing snapshotkRNN queries in undirected and static spatial networksHowever MORAN clearly decreases the computation timeand frequency at the client side by dividing the query regioninto safe segments while processing MkRNN queries indirected and dynamic spatial networksThe influential regionfor a query region is introduced to monitor the impact of theupdated traffic conditions on the safe segments The resultsof experiments using real-life road maps demonstrate thatMORAN clearly outperforms kRNN-E for various workloadsin terms of the computation time and frequency We plan toextend our approach to processing sophisticated queries suchas kNN joins and top-k spatial preference queries in directedand dynamic spatial networks
14 Mobile Information Systems
k
(67)
2
MORAN
4 8 16 32
(73)
(83) (106)
(137)
0
10
20
30
40
CPU
tim
e at c
lient
side
(ms)
kRNN-E
(a) Effect of 119896
0 5 10 20 50
(90) (83) (83) (83) (81)
MORAN
0
5
10
15
20
CPU
tim
e at c
lient
side
(ms)
Rdir ()
kRNN-E
(b) Effect of 119877dir
00 03 05 07 10
(1)
(72) (83)
(157) (158)
MORAN
0
5
10
15
20
CPU
tim
e at c
lient
side
(ms)
Rupd ()
kRNN-E
(c) Effect of 119877upd
1 2 4 8 16
(66) (68) (83) (98)
(144)
MORAN
0
8
16
24
32CP
U ti
me a
t clie
nt si
de (m
s)
Qsz
kRNN-E
(d) Effect of119876sz
(163) (99)
(83) (80)
(79)
MORAN
0
8
16
24
32
CPU
tim
e at c
lient
side
(ms)
10 30 50 70 100
kRNN-E
Ndata (k)
(e) Effect of119873data
20 40 60 80 100
(95) (74) (81) (70) (83)
MORANkRNN-E
0
8
16
24
32
CPU
tim
e at c
lient
side
(ms)
Vqry (kmh)
(f) Effect of 119881qry
Figure 16 Comparison of CPU time at the client side for road map NA
Mobile Information Systems 15
(157) (209)(280)
(383)
(536)
k
2
MORAN
4 8 16 320
8
16
24
32
CPU
tim
e at c
lient
side
(ms)
kRNN-E
(a) Effect of 119896
(366) (286) (280) (272) (243)
MORAN
0 5 10 20 500
5
10
15
20
CPU
tim
e at c
lient
side
(ms)
Rdir ()
kRNN-E
(b) Effect of 119877dir
(26)(230) (280) (391) (429)
MORAN
00 03 05 07 10Rupd ()
0
5
10
15
20
CPU
tim
e at c
lient
side
(ms)
kRNN-E
(c) Effect of 119877upd
(277) (276) (280)(307)
(371)
MORAN
1 2 4 8 160
8
16
24
32CP
U ti
me a
t clie
nt si
de (m
s)
Qsz
kRNN-E
(d) Effect of119876sz
(612)
(359) (280) (232) (211)
MORAN
0
8
16
24
32
CPU
tim
e at c
lient
side
(ms)
1 3 5 7 10
kRNN-E
Ndata (k)
(e) Effect of119873data
(248) (265) (280) (286) (328)
MORAN
20 40 60 80 1000
5
10
15
20
CPU
tim
e at c
lient
side
(ms)
Vqry (kmh)
kRNN-E
(f) Effect of 119881qry
Figure 17 Comparison of CPU time at the client side for road map SJ
16 Mobile Information Systems
Notations and Their Definitions
119899119894119899119895 Edge connecting two adjacent nodes 119899
119894
and 119899119895
119899119904119899119904+1sdot sdot sdot 119899
119890 Edge sequence where 119899
119904(or 119899
119890) is the
start (or end) boundary node and theother nodes 119899
119904+1 119899
119890minus1 are
intermediate nodesdist(119901
1 119901
2) Length of the shortest path from point 119901
1
to point 1199012
len(1199011 119901
2) Length of the segment connecting two
points 1199011and 119901
2 such that 119901
1and 119901
2are
located in the same edge sequence119899119904119899119904+1sdot sdot sdot 119899
119890
119902 Query point119896 Number of requested NNs119874119901
119896 Set of kNNs at point 119901
120572120573 Segment that belongs to an edgesequence
119874(120572120573) Set of objects in segment 120572120573119900119896th The 119896th NN of query point 119902Ψ119902 Influence region for query point 119902
Ψ119876 Influence region for query region 119876
Conflict of Interests
The authors declare that there is no conflict of interestsregarding the publication of this paper
Acknowledgment
This research was supported by Kyungpook National Univer-sity Research Fund 2014
References
[1] U Demiryurek F Banaei-Kashani and C Shahabi ldquoEfficientcontinuous nearest neighbor query in spatial networks usingEuclidean restrictionrdquo in Advances in Spatial and TemporalDatabases 11th International Symposium SSTD 2009 AalborgDenmark July 8ndash10 2009 Proceedings vol 5644 of Lecture Notesin Computer Science pp 25ndash43 Springer Berlin Germany2009
[2] M R Kolahdouzan and C Shahabi ldquoAlternative solutionsfor continuous K nearest neighbor queries in spatial networkdatabasesrdquo GeoInformatica vol 9 no 4 pp 321ndash341 2005
[3] E W Dijkstra ldquoA note on two problems in connexion withgraphsrdquoNumerischeMathematik vol 1 no 1 pp 269ndash271 1959
[4] H Samet J Sankaranarayanan and H Alborzi ldquoScalablenetwork distance browsing in spatial databasesrdquo in Proceedingsof the SIGMOD International Conference on Management ofData (SIGMOD rsquo08) pp 43ndash54 Vancouver Canada June 2008
[5] J Bao C-Y ChowM FMokbel andW-S Ku ldquoEfficient evalu-ation of k-range nearest neighbor queries in road networksrdquo inProceedings of the 11th IEEE International Conference on MobileData Management (MDM rsquo10) pp 115ndash124 Kansas City MoUSA May 2010
[6] W-S Ku Y Chen and R Zimmermann ldquoPrivacy protectedspatial query processing for advanced location based servicesrdquo
Wireless Personal Communications vol 51 no 1 pp 53ndash652009
[7] K Mouratidis and M L Yiu ldquoAnonymous query processingin road networksrdquo IEEE Transactions on Knowledge and DataEngineering vol 22 no 1 pp 2ndash15 2010
[8] T Wang and L Liu ldquoPrivacy-aware mobile services over roadnetworksrdquo Proceedings of the VLDB Endowment vol 2 no 1pp 1042ndash1053 2009
[9] G Ghinita P Kalnis and S Skiadopoulos ldquoMobiHide amobilea peer-to-peer system for anonymous location-basedqueriesrdquo in Proceedings of the 10th International Symposium onSpatial and Temporal Databases (SSTD rsquo07) Boston MA USAJuly 2007 pp 221ndash238 Springer 2007
[10] S Ilarri E Mena and A Illarramendi ldquoLocation-dependentquery processing where we are and where we are headingrdquoACM Computing Surveys vol 42 no 3 article 12 2010
[11] H Al-Khalidi D Taniar J Betts and S Alamri ldquoDynamicsafe regions for moving range queries in mobile navigationrdquoInternational Journal of Ad Hoc and Ubiquitous Computing vol16 no 4 pp 250ndash259 2014
[12] H Al-Khalidi D Taniar J Betts and S Alamri ldquoMonitoringmoving queries inside a safe regionrdquo The Scientific WorldJournal vol 2014 Article ID 630396 13 pages 2014
[13] H-J Cho S J Kwon and T-S Chung ldquoA safe exit algorithmfor continuous nearest neighbor monitoring in road networksrdquoMobile Information Systems vol 9 no 1 pp 37ndash53 2013
[14] H-J Cho K Ryu and T-S Chung ldquoAn efficient algorithm forcomputing safe exit points of moving range queries in directedroad networksrdquo Information Systems vol 41 pp 1ndash19 2014
[15] C Li Y Gu J Qi G Yu R Zhang andW Yi ldquoProcessing mov-ing kNN queries using influential neighbor setsrdquo Proceedings ofthe VLDB Endowment vol 8 no 2 pp 113ndash124 2014
[16] S Nutanong R Zhang E Tanin and L Kulik ldquoAnalysis andevaluation of V-kNN an efficient algorithm for moving kNNqueriesrdquo VLDB Journal vol 19 no 3 pp 307ndash332 2010
[17] D Yung M L Yiu and E Lo ldquoA safe-exit approach for efficientnetwork-based moving range queriesrdquo Data and KnowledgeEngineering vol 72 pp 126ndash147 2012
[18] Y Gao B Zheng G Chen C Chen and Q Li ldquoContinuousnearest-neighbor search in the presence of obstaclesrdquo ACMTransactions on Database Systems vol 36 no 2 article 9 2011
[19] Y Tao D Papadias and Q Shen ldquoContinuous nearest neighborsearchrdquo in Proceedings of the 28th International Conference onVery Large Data Bases (VLDB rsquo02) pp 287ndash298 Hong KongAugust 2002
[20] M Mokbel C Chow and W Aref ldquoThe new casper queryprocessing for location serviceswithout compromising privacyrdquoin Proceedings of the 32nd International Conference on VeryLarge Data Bases (VLDB rsquo06) pp 763ndash774 Seoul Republic ofKorea 2006
[21] P Kalnis G Ghinita K Mouratidis and D Papadias ldquoPre-venting location-based identity inference in anonymous spatialqueriesrdquo IEEE Transactions on Knowledge and Data Engineer-ing vol 19 no 12 pp 1719ndash1733 2007
[22] C Chow M Mokbel J Naps and S Nath ldquoApproximateevaluation of range nearest neighbor queries with qualityguaranteerdquo in Advances in Spatial and Temporal Databases 11thInternational Symposium SSTD 2009 Aalborg Denmark July 8ndash10 2009 Proceedings vol 5644 of Lecture Notes in ComputerScience pp 283ndash301 Springer Berlin Germany 2009
Mobile Information Systems 17
[23] J Xu X Tang H Hu and J Du ldquoPrivacy-conscious location-based queries in mobile environmentsrdquo IEEE Transactions onParallel and Distributed Systems vol 21 no 3 pp 313ndash326 2010
[24] A M Aly W G Aref and M Ouzzani ldquoSpatial queries withtwo kNN predicatesrdquo Proceedings of the VLDB Endowment vol5 no 11 pp 1100ndash1111 2012
[25] Y Gu G Yu and X Yu ldquoAn efficient method for k nearestneighbor searching in obstructed spatial databasesrdquo Journal ofInformation Science and Engineering vol 30 no 5 pp 1569ndash1583 2014
[26] K Mouratidis M L Yiu D Papadias and N MamoulisldquoContinuous nearest neighbormonitoring in road networksrdquo inProceedings of the 32nd International Conference on Very LargeData Bases (VLDB rsquo06) pp 43ndash54 Seoul Republic of KoreaSeptember 2006
[27] Real Datasets for Spatial Databases httpwwwcsfsuedusimlifeifeiSpatialDatasethtm
[28] T Brinkhoff ldquoA framework for generating network-based mov-ing objectsrdquo GeoInformatica vol 6 no 2 pp 153ndash180 2002
[29] R Bauer D Delling P Sanders D Schieferdecker D Schultesand D Wagner ldquoCombining hierarchical and goal-directedspeed-up techniques for dijkstrarsquos algorithmrdquo Journal of Exper-imental Algorithmics vol 15 article 23 2010
[30] M Kolahdouzan C Shahabi and M Kolahdouzan ldquoVoronoi-based k nearest neighbor search for spatial network databasesrdquoinProceedings of the 30th International Conference onVery LargeData Bases (VLDB rsquo04) vol 30 pp 840ndash851 2004
[31] D Papadias J Zhang N Mamoulis and Y Tao ldquoQueryprocessing in spatial network databasesrdquo in Proceedings of the29th International Conference on Very Large Data Bases (VLDBrsquo03) vol 29 pp 802ndash813 2003
Submit your manuscripts athttpwwwhindawicom
Computer Games Technology
International Journal of
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Distributed Sensor Networks
International Journal of
Advances in
FuzzySystems
Hindawi Publishing Corporationhttpwwwhindawicom
Volume 2014
International Journal of
ReconfigurableComputing
Hindawi Publishing Corporation httpwwwhindawicom Volume 2014
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Applied Computational Intelligence and Soft Computing
thinspAdvancesthinspinthinsp
Artificial Intelligence
HindawithinspPublishingthinspCorporationhttpwwwhindawicom Volumethinsp2014
Advances inSoftware EngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Electrical and Computer Engineering
Journal of
Journal of
Computer Networks and Communications
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Hindawi Publishing Corporation
httpwwwhindawicom Volume 2014
Advances in
Multimedia
International Journal of
Biomedical Imaging
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
ArtificialNeural Systems
Advances in
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
RoboticsJournal of
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Computational Intelligence and Neuroscience
Industrial EngineeringJournal of
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014
The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Human-ComputerInteraction
Advances in
Computer EngineeringAdvances in
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
14 Mobile Information Systems
k
(67)
2
MORAN
4 8 16 32
(73)
(83) (106)
(137)
0
10
20
30
40
CPU
tim
e at c
lient
side
(ms)
kRNN-E
(a) Effect of 119896
0 5 10 20 50
(90) (83) (83) (83) (81)
MORAN
0
5
10
15
20
CPU
tim
e at c
lient
side
(ms)
Rdir ()
kRNN-E
(b) Effect of 119877dir
00 03 05 07 10
(1)
(72) (83)
(157) (158)
MORAN
0
5
10
15
20
CPU
tim
e at c
lient
side
(ms)
Rupd ()
kRNN-E
(c) Effect of 119877upd
1 2 4 8 16
(66) (68) (83) (98)
(144)
MORAN
0
8
16
24
32CP
U ti
me a
t clie
nt si
de (m
s)
Qsz
kRNN-E
(d) Effect of119876sz
(163) (99)
(83) (80)
(79)
MORAN
0
8
16
24
32
CPU
tim
e at c
lient
side
(ms)
10 30 50 70 100
kRNN-E
Ndata (k)
(e) Effect of119873data
20 40 60 80 100
(95) (74) (81) (70) (83)
MORANkRNN-E
0
8
16
24
32
CPU
tim
e at c
lient
side
(ms)
Vqry (kmh)
(f) Effect of 119881qry
Figure 16 Comparison of CPU time at the client side for road map NA
Mobile Information Systems 15
(157) (209)(280)
(383)
(536)
k
2
MORAN
4 8 16 320
8
16
24
32
CPU
tim
e at c
lient
side
(ms)
kRNN-E
(a) Effect of 119896
(366) (286) (280) (272) (243)
MORAN
0 5 10 20 500
5
10
15
20
CPU
tim
e at c
lient
side
(ms)
Rdir ()
kRNN-E
(b) Effect of 119877dir
(26)(230) (280) (391) (429)
MORAN
00 03 05 07 10Rupd ()
0
5
10
15
20
CPU
tim
e at c
lient
side
(ms)
kRNN-E
(c) Effect of 119877upd
(277) (276) (280)(307)
(371)
MORAN
1 2 4 8 160
8
16
24
32CP
U ti
me a
t clie
nt si
de (m
s)
Qsz
kRNN-E
(d) Effect of119876sz
(612)
(359) (280) (232) (211)
MORAN
0
8
16
24
32
CPU
tim
e at c
lient
side
(ms)
1 3 5 7 10
kRNN-E
Ndata (k)
(e) Effect of119873data
(248) (265) (280) (286) (328)
MORAN
20 40 60 80 1000
5
10
15
20
CPU
tim
e at c
lient
side
(ms)
Vqry (kmh)
kRNN-E
(f) Effect of 119881qry
Figure 17 Comparison of CPU time at the client side for road map SJ
16 Mobile Information Systems
Notations and Their Definitions
119899119894119899119895 Edge connecting two adjacent nodes 119899
119894
and 119899119895
119899119904119899119904+1sdot sdot sdot 119899
119890 Edge sequence where 119899
119904(or 119899
119890) is the
start (or end) boundary node and theother nodes 119899
119904+1 119899
119890minus1 are
intermediate nodesdist(119901
1 119901
2) Length of the shortest path from point 119901
1
to point 1199012
len(1199011 119901
2) Length of the segment connecting two
points 1199011and 119901
2 such that 119901
1and 119901
2are
located in the same edge sequence119899119904119899119904+1sdot sdot sdot 119899
119890
119902 Query point119896 Number of requested NNs119874119901
119896 Set of kNNs at point 119901
120572120573 Segment that belongs to an edgesequence
119874(120572120573) Set of objects in segment 120572120573119900119896th The 119896th NN of query point 119902Ψ119902 Influence region for query point 119902
Ψ119876 Influence region for query region 119876
Conflict of Interests
The authors declare that there is no conflict of interestsregarding the publication of this paper
Acknowledgment
This research was supported by Kyungpook National Univer-sity Research Fund 2014
References
[1] U Demiryurek F Banaei-Kashani and C Shahabi ldquoEfficientcontinuous nearest neighbor query in spatial networks usingEuclidean restrictionrdquo in Advances in Spatial and TemporalDatabases 11th International Symposium SSTD 2009 AalborgDenmark July 8ndash10 2009 Proceedings vol 5644 of Lecture Notesin Computer Science pp 25ndash43 Springer Berlin Germany2009
[2] M R Kolahdouzan and C Shahabi ldquoAlternative solutionsfor continuous K nearest neighbor queries in spatial networkdatabasesrdquo GeoInformatica vol 9 no 4 pp 321ndash341 2005
[3] E W Dijkstra ldquoA note on two problems in connexion withgraphsrdquoNumerischeMathematik vol 1 no 1 pp 269ndash271 1959
[4] H Samet J Sankaranarayanan and H Alborzi ldquoScalablenetwork distance browsing in spatial databasesrdquo in Proceedingsof the SIGMOD International Conference on Management ofData (SIGMOD rsquo08) pp 43ndash54 Vancouver Canada June 2008
[5] J Bao C-Y ChowM FMokbel andW-S Ku ldquoEfficient evalu-ation of k-range nearest neighbor queries in road networksrdquo inProceedings of the 11th IEEE International Conference on MobileData Management (MDM rsquo10) pp 115ndash124 Kansas City MoUSA May 2010
[6] W-S Ku Y Chen and R Zimmermann ldquoPrivacy protectedspatial query processing for advanced location based servicesrdquo
Wireless Personal Communications vol 51 no 1 pp 53ndash652009
[7] K Mouratidis and M L Yiu ldquoAnonymous query processingin road networksrdquo IEEE Transactions on Knowledge and DataEngineering vol 22 no 1 pp 2ndash15 2010
[8] T Wang and L Liu ldquoPrivacy-aware mobile services over roadnetworksrdquo Proceedings of the VLDB Endowment vol 2 no 1pp 1042ndash1053 2009
[9] G Ghinita P Kalnis and S Skiadopoulos ldquoMobiHide amobilea peer-to-peer system for anonymous location-basedqueriesrdquo in Proceedings of the 10th International Symposium onSpatial and Temporal Databases (SSTD rsquo07) Boston MA USAJuly 2007 pp 221ndash238 Springer 2007
[10] S Ilarri E Mena and A Illarramendi ldquoLocation-dependentquery processing where we are and where we are headingrdquoACM Computing Surveys vol 42 no 3 article 12 2010
[11] H Al-Khalidi D Taniar J Betts and S Alamri ldquoDynamicsafe regions for moving range queries in mobile navigationrdquoInternational Journal of Ad Hoc and Ubiquitous Computing vol16 no 4 pp 250ndash259 2014
[12] H Al-Khalidi D Taniar J Betts and S Alamri ldquoMonitoringmoving queries inside a safe regionrdquo The Scientific WorldJournal vol 2014 Article ID 630396 13 pages 2014
[13] H-J Cho S J Kwon and T-S Chung ldquoA safe exit algorithmfor continuous nearest neighbor monitoring in road networksrdquoMobile Information Systems vol 9 no 1 pp 37ndash53 2013
[14] H-J Cho K Ryu and T-S Chung ldquoAn efficient algorithm forcomputing safe exit points of moving range queries in directedroad networksrdquo Information Systems vol 41 pp 1ndash19 2014
[15] C Li Y Gu J Qi G Yu R Zhang andW Yi ldquoProcessing mov-ing kNN queries using influential neighbor setsrdquo Proceedings ofthe VLDB Endowment vol 8 no 2 pp 113ndash124 2014
[16] S Nutanong R Zhang E Tanin and L Kulik ldquoAnalysis andevaluation of V-kNN an efficient algorithm for moving kNNqueriesrdquo VLDB Journal vol 19 no 3 pp 307ndash332 2010
[17] D Yung M L Yiu and E Lo ldquoA safe-exit approach for efficientnetwork-based moving range queriesrdquo Data and KnowledgeEngineering vol 72 pp 126ndash147 2012
[18] Y Gao B Zheng G Chen C Chen and Q Li ldquoContinuousnearest-neighbor search in the presence of obstaclesrdquo ACMTransactions on Database Systems vol 36 no 2 article 9 2011
[19] Y Tao D Papadias and Q Shen ldquoContinuous nearest neighborsearchrdquo in Proceedings of the 28th International Conference onVery Large Data Bases (VLDB rsquo02) pp 287ndash298 Hong KongAugust 2002
[20] M Mokbel C Chow and W Aref ldquoThe new casper queryprocessing for location serviceswithout compromising privacyrdquoin Proceedings of the 32nd International Conference on VeryLarge Data Bases (VLDB rsquo06) pp 763ndash774 Seoul Republic ofKorea 2006
[21] P Kalnis G Ghinita K Mouratidis and D Papadias ldquoPre-venting location-based identity inference in anonymous spatialqueriesrdquo IEEE Transactions on Knowledge and Data Engineer-ing vol 19 no 12 pp 1719ndash1733 2007
[22] C Chow M Mokbel J Naps and S Nath ldquoApproximateevaluation of range nearest neighbor queries with qualityguaranteerdquo in Advances in Spatial and Temporal Databases 11thInternational Symposium SSTD 2009 Aalborg Denmark July 8ndash10 2009 Proceedings vol 5644 of Lecture Notes in ComputerScience pp 283ndash301 Springer Berlin Germany 2009
Mobile Information Systems 17
[23] J Xu X Tang H Hu and J Du ldquoPrivacy-conscious location-based queries in mobile environmentsrdquo IEEE Transactions onParallel and Distributed Systems vol 21 no 3 pp 313ndash326 2010
[24] A M Aly W G Aref and M Ouzzani ldquoSpatial queries withtwo kNN predicatesrdquo Proceedings of the VLDB Endowment vol5 no 11 pp 1100ndash1111 2012
[25] Y Gu G Yu and X Yu ldquoAn efficient method for k nearestneighbor searching in obstructed spatial databasesrdquo Journal ofInformation Science and Engineering vol 30 no 5 pp 1569ndash1583 2014
[26] K Mouratidis M L Yiu D Papadias and N MamoulisldquoContinuous nearest neighbormonitoring in road networksrdquo inProceedings of the 32nd International Conference on Very LargeData Bases (VLDB rsquo06) pp 43ndash54 Seoul Republic of KoreaSeptember 2006
[27] Real Datasets for Spatial Databases httpwwwcsfsuedusimlifeifeiSpatialDatasethtm
[28] T Brinkhoff ldquoA framework for generating network-based mov-ing objectsrdquo GeoInformatica vol 6 no 2 pp 153ndash180 2002
[29] R Bauer D Delling P Sanders D Schieferdecker D Schultesand D Wagner ldquoCombining hierarchical and goal-directedspeed-up techniques for dijkstrarsquos algorithmrdquo Journal of Exper-imental Algorithmics vol 15 article 23 2010
[30] M Kolahdouzan C Shahabi and M Kolahdouzan ldquoVoronoi-based k nearest neighbor search for spatial network databasesrdquoinProceedings of the 30th International Conference onVery LargeData Bases (VLDB rsquo04) vol 30 pp 840ndash851 2004
[31] D Papadias J Zhang N Mamoulis and Y Tao ldquoQueryprocessing in spatial network databasesrdquo in Proceedings of the29th International Conference on Very Large Data Bases (VLDBrsquo03) vol 29 pp 802ndash813 2003
Submit your manuscripts athttpwwwhindawicom
Computer Games Technology
International Journal of
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Distributed Sensor Networks
International Journal of
Advances in
FuzzySystems
Hindawi Publishing Corporationhttpwwwhindawicom
Volume 2014
International Journal of
ReconfigurableComputing
Hindawi Publishing Corporation httpwwwhindawicom Volume 2014
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Applied Computational Intelligence and Soft Computing
thinspAdvancesthinspinthinsp
Artificial Intelligence
HindawithinspPublishingthinspCorporationhttpwwwhindawicom Volumethinsp2014
Advances inSoftware EngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Electrical and Computer Engineering
Journal of
Journal of
Computer Networks and Communications
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Hindawi Publishing Corporation
httpwwwhindawicom Volume 2014
Advances in
Multimedia
International Journal of
Biomedical Imaging
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
ArtificialNeural Systems
Advances in
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
RoboticsJournal of
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Computational Intelligence and Neuroscience
Industrial EngineeringJournal of
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014
The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Human-ComputerInteraction
Advances in
Computer EngineeringAdvances in
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Mobile Information Systems 15
(157) (209)(280)
(383)
(536)
k
2
MORAN
4 8 16 320
8
16
24
32
CPU
tim
e at c
lient
side
(ms)
kRNN-E
(a) Effect of 119896
(366) (286) (280) (272) (243)
MORAN
0 5 10 20 500
5
10
15
20
CPU
tim
e at c
lient
side
(ms)
Rdir ()
kRNN-E
(b) Effect of 119877dir
(26)(230) (280) (391) (429)
MORAN
00 03 05 07 10Rupd ()
0
5
10
15
20
CPU
tim
e at c
lient
side
(ms)
kRNN-E
(c) Effect of 119877upd
(277) (276) (280)(307)
(371)
MORAN
1 2 4 8 160
8
16
24
32CP
U ti
me a
t clie
nt si
de (m
s)
Qsz
kRNN-E
(d) Effect of119876sz
(612)
(359) (280) (232) (211)
MORAN
0
8
16
24
32
CPU
tim
e at c
lient
side
(ms)
1 3 5 7 10
kRNN-E
Ndata (k)
(e) Effect of119873data
(248) (265) (280) (286) (328)
MORAN
20 40 60 80 1000
5
10
15
20
CPU
tim
e at c
lient
side
(ms)
Vqry (kmh)
kRNN-E
(f) Effect of 119881qry
Figure 17 Comparison of CPU time at the client side for road map SJ
16 Mobile Information Systems
Notations and Their Definitions
119899119894119899119895 Edge connecting two adjacent nodes 119899
119894
and 119899119895
119899119904119899119904+1sdot sdot sdot 119899
119890 Edge sequence where 119899
119904(or 119899
119890) is the
start (or end) boundary node and theother nodes 119899
119904+1 119899
119890minus1 are
intermediate nodesdist(119901
1 119901
2) Length of the shortest path from point 119901
1
to point 1199012
len(1199011 119901
2) Length of the segment connecting two
points 1199011and 119901
2 such that 119901
1and 119901
2are
located in the same edge sequence119899119904119899119904+1sdot sdot sdot 119899
119890
119902 Query point119896 Number of requested NNs119874119901
119896 Set of kNNs at point 119901
120572120573 Segment that belongs to an edgesequence
119874(120572120573) Set of objects in segment 120572120573119900119896th The 119896th NN of query point 119902Ψ119902 Influence region for query point 119902
Ψ119876 Influence region for query region 119876
Conflict of Interests
The authors declare that there is no conflict of interestsregarding the publication of this paper
Acknowledgment
This research was supported by Kyungpook National Univer-sity Research Fund 2014
References
[1] U Demiryurek F Banaei-Kashani and C Shahabi ldquoEfficientcontinuous nearest neighbor query in spatial networks usingEuclidean restrictionrdquo in Advances in Spatial and TemporalDatabases 11th International Symposium SSTD 2009 AalborgDenmark July 8ndash10 2009 Proceedings vol 5644 of Lecture Notesin Computer Science pp 25ndash43 Springer Berlin Germany2009
[2] M R Kolahdouzan and C Shahabi ldquoAlternative solutionsfor continuous K nearest neighbor queries in spatial networkdatabasesrdquo GeoInformatica vol 9 no 4 pp 321ndash341 2005
[3] E W Dijkstra ldquoA note on two problems in connexion withgraphsrdquoNumerischeMathematik vol 1 no 1 pp 269ndash271 1959
[4] H Samet J Sankaranarayanan and H Alborzi ldquoScalablenetwork distance browsing in spatial databasesrdquo in Proceedingsof the SIGMOD International Conference on Management ofData (SIGMOD rsquo08) pp 43ndash54 Vancouver Canada June 2008
[5] J Bao C-Y ChowM FMokbel andW-S Ku ldquoEfficient evalu-ation of k-range nearest neighbor queries in road networksrdquo inProceedings of the 11th IEEE International Conference on MobileData Management (MDM rsquo10) pp 115ndash124 Kansas City MoUSA May 2010
[6] W-S Ku Y Chen and R Zimmermann ldquoPrivacy protectedspatial query processing for advanced location based servicesrdquo
Wireless Personal Communications vol 51 no 1 pp 53ndash652009
[7] K Mouratidis and M L Yiu ldquoAnonymous query processingin road networksrdquo IEEE Transactions on Knowledge and DataEngineering vol 22 no 1 pp 2ndash15 2010
[8] T Wang and L Liu ldquoPrivacy-aware mobile services over roadnetworksrdquo Proceedings of the VLDB Endowment vol 2 no 1pp 1042ndash1053 2009
[9] G Ghinita P Kalnis and S Skiadopoulos ldquoMobiHide amobilea peer-to-peer system for anonymous location-basedqueriesrdquo in Proceedings of the 10th International Symposium onSpatial and Temporal Databases (SSTD rsquo07) Boston MA USAJuly 2007 pp 221ndash238 Springer 2007
[10] S Ilarri E Mena and A Illarramendi ldquoLocation-dependentquery processing where we are and where we are headingrdquoACM Computing Surveys vol 42 no 3 article 12 2010
[11] H Al-Khalidi D Taniar J Betts and S Alamri ldquoDynamicsafe regions for moving range queries in mobile navigationrdquoInternational Journal of Ad Hoc and Ubiquitous Computing vol16 no 4 pp 250ndash259 2014
[12] H Al-Khalidi D Taniar J Betts and S Alamri ldquoMonitoringmoving queries inside a safe regionrdquo The Scientific WorldJournal vol 2014 Article ID 630396 13 pages 2014
[13] H-J Cho S J Kwon and T-S Chung ldquoA safe exit algorithmfor continuous nearest neighbor monitoring in road networksrdquoMobile Information Systems vol 9 no 1 pp 37ndash53 2013
[14] H-J Cho K Ryu and T-S Chung ldquoAn efficient algorithm forcomputing safe exit points of moving range queries in directedroad networksrdquo Information Systems vol 41 pp 1ndash19 2014
[15] C Li Y Gu J Qi G Yu R Zhang andW Yi ldquoProcessing mov-ing kNN queries using influential neighbor setsrdquo Proceedings ofthe VLDB Endowment vol 8 no 2 pp 113ndash124 2014
[16] S Nutanong R Zhang E Tanin and L Kulik ldquoAnalysis andevaluation of V-kNN an efficient algorithm for moving kNNqueriesrdquo VLDB Journal vol 19 no 3 pp 307ndash332 2010
[17] D Yung M L Yiu and E Lo ldquoA safe-exit approach for efficientnetwork-based moving range queriesrdquo Data and KnowledgeEngineering vol 72 pp 126ndash147 2012
[18] Y Gao B Zheng G Chen C Chen and Q Li ldquoContinuousnearest-neighbor search in the presence of obstaclesrdquo ACMTransactions on Database Systems vol 36 no 2 article 9 2011
[19] Y Tao D Papadias and Q Shen ldquoContinuous nearest neighborsearchrdquo in Proceedings of the 28th International Conference onVery Large Data Bases (VLDB rsquo02) pp 287ndash298 Hong KongAugust 2002
[20] M Mokbel C Chow and W Aref ldquoThe new casper queryprocessing for location serviceswithout compromising privacyrdquoin Proceedings of the 32nd International Conference on VeryLarge Data Bases (VLDB rsquo06) pp 763ndash774 Seoul Republic ofKorea 2006
[21] P Kalnis G Ghinita K Mouratidis and D Papadias ldquoPre-venting location-based identity inference in anonymous spatialqueriesrdquo IEEE Transactions on Knowledge and Data Engineer-ing vol 19 no 12 pp 1719ndash1733 2007
[22] C Chow M Mokbel J Naps and S Nath ldquoApproximateevaluation of range nearest neighbor queries with qualityguaranteerdquo in Advances in Spatial and Temporal Databases 11thInternational Symposium SSTD 2009 Aalborg Denmark July 8ndash10 2009 Proceedings vol 5644 of Lecture Notes in ComputerScience pp 283ndash301 Springer Berlin Germany 2009
Mobile Information Systems 17
[23] J Xu X Tang H Hu and J Du ldquoPrivacy-conscious location-based queries in mobile environmentsrdquo IEEE Transactions onParallel and Distributed Systems vol 21 no 3 pp 313ndash326 2010
[24] A M Aly W G Aref and M Ouzzani ldquoSpatial queries withtwo kNN predicatesrdquo Proceedings of the VLDB Endowment vol5 no 11 pp 1100ndash1111 2012
[25] Y Gu G Yu and X Yu ldquoAn efficient method for k nearestneighbor searching in obstructed spatial databasesrdquo Journal ofInformation Science and Engineering vol 30 no 5 pp 1569ndash1583 2014
[26] K Mouratidis M L Yiu D Papadias and N MamoulisldquoContinuous nearest neighbormonitoring in road networksrdquo inProceedings of the 32nd International Conference on Very LargeData Bases (VLDB rsquo06) pp 43ndash54 Seoul Republic of KoreaSeptember 2006
[27] Real Datasets for Spatial Databases httpwwwcsfsuedusimlifeifeiSpatialDatasethtm
[28] T Brinkhoff ldquoA framework for generating network-based mov-ing objectsrdquo GeoInformatica vol 6 no 2 pp 153ndash180 2002
[29] R Bauer D Delling P Sanders D Schieferdecker D Schultesand D Wagner ldquoCombining hierarchical and goal-directedspeed-up techniques for dijkstrarsquos algorithmrdquo Journal of Exper-imental Algorithmics vol 15 article 23 2010
[30] M Kolahdouzan C Shahabi and M Kolahdouzan ldquoVoronoi-based k nearest neighbor search for spatial network databasesrdquoinProceedings of the 30th International Conference onVery LargeData Bases (VLDB rsquo04) vol 30 pp 840ndash851 2004
[31] D Papadias J Zhang N Mamoulis and Y Tao ldquoQueryprocessing in spatial network databasesrdquo in Proceedings of the29th International Conference on Very Large Data Bases (VLDBrsquo03) vol 29 pp 802ndash813 2003
Submit your manuscripts athttpwwwhindawicom
Computer Games Technology
International Journal of
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Distributed Sensor Networks
International Journal of
Advances in
FuzzySystems
Hindawi Publishing Corporationhttpwwwhindawicom
Volume 2014
International Journal of
ReconfigurableComputing
Hindawi Publishing Corporation httpwwwhindawicom Volume 2014
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Applied Computational Intelligence and Soft Computing
thinspAdvancesthinspinthinsp
Artificial Intelligence
HindawithinspPublishingthinspCorporationhttpwwwhindawicom Volumethinsp2014
Advances inSoftware EngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Electrical and Computer Engineering
Journal of
Journal of
Computer Networks and Communications
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Hindawi Publishing Corporation
httpwwwhindawicom Volume 2014
Advances in
Multimedia
International Journal of
Biomedical Imaging
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
ArtificialNeural Systems
Advances in
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
RoboticsJournal of
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Computational Intelligence and Neuroscience
Industrial EngineeringJournal of
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014
The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Human-ComputerInteraction
Advances in
Computer EngineeringAdvances in
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
16 Mobile Information Systems
Notations and Their Definitions
119899119894119899119895 Edge connecting two adjacent nodes 119899
119894
and 119899119895
119899119904119899119904+1sdot sdot sdot 119899
119890 Edge sequence where 119899
119904(or 119899
119890) is the
start (or end) boundary node and theother nodes 119899
119904+1 119899
119890minus1 are
intermediate nodesdist(119901
1 119901
2) Length of the shortest path from point 119901
1
to point 1199012
len(1199011 119901
2) Length of the segment connecting two
points 1199011and 119901
2 such that 119901
1and 119901
2are
located in the same edge sequence119899119904119899119904+1sdot sdot sdot 119899
119890
119902 Query point119896 Number of requested NNs119874119901
119896 Set of kNNs at point 119901
120572120573 Segment that belongs to an edgesequence
119874(120572120573) Set of objects in segment 120572120573119900119896th The 119896th NN of query point 119902Ψ119902 Influence region for query point 119902
Ψ119876 Influence region for query region 119876
Conflict of Interests
The authors declare that there is no conflict of interestsregarding the publication of this paper
Acknowledgment
This research was supported by Kyungpook National Univer-sity Research Fund 2014
References
[1] U Demiryurek F Banaei-Kashani and C Shahabi ldquoEfficientcontinuous nearest neighbor query in spatial networks usingEuclidean restrictionrdquo in Advances in Spatial and TemporalDatabases 11th International Symposium SSTD 2009 AalborgDenmark July 8ndash10 2009 Proceedings vol 5644 of Lecture Notesin Computer Science pp 25ndash43 Springer Berlin Germany2009
[2] M R Kolahdouzan and C Shahabi ldquoAlternative solutionsfor continuous K nearest neighbor queries in spatial networkdatabasesrdquo GeoInformatica vol 9 no 4 pp 321ndash341 2005
[3] E W Dijkstra ldquoA note on two problems in connexion withgraphsrdquoNumerischeMathematik vol 1 no 1 pp 269ndash271 1959
[4] H Samet J Sankaranarayanan and H Alborzi ldquoScalablenetwork distance browsing in spatial databasesrdquo in Proceedingsof the SIGMOD International Conference on Management ofData (SIGMOD rsquo08) pp 43ndash54 Vancouver Canada June 2008
[5] J Bao C-Y ChowM FMokbel andW-S Ku ldquoEfficient evalu-ation of k-range nearest neighbor queries in road networksrdquo inProceedings of the 11th IEEE International Conference on MobileData Management (MDM rsquo10) pp 115ndash124 Kansas City MoUSA May 2010
[6] W-S Ku Y Chen and R Zimmermann ldquoPrivacy protectedspatial query processing for advanced location based servicesrdquo
Wireless Personal Communications vol 51 no 1 pp 53ndash652009
[7] K Mouratidis and M L Yiu ldquoAnonymous query processingin road networksrdquo IEEE Transactions on Knowledge and DataEngineering vol 22 no 1 pp 2ndash15 2010
[8] T Wang and L Liu ldquoPrivacy-aware mobile services over roadnetworksrdquo Proceedings of the VLDB Endowment vol 2 no 1pp 1042ndash1053 2009
[9] G Ghinita P Kalnis and S Skiadopoulos ldquoMobiHide amobilea peer-to-peer system for anonymous location-basedqueriesrdquo in Proceedings of the 10th International Symposium onSpatial and Temporal Databases (SSTD rsquo07) Boston MA USAJuly 2007 pp 221ndash238 Springer 2007
[10] S Ilarri E Mena and A Illarramendi ldquoLocation-dependentquery processing where we are and where we are headingrdquoACM Computing Surveys vol 42 no 3 article 12 2010
[11] H Al-Khalidi D Taniar J Betts and S Alamri ldquoDynamicsafe regions for moving range queries in mobile navigationrdquoInternational Journal of Ad Hoc and Ubiquitous Computing vol16 no 4 pp 250ndash259 2014
[12] H Al-Khalidi D Taniar J Betts and S Alamri ldquoMonitoringmoving queries inside a safe regionrdquo The Scientific WorldJournal vol 2014 Article ID 630396 13 pages 2014
[13] H-J Cho S J Kwon and T-S Chung ldquoA safe exit algorithmfor continuous nearest neighbor monitoring in road networksrdquoMobile Information Systems vol 9 no 1 pp 37ndash53 2013
[14] H-J Cho K Ryu and T-S Chung ldquoAn efficient algorithm forcomputing safe exit points of moving range queries in directedroad networksrdquo Information Systems vol 41 pp 1ndash19 2014
[15] C Li Y Gu J Qi G Yu R Zhang andW Yi ldquoProcessing mov-ing kNN queries using influential neighbor setsrdquo Proceedings ofthe VLDB Endowment vol 8 no 2 pp 113ndash124 2014
[16] S Nutanong R Zhang E Tanin and L Kulik ldquoAnalysis andevaluation of V-kNN an efficient algorithm for moving kNNqueriesrdquo VLDB Journal vol 19 no 3 pp 307ndash332 2010
[17] D Yung M L Yiu and E Lo ldquoA safe-exit approach for efficientnetwork-based moving range queriesrdquo Data and KnowledgeEngineering vol 72 pp 126ndash147 2012
[18] Y Gao B Zheng G Chen C Chen and Q Li ldquoContinuousnearest-neighbor search in the presence of obstaclesrdquo ACMTransactions on Database Systems vol 36 no 2 article 9 2011
[19] Y Tao D Papadias and Q Shen ldquoContinuous nearest neighborsearchrdquo in Proceedings of the 28th International Conference onVery Large Data Bases (VLDB rsquo02) pp 287ndash298 Hong KongAugust 2002
[20] M Mokbel C Chow and W Aref ldquoThe new casper queryprocessing for location serviceswithout compromising privacyrdquoin Proceedings of the 32nd International Conference on VeryLarge Data Bases (VLDB rsquo06) pp 763ndash774 Seoul Republic ofKorea 2006
[21] P Kalnis G Ghinita K Mouratidis and D Papadias ldquoPre-venting location-based identity inference in anonymous spatialqueriesrdquo IEEE Transactions on Knowledge and Data Engineer-ing vol 19 no 12 pp 1719ndash1733 2007
[22] C Chow M Mokbel J Naps and S Nath ldquoApproximateevaluation of range nearest neighbor queries with qualityguaranteerdquo in Advances in Spatial and Temporal Databases 11thInternational Symposium SSTD 2009 Aalborg Denmark July 8ndash10 2009 Proceedings vol 5644 of Lecture Notes in ComputerScience pp 283ndash301 Springer Berlin Germany 2009
Mobile Information Systems 17
[23] J Xu X Tang H Hu and J Du ldquoPrivacy-conscious location-based queries in mobile environmentsrdquo IEEE Transactions onParallel and Distributed Systems vol 21 no 3 pp 313ndash326 2010
[24] A M Aly W G Aref and M Ouzzani ldquoSpatial queries withtwo kNN predicatesrdquo Proceedings of the VLDB Endowment vol5 no 11 pp 1100ndash1111 2012
[25] Y Gu G Yu and X Yu ldquoAn efficient method for k nearestneighbor searching in obstructed spatial databasesrdquo Journal ofInformation Science and Engineering vol 30 no 5 pp 1569ndash1583 2014
[26] K Mouratidis M L Yiu D Papadias and N MamoulisldquoContinuous nearest neighbormonitoring in road networksrdquo inProceedings of the 32nd International Conference on Very LargeData Bases (VLDB rsquo06) pp 43ndash54 Seoul Republic of KoreaSeptember 2006
[27] Real Datasets for Spatial Databases httpwwwcsfsuedusimlifeifeiSpatialDatasethtm
[28] T Brinkhoff ldquoA framework for generating network-based mov-ing objectsrdquo GeoInformatica vol 6 no 2 pp 153ndash180 2002
[29] R Bauer D Delling P Sanders D Schieferdecker D Schultesand D Wagner ldquoCombining hierarchical and goal-directedspeed-up techniques for dijkstrarsquos algorithmrdquo Journal of Exper-imental Algorithmics vol 15 article 23 2010
[30] M Kolahdouzan C Shahabi and M Kolahdouzan ldquoVoronoi-based k nearest neighbor search for spatial network databasesrdquoinProceedings of the 30th International Conference onVery LargeData Bases (VLDB rsquo04) vol 30 pp 840ndash851 2004
[31] D Papadias J Zhang N Mamoulis and Y Tao ldquoQueryprocessing in spatial network databasesrdquo in Proceedings of the29th International Conference on Very Large Data Bases (VLDBrsquo03) vol 29 pp 802ndash813 2003
Submit your manuscripts athttpwwwhindawicom
Computer Games Technology
International Journal of
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Distributed Sensor Networks
International Journal of
Advances in
FuzzySystems
Hindawi Publishing Corporationhttpwwwhindawicom
Volume 2014
International Journal of
ReconfigurableComputing
Hindawi Publishing Corporation httpwwwhindawicom Volume 2014
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Applied Computational Intelligence and Soft Computing
thinspAdvancesthinspinthinsp
Artificial Intelligence
HindawithinspPublishingthinspCorporationhttpwwwhindawicom Volumethinsp2014
Advances inSoftware EngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Electrical and Computer Engineering
Journal of
Journal of
Computer Networks and Communications
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Hindawi Publishing Corporation
httpwwwhindawicom Volume 2014
Advances in
Multimedia
International Journal of
Biomedical Imaging
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
ArtificialNeural Systems
Advances in
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
RoboticsJournal of
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Computational Intelligence and Neuroscience
Industrial EngineeringJournal of
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014
The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Human-ComputerInteraction
Advances in
Computer EngineeringAdvances in
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Mobile Information Systems 17
[23] J Xu X Tang H Hu and J Du ldquoPrivacy-conscious location-based queries in mobile environmentsrdquo IEEE Transactions onParallel and Distributed Systems vol 21 no 3 pp 313ndash326 2010
[24] A M Aly W G Aref and M Ouzzani ldquoSpatial queries withtwo kNN predicatesrdquo Proceedings of the VLDB Endowment vol5 no 11 pp 1100ndash1111 2012
[25] Y Gu G Yu and X Yu ldquoAn efficient method for k nearestneighbor searching in obstructed spatial databasesrdquo Journal ofInformation Science and Engineering vol 30 no 5 pp 1569ndash1583 2014
[26] K Mouratidis M L Yiu D Papadias and N MamoulisldquoContinuous nearest neighbormonitoring in road networksrdquo inProceedings of the 32nd International Conference on Very LargeData Bases (VLDB rsquo06) pp 43ndash54 Seoul Republic of KoreaSeptember 2006
[27] Real Datasets for Spatial Databases httpwwwcsfsuedusimlifeifeiSpatialDatasethtm
[28] T Brinkhoff ldquoA framework for generating network-based mov-ing objectsrdquo GeoInformatica vol 6 no 2 pp 153ndash180 2002
[29] R Bauer D Delling P Sanders D Schieferdecker D Schultesand D Wagner ldquoCombining hierarchical and goal-directedspeed-up techniques for dijkstrarsquos algorithmrdquo Journal of Exper-imental Algorithmics vol 15 article 23 2010
[30] M Kolahdouzan C Shahabi and M Kolahdouzan ldquoVoronoi-based k nearest neighbor search for spatial network databasesrdquoinProceedings of the 30th International Conference onVery LargeData Bases (VLDB rsquo04) vol 30 pp 840ndash851 2004
[31] D Papadias J Zhang N Mamoulis and Y Tao ldquoQueryprocessing in spatial network databasesrdquo in Proceedings of the29th International Conference on Very Large Data Bases (VLDBrsquo03) vol 29 pp 802ndash813 2003
Submit your manuscripts athttpwwwhindawicom
Computer Games Technology
International Journal of
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Distributed Sensor Networks
International Journal of
Advances in
FuzzySystems
Hindawi Publishing Corporationhttpwwwhindawicom
Volume 2014
International Journal of
ReconfigurableComputing
Hindawi Publishing Corporation httpwwwhindawicom Volume 2014
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Applied Computational Intelligence and Soft Computing
thinspAdvancesthinspinthinsp
Artificial Intelligence
HindawithinspPublishingthinspCorporationhttpwwwhindawicom Volumethinsp2014
Advances inSoftware EngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Electrical and Computer Engineering
Journal of
Journal of
Computer Networks and Communications
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Hindawi Publishing Corporation
httpwwwhindawicom Volume 2014
Advances in
Multimedia
International Journal of
Biomedical Imaging
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
ArtificialNeural Systems
Advances in
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
RoboticsJournal of
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Computational Intelligence and Neuroscience
Industrial EngineeringJournal of
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014
The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Human-ComputerInteraction
Advances in
Computer EngineeringAdvances in
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Submit your manuscripts athttpwwwhindawicom
Computer Games Technology
International Journal of
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Distributed Sensor Networks
International Journal of
Advances in
FuzzySystems
Hindawi Publishing Corporationhttpwwwhindawicom
Volume 2014
International Journal of
ReconfigurableComputing
Hindawi Publishing Corporation httpwwwhindawicom Volume 2014
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Applied Computational Intelligence and Soft Computing
thinspAdvancesthinspinthinsp
Artificial Intelligence
HindawithinspPublishingthinspCorporationhttpwwwhindawicom Volumethinsp2014
Advances inSoftware EngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Electrical and Computer Engineering
Journal of
Journal of
Computer Networks and Communications
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Hindawi Publishing Corporation
httpwwwhindawicom Volume 2014
Advances in
Multimedia
International Journal of
Biomedical Imaging
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
ArtificialNeural Systems
Advances in
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
RoboticsJournal of
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Computational Intelligence and Neuroscience
Industrial EngineeringJournal of
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014
The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014
Human-ComputerInteraction
Advances in
Computer EngineeringAdvances in
Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014