Energy-efficient hierarchical routing in wireless sensor networks based on fog computing