How to minimize the consumption of resources and processing cost in WSAN ?