Next Article in Journal
Quantum Computing Approaches for Mission Covering Optimization
Next Article in Special Issue
Building a Technology Recommender System Using Web Crawling and Natural Language Processing Technology
Previous Article in Journal
Improving Traffic Load Distribution Fairness in Mobile Social Networks
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

The Efficient Processing of Moving k-Farthest Neighbor Queries in Road Networks †

Department of Software, Kyungpook National University, 2559 Gyeongsang-daero, Sangju-si 37224, Korea
This paper is an extended version of our paper published in Cho, H.-J. Batch processing algorithm for moving k-farthest neighbor queries in road networks. In Proceedings of the KSCI Summer Conference 2021, Jeju, Korea, 15–17 July 2021; pp. 223–224.
Algorithms 2022, 15(7), 223; https://doi.org/10.3390/a15070223
Submission received: 19 April 2022 / Revised: 14 June 2022 / Accepted: 22 June 2022 / Published: 23 June 2022

Abstract

:
Given a set of facilities F and a query point q, a k-farthest neighbor (kFN) query returns the k farthest facilities f 1 , f 1 , , f k from q. This study considers the moving k-farthest neighbor (MkFN) query that constantly retrieves the k facilities farthest from a moving query point q in a road network. The main challenge in processing MkFN queries in road networks is avoiding the repeated retrieval of candidate facilities as the query point arbitrarily moves along the road network. To this end, this study proposes a moving farthest search algorithm (MOFA) to compute valid segments for the query segment in which the query point is located. Each valid segment has the same k facilities farthest from the query locations in the valid segment. Therefore, MOFA retrieves candidate facilities only once for the query segment and computes valid segments using these candidate facilities, thereby avoiding the repeated retrieval of candidate facilities when the query point moves. An empirical study using real-world road networks demonstrates the superiority and scalability of MOFA compared to a conventional solution.

1. Introduction

Given a positive integer k, query point q, and set of facilities F, the k-farthest neighbor (kFN) query retrieves the k facilities farthest from the query point q, whereas the k-nearest neighbor (kNN) query retrieves the k facilities closest to the query point q. kFN queries are the logical opposite of kNN queries. This study considers moving k-farthest neighbor (MkFN) queries in road networks. MkFN queries constantly retrieve the k facilities farthest from a moving query point q. The kFN search has real-world applications, including computational geometry, artificial intelligence, pattern recognition, and information retrieval methods [1,2,3,4,5,6,7,8,9,10,11,12]. A farthest neighbor (FN) search specifically determines the smallest radius of a circle centered on a point q that covers all facilities. Consider a real-world scenario involving a team of commandos on a mission in which the leader requests that no member of the team should be more than 1 km away from him. Naturally, the leader should pay close attention to the farthest team members to monitor their activities and ask them not to move too far away. As another example of the FN search, locating obnoxious facilities such as waste incinerators is often performed in a manner that will maximize the distance between residential areas and these facilities.
Given a positive integer k = 2 , the moving query point q, and set of five facilities F = { f 1 , f 2 , f 3 , f 4 , f 5 } (Figure 1), the MkFN query should constantly retrieve the two facilities farthest from the moving query point q in the road network. Suppose that the query point q locations at timestamps t 1 and t 2 are represented by q t 1 and q t 2 , respectively. f 1 and f 2 are the two facilities farthest from q t 1 , and  f 4 and f 5 are the two facilities farthest from q t 2 . A simple solution for MkFN queries in road networks involves computing the network distance from a query point q to each facility f in F. An additional O ( | F | · log | F | ) time is required to retrieve the k facilities farthest from q. However, this simple solution cannot be used in practical applications because kFN queries should be regularly evaluated to refresh the query results while q moves continuously. Therefore, this study proposes a moving farthest search algorithm called MOFA that enables the efficient evaluation of MkFN queries in road networks. MOFA computes the valid segments for the query segment in which the query point q moves such that it does not repeatedly retrieve candidate facilities whenever q moves. To this end, MOFA quickly retrieves the candidate facilities for the query segment and computes the valid segments using the candidate facilities. Each query location in the valid segment has the same k facilities farthest from the query location.
Figure 2 presents an example of an MkFN query, where q moves along query segment q s q e ¯ . First, the moving query point q submits a query segment q s q e ¯ to the location-based service (LBS) server, instead of the current q location. Next, the LBS server returns a set of valid segments for q s q e ¯ , where each valid segment has the same k facilities farthest from each query location in the valid segment. This study assumes that query points (e.g., vehicles and pedestrians) move, while facilities (e.g., garbage incinerators and chemical plants) are stationary. To the best of our knowledge, this is the first attempt to study the efficient processing of MkFN queries in road networks.
The main contributions of this study are summarized below.
  • This study proposes MOFA to compute valid segments for the query segment in which a query point moves.
  • MOFA retrieves candidate facilities once and has a stable query processing time that is independent of the query frequency.
  • An extensive empirical evaluation is performed using real-world road networks to demonstrate the superiority of MOFA compared to a conventional solution.
The remainder of this paper is organized as follows. Section 2 reviews the related research. Section 3 describes the MkFN query problem and notation used in this study. Section 4 describes the clustering of facilities and calculation of distances between facility clusters and a border point. Section 5 presents MOFA for MkFN query processing in road networks, and Section 6 evaluates an example of MkFN query using MOFA. Section 7 presents the empirical results obtained using MOFA and conventional algorithms with different setups, and Section 8 summarizes our conclusions.

2. Related Works

Many studies have been conducted on the efficient processing of spatial queries based on the FN search [1,2,3,4,5,6,7,8,9,10,11,12].
  • Reverse FN (RFN) query [3,4,5,7,8,9,13]. Given a set of facilities F and a query point q, an RFN query retrieves the facilities in F that have q as their farthest neighbor. Recently, RFN queries have attracted increasing attention based on their applicability. Several studies have been conducted to efficiently evaluate RFN queries in Euclidean spaces [3,4,8,9,13] and road networks [5,7].
  • Approximate FN query [1,10,11,14]. Given an approximation ratio c ( c > 1 ) and success probability δ , a c-approximate FN query retrieves the c-approximate farthest neighbors with a confidence of at least δ . Approximate FN search algorithms are considered acceptable in high-dimensional spaces because it is typically not feasible to return the exact farthest neighbors in a large set of points. Huang et al. [10,14] developed a reverse-query-aware locality-sensitive hashing scheme for high-dimensional c-approximate FN searches over external memory. They also proposed a heuristic variant that applied data-dependent object selection to reduce the number of data objects. Liu et al. [11] proposed a c-approximate FN algorithm called reverse incremental locality-sensitive hashing for high-dimensional data that employs a continuous search strategy for each projection dimension.
  • Aggregate FN query [2,6]. Given a set of query points Q and an aggregate function (e.g., min, max, and sum), the aggregate FN query retrieves a facility f from a set of facilities F such that the aggregate distance from f to all query points in Q is maximized. Gao et al. [2] studied the aggregate FN query in Euclidean space and proposed the smallest-bounding and best-first algorithms. Wang et al. [6] presented effective solutions to aggregate FN queries in road networks.
  • Moving spatial query [15,16,17,18]. Various types of moving spatial queries have been studied extensively, including kNN [15,16,17] and range [18] queries. Nutanong et al. [17] developed an incremental safe region-based technique known as the V * -diagram to process moving kNN queries in Euclidean space and in undirected spatial networks. Yung et al. [18] proposed an algorithm for computing the boundaries, which are referred to as safe exits, of the safe regions of moving-range queries in road networks. The associated studies considered different problem scenarios from those in our study, and their solutions were found to be inappropriate for our problem scenarios.
