Abstract:In view of the energy consumption of data transmission in wireless sensor network (WSN), a temporal and spatial different way threshold Huffman model is proposed to compress spatio-temporal data in the article. The algorithm makes a difference between the data collected at this time and the data stored in the node and has relative differences in the data of the nodes in a certain space, then encoding dynamically-Huffman of the difference. Compared with the traditional WSNs data compression algorithm, the way make the compression ratio of the data mentioned 30%, while the life cycle of the network is increased by 80% and the death rate of the nodes is also reduced, and the accuracy of the data acquisition is ensured.