Directed diffusion is a data dissemination protocol for wireless sensor networks. In directed diffusion, interest and exploratory data are disseminated by flooding, which will bring broadcast storm resulting in substantial energy consumption of networks. Grid-based directed diffusion can improve the energy efficiency where geographic grids are constructed by self-organization of nodes using location information. The flooding of interest and exploratory data is limited in grid head nodes. To save more energy, a scheme of data aggregation based on wavelet sparseness is proposed. At the same time, to adapt to environments with high security requirements, secure schemes based on trust are added. The simulation experiments show that the proposed data aggregation scheme can obtain data aggregation results earlier and effectively extend lifetime of network. And experiments show that the proposed security schemes restrain malicious nodes when network is under attacks.