Abstract

A k-range nearest neighbor (kRNN) query in a spatial network finds the k closest objects to each point in the query region. The essential nature of the kRNN query is significant in location-based services (LBSs), where location-aware queries with query regions such as kRNN queries are frequently used because of the issue of location privacy and the imprecision of the associated positioning techniques. Existing studies focus on reducing computation costs at the server side while processing kRNN queries. They also consider snapshot queries that are evaluated once and terminated, as opposed to moving queries that require constant updating of their results. However, little attention has been paid to evaluating moving kRNN queries in directed and dynamic spatial networks where every edge is directed and its weight changes in accordance with the traffic conditions. In this paper, we propose an efficient algorithm called MORAN that evaluates moving k-range nearest neighbor (MkRNN) queries in directed and dynamic spatial networks. The results of a simulation conducted using real-life roadmaps indicate that MORAN is more effective than a competitive method based on a shared execution approach.

1. Introduction

Recently, positioning devices such as global positioning system (GPS) have become very popular. The use of navigation systems in automobiles is already widespread and this, together with mobile communications, facilitates new exciting applications [1, 2]. In these systems, points of interest (POIs), for example, hotels, campsites, and fuel stations, provided by online map services are located in a spatial network, and their proximity can be defined by the length, for example, the travel time, of the shortest path connecting them [3, 4]. A k-range nearest neighbor (kRNN) query finds the closest objects to each point inside a query range, as opposed to a query point [58]. Figure 1 gives an example of a kRNN query in a spatial network, where a query object is located inside a query region denoted by a rectangle for presentation convenience. Note that the numbers on the arrows in the figure indicate the order of the steps. kRNN queries are widely used in the context of location privacy and location uncertainty in location-based services (LBSs). More specifically, when using a potentially untrusted LBS server, users are reluctant to expose their exact location to the server because of the possibility of privacy leakages [9, 10]. As a result, many privacy-preserving techniques that blur the user location into a spatial region corresponding to query region have been proposed. Indeed, location uncertainty is inherent in LBSs because of the imprecision of the utilized positioning system [5].

Depending on the query lifetime, a location-aware query can be classified as either a snapshot query or a moving query. A snapshot query returns a result only once, whereas a moving query returns results continuously for a designated period. Existing algorithms focus on evaluating snapshot RNN queries. They primarily consider undirected and static spatial networks where every edge is undirected and its weight does not change over time [58]. However, their problem scenarios based on undirected and static spatial networks fail to provide a sufficient level of realism for many applications of interest when query objects move freely and constantly.

In this paper, we present a new approach for evaluating moving RNN queries (MRNN) in directed and dynamic spatial networks where each edge has a particular orientation and its weight changes in accordance with the traffic conditions. Clearly, directed and dynamic spatial network models provide more realistic modeling of urban road networks than undirected and static spatial network models. For example, after entering a highway, a driver must remain on that highway until he/she has reached an exit point, even if he/she has chosen an incorrect path. Thus, a highway can be represented using directed edges. Furthermore, the travel time to a destination selected by a query user frequently changes in accordance with the traffic conditions. In moving objects databases, a safe segment (or safe region) is a popular technique used in the processing of moving queries [1117]. A safe segment (or safe region) indicates a segment (or region) in which the movement of a query object does not cause the current query result to change. This helps to reduce communication and computation costs.

In this paper, we propose an efficient algorithm, called MORAN, for processing moving k-range nearest neighbor queries in directed and dynamic spatial networks, under the assumption that query objects move freely on spatial networks and that data objects are stationary. In our approach, a query region is partitioned into safe segments, which are maintained in directed and dynamic spatial networks. Clearly, unless the safe segments are used, the query object should evaluate a kNN query at its location using the kRNN query result provided by the server whenever it moves inside the query region. This simple approach places an excessive computational burden on the client side with a high computation frequency. Another considerable approach that can be used to solve this problem is to predict the movement of the query object in order to create the query results beforehand [18, 19]. However, in this paper, we consider a more realistic scenario, in which the query object moves arbitrarily and its path is not known in advance.

