To adapt our framework to different moving behaviors, we first define two kinds of moving complexities, angular complexity and distance complexity. For a movement, its speeds and route are widely used to capture its moving behavior. In addition, if we know a user’s driving direction and speed, the user’s movement can be captured. Therefore, in this paper, we define an angular complexity and a distance complexity to capture the directional changes of a movement and how far a movement is, respectively.
To capture a user’s moving behavior, we observe his/her past movements, and then for-mulate the moving complexities. First, we use a reference factor, R, to decide how many past positions are to be taken into consideration when we calculate a user’s moving complexities.
Specifically, the reference factor R is defined as the number of former locations reported by a user (i.e., pi, pi−1, pi−2, · · · , pi−R+1) that are considered when calculating the moving com-plexity of the user at position pi. Note that for any pi such that i < R, we set R = i. Based on a given reference factor R, the angular complexity and the distance complexity are defined in Definition 3 and Definition 4, respectively.
Definition 3 (Angular Complexity) Given a user located at pi and a reference factor R, let angle ak (=∠pkpi−R+1p′) be half of the center angle of the minimal fan shape range centered at pi−R+1 and meanwhile covering pk with k∈ (i − R + 1, i]. Here, vector −−−−−→
pi−R+1p′ corresponds to the direction vector at pi−R+1. The angular complexity, denoted as Aci is set to the maximal angle ak w.r.t. k ∈ (i − R + 1, i]. Mathematically, Aci is expressed as
Aci = M AX(2· MAXk=ii −R+2∠pkpi−R+1p′, Amin). (1)
Notice that in order to prevent the case where all the aks are too small (e.g., when users are moving along a straight line), Amin is used as the lower bound of Aci. In our default parameter setting, we set Amin = 30◦.
Definition 4 (Distance Complexity) Given a user located at pi and a reference factor R, distance dk(= dis(pi−R+1, pk)) is the radius of the minimal fan shaped range centered at pi−R+1 and meanwhile covering pk. The distance complexity, denoted as Dci is set to the maximal distance dk w.r.t. k ∈ (i − R + 1, i]. Mathematically, Dci is expressed as
Dci= M AX(M AXk=ii −R+2dis(pi−R+1, pk), Dmin). (2)
Notice that Dminis used as a lower bound of Dci to prevent cases where dks are very small.
In our implementation, we set Dmin = 30m.
For example, in Figure 4.2, red flags represent the geographical points reported by a user,
Figure 4.2: Angular complexity Ac5 and distance complexity Dc5 for R = 5.
numbered p1 ∼ p6 in sequence with p1 reported first and p6 reported last. Assume reference factor R = 5, and the user is currently located at p5. To derive Ac5, we start from the location and the direction of p1 looking for the minimum angle required to fully cover p1 ∼ p5, which is illustrated as the center angle of the shaded angular sector. Similarly, the Dc5 is derived starting from p1 searching for the minimum distance required to cover p1 ∼ p5, which is showed as the radius of the shaded angular sector. The reason Ac5 is as large as Figure 4.2 shows is because the direction of p1 is considered, which is approximately south-southeast.
The shaded angular sector is the minimum angle required to cover p1 ∼ p5 assuming the user requests a fan shaped range query from p1. Suppose the user moves to p6. It is observed that Ac6 is much larger than Ac5. (Ac6 is derived from p2 ∼ p6, and the direction of p2 is similar to p1’s.) The philosophy of moving complexity actually assumes that moving objects would keep following current moving behaviors until the behaviors start to change. In our example, the user makes a right turn during p3 ∼ p4. As a result, CQ-DFS assumes the user would keep making turns (requiring larger Ac) until the user starts to move straight.
The philosophy of angular and distance complexities is based on the assumption that whenever the user is moving fast on a boulevard or highway (i.e., a lower value of Ac and a higher value of Dc), he/she would keep moving fast until gradually slowing down (e.g., leaving the highway). On the contrary, if a user keeps wandering around the city turning left and right (i.e., a higher value of Ac and a lower value of Dc), he/she would keep doing so until gradually accelerating (e.g., leaving the city). The moving complexities significantly facilitate the understanding of different moving behaviors of users and the real-time formation of the
queried range.
However, it is possible that when users make sudden turns, a few following range queries would have sudden parameter distortion. For example, in Figure 4.2, if the user continues making turns at p5 ∼ p6, the parameter distortion comes in handy. Here we are emphasizing that the changes between Ac4 ∼ Ac6 are so intense that when the fixed area of the range query is relatively small, the range query may only return a small number of segments which definitely affect the overall precision and recall. To capture whenever users are making turns, and meanwhile to avoid distortion, we apply a weighted moving average method to smooth the angular complexity and distance complexity, as defined in Definition 5 and Definition 6.
Definition 5 (Smoothed Angular Complexity) Smoothed angular complexity SAci of pi is defined as the weighted moving average of Aci with parameter K, i.e.,
SAci= K· Aci+ (K− 1) · Ac(i−1)+· · · + ·Ac(i−K+1)
K + (K− 1) + · · · + 1 . (3)
Note that for any pi such that i < K, we set K = i.
Definition 6 (Smoothed Distance Complexity) Smoothed distance complexity SDci of pi is defined as the weighted moving average of Dci with parameter K, i.e.,
SDci= K· Dci+ (K − 1) · Dc(i−1)+· · · + Dc(i−K+1)
K + (K− 1) + · · · + 1 . (4)
Note that for any pi such that i < K, we set K = i.
After defining moving complexities capturing different moving behaviors, we propose an approach to determine a proper fan-shaped range on-the-fly. Recall that to shorten a response time, the number of road segments in each estimation is limited on a server. We first set Areaf ixed as the upper bound size of the fan shaped ranges, and express it in Equ (5), where Angle and Radius represent the center angle and radius of the fan shape with area equals to Areaf ixed.
Figure 4.3: Expanding ⟨Ac5, Dc5⟩ forming the desired ⟨Ang5, Rad5⟩ with R = 5.
Areaf ixed = π· Radius2·Angle
360◦ . (5)
Consequently, the desired fan shaped range could be represented as a two-tuple vector
⟨Angle, Radius⟩ = ⟨Angi, Radi⟩. Based on moving complexities Aci and Dci, countless kinds of fan shaped ranges with the same area Areaf ixed could be formed, e.g., one (⟨Aci, Dderived⟩) has Acias the central angle and another (⟨Aderived, Dci⟩) has Dci as the radius; the former type usually has a long narrow fan shape, and the latter one usually has a short wide fan shape.
Given two fan shaped ranges at both extremes, CQ-DFS applies the concept of Doctrine of the Mean expanding both the central angle and the radius from Aci and Dci until the area of the expanded fan shape reaches Areaf ixed. Figure 4.3 depicts this idea, where the small fan shape represents moving complexities ⟨Ac5, Dc5⟩, and the large fan shape ⟨Ang5, Rad5⟩ is expanded from it. ⟨Ang5, Rad5⟩ represents our desired fan shape for range query Q5. Note that the arrow starting from p5 pointing northeast represents the direction that p5 faces, and it is also the direction that CQ-DFS requests the desired Q5.
In order to examine the ratio between the given fixed area Areaf ixed and the original fan shape ⟨Aci, Dci⟩, we derive the Area Multiplier AMi in Equ (6), which indicates the ratio by which the original fan shape could be expanded. With AMi available, we multiply both Radius2 and Angle terms in Equ 5 with the square root of AMi. The Angi and Radi of the desired fan-shaped range are derived by mapping the corresponding terms Rad2i and Angi
respectively.
For example, suppose the Areaf ixed = 100,000 m2, and the area of the original fan shape
⟨Aci, Dci⟩ equals 50,000 m2, which makes the AMi = 2. We multiply Dci2
While driving, people request queries in short periods to avoid missing upcoming events.
Frequent queries would induce heavy computations for servers. However, we observe that in certain short periods of continuous range query applications, consecutive queried ranges (i.e., Qi and Qi+1) possibly overlap geometrically, and the queried ranges issued by different users (i.e., Qi corresponding to user uj and Qi′ corresponding to user uj′) also possibly overlap geometrically. Consequently, caching of the result w.r.t. Qi would benefit the processing of another range query.
However, the retrieved information would have an expiration time. For instance, the traffic status usually changes over time, so a traffic estimation has an expiration time. On the other hand, the evaluated traffic status remains the same, whenever any other user who has also issued overlapping query ranges for traffic monitoring services, the information could be