Online and Adaptive Signature Learning for Intrusion Detection