The contributions made in this paper can be summarized as follows.(i)We propose a new algorithm called MORAN that partitions query regions into safe segments to facilitate efficient processing of MkRNN queries in directed and dynamic spatial networks.(ii)We also propose a method that preserves the validity of the safe segments when traffic conditions are updated.(iii)We outline extensive experiments conducted to demonstrate the effectiveness and efficiency of MORAN under various conditions.

The remainder of this paper is organized as follows. Section 2 reviews related studies. Section 3 defines the primary terms used in this paper and formulates the research problem. Section 4 presents our proposed method for dividing query regions into safe segments in directed spatial networks. Section 5 presents our proposed method for maintaining the safe segments in dynamic spatial networks. Section 6 analyzes the extensive experimental results obtained. Finally, Section 7 provides concluding remarks regarding the proposed method.

To ensure location privacy in pervasive computing, mobile users frequently issue kRNN queries using cloaked regions, corresponding to the query regions in this study [58, 20]. Then, a server performs query processing, assuming that the user can be at any location inside the query region, and thus not knowing the exact location of the query issuer. Several studies on processing of kRNN queries in Euclidean space have been conducted. Kalnis et al. [21] developed a new algorithm for computing kRNN queries based on circular regions that reduce the number of redundant results, as well as the communication cost. Chow et al. [22] proposed a new approximate range NN query processing algorithm that enables the user to tune the tradeoff between the query response time and the quality of the query answers. The algorithm allows the user to specify an approximation tolerance level, where an answer set A is returned such that each object in A is one of the kNNs of every point in the query region. Xu et al. [23] developed an efficient algorithm for evaluating circular-region-based kNN queries that applies a filter method based on a distance measure to prune out POIs effectively. However, these techniques based on Euclidean distance cannot be applied to our problem concerning network-constrained mobile users and network distance-based queries.

kRNN queries have also been widely studied in the context of privacy-preserving LBSs based on spatial network distance, where the exact location of the query issuer is blurred into the query region [58]. The basic idea underlying the processing of a kRNN query is to execute a range query to retrieve data objects within the query region and execute kNN queries at the boundary points of the query region. Ku et al. [6] developed a privacy-aware spatial network nearest neighbor query algorithm that retrieves all POIs inside a given cloaked region and finds POIs outside the cloaked region using spatial network expansion. Naturally, issuing kNN queries multiple times in order to process kRNN queries leads to a huge redundant search overhead. To rectify this problem, Bao et al. [5] proposed an efficient kRNN query processing algorithm that employs a shared execution approach to eliminate the redundant search overhead.

Existing algorithms such as [58] deal with snapshot kRNN queries as opposed to the moving kRNN queries considered in this study. Consequently, they focus on reducing the computation time of the server as well as communication costs between the server and query objects. Thus, while processing snapshot kRNN queries, existing algorithms do not have to consider the computation time of the query objects that evaluate the exact kNN set using a set of candidate data objects provided by the server. This is because in processing snapshot kRNN queries, the computation time of the query objects is very small compared to the computation time of the server. However, very little research has focused on supporting MkRNN queries in directed and dynamic spatial networks where the computation time of the query objects is not negligible.

Nutanong et al. [16] developed an incremental safe-region-based technique, called the -Diagram, for answering moving kNN queries in Euclidean space as well as in undirected spatial networks. However, -Diagram is not appropriate in our problem scenarios because the distance is transitive in both Euclidean space and undirected spatial networks, whereas the distance is not transitive in directed spatial networks. Yung et al. [17] proposed an algorithm for computing the boundary, referred to as safe exits, of the safe region of moving range queries in spatial networks. Their solution focuses on moving range queries (e.g., find gas stations within for the next 10 minutes) and is thus inapplicable for the processing of MkRNN queries.

