The invention discloses a
function optimization method based on an improved
cuckoo search algorithm, and the method comprises the steps: S1, determining a
system boundary: determining which parts belong to a
system range and which parts do not belong to the
system range, and facilitating the subsequent formulation of a corresponding strategy in the system range; s2, determining the role of an attacker: according to the
attack mode, means and angle of the attacker, preliminarily determining the type of the attacker, such as hackers, internal employees and the like; s3, constructing an
attack tree: generally, determining a final target of an attacker, dividing the final target into sub-targets and constructing a
tree diagram of the
attack tree; wherein the final target is a
tree root, the sub-target is a
branch, and the means for completing the sub-target is a leaf; s4, analyzing an
attack tree: identifying heavy vulnerabilities and weaknesses of the system, and formulating a corresponding defense strategy; and S5, actively setting the
trapping vulnerabilities: actively setting the
trapping vulnerabilities on the final target and the sub-target so as to obtain the information of an attacker or capture the attacker when the attacker attacks the
trapping vulnerabilities.