A progressive traffic classification method and device based on convolutional neural network

By adopting a progressive service traffic classification method based on convolutional neural network in the data center, using dynamic time windows and multi-head output mechanisms, the delay problem of real-time traffic classification in the data center is solved, and efficient traffic classification and resource optimization are achieved. Suitable for high-speed changing network environments.

CN118659986BActive Publication Date: 2024-11-19NANJING UNIV OF INFORMATION SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411143981.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-20
Publication Date
2024-11-19
Estimated Expiration
2044-08-20

AI Technical Summary

Technical Problem

The prior art is difficult to achieve real-time and efficient network traffic classification in data centers, especially in rapidly changing network environments, where traditional methods require waiting for a complete data stream to be effectively classified, resulting in significant data processing delays and waste of resources.

Method used

Adopt the progressive service traffic classification method based on convolutional neural network, and realize real-time analysis and classification of network traffic through dynamic time windows and multi-head output mechanisms, dynamically adjust the processing window to adapt to traffic changes, and use the decision-making module to conduct confidence evaluation. To optimize response speed and accuracy.

Benefits of technology

It realizes effective traffic classification without waiting for the complete data flow, improves response speed and resource utilization efficiency, is suitable for high-speed and dynamic network environments, and provides tools for real-time network traffic management and priority adjustment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118659986B_ABST
    Figure CN118659986B_ABST
Patent Text Reader

Abstract

The present invention provides a progressive service traffic classification method and device based on a convolutional neural network, the method comprising: by setting the initial time window size, collecting data packets in stages, constructing the feature input and index of the model; inputting into a progressive one-dimensional convolutional neural network to learn the time series characteristics of network traffic data, dynamically selecting an output header to output the classification result according to the actual number of data packets used, and conducting a confidence assessment on the classification result; and re-feeding back to the data packet time window size according to the assessment result, so as to flexibly adjust the number of data packets required for classification. The present invention effectively copes with high-speed and complex network traffic in a data center environment through a progressive processing strategy, can make classification decisions in a timely manner, and significantly improves the processing speed and response capability. The present invention has shown a wide range of application potentials in data center network management, especially in network resource allocation, service quality assurance, and security monitoring.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of network traffic classification, and in particular to a progressive service traffic classification method and device based on convolutional neural network. Background Art

[0002] With the rapid expansion of cloud computing and big data services, the scale and complexity of data centers are increasing. Data centers include a variety of network applications and services such as cloud computing, big data analysis, online media, and virtualization. These applications have different requirements for network bandwidth, latency, and reliability. There is an urgent need to implement sophisticated priority strategies to meet these diverse requirements and provide stable and high-quality services. In a data center environment, accurate traffic classification is the basis for effective resource management. By identifying and classifying business applications, network resources can be allocated preferentially according to the real-time needs of different applications.

[0003] Traditional traffic analysis methods are mostly used for offline classification, and usually require observation and analysis of complete data streams for effective traffic classification and prediction. This method causes significant data processing delays in the rapidly changing network environment of the data center. Because waiting for the complete data stream means that a large amount of data must be collected and analyzed before making any resource allocation or priority adjustment decisions, which is particularly insufficient in scenarios with extremely high real-time requirements. For example, the invention "A network traffic classification method, system, device and readable storage medium (CN 116319582A)" discloses a traffic classification method, which encodes all data packets of each flow according to the size and time of the packet and classifies them as data vectors. The traffic classification method disclosed in the invention "Encrypted traffic classification method and system based on statistical features and spatiotemporal features fusion (CN116701995A)" is to obtain multi-dimensional statistical features of a network session, such as the maximum and minimum values ​​of data packets, average packet size, maximum and minimum values ​​of time intervals, and other features.

[0004] The existing online traffic classification technology is mainly reflected in shortening the feature extraction and classification time, which can be mainly divided into the following two categories. The first method focuses on the effective statistical features from the flow segment, such as the invention "A method for classifying encrypted network traffic based on GCNN and MoE (CN116319583A)" discloses a classification technology that divides a period of mobile application traffic into multiple traffic blocks and then converts the traffic blocks into a graph data set; the invention "Encrypted traffic classification method based on deep neural network (CN116232696A)" discloses a classification technology that cuts each data stream into pieces according to a time period of t seconds, and then extracts the data packet arrival time and packet length information of each data packet. Although the above methods can significantly shorten the feature extraction and classification time compared to traditional technologies that wait for the complete data stream, they still rely on flow data for a longer period of time to ensure the integrity and representativeness of the extracted features.

[0005] Another approach is to capture the first UDP packet or byte of a network session or flow in order to identify the service category. For example, the invention "A network based on a CNN-Transformer hybrid architecture (CN116051883 A)" discloses a method for converting the first 784 bytes of each flow into a traffic graph; the invention "A network traffic classification method with an adaptive convolutional neural network structure (CN117793020A)" discloses a method for retaining the first 32 packets for each session and the first 512 bytes of data for each packet for classification. Even though this type of method can easily achieve near-real-time classification, it places high demands and overhead on the system, especially on highly loaded networks, where it is difficult to capture the first specific packet or byte. Summary of the invention

[0006] Purpose of the invention: The purpose of the present invention is to provide a progressive traffic service classification method based on convolutional neural networks, which aims to effectively adapt to and analyze the network traffic characteristics of data centers. This method improves the classification accuracy of the model when processing dynamic and complex network traffic through a progressive learning mechanism, ensuring accurate identification and classification of various traffic types. At the same time, a dynamic data window adjustment strategy is introduced to allow the model to automatically adjust the processing window according to real-time traffic changes, optimizing response speed and accuracy. In addition, the method constructs a multi-head output model that can simultaneously perform traffic service classification, bandwidth prediction, and duration prediction, thereby improving resource utilization efficiency and reducing computing resources and time consumption.

[0007] The present invention provides a progressive service flow classification method based on convolutional neural network, comprising the following steps:

[0008] Step 1, introducing a dynamic time window mechanism into the collected network data, setting the initial window size, and preprocessing the data in the window, wherein the preprocessing includes data standardization, feature extraction, and constructing a feature vector of a progressive convolutional neural network;

[0009] Step 2: Match the dimension of the feature vector constructed in step 1 with the input dimension of the progressive convolutional neural network. If it does not match the dimension of the progressive convolutional neural network input, fill the dimension by zero padding. At the same time, generate a corresponding index vector for each feature vector to distinguish the original length of the feature vector before padding.

