An All-Time-Domain Moving Object Data Model, Location Updating Strategy, and Position Estimation

To solve the problems from the existing moving objects data models, such as modeling spatiotemporal object continuous action, multidimensional representation, and querying sophisticated spatiotemporal position, we firstly established an object-oriented all-time-domain data model for moving objects. The model added dynamic attributes into object-oriented model, which supported all-time-domain data storage and query. Secondly, we proposed a new dynamic threshold location updating strategy. The location updating threshold was given dynamically in accordance with the velocity, accuracy, and azimuth positioning information from the GPS. Thirdly, we presented several different position estimation methods to estimate the historical location and future location. The cubic Hermite interpolation function is used to estimate the historical location. Linear extended positioning method, velocity mean value positioning method, and cubic exponential smoothing positioning method were designed to estimate the future location. We further implemented the model by abstracting the data types of moving object, which was established by PL∖SQL and extended Oracle Spatial. Furthermore, the model was tested through the different moving objects. The experimental results illustrate that the location updating frequency can be effectively reduced, and thus the position information transmission flow and the data storage were reduced without affecting the moving objects trajectory precision.


Introduction
Moving objects database [1] (MOD) is a database which manages position-related information of moving objects. Recently, the research of moving objects database focused on moving object representation, modeling, indexing, query, uncertainty dealing, and privacy protection [2]. The data model is the basis for the moving object database. The early study centers on the spatiotemporal data model. Zhao [3] formally defined the types and operations, offered detailed insight into the considerations that went into the design, exemplified the use of the abstract data types using SQL, and offered a precise and conceptually clean foundation for implementing a spatiotemporal DBMS extension. A spatiotemporal cube model [4] and a simplest time slice snapshot model [5] were presented and used. However, the model cannot fit with the description of spatial changes accompanying the temporal changes. Worboys et al. proposed an object-oriented spatiotemporal data model [6], which was further studied by many other scholars [7][8][9][10]. Tryfona proposed spatiotemporal entity relation (STER) data model [11,12] which used an extended entity relationship to describe the phenomenon in real world. After that many scholars started to work on the spatiotemporal database model to adapt to the position management of moving objects. Wolfson presented the moving object spatial-temporal (MOST) model [13,14], which showed the spatial difference with time by a dynamic attribute. However, the MOST model failed to describe the whole spatiotemporal trajectory and only supported current and future state query of moving objects. Jin et al. [15] built a spatiotemporal object relation model based on object relation data model, and the key was to extend classification system and operation objectives relation data model by abstract data types (ADT). Xue et al. [16] proposed process-oriented spatiotemporal data model in which studied expression organization and storage of continuous changing geographic entities were given. Ding carried out the research on the Dynamic Transportation Network Based Moving Objects Database (DTNMOD) and its real-time dynamic transport network flow analysis method based on the spatiotemporal trajectory of moving objects [17,18]. Yang et al. developed a protocol based on prediction that significantly boosts the speed of message transmission over vehicles [19,20]. From the above analysis and comparisons, it is indicated that object-oriented model and moving object model worked better in spatiotemporal object modeling and have the advantages in spatial query, time query, and spatiotemporal query. But in the continuous moving modeling, the data transmission and data storage also have some disadvantages.
The traditional location update method was time point selection method, including equal-time algorithm, equaldistance algorithm, and dynamic time point algorithm [21,22]. Equal-time algorithm was the most simple and was more effective to achieve and the communication flow is stable but the adaptability was poor. When the moving object is static, it also records the position which causes invalid storage. Equal-distance algorithm has dramatically increased communication flow in high-speed motion; dynamic time point algorithm is capable of reducing the position update, but this method is only suitable for high positioning accuracy and stably changing positioning parameters.
According to the deficiencies of continuous moving modeling, multidimensional expression, and complex spatiotemporal queries, an object-oriented moving object database model supporting all-time-domain query was proposed by combining static object model and moving object model. In order to reduce the amount of moving object data transmission and storage, a dynamic position updating strategy was studied. It is suitable for frequent changes of position of moving objects. This model solved the problem of continuous storage, multidimensional expression, and complex spatiotemporal queries. This paper realized the model by an instance at last.

