Privacy-Preserving Schemes of Distributed Sensor Networks with Dynamic Code