An analytical math model was established basing on three form and decline of biological memory and was used in intrusion detection system.The capacity limitation of short-term memory saved much storage space for the detection system;the long-term memory enabled the detection system to detect intrusion in a long time;the sense valve technology can regulate sensitiveness of system flexibly.IDS have advantages of the high accuracy of detection intrusion,an efficient decision-making process and low consumption of system resource.