Spatial access methods based on Euclidean distance cannot process MkFN queries in road networks because network distance evaluation is much more expensive than Euclidean distance evaluation. Solutions for the MkNN search [15,16,17] are not applicable to MkFN query settings because MkFN queries focus on the farthest neighbors, rather than the nearest neighbors. This is an extended version of a preliminary conference report presented at the KSCI Summer Conference 2021 [19]. The preliminary conference report [19] describes the key concepts of MOFA without empirical evidence. Therefore, in this study, MOFA was thoroughly analyzed and an empirical evaluation was performed. This study also differs from our previous studies [20,21] in several aspects. Cho [20] considered kFN join queries in a spatial network. The kFN join query focuses on evaluating a snapshot of the kFN query for each query point in Q. Cho and Attique [21] presented the group processing of multiple kFN (GMP) algorithms to efficiently process multiple kFN queries in road networks. The GMP algorithm exploits shared computation techniques to rapidly process snapshot kFN queries for multiple query points with distinct query conditions. Unlike our previous studies [20,21] on snapshot kFN queries, this study focuses on computing valid segments for continuous kFN queries of a moving query point.
Table 1 compares our problem scenario with those in previous studies to identify the differences between them.

3. Notation and Formal Problem Description

Definition 1.
kFN query [1,2,3,4,5,6,7,8]. Given a set of facilities F, positive integer k, and query point q, the query point q retrieves the set of k facilities farthest from q, which is denoted as Φ ( q ) .
Definition 2.
MkFN query. Given a set of facilities F, positive integer k, and moving query point q, the moving query point q constantly retrieves the set of k facilities farthest from q. We assume that q s q e ¯ is a query segment in which q moves. Then, the MkFN query result can be represented as Φ ( q s q e ¯ ) = { q , Φ ( q ) | q q s q e ¯ } .
Definition 3.
Road network and network distance [22,23,24,25,26]. A road network G is modeled as a weighted undirected graph G = V , E , W , where V is a set of road intersections, E is a set of road segments, and W represents the distance matrix. The network distance d ( q , f ) between q and f, where q and f are two points on G, is the sum of the lengths of the road segments along the shortest path between q and f. The terms “network distance” and “length of the shortest path” are used interchangeably.

4. Clustering Facilities and Computing Distances

Section 4.1 discusses grouping nearby facilities into clusters. Section 4.2 discusses calculating the largest and smallest distances from the border point of the query segment to a facility cluster.

4.1. Clustering Facilities into Facility Clusters

Figure 3 presents an example MkFN query q, where k = 2 and F = { f 1 , f 2 , , f 6 } . This example is used to elaborate the solution process. The example MkFN query requires that the moving query point q constantly retrieves the two facilities farthest from itself. The vertex list in which query point q moves is referred to as the query segment for q. In this example, v 1 v 2 ¯ is the query segment for q (Figure 3). For ease of identification, the query segment is shown in bold.
Figure 4 illustrates the segmentation of a road network. In this figure, the intersection vertices corresponding to road intersections are marked using dashed circles. The example road network contains six intersection vertices v 1 , v 2 , v 3 , v 4 , v 5 , and  f 5 . The degrees are represented by numbers in parentheses. In this study, a road network is split into vertex lists using intersection vertices. Therefore, facility segments adjacent to an intersection vertex are grouped into a facility cluster, as illustrated in Figure 5.
Figure 5 illustrates the clustering method for grouping facilities into facility clusters. The clustering method first groups facilities in a vertex list into a facility segment. Adjacent facility segments are then grouped into a facility cluster. First, the facilities f 1 , f 2 , and  f 3 in a vertex list v 3 f 2 v 5 ¯ are connected to form a facility segment f 1 f 2 f 3 ¯ . Similarly, the facilities f 4 and f 5 in the vertex list f 5 v 4 ¯ are connected to form a facility segment f 4 f 5 ¯ . Therefore, there are three facility segments f 1 f 2 f 3 ¯ , f 4 f 5 ¯ , and  f 6 (Figure 5a). Next, the two facility segments f 4 f 5 ¯ and f 6 are connected using the intersection vertex f 5 to form a facility cluster { f 4 f 5 ¯ , f 5 f 6 ¯ } . Therefore, a set of facilities F = { f 1 , f 2 , , f 6 } changes into a set of facility clusters F ¯ = { { f 1 f 2 f 3 ¯ } , { f 4 f 5 ¯ , f 5 f 6 ¯ } } . In the proposed method, facility segments constitute a facility cluster, which is represented by a set of facility segments.

4.2. Computing Distances between a Facility Cluster and a Border Point of the Query Segment