Moving Object Trajectory Segment
Model. The motion and change of moving object are continuous. In the traditional moving object data storage model, the object-relational database was used to store the information continuously obtained from the moving object at a certain time interval. It not only increases the amount of the data storage but also increases the difficulties in the history and future spatiotemporal queries of the moving objects and in the complex spatiotemporal behavior queries. In order to solve these problems, dynamic properties methods of the MOST model are proposed and implemented in this paper. The discrete modeling ideas are proposed to support dynamic properties of the entire trajectory model, and all the trajectories of moving objects are separated into many small segments as shown in Figure 1.
In Figure 1, axis means the time, ( , ) means the point information of moving objects, and is the coordinate information at moment. stands for the position information of moving objects at moment. Each discrete segment is abstracted as dynamic changes within a certain period of time .
In order to support the historical trajectories of moving objects modeling, the quadruple ( , , , ) was put forward to support the all-time-domain query. All trajectories segments expressed by the quadruple constitute continuous trajectories of moving objects: Here, stands for basic information of moving objects, such as moving object ID, position, direction, speed, accuracy, and other information. indicates the basic attribute information of moving objects, such as moving object ID, name, and type, is the position information of the moving object in the moment , = ( , V , , ), is the coordinate information at moment, V is the velocity at , is the azimuth at , and is the accuracy at . In this paper, the dynamic properties of the model are built on the location ( ) change over time . indicates the time the object moves. is not a fixed time interval but a right open interval, which is uncertain. The size of is related to the updating strategy of moving object location.
represents motion function of moving objects; ( ) is the motion function of moving objects and is a timedependent function, by which we can estimate the position of a moving object in the past, at present, and in the future within a short time. Motion function can be divided into many types according to the actual situation, such as linear function and curvilinear function.
is the state of the moving objects in the period . There are mainly three types of the moving object state : past, current, and network failure or interruption, respectively, represented by 1, 2, and 3. When = 1, the position is used to store and query the historical trajectory; when = 2, that is used to store current position and estimate future position; when = 3, the location information will not be stored until the terminal receives the location information again. When the update data is firstly or lastly received, a new moving  object trajectory segment will be created, the state of motion is represented by 1, and at the same time the front tracking segment state is modified. The former tracking segment state is judged according to the time interval between the current time when it receives data and the previous time +1 when segment ends. When < Δ , the last trajectory segment state is changed to 2 and when ≥ Δ the last trajectory fragment state is set to 3.

Entity Model of Moving Object Trajectory Segment.
The trajectory segment of moving objects is represented as an object entity. The object entity of the trajectory segment includes the following: moving object identification (MID), the starting point (MovingPT1), the ending point (Mov-ingPT2), the time interval (Period), and the moving state (State) of the trajectory segment, as shown in Figure 2. In the model, the moving trajectory point (MPT) is an abstract entity object, including location information (PT), velocity, azimuth, and accuracy, and the location information is also an abstract spatial object, including latitude, longitude coordinates, and projection information.
The abstraction entity of moving object trajectory segment is MO Entity, which inherits the time abstract entity (Period) and the moving point object (MPT) and also extends the spatial and temporal relation operation (ST Operation); the MID is a unique identification of the moving object, which can be used to indicate the basic information of the moving object. The moving objects have three moving states in period , including history, now, and positioning or communication failure.