MORAN differs from existing studies in several aspects: first, it considers MkRNN queries in directed and dynamic spatial networks; second, it focuses on reducing the computation time and frequency of the query object; and finally, it efficiently determines and maintains safe segments within a query region. In recent years, various types of queries on moving objects have also been studied extensively. They include range queries [14, 17], kNN queries with two predicates [24], and obstructed kNN queries [25]. The associated studies have different problem scenarios from those in our study and their solutions are not appropriate.

Finally, Table 1 compares our problem scenario with related work in terms of query type, space domain, and mobility of query objects and data objects. Because of space limitations, we shorten the terms “undirected and static spatial network” to “USSN” and “directed and dynamic spatial network” to DDSN.

3. Background

Section 3.1 defines the terms and notations used in this paper. Section 3.2 formulates the problem by using an example.

3.1. Definition of Terms and Notations

Now, we define the terms and notations used in this paper for clarification.

Spatial Network. A spatial network is represented by a weighted directed graph , where , , and denote a node set, edge set, and edge distance matrix, respectively. Each edge connecting two nodes has a weight and a specific orientation. The weight of an edge changes depending on the traffic conditions, and its direction is either bidirectional or unidirectional. Specifically, denotes an undirected edge, where and are adjacent nodes, whereas or denotes a directed edge. The arrow above the edge denotes the associated direction.

Classification of Nodes. Nodes can be classified into three categories according to the node degree: (1) if it is greater than or 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 by either or , refers to a path connecting two nodes, and , such that (or ) is either an intersection or terminal node, and the other nodes in the path are intermediate nodes. The two end nodes, and , are called boundary nodes. Clearly, all edges in the same edge sequence have the same direction. The length of an edge sequence is the total weight of the edges in the edge sequence. One part of an edge sequence is called a segment. Note that by definition, an edge sequence is also a segment defined by the boundary nodes of the edge sequence.

To simplify the presentation, Notations and Their Definitions summarizes the notations used in this paper. The distance between two points in a directed spatial network is not symmetric; that is, for two points , there is no guarantee that equals . Note that if the algorithms for MORAN operate in the same manner for undirected and directed spatial segments, an undirected segment is used for convenience to describe the algorithms.

Figure 2 depicts the distances and segment length between two objects and in a directed spatial network. In this figure, the shortest path from to is and thus the distance from to is . Conversely, the shortest path from to is and thus the distance from to is . This proves that the network distance is not symmetric in a directed spatial network. The segment connecting and in the same edge sequence becomes and thus its length is . Recall that is defined if and only if the two points, and , are located in the same edge sequence.

3.2. Problem Formulation

Figure 3 shows an example of an MRNN query in a directed and dynamic spatial network. Here, data objects through are represented by the rectangles and a query region is represented by a set of bold line segments; that is, . The boundary point of a query region indicates the point where the query region and nonquery region meet. In this example, query region has four boundary points, through . The number next to an edge indicates the distance between the two adjacent objects. Suppose that a query object in query region requests two NNs from the server, while hiding its location from the server. Then, the kRNN query result for should include the two closest data objects to each point in query region . The query result can be represented by a set of tuples, where is a safe segment in and is the query result for the safe segment . As shown in Figure 3(a), query region can be partitioned into four safe segments; that is, , , , and . Clearly, if query object is located in a safe segment (i.e., ), then the kNN set of is . Similarly, if , then the kNN set of is , if , then the kNN set for is , and if , then the kNN set of is . As shown in Figure 3(b), if the weight of an edge represented by the bold dotted line is updated from 3 to 5 at time , this update may affect the safe segments computed at time , which leads to nullifying the kNN set of .

The query region consists of a set of segments and a set of boundary points; that is, and . Clearly, a query object is located inside query region , while hiding its exact location from the server to ensure location privacy. Note that we use the terms “query object ” and “query point ” interchangeably for convenience of discussion. Clearly, for a query point ,   holds, where refers to a set of NNs at a boundary point and refers to a set of objects inside a segment . It should be noted that processing kRNN queries at the server is orthogonal to this study. Therefore, any kRNN query processing algorithms (e.g., [5, 6]) can be used to evaluate the kRNN queries at the server. The server evaluates a kRNN query for a query region and then provides a set of candidate data objects to query object . Finally, determines safe segments using a set of candidate data objects for the query region . Recall that given a safe segment , for two points , is equal to .