The largest and smallest distances between a facility cluster F C ¯ and a border point q b of the query segment q s q e ¯ are computed, where q b { q s , q e } . The smallest and largest distances between F C ¯ and q b are represented by d m i n ( q b , F C ¯ ) = m i n { d ( q b , f ) | f F C ¯ } and d m a x ( q b , F C ¯ ) = m a x { d ( q b , f ) | f F C ¯ } , respectively. The smallest distance between q b and F C ¯ is evaluated as d m i n ( q b , F C ¯ ) = m i n { d ( q b , f b ) | f b B ( F C ¯ ) } , where f b is a border point of F C ¯ . However, the largest distance between q b and F C ¯ is evaluated as d m a x ( q b , F C ¯ ) = m a x { d m a x ( q b , f l f m ¯ ) | f l f m ¯ F C ¯ } , where f l f m ¯ is a facility segment in F C ¯ , and  d m a x ( q b , f l f m ¯ ) is the largest distance between q b and f l f m ¯ .
The largest and smallest distances between a facility cluster F C ¯ and a border point q b of the query segment are computed using the example in Figure 5, where q b { v 1 , v 2 } and F ¯ = { { f 1 f 2 f 3 ¯ } , { f 4 f 5 ¯ , f 5 f 6 ¯ } } . Figure 6, Figure 7, Figure 8 and Figure 9 illustrate the computations of d m a x ( v 1 , { f 1 f 2 f 3 ¯ } ) , d m a x ( v 1 , { f 4 f 5 ¯ , f 5 f 6 ¯ } ) , d m a x ( v 2 , { f 1 f 2 f 3 ¯ } ) , and  d m a x ( v 2 , { f 4 f 5 ¯ , f 5 f 6 ¯ } ) , respectively.
Figure 6 depicts the computation of d m a x ( v 1 , f 1 f 2 f 3 ¯ ) . The distances from v 1 to endpoints f 1 and f 3 of f 1 f 2 f 3 ¯ are d ( v 1 , f 1 ) = 21 and d ( v 1 , f 3 ) = 21 , respectively, because the path from v 1 to f 1 ( f 3 ) is v 1 v 3 f 1 ( v 1 v 2 v 4 v 5 f 3 ). Imagine a point f in f 1 f 2 f 3 ¯ . The distance from v 1 to f is then evaluated to d ( v 1 , f ) = m i n { d ( v 1 , f 1 ) + l e n ( f 1 f ¯ ) , d ( v 1 , f 3 ) + l e n ( f 3 f ¯ ) } = m i n { 21 + l e n ( f 1 f ¯ ) , 21 + l e n ( f 3 f ¯ ) } because the path from v 1 to f should be v 1 f 1 f or v 1 f 3 f . Let x = l e n ( f 1 f ¯ ) . Accordingly, l e n ( f 3 f ¯ ) = 5 x because l e n ( f 1 f ¯ ) + l e n ( f 3 f ¯ ) = 5 . The distance from v 1 to f can be represented as d ( v 1 , f ) = m i n 21 + x , 21 + ( 5 x ) for 0 x 5 . As shown in Figure 6, the largest and smallest distances from v 1 to f 1 f 2 f 3 ¯ are evaluated as d m a x ( v 1 , f 1 f 2 f 3 ¯ ) = 23.5 and d m i n ( v 1 , f 1 f 2 f 3 ¯ ) = 21 , respectively. The star sign (★) in Figure 6 is used to signify d m a x ( v 1 , f 1 f 2 f 3 ¯ ) = 23.5 .
Figure 7 illustrates the d m a x ( v 1 , { f 4 f 5 ¯ , f 5 f 6 ¯ } ) computation. Naturally, the largest distance between v 1 and { f 4 f 5 ¯ , f 5 f 6 ¯ } is evaluated as d m a x ( v 1 , { f 4 f 5 ¯ , f 5 f 6 ¯ } )   = m a x { d m a x ( v 1 , f 4 f 5 ¯ ) ,   d m a x ( v 1 , f 5 f 6 ¯ ) } . Figure 7a,b present the d m a x ( v 1 , f 4 f 5 ¯ ) and d m a x ( v 1 , f 5 f 6 ¯ ) computations, respectively. The distance from v 1 to f 4 ( f 5 ) is d ( v 1 , f 4 ) = 12 ( d ( v 1 , f 5 ) = 8 ) because the shortest path from v 1 to f 4 ( f 5 ) is v 1 v 2 f 5 f 4 ( v 1 v 2 f 5 ). Imagine a point f in f 4 f 5 ¯ . The distance from v 1 to f is computed as d ( v 1 , f ) = m i n { d ( v 1 , f 4 ) + l e n ( f 4 f ¯ ) , d ( v 1 , f 5 ) + l e n ( f 5 f ¯ ) }   = m i n { 12 + l e n ( f 4 f ¯ ) , 8 + l e n ( f 5 f ¯ ) } ; therefore, the largest and smallest distances from v 1 to f 4 f 5 ¯ are calculated as d m a x ( v 1 , f 4 f 5 ¯ ) = 12 and d m i n ( v 1 , f 4 f 5 ¯ ) = 8 , respectively (Figure 7a). The same method in Figure 6 can be used to compute the largest and smallest distances from v 1 to f 5 f 6 ¯ (Figure 7b). The detailed procedure for the largest and smallest distance computation from v 1 to f 5 f 6 ¯ is omitted for simplicity. The shortest path from v 1 to f 5 ( f 6 ) is v 1 v 2 f 5 ( v 1 v 2 f 5 f 6 ), and the distance from v 1 to f 5 ( f 6 ) is d ( v 1 , f 5 ) = 8 ( d ( v 1 , f 6 ) = 11 ). Therefore, the largest and smallest distances between v 1 and { f 4 f 5 ¯ , f 5 f 6 ¯ } are computed as d m a x ( v 1 , { f 4 f 5 ¯ , f 5 f 6 ¯ } ) = 12 and d m i n ( v 1 , { f 4 f 5 ¯ , f 5 f 6 ¯ } ) = 8 , respectively.
Figure 8 demonstrates the d m a x ( v 2 , f 1 f 2 f 3 ¯ ) computation. Note that the shortest path from v 2 to f 1 ( f 3 ) is v 2 v 4 v 3 f 1 ( v 2 v 4 v 5 f 3 ), and the distance from v 2 to f 1 ( f 3 ) is d ( v 2 , f 1 ) = 17 ( d ( v 2 , f 3 ) = 16 ). The same method in Figure 6 can be used to compute the largest and smallest distances from v 2 to f 1 f 2 f 3 ¯ (Figure 8). The detailed procedure for computing the largest and smallest distances from v 2 to f 1 f 2 f 3 ¯ is omitted for simplicity. The largest and smallest distances between v 2 and f 1 f 2 f 3 ¯ are d m a x ( v 2 , f 1 f 2 f 3 ¯ ) = 19 and d m i n ( v 2 , f 1 f 2 f 3 ¯ ) = 16 , respectively. The star sign (★) in Figure 8 is used to signify d m a x ( v 2 , f 1 f 2 f 3 ¯ ) = 19 .
Figure 9 presents the d m a x ( v 2 , { f 4 f 5 ¯ , f 5 f 6 ¯ } ) computation. The largest distance between v 2 and { f 4 f 5 ¯ , f 5 f 6 ¯ } is evaluated as d m a x ( v 2 , { f 4 f 5 ¯ , f 5 f 6 ¯ } )   = m a x { d m a x ( v 2 , f 4 f 5 ¯ ) , d m a x ( v 2 , f 5 f 6 ¯ ) } . Figure 9a,b depict the d m a x ( v 2 , f 4 f 5 ¯ ) and d m a x ( v 2 , f 5 f 6 ¯ ) computations, respectively. The distance from v 2 to f 4 ( f 5 ) is d ( v 2 , f 4 ) = 7 ( d ( v 2 , f 5 ) = 3 ) because the shortest path from v 2 to f 4 ( f 5 ) is v 2 f 5 f 4 ( v 2 f 5 ). The same method in Figure 6 can be used to compute the largest and smallest distances from v 2 to f 4 f 5 ¯ (Figure 9a). Thus, the largest and smallest distances from v 2 to f 4 f 5 ¯ are d m a x ( v 2 , f 4 f 5 ¯ ) = 7 and d m i n ( v 2 , f 4 f 5 ¯ ) = 3 , respectively. The detailed procedure for computing the largest and smallest distances from v 2 to f 4 f 5 ¯ is omitted for simplicity.
The distance from v 2 to f 5 ( f 6 ) is d ( v 2 , f 5 ) = 3 ( d ( v 2 , f 6 ) = 6 ) because the shortest path from v 2 to f 5 ( f 6 ) is v 2 f 5 ( v 2 f 5 f 6 ). The same method in Figure 6 can be used to compute the largest and smallest distances from v 2 to f 5 f 6 ¯ (Figure 9b). Thus, the largest and smallest distances from v 2 to f 5 f 6 ¯ are d m a x ( v 2 , f 5 f 6 ¯ ) = 6 and d m i n ( v 2 , f 5 f 6 ¯ ) = 3 , respectively. The detailed procedure for computing the largest and smallest distances from v 2 to f 5 f 6 ¯ is also omitted for simplicity. Therefore, the largest and smallest distances between v 2 and { f 4 f 5 ¯ , f 5 f 6 ¯ } are d m a x ( v 2 , { f 4 f 5 ¯ , f 5 f 6 ¯ } ) = 7 and d m i n ( v 2 , { f 4 f 5 ¯ , f 5 f 6 ¯ } ) = 3 , respectively.

5. MOFA Algorithm for MkFN Query Processing in Road Networks

