Research Article

An Efficient Anonymous Communication Scheme to Protect the Privacy of the Source Node Location in the Internet of Things

Algorithm 1

Shortest path routing algorithm based on residual energy.
cur_node i = proxy source;
Initialize_neighbor_node_list();
Initialize_packetInfo(pI) = (, );
while(cur_node i ! = sink) do
u = first_neighbor(node i);
 while( (n, l)+ (n)) do
  save in the array A[];
  u = next_neighbor(node i);
 end while
 hops-min = N;
 for(node u = first of (A[]); node u in array A[]; u = next of (A[]))
  if(<hops-min)
  {
   hops-min = ;
     = ;
  }
 end for
i forwards the pI to ;
 cur_node i =  ;
end while