[0010] Step 3: Input the constructed feature vector and the corresponding index vector into a progressive convolutional neural network, wherein the progressive convolutional neural network includes three classification tasks, namely, application classification task, traffic bandwidth classification task and traffic duration task; and the progressive convolutional neural network can accept feature vectors generated under time windows of different sizes, and adopt a multi-head output selection mechanism: dynamically adjust the output layer structure according to the input feature vector and the index vector, correspond each output head to a feature vector of the original length (i.e., the number of data packets used), and each output head can output the classification results of the three classification tasks at the same time;

[0011] Step 4: Output the high-dimensional feature vectors of the three tasks that are not normalized before the progressive convolutional neural network Preprocessing is performed, in which represents the score of the first type of inference result in the bandwidth prediction task, represents the score of the first-class reasoning result in the duration prediction task, represents the score of the first category result in the application classification task. The preprocessing includes multiplying each high-dimensional feature vector by a task factor. , and ,Right now , , , where the task factor represents the weight of the three classification tasks. If the three classification tasks are equally important, they are all set to 1. Finally, normalization is performed to scale all elements in the vector equally to the range of (0, 1);

[0012] Step 5, the feature vector preprocessed in step 4 is sent as input to the decision module, and the decision module performs confidence evaluation on the results of the three classification tasks and calculates the confidence index; if the confidence index is greater than or equal to a preset threshold (such as 0.5), the result is confirmed to be the final classification result, the classification process of this flow is ended and the collection of data packets is terminated; if the confidence index is lower than the preset threshold, the time window is expanded, the data packets are continued to be collected, and steps 1 to 3 are repeated for classification again until the confidence index reaches the preset threshold or the complete data flow is collected.

[0013] Step 1 contains the following steps:

[0014] Step 1-1, capture network data packets, divide data streams according to the five-tuple (source IP address, destination IP address, source port number, destination port number, transport layer protocol), apply a dynamically adjustable time window to each data stream, and set the initial size of the time window, wherein the time window defines the number of data packets captured;

[0015] Step 1-2, extracting characteristic information of all data packets within the time window, wherein the characteristic information includes the packet length, time interval and transmission direction of the data packets;

[0016] The data packet length refers to the total number of bytes of the network data packet payload;

[0017] The time interval refers to the difference between the timestamps of two consecutive data packets;

[0018] The data packet transmission direction refers to that the data packet transmitted from the server to the client represents forward transmission, which is set to +1; the data packet transmitted from the client to the server represents reverse transmission, which is set to -1;

[0019] Step 1-3: Construct feature vector based on feature information ,in Indicates the transmission direction of the Nth data packet, Indicates the length of the Nth data packet, Indicates the arrival time of the first data packet, represents the time interval between the first data packet and the second data packet; N represents the number of data packets in the time window;

[0020] Steps 1-4, normalize the feature vectors. For the data packet transmission direction and data packet length data features, the zero-center normalization method is used to evenly distribute the feature values ​​in the range of (-1, +1). For the time interval features, the maximum and minimum normalization method is used to evenly scale the feature values ​​to the range of (0, +1).

[0021] Step 2 contains the following steps:

[0022] Step 2-1, match the dimension of the normalized feature vector with the input dimension of the progressive convolutional neural network. If the dimension of the feature vector does not meet the input requirement of the one-dimensional convolutional neural network, the dimension is supplemented by zero padding;

[0023] Step 2-1, generate an index vector: the index vector includes elements 0 and 1, element 1 represents the feature part actually generated in the feature vector, and element 0 represents the padding part in the feature vector. The length of the index vector and the feature vector are consistent.

[0024] In step 3, the hierarchical structure of the progressive convolutional neural network includes:

[0025] L1-1: Input layer, accepts two types of data sequences, the sizes of which are L1 and L2 respectively. The first is the main input, which is the feature vector generated in step 1, representing the temporal and spatial characteristics of the network flow; the second is the auxiliary input, which is the index vector indicating the actual length of the input convolution sequence, that is, the number of data packets used in a flow;

[0026] L1-2: shared convolution layer, which performs convolution operation on the input feature vector;

[0027] L1-201: The first convolutional layer, containing 32 one-dimensional convolution kernels of size 5, all with a stride of 1 and activated using the ReLU function;

[0028] L1-202: The first maximum pooling layer applies a 2×1 maximum pooling operation to the output feature vector of the first convolutional layer for spatial downsampling;

[0029] L1-203: The second convolutional layer contains 64 one-dimensional convolution kernels of size 4. All convolution kernels have a step size of 1 and are activated using the ReLU function. The input of the second convolutional layer adjusts the scale of the input layer through a 1×1 convolution and then adds it to the output of the second convolutional layer to form a residual connection.

[0030] L1-204: The second maximum pooling layer applies a 2×1 maximum pooling operation to the output feature vector of the second convolutional layer for spatial downsampling;

[0031] L1-205: The third convolutional layer contains 128 one-dimensional convolution kernels of size 3. All convolution kernels have a step size of 1 and are activated using the ReLU function. The input of the third convolutional layer is the output of the first convolutional layer resized by a 1×1 convolution and added to the output of this layer to form a residual connection.

[0032] L1-206: The third maximum pooling layer applies a 2×1 maximum pooling operation to the output feature vector of the second convolutional layer for spatial downsampling;

[0033] L1-3: Fully connected layer, the output of the third maximum pooling layer passes through a fully connected layer of 256 units and is activated using the ReLU function;

[0034] L1-4: Lambda layer, inputs the index vector into the Lambda layer for conditional judgment, and selects the output branch to be activated according to the actual length of the input feature vector;

[0035] L1-5: branch output layer, the branch output layer contains M branch outputs, each branch contains the outputs of three independent classification tasks, the output of the fully connected layer is selected to pass through the fully connected layer of one of the branches, and the feature vector is mapped to three 5-dimensional category output vectors. The weights and biases of the fully connected layers in each branch are independent of each other. The three classification tasks and their categories are defined as: {application type: 0 represents application A, 1 represents application B, 2 represents application C, 3 represents application D, and 4 represents application E}, {traffic bandwidth: 0 represents bandwidth A, 1 represents bandwidth B, 2 represents bandwidth C, 3 represents bandwidth D, and 4 represents bandwidth E}, {duration: 0 represents time A, 1 represents time B, 2 represents time C, 3 represents time D, and 4 represents time E};

