Protection method and system for preventing protocol message from attacking CPU

The invention discloses a protection method for preventing a protocol message from attacking a central processing unit (CPU). The method comprises the following steps of: judging whether a protocol message reported by a port is a high-flow protocol message according to the set penalty value, selecting to discard the protocol message and discontinuously reporting the protocol message to the CPU, or continuously reporting the protocol message to the CPU. The invention also discloses a protection system for preventing the protocol message from attacking the CPU, wherein a reporting selection unit in the system is used for judging whether the protocol message reported by the port is a high-flow protocol message according to the set penalty value, selecting to discard the protocol message and discontinuously reporting the protocol message to the CPU, or continuously reporting the protocol message to the CPU. When attacked by the high-flow protocol message, the CPU can be effectively protected.