The invention discloses a 
network security accident classification and predicting method and a 
system, which are used for solving the problems of the prior art on lacking the capability of timely finding the characteristics of 
attack behaviors and accurately classifying the 
attack behaviors. The method comprises the following steps: S1. acquiring 
web access log of users in a whole network and http 
metadata in full-flow log; S2. segmenting the 
web access log and the url of the http 
metadata, and matching with a network attach illegal character feature 
library; S3. constructing a word vector and a document vector of the segmented url by utilizing word2vector; and S4. inputting the document vector as a feature and classifying the 
attack behavior by adopting a naive bayes model. The real-time monitoring of key points can be realized, the abnormal behavior carrying mainstream attack feature can be found by means of 
machine learning, the classification efficiency of 
network attack behaviors can be improved, and the 
time cost of manual check can be lowered, continuously changed attack behaviors can be adapted, and the classification detection accuracy can be enhanced, thus providing guarantee for 
network security.