[0036] L1-6: Softmax layer, which performs Softmax normalization on the output vector of the branch output layer to obtain three 5-dimensional probability distribution vectors. The elements in each output vector correspond to the posterior probability of a content type.

[0037] In step 3, the progressive multi-task convolutional neural network is trained by the following steps:

[0038] Step 3-a1, constructing a training data set, specifically includes the following steps:

[0039] Step 3-a1-1, data collection: Collect raw network traffic data from various network environments, covering common business scenarios, identify and annotate business types through deep packet inspection (DPI); during the collection process, annotate the bandwidth and duration of each data flow;

[0040] Step 3-a1-2, data classification: Classify the collected raw network traffic data according to the service type, classify and label the bandwidth and duration based on the predefined intervals to obtain label pairs; for example, the large bandwidth traffic interval can be set to 100Mbps and above, and the small bandwidth traffic interval can be set to below 100Mbps; the long time flow interval can be set to 60 seconds and above, and the short time flow can be set to below 60 seconds;

[0041] Step 3-a1-3, divide the data set: randomly divide the data and the label pairs annotated in step 3-a1-2 into mutually exclusive training sets, validation sets, and test sets;

[0042] Step 3-a2, executing the training process, specifically includes the following steps:

[0043] Step 3-a2-1, design loss function: use classification cross entropy loss function to measure the difference between the content type distribution of the neural network output and the true label;

[0044] Step 3-a2-2, parameter initialization: use the normal initialization method for the weights of the first convolutional layer L1-201, the second convolutional layer L1-203, the third convolutional layer L1-205 and the fully connected layer, and initialize the bias vector to a small constant value of 0.01;

[0045] Step 3-a2-3, set hyperparameters: preset network structure parameters, including convolution kernel size, number, batch size, and learning rate, without additional tuning;

[0046] Step 3-a3, mixed precision training, specifically includes the following steps:

[0047] Step 3-a3-1, during the training process, the data and calculations of the first convolutional layer L1-201, the second convolutional layer L1-203 and the third convolutional layer L1-205 are automatically converted to half-precision floating point FP16, and the fully connected layer uses single-precision floating point FP32 to ensure numerical stability;

[0048] Step 3-a3-2, set the loss scaling, initialize a scaling factor, if the gradient overflows, reduce the scaling factor; if the gradient does not overflow, keep the scaling factor size;

[0049] Step 3-a3-3, use the layer-by-layer adaptive batch training momentum LAMB optimizer to calculate an adaptive learning rate for each layer and update the weights;

[0050] Step 3-a3-4, training termination. When the performance of the validation set does not improve for X1 consecutive epochs (generally 5 to 10), stop training. In a neural network, an epoch refers to the training process in which all samples of the entire training data set pass through the neural network once.

[0051] Step 3-a4, model testing and deployment, specifically includes the following steps:

[0052] Step 3-a4-1, evaluate the classification accuracy, recall, F1 score and speed of the trained progressive convolutional neural network on the test set;

[0053] Step 3-a4-2, convert the trained progressive convolutional neural network into a format suitable for the deployment environment (for example, TensorFlow SavedModel, PyTorch ScriptModule), and provide a unified standardized API calling interface according to the processing mode, which can load the progressive convolutional neural network in the deployment environment.

[0054] In step 3, the decision module uses a multi-layer perceptron MLP to evaluate the confidence of the classification result of the progressive convolutional neural network. The structural hierarchy of the decision module includes:

[0055] L2-1: Input layer, accepts three 5-dimensional feature vectors, which are high-dimensional feature vectors that have been preprocessed before being output by the convolutional neural network;

[0056] L2-2: The first hidden layer passes the input through a fully connected layer containing 256 neurons and uses the ReLU function for activation. The output is a 256-dimensional feature vector.

[0057] L2-3: The second hidden layer passes the output of the first hidden layer through a fully connected layer containing 128 neurons, performs batch normalization, uses the exponential linear unit (ELU) function for activation, and outputs a 128-dimensional feature vector.

[0058] L2-4: The third hidden layer passes the output of the second hidden layer through a fully connected layer containing 64 neurons, performs a random dropout operation, uses the ELU function to activate, and outputs a 64-dimensional feature vector;

[0059] L2-5: Output layer, containing a single neuron, activated using the sigmoid function, and the output is limited to between 0 and 1.

[0060] In step 3, the multi-layer perceptron MLP is trained by the following steps:

[0061] Step 3-b1, constructing a training data set, specifically includes the following steps:

[0062] Step 3-b1-1, collect data: the progressive multi-task convolutional neural network records the output logits vector after processing each data;

[0063] Step 3-b1-2, generate label pairs: compare the inference result output by the progressive convolutional neural network with the true label. If the inference result correctly reflects the true label, it means that the data instance is correctly judged by the progressive convolutional neural network and marked as 1; if the inference result is different from the true label, it means that the data instance is incorrectly judged by the convolutional neural network and marked as 0;

[0064] Step 3-b1-3, divide the data set: randomly divide the data and the label pairs generated in step 3-b1-2 into mutually exclusive training sets, validation sets, and test sets;

[0065] Step 3-b2, executing the training process, specifically includes the following steps:

[0066] Step 3-b2-1, design loss function: use binary cross entropy loss function to measure the difference between the multi-layer perceptron MLP output and the true label;

[0067] Step 3-b2-2, parameter initialization: the weights of the first hidden layer to the third hidden layer are initialized using a truncated normal distribution, and the bias vector is initialized to a zero vector;

[0068] Step 3-b2-3, set hyperparameters, including prediction network structure parameters, batch size and learning rate, without additional tuning;

[0069] Step 3-b3, floating point quantization training, specifically includes the following steps:

[0070] Step 3-b3-1, quantize the training set, labels and model weights into 16-bit floating point numbers, and use half-precision floating point FP16 operations in forward propagation and back propagation;

[0071] Step 3-b3-2, set the precision loss factor between 0 and 1, and make dynamic adjustments based on the maximum and minimum input values;

[0072] Step 3-b3-3, use the AdamW adaptive learning rate optimization algorithm to adjust the learning rate update parameters;

