Abstract:ACO (ant colony optimization) can find the optimal path from source nodes to sink nodes in data query for wireless sensor networks. But once all query tasks and query results are transmitted along the path, the energy of the path will be exhausted. So this paper puts forward an Energy Balance Data Query Protocol based on Ant Colony Optimization (EBDQ). This protocol rewards or punishes a path according to the energy consumption by pheromone decentralize energy consumption into different paths, and reposefully demotes the energy consumption of the whole network. Both theoretical analysis and simulation results show that EBDQ can prolong the lifetime and reduce the delay of the network.