# A Distributed Mix-Context-Based Method for Location Privacy in Road Networks
## 4 Proposed Solution
### Vehicle High Traffic Density at Low Speed  
The vehicles sense the road environment and search for transmission range neighboring vehicles. In this case, the vehicle neighbor threshold is checked and verified, and based on the neighbor threshold, the pseudonyms of all vehicles are changed in the crowd. It mixes the context and pseudonyms of vehicles and confuses an adversary attempting to identify the vehicle in such a fluxed environment. This concept is shown in Figure 6. A crowd of vehicles is established when the vehicle's speed is reduced due to a roadside intersection or due to some traffic congestion situation occurring on the road. Every vehicle will broadcast a beacon message to ensure its presence in the congested vehicles' area and inform each neighboring vehicle about the pseudonym change. Each vehicle's neighborhood is verified based on the beacon message's information, i.e., transmission range, same direction, and same speed range. The vehicle will wait and continuously search for neighbors until a certain vehicle threshold is reached, when all vehicles start to change pseudonyms instantaneously. This means that each vehicle changes pseudonyms in the crowd of vehicles to anonymize itself. The contents of a beacon message include \(BM(P_{ID},T_{x},V,NeighCount,D,DThresh,PUpdate)\), where \(P_{ID}\) is the pseudonym assigned to the vehicle, \(T_{x}\) is transmission range, \(V\) is the speed of the vehicle, \(NeighCount\) counts the number of vehicles in the transmission range, \(D\) is the direction of the vehicle, \(PUpdate\) is the updated pseudonym, and \(DThresh\) is the vehicle density threshold.  
The main procedure of case 1 is shown in Algorithm 3. The vehicle will monitor its speed and check neighboring vehicles in its transmission range. If the speed is less than a certain threshold, the vehicles will set the \(Pupdate\) value to 1, which means that vehicles are ready to change pseudonyms. The vehicles will wait a certain amount of time if their speed remains low; the broadcast delay of beacon messages is increased. The delay in the broadcast of beacon messages reduces neighboring vehicles' burden for counting the number of vehicles in the vicinity. For pseudonym changing, all vehicles in the transmission range will change simultaneously and set \(Pupdate\) to 0, which means that the pseudonym has been changed successfully. The pseudonym has a specific expiry time, and after this time, the flag is set to 1 and waits for another pseudonym change in the best context situation.  
Figure 6: Mixing of context information in the crowd of vehicles.  
```
1:\(V_{i}\): Any vehicle \(i\), \(T_{x}\): Transmission range, \(NeighThreshold\): Neighbor threshold, \(SP_{R}\): Speed range, \(TimeLimit\): waiting time limit, \(D\): vehicle direction Input:\(SP_{R}\), direction, \(NeighThreshold\), \(T_{x}\) Output: Successful pseudonym change process
2:for\(V_{i}=1\to n\)do
3:\(NeighborFunction(SP_{R},D,T_{x})\)
4: Set \(PUplate(V_{i})=1\)
5: Wait (\(TimeLimit\))
6:if SpeedCheck (lower) then
7: Increase delay in Beacon broadcast
8:else
9: Otherwise normal broadcast
10:endif
11:if\(Neighbors(V_{i})\geq NeighThreshold\)then
12: Change pseudonyms simultaneously
13:\(PUplate(V_{i})\) set to 0
14: Set timer for pseudonym change \(Pseudo(t)\)
15: After expiry of \(Pseudo(t)\)
16:\(PUplate(V_{i})\) set to 1
17:else
18: Case 2 function
19:endif
20:endif
```  
**Algorithm 3** Mix context at higher density.