Figure 4 illustrates three scenarios that can arise when a query object issues kRNN queries. As shown in Figure 4(a), at time , a query object submits a kRNN query for a query region to the server. On receiving the query, the server evaluates the kRNN query and returns the query result to . Clearly, determines safe segments inside query region using the kRNN query result. As shown in Figure 4(b), when leaves the query region at time , it submits a kRNN query for an updated query region to the server. Then, the server evaluates the kRNN query and returns the query result to . Clearly, determines safe segments inside query region . As shown in Figure 4(c), while is inside at time , a query region overlaps a traffic congestion area , marked by a gray rectangle, in which the weight of the edges changes. The server realizes that the traffic congestion area invalidates the kRNN query result for and thus requests that updates the query region. Consequently, submits a kRNN query for an updated query region to the server, which evaluates the kRNN query and returns the query result to . Clearly, determines the safe segments inside query region . In Section 5, we elaborate on a method to verify that an updated traffic condition invalidates current kRNN query results.

4. Processing MkRNN Queries in Directed Spatial Networks

In Section 4.1, we give an overview of MORAN. In Section 4.2, we present an algorithm for determining safe segments in a query region. Finally, in Section 4.3, we discuss the construction of the safe segments of an MkRNN query for the example of directed spatial network.

4.1. Overview

As stated before, we focus on query processing at the client side while processing MkRNN queries in a directed and dynamic spatial network. If either of the two events in Figure 5 occurs, the server should evaluate the kRNN query and provide query object with an updated kRNN query result. The first event is leaving the current query region. For example, as shown in Figure 5(a), if moves to outside of , a kRNN query should be reevaluated with the updated query region. The second event is invalidation of the current kRNN query result provided to query object because of an updated traffic condition. For example, as shown in Figure 5(b), if query region overlaps traffic congestion area , the kRNN query should be reevaluated to reflect the updated traffic condition. When the query object receives an updated kRNN query result from the server, it should reevaluate safe segments inside the query region. Using safe segments reduces the computation time and frequency because the query object does not have to evaluate kNN queries while inside the safe segments.

Algorithm 1 outlines the process of determining the safe segments in a query region in a directed spatial network. The algorithm starts by initializing to an empty set, which stores the safe segments found thus far. Each segment in query region is explored sequentially to find the safe segments in segment . For this purpose, MORAN evaluates two kNN queries issued at boundary points and of segment . The query results are stored to and , respectively. The objects in are explored and stored to . The function find_safe_segments is called with , , and in order to find safe segments in segment . The found safe segments are added to the result set . When all the segments in have been examined, a set of safe segments in query region is returned to the query issuer. It should be noted that if updates in the weight of edges frequently occur in a spatial network, it is better to determine the safe segments in the current segment including the query point rather than all the safe segments in the query region. We employ a shared execution approach [5], which is widely used to avoid multiple visits to the same nodes and edges. This clearly reduces the query processing time while determining safe segments in a query region.

Input: Q: query region, k: the number of requested NNs
Output: : the set of safe segments in
(1)                       // is initialized to an empty set
(2) for each segment   do
(3)   evaluate_kNN_query_at_point (, k)      // a kNN query is evaluated at a boundary point
(4)   evaluate_kNN_query_at_point (, k)     // a kNN query is evaluated at a boundary point
(5)   evaluate_range_query ()         // a range query is evaluated for a segment
(6)   find_safe_segments (, , )   // the function is detailed in Section 4.2
(7)  
(8) return                       // the set of safe segments is provided to the query issuer
4.2. Partitioning Query Region into Safe Segments

