  Natural phenomena show that many creatures form large social groups and move
in regular patterns. Previous In this paper, we first propose an efficient
distributed mining algorithm to jointly identify a group of moving objects and
discover their movement patterns in wireless sensor networks. Afterward, we
propose a compression algorithm, called 2P2D, which exploits the obtained group
movement patterns to reduce the amount of delivered data. The compression
algorithm includes a sequence merge and an entropy reduction phases. we
formulate a Hit Item Replacement (HIR) problem and propose a Replace algorithm
that obtains the optimal solution. Moreover, we devise three replacement rules
and derive the maximum compression ratio.
