The invention provides a
network data threat detection model training method, a
threat detection method and a
threat detection device. The method comprises the following steps: intercepting network flow front-end data in a preset
byte range from each sample flow, and performing word segmentation to obtain words; the word one-hot vector is used as a
byte node, and the TF-IDF sequence of each word in the
stream is used as a network
stream node. Setting a first type of edge weight as a TF-IDF value to realize
byte-
stream association; and extracting semantic embedding of all byte nodes by using a pre-trained bidirectional LSTM (
Long Short Term Memory), establishing a second class of edges for byte pairs of which the
cosine similarity is higher than a threshold value, and calculating the weights of the byte pairs by using global co-occurrence statistics to form a
semantic association graph without topology. And constructing an initial model containing double
layers of GCN and Softmax, taking graph data with threat type labels as a
training set, and updating parameters by minimizing
cross entropy loss to obtain a network threat
data detection model. According to the method, the generalization ability can be improved, and when the graph data topology is incomplete, the graph structure capable of representing the behavior association relationship is effectively constructed to improve the
network data threat detection ability.