We consider an undirected segment followed by a directed segment . We present a method for finding safe segments in segment by using , , and . Here, and refer to sets of NNs at boundary points and , respectively, and refers to a set of objects inside segment . An object that belongs to the union of , , and , that is, , is referred to as a qualifying object. Clearly, the set of NNs at a query point is a subset of the union of , , and [5, 13, 26]; that is, . If equals and is a subset of , segment becomes a safe segment. Otherwise, it has two or more safe segments.

We first explore the change in a network distance for a qualifying object when a query point is located in an undirected segment [13, 14]. Figure 6 shows the change in for three cases: , , and . In this figure, the -axis represents and the -axis represents for . If , then , as shown in Figure 6(a). Similarly, if , then , as shown in Figure 6(b). Finally, if , then , as shown in Figure 6(c).

Table 2 summarizes the evaluation of for and , where MIN returns the minimum of the values in the input array. Because a qualifying object belongs to a combination of , , or , a total of seven possible cases are considered. Note that , , , and are given constants and is the length of the shortest path among multiple paths from and .

Figure 7 shows an example of the change in depending on the location of query point . For simplicity, we assume that the number of NNs requested at query point is . Then, as shown in Figure 7(a), , , and are evaluated as , , and , respectively. As shown in Figure 7(b), the distance from to , represented by the bold lines, is if ; otherwise, it is because , , and are given.

Next, we explore the change in network distance for object when a query point is located in a directed segment . Figure 8 shows the change in for three cases: , , and . Note that the dotted lines indicate that no paths exist from to for the corresponding intervals, which are denoted by . For object , as shown in Figure 8(a), if , then ; otherwise (i.e., ), . Similarly, if , then , as shown in Figure 8(b). Finally, for object , as shown in Figure 8(c), if , then ; otherwise (i.e., ), . Here, is the length of the shortest path from and where query point and is thus determined using Table 2 in the same way as .

Figure 9 shows an example of the change in depending on the location of query point . For simplicity, we assume that the number of NNs requested at query point is . Then, as shown in Figure 9(a), , , and are evaluated as , , and , respectively. As shown in Figure 9(b), the distance from to , represented by the bold lines, is if ; otherwise, it is because , , and are given.

4.3. Partitioning Example Query Region into Safe Segments

We now discuss the construction of safe segments for query region in Figure 3(a). Recall that the number of requested NNs is and the query region includes three segments; that is, . Table 3 summarizes the computation of the safe segments in query region . Clearly, the kNN set at a node is evaluated only once, and it is reused multiple times.

As shown in Algorithm 1, MORAN determines the safe segments for each segment in query region . Therefore, we show the successive determination of the safe segments in , , and . It is clear that adjacent safe segments with the same query result can be merged. Recall that we can draw by using a query point and an object .

Figure 10 depicts using a query point and each object . Here, the union of , , and becomes , because , , and are given. Figures 10(a), 10(b), 10(c), and 10(d) illustrate , , , and , respectively. Recall that , , , and hold.

To partition a segment into safe segments, it is essential to identify the th NN at a query point among the qualifying objects . Algorithm 2 determines the skyline that consists of pairs such that and hold for each query point . The variable count keeps the number of qualifying objects processed thus far, which is initialized to 0 (line (1)). If count is less than , then the skyline for is determined by for , where keeps the th NN determined thus far (lines (4)-(5)). Otherwise (i.e., ), the skyline for is determined by for (lines (6)-(7)). Naturally, count increases by 1 whenever an object o is processed (line (8)).

Input: k: the number of requested NNs, : the set of qualifying objects for a segment
Output: : the set of distances from q to its kth NN (i.e., )
(1)                   // count keeps the number of objects processed thus far
(2)    // is initialized to 0 for
(3)for each object   do                // qualifying objects are handled sequentially
(4)   if    then                        // if the number of objects processed thus far is less than
(5)      // is the th NN thus far
(6)   else
(7)   
(8)                          // count increases by 1 whenever an object is processed
(9)return  

