## 4 Proposed CPCROK Scheme
### Rnn-Fgtgm  
The aim for this module is to adjust predictions provided by the IKF-CGTM using a forward-pass RNN to generate precise fake traces containing similar states compared with real vehicles. All the results of the IKF-CGTM are used as the input dataset to feed the RNN-FGTGM and all beacons inside mix zones are used as the validation set to correct and update the RNN model. A Recurrent Neural Network (RNN) is an artificial recursive neural network that processes sequential data, evolving in the sequence's direction, and interconnects circular units in a chained network with feedback loops [49]. The RNN is commonly employed for time series prediction [50], especially for vehicle behavior prediction utilizing the sequential state information from beacons. For short distance or maneuver intention, RNNs can provide a higher-level understanding of vehicle behaviors, especially in a simple driving scenario [51]. For instance, [PERSON] et al. [52] presented a prediction method based on an RNN to predict the destination in a junction by labeling the distance and speed at each junction exit to give early warning of collisions. As a combination of RNN and privacy protection, the following is a newly proposed algorithmic workflow for generating more accurate fake beacons through trajectory prediction using RNNs. The RNN model designed for trajectory predictions operates through a series of time steps, each involving several components and processes. At any given time step \(t\), the input vector \(x^{t}\) includes four features: the x-coordinate, y-coordinate, and the velocity components along the x-axis and y-axis. The hidden state \(h^{t}\) represents the output of the hidden layer, which incorporates information from all preceding time steps, ensuring the model captures temporal dependencies effectively. The output \(o^{t}\) at each time step is generated from the current hidden state \(h^{t}\), while \(y^{t}\) serves as the target or actual value used for validation purposes. The loss function \(L^{t}\) is calculated to measure the discrepancy between the predicted output \(o^{t}\) and the validation value \(y^{t}\), aiding in model optimization. Figure 4 shows the structure of the RNN model for trajectory predictions. In time step \(t\), \(x^{t}\) denotes the input vector, including four features: the x-coordinate, y-coordinate, and the velocity components of the x-axis and y-axis. \(h^{t}\) denotes the value of the hidden unit influenced by all previous hidden units, \(o^{t}\) denotes the output value based on the current hidden unit, \(y^{t}\) denotes the validation value, and \(L^{t}\) denotes the loss function. There are three key parameters in this RNN model. * U: The weight matrix applied to the input vector \(x^{t}\);
* W: The weight matrix applied to the previous hidden state \(h^{t-1}\);
* V: The weight matrix  
activation function \(\sigma\). This function introduces non-linearity into the model, enabling it to capture complex patterns in trajectory data. \[h^{(t)}=\sigma(z^{(t)})=\sigma(Ux^{(t)}+Wh^{(t-1)}+b) \tag{14}\]  
The generation of the output \(o^{t}\) at time step t is relatively simple, where \(c\) is another linear bias:  
\[o^{(t)}=Vh^{(t-1)}+c \tag{15}\]  
The loss function calculates the difference between \(o^{(t)}\) and \(y^{t}\) for each time step. In this model, since the objective is composing precise fake beacons that have similar states as real ones, the Euclidean distance \(d\) is selected as the loss function. In each time step \(t\), \(d\) is calculated as:  
\[d(z_{t,r},z_{t,o})=\sqrt{\sum_{i=1}^{n}(x_{t,r_{i}}-z_{t,o_{i}})^{2}} \tag{16}\]  
where \(z\) denotes the state vector in time step \(t\) for the real vehicle \(r\) and the RNN output \(o\), including coordinate \((x(t),y(t))\) and speed \((v_{x}(t),v_{y}(t))\). Gradients are calculated using backward propagation so that the hyperparameters of the RNN are updated using the optimizer.