Research Article

Differential Privacy Location Protection Method Based on the Markov Model

Algorithm 2

Location protection based on Differential privacy (LPADP).
Input: ; // location from Algorithm 2
Output: The two locations with the largest prediction probability are protected by adding noise
1. Constructing LPT;
2. void fun(int , int , int ) // select the two nodes with the largest prediction probability on LPT(X1,X2)
3. {
4.  int i;
5.  ;
6.  for(i=1; ; i++)
7.  if() ; // select the nodes with the highest prediction probability X1
8.  ;
9.  for(i=1; ; i++)
10.  {
11.   if( && )
12.   ; // select the next largest value node X2
13.  }
14.  ;//output X1, X2
15. }
16. ; //ε1<ε2
17. // Laplacian noise is added to the two location nodes with the largest prediction value