Abstract
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.
1. 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–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, equal-distance 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.
2. Moving Object Modeling
2.1. 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.

Moving trajectory decomposition of moving object.
In Figure 1, t axis means the time,
In order to support the historical trajectories of moving objects modeling, the quadruple
Here, A stands for basic information of moving objects, such as moving object ID, position, direction, speed, accuracy, and other information. V indicates the basic attribute information of moving objects, such as moving object ID, name, and type,
P indicates the time the object moves. P is not a fixed time interval but a right open interval, which is uncertain. The size of P is related to the updating strategy of moving object location.
F represents motion function of moving objects;
S is the state of the moving objects in the period P. There are mainly three types of the moving object state S: past, current, and network failure or interruption, respectively, represented by 1, 2, and 3. When
2.2. 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 (MovingPT2), 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 entity model of moving object.
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 P, including history, now, and positioning or communication failure.
3. Dynamic Threshold Location Updating
3.1. 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 equal-distance 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
Distance Threshold Varying with Accuracy.

Position updating affected by azimuth.
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
Here,
3.2. 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):
real-time acquisition of GPS data packet; data packet analysis and instantiation as one position object location; 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 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 judgment on whether the current positioning point's velocity is equal to zero; if so, do not update location and jump to judgment on whether azimuth changing meets the azimuth threshold; if not satisfied, do not update the position and jump to judgment on whether the distance is greater than the minimum changing threshold when the above conditions are met; meet the conditions of location update; upload the position information to the server.

Position updating flow of moving object.
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.
3.3. Design of Database Location Store Procedure
The database server receives mobile terminal location data and judges whether the object has movement trajectory in the database. If the object trajectory is in the database, then find the current point record, change the current point as the history point, insert the new location point, and take the position as the current position. The definition steps are as follows.
Inquire about the location data that client received and parse it; then process the model of moving objects database. Query whether the moving object MID is in the historical trajectory database; if not, go to step Query the current location segment of the moving object, denoted as MO1. 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 Change the state of MO1 for the history state; update the end time of the MO1; go to step Change the state of MO1 to 3; end the updating flow. Store the location for the new database records.
4. 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 P by the proposed dynamic location update strategy.
4.1. 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.
4.1.1. Linear Path Function Method
To estimate the position of moving objects at t time, trajectory segment must be found at the moment of T, which includes the starting point
4.1.2. 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
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

Moving trajectory projection decomposition.
Let
Here,
4.2. 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.
4.2.1. The Linear Extended Positioning Method
Linear extended positioning method means that the moving velocity and direction at
4.2.2. Moving Average Method
Moving Average Method means that the moving velocity at
Here, m is a positive integer and
4.2.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
Let
The above formula can help work out
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.
5. Model Implementation
5.1. 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.

Abstract data type structure.
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.
5.2. 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 object-oriented 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.

Class diagram of moving object model.
5.2.1. Implementation of Temporal Data Type Classes
Temporal data type mainly defines the time point data type (INSTANT) and time interval data type (Period). INSTANT (YY, MM, DD, HH, MI, SS) was defined as a basic type of temporal data and parameters are expressed by year, month, day, hour, minute, and second. The implementation of INSTANT and Period was as follows:
CREATE OR REPLACE TYPE “INSTANT” as object (
⋯ constructor function instant(dateStr varchar2) return self as result, constructor function instant(d date) return self as result, member function todate return date, member function tochar return varchar); CREATE OR REPLACE TYPE “PERIOD” AS OBJECT
(m_start Date, m_end Date, MEMBER FUNCTION PeriodLength RETURN NUMBER, MEMBER FUNCTION IsValid RETURN INTEGER, ⋯ MEMBER FUNCTION IsEqual(p period) RETURN INTEGER, MEMBER FUNCTION IsCover(p period) RETURN INTEGER, MEMBER FUNCTION IsIntersect(p period) RETURN INTEGER, ⋯)
5.2.2. Implementation of Spatial Data Types
According to the moving object abstract data type, spatial data types include S_Point, S_Line, S_Polygon, S_Rectangle, and S_Circle. Here, taking S_Rectangle as an example, the implementation is as follows:
CREATE OR REPLACE TYPE “S_RECTANGLE” as object (
ld_pt s_point, //The lower left corner coordinates, ru_pt s_point, //The upper right corner coordinates srid number, constructor function s_rectangle(ldpt s_point, rupt s_point) return self as result, member function ToGeom return mdsys.sdo_geometry //Conversion to SDO_GEOMETRY function).
5.2.3. 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:
CREATE OR REPLACE TYPE “I_POINT” as object (
pt s_point, ins instant, member function distance(ipt i_point) return number, member function timeLength(ipt i_point) return integer).
5.2.4. 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:
CREATE OR REPLACE TYPE “MPT” as object (
pt s_point, //spatial coordinate information speed number, bearing number, //moving method and tools accuracy number).
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).
6. 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.

Real-time monitoring interface.
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.

Mobile terminal interface and location interface.
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 equal-distance updating and the equal-time update one.
The parameters settings are as follows. In the dynamic threshold position updating strategy,
Comparison between Dynamic position updating strategy and other position strategy.
The experimental results are as follows.
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 equal-distance strategy, while it is 8.8% of that in the train. 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. 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. 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.
7. 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.
Footnotes
Conflict of Interests
The authors declare that they have no conflict of interests.
Acknowledgments
This paper is supported in part by the Scholarship Council of Fujian Province (Fujian Education Cooperation (2013), no. 168), by the National Technology Support Project (no. 2013BAH28F00), and by the National Science Foundation of China (no. 41471333). One of the authors would like to thank the members of his committee for their support and the reviewers for giving the authors constructive suggestions which would help them in English and in depth to improve the quality of the paper.