Position-Based Dynamic Threshold Location Updating
Strategy. There are two kinds of traditional location updating method. One is equal-time algorithm and the other is equaldistance algorithm. Equal-time algorithm refers to upload, update positioning data according to a certain time interval. In this algorithm, the communication flow is stable, but the adaptability is poor. Equal-distance algorithm refers to upload, update positioning data according to a certain distance interval. When the moving object is in high-speed state, the location update frequency and the communication traffic will be greatly increased. In practical applications, the position information, such as velocity, position accuracy, and azimuth received from GPS, was in constant changing status and the changes are also irregular. Velocity is the main factor to the frequency of location updating, which is the principle of the dynamic time point algorithm [19]. When the velocity from two adjacent points changes slightly, the mid-time positions can be estimated by two adjacent points. Thus, the position point will not be updated. Different positioning accuracy determines the position changing distance, for example, distance position algorithm; if position changing distance > Δ , this point should belong to the location updating point, but in fact this point may be an error point. So we designed a dynamic distance threshold changed by the positioning accuracy. Only when the position change of distance was greater than the distance threshold, the location point was updated. The corresponding relationship between accuracy and distance threshold was shown in Table 1. The changing of azimuth mostly affects the trajectory precision of moving objects shown as in Figure 3. Moving object moves from road A to road B and then to C and finally enters the D; if we do not consider the impact of orientation on the location updating, the trajectory of moving object stored in database is 0 → 1 → 2 → 3 → 4, while the real trajectory was 0 → 1 → 2 → 3 → 4 → 5 → 6. In consideration of the azimuth location update, the trajectory of moving objects stored in the model database was more practical. According to the influencing factors of the location update of moving object, a new dynamic threshold algorithm was designed based on the moving object positioning information. The algorithm combined with GPS positioning information (velocity, accuracy, and azimuth) to dynamically determine the location update threshold. Here is the definition of the location update strategy.
Hypothesizing that 1 is the last position change point of moving object, 2 is the location information point of moving objects lastly acquired, the spatial distance between and 2 is , azimuth changing is , if > Δ and = 2 − 1 > Δ and V > 0 ‖ > max , that position is believed to be with the update condition.
Here, Δ is the minimum distance update threshold under the different accuracy and max is the minimum distance update threshold when the distance changes more than max , no matter whether other conditions satisfied all the update location. Δ is azimuth threshold and V stands for velocity. V = 0 means that the position does not change.

Design of Location Updating Strategy Flow.
According to the definition of location update strategy, the position updating process can be constructed as follows (shown in Figure 4): (1) real-time acquisition of GPS data packet; (2) data packet analysis and instantiation as one position object location; (3) judgment according to the dynamic precision threshold rule on whether the distance change is larger than the minimum change threshold in the current precision condition; if not, do not update the position and jump to (1); (4) judgment on whether the time between the current position and last updated position is greater than the maximum time threshold; if so, that means it meets the location update condition; then go to (8); The moving terminal gets the position point data through the GPS module and then the terminal program parses the position information and judges whether the location information meets the moving updating strategy requirements. If the location information meets the requirements, it will be sent to the server and update the position point. (1) Inquire about the location data that client received and parse it; then process the model of moving objects database.
(2) Query whether the moving object MID is in the historical trajectory database; if not, go to step (7); else go to step (3).
(3) Query the current location segment of the moving object, denoted as MO1.
(4) Calculate the time interval between the upload location time and the last update time; if the time interval is greater than the threshold of time, then go to step (6); else go to (5).

All-Time-Domain Position Estimation
Generally speaking, the trajectories of moving objects are continuous. However, the location information is discrete and discontinuous recorded by moving object Database. When querying and visualizing moving object position and trajectory at any moment, the moving object position needs to be estimated according to the location information stored in the database. In order to simplify the study, the moving object trajectory will be defined as a straight line or curve in the time period by the proposed dynamic location update strategy.

Estimation of Historical
Position. The trajectories of moving objects are divided into different moving trajectory segments, whose trajectory curve is represented by a dynamic function. Thus, in order to query the moving objects historical trajectory at a certain point in time, we need to estimate the trajectory by the motion function. Motion functions are selected under different circumstances and generally there are two kinds of motion function: one is a linear function and the other is the curve function. A linear function is applied to the object moving in the fixed road network, such as vehicle, while the curve function is applied to the vehicles moving freely, such as pedestrians. In this paper, we designed two kinds of estimation function. One is the linear path function, and the other is three times Hermite interpolation function.

Linear Path Function Method.
To estimate the position of moving objects at time, trajectory segment must be found at the moment of , which includes the starting point 1 ( ( 1 , 1 ), V 1 , , ) and ending point 2 ( ( 2 , 2 ), V 2 , , ) in the period : where 1 is the starting point, V is the average velocity measured from the starting point through ending point, Δ = − 1 , 1 is the longitude, 1 is the latitude, and = | 2 − 1 | is the azimuth angle. When using linear functions to represent the trajectories of moving objects, the moving object trajectory in the period will be seen as a linear function that passes updated location point.

