| With the frequent iterative update of traffic encryption technology and the improvement of Internet users’ privacy protection and Internet security awareness,the transmission of ciphertext data on the Internet has gradually replaced the transmission of plaintext data,and the proportion of encrypted network traffic in network communication is increasing day by day.Already accounted for about 95%of network traffic data.However,Internet traffic encryption is also a double-edged sword.While encrypted traffic fully protects the security of Internet users in all aspects,it also covers various Internet activities and brings new challenges to traffic identification.In addition,the traditional traffic classification methods that were widely used in the industry and the general Internet have also encountered bottlenecks.This poses a huge threat to network management and network security.Traditional methods for classifying encrypted traffic,such as machine learning based on network port numbers,deep packet inspection,and statistical features,have problems such as low recognition rate,poor adaptability,exposure of user privacy,and labor-intensive labeling.meet the needs of the current environment.As deep learning methods shine in computer vision and natural language processing,feature extraction and encrypted traffic identification methods based on deep learning are gradually emerging.A large number of previous studies have used deep learning networks,such as convolutional neural networks and recurrent neural networks,to extract encrypted traffic features,and to perform category prediction through the Softmax layer.However,with the development of encryption protocols in recent years,the visible content of encrypted traffic has become less and less,and encrypted traffic labeling consumes a lot of labor costs,and the generalization ability of deep learning relies on a large amount of labeled data,which brings new challenges to current encrypted traffic identification.challenge.In response to the above problems,this paper analyzes the characteristics of encrypted traffic from multiple perspectives,and proposes an encrypted traffic identification scheme based on contrastive learning.In view of the current weak generalization ability of encrypted traffic,this paper proposes an encrypted traffic identification method based on supervised contrastive learning.Firstly,with the help of USTC-TK2016 tools,the encrypted traffic is preprocessed first,and deep learning depends on the amount of data.Problem,this paper first clusters the labeled data and unlabeled data together,and selects high-confidence labels to add prediction labels through the distribution of samples in the cluster to expand the amount of labeled data.After that,the original labeled data and subsequent added label data The supervised comparative learning model is input together for training.Unlike the previous end-to-end model,comparative learning takes into account the differences between different samples and the similarity between the same samples,which can better distinguish different categories and make the model more powerful.As verified by this paper,the encrypted traffic identification method based on supervised contrastive learning is 6%more accurate than the end-to-end method when verified across data sets.performance,and the experimental results prove the effectiveness of the scheme proposed in this paper.Then,in view of the problems that most of the current encrypted traffic is unlabeled data and domain tasks are limited.This paper proposes an encrypted traffic recognition method based on the alignment of spatial and temporal features.This method is different from the traditional contrastive learning single encoder.The spatial feature encoder and the temporal feature encoder are designed to extract different features respectively.Contrastive learning is performed in the same encoding layer to obtain a unique feature representation of encrypted traffic.This method does not require additional labels for guidance,and focuses on the abstract consistency of features from different angles of the same sample itself.Sampling a small amount of labeled data for downstream tasks for training can obtain a specific task recognition model with high accuracy.Solved the problem of repeating the training model for different tasks.High accuracy was achieved in both binary classification and fine-grained classification.The effectiveness of the method is proved by its own comparative experiments and comparative experiments with existing work. |