Algorithm 1 presents the MOFA algorithm, which has three steps. The first step groups facilities into facility clusters using the clustering method described in Section 4.1; therefore, a set F of facilities changes to a set F ¯ of facility clusters. The second step retrieves the candidate facilities for a query segment q s q e ¯ , which are retrieved from border points q s and q e . To this end, the  f i n d _ c a n d i d a t e s function is called from q s ( q e ), whose result is stored to Σ ( q s ) ( Σ ( q e ) ). In the third step, the valid segments for q s q e ¯ are computed using the candidate facilities in Σ ( q s ) Σ ( q e ) . Note that Φ ( q s q e ¯ ) includes valid segments for q s q e ¯ and the k facilities farthest from them.
Algorithm 1: MOFA ( k , q s q e ¯ , F ) .
Input: k: number of FNs requested for q, q s q e ¯ : query segment, F: set of facilities
Output:  Φ ( q s q e ¯ ) : query result for q s q e ¯ , i.e.,  Φ ( q s q e ¯ ) = { q , Φ ( q ) | q q s q e ¯ }
1:
// Step 1: Facilities are grouped into facility clusters, which is explained in Section 4.1.
2:
F ¯ c l u s t e r _ f a c i l i t i e s ( F )
3:
// Step 2: Candidate facilities for q s q e ¯ are retrieved by border points, which is detailed in Algorithm 2.
4:
Σ ( q s ) f i n d _ c a n d i d a t e s ( k , q s , l e n ( q s q e ¯ ) , F ¯ )        //Candidate facilities for q s q e ¯ are retrieved by q s .
5:
Σ ( q e ) f i n d _ c a n d i d a t e s ( k , q e , l e n ( q s q e ¯ ) , F ¯ )        //Candidate facilities for q s q e ¯ are retrieved by q e .
6:
// Step 3: valid segments for q s q e ¯ are evaluated using the candidate facilities in Σ ( q s ) Σ ( q e ) , which is detailed in Algorithm 3.
7:
Φ ( q s q e ¯ ) c o m p u t e _ v a l i d _ s e g m e n t s ( k , q s q e ¯ , Σ ( q s ) Σ ( q e ) )
8:
return Φ ( q s q e ¯ )     // Φ ( q s q e ¯ ) is a set of valid segments, each of which has a set of k facilities for the valid segment.
Algorithm 2 fetches a set of candidate facilities for the query segment q s q e ¯ . The set of candidate facilities for q s q e ¯ , Σ ( q b ) , is initially set to the empty set (Line 1). The candidate distance is initially set to d c a n d ( q b ) = 0 and used to determine whether or not f is a candidate facility for q s q e ¯ . The largest distance from q b to each facility cluster in F ¯ is computed and elaborated in Section 4.2. We then arrange the facility clusters in a descending order based on their largest distance to q b . The arranged facility clusters are investigated one by one. The remaining facility clusters to be examined do not need to be accessed if d m a x ( q b , F C ¯ ) < d c a n d ( q b ) , that is, the largest distance from q b to the next facility cluster F C ¯ is smaller than the candidate distance. This is because the remaining facilities cannot be candidate facilities for q s q e ¯ . Otherwise (i.e., d m a x ( q b , F C ¯ ) d c a n d ( q b ) ), each facility f in F C ¯ must be investigated to determine whether or not f is a candidate facility for q s q e ¯ . For this, d ( q b , f ) should be computed. If  q b is enclosed by F C ¯ , the distance from q b to f is calculated using a graph traversal algorithm such as the A* search algorithm [27]; otherwise (i.e., unless  q b is enclosed by F C ¯ ), the distance is evaluated as d ( q b , f ) m i n { d ( q b , f b ) + d ( f b , f ) | f b B ( F C ¯ ) } because a border point f b of F C ¯ must be in the path from q b to f, i.e.,  q b f b f . Accordingly, d ( q b , f ) d c a n d ( q b ) . Unnecessary facilities f should be removed from Σ ( q b ) ; thus, each facility f in Σ ( q b ) is examined to verify that f is a candidate facility for q s q e ¯ . f is removed from Σ ( q b ) if it does not satisfy the qualification of a candidate facility. Finally, the set of candidate facilities for q s q e ¯ , Σ ( q b ) is returned either if all of the facility clusters are investigated or if d c a n d ( q b ) > d m a x ( q b , F C ¯ ) (Line 11 and 12), i.e., the candidate distance is larger than the largest distance from q b to the facility cluster F C ¯ .
Algorithm 2: f i n d _ c a n d i d a t e s ( k , q b , l e n ( q s q e ¯ ) , F ¯ ) .
Input: k: number of FNs requested for q, l e n ( q s q e ¯ ) : length of q s q e ¯ , q b : border point of q s q e ¯ , F ¯ : set of facility clusters
Output:  Σ ( q b ) : set of candidate facilities for q s q e ¯ , which are obtained from q b
1:
Σ ( q b )                        //The set of candidate facilities for q s q e ¯ is initially set to the empty set.
2:
d c a n d ( q b ) 0                        // d c a n d ( q b ) determines whether f is a candidate facility for q s q e ¯ or not.
3:
// Section 4.2 elaborates the calculation of the largest distances between q b and facility clusters in F ¯ .
4:
for each facility cluster F C ¯ F ¯  do
5:
   compute d m a x ( q b , F C ¯ )
6:
// The facility clusters F C ¯ are arranged for q b in a decreasing order based on d m a x ( q b , F C ¯ ) .
7:
F ¯ a r r a n g e _ f a c i l i t y _ c l u s t e r s ( F ¯ ) F ¯                    //keeps the ordered facility clusters for q b .
8:
// Facility clusters are examined consecutively.
9:
for each ordered facility cluster F C ¯ F ¯  do
10:
   // Note that d c a n d ( q b ) is updated in Line 23.
11:
   if  d c a n d ( q b ) > d m a x ( q b , F C ¯ )  then
12:
     go to line 24       //The facilities in F C ¯ cannot be candidate facilities for q s q e ¯ .
13:
   // Each facility f in F C ¯ is accessed to retrieve candidate facilities for q s q e ¯ .
14:
   for each facility f F C ¯  do
15:
     // If q b is inside F C ¯ , then d ( q b , f ) is calculated by a graph search algorithm.
16:
     if  q b F C ¯  then
17:
         d ( q b , f ) is calculated by a graph traversal algorithm such as [27]
18:
     else
19:
         d ( q b , f ) m i n { d ( q b , f b ) + d ( f b , f ) | f b B ( F C ¯ ) }          //Note that the path from q b to f is q b f b f .
20:
     // If d ( q b , f ) d c a n d ( q b ) , then f should be included in Σ ( q b ) .
21:
     if  d ( q b , f ) d c a n d ( q b )  then
22:
         Σ ( q b ) Σ ( q b ) { f }                           // Σ ( q b ) collects candidate facilities for q s q e ¯ .
23:
    d c a n d ( q b ) d ( q b , f k t h ) l e n ( q s q e ¯ )                          // f k t h is the current kth FN of q b .
24:
// Unnecessary facilities are eliminated from Σ ( q b ) .
25:
for each facility f Σ ( q b )  do
26:
   // If d ( q b , f ) < d c a n d ( q b ) , then f is no longer a candidate facility for q s q e ¯ .
27:
   if  d ( q b , f ) < d c a n d ( q b )  then
28:
      Σ ( q b ) Σ ( q b ) { f }                                   //f is removed from Σ ( q b ) .
29:
return Σ ( q b )                            //The set of candidate facilities for q s q e ¯ , Σ ( q b ) , is returned.
Algorithm 3 computes the valid segments for q s q e ¯ by using candidate facilities in Σ ( q s ) Σ ( q e ) . The computation of the valid segments for the example MkFN query is presented in detail in Section 6.2. First, Φ ( q s q e ¯ ) is initially set to the empty set. While q moves along q s q e ¯ , the distance from q to each candidate facility f in Σ ( q s ) Σ ( q e ) is calculated, i.e., { ( q , d ( q , f ) ) | q q s q e ¯ , f Σ ( q s ) Σ ( q e ) } ). Subsequently, ( q , d ( q , f ) ) is plotted in the two-dimensional space. For each query point q in q s q e ¯ , the kth FN f k t h and its distance to q are identified among the candidate facilities in Σ ( q s ) Σ ( q e ) as follows: { ( q , d ( q , f k t h ) ) | q q s q e ¯ , f k t h Σ ( q s ) Σ ( q e ) } . The valid segments in q s q e ¯ are computed while q moves along q s q e ¯ . Each valid segment has the same k facilities farthest from the valid segment. Specifically, for each q i and q j in the same valid segment q l q m ¯ , both q i and q j have the same k facilities farthest from them, that is, q i , q j q l q m ¯ , Φ ( q i ) = Φ ( q j ) . Finally, the set of valid segments for q s q e ¯ , Φ ( q s q e ¯ ) is returned.
Algorithm 3: c o m p u t e _ v a l i d _ s e g m e n t s ( k , q s q e ¯ , Σ ( q s ) Σ ( q e ) ) .
Input: k: number of FNs requested for q, q s q e ¯ : query segment, Σ ( q s ) Σ ( q e ) : set of candidate facilities for q s q e ¯
Output:  Φ ( q s q e ¯ ) : set of valid segments for q s q e ¯
1:
Φ ( q s q e ¯ )                         // Φ ( q s q e ¯ ) is initially set to the empty set.
2:
for each candidate facility f Σ ( q s ) Σ ( q e )  do
3:
   evaluate d ( q , f ) while q moves along q s q e ¯ , i.e.,  { ( q , d ( q , f ) ) | q q s q e ¯ , f Σ ( q s ) Σ ( q e ) }
4:
   plot ( q , d ( q , f ) ) into the two-dimensional space
5:
for each query point q q s q e ¯  do
6:
   identify the kth FN f k t h while q moves along q s q e ¯ , i.e.,  { ( q , d ( q , f k t h ) ) | q q s q e ¯ , f k t h Σ ( q s ) Σ ( q e ) }
7:
   compute k facilities farthest from q while q moves along q s q e ¯ , i.e.,  Φ ( q ) = { f | d ( q , f ) d ( q , f k t h ) , f Σ ( q s ) Σ ( q e ) }
8:
   identify and add valid segment to the query result, i.e.,  Φ ( q s q e ¯ ) Φ ( q s q e ¯ ) { q l q m ¯ , Φ ( q l ) }
9:
return Φ ( q s q e ¯ )                 //The set of valid segments for q s q e ¯ , Φ ( q s q e ¯ ) , is returned.