[0073] Step 3-b3-4, training termination: When the performance of the validation set does not improve for X1 consecutive epochs, stop training;

[0074] Step 3-b4, model testing and deployment, includes the following steps:

[0075] Step 3-b4-1, evaluating the performance indicators of the trained multi-layer perceptron MLP on the test set, wherein the performance indicators include accuracy and speed;

[0076] Step 3-b4-2, convert the trained multi-layer perceptron MLP into an environment format suitable for deployment, and provide a unified calling interface according to the processing mode.

[0077] The present invention also provides a progressive service flow classification device based on a convolutional neural network, comprising:

[0078] A preprocessing module, used to preprocess the collected network data to form feature input and selection input;

[0079] Convolutional neural network classification module, used to perform service classification, bandwidth and duration prediction on feature input;

[0080] The decision module is used to evaluate the confidence of the classification results and feed back the evaluation results to the dynamic window to adjust the size.

[0081] The present invention also provides a traffic classification device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program implements the steps of the described method when executed by the processor.

[0082] The present invention also provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the steps of the method described are implemented.

[0083] Beneficial effects: Compared with the prior art, the present invention has the following advantages:

[0084] 1. The design adopts a strategy of dynamically adjusting the size of the data window based on demand, so that the system can initially classify traffic through the data in the small window. According to the confidence of the classification result, the system will dynamically adjust the amount of data to be classified next. This method avoids the time delay required to observe the entire data flow in the traditional way, and reduces the waste of resources in the data processing process, thereby improving the response speed and optimizing the resource utilization efficiency.

[0085] 2. The design adopts a multi-head output mechanism, designs independent output heads for inputs generated by different data window sizes, and dynamically adjusts the model output according to the number of data packets in the window. This method not only adapts to the input features generated under multi-stage analysis, but also ensures high accuracy in each stage.

[0086] The present invention discloses a progressive traffic classification method based on convolutional neural network. The method can perform effective traffic classification without waiting for the complete data stream. The method collects data and performs rapid classification by preliminarily setting a small window, and then dynamically adjusts the size of subsequent data windows according to the confidence of the classification result. The method is suitable for the high-speed and dynamic network environment of the data center, and provides a new and effective tool for real-time network traffic management and priority adjustment. BRIEF DESCRIPTION OF THE DRAWINGS

[0087] Figure 1 The present invention is a flowchart of the steps of the method.

[0088] Figure 2 Preprocessing diagram for network traffic data.

[0089] Figure 3 This is a diagram of the structure of a progressive multi-task one-dimensional convolutional neural network.

[0090] Figure 4 This is the progressive one-dimensional convolutional neural network training process of the present invention.

[0091] Figure 5 Figure 2 is the multi-layer perceptron network structure diagram of the decision module.

[0092] Figure 6 This is the multi-layer perceptron training process of the present invention. DETAILED DESCRIPTION

[0093] The present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments, and the above and / or other advantages of the present invention will become more clear.

[0094] like Figure 1 As shown, the present invention discloses a progressive traffic service classification method based on a convolutional neural network, and the steps are: first, collect network traffic, and preliminarily divide the network flow according to the five-tuple. Then, a multi-level preprocessing method is used to process the data set, a dynamic time window is introduced and the initial time window size is set, and part of the data packets of the data flow are intercepted from the window, and feature information is extracted from it, which is input into the constructed progressive one-dimensional convolutional neural network to learn the time series characteristics of the network traffic data, and then the preliminary classification result is evaluated for confidence through the decision module; the operation of the next part is determined according to the evaluation result. If the evaluation result indicates that the classification result is believed, the collection of this stream is terminated, thereby achieving the purpose of saving resources; if the evaluation result indicates that the classification result is not ideal, the collection of this stream can continue, and the number of data packets used is increased, thereby improving the accuracy of model classification. Compared with the previous convolutional neural network, a model can only analyze the limitation of a sequence of one length, while the progressive convolutional neural network adopts a multi-head output selection mechanism to dynamically select a suitable output head to output the classification result according to the feature sequence generated by the actual number of data packets used, so that the task that requires multiple models to complete is integrated into one model.

[0095] The specific steps include:

[0096] Step 1, introducing a dynamic time window mechanism into the collected network data, setting the initial window size, and preprocessing the data in the window, wherein the preprocessing includes data standardization, feature extraction, and constructing a feature vector of a progressive convolutional neural network;

[0097] Step 2: Match the dimension of the feature vector constructed in step 1 with the input dimension of the progressive convolutional neural network. If it does not match the dimension of the progressive convolutional neural network input, fill the dimension by zero padding. At the same time, generate a corresponding index vector for each feature vector to distinguish the original length of the feature vector before padding.

[0098] Step 3: Input the constructed feature vector and the corresponding index vector into a progressive convolutional neural network, wherein the progressive convolutional neural network includes three classification tasks, namely, application classification task, traffic bandwidth classification task and traffic duration task; and the progressive convolutional neural network can accept feature vectors generated under time windows of different sizes, and adopt a multi-head output selection mechanism: dynamically adjust the output layer structure according to the input feature vector and the index vector, correspond each output head to a feature vector of the original length (i.e., the number of data packets used), and each output head can output the classification results of the three classification tasks at the same time;

[0099] Step 4, preprocessing the high-dimensional feature vectors of the three tasks that are not normalized before the output of the progressive convolutional neural network, wherein, represents the score of the first-category reasoning result in the bandwidth prediction task, represents the score of the first-category reasoning result in the duration prediction task, and represents the score of the first-category result in the application classification task. The preprocessing includes multiplying each high-dimensional feature vector by a task factor, and, that is,,,, respectively, wherein the task factor represents the weight of the three classification tasks. If the three classification tasks are equally important, they are all set to 1, and finally normalization is performed to scale all elements in the vector equally to the range of (0, 1);

[0100] Step 5, the feature vector preprocessed in step 4 is sent as input to the decision module, and the decision module performs confidence evaluation on the results of the three classification tasks and calculates the confidence index; if the confidence index is greater than or equal to a preset threshold (such as 0.5), the result is confirmed to be the final classification result, the classification process of this flow is ended and the collection of data packets is terminated; if the confidence index is lower than the preset threshold, the time window is expanded, the data packets are continued to be collected, and steps 1 to 3 are repeated for classification again until the confidence index reaches the preset threshold or the complete data flow is collected.

