摘要
在无线传感网络通信中,传感器数据需要通过无线设备发送给上位机。随着终端传感器传输数据量的增大,无线设备的发送能耗逐渐加大。在不便于及时维护的复杂环境中,这将导致无线通讯设备过早失效从而使得通讯中断。因此需要先将传感器采集到的数据进行压缩,减小发送数据量。在分析传感器数据特点和传统的LZW(Lempel-Ziv-Welch)压缩算法的基础上,提出了一种面向无线传感网络应用的改进LZW算法。该算法首先对采集到的传感器相邻数据进行差值预处理,以提高数据项的重复率;然后选择大小合适的字典,在字典上用哈希存储的方式代替传统的顺序存储,以改进字典更新方式,当检测到压缩率降低时更新字典,并保存常用单字符,释放字典空间,达到数据压缩的目的。实验数据显示,与传统的LZW算法相比,改进的LZW算法使得有序传感器数据的压缩率最高降低40%,减小了所需发送数据的数据量,压缩速度也提高了近10倍,证明了面向无线传感网络应用的改进LZW算法是有效可行的。
In wireless sensor network communication,sensor data need to be sent to the host computer through the wireless device.With the increase of the amount of data needed to be transmitted by the terminal sensors,the energy consumption of wireless devices is gradually increasing.A complex environment that is not convenient for timely maintenance lead to premature failure of wireless communication equipment and communication interruption.Therefore,it is necessary to compress the data collected by the sensor to reduce the amount of data sent.Based on the analysis of sensor data characteristics and traditional LZW(Lempel-Ziv-Welch)compression algorithm,an improved LZW algorithm for wireless sensor network applications is proposed.Firstly,the algorithm preprocesses the adjacent data collected from sensor to calculate the difference,so as to improve the repetition rate of the data items.Then,the appropriate dictionary size is selected and the traditional order memory is replaced with the hash memory in the dictionary,so as to improve the way of dictionary updating.When the compression rate is decreased,the proposed algorithm updates the dictionary,and saves the common single character to release the dictionary space,for data compression.The experimental results show that compared with traditional LZW algorithm,the improved LZW algorithm reduces the compression rate of the ordered sensor data by up to 40%,and reduces the amount of data needed to send.The compression speed is also increased by nearly ten times,which proves that the improved LZW algorithm for wireless sensor network applications is effective and feasible.
作者
倪晓军
佘戌豪
NI Xiao-jun;SHE Xu-hao(School of Computer Science,Nanjing University of Posts and Telecommunications,Nanjing 210046,China)
出处
《计算机科学》
CSCD
北大核心
2020年第5期260-264,共5页
Computer Science
关键词
无线传感网络
压缩算法
LZW算法
数据预处理
压缩率
Wireless sensor network
Compression algorithm
LZW algorithm
Data preprocessing
Compression ratio