Top-K with diversity-M data retrieval in wireless sensor networks