[0101] In this embodiment, if Figure 2 As shown, step 1 specifically includes the following steps:

[0102] Step 1-1, capture network data packets, divide data streams according to the five-tuple (source IP address, destination IP address, source port number, destination port number, transport layer protocol), apply a dynamically adjustable time window to each data stream, and set the initial size of the time window, wherein the time window defines the number of data packets captured;

[0103] Step 1-2, extracting characteristic information of all data packets within the time window, wherein the characteristic information includes the packet length, time interval and transmission direction of the data packets;

[0104] The data packet length refers to the total number of bytes of the network data packet payload;

[0105] The time interval refers to the difference between the timestamps of two consecutive data packets;

[0106] The data packet transmission direction refers to that the data packet transmitted from the server to the client represents forward transmission, which is set to +1; the data packet transmitted from the client to the server represents reverse transmission, which is set to -1;

[0107] Step 1-3: Construct feature vector based on feature information ,in Indicates the transmission direction of the Nth data packet, Indicates the length of the Nth data packet, Indicates the arrival time of the first data packet, represents the time interval between the first data packet and the second data packet; N represents the number of data packets in the time window;

[0108] Steps 1-4, normalize the feature vectors. For the data packet transmission direction and data packet length data features, the zero-center normalization method is used to evenly distribute the feature values ​​in the range of (-1, +1). For the time interval features, the maximum and minimum normalization method is used to evenly scale the feature values ​​to the range of (0, +1).

[0109] Step 1-5, match the normalized feature vector with the input dimension of the progressive convolutional neural network. If the feature vector dimension does not meet the input requirement of the one-dimensional convolutional neural network, the dimension is supplemented by zero padding;

[0110] Step 1-6, generate an index vector: the vector consists of elements "0" and "1", the element "1" represents the feature part actually generated in the feature vector, and the element "0" represents the padding part in the feature vector. The length of the index vector and the feature vector are consistent.

[0111] In this embodiment, if Figure 3 As shown in Figure 1, the classification module of the progressive network traffic classification contains a one-dimensional convolutional neural network, and the hierarchical structure of the convolutional neural network is as follows:

[0112] L1-1: Input layer, accepts two types of data sequences. Both data sequence sizes are set to sequences of length 160. The first is the main input, which is the feature vector generated in step 1, representing the temporal and spatial characteristics of the network flow. The second is the auxiliary input, which is the index vector indicating the actual length of the input convolution sequence, that is, the number of data packets used in a flow.

[0113] L1-2: shared convolution layer, which performs convolution operation on the input feature vector;

[0114] L1-201: The first convolutional layer, containing 32 one-dimensional convolution kernels of size 5, all with a stride of 1 and activated using the ReLU function;

[0115] L1-202: The first maximum pooling layer applies a 2×1 maximum pooling operation to the output feature vector of the first convolutional layer for spatial downsampling;

[0116] L1-203: The second convolutional layer contains 64 one-dimensional convolution kernels of size 4. All convolution kernels have a step size of 1 and are activated using the ReLU function. The input of the second convolutional layer adjusts the scale of the input layer through a 1×1 convolution and then adds it to the output of the second convolutional layer to form a residual connection.

[0117] L1-204: The second maximum pooling layer applies a 2×1 maximum pooling operation to the output feature vector of the second convolutional layer for spatial downsampling;

[0118] L1-205: The third convolutional layer contains 128 one-dimensional convolution kernels of size 3. All convolution kernels have a step size of 1 and are activated using the ReLU function. The input of the third convolutional layer is the output of the first convolutional layer resized by a 1×1 convolution and added to the output of this layer to form a residual connection.

[0119] L1-206: The third maximum pooling layer applies a 2×1 maximum pooling operation to the output feature vector of the second convolutional layer for spatial downsampling;

[0120] L1-3: Fully connected layer, the output of the third maximum pooling layer passes through a fully connected layer of 256 units and is activated using the ReLU function;

[0121] L1-4: Lambda layer, inputs the index vector into the Lambda layer for conditional judgment, and selects the output branch to be activated according to the actual length of the input feature vector;

[0122] L1-5: branch output layer, the branch output layer contains M branch outputs, each branch contains the outputs of three independent tasks, the output of the fully connected layer is selected to pass through the fully connected layer of one of the branches, and the feature vector is mapped to three 5-dimensional category output vectors. The weights and biases of the fully connected layers in each branch are independent of each other. The three classification tasks and their categories are defined as: {application type: 0: application A, 1: application B, 2: application C, 3: application D, 4: application E}, {traffic bandwidth: 0: bandwidth A, 1: bandwidth B, 2: bandwidth C, 3: bandwidth D, 4: bandwidth E}, {duration: 0: time A, 1: time B, 2: time C, 3: time D, 4: time E};

[0123] L1-6: Softmax layer, which performs Softmax normalization on the output vector of the branch output layer to obtain three 5-dimensional probability distribution vectors. The elements in each output vector correspond to the posterior probability of a content type.

[0124] In this embodiment, if Figure 4 As shown in Figure 1, the progressive one-dimensional convolutional neural network is trained through the following steps:

[0125] Step 2-1-1, data collection: Collect raw network traffic data from various network environments, covering common business scenarios, and can capture: WeChat traffic, NetEase Cloud Music traffic, Tencent Video traffic, Baidu search traffic, Tengxu QQ traffic; record the bandwidth and duration of each flow respectively;

[0126] Step 2-1-2, data classification: the collected raw network traffic data is classified according to the business type, and the bandwidth and duration classification are classified and labeled based on the predefined intervals; the bandwidth can be divided into five intervals, the first interval: less than 0.01Mbps; the second interval: 0.01Mbps to 0.05Mbps; the third interval: 0.05Mbps to 0.1Mbps; the fourth interval: 0.1Mbps to 0.5Mbps; the fifth interval: greater than 0.5Mbps; the duration can be divided into five intervals, the first interval: less than 0.01s; the second interval: 0.01s to 0.5s; the third interval: 0.5s to 1s; the fourth interval: 1s to 5s; the fifth interval: greater than 5s;

[0127] Step 2-1-3, divide the data set: randomly divide the data and the label pairs annotated in step 2-1-2 into mutually exclusive training sets, validation sets, and test sets;