6. Evaluation of the Example MkFN Query Using MOFA

In Section 6.1, the candidate facilities for the query segment v 1 v 2 ¯ is found in the example MkFN query. In Section 6.2, the valid segments for the query segment v 1 v 2 ¯ are computed.

6.1. Finding the Candidate Facilities for the Query Segment v 1 v 2 ¯

Table 2 summarizes the computation of the candidate facilities at border points v 1 and v 2 of the query segment v 1 v 2 ¯ and includes the largest distances between the border points and the facility clusters in F ¯ , candidate distances, and sets of candidate facilities at the border points. Recall that the kFN queries are issued only at the border points of the query segment, in which the query point q stays to find the candidate facilities for the query segment. Thus, for the example MkFN query, MOFA evaluates the kFN queries at border points v 1 and v 2 to find the candidate facilities for v 1 v 2 ¯ . First, the kFN query is evaluated at v 1 . The largest distances between v 1 and the facility clusters in F ¯ are calculated. Subsequently, the facility clusters F C ¯ are arranged in a descending order based on d m a x ( v 1 , F C ¯ ) . Figure 10 depicts that the facility clusters { f 1 f 2 f 3 ¯ } and { f 4 f 5 ¯ , f 5 f 6 ¯ } are sorted using their largest distance to v 1 as follows: F ¯ = { { f 1 f 2 f 3 ¯ } , { f 4 f 5 ¯ , f 5 f 6 ¯ } } . { f 1 f 2 f 3 ¯ } is investigated, followed by { f 4 f 5 ¯ , f 5 f 6 ¯ } . After exploring { f 1 f 2 f 3 ¯ } , v 1 chooses f 1 , f 2 , and f 3 as the candidate facilities for v 1 v 2 ¯ because the distance from v 1 to the second FN ( f 1 or f 3 ) is 21, and the candidate distance for v 1 is d c a n d ( v 1 ) = 16 . The distances from v 1 to f 1 , f 2 , and f 3 are d ( v 1 , f 1 ) = 21 , d ( v 1 , f 2 ) = 22 , and d ( v 1 , f 3 ) = 2 1, respectively (Figure 6). The other facility cluster { f 4 f 5 ¯ , f 5 f 6 ¯ } does not need be explored because d c a n d ( v 1 ) = 16 is larger than d m a x ( v 1 , { f 4 f 5 ¯ , f 5 f 6 ¯ } ) = 12 (Figure 10). Finally, a set of candidate facilities at v 1 is evaluated as Σ ( v 1 ) = { f 1 , f 2 , f 3 } .
In the same manner, the kFN query is evaluated at v 2 to find the candidate facilities for the query segment v 1 v 2 ¯ . The largest distances between v 2 and the facility clusters in F ¯ are calculated. The facility clusters F C ¯ are then arranged in a descending order based on d m a x ( v 2 , F C ¯ ) . Figure 11 shows that the facility clusters { f 1 f 2 f 3 ¯ } and { f 4 f 5 ¯ , f 5 f 6 ¯ } are sorted using their largest distance to v 2 as follows: F ¯ = { { f 1 f 2 f 3 ¯ } , { f 4 f 5 ¯ , f 5 f 6 ¯ } } . { f 1 f 2 f 3 ¯ } is investigated, followed by { f 4 f 5 ¯ , f 5 f 6 ¯ } . After exploring { f 1 f 2 f 3 ¯ } , v 2 chooses f 1 , f 2 , and f 3 as the candidate facilities for the query segment v 1 v 2 ¯ because the distance from v 2 to the second FN f 1 is 17, and the candidate distance for v 2 is d c a n d ( v 2 ) = 12 . The distances from v 2 to f 1 , f 2 , and f 3 are d ( v 2 , f 1 ) = 17 , d ( v 2 , f 2 ) = 18 , and d ( v 2 , f 3 ) = 16 , respectively (Figure 8). The other facility cluster { f 4 f 5 ¯ , f 5 f 6 ¯ } does not have to be explored because d c a n d ( v 2 ) = 12 is larger than d m a x ( v 2 , { f 4 f 5 ¯ , f 5 f 6 ¯ } ) = 7 (Figure 11). Finally, a set of candidate facilities at v 2 is evaluated as Σ ( v 2 ) = { f 1 , f 2 , f 3 } .

6.2. Computing the Valid Segments for the Query Segment v 1 v 2 ¯

Figure 12 shows the changes in the distance from each candidate facility f to a query point q in v 1 v 2 ¯ , where f { f 1 , f 2 , f 3 } . The distance from f 1 to v 1 ( v 2 ) is d ( f 1 , v 1 ) = 21 ( d ( f 1 , v 2 ) = 17 ). Figure 12a demonstrates the change in the distance from f 1 to q in v 1 v 2 ¯ . The shortest path from f 1 to q in v 1 v 2 ¯ is either f 1 v 1 q or f 1 v 2 q . The distance from f 1 to q is evaluated as d ( f 1 , q ) = { m i n ( d ( f 1 , v 1 ) + l e n ( v 1 q ¯ ) , d ( f 1 , v 2 ) + l e n ( v 2 q ¯ ) ) | q v 1 v 2 ¯ } = { m i n ( 21 + l e n ( v 1 q ¯ ) , 17 + l e n ( v 2 q ¯ ) ) | q v 1 v 2 ¯ } , where l e n ( v 1 q ¯ ) + l e n ( v 2 q ¯ ) = 5 . Similarly, the change in the distance from f 2 to q in v 1 v 2 ¯ can be drawn (Figure 12b), where d ( f 2 , v 1 ) = 22 and d ( f 2 , v 2 ) = 18 . In the same manner, the change in the distance from f 3 to q in v 1 v 2 ¯ can also be drawn (Figure 12c), where d ( f 3 , v 1 ) = 21 and d ( f 3 , v 2 ) = 16 .
Figure 13 plots d ( q , f 1 ) , d ( q , f 2 ) , and d ( q , f 3 ) together, which are illustrated in Figure 12a–c, respectively, to compute the valid segments in v 1 v 2 ¯ . Recall that the query points in the valid segment have the same k FNs. The example MkFN query requires two facilities farthest from the query point q in v 1 v 2 ¯ ; hence, the second FN must be identified from each query point q. Figure 13 shows that facility f 1 is the second FN for the entire query segment v 1 v 2 ¯ , and facility f 2 is farther from the query point q than the second FN f 1 . Therefore, a valid segment can be found in v 1 v 2 ¯ , and the query result is Φ ( v 1 v 2 ¯ ) = { v 1 v 2 ¯ , f 1 , f 2 } .

7. Empirical Evaluation

Section 7.1 describes the empirical settings considered in this study. Section 7.2 presents the experimental results. In this section, we empirically evaluate the proposed MOFA and its conventional solution under various circumstances.

7.1. Empirical Settings

Table 3 describes the three real-world road networks [28] considered in our empirical evaluation. These road networks are part of the road network in the United States and vary in size. Ten query points were considered to measure query execution time. The query points regularly evaluate kFN queries, and each query point moves within a query segment. A data space can typically be considered as a unit square with its upper-left corner at the coordinate (0,0) and its lower-right corner at (1,1). Facilities were generated to simulate highly skewed point of interest distributions. First, the centroids c 1 , c 2 , , c m are randomly populated within the data space, where m ( 1 m 10 ) denotes the total number of centroids. The facilities around each centroid exhibit a Gaussian distribution with the mean indicating the centroid and the standard deviation set to σ = 10 2 . Table 4 lists the empirical parameter settings. Each of these parameters was determined through a series of experiments in which a single parameter was varied while the other parameters remained constant at the bolded default values.
A conventional algorithm regularly evaluates kFN queries for the moving query point q. This method was considered as a benchmark to evaluate MOFA’s performance. All algorithms were implemented using C++ in the Microsoft Visual Studio development environment. All common subroutines of the algorithms were reused for similar tasks. For this empirical study, it was assumed that all indexing structures of the algorithms were stored in the main memory to rapidly process the MkFN queries. This assumption has often been used in other studies [22,29] on online LBSs. Repeated evaluations were performed to compute the average time required to answer MkFN queries. The TNR method [30] was employed to quickly calculate the network distance between two points during query processing. The empirical study was executed on a computer running the Windows 11 operating system equipped with an 8-core processor (i9-9900) running at 3.1 GHz with 32 GB of RAM.