Three Hermite Interpolation Function Method.
The cubic spline function interpolation method was used to estimate the curve movement trajectories of the moving object. The velocity change function V ( ) and the azimuth change function ( ) with time were calculated. Then the location of the moving object is estimated by position function loc( ) = loc( 0 ) + V( − 0 ). Here, V stands for the velocity at time , but in actual movement, the velocity from 0 to is constantly changing and the velocity at time cannot be used to represent the middle time velocity, so does the azimuth. Obviously, this method has a great error.
To solve this problem, the three Hermite interpolation function was established. The calculating progress is designed as follows. Firstly, calculate a three-time spline curve ( ) in three-dimensional space and decompose it into and plane projection, to get two three-time spline curves ( ) and ( ), as shown in Figure 5. Consider ( ) = , ( ) = . Then, use ( ) and ( ) to estimate the history position at time .
( ) can be solved in the same way and the position ( ) at any time can be calculated by ( ), ( ).

Future Position Estimation.
The moving object data model can only store the current and historical location updating data. The future location prediction of moving objects in short needs to depend on the corresponding algorithm. Three methods for estimating future location are given as follows.

The Linear Extended Positioning Method.
Linear extended positioning method means that the moving velocity and direction at +Δ moment are consistent with those at updating moment . In accordance with the current location update points as the future prediction, let be the motion state updated point of current trajectories and let |V | and be moving velocity and azimuth at the same time; then (5)

Moving Average Method.
Moving Average Method means that the moving velocity at +Δ moment is the average value of velocity at last updating times and azimuth is consistent with that at updating moment . Consider Here, is a positive integer and ≥ 2. Generally speaking, the large value of is meaningless. Thus, the value of is 2 or 3.

Cubic Exponential Smoothing Method.
Generally speaking, the moving velocity changes are nonlinear with time. The cubic exponential smoothing method can be used to predict the change trend of velocity with time series. Exponential smoothing method is an iterative process and can be denoted as ( ) . adjacent location updating points before current are usually selected to join the calculation. Time sequence is denoted in turn as 1 , 2 , 3 , . . . , . Besides, an initial value (1) 0 is needed. After multiple period of smoothing the effect of (1) 0 becomes relatively small, so the 4 moment is regarded as the first time point in time sequence. This time point value is the average of the last 3 time points mentioned before; that is, (1) (2) , (3) be the first, second, and third exponential smoothing value of velocity V at , , and which stand for the smoothing coefficients of time series whose values range is [0, 1]; then The above formula can help work out , , and and then the cubic exponential smoothing speed prediction model is described as follows: The above three methods can be used to estimate the future position, but in the actual object movement, the positions of moving objects are often changeable which leads to the errors of predicted values. To reduce the error of prediction, the position predicted time cannot exceed a certain range.

Moving Object Abstract Data
Types. The moving object database was implemented based on Oracle Spatial extension. Thus, the moving object abstract data type includes some basic data type, spatial data types. The basic data type is the basis for all databases, including Int, Number, Varchar, and Date. Besides, based on these types, the PL\SQL was used to define the temporal data type supporting temporal data and the spatiotemporal data type supporting spatiotemporal data. The abstract data type structure for moving object is shown in Figure 6. Temporal data type includes the instant (time), period (time interval), and periods (time interval set). Instant is composed of real data and time interval is made of the starting and ending points of period (sins, eins) of instant.
Spatial data types are established based on the Oracle Spatial SDO Geometry data type, which includes five attributes: SDO GTYPE, SDO SRID, SDO POINT, SDO ELEM INFO, and SDO ORDINATES. However, all forms of spatial data types are defined based on SDO Geometry data type, and the interface parameters are relatively complex. In order to provide simple spatial data type interface that is easy to assess, we packaged the SDO Geometry data type into S Point, S Line, S Polygon, S Rectangle, and S Circle, respectively. Spatial data must have a projection or coordinate system; the model uses the default projection 8307, namely, World Geodetic System 1984 (WGS 84), to establish spatiotemporal data types based on temporal data types and spatial data types.
Spatiotemporal data types are the inheritance of temporal data types and spatial data types, and spatiotemporal data types include I Point, I Line, I Polygon, I Rectangle, and I Circle.