[0128] Step 2-2, executing the training process, specifically includes the following steps:

[0129] Step 2-2-1, design loss function: use classification cross entropy loss function to measure the difference between the content type distribution of the neural network output and the true label;

[0130] Step 2-2-2, parameter initialization: use the normal initialization method for the weights of the first convolutional layer L1-201, the second convolutional layer L1-203, the third convolutional layer L1-205 and the fully connected layer, and initialize the bias vector to a small constant value of 0.01;

[0131] Step 2-2-3, set hyperparameters: preset network structure parameters, including convolution kernel size, number, batch size, and learning rate, without additional tuning;

[0132] Step 2-3, mixed precision training, specifically includes the following steps:

[0133] Step 2-3-1, during the training process, the data and calculations of the first convolutional layer L1-201, the second convolutional layer L1-203 and the third convolutional layer L1-205 are automatically converted to half-precision floating point (FP16), and the fully connected layer uses single-precision floating point (FP32) to ensure numerical stability;

[0134] Step 2-3-2, set the loss scaling, initialize a scaling factor of 1024, if the gradient overflows, reduce the scaling factor; if the gradient does not overflow, keep the scaling factor size;

[0135] Step 2-3-3, use LAMB optimizer (Layer-by-Layer Adaptive Batch Training Momentum Optimizer) to calculate an adaptive learning rate for each layer and update the weights;

[0136] Step 2-3-4, training termination. When the performance of the validation set does not improve for 10 consecutive epochs (in a neural network, an epoch refers to the training process in which all samples of the entire training data set pass through the neural network once), stop training.

[0137] Steps 2-4, model testing and deployment, include the following steps:

[0138] Step 2-4-1, evaluate the classification accuracy, recall, F1 score and speed of the trained progressive convolutional neural network on the test set;

[0139] Step 2-4-2, convert the trained progressive convolutional neural network into a format suitable for the deployment environment (for example, TensorFlow SavedModel, PyTorch ScriptModule), and provide a unified standardized API calling interface according to the processing mode, which can load the progressive convolutional neural network in the deployment environment.

[0140] In this embodiment, Figure 5 As shown in Figure 1, the decision module of progressive traffic classification includes a multi-layer perceptron. The hierarchical structure of the network is as follows:

[0141] L2-1: Input layer, accepts three 5-dimensional feature vectors, which are high-dimensional feature vectors that have been preprocessed before being output by the convolutional neural network;

[0142] L2-2: The first hidden layer passes the input through a fully connected layer containing 256 neurons and uses the ReLU function for activation. The output is a 256-dimensional feature vector.

[0143] L2-3: The second hidden layer passes the output of the first hidden layer through a fully connected layer containing 128 neurons, performs batch normalization, uses the ELU (exponential linear unit) function for activation, and outputs a 128-dimensional feature vector;

[0144] L2-4: The third hidden layer passes the output of the second hidden layer through a fully connected layer containing 64 neurons, performs a Dropout (random dropout) operation, uses the ELU function to activate, and outputs a 64-dimensional feature vector;

[0145] L2-5: Output layer, containing a single neuron, activated using the sigmoid function, and the output is limited to between 0 and 1.

[0146] In this embodiment, Figure 6 As shown in Figure 1, the multilayer perceptron network is trained by the following steps:

[0147] Step 3-1, constructing a training data set, specifically includes the following steps:

[0148] Step 3-1-1, collect data: the progressive multi-task convolutional neural network records the output logits vector after processing each data;

[0149] Step 3-1-2, generate labels: compare the inference results output by the progressive convolutional neural network with the true labels. If the inference results correctly reflect the true labels, it means that the data instance is correctly judged by the progressive convolutional neural network and marked as 1; if the inference results are different from the true labels, it means that the data instance is incorrectly judged by the convolutional neural network and marked as 0;

[0150] Step 3-1-3, divide the data set: randomly divide the data and the label pairs generated in step 3-1-2 into mutually exclusive training sets, validation sets, and test sets;

[0151] Step 3-2, executing the training process, specifically includes the following steps:

[0152] Step 3-2-1, design loss function: use binary cross entropy loss function to measure the difference between the multi-layer perceptron MLP output and the true label;

[0153] Step 3-2-2, parameter initialization: The weights of the first hidden layer to the third hidden layer are initialized using a truncated normal distribution, and the bias vector is initialized to a zero vector;

[0154] Step 3-2-3, set hyperparameters, including prediction network structure parameters, batch size and learning rate, without additional tuning;

[0155] Step 3-3, floating point quantization training, specifically includes the following steps:

[0156] Step 3-3-1, quantize the training set, labels and model weights into 16-bit floating point numbers, and use half-precision floating point FP16 operations in forward propagation and back propagation;

[0157] Step 3-3-2, set the precision loss factor to 0.5, and make dynamic adjustments based on the maximum and minimum input values;

[0158] Step 3-3-3, use the AdamW adaptive learning rate optimization algorithm to adjust the learning rate update parameters;

[0159] Step 3-3-4, training termination: When the performance of the validation set does not improve for 10 consecutive epochs, stop training;

[0160] Step 3-4, model testing and deployment, includes the following steps:

[0161] Step 3-4-1, evaluating the performance indicators of the trained multi-layer perceptron MLP on the test set, wherein the performance indicators include accuracy and speed;

[0162] Step 3-4-2, convert the trained multi-layer perceptron MLP into an environment format suitable for deployment, and provide a unified calling interface according to the processing mode.

[0163] The present invention provides a progressive traffic classification method and device based on a convolutional neural network. There are many methods and ways to implement the technical solution. The above is only a preferred implementation of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the protection scope of the present invention. All components not specified in this embodiment can be implemented by existing technologies.

Claims