Figure 11 illustrates the partitioning of a segment into three safe segments using for each object . Figure 11(a) shows the plot of for each object . Note that, to simplify the presentation, the interval in which holds is not represented. When a query point moves in a segment , its th NN is determined using Algorithm 2 and is represented by the bold lines in Figure 11(b). Specifically, for , the th NN is and thus the kNN set is . Similarly, for , the th NN is and thus the kNN set is . Finally, for , the th NN is and thus the kNN set is . Consequently, a segment is divided into three safe segments, represented by .

Figures 12(a), 12(b), and 12(c) illustrate , , and , respectively, where refers to a query point in a segment and , , and refer to qualifying objects for the segment . Note that , , and hold.

Figure 13 illustrates the partitioning of a segment into two safe segments using for each object . Figure 13(a) shows the plot of for each object . When a query point moves in a segment , its th NN is represented by the bold lines in Figure 13(b), where a point marked by a five-pointed star indicates the middle of the segment . Specifically, for , the th NN is and thus the kNN set is . Similarly, for , the th NN is and thus the kNN set is . Consequently, a segment is divided into two safe segments, which are represented as . Finally, a segment becomes a safe segment; that is, . This is because equals and is a subset of ; that is, and .

5. Monitoring Safe Segments in Dynamic Spatial Networks

Figure 14 illustrates an example of changing the weight of an edge in a spatial network where it is assumed that is given. For convenience, we consider the query region that consists of an edge ; that is, . As shown in Figure 14(b), when the weight of an edge has been updated from 3 to 5 at time , this update may invalidate the safe segments in the query region . Therefore, it is necessary to monitor the validity of safe segments in a query region when the change occurs. To this end, we introduce an influential region to monitor the validity of safe segments. The influential region for a query point is defined as a set of points such that holds. If the weight of an edge changes inside influential region , the kNN query at query point should be reevaluated to reflect the change in the weight. However, if the weight of an edge changes outside influential region , the change can be safely ignored. Suppose that a query region is represented by a set of connected segments and a set of boundary points; that is, and . Then, the influential region for query region becomes the union of the influential region for each query point ; that is, . This can be represented simply as , where refers to the influential region at each boundary point of the query region . Specifically, is the set of points such that holds. Here, is the farthest answer object from boundary point ; that is, for each answer object , holds.

Figure 15(a) illustrates the influential region for the query region at time , where the dotted line and square brackets mark the influential region and its boundary points, respectively. A set of the two NNs at boundary point is and the th NN of is . Thus, the distance from to its th NN is and thus the influential region for a boundary point becomes . Similarly, the influential region for a boundary point evaluates , because ,  , and are given. Consequently, the influential region for query region becomes . As shown in Figure 15(b), updating the weight of edge from 3 to 5 may affect the safe segments for the query region . This is because updated edge overlaps the influential region for query region . In this case, the server reevaluates the qualifying objects for query region and provides updated qualifying objects so that the user can update safe segments. If the safe segments are updated, the influential region should be also updated accordingly. Thus, the influential region for query region is updated at time , as shown in Figure 15(b). Finally, updates to the weights of the edges, for example, , , , and , that do not overlap the influential region can be safely ignored.

Algorithm 3 monitors the validity of safe segments in a query region when the weight of edges changes over time. Assume that the weight of edge is updated. Subsequently, the server checks if edge overlaps the influential region for query region . If the edge with the updated weight does not overlap the influential region, the update is safely ignored (lines (1)-(2)). Otherwise (i.e., ), the server requests that query object updates the query region (line (4)). Consequently, submits a kRNN query for updated query region . The server then evaluates the kRNN query for and returns the kRNN query result to (line (5)). The query object then determines safe segments using (line (6)). Finally, the server updates the influential region accordingly (line (7)).

Input: : influential region, : updated edge
Output: none
(1)if    then                                     // an update to edge that does not overlap is ignored.
(2)  ignore the update in the weight of edge
(3)else                     // this means that
(4)   Update_query_region ()      // server requests that update the query region
(5)   Evaluate_RNN_query (, )         // server evaluates RNN query for an updated query region
(6)   Update_safe_segments (, )        // determines safe segments inside the updated query region
(7)   Update_influential_region (, )      // server updates influential region accordingly.

