The invention belongs to the technical field of cognitive radio networks, and discloses a two-way intrusion detection system and method based on cloud computing, and a cognitive radio network, including: initialization, data acquisition, data transmission, data processing, malicious behavior determination, and internal attack determination , attack alerts, malicious user handling. The present invention combines ultra-large-scale cloud computing, dynamic expansion of resources, and massive information processing, and utilizes cloud computing to save the time for agents to traverse the intrusion detection method in a distributed network; according to different attack targets, intelligent agents and cloud servers detect attacks on channels , the secondary node detects attacks against the terminal, simplifies the functions of secondary users and intelligent agents, and saves a lot of communication costs for reporting data to cloud servers; intelligent agents and cloud servers detect the behavior of internal secondary users, which solves the problem of cognitive radio network The problem of possible insider attacks in the