Short-long term anomaly detection in wireless sensor networks based on machine learning and multi-parameterized edit distance