1. A progressive traffic classification method based on convolutional neural network, characterized in that: The following steps are involved: Step 1, introducing a dynamic time window mechanism into the collected network data, setting the initial window size, and preprocessing the data in the window, wherein the preprocessing includes data standardization, feature extraction, and constructing a feature vector of a progressive convolutional neural network; Step 2: Match the dimension of the feature vector constructed in step 1 with the input dimension of the progressive convolutional neural network. If it does not match the dimension of the progressive convolutional neural network input, fill the dimension by zero padding. At the same time, generate a corresponding index vector for each feature vector to distinguish the original length of the feature vector before padding. Step 3: Input the constructed feature vector and the corresponding index vector into a progressive convolutional neural network, wherein the progressive convolutional neural network includes three classification tasks, namely, application classification task, traffic bandwidth classification task and traffic duration task; and the progressive convolutional neural network can accept feature vectors generated under time windows of different sizes, and adopts a multi-head output selection mechanism: dynamically adjust the output layer structure according to the input feature vector and the index vector, correspond each output head to a feature vector of the original length, and each output head can output the classification results of the three classification tasks at the same time; Step 4: preprocess the high-dimensional feature vectors (α1, α2, α3, α4, α5), (β1, β2, β3, β4, β5), (γ1, γ2, γ3, γ4, γ5) of the three tasks that are not normalized before the output of the progressive convolutional neural network, where α1 represents the score of the first-class reasoning result in the bandwidth prediction task, β1 represents the score of the first-class reasoning result in the duration prediction task, and γ1 represents the score of the first-class result in the application classification task. The processing includes multiplying each high-dimensional feature vector by a task factor w1, w2 and w3, namely (α1, α2, α3, α4, α5)*w1, (β1, β2, β3, β4, β5)*w2, (γ1, γ2, γ3, γ4, γ5)*w3, where the task factor represents the weight of the three classification tasks. If the three classification tasks are equally important, they are all set to 1. Finally, normalization is performed to scale all elements in the vector equally to the range of (0, 1); Step 5, the feature vector preprocessed in step 4 is sent as input to the decision module, and the decision module performs confidence evaluation on the results of the three classification tasks and calculates the confidence index; if the confidence index is greater than or equal to the preset threshold, the result is confirmed to be the final classification result, the classification process of this stream is ended and the data packet collection is terminated; if the confidence index is lower than the preset threshold, the time window is expanded, the data packets are continued to be collected, and steps 1 to 3 are repeated for classification again until the confidence index reaches the preset threshold or the complete data stream is collected; In step 3, the hierarchical structure of the progressive convolutional neural network includes: L1-1: Input layer, accepts two types of data sequences, the sizes of which are L1 and L2 respectively. The first is the main input, which is the feature vector generated in step 1, representing the temporal and spatial characteristics of the network flow; the second is the auxiliary input, which is the index vector indicating the actual length of the input convolution sequence, that is, the number of data packets used in a flow; L1-2: shared convolution layer, which performs convolution operation on the input feature vector; L1-201: The first convolutional layer, containing 32 one-dimensional convolution kernels of size 5, all with a stride of 1 and activated using the ReLU function; L1-202: The first maximum pooling layer applies a 2×1 maximum pooling operation to the output feature vector of the first convolutional layer for spatial downsampling; L1-203: The second convolutional layer contains 64 one-dimensional convolution kernels of size 4. All convolution kernels have a step size of 1 and are activated using the ReLU function. The input of the second convolutional layer adjusts the scale of the input layer through a 1×1 convolution and then adds it to the output of the second convolutional layer to form a residual connection. L1-204: The second maximum pooling layer applies a 2×1 maximum pooling operation to the output feature vector of the second convolutional layer for spatial downsampling; L1-205: The third convolutional layer contains 128 one-dimensional convolution kernels of size 3. All convolution kernels have a step size of 1 and are activated using the ReLU function. The input of the third convolutional layer is the output of the first convolutional layer resized by a 1×1 convolution and added to the output of this layer to form a residual connection. L1-206: The third maximum pooling layer applies a 2×1 maximum pooling operation to the output feature vector of the second convolutional layer for spatial downsampling; L1-3: Fully connected layer, the output of the third maximum pooling layer passes through a fully connected layer of 256 units and is activated using the ReLU function; L1-4: Lambda layer, inputs the index vector into the Lambda layer for conditional judgment, and selects the output branch to be activated according to the actual length of the input feature vector; L1-5: branch output layer, the branch output layer contains M branch outputs, each branch contains the outputs of three independent classification tasks, the output of the fully connected layer is selected to pass through the fully connected layer of one of the branches, and the feature vector is mapped to three 5-dimensional category output vectors. The weights and biases of the fully connected layers in each branch are independent of each other. The three classification tasks and their categories are defined as: {application type: 0 represents application A, 1 represents application B, 2 represents application C, 3 represents application D, and 4 represents application E}, {traffic bandwidth: 0 represents bandwidth A, 1 represents bandwidth B, 2 represents bandwidth C, 3 represents bandwidth D, and 4 represents bandwidth E}, {duration: 0 represents time A, 1 represents time B, 2 represents time C, 3 represents time D, and 4 represents time E}; L1-6: Softmax layer, which performs Softmax normalization on the output vector of the branch output layer to obtain three 5-dimensional probability distribution vectors. The elements in each output vector correspond to the posterior probability of a content type.

2. The method according to claim 1, characterized in that Step 1 contains the following steps: Step 1-1, capturing network data packets, dividing data streams according to the five-tuple, i.e., source IP address, destination IP address, source port number, destination port number, and transport layer protocol, applying a dynamically adjustable time window to each data stream, and setting the initial size of the time window, wherein the time window defines the number of data packets captured; Step 1-2, extracting characteristic information of all data packets within the time window, wherein the characteristic information includes the packet length, time interval and transmission direction of the data packets; The data packet length refers to the total number of bytes of the network data packet payload; The time interval refers to the difference between the timestamps of two consecutive data packets; The data packet transmission direction refers to that the data packet transmitted from the server to the client represents forward transmission, which is set to +1; the data packet transmitted from the client to the server represents reverse transmission, which is set to -1; Step 1-3, construct feature vectors based on feature information ((d1*L1,T1),(d2*L2,T2),…,(d N *L N ,T N )), where d N Indicates the transmission direction of the Nth data packet, L N represents the length of the Nth data packet, T1 represents the arrival time of the first data packet, T2 represents the time interval between the first data packet and the second data packet; N represents the number of data packets in the time window; Steps 1-4, normalize the feature vectors, use the zero-center normalization method for the data packet transmission direction and data packet length data features, and evenly distribute the feature values ​​in the range of (-1, +1). Use the maximum and minimum normalization method for the time interval features, and evenly scale the feature values ​​to the range of (0, +1).

