Efﬁcient Processing of Continuous Reverse k Nearest Neighbor on Moving Objects in Road Networks

.


Introduction
The rapid technological advances in wireless networks and development of handheld devices equipped with location sensing technology (e.g., smart phones and tablets) have popularized location-based services in the past decades.These systems enable real-world applications such as mixed reality games, army strategy planning, object surveillance in wireless sensor networks, and enhanced emergency services [1,2].The continuous movement of data objects demands new query processing techniques permitting frequent location updates.Although considerable effort has been devoted to moving-query processing [3][4][5][6][7], these studies have focused on range queries and nearest neighbor (NN) queries; there continues to be a deficiency of research addressing continuous reverse nearest neighbor (RNN) queries.Further, the majority of the research has been conducted in the Euclidean space, not on a road network.
Consider a query object q and a set of data objects O (e.g., places of accommodation, restaurants, and gas stations).We use dist(o, q) and dist(o, o ) to represent the shortest distance from object o to query q and another data object o , respectively.A reverse k nearest neighbor (RkNN) query retrieves all of the data objects o ∈ O for which q is one of their k closest objects.
RkNN queries are generally categorized into two types: monochromatic reverse kNN (MRkNN) queries and bichromatic reverse kNN (BRkNN) queries.In MRkNN, all moving data and query objects are of the same type.Applications of the continuous MRkNN include mixed reality games where the goal of each player is to shoot the nearest player.Each player must continuously monitor their own RNN to avoid being shot by other players.Given an object set O and a query q, the MRkNN query is formally defined as MRkNN(q) = {o ∈ O|q ∈ kNN(o)}, where kNN(o) is the kNN set of o.
Unlike, MRkNN queries, in BRkNN, query objects and data objects belong to two different types of objects.Applications of the continuous BRkNN query include decision support system.For example, consider an application where the goal is to determine the best location for opening a Chinese restaurant.The main deciding factor can be "How many users consider this potential location to be the nearest Chinese food restaurant?"Each candidate location for the Chinese food restaurant generates an RNN query; the results can then be compared to choose the best location.The above example employs BRkNN queries because restaurants and users belong to different types of objects.Given two different object sets O and S and a query q ∈ S, a BRkNN query is formally defined as BRkNN(q) = {o ∈ O|q ∈ kNN(o, S)}, where kNN(o, S) denotes the kNN of o among all objects in dataset S.
Many real-life applications exist to illustrate the usefulness of moving RkNN queries, particularly in applications which require continuous monitoring of reverse nearest moving objects.For example, for enhanced 911 service, whenever a service center receives any emergency call, the team that is closest to the emergency call location is notified.Other examples could be taxi company dispatching taxis to the passengers, or army backup units interested in monitoring their closest units which may require any assistance.
The main challenge for continuous monitoring algorithms is maintaining the freshness of the query results when the query and data objects move freely and arbitrarily.A simple approach is to increase the frequency of updates; query q periodically sends requests to reevaluate the query results.However, this approach does not guarantee that results are fresh because the query results may become stale between each call to the server.Moreover, an excessive computational burden may be imposed on the server side as a high communication frequency increases the communication cost.
The existing state-of-the-art algorithm known as SAC [8] attempts to address the abovementioned problem and monitors the RkNN queries in two major steps, i.e., filtering and verification.In the filtering phase, using pruning rules, the part of the network that cannot contain any RkNN of q is pruned.The objects that are in the unpruned network are called the candidate objects cand.In the verification phase, the server monitors whether the object cand ∈ candidate object list is the RkNN of q.More specifically, a cand is reported as an RkNN if and only if q is the closest object of cand.However, at each timestamp, the algorithm must verify the candidate object whenever it updates its location.The verification is considerably expensive because (a) verifying a cand requires checking whether q is one of the k closest objects of cand and (b) verification is required whenever a cand changes its location.
To address the aforementioned limitation, we present a safe exit-based approach for continuous monitoring of reverse k nearest queries in a road network where both query objects and data objects move arbitrarily.The proposed algorithm computes safe exit points for both query and data objects.The query result remains unchanged providing query and data objects reside within their respective safe regions.The safe exit technique reduces the two-way communication between client and server resulting in a reduction of the communication and computation cost.We first consider the continuous monitoring of reverse k nearest queries in static road networks where the network distance does not change over time.Then, we extend the proposed approach to dynamic road networks where the network weight such as the travel time changes depending on traffic conditions including traffic congestion or reversible lanes.Our key contributions are summarized as follows:

•
We present a framework for continuous monitoring of RkNN queries where both query and data objects are moving on a road network.

•
Our algorithm processes both MRkNN and BRkNN queries for arbitrary values of k.

•
We present novel pruning rules that optimize the computation of safe exit points by minimizing the size of the unpruned network and number of objects.

•
We demonstrate the extension of the proposed algorithm to a directed road network where each road segment has a particular orientation and to a dynamic road network where the network weight changes depending on the traffic conditions.

•
We confirm through an extensive experimental evaluation that the proposed algorithm outperforms the state-of-the-art algorithm in terms of both communication and computation costs for the majority of the settings.
The remainder of this paper is structured as follows.Section 2 reviews the existing work on the continuous monitoring of RkNN queries in Euclidean space and road networks.Section 3 provides terminology definitions and describes the problem.Section 4 elaborates on the proposed safe exit algorithm (CORE-X) for computing safe exit points of moving RkNN queries in road networks.Section 5 presents a performance analysis of the proposed technique.Section 6 concludes this paper.

Related Work
An RNN query for moving objects searches for those objects that select object q as their nearest neighbor.The processing of RNN queries has become a recent emerging area of research.Many algorithms have been proposed for the monitoring of reverse nearest neighbors, especially in Euclidean space.However, there remains a lack of efficient algorithms for road networks.Our related work is divided into two sections: Section 2.1 addresses continuous RNN query processing in Euclidian space and Section 2.2 reviews continuous RNN query processing in road networks.

