A Lightweight Anomaly Detection Approach in Large Logs Using Generalizable Automata