7.2. Empirical Results

Figure 14 compares the proposed MOFA and conventional algorithm on the SJ road network. Each chart presents the MkFN execution time and number of kFN queries required to answer the MkFN query. The numbers in parentheses in Figure 14, Figure 15 and Figure 16 refer to the number of kFN queries required by MOFA and the conventional algorithm for answering the MkFN query. MOFA requires only two kFN queries to be evaluated to compute the valid segments for the query segment. However, the conventional algorithm requires kFN queries to be regularly evaluated to refresh the query results as the query point moves. In other words, the conventional algorithm evaluates a number of kFN queries linearly proportional to the query frequency, whereas MOFA evaluates only two kFN queries, regardless of the query frequency, as the query point moves within a query segment. Figure 14a presents the query execution times of MOFA and the conventional algorithm when the number of facilities varies from 1000 to 5000 (i.e., 10 3 | F | 5 × 10 3 ). In all cases of | F | , MOFA outperforms the conventional algorithm. For this empirical study, 10 query points were considered with each query point evaluating eight kFN queries while moving along its query segment. Therefore, the MOFA and conventional algorithms evaluated 20 and 80 kFN queries, respectively. Figure 14b presents the query execution times when the number of FNs required varies from 1 to 16 (i.e., 1 k 16 ). For all cases of k, MOFA is approximately four times faster than the conventional algorithm. The query execution times of MOFA and the conventional algorithms are stable, regardless of k. This is because kFN query evaluation sorts facility clusters based on their distances to the query point and processes the sorted facility clusters. Figure 14c presents the query execution times when the query frequency varies from 2 to 20 (i.e., 2 Q F 20 ). The query execution time of MOFA is stable and independent of the query frequency, whereas that of the conventional algorithm increases with the query frequency. Figure 14d presents the query execution times when the number of centroids for the facilities in F varies from 1 to 10 (i.e., 1 C 10 ). The kFN query execution time tends to increase with the | C | value. This is because the facilities become more widely distributed as the | C | value increases, resulting in an increase in query execution time.
Figure 15 compares the performance of MOFA and the conventional algorithm on the NA road network. The empirical results obtained using the NA road network exhibit performance patterns similar to those obtained using the SJ road network. Figure 15a presents the query execution times for 10 3 | F | 5 × 10 3 . MOFA is four times faster than the conventional algorithm. Figure 15b presents the query execution times for 1 k 16 . Again, MOFA is four times faster than the conventional algorithm. The query execution times are stable and independent of the k value. Figure 15c presents the query execution times for 2 Q F 20 . MOFA is 1.0, 2.0, 4.2, 5.2, and 10.3 times faster than the conventional algorithm when Q F = 2 , 4 , 8 , 10 , and 20, respectively. Figure 15d presents the query execution times for 1 | C | 10 . MOFA is up to four times faster than the conventional algorithm.
Figure 16 presents the performance of MOFA and the conventional algorithm on the SF road network. Figure 16a presents the query execution times for 10 3 | F | 5 × 10 3 , indicating that MOFA outperforms the conventional algorithm by up to four times when | F | = 5000 . Figure 16b presents the query execution times for 1 k 16 , indicating that MOFA outperforms the conventional algorithm by up to four times in terms of query execution time. The query execution times are stable and independent of the k value. Figure 16c presents the query execution times when 2 Q F 20 , indicating that MOFA is 1.0, 2.0, 4.2, 5.2, and 10.3 times faster than the conventional algorithm when Q F = 2 , 4 , 8 , 10 , and 20, respectively. Figure 16d presents the query execution times for 1 | C | 10 , indicating that MOFA is up to 4.2 times faster than the conventional algorithm when C = 10 . In summary, MOFA is faster than the conventional algorithm in all cases. In particular, the difference in performance between MOFA and the conventional algorithm increases with the query frequency. This confirms that MOFA benefits from the rapid retrieval of candidate facilities at the border points of the query segment and from the computation of valid segments for the query segment.

8. Conclusions

This study was motivated by the fact that moving query points such as pedestrians and vehicles, arbitrarily move within a road network. Therefore, existing solutions based on Euclidean distances cannot provide spatial queries for road network databases. This study proposed a moving farthest search algorithm called MOFA to compute valid segments for the query segment where a query point is located. MOFA performs an initial batch processing of MkFN queries in road networks to retrieve candidate facilities once and then computes the valid segments for the query segment. Empirical evaluation demonstrated that MOFA significantly outperformed the conventional algorithm and provided stable performance, regardless of the query frequency.

Funding

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

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Not applicable.

Acknowledgments

The author would like to thank the anonymous reviewers for their valuable comments and suggestions for improving the quality of the paper.

Conflicts of Interest

The author declares no conflict of interest.

Abbreviations

The following abbreviations are used in this manuscript:
NotationDefinition
kNumber of requested facilities farthest from q.
qMoving query point.
q s q e ¯ Query segment in which q moves.
f and FFacility and a set of facilities, respectively.
v i v i + 1 v j ¯ Vertex list, where v i and v j are either an intersection vertex or terminal vertex,
and the other vertices v i + 1 , , v j 1 are intermediate vertices with a degree of two.
f l f l + 1 f m ¯ Facility segment connecting facilities f l , f l + 1 , , f m in a vertex list (in short, f l f m ¯ ).
F C ¯ and F ¯ Facility cluster and set of facility clusters, respectively.
B ( F C ¯ ) Set of border points of F C ¯ .
f b Border point of F C ¯ .
q b Border point of q s q e ¯ , where q b { q s , q e } .
Σ ( q b ) Set of candidate facilities for q s q e ¯ obtained from q b { q s , q e } .
Φ ( q ) Set of k facilities farthest from a query point q.
Φ ( q s q e ¯ ) Set of k facilities farthest from each query location in q s q e ¯ , i.e.,
Φ ( q s q e ¯ ) = { q , Φ ( q ) | q q s q e ¯ } .
d ( q , f ) Network distance between two points q and f.
d m a x ( q b , F C ¯ ) Largest distance between q b and F C ¯ .
d m i n ( q b , F C ¯ ) Smallest distance between q b and F C ¯ .
l e n ( q 1 q 2 ¯ ) Segment length q 1 q 2 ¯ .

