## 3 Materials and Methods
### System Model  
A spatio-temporal database is considered with \(N\) records, that is, \(N\) moving objects in the \(xy\) plane. Each record \((x_{i}^{j},y_{i}^{j})\) represents the spatial coordinates of a mobile user \(j\) in timestamp \(t_{i}^{j}\), or point \(i\) of its trajectory \(j\)[31]. From the location coordinates \((x,y)\), we can extract the corresponding velocity and angle direction features \((u,\theta)\) and the dual points \((U_{x},a_{x})\), \((U_{y},a_{y})\), \((b_{x},w_{x})\), \((b_{y},w_{y})\) by employing the dual methods described in [9]. Let us assume a trajectories database \(T=\{T^{1},\ldots,T^{N}\}\) of equal length \(L\) in which each trajectory is represented via a sequence of \(L\) triples.  
For each point \(i\) in trajectory \(j\), we define a two-dimensional feature vector \(F_{i}^{j}\), which captures the selected features data. Hence, we can define and store the trajectory \(j\) as \(T^{j}=\{F_{1}^{j},F_{2}^{j},F_{3}^{j},\ldots,F_{L}^{j}\}\).  
In the context of this work, the time performance of the \(k\)-anonymity set formulation either with the aid of an indexing method or for spatial \(k\)-NN queries on trajectory data employing Snapshot \(k\)-NN query on Trajectory Points, as depicted in Figure 2, is evaluated. Given a set of trajectories represented as a sequence of spatio-temporal points along with a query point, the \(STPkNN\) algorithm finds its \(k\) nearest spatial points from a set of trajectory points in corresponding timestamps. The \(STPkNN\) query is issued over a set of moving objects, executing the classical \(k\)-NN in a time period, and updates the \(k\)-anonymity set from timestamp to timestamp for all objects.  
However, some objects may not move with the same velocity, leading to changes in the query result, i.e., in the \(k\)-anonymity set. As a result, in Privacy Preserving, it is important for the \(k\)-anonymity set to remain the same or vary slowly, as in this case, the vulnerability measure of moving objects will be affected. Note that, for a given STPkNN query \(q\), the \(k\)-anonymity set, denoted as \(\mathcal{A}\), should always satisfy the following conditions:  
1. The first condition \(|\mathcal{A}|=k\) ensures that the anonymity set contains the _ids_ of \(k\) objects.
2. The second condition \(\forall a\in(S-\mathcal{A}),dist(q,a)\geq maxdist(q,a)|a\in\mathcal{A}\) ensures that these \(k\) objects' _id_ are the \(k\) nearest ones to \(q\).  
Figure 2: An Overview of Spatio-Temporal Data Partitioning and Indexing.  
Assuming a mobile object when considering a \(k\)-NN query relevant to the selected features in a specific timestamp, then, the spatial \(k\)-anonymity ensures that an attacker, as the query issuer, cannot identify a mobile object with probability larger than \(\frac{1}{k}\), where \(k\) is a user-defined anonymity parameter. Moreover, a spatio-temporal database is expected to handle a high number of moving objects location data, as well as, a large number of consecutive \(k\)-NN queries. Hence, an efficient consecutive \(STPkNN\) processing algorithm is very important to be addressed. To this end, the \(STPkNN\) query is investigated in the GeoSpark framework and experimental evaluations are conducted using a realistic dataset to demonstrate the time performance of the \(k\)-anonymity set computation under the \(STPkNN\) query. Ultimately, the vulnerability behavior for different pairs of features is investigated.