Moving Object Data Model Implementation.
We used PL/SQL to define the abstract data types of moving objects; various types were constructed according to the objectoriented method. The base class is spatial data types and temporal data type classes. The class diagram data type definitions of all moving objects are shown in Figure 7.

Implementation of Spatial-Temporal Data Type.
Based on temporal data types and the spatial data types and using inheritance of object-oriented method, the fields and methods of spatiotemporal data types (I Point, I Line, I Rectangle, I Polygon, and I Circle) are inherited from the fields and methods defined by the temporal data types and spatial data types. Then the set type of these basic spatial-temporal data types was also given. Here, taking I Point as an example, the implementation is as follows:

Implementation of Moving Object Data Type.
Moving object data type is set up based on the above data types. In this paper, we focus on the moving point objects. The moving point objects include the basic information of the moving object: the spatial position and positioning time and the accuracy, velocity, and azimuth information; the definition is as follows: The moving object trajectory segment is defined as follows: CREATE OR REPLACE TYPE "MO" as object ( mid varchar2(100), mpt1 mpt, //starting point mpt2 mpt, //end point p period, //time interval state integer, member function get mpt(t instant) return i point //dynamic function, to calculate the location at t).

Results and Analysis
We implemented the object-oriented all-time-domain moving object database model and applied it to a moving object monitoring system. This system includes database servers, moving object monitoring center, and data collection terminals. The database server was implemented by extending Oracle 11 g spatial database that each trajectory segment was stored with the user defined types MO. Moving object monitoring center uses B/S structure. The server is mainly used for system business logic processing, including the business process logic and interface services, and the monitoring client is mainly responsible for the mobile terminal monitoring, the main function of a mobile terminal including real-time monitoring, historical trajectory playback, and historical location query. The monitoring system was developed with the FineUI framework (http://fineui.codeplex.com/), online geographic map, and AMap API for JavaScript (http://lbs.amap.com/), as shown in Figure 8.
The main function of data collection terminal is to collect location information in real time and to send the location information to data server through the 3G network and update position information by the method proposed in this paper-position-based dynamic threshold position updating strategy. The terminal system was developed on android operation system, shown as in Figure 9.
A case study was carried out on different moving object. Firstly, we installed the data collection software on a smart phone with the global position system. Then we harvested the position data on different forms of movements, including bus, taxi, train, and pedestrian. Finally, we tested the model from the update frequency and the matching degree between the stored moving trajectory and the actual moving one. The dynamic update frequency was compared with the equaldistance updating and the equal-time update one.
The parameters settings are as follows. In the dynamic threshold position updating strategy, Δ = 20 ∘ , Δ is determined by Table 1, and max = 1000 m. In equal-distance updating strategy, Δ = 100 m, and in equal-time updating strategy, Δ = 15 s. The updating frequency result is shown as in Table 2.
The experimental results are as follows.
(1) For moving object, such as bus, taxi, and train, the location update frequency determined by the location update strategy based on positioning accuracy is about 30-40% of equal-time strategy and equaldistance strategy, while it is 8.8% of that in the train.
(2) For moving object, such as pedestrian, with slow moving speed and irregular moving trajectory, the dynamic threshold update strategy will increase the location update frequency in order to record trajectories more accurately because of the rapid changes of the azimuth and accuracy information.
(3) Experiments show that the dynamic threshold position updating strategy is capable of effectively reducing the position update, saving data transmission flow, and reducing the data storage without affecting the trajectory accuracy of the moving objects.
(4) We tested the matching degree between the trajectory derived from the stored position and the actual one. According to the results, the derived trajectory was satisfied which was supported by high matching degree.

Conclusion
Moving object databases always manage spatial-temporal information with massive volume. It is necessary to work on spatiotemporal data model adapted to moving objects in order to store and query the position trajectory information effectively. We design an all-time-domain moving object database model combined based on the object-oriented idea and dynamic attributes in MOST. By analyzing the interstructure and rendering of MOST in detail, a position-based dynamic threshold position updating strategy was proposed to fit this new data model. The cubic Hermite interpolation function was used to estimate the historical location of moving objects. Linear extended positioning method, velocity mean value positioning method, and cubic exponential smoothing positioning method were designed and used to estimate the future location of moving object. The result verification showed that this strategy can effectively reduce the transmission and storage of data.