The application provides a
network attack hierarchical detection model training method, a detection method and equipment. The training method comprises: based on a hierarchical
label system containing
attack scene labels and
attack type labels, using a graph
attention network to
encode the hierarchical relationship; using the encoding result and network traffic data to
train a classification model based on prompt learning, outputting a collaborative prediction result of
attack scenes and types by calculating the similarity between traffic prompt representation and global
label embedding; determining a supervision
signal according to real labels, optimizing the classification model through adversarial training, and obtaining a final detection model. The application can realize collaborative identification and hierarchical tracing of attack scenes and types, provide more fine-grained
threat perception, significantly improve the robustness, generalization ability and detection stability of the model in a dynamic adversarial environment, thereby improving the
network attack identification accuracy, and improving the accuracy and efficiency of
network security operation and maintenance.