6. Performance Evaluation

We describe our experimental settings in Section 6.1 and present the results of our experiments using real-life road maps in Section 6.2.

6.1. Experimental Settings

In the experiments, we use two real-life road maps, obtained from [27], to explore the impact of the edge sequence length on the performance of MORAN. The first road map, comprising 175,813 nodes and 179,179 edges, includes major roads in North America (NA) and corresponds approximately to a data universe of  km2. The second road map, comprising 18,263 nodes and 23,874 edges, includes major roads in San Joaquin County (SJ), California, and corresponds approximately to a data universe of  km2. For the first road map NA, the number of edge sequences and their average length are 12,416 and 29,052 m, respectively. For the second road map SJ, the number of edge sequences and their average length are 20,040 and 248 m, respectively. Table 4 summarizes the parameters used in the experiments. In each experiment, we vary a single parameter in the range shown and set the other parameters to the default values marked in bold. We simulate moving query points using a network-based moving objects generator [28]. The number of query objects is set to 1,000. The size of a query region is determined by the number of edge sequences that constitute the query region. The directed and updated edge sequences are selected randomly, irrespective of the locations of the data and query objects. The length of an updated edge sequence is selected randomly to be between 0.1 and 10 times the original length. For example, if is set to 0.5% and the number of edge sequences is 12,416, then 62 edge sequences are selected randomly every timestamp and their weights are updated.

As a benchmark against MORAN, we use kRNN-E [5] without information of the precomputed shortest distances, based on a shared execution paradigm to remove the redundant search overhead. We choose kRNN-E instead of kRNN-F [5] with information of all the precomputed shortest distances, although kRNN-F typically outperforms kRNN-E. The reason for this is that the precomputed distances among nodes are frequently invalidated by the updates to the weights of the edges, which makes it difficult to maintain the precomputed distances. To make kRNN-F applicable to our problem scenarios, we can consider applying hierarchical and goal-directed speed-up techniques [29] for Dijkstra’s algorithm. This approach can help to reduce the computation time only at the server side and thus would not affect our experimental results. Recall that the query processing at the server is orthogonal to this study and that MORAN focuses on reducing the computation frequency and time taken at the client side to evaluate MkRNN queries. Our experimental results provide the average values per timestamp while 1,000 query points run for 600 timestamps. Note that, for road map NA, the speed of the query points is 100 km/h by default, whereas, for road map SJ, the speed is 60 km/h by default. All algorithms are implemented in C++ and executed on a desktop PC with a 3.4 GHz processor and 16 GB of memory.

6.2. Experimental Results

Figure 16 shows a comparison of the query processing times at the client side of MORAN and kRNN-E for evaluating MkRNN queries in road map NA, where each chart illustrates the effect of varying a single parameter in Table 4. The values in the parentheses indicate the computation frequency per timestamp. Clearly, the computation frequency of kRNN-E equals the number of query points and thus is omitted. It should be noted that the server evaluates the MkRNN queries whenever the query points exit their query regions and thus the query processing times at the server side are the same for MORAN and kRNN-E. Therefore, we focus on comparing the query processing times at the client side.

Figure 16(a) shows the query processing time as a function of the number of requested NNs, that is, k. Clearly, the query processing time at the client side increases with k. However, the query processing time of MORAN is significantly shorter than that of kRNN-E for all cases. The reason for this is that kRNN-E evaluates kNN queries whenever query points move. Conversely, MORAN determines safe segments when query points enter new edge sequences or when the query results provided by the server become invalidated because of updated traffic conditions.

Figure 16(b) shows the query processing time as a function of the ratio of directed edge sequences to the total number of edge sequences, that is, . Clearly, = 0% refers to an undirected spatial network. The query processing times at the client side of both methods are insensitive to the value of . The query processing time of MORAN is shorter than that of kRNN-E, regardless of the value of .