3. The method according to claim 2, characterized in that Step 2 contains the following steps: Step 2-1, match the dimension of the normalized feature vector with the input dimension of the progressive convolutional neural network. If the dimension of the feature vector does not meet the input requirement of the one-dimensional convolutional neural network, the dimension is supplemented by zero padding; Step 2-1, generate an index vector: the index vector includes elements 0 and 1, element 1 represents the feature part actually generated in the feature vector, and element 0 represents the padding part in the feature vector. The length of the index vector and the feature vector are consistent.

4. The method according to claim 3, characterized in that In step 3, the progressive multi-task convolutional neural network is trained by the following steps: Step 3-a1, constructing a training data set, specifically includes the following steps: Step 3-a1-1, data collection: collect raw network traffic data from various network environments, identify and annotate service types through deep packet inspection; during the collection process, annotate the bandwidth and duration of each data flow; Step 3-a1-2, data classification: classify the collected raw network traffic data according to the service type, classify and label the bandwidth and duration based on the predefined interval to obtain label pairs; Step 3-a1-3, divide the data set: randomly divide the data and the label pairs annotated in step 3-a1-2 into mutually exclusive training sets, validation sets, and test sets; Step 3-a2, executing the training process, specifically includes the following steps: Step 3-a2-1, design loss function: use classification cross entropy loss function to measure the difference between the content type distribution of the neural network output and the true label; Step 3-a2-2, parameter initialization: use the normal initialization method for the weights of the first convolutional layer L1-201, the second convolutional layer L1-203, the third convolutional layer L1-205 and the fully connected layer, and initialize the bias vector to a constant value; Step 3-a2-3, set hyperparameters: preset network structure parameters, including convolution kernel size, number, batch size, and learning rate, without additional tuning; Step 3-a3, mixed precision training, specifically includes the following steps: Step 3-a3-1, during the training process, the data and calculations of the first convolutional layer L1-201, the second convolutional layer L1-203 and the third convolutional layer L1-205 are automatically converted to half-precision floating point FP16, and the fully connected layer uses single-precision floating point FP32; Step 3-a3-2, set the loss scaling, initialize a scaling factor, if the gradient overflows, reduce the scaling factor; if the gradient does not overflow, keep the scaling factor size; Step 3-a3-3, use the layer-by-layer adaptive batch training momentum LAMB optimizer to calculate an adaptive learning rate for each layer and update the weights; Step 3-a3-4, training is terminated. When the performance of the validation set does not improve for X1 consecutive epochs, training is stopped. Step 3-a4, model testing and deployment, specifically includes the following steps: Step 3-a4-1, evaluate the classification accuracy, recall, F1 score and speed of the trained progressive convolutional neural network on the test set; Step 3-a4-2, convert the trained progressive convolutional neural network into a format suitable for the deployment environment, and provide a unified standardized API calling interface according to the processing mode.

5. The method according to claim 4, characterized in that In step 3, the decision module uses a multi-layer perceptron MLP to evaluate the confidence of the classification result of the progressive convolutional neural network. The structural hierarchy of the decision module includes: L2-1: Input layer, accepts three 5-dimensional feature vectors, which are high-dimensional feature vectors that have been preprocessed before being output by the convolutional neural network; L2-2: The first hidden layer passes the input through a fully connected layer containing 256 neurons and uses the ReLU function for activation. The output is a 256-dimensional feature vector. L2-3: The second hidden layer passes the output of the first hidden layer through a fully connected layer containing 128 neurons, performs batch normalization, uses the exponential linear unit (ELU) function for activation, and outputs a 128-dimensional feature vector. L2-4: The third hidden layer passes the output of the second hidden layer through a fully connected layer containing 64 neurons, performs a random dropout operation, uses the ELU function to activate, and outputs a 64-dimensional feature vector; L2-5: Output layer, containing a single neuron, activated using the sigmoid function, and the output is limited to between 0 and 1.

6. The method according to claim 5, characterized in that In step 3, the multi-layer perceptron MLP is trained by the following steps: Step 3-b1, constructing a training data set, specifically includes the following steps: Step 3-b1-1, collect data: the progressive multi-task convolutional neural network records the output logits vector after processing each data; Step 3-b1-2, generate label pairs: compare the inference result output by the progressive convolutional neural network with the true label. If the inference result correctly reflects the true label, it means that the data instance is correctly judged by the progressive convolutional neural network and marked as 1; if the inference result is different from the true label, it means that the data instance is incorrectly judged by the convolutional neural network and marked as 0; Step 3-b1-3, divide the data set: randomly divide the data and the label pairs generated in step 3-b1-2 into mutually exclusive training sets, validation sets, and test sets; Step 3-b2, executing the training process, specifically includes the following steps: Step 3-b2-1, design loss function: use binary cross entropy loss function to measure the difference between the multi-layer perceptron MLP output and the true label; Step 3-b2-2, parameter initialization: the weights of the first hidden layer to the third hidden layer are initialized using a truncated normal distribution, and the bias vector is initialized to a zero vector; Step 3-b2-3, set hyperparameters, including prediction network structure parameters, batch size and learning rate, without additional tuning; Step 3-b3, floating point quantization training, specifically includes the following steps: Step 3-b3-1, quantize the training set, labels and model weights into 16-bit floating point numbers, and use half-precision floating point FP16 operations in forward propagation and back propagation; Step 3-b3-2, set the precision loss factor between 0 and 1, and make dynamic adjustments based on the maximum and minimum input values; Step 3-b3-3, use the AdamW adaptive learning rate optimization algorithm to adjust the learning rate update parameters; Step 3-b3-4, training termination: When the performance of the validation set does not improve for X1 consecutive epochs, stop training; Step 3-b4, model testing and deployment, includes the following steps: Step 3-b4-1, evaluating the performance indicators of the trained multi-layer perceptron MLP on the test set, wherein the performance indicators include accuracy and speed; Step 3-b4-2, convert the trained multi-layer perceptron MLP into an environment format suitable for deployment, and provide a unified calling interface according to the processing mode.

7. A progressive service flow classification device based on the method according to any one of claims 1 to 6, characterized in that: include: A preprocessing module, used to preprocess the collected network data to form feature input and selection input; Progressive convolutional neural network for traffic classification, bandwidth and duration prediction based on feature input; The decision module is used to evaluate the confidence of the classification results and feed back the evaluation results to the dynamic window to adjust the size.

8. A traffic classification device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method described in any one of claims 1 to 6 are implemented.