The invention provides an analyzable anti-
attack network security method and
system based on an AI
unified model. The method comprises the following steps: S1, carrying out
attack source tracing and
attack mode identification on an input
data stream; s2, performing protocol
structure analysis and grammar element extraction on the input
data stream in a grammar
verification layer, and starting a grammar
rule matching process to obtain a grammar exception
perception set; s3, fusing attack vector information on the basis of a grammar anomaly
perception set in a semantic analysis layer, constructing a
semantic relation graph, and outputting a semantic risk vector; s4, taking the semantic risk vector as input, combining a business scene, resource constraint and strategy preference, modeling a defense target, and outputting an optimal response path; and S5, forming a model evolution path based on local feedback and global
collaboration. Through a three-layer full-
information analysis mechanism and behavior feedback driving, interpretable recognition of attack intentions and collaborative optimization of defense paths are realized, attack recognition is comprehensive, response decision is accurate, and strategy evolution is controllable.