Figure 16(c) shows the query processing time as a function of the ratio of updated edge sequences to the total number of edge sequences per timestamp, that is, . Here, = 0% refers to a static spatial network. The length of an updated edge sequence is selected randomly from between 0.1 and 10 times the original length. Clearly, the query processing time of kRNN-E is almost constant regardless of the value of because query points in kRNN-E issue kNN queries at each timestamp. However, the query processing time of MORAN increases linearly with because the probability that the influential region of a query region overlaps any updated edge sequence increases with . Therefore, a larger value of leads to a longer query processing time.

Figure 16(d) shows the query processing time as a function of the size of the query region, that is, . Clearly, the query processing time increases with . However, the query processing time of MORAN is clearly shorter than that of kRNN-E, regardless of the value of .

Figure 16(e) shows the query processing time as a function of the number of data points, that is, . In general, as increases, the search space decreases, and thus, the query processing time at the server side decreases accordingly. However, the query processing time at the client side increases with . This is because the number of qualifying data points handled at the client side increases with . Although the query processing time of MORAN increases more rapidly with than that of kRNN-E, the query processing time of MORAN is still shorter than that of kRNN-E for . However, for = 100 k, the query processing time of MORAN is 1.29 times longer than that of kRNN-E.

Figure 16(f) shows the query processing time as a function of the speed of the query points, that is, . The query processing time of MORAN is more sensitive to than that of kRNN-E. However, the query processing time of MORAN is clearly shorter than that of kRNN-E for all cases.

Figure 17 shows a comparison of the query processing times at the client side of MORAN and kRNN-E for evaluating MkRNN queries in road map SJ. As when road map NA is used, when road map SJ is used, the query processing time of MORAN is clearly shorter than that of kRNN-E. As shown in Figure 17(a), the query processing time increases with k for the same reason as discussed earlier in the case of Figure 16(a). As shown in Figure 17(b), the query processing times are not sensitive to the value of . As shown in Figure 17(c), the query processing time of kRNN-E remains stable regardless of the value of . Conversely, the query processing time of MORAN increases with , because a larger value of affects the influential regions of more query points. As shown in Figure 17(d), the query processing time increases with , because the number of qualifying data points handled at the client side also increases with . As shown in Figure 17(e), as increases, the query processing times decrease. This is closely related to the size of the influential regions. Specifically, as increases, the influential region decreases and thus updating weights of edge sequences affects the influential regions of more query points. As shown in Figure 17(f), the query processing time of MORAN increases with for the same reason as discussed earlier in the case of Figure 16(f), whereas the query processing time of kRNN-E remains stable, regardless of the value of .

7. Conclusion

We proposed a new algorithm, called MORAN, for processing MkRNN queries in directed and dynamic spatial networks. Existing studies focus on reducing redundant computation costs at the server side while processing snapshot kRNN queries in undirected and static spatial networks. However, MORAN clearly decreases the computation time and frequency at the client side by dividing the query region into safe segments while processing MkRNN queries in directed and dynamic spatial networks. The influential region for a query region is introduced to monitor the impact of the updated traffic conditions on the safe segments. The results of experiments using real-life road maps demonstrate that MORAN clearly outperforms kRNN-E for various workloads in terms of the computation time and frequency. We plan to extend our approach to processing sophisticated queries such as kNN joins and top-k spatial preference queries in directed and dynamic spatial networks.

Notations and Their Definitions

:Edge connecting two adjacent nodes and
Edge sequence, where (or ) is the start (or end) boundary node and the other nodes, , are intermediate nodes
Length of the shortest path from point to point
:Length of the segment connecting two points and , such that and are located in the same edge sequence
:Query point
:Number of requested NNs
:Set of kNNs at point
:Segment that belongs to an edge sequence
:Set of objects in segment
:The th NN of query point
:Influence region for query point
:Influence region for query region .

Conflict of Interests

The authors declare that there is no conflict of interests regarding the publication of this paper.

Acknowledgment

This research was supported by Kyungpook National University Research Fund, 2014.