# Pruning Optimization over Threshold-Based Historical Continuous Query
## 1 Introduction  
With the rapid development of mobile networks and positioning technologies, the trajectory data of mobile objects can be more conveniently obtained. For example, the Automatic Identification System is used to report the real-time location information of ships, and the mobile social applications are used to share the real-time location, etc. The trajectory data of mobile objects contains a large amount of information that can be analyzed and mined. By managing the trajectory data of mobile objects through mobile object database [1], a large number of applications based on location services can be promoted, such as geographic information systems, navigation systems, path planning systems, etc. Therefore, the performance of a mobile object database will determine the service capabilities that the location-based applications can provide. In the past ten years, the research on mobile object database has achieved a lot of results, covering all aspects of data storage, management, query, and mining. Mobile object query is one of the key technologies of a mobile object database. In different scenarios, various types of query operations are needed to provide service support. Research on how to provide high-performance queries is the key to improving the service capability of a mobile object database. Therefore, it is important to implement a query operation that can accurately return the results in a short time. With the gradual deepening of research, people not only consider the spatial information of the moving object when querying, but also temporal information will be taken into account. At this stage, the query operations for the moving object include spatiotemporal range query, trajectory similarity query, neighbor query, threshold-based query [2], etc. We consider the following query requests for the historical trajectory data:  
1. Find which ships were within one nautical mile from the berth \(O_{1}\) at any time instance of the time period from 10:00 on 11 November 2015 to 10:00 on 12 November 2015. 2. Find which ships were within one nautical mile from the ship \(O_{2}\) at any time instance of the time period from 8:00 on 12 November 2015 to 8:00 on 13 November 2015. The above two queries require the query results at any time instance of the query time period, wherein the query request (1) takes a static object as the reference, and the query request (2) takes a moving object as the reference, both of which can be characterized as continuous queries [3]. However, there is a certain difference between these continuous queries and the traditional continuous ones. The traditional continuous query submits the query request to the database at once and remains active, and the query results are periodically returned until the predetermined query lifetime ends. While the query requests (1) and (2) demand the database to return all query results at once. It can be seen that these continuous queries face a greater data processing scale challenge than the traditional ones. In addition, we can see from the query conditions that the above query requests are constrained by the spatial distance threshold, so we call them threshold-based historical continuous queries (THC queries). Figure 1 displays an example of THC query, where \(T_{q}\) is the historical trajectory of the query moving object \(O_{q}\), and \(T_{1}\), \(T_{2}\), and \(T_{3}\) are the historical trajectories of the moving objects \(O_{1}\), \(O_{2}\), and \(O_{3}\), respectively, and the query time interval is (\(t_{1}\), \(t_{4}\)), the distance threshold is \(d\). As time goes by, the position of the moving object will change continuously. Hence, the query time interval can be subdivided into a plurality of smaller time segments, and the query results in each time segment are not the same. As Figure 1 shows, the results are \(O_{2}\) and \(O_{3}\) at the time interval (\(t_{1}\), \(t_{3}\)), \(O_{1}\), \(O_{2}\) and \(O_{3}\) at time instance \(t_{3}\), \(O_{1}\), and \(O_{2}\) at the time interval (\(t_{3}\), \(t_{4}\)).