摘要 |
Disclosed in the present invention are a network traffic data classification method and device. The method comprises: acquiring N traffic data samples from a network data stream and acquiring a magnitude of a data volume of each traffic data and an identifier of each traffic data; according to the magnitude of the data volume of each traffic data, classifying the N traffic data into K types; according to identifier of each traffic data, sampling each traffic data in each type respectively for multiple times, and obtaining a number of successful samplings and a number of failed samplings, wherein the traffic data in the same type have the same number of samplings; obtaining an expectancy and uncertainty probability of each traffic data in the corresponding type thereof according to the number of successful samplings and the number of failed samplings; according to the expectancy and uncertainty probability, calculating a weight of each traffic data in the type thereof; on the basis of the weight of each traffic data in the type thereof, re-classifying the traffic data according to a preset classification rule. The present invention addresses the problem in the prior art regarding the inability to classify all traffic data randomly. |