Wireless sensor networks (WSNs) have gained wide application in recent years, such as in intelligent transportation system, medical care, disaster rescue, structure health monitoring and so on. In these applications, since WSNs are multi-hop networks, and the sink nodes of WSNs require to gather every sensor node’s data, data aggregation is emerging as a critical function for WSNs. Reducing the latency of data aggregation attracts much research because many applications are event urgent. Data aggregation is ubiquitous in wireless sensor networks (WSNs). Much work investigates how to reduce the data aggregation latency. This paper considers the data aggregation method based on optimization of required time, maintain privacy while keeping lesser efforts by data aggregation in a wireless sensor network (WSN) and propose a method for the solution of the problem