References

  1. Curtin, R.R.; Echauz, J.R.; Gardner, A.B. Exploiting the structure of furthest neighbor search for fast approximate results. Inf. Syst. 2019, 80, 124–135. [Google Scholar] [CrossRef]
  2. Gao, Y.; Shou, L.; Chen, K.; Chen, G. Aggregate farthest-neighbor queries over spatial data. In Proceedings of the International Conference on Database Systems for Advanced Applications, Hong Kong, China, 22–25 April 2011; pp. 149–163. [Google Scholar]
  3. Liu, J.; Chen, H.; Furuse, K.; Kitagawa, H. An efficient algorithm for arbitrary reverse furthest neighbor queries. In Proceedings of the Asia-Pacific Web Conference on Web Technologies and Applications, Kunming, China, 11–13 April 2012; pp. 60–72. [Google Scholar]
  4. Liu, W.; Yuan, Y. New ideas for FN/RFN queries based nearest Voronoi diagram. In Proceedings of the International Conference on Bio-Inspired Computing: Theories and Applications, Huangshan, China, 12–14 July 2013; pp. 917–927. [Google Scholar]
  5. Tran, Q.T.; Taniar, D.; Safar, M. Reverse k nearest neighbor and reverse farthest neighbor search on spatial networks. Trans. Large-Scale Data- Knowl.-Centered Syst. 2009, 1, 353–372. [Google Scholar]
  6. Wang, H.; Zheng, K.; Su, H.; Wang, J.; Sadiq, S.W.; Zhou, X. Efficient aggregate farthest neighbour query processing on road networks. In Proceedings of the Australasian Database Conference on Databases Theory and Applications, Brisbane, Australia, 14–16 July 2014; pp. 13–25. [Google Scholar]
  7. Xu, X.-J.; Bao, J.; Yao, B.; Zhou, J.; Tang, F.; Guo, M.; Xu, J. Reverse furthest neighbors query in road networks. J. Comput. Sci. Technol. 2017, 32, 155–167. [Google Scholar] [CrossRef]
  8. Yao, B.; Li, F.; Kumar, P. Reverse furthest neighbors in spatial databases. In Proceedings of the International Conference on Data Engineering, Shanghai, China, 29 March–2 April 2009; pp. 664–675. [Google Scholar]
  9. Liu, Y.; Gong, X.; Kong, D.; Hao, T.; Yan, X. A Voronoi-based group reverse k farthest neighbor query method in the obstacle space. IEEE Access 2020, 8, 50659–50673. [Google Scholar] [CrossRef]
  10. Huang, Q.; Feng, J.; Fang, Q.; Ng, W. Two efficient hashing schemes for high-dimensional furthest neighbor search. IEEE Trans. Knowl. Data Eng. 2017, 29, 2772–2785. [Google Scholar] [CrossRef]
  11. Liu, W.; Wang, H.; Zhang, Y.; Qin, L.; Zhang, W. I/O efficient algorithm for c-approximate furthest neighbor search in high dimensional space. In Proceedings of the International Conference on Database Systems for Advanced Applications, Jeju, Korea, 24–27 September 2020; pp. 221–236. [Google Scholar]
  12. Pagh, R.; Silvestri, F.; Sivertsen, J.; Skala, M. Approximate furthest neighbor in high dimensions. In Proceedings of the International Conference on Similarity Search and Applications, Glasgow, UK, 12–14 October 2015; pp. 3–14. [Google Scholar]
  13. Wang, S.; Cheema, M.A.; Lin, X.; Zhang, Y.; Liu, D. Efficiently computing reverse k furthest neighbors. In Proceedings of the International Conference on Data Engineering, Helsinki, Finland, 16–20 May 2016; pp. 1110–1121. [Google Scholar]
  14. Huang, Q.; Feng, J.; Fang, Q. Reverse query-aware locality-sensitive hashing for high-dimensional furthest neighbor search. In Proceedings of the International Conference on Data Engineering, San Diego, CA, USA, 19–22 April 2017; pp. 167–170. [Google Scholar]
  15. Aly, A.M.; Aref, W.G.; Ouzzani, M. Spatial queries with two kNN predicates. In Proceedings of the International Conference on Very Large Data Bases, Istanbul, Turkey, 27–31 August 2012; pp. 1100–1111. [Google Scholar]
  16. Gu, Y.; Yu, G.; Yu, X. An efficient method for k nearest neighbor searching in obstructed spatial databases. J. Inf. Sci. Eng. 2014, 30, 1569–1583. [Google Scholar]
  17. Nutanong, S.; Zhang, R.; Tanin, E.; Kulik, L. Analysis and evaluation of V*-kNN: An efficient algorithm for moving kNN queries. VLDB J. 2010, 19, 307–332. [Google Scholar] [CrossRef]
  18. Yung, D.; Yiu, M.L.; Lo, E. A safe-exit approach for efficient network-based moving range queries. Data Knowl. Eng. 2012, 72, 126–147. [Google Scholar] [CrossRef]
  19. Cho, H.-J. Batch processing algorithm for moving k-farthest neighbor queries in road networks. In Proceedings of the KSCI Summer Conference 2021, Jeju, Korea, 15–17 July 2021; pp. 223–224. [Google Scholar]
  20. Cho, H.-J. Cluster nested Loop k-farthest neighbor join algorithm for spatial networks. ISPRS Int. J. Geo-Inf. 2022, 11, 123. [Google Scholar] [CrossRef]
  21. Cho, H.-J.; Attique, M. Group processing of multiple k-farthest neighbor queries in road networks. IEEE Access 2020, 8, 110959–110973. [Google Scholar] [CrossRef]
  22. Abeywickrama, T.; Cheema, M.A.; Taniar, D. k-nearest neighbors on road networks: A journey in experimentation and in-memory implementation. In Proceedings of the International Conference on Very Large Data Bases, New Delhi, India, 5–9 September 2016; pp. 492–503. [Google Scholar]
  23. Lee, K.C.K.; Lee, W.-C.; Zheng, B.; Tian, Y. ROAD: A new spatial object search framework for road networks. IEEE Trans. Knowl. Data Eng. 2012, 24, 547–560. [Google Scholar] [CrossRef]
  24. Zhong, R.; Li, G.; Tan, K.-L.; Zhou, L.; Gong, Z. G-tree: An efficient and scalable index for spatial search on road networks. IEEE Trans. Knowl. Data Eng. 2015, 27, 2175–2189. [Google Scholar] [CrossRef]
  25. Zhang, M.; Li, L.; Hua, W.; Zhou, X. Efficient batch processing of shortest path queries in road networks. In Proceedings of the International Conference on Mobile Data Management, Hong Kong, China, 10–13 June 2019; pp. 100–105. [Google Scholar]
  26. Zhang, M.; Li, L.; Hua, W.; Zhou, X. Batch processing of shortest path queries in road networks. In Proceedings of the Australasian Database Conference on Databases Theory and Applications, Sydney, Australia, 29 January–1 February 2019; pp. 3–16. [Google Scholar]
  27. Zeng, W.; Church, R.L. Finding shortest paths on real road networks: The case for A*. Int. J. Geogr. Inf. Sci. 2009, 23, 531–543. [Google Scholar] [CrossRef]
  28. Real Datasets for Spatial Databases. Available online: https:/www.cs.utah.edu/~lifeifei/SpatialDataset.htm (accessed on 28 May 2022).
  29. Wu, L.; Xiao, X.; Deng, D.; Cong, G.; Zhu, A.D.; Zhou, S. Shortest path and distance queries on road networks: An experimental evaluation. In Proceedings of the International Conference on Very Large Data Bases, Istanbul, Turkey, 27–31 August 2012; pp. 406–417. [Google Scholar]
  30. Bast, H.; Funke, S.; Matijevic, D. Ultrafast shortest-path queries via transit nodes. In Proceedings of the International Workshop on Shortest Path Problem, Piscataway, NJ, USA, 13–14 November 2006; pp. 175–192. [Google Scholar]
