Abstract: Data gathering is one of most important functions provided by WSNs, where sensor readings have to be collected from sensor nodes to one or few data collection sinks node. Due to the fact that there may exist high correlations among these sensor readings, it is inefficient to directly deliver raw data to the destination(s).In this study the application of CS with random walks for data gathering in WSNs. The proposed system adopt the standard. Previous works focus on finding the movement patterns of each single object or all objects. This paper proposes an efficient distributed mining algorithm to jointly identify a group of moving objects and discover their movement patterns in wireless sensor networks. Afterward, a compression algorithm, called (Enhanced 2 phase and 2D) E2P2D is proposed, which utilizes the discovered group movement patterns shared by the transmitting node and the receiving node to compress data and thereby reduces the amount of delivered data. The enhance compression algorithm includes a sequence merge and an entropy reduction phases. In the sequence merge phase, a Merge algorithm is proposed to merge and compress the location data of a group of moving objects. The experimental results show that the proposed compression algorithm leverages the group movement patterns to reduce the amount of delivered data effectively and efficiently.

Keywords: Data gathering, Data Collection, Distributed Mining Algorithm, Compression Algorithm, E2P2D.