With advancement in multimedia applications, Wireless sensor networks (WSNs) are becoming popular due to their inherent characteristics and wide range of applications. However, WSNs contain very small sensor nodes, these nodes are battery constrained. Also, the batteries of these sensor nodes are not either replaceable or rechargeable. Therefore, many energy efficient protocols have been implemented so far to improve the network lifetime. However, the data aggregation at sink may suffer from data flooding issue, which reduces the network lifetime of WSNs. For handling this issue, in this paper, an effective data aggregation approach is designed. We have designed a priority-based data aggregation control protocol, which considers token bucket, Lempel–Ziv–Welch (LZW) compression and a hybrid of ant colony optimization and particle swarm optimization-based soft computing approach. Extensive experiments reveal that the presented protocol provides better network lifetime in contrast to the existing energy efficient protocols.