Figure 1. Example of MkFN queries in a road network.
Figure 1. Example of MkFN queries in a road network.
Algorithms 15 00223 g001
Figure 2. Interaction between the moving query point q and location-based service (LBS) server while q moves along q s q e ¯ .
Figure 2. Interaction between the moving query point q and location-based service (LBS) server while q moves along q s q e ¯ .
Algorithms 15 00223 g002
Figure 3. Example of an MkFN query q in a road network.
Figure 3. Example of an MkFN query q in a road network.
Algorithms 15 00223 g003
Figure 4. Segmentation of an example road network using road intersections.
Figure 4. Segmentation of an example road network using road intersections.
Algorithms 15 00223 g004
Figure 5. Clustering method for grouping facilities into facility clusters: (a) grouping facilities into facility segments; (b) grouping facility segments into facility clusters.
Figure 5. Clustering method for grouping facilities into facility clusters: (a) grouping facilities into facility segments; (b) grouping facility segments into facility clusters.
Algorithms 15 00223 g005
Figure 6. d m a x ( v 1 , f 1 f 2 f 3 ¯ ) = 23.5 and d m i n ( v 1 , f 1 f 2 f 3 ¯ ) = 21 .
Figure 6. d m a x ( v 1 , f 1 f 2 f 3 ¯ ) = 23.5 and d m i n ( v 1 , f 1 f 2 f 3 ¯ ) = 21 .
Algorithms 15 00223 g006
Figure 7. d m a x ( v 1 , { f 4 f 5 ¯ , f 5 f 6 ¯ } ) = 12 and d m i n ( v 1 , { f 4 f 5 ¯ , f 5 f 6 ¯ } ) = 8 ; (a) d m a x ( v 1 , f 4 f 5 ¯ ) = 12 and d m i n ( v 1 , f 4 f 5 ¯ ) = 8 ; (b) d m a x ( v 1 , f 5 f 6 ¯ ) = 11 and d m i n ( v 1 , f 5 f 6 ¯ ) = 8 .
Figure 7. d m a x ( v 1 , { f 4 f 5 ¯ , f 5 f 6 ¯ } ) = 12 and d m i n ( v 1 , { f 4 f 5 ¯ , f 5 f 6 ¯ } ) = 8 ; (a) d m a x ( v 1 , f 4 f 5 ¯ ) = 12 and d m i n ( v 1 , f 4 f 5 ¯ ) = 8 ; (b) d m a x ( v 1 , f 5 f 6 ¯ ) = 11 and d m i n ( v 1 , f 5 f 6 ¯ ) = 8 .
Algorithms 15 00223 g007
Figure 8. d m a x ( v 2 , f 1 f 2 f 3 ¯ ) = 19 and d m i n ( v 2 , f 1 f 2 f 3 ¯ ) = 16 .
Figure 8. d m a x ( v 2 , f 1 f 2 f 3 ¯ ) = 19 and d m i n ( v 2 , f 1 f 2 f 3 ¯ ) = 16 .
Algorithms 15 00223 g008
Figure 9. d m a x ( v 2 , { f 4 f 5 ¯ , f 5 f 6 ¯ } ) = 7 and d m i n ( v 2 , { f 4 f 5 ¯ , f 5 f 6 ¯ } ) = 3 ; (a) d m a x ( v 2 , f 4 f 5 ¯ ) = 7 and d m i n ( v 2 , f 4 f 5 ¯ ) = 3 ; (b) d m a x ( v 2 , f 5 f 6 ¯ ) = 6 and d m i n ( v 2 , f 5 f 6 ¯ ) = 3 .
Figure 9. d m a x ( v 2 , { f 4 f 5 ¯ , f 5 f 6 ¯ } ) = 7 and d m i n ( v 2 , { f 4 f 5 ¯ , f 5 f 6 ¯ } ) = 3 ; (a) d m a x ( v 2 , f 4 f 5 ¯ ) = 7 and d m i n ( v 2 , f 4 f 5 ¯ ) = 3 ; (b) d m a x ( v 2 , f 5 f 6 ¯ ) = 6 and d m i n ( v 2 , f 5 f 6 ¯ ) = 3 .
Algorithms 15 00223 g009
Figure 10. Arrangement of the facility clusters based on their largest distance to v 1 .
Figure 10. Arrangement of the facility clusters based on their largest distance to v 1 .
Algorithms 15 00223 g010
Figure 11. Arrangement of the facility clusters based on their largest distance to v 2 .
Figure 11. Arrangement of the facility clusters based on their largest distance to v 2 .
Algorithms 15 00223 g011
Figure 12. Changes in the distance from each candidate facility f to a query point q in v 1 v 2 ¯ : (a) change of d ( q , f 1 ) for q v 1 v 2 ¯ ; (b) change of d ( q , f 2 ) for q v 1 v 2 ¯ ; (c) change of d ( q , f 3 ) for q v 1 v 2 ¯ .
Figure 12. Changes in the distance from each candidate facility f to a query point q in v 1 v 2 ¯ : (a) change of d ( q , f 1 ) for q v 1 v 2 ¯ ; (b) change of d ( q , f 2 ) for q v 1 v 2 ¯ ; (c) change of d ( q , f 3 ) for q v 1 v 2 ¯ .
Algorithms 15 00223 g012
Figure 13. Plot of d ( q , f 1 ) , d ( q , f 2 ) , and d ( q , f 3 ) for q v 1 v 2 ¯ .
Figure 13. Plot of d ( q , f 1 ) , d ( q , f 2 ) , and d ( q , f 3 ) for q v 1 v 2 ¯ .
Algorithms 15 00223 g013
Figure 14. Performance comparisons between MOFA and the conventional algorithm on the SJ road network: (a) 10 3 | F | 5 × 10 3 ; (b) 1 k 16 ; (c) 2 Q F 20 ; (d) 1 C 10 .
Figure 14. Performance comparisons between MOFA and the conventional algorithm on the SJ road network: (a) 10 3 | F | 5 × 10 3 ; (b) 1 k 16 ; (c) 2 Q F 20 ; (d) 1 C 10 .
Algorithms 15 00223 g014
Figure 15. Performance comparisons between MOFA and the conventional algorithm on the NA road network: (a) 10 3 | F | 5 × 10 3 ; (b) 1 k 16 ; (c) 2 Q F 20 ; (d) 1 C 10 .
Figure 15. Performance comparisons between MOFA and the conventional algorithm on the NA road network: (a) 10 3 | F | 5 × 10 3 ; (b) 1 k 16 ; (c) 2 Q F 20 ; (d) 1 C 10 .
Algorithms 15 00223 g015
Figure 16. Performance comparisons between MOFA and the conventional algorithm on the SF road network: (a) 10 3 | F | 5 × 10 3 ; (b) 1 k 16 ; (c) 2 Q F 20 ; (d) 1 C 10 .
Figure 16. Performance comparisons between MOFA and the conventional algorithm on the SF road network: (a) 10 3 | F | 5 × 10 3 ; (b) 1 k 16 ; (c) 2 Q F 20 ; (d) 1 C 10 .
Algorithms 15 00223 g016
Table 1. Comparison between our problem scenario and those of previous studies.
Table 1. Comparison between our problem scenario and those of previous studies.
ReferencesSpace DomainQuery Type
[3,4,8,9,13]Euclidean spaceReverse FN query
[1,4,10,11,12,14]Euclidean spaceFN query
[2]Euclidean spaceAggregate FN query
[5,7]Road networkReverse FN query
[6]Road networkAggregate FN query
[20]Road networkFN join query
[21]Road networkMultiple FN query
This studyRoad networkMoving FN query
Table 2. Summary of the computation of the candidate facilities for v 1 v 2 ¯ .
Table 2. Summary of the computation of the candidate facilities for v 1 v 2 ¯ .
q b { f 1 f 2 f 3 ¯ } { f 4 f 5 ¯ , f 5 f 6 ¯ } d cand ( q b ) Σ ( q b )
v 1 d m a x ( v 1 , { f 1 f 2 f 3 ¯ } ) = 23.5 d m a x ( v 1 , { f 4 f 5 ¯ , f 5 f 6 ¯ } ) = 12 d c a n d ( v 1 ) = 16 Σ ( v 1 ) = { f 1 , f 2 , f 3 }
v 2 d m a x ( v 2 , { f 1 f 2 f 3 ¯ } ) = 19 d m a x ( v 2 , { f 4 f 5 ¯ , f 5 f 6 ¯ } ) = 7 d c a n d ( v 2 ) = 12 Σ ( v 2 ) = { f 1 , f 2 , f 3 }
Table 3. Real road networks.
Table 3. Real road networks.
Road NetworkDescriptionVerticesEdgesVertex lists
SJCity streets in San Joaquin, California18,26323,87420,040
NAHighways in North America175,813179,17912,416
SFCity streets in San Francisco, California174,956223,001192,276
Table 4. Empirical settings.
Table 4. Empirical settings.
ParameterRange
Number of query points ( | Q | )10
Number of facilities ( | F | )1, 2, 3, 4, 5 ( × 10 3 )
Number of FNs required (k)1, 2, 4, 8, 16
Query frequency in the query segment ( Q F )2, 4, 8, 10, 20
Distribution of facilitiesGaussian distribution
Number of centroids for the facilities in F ( | C | )1, 3, 5, 7, 10
Standard deviation for the normal distribution ( σ ) 10 2
Road networkSJ, NA, SF
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Cho, H.-J. The Efficient Processing of Moving k-Farthest Neighbor Queries in Road Networks. Algorithms 2022, 15, 223. https://doi.org/10.3390/a15070223

AMA Style

Cho H-J. The Efficient Processing of Moving k-Farthest Neighbor Queries in Road Networks. Algorithms. 2022; 15(7):223. https://doi.org/10.3390/a15070223

Chicago/Turabian Style

Cho, Hyung-Ju. 2022. "The Efficient Processing of Moving k-Farthest Neighbor Queries in Road Networks" Algorithms 15, no. 7: 223. https://doi.org/10.3390/a15070223

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop