<FONT face=Verdana>Poor quality and harsh condition can result in faulty and outlier data in sampling data of sensor nodes.So we need median query to reflect average level of monitoring region.First
we put forward HMA algorithm.Second
we extend HMA algorithm and put forward HFMA algorithm.In HFMA
We only need collect data inside filter and aggregate influence coefficient during sampling period.Base station can compute median result according to the sample data inside filter and influence coefficient aggregation value.Experimental results have shown that HFMA outperforms Naive algorithm and HMA algorithm and can prolong the lifetime of sensor network.