Algorithms for Continuous Reverse Nearest Neighbor Query Processing in Euclidian Space
Korn et al. [9] were the first to introduce the concept of RNN queries.They used a precomputing technique to search for RNNs.The main drawback of the preprocessing approach is that it is limited to supporting RkNN queries for a fixed number of k; moreover, it is inefficient when processing object movements.To address the shortcomings of the preprocessing technique, a new category of algorithms has been introduced, known as snapshot RNN algorithms.These snapshot algorithms have two main phases.The first phase is a filtering phase that focuses on the pruning of unnecessary objects; the second phase is refining, which verifies whether the remaining objects are valid query results.The two main filtering methods that have been developed for RkNN queries are 60-degree-pruning [10] and TPL-pruning [11] by Stanoi et al. and Tao et al., respectively.Another category is continuous RNN query algorithms, which can produce incremental RNN results.A number of algorithms have also been proposed for efficient monitoring of NN queries, continuous range queries, and RNNs [3,8,[11][12][13][14][15][16][17].The existing continuous query processing methods focus on defining the monitoring region and updating the query results based on the moving object's location.Benetis et al. [18] were the first to study continuous RNN monitoring; however, their proposed scheme assumes that the velocities of the objects are known.Xia et al. [19] introduced an incremental and scalable algorithm for monochromatic RNN queries based on the 60-degree-pruning technique.In their approach, the monitoring region of a continuous RNN query is defined by six pie regions (determined by the query point and the six candidates) and six arc regions (determined by the six candidates and their nearest neighbors).The efficiency of this algorithm is superior to that of conventional methods because it identifies and processes the updates that fall into the monitoring region.Kang et al. [20] proposed a novel algorithm for monitoring continuous RNNs called IGERN.It is more efficient than 60-degree-pruning-based solutions because it monitors a small number of candidates rather than the entire space.Further, this method is applicable to both MRkNN and BRkNN queries.The tradeoff of this scheme is that it cannot be easily extended to continuous RkNN queries for k > 1.Therefore, the defined monitoring region applies only to continuous RNNs for k = 1.
Wu et al. [21] proposed a technique to monitor RkNNs that involves continuous filtering and continuous refining.They proposed a new refining framework called CRange-k that verifies the candidate objects by issuing kNN queries in each region rather than single nearest neighbor queries.Users that are closer than the kth NN in each region are the candidate objects; these candidate objects are verified if q is one of the k closest facilities.To monitor the results, for each candidate object, the method continuously monitors the circular region around it that contains the k nearest facilities.Cheema et al. [8,22] proposed several schemes for the monitoring of continuous RNNs.In [22], they developed an algorithm for continuous BRkNN queries.They used the concept of the influence zone where the query object is static and the data objects are moving.In [8], they proposed a new framework based on safe regions for both Euclidean and road networks where both query and data objects are moving.This scheme significantly improves the computation cost as it assigns each object and query a safe region such that expensive recomputation is not required provided the query and objects remain in their respective safe regions.

Algorithms for Continuous Reverse Nearest Neighbor Query Processing in Road Networks
In recent years, reverse neighbor query processing in road networks has received attention by the spatial database systems research community.Yiu et al. [17] first addressed the issue of RNN in road networks (they represented road networks as graphs) and proposed an algorithm for both MRkNN and BRkNN queries.Safar et al. [23] presented a framework for RNN queries based on network Voronoi diagrams (NVDs) to efficiently process RNN queries in road networks.However, their scheme is not suitable for continuous RNN queries because NVDs change whenever a dataset changes its location, resulting in high computation costs.
Sun et al. [16] studied the continuous monitoring of bichromatic RNN queries.They associated a multiway tree with each query to define the monitoring region and only updates in the monitoring region affect the results.However, this method is limited to bichromatic queries and does not apply when k > 1.Moreover, their proposed scheme assumes that the query objects are static.Li et al. [24] proposed a novel algorithm for continuous monitoring of RkNNs based on a dual layer multiway tree (DLM tree) where they introduced several lemmas to reduce the monitoring region and filter the candidate objects.Their continuous monitoring of RkNN method comprises two phases: the initial result generation phase and the incremental maintenance phase.Cheema et al. [8] proposed a safe region approach for the monitoring of continuous MRkNN and BRkNN queries in Euclidean and road networks as mentioned in Section 2.1 and devised pruning rules that reduce the monitoring region.
Gotoh et al. [25] presented a simple routing method to process BRkNN queries.Wang et al. [26] proposed an influence zone-based algorithm for monitoring continuous RkNN in a road network.Attique et al. [27] proposed a safe exit-based scheme for continuous monitoring of RNN queries.However, this approach is applied to BRkNN queries; moreover, it does not address the movement of data objects.In this paper, we develop a scheme that is applicable to both MRkNN and BRkNN queries; it can also address the movement of both query objects and data objects.
This paper is an extended version of our previous work on the monitoring of RkNN queries for moving data objects and queries [28].However, we present five relevant extensions that were not investigated in our preliminary work [28].The first extension monitors the pruned objects (Section 4.2.2).The second extension studies adaptations of the proposed algorithm to address a directed road network (Section 4.3.1).In the third extension, we extend CORE-X to a dynamic road network where the network distance changes depending on the traffic conditions (Section 4.3.2).The fourth extension studies bichromatic RkNN queries (Section 4.3.3).In the fifth section, we conduct an extensive experimental study for both static and dynamic road networks (Section 5).In addition to these major extensions, we also present a time complexity analysis of the proposed algorithm that was not presented in our previous work (Section 4.4).

Preliminaries
Section 3.1 defines the terms and notation used in this paper.Section 3.2 provides the problem description based on an example.

Definition of Terms and Notations
Road Network: A road network is represented by a weighted undirected graph G = (N, E, W), where N includes the set of nodes N = {n 1 , n 2 , • • • , n |N| }, E is a set of edges that connects two distinct nodes E = {e 1 , e 2 , • • • , e |E| }, and W(e) denotes the weight of an edge e.An edge between two nodes is denoted by e(n s , n e ), where n s and n e are referred to as boundary nodes.A boundary node with a smaller node id is referred to as the base node of the sequence.This study assumes that n s ≤ n e .Therefore, n s is the base node.Each edge connecting two distinct nodes has a positive weight that represents the cost of traveling the length of the edge, e.g., the time required to travel along the edge.
Segment: Segment s (p 1 ,p 2 ) is a part of an edge between two points, p 1 and p 2 , on the edge.An edge consists of one or more segments.An edge is also considered to be a segment where the nodes are the end points of the edge.The weight of a segment s (p 1 ,p 2 ) is denoted by W(s). Figure 1 presents an example of an undirected road network with seven nodes, n 1 to n 7 .Several edges and segments are illustrated with their respective weights.For example, the edge e(n 1 , n 2 ) consists of segments s (n 1 ,o 1 ) and s (o 1 ,n 2 ) , which have weights "1" and "2," respectively.There are seven data objects in this example {o 1 , o 2 , . . ., o 7 } ∈ O and a single query object q.Query q and the data objects are indicated by triangles and rectangles, respectively.Given two points, p 1 and p 2 , the shortest path distance dist(p 1 , p 2 ) is the minimum distance between p 1 and p 2 .In Figure 1, the shortest path from q to o 3 is q → n 3 → n 6 → o 3 ; dist(q, o 3 ) = 11.Table 1 presents the notations used in this paper.A boundary node with a smaller node id is referred to as the base node of the sequence.This study assumes that ≤ .Therefore, is the base node.Each edge connecting two distinct nodes has a positive weight that represents the cost of traveling the length of the edge, e.g., the time required to travel along the edge.
Segment: Segment ( , ) is a part of an edge between two points, and , on the edge.An edge consists of one or more segments.An edge is also considered to be a segment where the nodes are the end points of the edge.The weight of a segment ( , ) is denoted by W(s). Figure 1 presents an example of an undirected road network with seven nodes, n1 to n7.Several edges and segments are illustrated with their respective weights.For example, the edge ( , ) consists of segments ( , ) and ( , ) , which have weights "1" and "2," respectively.There are seven data objects in this example { , , … , } ∈ and a single query object q.Query q and the data objects are indicated by triangles and rectangles, respectively.Given two points, p1 and p2, the shortest path distance ( , ) is the minimum distance between p1 and p2.In Figure 1, the shortest path from to is → → → ; ( , ) = 11.Table 1 presents the notations used in this paper.

Problem Description
In this paper, we primarily address the problem of continuous monitoring of RkNN queries on moving queries and data objects in road networks.To provide a clear explanation, we use the road network example illustrated in Figure 1, where there are seven objects, o 1 to o 7 , and a query q in a road network.For explanation, we consider MRkNN queries where both data objects and query objects belong to the same data type.However, our method can also be extended to monitor continuous BRkNNs queries.In the remainder of the paper, we use RkNN query to refer to an MRkNN query unless mentioned otherwise.Let us assume that a moving query requests one RNN (k = 1) at a certain point p 1 .To obtain one RNN, we traverse the road network from the active edge that contains point q.For each data object o ∈ O. encountered, we issue a verification query verify(o, k, q) that checks if it is an RNN.If there exists another object o' such that dist(o, o ) < dist(o, q), then o is not an RNN.Otherwise, o is inserted into the RNN result set denoted as R p .The expansion in each path terminates once k objects have been found in that direction.For obtaining an RNN at point p 2 , the simple method is to repeat the procedure executed at p 1 .However, the use of recomputation whenever query q or any data object changes its location significantly degrades the performance of the algorithm.To address this issue, we introduce the safe exit approach.
In the proposed framework, the server computes the safe exit points for each moving object and query object.Because we are addressing a complex problem where both query objects and data objects are moving, it is necessary to compute the safe exit points for each moving data object.The server maintains a set of moving queries and a set of moving objects.The query results will be the same until all the objects lie inside their respective safe exit points.Whenever a query or data object leaves its safe exit points, the server recomputes the RkNN and safe exit points for the query and data objects.However, the computation of safe exit points for all of the data objects degrades the performance of the algorithm.To address this issue, we devised pruning rules that allow us to compute the safe exit points for only the unpruned objects.
As mentioned previously, we are addressing the problem of continuously monitoring RNN queries where both query and data objects are moving freely in a road network.Therefore, the following events can change the query result.
Event 1: The query object q moves outside of its respective safe exit points.Event 2: An object o ∈ UO moves outside of its respective safe exit points.Event 3: The movement of pruned objects changes the RkNN set. Figure 2 illustrates the request flow for processing RkNN queries.Initially, the query object q (client) issues an RkNN query to server along with the current location (Step 1).Upon receiving a request, the server computes RkNN result set R k and safe exit points for query and unpruned data objects (Step 2 and 3).The query results remain valid, until any of the abovementioned three events occurs.To monitor Event 1, the query object checks its location against the received safe exit points (Step 5).If query object travels beyond any safe exit, client re-issues an RkNN query to the server for an updated result and its safe exit points.A server monitors the movement of data objects to verify Events 2 and 3 (Step 6).If either Event 2 or 3 occurs, the server recomputes the query results and notifies the client.
(k = 1) at a certain point p1.To obtain one RNN, we traverse the road network from the active edge that contains point q.For each data object ∈ encountered, we issue a verification query verify(o, k, q) that checks if it is an RNN.If there exists another object o' such that ( , ) < ( , ), then o is not an RNN.Otherwise, o is inserted into the RNN result set denoted as Rp.The expansion in each path terminates once k objects have been found in that direction.For obtaining an RNN at point p2, the simple method is to repeat the procedure executed at p1.However, the use of recomputation whenever query q or any data object changes its location significantly degrades the performance of the algorithm.To address this issue, we introduce the safe exit approach.In the proposed framework, the server computes the safe exit points for each moving object and query object.Because we are addressing a complex problem where both query objects and data objects are moving, it is necessary to compute the safe exit points for each moving data object.The server maintains a set of moving queries and a set of moving objects.The query results will be the same until all the objects lie inside their respective safe exit points.Whenever a query or data object leaves its safe exit points, the server recomputes the RkNN and safe exit points for the query and data objects.However, the computation of safe exit points for all of the data objects degrades the performance of the algorithm.To address this issue, we devised pruning rules that allow us to compute the safe exit points for only the unpruned objects.

Safe Exit Algorithm for Moving RkNN Queries and Moving Objects
In this section, we develop techniques to monitor moving RkNN queries and moving objects in a road network.In Section 4.1, we present an algorithm for computing the safe region for moving object q.The monitoring of data objects is described in Section 4.2.We present the extensions of the proposed approach to other variants of RkNN queries in Section 4.3.Finally, Section 4.4 analyzes the time and space complexities of CORE-X.

Safe Region for Moving q
In this section, we present a new safe exit algorithm that addresses the issue for moving RkNN queries and moving objects in a road network.Algorithm 1 depicts the skeleton of the proposed safe exit algorithm for computing safe regions.It consists of three phases: (1) determining the useful objects that can contribute to the safe region; (2) computing the influence region of the useful objects; (3) computing the safe exit points for the query objects.

Algorithm 1: Computation of Safe Regions (skeleton)
Input: O: data objects, q: query object, k: integer number Output: SR: Safe Region 1: End while 13: Return SR Algorithm 1 presents the skeleton of the proposed idea.The algorithm begins by determining the answer and non-answer objects.The details of the methodology are explained in Section 4.1.1.Then, in Phase 2, the algorithm computes the influence region of the answer objects and non-answer objects (Section 4.1.2).Finally, it computes the safe region by performing intersection and set difference operations on the road segments (Section 4.1.3).

Determining Useful Objects
This phase aims at determining potential objects that could contribute to the computation of the safe region.The goal is to retrieve a small set of data objects to reduce the computation overhead.In our study, the data objects are divided into two categories: answer objects (denoted by O + ) and non-answer objects (denoted by O − ).Definition 1.An object o is called an answer object if dist(o, q) ≤ dist(o, o ) where o is any other object in the road network.Similarly, we can generalize this definition for RkNN: an object o is called an answer object if dist(o, q) ≤ dist(o, o k+1 ), where o k+1 is the (k+1)th NN object of o.That is, we can say that all answer objects are RkNNs of query q, therefore, o , where o is any other object in the road network.
Similarly, we can generalize this definition for RkNN: an object o is called a non-answer object if dist(o, q) > dist(o, o k ), where o k is the kth NN object of o.That is, we can say that all non-answer objects are not RkNN of query q, therefore, o − / ∈ R k .A simple method for retrieving the R k set is to traverse the network from q, and for each data object o ∈ O encountered, issue a nearest-neighbor query.If q ∈ NN(o), q is the closest object to o.Consequently, o + ∈ R k .However, this approach must evaluate all the data objects because the size of R k is not fixed and the road network may contain points that are far from q.To avoid unnecessary road network exploration, we present the pruning lemma.
Before presenting the lemma, it is necessary to define closed nodes.A node n is called a closed node if there exists an object o such that dist(n, o) < dist(n, q).The object o is called a blocking object because it causes node n to be a closed node.In Figure 1, node n 2 is a closed node because dist(n 2 , o 1 ) < dist(n 2 , q), which makes o 1 a blocking object.Lemma 1.An object o cannot be the RNN of q if the shortest path between q and o contains a closed node with a blocking object o , where o = o.
Proof.Let us assume that there exists a closed node n on the shortest path between o and q.The shortest distance between o and q is dist(o, q) = dist(n, o) + dist(n, q).Let o be the blocking object and dist(o, o ) = dist(n, o) + dist(n, o ).As we know dist(n, o ) < dist(n, q), therefore, dist(o, o ) < dist(o, q).Therefore, o cannot be an RNN of q.
In Figure 1, the data object o 2 cannot be an RNN of q because the shortest distance between o 2 and q passes through n 2 .Because dist(n 2 , o 1 ) = 2 and dist(n 2 , q) = 3, data object o 1 is closer to o 2 than q.The above lemma can be easily extended to RkNN.An object o cannot be the RkNN of q if the shortest path between q and o contains a node n and there exist k data objects o such that for every object o , dist(n, o ) < dist(n, q), where o = o.
Algorithm 2 presents the pseudo code for determining the answer objects.CORE-X traverses the network around q in a similar fashion to Dijkstra's algorithm; using Lemma 1, it eliminates the nodes that may not lead to RNNs.The algorithm begins by exploring the active edge where query object q is located and expands the network in an increasing order of distance from the query object q.Each entry in the queue has the form p a , edge , where p a indicates the anchor point on the edge.For an active edge, q becomes the anchor point.Otherwise, neither of the boundary nodes of the edge, i.e., n s or n e , becomes the anchor point.If the desired number of answer objects is not found on an active edge, the edges adjacent to the boundary nodes are enqueued.The edges are popped in an increasing order of distance from q.The traversal of the edges is terminated when the queue is exhausted.Line 4 initializes a queue by inserting the active edge.If an edge contains a data object o, we must verify whether o ∈ RkNN(q).Thus, the algorithm issues a verify(o, k, q) query (Line 10).The verification query checks if q is among the kNNs of data object o by applying a range-NN query around object o with the range set to dist(o, q).If q = kNN(o), o is the RkNN of q.Therefore, o is added to the result set R k (Line 12).If the edge does not contain any data object o, the algorithm continues its expansion and enqueues the adjacent edges of the boundary node.
Algorithm 2: Answer object(q, k) Input: q: query location, k: integer number Output: R k : query result (answer objects) 1: queue ← ∅ /* queue is a priority queue with edges ordered by distance to q*/ 2: queue.pushn β , edge 15: End while 16: Return R k Let us consider the example presented in Figure 1, where query q requested one RNN (k = 1).We will consider this example throughout this section.The algorithm starts expansion from the active edge, which is e(n 2 , n 3 ).Because no data object is discovered on that edge, edges adjacent to the boundary nodes will be added to the queue.The edges adjacent to the closest boundary node are enqueued first.Therefore, edges e{(n 3 , n 4 ), (n 3 , n 6 )} are enqueued.Data object o 6 is first discovered on (n 3 , n 4 ), which triggers the verification query verify(o 6 , 1, q).Because q = NN(o 6 ), o 6 is added to the result set R k .Recall that by Lemma 1, node n 4 is a closed node with object o 6 as the blocking object.Therefore, all the other objects for which the shortest distance passes through n 4 except o 6 are automatically pruned.Then, data object o 4 is discovered on e(n 3 , n 6 ), by verification of o 4 , q = NN(o 4 ); therefore, the search also terminates in this direction.Next, the edges adjacent to n 2 are added to the queue, e{(n 1 , n 2 ), (n 2 , n 5 ), (n 2 , n 7 )} and data object o 1 is retrieved on e(n 1 , n 2 ).The data object o 1 is verified and added to the result set because q = NN(o 1 ).The search terminates as no further expansion is required in this direction because node n 2 is a closed node.
Next, we determine the non-answer objects that can contribute to the safe region.Useful non-answer objects UO − ∈ O − are objects for which any o + = NN(o − ).In other words, UO − are RNNs of answer objects.RNNs of Useful Objects (UO) can be determined by the same algorithm making these modifications: (1) the anchor point is o + instead of q and (2) verification query verify(o, k, q) is modified to verify(o, k, o + ).The algorithm reuses the results of the range-NN queries issued at the data objects to avoid multiple verification of the same data objects.When the computation is completed, the cached query results are removed to reduce the memory consumptions.
Finally, we can conclude that useful objects are: (1) all answer objects and ( 2) RNNs of answer objects.Now, let us determine the UO objects for k = 2 in the given example in Figure 1.For explanation, Table 2 displays the kNNs of each data object.
From Table 2 it is clear that o 1 and o 6 are both answer objects because q is one of the 2NNs.Now, from the non-answer objects, we can see that o 2 is the RNN of o 1 because o 1 = 2NN(o 2 ).Similarly, o 7 is the RNN of o 6 .Hence, the set of useful objects is UO = {o 1 , o 2 , o 6 , o 7 }.Data objects o 3 , o 4, and o 5 have been pruned.

Data Object 2NNs
Distance .

Computing Influence Region for Useful Objects
After we retrieve the set of useful objects, the next step is to compute the influence region of the answer and non-answer objects.

Influence Region of Answer Objects
The influence region of the answer objects is defined as: Here, o k+1 denotes the (k+1)th nearest neighbor of o.By definition, the influence region of the answer objects contains all the points for which q = NN(o + ).That is, it contains all of the points where object o remains o + .The influence region of answer objects can be computed by exploring the network around the answer object in a manner similar to that explained in Section 4.1.1.The exploration terminates with the discovery of the (k+1)th nearest neighbor of the answer object.The influence region will be indicated by range(o, d), where d is the dist(o, o k+1 ).
Figure 3 indicates the influence region of object o 1 for the example scenario discussed above.The expansion of the road network starts from o 1 until it finds o k+1 , which is 3NN in this example.Object o 7 is 3NN of o 1 and dist(o 1 , o 7 ) = 8.The algorithm will issue a range(o 1 , 8) query that marks all of the points as the influence region of o 1 as shown in Figure 3. Similarly, the influence region of o 6 is indicated in Figure 3.The data object o 4 is the 3NN of o 6 and dist(o 6 , o 4 ) = 7.Therefore, the range(o 6 , 7) query marks all the points within the distance of "7" from o 6 .The bold lines in Figures 3 and 4 indicate the influence region of o 1 and o 6 , respectively.

Influence Region of Non-Answer Objects
The influence region of non-answer objects is defined as: The influence region of non-answer objects can be computed from the distance between the non-answer object and kth object.Here o k denotes the kth nearest neighbor of o.In other words, the influence region of non-answer objects contains all the points where object o remains o − .The influence region of non-answer objects is computed in the same manner as the influence region of answer objects, the only difference is that the algorithm explores and computes the distance to the kNN object instead of (k + 1)NN.
Consider object o 7 in Figure 1: 2NNs of o 7 = (o 6 , o 5 ) with weights (5, 7).In this example, o 5 is the second NN of o 7 and dist(o 7 , o 5 ) = 7.Therefore, the influence region of object o 7 is "7" units from o 7 in every connected direction.Similarly, we can compute the influence region of o 2 .The bold lines in Figures 5 and 6 indicate the influence region of o 2 and o 7 , respectively.The NNs for answer objects change when the query object moves outside the influence region, whereas in the case of non-answer objects, the result changes when the query object moves inside an influence region.That is, the NNs of the answer object remain the same until the query object lies inside the influence region and for non-answer objects, the NNs remain the same until query object lies outside the influence region.Note that once an influence region is computed, it remains valid as long as q and UO lie within their respective safe regions.Hence, recomputation of the influence region is only required when either q or UO leave their respective safe regions.
answer and non-answer objects.

Influence Region of Answer Objects
The influence region of the answer objects is defined as: Here, ok+1 denotes the (k+1)th nearest neighbor of o.By definition, the influence region of the answer objects contains all the points for which = ( ).That is, it contains all of the points where object o remains .The influence region of answer objects can be computed by exploring the network around the answer object in a manner similar to that explained in Section 4.1.1.The exploration terminates with the discovery of the (k+1)th nearest neighbor of the answer object.The influence region will be indicated by range (o, d), where d is the ( , ).
Figure 3 indicates the influence region of object o1 for the example scenario discussed above.The expansion of the road network starts from o1 until it finds ok+1, which is 3NN in this example.Object o7 is 3NN of o1 and ( , ) = 8.The algorithm will issue a ( , 8) query that marks all of the points as the influence region of o1 as shown in Figure 3. Similarly, the influence region of is indicated in Figure 3.The data object o4 is the 3NN of o6 and ( , ) = 7.Therefore, the ( , 7) query marks all the points within the distance of "7" from .The bold lines in Figures 3 and 4 indicate the influence region of and , respectively.answer and non-answer objects.

Influence Region of Answer Objects
The influence region of the answer objects is defined as: Here, ok+1 denotes the (k+1)th nearest neighbor of o.By definition, the influence region of the answer objects contains all the points for which .That is, it contains all of the points where object o remains .
The influence region of answer objects can be computed by exploring the network around the answer object in a manner similar to that explained in Section 4.1.1.The exploration terminates with the discovery of the (k+1)th nearest neighbor of the answer object.The influence region will be indicated by range (o, d), where d is the , .Figure 3 indicates the influence region of object o1 for the example scenario discussed above.The expansion of the road network starts from o1 until it finds ok+1, which is 3NN in this example.Object o7 is 3NN of o1 and , 8. The algorithm will issue a , 8 query that marks all of the points as the influence region of o1 as shown in Figure 3. Similarly, the influence region of is indicated in Figure 3.The data object o4 is the 3NN of o6 and , 7. Therefore, the , 7 query marks all the points within the distance of "7" from .The bold lines in Figures 3 and 4 indicate the influence region of and , respectively.

Influence Region of Non-Answer Objects
The influence region of non-answer objects is defined as: The influence region of non-answer objects can be computed from the distance between the non-answer object and kth object.Here ok denotes the kth nearest neighbor of o.In other words, the influence region of non-answer objects contains all the points where object o remains .The influence region of non-answer objects is computed in the same manner as the influence region of answer objects, the only difference is that the algorithm explores and computes the distance to the kNN object instead of (k + 1)NN.
Consider object o7 in Figure 1: 2NNs of = ( , ) with weights (5, 7).In this example, o5 is the second NN of and ( , ) = 7.Therefore, the influence region of object o7 is "7" units from o7 in every connected direction.Similarly, we can compute the influence region of o2.The bold lines in Figures 5 and 6 indicate the influence region of o2 and o7, respectively.The NNs for answer objects change when the query object moves outside the influence region, whereas in the case of non-answer objects, the result changes when the query object moves inside an influence region.That is, the NNs of the answer object remain the same until the query object lies inside the influence region and for non-answer objects, the NNs remain the same until query object lies outside the influence region.Note that once an influence region is computed, it remains valid as long as q and UO lie within their respective safe regions.Hence, recomputation of the influence region is only required when either q or UO leave their respective safe regions.

Influence Region of Non-Answer Objects
The influence region of non-answer objects is defined as: The influence region of non-answer objects can be computed from the distance between the non-answer object and kth object.Here ok denotes the kth nearest neighbor of o.In other words, the influence region of non-answer objects contains all the points where object o remains .The influence region of non-answer objects is computed in the same manner as the influence region of answer objects, the only difference is that the algorithm explores and computes the distance to the kNN object instead of (k + 1)NN.
Consider object o7 in Figure 1: 2NNs of = ( , ) with weights (5, 7).In this example, o5 is the second NN of and ( , ) = 7.Therefore, the influence region of object o7 is "7" units from o7 in every connected direction.Similarly, we can compute the influence region of o2.The bold lines in Figures 5 and 6 indicate the influence region of o2 and o7, respectively.The NNs for answer objects change when the query object moves outside the influence region, whereas in the case of non-answer objects, the result changes when the query object moves inside an influence region.That is, the NNs of the answer object remain the same until the query object lies inside the influence region and for non-answer objects, the NNs remain the same until query object lies outside the influence region.Note that once an influence region is computed, it remains valid as long as q and UO lie within their respective safe regions.Hence, recomputation of the influence region is only required when either q or UO leave their respective safe regions.The safe region SR of a query q is defined as follows: where IR + denotes the influence region of answer objects and IR − denotes the influence region of non-answer objects.From the definition, we can see that any point that lies in the intersection of the influence region of answer object O + is regarded as a safe region and that any point p that lies in the influence region of non-answer object O − should be excluded.In a road network, the safe region is expressed by a set of segments.In Figure 1, recall that o 1 and o 6 are answer objects and o 2 and o 7 are useful non-answer objects.By applying the above formula, the safe region can be expressed as: Table 3 summarizes the computation of the safe exit points for the query object q in Figure 1.In the previous section, we computed the influence region IR of all useful objects, which was described by set of segments.To obtain the safe region, we must perform intersection and set difference operations on the road segments.We obtain segments e(n 2 , n 3 ), s{(n 3 , s 2 ), (n 3 , s 3 )} from the intersection of IR(o 1 ) and IR(o 6 ).As o 2 and o 7 are non-answer objects, the safe region must exclude the IR(o 2 ) and IR(o 7 ).Thus, the safe region would be the segments s{(s 5 , n 3 ), (n 3 , s 2 )}.The set of boundary points s 2 and s 5 becomes the set of safe exit points.Figure 7 presents the safe exit points of q.
ISPRS Int.J. Geo The safe region SR of a query q is defined as follows: where denotes the influence region of answer objects and denotes the influence region of non-answer objects.From the definition, we can see that any point that lies in the intersection of the influence region of answer object is regarded as a safe region and that any point p that lies in the influence region of non-answer object should be excluded.In a road network, the safe region is expressed by a set of segments.In Figure 1, recall that o1 and o6 are answer objects and o2 and o7 are useful non-answer objects.By applying the above formula, the safe region can be expressed as: Table 3 summarizes the computation of the safe exit points for the query object q in Figure 1.In the previous section, we computed the influence region IR of all useful objects, which was described by set of segments.To obtain the safe region, we must perform intersection and set difference operations on the road segments.We obtain segments ( , ) , {( , ), ( , )} from the intersection of IR(o1) and IR(o6).As o2 and o7 are non-answer objects, the safe region must exclude the IR(o2) and IR(o7).Thus, the safe region would be the segments {( , ), ( , )}.The set of boundary points s2 and s5 becomes the set of safe exit points.Figure 7 presents the safe exit points of q.  e(n 2 , n 3 ), (n 3 , s 4 ), (n 4 , n 7 )s{(n 3 , s 4 ), (n 3 , o 4 ), (n 4 , s 6 )} e(n 2 , n 3 )s{(n 3 , s 2 ), (n 3 , s 3 )} o 2 e(n 2 , n 5 )s{(o 1 , n 2 ), (n 2 , s 5 ), (n 2 , s 6 ), (n 5 , o 3 )} e(n 2 , n 3 )s{(n 3 , s 2 ), (n 3 , s 3 )} s{(s 5 , n 3 ), (n 3 , s 2 ), (n 3 , s 3 )} o 5 e(n 2 , n 7 ), (n 4 , n 7 ), (n 3 , n 4 )s{(n 4 , o 5 ), (n 2 , s 7 ), (n 2 , s 8 )} e(n 2 , n 3 )s{(n 3 , s 2 ), (n 3 , s 3 )} s{(s 5 , n 3 ), (n 3 , s 2 )}

Monitoring of Data Objects
As mentioned previously, we are studying a special case where both data objects and query objects can move randomly in a road network.The RkNN for a query q can be changed by the motion of data objects.In this section, we present techniques to continuously monitor the data objects.As discussed in Section 4.1.1,the data objects are divided into types: (1) UO objects and (2) pruned objects.Since the movement of UO is critical and a slight movement can change the results, we compute the safe exit points of all the UO, whereas for pruned objects, we use the monitored network based on the influence region computed in Section 4.1.2.The computation of safe exit points of all the pruned objects will also increase the computation cost.

Computation of Safe Exit Points of Useful Objects (UO)
Recall that answer objects are those objects whose query object q is one of its kNN objects.This means that an answer object lies within the safe exit points as long as its kNN objects remain the same.Similarly, non-answer useful objects are those objects for which any of the answer objects are among its kNN.This means that all useful objects lie inside the safe exit points as long as their respective kNNs are the same.Therefore, we must monitor the nearest neighbors of moving objects in a road network.We use the approach of Cho et al. [3], Safe Exit Algorithm (SEA), which can efficiently compute the safe exit points of a moving nearest neighbor query on a road network.
First, we formally define a set of safe exit points for a moving NN query in the road network.
Let Ω be the set of safe exit points for a kNN query point q and O = o 1 , o 2 , . . ., o |O| be the set of objects of interest to q. Assume that the answer set (i.e., O + ) of q and its non-answer set Then, it holds that d(q, o + ) ≤ d(q, o − ) for an answer object o + ∈ O + and a non-answer object o − ∈ O − .Finally, Ω is defined as follows: where MI N() and MAX() return the minimum and maximum values of the input array, respectively.That is, a safe exit point ω is the center point, i.e., AX(d between the farthest answer object and the nearest non-answer object.The following two main lemmas are presented to determine whether a safe exit point exists in the segment.

Lemma 2. If
there is a safe exit point ω in the segment.
Proof.Please refer to [3].This lemma indicates that a safe exit point in a segment exists if the set of answer objects at n β is not equal to the set of answer objects at p a .

Lemma 3. If
there is no safe exit point in the segment.
Proof: Please refer to [3].This lemma indicates that a safe exit point in a segment does not exist if the set of answer objects at n β is equal to the set of answer objects at p a .
For this purpose, we introduce o − n and o + f .For simplicity, let us assume that We now discuss the computation of the safe exit points for the answer object o 1 in the example road network given in Figure 1.Table 4 summarizes the computation of the safe exit points for data object o 1 for the example scenario in Figure 1.Recall that we are considering k = 2.The answer objects of data object o 1 are A o 1 = {q, o 2 }.

Monitoring of Pruned Objects
Recall that there are three different events that can affect the RkNN results.Sections 4.1 and 4.2.1 present the continuous monitoring of query and UO, respectively.In this section, we discuss the monitoring of pruned objects.To avoid any additional computation, we are using the precomputed influence region of UO as the monitoring region for pruned objects.By definition, the influence region of an answer object is valid until q is a kNN of the answer object, whereas in the case of a non-answer object, the influence region remains valid until q is not a kNN of the non-answer object.Therefore, it is necessary to monitor the objects that are entering or leaving the influence region because the movement of objects in and out the influence region can change the results.Therefore, we only start monitoring the movement of a pruned object once it enters or leaves the influence region.
Let o be a pruned object located outside the influence region of any UO.The monitoring of object o will not trigger unless it enters the influence region of any UO.Once it enters the influence region, the monitoring will start and the results set will only change when the NN of any UO changes.If the movement of a pruned object does not change the NN set of any UO, then the result set remains valid and it is not necessary to call the determining UO phase again.The determining UO phase will only be called when the NN set changes.

Monitoring of Pruned Objects
Recall that there are three different events that can affect the RkNN results.Sections 4.1 and 4.2.1 present the continuous monitoring of query and UO, respectively.In this section, we discuss the monitoring of pruned objects.To avoid any additional computation, we are using the precomputed influence region of UO as the monitoring region for pruned objects.By definition, the influence region of an answer object is valid until q is a kNN of the answer object, whereas in the case of a non-answer object, the influence region remains valid until q is not a kNN of the non-answer object.Therefore, it is necessary to monitor the objects that are entering or leaving the influence region because the movement of objects in and out the influence region can change the results.Therefore, we only start monitoring the movement of a pruned object once it enters or leaves the influence region.
Let o be a pruned object located outside the influence region of any UO.The monitoring of object o will not trigger unless it enters the influence region of any UO.Once it enters the influence region, the monitoring will start and the results set will only change when the NN of any UO changes.If the movement of a pruned object does not change the NN set of any UO, then the result set remains valid and it is not necessary to call the determining UO phase again.The determining UO phase will only be called when the NN set changes.

RkNN Queries in Directed Road Networks
Previous sections discussed the monitoring of RkNN queries in a road network that are represented by bidirectional graphs.In this section, we identify the modifications required to extend the proposed technique to a directed road network where each road segment has a particular orientation.
First, we discuss the modifications required for the computation of the safe exit points of q.The majority of the changes are required to be implemented in Phase 1 (i.e., determining useful objects) and are automatically addressed by redefining dist(p 1 , p 2 ).Given two points p 1 and p 2 , the shortest path distance dist(p 1 , p 2 ) is the minimum distance from p 1 to p 2 .By applying this modified definition, the categorizing of answer and non-answer objects remains unchanged.The definition of the closed node will be same.Consequently, Lemma 1 remains valid.Algorithm 2, can be used in a similar manner.The only difference is that to determine the UO, we explore the network in the reverse direction, i.e., an edge e(n 1 , n 2 ) is considered the adjacent edge of n 1 if and only if the edge is bidirectional or the direction of the edge is from n 2 to n 1 .
Phase 2 is the same, except to determine o k+1 or o k we expand the road network in the direction of the edges.Further, the computation of the influence region of o + is the same, except the distance dist(o + , o k+1 ) is the shortest path from o + to o k+1 instead of the shortest path from o + to o k+1 .Similarly, the computation of the influence region of o − is the same, except the distance dist(o − , o k ) is the shortest path from o − to o k instead of the shortest path between o − and o k .Phase 3 is the same as for a directed road network.Finally, we discuss the modifications in the computation of the safe exit points of the UO.SEA functions in a similar fashion except it only explores the network in the direction of the edges.The remainder of the methodology, i.e., Lemma 2, Lemma 3, and the definition of Ω, remains unchanged.

RkNN Queries in Dynamic Road Networks
In this section, we extend CORE-X to dynamic road networks where the network distance changes depending on the traffic conditions.The query result or safe region of query or data object may frequently be nullified by updating the weights of some edges, even though the query object q or data object o remains within their respective safe region.Thus, we introduce a compressed safe region to reduce the frequency of evaluations of the safe region in a dynamic road network.In this section, the safe region in a static road network is denoted as the original safe region, SR or , whereas the safe region in a dynamic road network is denoted as the compressed safe region, SR co , which is clearly a subset of SR or .To simplify the explanation, we study impact of a dynamic road network with respect to q only.Unlike the original safe region, the compressed safe region is determined within only the active sequence.Figure 11 illustrates the difference between SR or and SR co , where n 2 n 3 is the active edge.The bold line in Figure 11a indicates that for SR or , s 1 , s 2 , and s 3 are the safe exit points.In dynamic road networks, the safe region is compressed to active edge n 2 n 5 as indicated in bold lines in Figure 11b.
ISPRS Int.J. Geo-Inf.2016, 5, 247 17 of 26 reverse direction, i.e., an edge ( , ) is considered the adjacent edge of if and only if the edge is bidirectional or the direction of the edge is from to .Phase 2 is the same, except to determine or we expand the road network in the direction of the edges.Further, the computation of the influence region of is the same, except the distance ( , ) is the shortest path from to instead of the shortest path from to .Similarly, the computation of the influence region of is the same, except the distance ( , ) is the shortest path from to instead of the shortest path between and .Phase 3 is the same as for a directed road network.Finally, we discuss the modifications in the computation of the safe exit points of the UO.SEA functions in a similar fashion except it only explores the network in the direction of the edges.The remainder of the methodology, i.e., Lemma 2, Lemma 3, and the definition of Ω, remains unchanged.

RkNN Queries in Dynamic Road Networks
In this section, we extend CORE-X to dynamic road networks where the network distance changes depending on the traffic conditions.The query result or safe region of query or data object may frequently be nullified by updating the weights of some edges, even though the query object q or data object o remains within their respective safe region.Thus, we introduce a compressed safe region to reduce the frequency of evaluations of the safe region in a dynamic road network.In this section, the safe region in a static road network is denoted as the original safe region, , whereas the safe region in a dynamic road network is denoted as the compressed safe region, , which is clearly a subset of .To simplify the explanation, we study the impact of a dynamic road network with respect to q only.Unlike the original safe region, the compressed safe region is determined within only the active sequence.Figure 11 illustrates the difference between and , where is the active edge.The bold line in Figure 11a indicates that for , , , and are the safe exit points.In dynamic road networks, the safe region is compressed to active edge as indicated in bold lines in Figure 11b.Next, we introduce a critical region to monitor the validity of the safe region effectively when the weight of an edge is changed.The critical region CR is defined as = ∪ , where and are the influence region of answer and non-answer objects, respectively.By definition, the critical region contains all the points such that ∈ { , }.As illustrated in Figure 12a, there are two data objects and and a query object q.For = 1, it is obvious that is an answer object because = ( ) and is a non-answer object because = ( ).Thus, the critical region contains all the points ∈ { ( ), ( )}, denoted as the bold line in Figure 12b with and as boundary points.The safe region of q may be affected when the weight of an edge associated with the critical region changes.Therefore, the critical regions of q are stored and indexed to promptly verify whether a change affects the safe region.If the influence region of any Next, we introduce a critical region to monitor the validity of the safe region effectively when the weight of an edge is changed.The critical region CR is defined as CR = IR + ∪ IR − , where IR + and IR − are the influence region of answer and non-answer objects, respectively.By definition, the critical region contains all the points p cr such that p cr ∈ {IR + , IR − }.As illustrated in Figure 12a, there are two data objects o 1 and o 2 and a query object q.For k = 1, it is obvious that o 1 is an answer object because q = NN(o 1 ) and o 2 is a non-answer object because o 1 = NN(o 2 ).Thus, the critical region contains all the points p cr ∈ {IR(o 1 ), IR(o 2 )}, denoted as the bold line in Figure 12b with c 1 and c 2 as boundary points.The safe region of q may be affected when the weight of an edge associated with the critical region changes.Therefore, the critical regions of q are stored and indexed to promptly verify whether a change affects the safe region.If the influence region of any UO is updated, the critical region of q is also updated accordingly.Clearly, changes to edges that are not associated with the critical region can be safely ignored.
ISPRS Int.J. Geo-Inf.2016, 5, 247 18 of 26 UO is updated, the critical region of q is also updated accordingly.Clearly, changes to edges that are not associated with the critical region can be safely ignored.Figure 13a indicates the critical region by bold lines at time .Suppose, because of heavy traffic conditions, the weights of two edges and are changed at time from "3" to "6" as displayed in Figure 13b.The update to edge , which is associated a critical region, may affect the safe region.However, the update to edge , which is not part of a critical region, does not affect the safe region and thus can be safely ignored.

Bichromatic RkNN Queries
Unlike the monochromatic case where all objects are of the same type, in bichromatic RNN, we distinguish between two types of objects O and S. For a query object of type S, the objective is to determine data objects of type O for which the query point is their closest object in the set S. With this fundamental difference between MRkNN and BRkNN, CORE-X maintains the same methodology to manage both types of query.This section presents the changes required in the proposed technique to process BRkNN queries.
1.In determining the UO phase, only objects of type S are considered as blocking objects to prune the network.Therefore, a closed node can be redefined as a node n for which there exists an object ∈ such that ( , ) < ( , ).The remainder of Lemma 1 remains unchanged.The objects of type O that lie in the unpruned network are considered as UO objects, whereas the objects of type S in the unpruned network are called active objects.2. Similar to MRkNN, UO objects are categorized into answer and non-answer objects.Answer objects for BRkNN queries can be defined as an object o for which ( , ) < ( , where sk+1 is the (k +1)th NN object of o in dataset S. Similarly, a non-answer object is defined as an object o such that ( , ) > ( , ), where sk is the kth NN object of o in dataset S.
(a) Critical Region of q at (b) Updates to and at Figure 13a indicates the critical region by bold lines at time t i .Suppose, because of heavy traffic conditions, the weights of two edges n 1 n 2 and n 2 n 5 are changed at time t j from "3" to "6" as displayed in Figure 13b.The update to edge n 2 n 5 , which is associated with a critical region, may affect the safe region.However, the update to edge n 1 n 2 , which is not part of a critical region, does not affect the safe region and thus can be safely ignored.UO is updated, the critical region of q is also updated accordingly.Clearly, changes to edges that are not associated with the critical region can be safely ignored.Figure 13a indicates the critical region by bold lines at time .Suppose, because of heavy traffic conditions, the weights of two edges and are changed at time from "3" to "6" as displayed in Figure 13b.The update to edge , which is associated with a critical region, may affect the safe region.However, the update to edge , which is not part of a critical region, does not affect the safe region and thus can be safely ignored.

Bichromatic RkNN Queries
Unlike the monochromatic case where all objects are of the same type, in bichromatic RNN, we distinguish between two types of objects O and S. For a query object of type S, the objective is to determine data objects of type O for which the query point is their closest object in the set S. With this fundamental difference between MRkNN and BRkNN, CORE-X maintains the same methodology to manage both types of query.This section presents the changes required in the proposed technique to process BRkNN queries.
1.In determining the UO phase, only objects of type S are considered as blocking objects to prune the network.Therefore, a closed node can be redefined as a node n for which there exists an object ∈ such that ( , ) < ( , ).The remainder of Lemma 1 remains unchanged.The objects of type O that lie in the unpruned network are considered as UO objects, whereas the objects of type S in the unpruned network are called active objects.2. Similar to MRkNN, UO objects are categorized into answer and non-answer objects.Answer objects for BRkNN queries can be defined as an object o for which ( , ) < ( , where sk+1 is the (k +1)th NN object of o in dataset S. Similarly, a non-answer object is defined as an object o such that ( , ) > ( , ), where sk is the kth NN object of o in dataset S.
(a) Critical Region of q at (b) Updates to and at Figure 13.Updating the weights of two edges n 1 n 2 and n 2 n 3 where t i < t j .(a) Critical Region of q at t i ; (b) Updates to n 1 n 2 and n 2 n 3 at t j .

Bichromatic RkNN Queries
Unlike the monochromatic case where all objects are of the same type, in bichromatic RNN, we distinguish between two types of objects O and S. For a query object of type S, the objective is to determine data objects of type O for which the query point is their closest object in the set S. With this fundamental difference between MRkNN and BRkNN, CORE-X maintains the same methodology to manage both types of query.This section presents the changes required in the proposed technique to process BRkNN queries.

1.
In determining the UO phase, only objects of type S are considered as blocking objects to prune the network.Therefore, a closed node can be redefined as a node n for which there exists an object s ∈ S such that dist(n, s) < dist(n, q).The remainder of Lemma 1 remains unchanged.The objects of type O that lie in the unpruned network are considered as UO objects, whereas the objects of type S in the unpruned network are called active objects.

2.
Similar to MRkNN, UO objects are categorized into answer and non-answer objects.Answer objects for BRkNN queries can be defined as an object o for which dist(o, q) < dist(o, s k+1 ) where s k+1 is the (k +1)th NN object of o in dataset S. Similarly, a non-answer object is defined as an object o such that dist(o, q) > dist(o, s k ), where s k is the kth NN object of o in dataset S.

3.
The influence region of an answer object is defined as IR + = {p|dist(o + , p) ≤ dist(o + , s k+1 )}, where dist(o + , s k+1 ) is the distance between the answer object and (k+1)th NN in set S. Similarly, the influence region of a non-answer object is defined as where dist(o − , s k ) is the distance between the non-answer object and kth nearest object in set S. Phase 3 remains unchanged for BRkNN.4.
The computation of safe exit points for the UO remains the same.only difference is for BRkNN, the farthest answer object and nearest non-answer object belong to set S. Therefore, the safe exit point is the center point between s + f and s − n .

5.
The safe region of an active object can be computed in a similar fashion as q because both belong to same data type.

Analysis of Time and Space Complexities
In this section, we analyze both time and space complexities of the CORE-X algorithm.Recall that we are studying RkNN queries in an undirected road network that is represented as G = (N, E, W).Let N p k and E p k be the sets of nodes and edges of point p within the kNN objects, respectively.First, we analyze the time complexity of CORE-X.CORE-X retrieves a set of UO objects by traversing the road network from query location q, which has a time complexity of T 2 E q k + N q k logN q k because an edge is visited at most twice, first to determine the answer objects and then to determine the useful non-answer objects.Here, time complexity of T N q k logN q k refers to the time complexity of the shortest path algorithm from a query point to kRNN objects [29].Next, CORE-X computes the safe exit points using the retrieved UO objects.For each data object o ∈ UO, the influence region of data object o is searched to discover safe exit points, which has a time complexity of T E q k + N q k logN q k .Thus, the time complexity of CORE-X is ) using the preprocessed ordering of nodes in static road networks.However, in the case of dynamic road networks, the preprocessing technique is naturally insignificant because updating the weight of some edges often invalidates the preprocessed information.The search space of CORE-X becomes a region within a distance of k RNNs of q and (k+1)NNs of the data objects because it is necessary to explore the (k+1)th NN to compute the influence region of an answer object.Finally, the space complexity of CORE-X is O q k + O UO k+1 .

Performance Evaluation
In this section, we evaluate the performance of the proposed algorithm (CORE-X) through simulation experiments.We describe our experimental settings in Section 5.1 and present our experimental results for static and dynamic road networks in Sections 5.2 and 5.3, respectively.

Experimental Settings
Our experiments were performed using a real road network [30] for San Joaquin County, California, USA, which contains 18,263 nodes and 23,874 edges.The road network contains a set of queries and a set of data objects that can move randomly in the network.We simulate moving objects (both query and data objects) using the network-based moving-object generator [31].In each experiment, we evaluated the performance by varying a single parameter within the range indicated; all other parameters were set to the default values indicated in bold.All queries were monitored continuously for 600 timestamps.Table 5 lists the default parameters used in our experiments.We evaluated the performance of CORE-X using the following measures: (1) total amount of server CPU time per timestamp, which indicates the query processing time and (2) total communication cost as the total number of points (i.e., the location updates sent by data and query objects, and the query results and safe exit points returned by the server) transferred between clients and the server.The total query processing time is dominated by the computations (i.e., determining UO, computation influence region and safe exit points) performed at the server end, therefore we only measure the CPU time on the server.The battery power and wireless bandwidth consumption typically increase with the amount of data transferred between objects(clients) and servers, thus we use the amount of transferred data as a metric to evaluate the communication cost.For static road networks, we compared CORE-X with the state-of-the-art algorithm SAC [8] and a baseline algorithm.SAC continuously monitors RkNN queries by assigning a safe region to query and data objects, whereas baseline algorithm recomputes the results at each timestamp.For dynamic road networks, we compared the proposed algorithm with only the baseline because SAC does not address dynamic road networks.All algorithms were implemented in Java and executed on a desktop PC, 2.80 GHz, Intel Core i5 with 4 GB memory.

Experimental Results for Static Road Networks
Figure 14a presents the performance of baseline, SAC, and CORE-X with respect to the number of objects.Observe that all the three algorithms are sensitive to the increase in the number of objects because the algorithm must address updates from a large number of objects.The performance of SAC degrades with a large number of data objects because filtering and verification of more data objects are required.The query processing time of CORE-X increases with the increase in data objects mainly because the influence region and ω for a large number of objects must be calculated.However, CORE-X scales better than baseline and SAC.
Figure 14b displays the comparison of computation cost of CORE-X, SAC, and baseline with different values of N qry .Experimental results reveal that the computation time of all algorithms increases as the number of queries increases.However, CORE-X and SAC consumed considerably less CPU time than baseline because the query results are valid as long as the query and data objects remain in their respective safe region.Figure 14c, studies the effect of the proportion of query and data objects that are moving.Performance of all algorithms degrades as the percentage of moving objects increases.The computation time of CORE-X increases mainly because with data mobility, the safe region expires more frequently and the algorithm must recompute the results frequently.
Figure 14d demonstrates the influence of the speed of data objects and query on the performance of CORE-X, SAC, and baseline algorithms.The experimental results reveal that the baseline and SAC algorithms incur constant computation costs.The performance of SAC is not significantly affected by the speed because candidate objects must be verified at each timestamp, regardless of their speed.Conversely, the performance of CORE-X gradually decreases as the speed of the objects increases because objects leave their respective safe regions more frequently.Figure 14e shows the query processing time of CORE-X, SAC, and baseline as a function of k number of requested RNNs.Experimental results indicate that the computation time of all algorithms increases with an increase of the k value.This is expected because with an increase in k, more data objects are required to be explored and verified.However, CORE-X outperforms SAC and baseline.
SAC degrades with a large number of data objects because filtering and verification of more data objects are required.The query processing time of CORE-X increases with the increase in data objects mainly because the influence region and ω for a large number of objects must be calculated.However, CORE-X scales better than baseline and SAC.
Figure 14b displays the comparison of computation cost of CORE-X, SAC, and baseline with different values of Nqry.Experimental results reveal that the computation time of all algorithms increases as the number of queries increases.However, CORE-X and SAC consumed considerably less CPU time than baseline because the query results are valid as long as the query and data objects remain in their respective safe region.Figure 14c, studies the effect of the proportion of query and data objects that are moving.Performance of all algorithms degrades as the percentage of moving objects increases.The computation time of CORE-X increases mainly because with data mobility, the safe region expires more frequently and the algorithm must recompute the results frequently.Figure 14d demonstrates the influence of the speed of data objects and query on the performance of CORE-X, SAC, and baseline algorithms.The experimental results reveal that the baseline and SAC algorithms incur constant computation costs.The performance of SAC is not significantly affected by the speed because candidate objects must be verified at each timestamp, regardless of their speed.Conversely, the performance of CORE-X gradually decreases as the speed of the objects increases because objects leave their respective safe regions more frequently.Figure 14e shows the query processing time of CORE-X, SAC, and baseline as a function of k number of requested RNNs.Experimental results indicate that the computation time of all algorithms increases with an increase of the k value.This is expected because with an increase in k, more data objects are required to be explored and verified.However, CORE-X outperforms SAC and baseline.
In Figure 15a, we study the effect of the number of objects on the communication cost.This figure illustrates that the number of messages sent by all algorithms tended to increase as the number of objects increased.It is clear, however, that the safe region-based algorithms SAC and CORE-X significantly outperformed baseline.The proposed algorithm demonstrates superior performance compared to SAC because the client-server communication is not required when the query and data objects remain within the safe exit points, whereas in SAC, candidate objects are required to report their location to the server for verification whenever they change their location.In Figure 15a, we study the effect of the number of objects on the communication cost.This figure illustrates that the number of messages sent by all algorithms tended to increase as the number of objects increased.It is clear, however, that the safe region-based algorithms SAC and CORE-X significantly outperformed baseline.The proposed algorithm demonstrates superior performance compared to SAC because the client-server communication is not required when the query and data objects remain within the safe exit points, whereas in SAC, candidate objects are required to report their location to the server for verification whenever they change their location.
Figure 15b illustrates the effect of the number of queries on the communication cost.Baseline incurs constant communication cost, regardless of different values of N qry .Conversely, the communication cost of CORE-X and SAC increases with an increase in the number of queries.The communication cost of SAC increases mainly because more data objects are required to be verified at each timestamp, which increases the number of server-initiated updates.CORE-X only verifies the useful object when it leaves its safe region, which significantly reduces the communication cost.
Figure 15c presents the performance trends of CORE-X, SAC, and baseline as a function of query and data object mobility.As expected, baseline performs most poorly because it must update each data object at every timestamp.The communication cost of SAC is higher than CORE-X because of its expensive verification method.Figure 15d shows the total communication cost of CORE-X, SAC, and baseline with respect to speed of data and query objects.This figure indicates similar trends to Figure 14d.SAC incurs constant communication cost because the server-initiated request to verify the candidate objects does not depend on the speed.For CORE-X, the objects reach a safe exit point earlier when the speed is increased, which increases the communication cost.As indicated in Figure 15e, the communication costs of CORE-X, SAC, and the baseline algorithm increase with k.Both CORE-X and SAC perform better than the baseline method.However, CORE-X significantly outperforms SAC for all cases because of low verification cost.Both CORE-X and SAC perform better than the baseline method.However, CORE-X significantly outperforms SAC for all cases because of low verification cost.

Experimental Results for Dynamic Road Networks
Figure 16 demonstrates a comparison of the query processing time for a dynamic road network where the Rupd (%) values of all edges change their weight at each timestamp.The updated edges are selected randomly, irrespective of the locations of data and query objects.The length of an updated edge is selected randomly from 0.1 to 10 times the original length.
Figure 16a presents the query processing time as a function of the percentage of updated edges (Rupd) per timestamp.Here, = 0 indicates a static road network.Naturally, the query processing time of baseline is almost constant regardless of the value of Rupd because query objects in baseline issue RkNN queries at each timestamp.The query processing time of CORE-X increases with Rupd; this is mainly because the safe region of a query and data object must be updated if an edge is associated with the critical region of the data or query object.Observe that for ≤ 25, CORE-X performs considerably better than baseline, whereas for = 50, the query processing time of CORE-X is greater than baseline.

Experimental Results for Dynamic Road Networks
Figure 16 demonstrates a comparison of the query processing time for a dynamic road network where the R upd (%) values of all edges change their weight at each timestamp.The updated edges are selected randomly, irrespective of the locations of data and query objects.The length of an updated edge is selected randomly from 0.1 to 10 times the original length.
Figure 16a presents the query processing time as a function of the percentage of updated edges (R upd ) per timestamp.Here, R upd = 0 indicates a static road network.Naturally, the query processing time of baseline is almost constant regardless of the value of R upd because query objects in baseline issue RkNN queries at each timestamp.The query processing time of CORE-X increases with R upd ; this is mainly because the safe region of a query and data object must be updated if an edge is associated with the critical region of the data or query object.Observe that for R upd ≤ 25, CORE-X performs considerably better than baseline, whereas for R upd = 50, the query processing time of CORE-X is greater than baseline.
Figure 16b illustrates the effect of the number of data objects on the query processing time.The computation time for both algorithms typically increases with N data .In this case, CORE-X significantly outperforms baseline.In Figure 16c, we study the effect of N qry on the computation cost.Experimental results reveal that both algorithms are sensitive to an increase in the number of query objects.The query processing time of CORE-X increases mainly because the computation of the critical region and safe region for more objects is required.Figure 16d indicates the trend that computation cost of both algorithms increases with an increase in query and data object mobility.However, CORE-X scales significantly better than baseline.
Figure 16e is the query processing time of CORE-X and baseline as a function of the speed of the data and query objects.Baseline has a nearly stable query processing time.However, the computation cost of CORE-X increases with V obj because, as the objects move faster, they reach their respective safe exit points earlier, resulting in more frequent updates of the query results.Figure 16f demonstrates the influence of the k number of requested RNNs on the performance of both algorithms.As expected, the computation of both algorithms increases with an increase of the k value.With CORE-X, the critical region of more data objects needing to be computed increases the size of the critical region.Consequently, the number of edges associated with the critical region also increases, which elevates the query processing time.Figure 16b illustrates the effect of the number of data objects on the query processing time.The computation time for both algorithms typically increases with Ndata.In this case, CORE-X significantly outperforms baseline.In Figure 16c, we study the effect of Nqry on the computation cost.Experimental results reveal that both algorithms are sensitive to an increase in the number of query objects.The query processing time of CORE-X increases mainly because the computation of the critical region and safe region for more objects is required.Figure 16d indicates the trend that computation cost of both algorithms increases with an increase in query and data object mobility.However, CORE-X scales significantly better than baseline.
Figure 16e is the query processing time of CORE-X and baseline as a function of the speed of the data and query objects.Baseline has a nearly stable query processing time.However, the computation cost of CORE-X increases with Vobj because, as the objects move faster, they reach their respective safe exit points earlier, resulting in more frequent updates of the query results.Figure 16f demonstrates the influence of the k number of requested RNNs on the performance of both Figure 17 presents a comparison of communication cost of CORE-X and baseline using the same conditions as those in Figure 16. Figure 17a illustrates the effect of R upd on the communication cost of both algorithms.The performance of baseline is not significantly affected by R upd .However, the communication cost of CORE-X increases with R upd because the critical regions of data and query objects are updated more frequently as R upd increases.Consequently, the safe regions of the query and data objects are reevaluated.
In Figure 17b, we study the influence of the cardinality of the data objects on the communication costs.Experimental results indicate that CORE-X performs better than baseline because in CORE-X, server-client communication is only required when the query and data objects leave their safe regions or when the critical regions of the data and query objects are updated.Figure 17c shows the communication cost of CORE-X and baseline with respect to the number of query objects.Observe that the communication cost of baseline does not depend on the number of query objects because each data object reports its location whenever it changes its location.On the other hand, the communication cost of CORE-X increases because for a large number of query objects, more data objects are required to be verified.
Figure 17d exhibits the effect of query and data object mobility on the costs.Clearly, the number of transferred points increases with an increase in R obj .However, CORE-X consistently provides improved performance compared to baseline.Figure 17e illustrates the effect of the speed of the data and query objects on communications costs.In CORE-X, the number of transferred points increases with V obj for the same reason as discussed earlier in the case of Figure 15d.As indicated in Figure 17f, the communication costs of CORE-X and the baseline algorithm increases with k.This is mainly because the number of data objects that require verification and monitoring increases with k.In Figure 17b, we study the influence of the cardinality of the data objects on the communication costs.Experimental results indicate that CORE-X performs better than baseline because in CORE-X, server-client communication is only required when the query and data objects leave their safe regions or when the critical regions of the data and query objects are updated.Figure 17c shows the communication cost of CORE-X and baseline with respect to the number of query objects.Observe that the communication cost of baseline does not depend on the number of query objects because each data object reports its location whenever it changes its location.On the other hand, the communication cost of CORE-X increases because for a large number of query objects, more data objects are required to be verified.
Figure 17d exhibits the effect of query and data object mobility on the communication costs.Clearly, the number of transferred points increases with an increase in Robj.However, CORE-X consistently provides improved performance compared to baseline.Figure 17e illustrates the effect of the speed of the data and query objects on communications costs.In CORE-X, the number of transferred points increases with Vobj for the same reason as discussed earlier in the case of Figure 15d.As indicated in Figure 17f, the communication costs of CORE-X and the baseline algorithm increases with k.This is mainly because the number of data objects that require verification and

Conclusions
We proposed a new algorithm called CORE-X for the efficient processing of continuous reverse k nearest neigbor (RkNN) queries in road networks where both query and data objects are moving.The proposed approach is based on safe exit points, which can significantly improve not only the computation cost but also the communication cost between server and query object.Moreover, we presented pruning techniques and influence region-based monitoring to avoid processing of irrelevant data objects.CORE-X can effectively construct a safe region in a dynamic road network by introducing a compressed safe region and critical region.The results of experiments conducted using real datasets confirm that the proposed algorithm significantly reduces the computation cost and the communication cost compared to a baseline and state-of-the art algorithm (SAC).
There are several promising directions of future research.First, RNN queries can be studied for privacy-aware systems to ensure the location privacy of a query object from an attacker.Further, this study can be extended for uncertain data objects, which may not have exact locations.It is important to determine their approximate locations and develop accuracy bounds on the query results.

26 3. 1 .
ISPRS Int.J. Geo-Inf.2016, 5, 247 5 of Definition of Terms and Notations Road Network: A road network is represented by a weighted undirected graph = ( , , ), where N includes the set of nodes = { , , ⋯ , | | }, is a set of edges that connects two distinct nodes = { , , ⋯ , | | }, and W(e) denotes the weight of an edge e.An edge between two nodes is denoted by ( , ), where and are referred to as boundary nodes.

Figure 1 .
Figure 1.Example of a road network.

7 Figure 1 .
Figure 1.Example of a road network.

Figure 6 .
Figure 6.Influence region of o7.Algorithm 3 computes the influence region of answer objects and non-answer objects.

Figure 6 .
Figure 6.Influence region of o7.Algorithm 3 computes the influence region of answer objects and non-answer objects.

Figure 7 .
Figure 7. Safe exit points of q.

Figure 8 .
Figure 8. Determination of safe exit point .

Figure 9 .
Figure 9. Determination of safe exit point .

Figure 8 .
Figure 8. Determination of safe exit point .

Figure 9 .
Figure 9. Determination of safe exit point .

4. 3 .
Extensions 4.3.1.RkNN Queries in Directed Road Networks Previous sections discussed the monitoring of RkNN queries in a road network that are represented by bidirectional graphs.In this section, we identify the modifications required to

Figure 11 .
Figure 11.Difference between original safe region and compressed safe region .(a) Original safe region ; (b) Compressed safe region .

Figure 11 .
Figure 11.Difference between original safe region and compressed safe region SR or and compressed safe region SR co .(a) Original safe region SR or ; (b) Compressed safe region SR co .

Figure 12 .
Figure 12.Difference between original safe region and compressed safe region .(a) Road Network Example; (b) Critical Region of q.

Figure 13 .
Figure 13.Updating the weights of two edges and where < .(a) Critical Region of q at ; (b) Updates to and at .

Figure 12 .
Figure 12.Difference between original safe region SR or and compressed safe region SR co .(a) Road Network Example; (b) Critical Region of q.

Figure 12 .
Figure 12.Difference between original safe region and compressed safe region .(a) Road Network Example; (b) Critical Region of q.

Figure 13 .
Figure 13.Updating the weights of two edges and where < .(a) Critical Region of q at ; (b) Updates to and at .

Figure 14 .
Figure14ddemonstrates the influence of the speed of data objects and query on the performance of CORE-X, SAC, and baseline algorithms.The experimental results reveal that the baseline and SAC algorithms incur constant computation costs.The performance of SAC is not significantly affected by the speed because candidate objects must be verified at each timestamp, regardless of their speed.Conversely, the performance of CORE-X gradually decreases as the speed of the objects increases because objects leave their respective safe regions more frequently.Figure14eshows the query processing time of CORE-X, SAC, and baseline as a function of k number of requested RNNs.Experimental results indicate that the computation time of all algorithms increases with an increase of the k value.This is expected because with an increase in k, more data objects are required to be explored and verified.However, CORE-X outperforms SAC and baseline.In Figure15a, we study the effect of the number of objects on the communication cost.This figure illustrates that the number of messages sent by all algorithms tended to increase as the number of objects increased.It is clear, however, that the safe region-based algorithms SAC and CORE-X significantly outperformed baseline.The proposed algorithm demonstrates superior performance compared to SAC because the client-server communication is not required when the query and data objects remain within the safe exit points, whereas in SAC, candidate objects are required to report their location to the server for verification whenever they change their location.Figure 15b illustrates the effect of the number of queries on the communication cost.Baseline incurs constant communication cost, regardless of different values of Nqry.Conversely, the communication cost of CORE-X and SAC increases with an increase in the number of queries.The communication cost of SAC increases mainly because more data objects are required to be verified at each timestamp, which increases the number of server-initiated updates.CORE-X only verifies the ISPRS Int.J. Geo-Inf.2016, 5, 247 22 of 26

Figure 15 .
Figure 15.Comparison of the communication cost.(a) Effect of Ndata; (b) Effect of Nqry; (c) Effect of Robj; (d) Effect of Vobj; (e) Effect of k.

Figure 15 .
Figure 15.Comparison of the communication cost.(a) Effect of N data ; (b) Effect of N qry ; (c) Effect of R obj ; (d) Effect of V obj ; (e) Effect of k.

Figure 16 .
Figure 16.Comparison of the computational cost.(a) Effect of R upd ; (b) Effect of N data ; (c) Effect of N qry ; (d) Effect of R obj ; (e) Effect of V obj ; (f) Effect of k.

Figure 17 .
Figure 17.Comparison of the communication cost.(a) Effect of Rupd; (b) Effect of Ndata; (c) Effect of Nqry; (d) Effect of Robj; (e) Effect of Vobj j; (f) Effect of k.

Figure 17 .
Figure 17.Comparison of the communication cost.(a) Effect of R upd ; (b) Effect of N data ; (c) Effect of N qry ; (d) Effect of R obj ; (e) Effect of V obj j ; (f) Effect of k.

Table 1 .
Summary of notations used in this paper.

Table 1 . Summary of notations used in this paper.
Graph model of road network dist(p s , p e ) Length of the shortest path from p s to p e , where p s and p e represent start and end points, respectively n i Node in road network e(n s , n e ) Edge in edge set E, where n s and n e are start and end points of the edge W(e) Weight of edge e(n s , n e ) set of answer objects*/ 3: visited ← ∅ /*stores information of visited edges */ 4: queue.push(q,edgeactive ) /* edge active indicates active edge */ 5: While queue is not empty do 6:p a , edge ← queue.pop()7: If p a , edge / ∈ visited then 8: visited ← visited ∪ {edge} 9: If edge contains a data object o 10: kNN(o): verify(o, k, q) 11: If q discovered by verification 12: R k ← R k ∪ o 13: Else 14:

Table 2 .
Summary of 2NNs for o ∈ O.

Table 4 .
Computation of safe exit points for o 1 .