## 4 Proposed CPCROK Scheme
### Rnn-Fgtgm
The gradient calculation for \(V\) and \(c\) is relatively simple, as illustrated in the partial derivatives:  
\[\frac{\partial L}{\partial c}=\sum_{t=1}^{\tau}\frac{\partial L^{(t)}}{ \partial c}=\sum_{t=1}^{\tau}o^{(t)}-y^{(t)} \tag{17}\]  
\[\frac{\partial L}{\partial V}=\sum_{t=1}^{\tau}\frac{\partial L^{(t)}}{ \partial V}=\sum_{t=1}^{\tau}(o^{(t)}-y^{(t)})(h^{(t)})^{T} \tag{18}\]  
The gradient of \(W\), \(U\), \(b\) is then calculated. During backward propagation, the gradient loss at a certain time step \(t\) is determined by the gradient loss corresponding to the output of \(t\) and \(t+1\). Therefore, the gradient loss of \(W\) at \(t\) needs to be calculated step by step. First, the gradient of the hidden state at \(t\) is defined as:  
\[\delta^{(t)}=\frac{\partial L}{\partial h^{(t)}} \tag{19}\]  
Figure 4: The structure of the RNN model [53]. Thus, the state at \(t-1\) can be derived from the state at \(t\):  
\[ \begin{split}\delta^{(t-1)}&=(\frac{\partial o^{(t-1)} }{\partial h^{(t-1)}})^{T}\frac{\partial L}{\partial o^{(t-1)}}+(\frac{ \partial o^{(t)}}{\partial h^{(t-1)}})^{T}\frac{\partial L}{\partial o^{(t)}} \\ &=V^{T}(o^{(t-1)}-y^{(t-1)})+W^{T}diag(1-(h^{(t)})^{2})\delta^{(t) }\end{split}  \tag{20}\]  
For the last state \(\tau\), since there are no more time steps after it, the calculation is:  
\[\delta^{(\tau)}=(\frac{\partial o^{(\tau)}}{\partial h^{(\tau)}})^{T}\frac{ \partial L}{\partial o^{(\tau)}}=V^{T}(o^{\tau}-y^{\tau}) \tag{21}\]  
Thus, the gradient calculation for \(W\), \(U\), and \(b\) can be expressed as:  
\[\frac{\partial L}{\partial W}=\sum_{t=1}^{\tau}diag(1-(h^{(t)})^{2})\delta^{( t)}(h^{(t-1)})^{T} \tag{22}\]  
\[\frac{\partial L}{\partial U}=\sum_{t=1}^{\tau}diag(1-(h^{(t)})^{2})\delta^{( t)}(x^{(t)})^{T} \tag{23}\]  
\[\frac{\partial L}{\partial b}=\sum_{t=1}^{\tau}diag(1-(h^{(t)})^{2})\delta^{( t)} \tag{24}\]  
The above steps are repeated for several epochs until a specified number of epochs is reached to obtain a low overall loss function. At last, each vehicle has a prediction route corrected by the RNN model. The route consists of many beacons in both the IKF and real vehicle trajectories. The LSTM model, while powerful in handling long-term dependencies, is not employed in the current scenario primarily due to the nature and scope of the data involved. LSTMs are indeed suitable for trajectory prediction and have been effectively applied in contexts such as intersection path prediction, as demonstrated in [54]. However, in the specific context of the mix zone, the data comprising encrypted beacons represent only a short sequence. The limited spatial extent of the mix zone restricts the length of these sequences, thus diminishing the advantage offered by LSTM's long-term memory capabilities. Furthermore, employing an LSTM in such scenarios introduces a significant computational overhead. Studies, including those reported in [55], have shown that when handling identical time-series prediction tasks, LSTMs require approximately 151% of the computational time needed by simpler RNN models under the best circumstances and up to 227% under the worst scenarios. This increase in computational demand can be attributed to the LSTM's complex internal architecture, which includes multiple gates that manage the flow of information. Given these considerations, for the specific application of predicting vehicle trajectories within the relatively confined space of a mix zone, the additional computational cost of employing an LSTM does not justify the potential gains in prediction accuracy. Instead, we have opted for a more lightweight RNN model. This choice is driven by the need for rapid computation and efficiency in generating plausible fake beacons, where the simplicity of RNNs offers a more balanced solution. The RNN's less complex structure allows it to process the necessary data sequences quickly and efficiently, making it an ideal choice for applications where speed is crucial and the data sequences are inherently short.