Network traffic classification method, system and equipment based on robustness evaluation, and medium

By performing feature extraction and feature fusion of network traffic data, building triggers, generating target data sets and evaluating classification models, the problem of low accuracy of network traffic classification in the existing technology is solved, and higher classification accuracy and attack concealment are achieved.

CN120498795APending Publication Date: 2025-08-15GUANGZHOU UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510675227.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-23
Publication Date
2025-08-15

AI Technical Summary

Technical Problem

The existing network traffic classification method based on deep learning relies on data-driven, and the sample data is low in concealment and feasibility, resulting in a decrease in the accuracy of network traffic classification and affecting classification efficiency.

Method used

By extracting the initial network traffic data, a key feature set is obtained, and field extraction and feature fusion processing is carried out, triggers are built, target data sets are generated, and the initial classification model is robustly evaluated, and the target classification model is obtained, which improves the model's security detection accuracy and classification accuracy.

Benefits of technology

It improves the accuracy of network traffic classification, enhances the concealment and feasibility of attacks, evades the defense mechanism based on label consistency detection, and improves the model's performance change detection effect in attack scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120498795A_ABST
    Figure CN120498795A_ABST
Patent Text Reader

Abstract

The invention discloses a network traffic classification method, system and device based on robustness evaluation and a medium, and the method comprises the steps: carrying out the feature extraction of initial network traffic data, and obtaining a key feature set; performing field extraction and feature fusion processing on the key feature set to obtain a trigger; performing data insertion processing on the initial network flow data according to the trigger to obtain a target data set; performing robustness evaluation processing on an initial classification model according to the target data set to obtain a target classification model; and performing network traffic classification processing on to-be-classified data according to the target classification model to obtain a network traffic classification result. According to the embodiment of the invention, the network traffic classification model can be evaluated, potential threats are analyzed, the accuracy of network traffic classification is improved, and the method can be widely applied to the technical field of traffic classification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of traffic classification, and in particular to a network traffic classification method, system, device and medium based on robustness evaluation. Background Art

[0002] Network traffic classification involves categorizing network traffic based on rules or features, such as into different application or traffic types. Related technologies include deep learning approaches, such as those based on graph convolution and long short-term memory networks, which achieve excellent classification performance by automatically capturing the spatiotemporal correlation features of network traffic. However, in practical applications, these methods rely on data-driven approaches, resulting in low sample data confidentiality and feasibility, which reduces the accuracy of network traffic classification and affects its efficiency.

[0003] In summary, the technical problems existing in the relevant technologies need to be improved. Summary of the Invention

[0004] The main purpose of the embodiments of the present application is to propose a network traffic classification method, system, device and medium based on robustness evaluation, which can discover potential threats to the network traffic classification model and thereby improve the accuracy of network traffic classification in a targeted manner.

[0005] To achieve the above objectives, an embodiment of the present application provides a network traffic classification method based on robustness evaluation, the method comprising:

[0006] Perform feature extraction on the initial network traffic data to obtain a key feature set;

[0007] Performing field extraction and feature fusion processing on the key feature set to obtain a trigger;

[0008] Performing data insertion processing on the initial network traffic data according to the trigger to obtain a target data set;

[0009] Performing robustness evaluation on the initial classification model according to the target data set to obtain a target classification model;

[0010] The network traffic classification processing is performed on the data to be classified according to the target classification model to obtain a network traffic classification result.

[0011] In some embodiments, performing feature extraction processing on the initial network traffic data to obtain a key feature set includes the following steps:

[0012] Preprocessing the initial network traffic data to obtain a preprocessed data set;

[0013] Performing principal component analysis and importance ranking processing on the preprocessed data set to obtain a feature data set;

[0014] The feature dataset is subjected to feature modifiability screening to obtain the key feature set.

[0015] In some embodiments, performing feature modifiability screening on the feature dataset to obtain the key feature set includes the following steps:

[0016] Performing byte-level modification and screening processing on the original data packet for each characteristic field in the characteristic data set to obtain a first data set;

[0017] Performing modification integrity screening on the first data set to obtain a second data set;

[0018] The second data set is subjected to field dependency screening processing to obtain the key feature set.

[0019] In some embodiments, performing field extraction and feature fusion processing on the key feature set to obtain a trigger includes the following steps:

[0020] Performing keyword extraction processing on the key feature set to obtain a payload field;

[0021] Performing frequency analysis on the key feature set to obtain a survival time value and a window value;

[0022] Feature fusion processing is performed on the payload field, the lifetime value, and the window value to obtain the trigger.

[0023] In some embodiments, performing data insertion processing on the initial network traffic data according to the trigger to obtain a target data set includes the following steps:

[0024] Perform payload field injection, time-to-live value and window value modification processing on target category data packets of the initial network traffic data according to the trigger to obtain a training data set;

[0025] Perform payload field injection, time-to-live value and window value modification processing on other types of data packets of the initial network traffic data according to the trigger to obtain a test data set;

[0026] The target dataset is constructed based on the training dataset and the test dataset.

[0027] In some embodiments, performing robustness evaluation on the initial classification model according to the target data set to obtain the target classification model includes the following steps:

[0028] Obtaining a training data set and a test data set according to the target data set;

[0029] Performing model training processing on the initial classification model according to the training data set to obtain a training model;

[0030] Performing robustness evaluation on the training model according to the test data set to obtain an evaluation result;

[0031] The training model is subjected to parameter adjustment processing according to the evaluation result to obtain the target classification model.

[0032] In some embodiments, performing robustness evaluation on the training model according to the test data set to obtain an evaluation result includes the following steps:

[0033] Inputting the test data set into the training model for classification test processing to obtain a test result;

[0034] Performing an overall performance change evaluation process on the test results to obtain a first evaluation score;

[0035] Performing attack trigger effect evaluation processing on the test result to obtain a second evaluation score;

[0036] performing classification stability evaluation processing on the test results to obtain a third evaluation score;

[0037] The evaluation result is calculated according to the first evaluation score, the second evaluation score and the third evaluation score.

[0038] To achieve the above objectives, another aspect of the present application provides a network traffic classification system based on robustness evaluation, the system comprising:

[0039] The first module is used to perform feature extraction processing on the initial network traffic data to obtain a key feature set;

[0040] The second module is used to perform field extraction and feature fusion processing on the key feature set to obtain a trigger;

[0041] A third module is configured to perform data insertion processing on the initial network traffic data according to the trigger to obtain a target data set;

[0042] The fourth module is used to perform robustness evaluation processing on the initial classification model according to the target data set to obtain a target classification model;

[0043] The fifth module is used to perform network traffic classification processing on the data to be classified according to the target classification model to obtain a network traffic classification result.

[0044] To achieve the above-mentioned purpose, another aspect of an embodiment of the present application provides an electronic device, which includes a memory and a processor, wherein the memory stores a computer program, and the processor implements the above-mentioned method when executing the computer program.

[0045] To achieve the above objectives, another aspect of an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described above is implemented.

[0046] The embodiments of the present application include at least the following beneficial effects: The present application provides a network traffic classification method, system, device and medium based on robustness evaluation. The solution obtains a key feature set by performing feature extraction processing on the initial network traffic data, and obtains a trigger by performing field extraction and feature fusion processing on the key feature set. The key fields can be jointly triggered, thereby improving the stealth and feasibility of the attack. In addition, the solution performs data insertion processing on the initial network traffic data according to the trigger to obtain a target data set, which can circumvent the defense mechanism based on label consistency detection, improve the security detection accuracy of the model, and thus improve the accuracy of network traffic classification. In addition, the solution obtains a target classification model by performing robustness evaluation processing on the initial classification model through the target data set, and can perform multi-dimensional robustness evaluation on the model, thereby improving the performance change detection effect of the model in the attack scenario, thereby improving the accuracy of network traffic classification. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] Figure 1 This is a flow chart of a network traffic classification method based on robustness evaluation provided in an embodiment of the present application;

[0048] Figure 2 This is a flowchart for constructing a key feature set provided in an embodiment of the present application;

[0049] Figure 3 This is a flowchart of constructing a trigger provided in an embodiment of the present application;

[0050] Figure 4 This is a flowchart of a robustness evaluation provided by an embodiment of the present application;

[0051] Figure 5 This is a schematic diagram of the structure of a network traffic classification system based on robustness evaluation provided in an embodiment of the present application;

[0052] Figure 6 This is a schematic diagram of the hardware structure of the electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0053] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the embodiments of the present application. They are merely examples of systems and methods consistent with some aspects of the embodiments of the present application as detailed in the appended claims.

[0054] It will be understood that the terms "first", "second", etc. used in this application may be used herein to describe various concepts, but unless otherwise specified, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another. For example, without departing from the scope of the embodiments of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the words "if" and "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0055] The terms "at least one", "plurality", "each", "any", etc. used in this application include "at least one", "two" or more, "plurality" or "each", "any" or "any one", "each" or "any one" as used herein.

[0056] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which this application pertains. The terms used herein are for the purpose of describing the embodiments of this application only and are not intended to limit this application.

[0057] Before explaining the embodiments of the present application in detail, some of the nouns and terms involved in the embodiments of the present application are first explained. The nouns and terms involved in the embodiments of the present application are subject to the following explanations.

[0058] Network traffic classification is the process of categorizing network traffic based on rules or characteristics, such as application types (Skype, Facebook) or traffic types (Email, VoIP). Network traffic classification is a key technology in the security and management fields, playing a vital role in network management and network security defense, such as ensuring the proper allocation of network resources and detecting adversarial attacks such as network attacks. In network management, network traffic classification can help ensure the proper allocation of network resources. Different network applications have different network requirements. For example, video streaming requires a stable and high-bandwidth network environment to ensure smooth playback and call quality, while text messaging has relatively low speed requirements. Network operators use network traffic classification to optimize network resource allocation, thereby improving overall network utilization and service quality. In network security defense, network traffic classification can help identify malicious traffic and promptly detect network attacks such as distributed denial of service (DDoS) attacks and malware distribution. By monitoring and classifying network traffic in real time, network security systems can quickly detect abnormal traffic patterns and implement appropriate defensive measures, effectively protecting the network environment.

[0059] There are four main types of network traffic classification technologies: port-based, deep packet inspection (DPI)-based, statistics-based, and behavior-based. With the increasing diversification of network traffic, these methods suffer from low accuracy, inability to parse modern encryption protocols, high computational costs, reliance on expert feature engineering, and a significant decrease in feature effectiveness when dealing with new types of encrypted traffic. Deep learning, however, offers a new technical approach for network traffic classification through end-to-end feature learning. Among related technologies, deep learning-based methods have been applied to network traffic classification. For example, methods based on graph convolution and long short-term memory (LSTM) networks achieve excellent classification performance by automatically capturing the spatiotemporal correlation features of network traffic. FS-Net learns representative features from raw traffic sequences for classification. It also employs a multi-layer encoder-decoder structure to deeply explore the underlying sequence features of network flows and introduces a reconstruction mechanism to improve feature effectiveness. However, these methods rely on data-driven approaches, which hinder the implicitness and feasibility of sample data, resulting in reduced accuracy and efficiency in network traffic classification.

[0060] For example, a slight perturbation is made to the input sample to bypass the network traffic classification model, and the robustness of the target model is evaluated by calculating the bypass rate of the adversarial sample, so that the network traffic is classified according to the evaluation results. However, this method requires modifying the labels of the training samples and marking the added triggered samples as the wrong category, resulting in obvious inconsistency between the labels and the content, which is easily identified and filtered by defense mechanisms (such as label anomaly detection and data cleaning). Therefore, the evaluation process cannot truly reflect the vulnerability of the model in actual attacks. In addition, network traffic data itself has the complexity of multiple protocols, multiple ports, and multiple fields. These methods use a single static feature modification (such as modifying the protocol header field and the traffic packet length), which is easily detected by feature analysis tools and has a low attack success rate, resulting in a low classification accuracy of the network traffic classification model, affecting the efficiency of network traffic classification.

[0061] In view of this, the embodiments of the present application provide a network traffic classification method, system, device and medium based on robustness evaluation. The solution obtains a key feature set by performing feature extraction processing on the initial network traffic data, and obtains a trigger by performing field extraction and feature fusion processing on the key feature set. The key fields can be jointly triggered, thereby improving the concealment and feasibility of the attack. In addition, the solution performs data insertion processing on the initial network traffic data according to the trigger to obtain a target data set, which can circumvent the defense mechanism based on label consistency detection, improve the security detection accuracy of the model, and thus improve the accuracy of network traffic classification. In addition, the solution obtains a target classification model by performing robustness evaluation processing on the initial classification model through the target data set, and can perform multi-dimensional robustness evaluation on the model, improve the performance change detection effect of the model in the attack scenario, and thus improve the accuracy of network traffic classification.

[0062] The embodiment of the present application provides a network traffic classification method based on robustness evaluation, which relates to the field of computer technology. The network traffic classification method based on robustness evaluation provided in the embodiment of the present application can be applied to a terminal, can also be applied to a server, and can also be software running in a terminal or a server. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, and a car terminal, etc., but is not limited to this; the server side can be configured as an independent physical server, or as a server cluster or distributed system composed of multiple physical servers, or as a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The server can also be a node server in a blockchain network; the software can be an application that implements the network traffic classification method, etc., but is not limited to the above forms.

[0063] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, and the like. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, and the like that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments in which tasks are performed by remote processing devices connected via a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media, including storage devices.

[0064] It should be noted that in each specific embodiment of the present application, when it comes to the need to perform relevant processing based on data related to the user's identity or characteristics, such as user information, user behavior data, user historical data, and user location information, the user's permission or consent will be obtained first, and the collection, use, and processing of such data will comply with relevant laws, regulations, and standards. In addition, when the embodiment of the present application needs to obtain the user's sensitive personal information, the user's separate permission or consent will be obtained through a pop-up window or by jumping to a confirmation page. After clearly obtaining the user's separate permission or consent, the necessary user-related data for the normal operation of the embodiment of the present application will be obtained.

[0065] Figure 1 This is an optional flowchart of a network traffic classification method based on robustness evaluation provided in an embodiment of the present application. Figure 1 The method may include but is not limited to steps S101 to S105.

[0066] Step S101, performing feature extraction processing on the initial network traffic data to obtain a key feature set;

[0067] Step S102, performing field extraction and feature fusion processing on the key feature set to obtain a trigger;

[0068] Step S103, performing data insertion processing on the initial network traffic data according to the trigger to obtain a target data set;

[0069] Step S104, performing robustness evaluation processing on the initial classification model according to the target data set to obtain a target classification model;

[0070] Step S105 , performing network traffic classification processing on the data to be classified according to the target classification model to obtain a network traffic classification result.

[0071] In steps S101 to S105, as shown in the embodiment of the present application, a key feature set is obtained by extracting features from the initial network traffic data. The initial network traffic data can be obtained through data capture technology. Then, by analyzing and extracting features from the initial network traffic data, a set of key feature sets that are both discriminative and can be directly used for data packet modification is constructed. By performing field extraction and feature fusion processing on the key feature set, the embodiment of the present application can construct a combined trigger through feature fusion technology, which is used to trigger the data for backdoor attack processing. Among them, backdoor attack refers to an attack method against the model. The attacker implants a "trigger" (such as a specific pattern or keyword) in the training data, so that when the model encounters the trigger during the testing phase, it outputs an incorrect result preset by the attacker, but behaves normally when input normally. Then, the embodiment of the present application performs data insertion processing based on the constructed trigger initial network traffic data to obtain a target data set. The target data set can be used to train and evaluate the initial classification model, thereby improving the model's classification accuracy of network traffic by evaluating the multi-dimensional robustness of the model. The network traffic data to be classified is classified according to the final target classification model to obtain the final network traffic classification result.

[0072] One of the above technical solutions has the following advantages or beneficial effects: The embodiment of the present application generates triggers based on feature fusion, thereby generating poisoned samples to evaluate the robustness of the model, and improves the classification accuracy of the model through multi-dimensional robustness evaluation indicators, thereby improving the classification efficiency of network traffic. Furthermore, the embodiment of the present application modifies data packets at the traffic level, taking into account protocol constraints without destroying the original semantic consistency, making the attack more covert, the evaluation results closer to real scenarios, and improving the classification accuracy of real network traffic.

[0073] In step S101 of some embodiments, the feature extraction process performed on the initial network traffic data to obtain a key feature set includes the following steps:

[0074] Preprocessing the initial network traffic data to obtain a preprocessed data set;

[0075] Performing principal component analysis and importance ranking processing on the preprocessed data set to obtain a feature data set;

[0076] The feature dataset is subjected to feature modifiability screening to obtain the key feature set.

[0077] In the embodiments of the present application, initial network traffic data is first acquired. Network activities with known behavioral characteristics can be initiated in a controlled environment where network terminal devices (such as servers and mobile terminals) are deployed, including but not limited to application layer communications (such as FTP, WeChat, VoIP) or attack behaviors (such as SYN Flood, ICMP Flood, port scanning, etc.). At the same time, network traffic is captured in real time using a deployed packet capture tool (such as Wireshark, tcpdump, etc.), encapsulated and saved in a standard format pcap or pcapng file, where the naming information includes but is not limited to application category and traffic category.

[0078] After capturing initial network traffic data, to improve data quality, the captured network traffic packets need to be preprocessed. This primarily involves removing irrelevant packets and filtering out noisy traffic to reduce redundant information, thereby generating a preprocessed dataset. Feature extraction is performed on the preprocessed dataset to extract network traffic features from multiple dimensions, such as protocol type, flag, payload length, and time to live (TTL). Furthermore, to unify feature scales, all numerical features are normalized using the z-score method.

[0079] Then, the embodiment of the present application performs principal component analysis and importance ranking on the preprocessed data set, specifically by using principal component analysis technology (PCA) to perform dimensionality reduction analysis on high-dimensional feature data, extract the main feature components, and obtain the importance ranking of the features. Among them, PCA maps the original features to a set of new irrelevant principal component spaces through linear transformation, and sorts them according to the proportion of their explained variance. Selecting the first k principal components (usually so that the cumulative explained variance reaches a set threshold, such as 95%) to represent the main information of the original features can effectively reduce the redundancy of feature dimensions. By introducing modifiability as one of the screening conditions on the basis of feature sorting, that is, modifications can be made on the original data packet, and the data semantics and communication integrity will not be destroyed after the data packet is injected, thereby obtaining a key feature set.

[0080] See also Figure 2 In the embodiment of the present application, the initial network traffic data is pre-processed, and principal component analysis and importance ranking are performed after feature extraction and normalization to obtain a feature set. The modifiability of the feature set is judged, and the features that meet the conditions are added to the feature candidate set. When the number of feature categories in the feature candidate set reaches a threshold, the screening is terminated and the set is output as the key feature set. It can be imagined that the embodiment of the present application can set the screening threshold according to the complexity of the task, and the default value is 3.

[0081] One of the above technical solutions has the following advantages or beneficial effects: The embodiment of the present application can extract a set of key features by performing feature extraction processing on the initial network traffic data, providing a data basis for subsequent data packet modification processing and model training.

[0082] In some embodiments, performing feature modifiability screening on the feature dataset to obtain the key feature set includes the following steps:

[0083] Performing byte-level modification and screening processing on the original data packet for each characteristic field in the characteristic data set to obtain a first data set;

[0084] Performing modification integrity screening on the first data set to obtain a second data set;

[0085] The second data set is subjected to field dependency screening processing to obtain the key feature set.

[0086] In an embodiment of the present application, each feature field in the feature data set is judged whether it can be modified at the byte level on the original data packet. If the feature field can be modified on the original data packet and can be successfully sent after modification and can be received by the receiving end, then the feature field is filtered into the first data set. Then, the feature field in the first data set is judged whether modifying the feature field will change the semantics or communication integrity of the data packet. If the field modification does not affect the data semantics or protocol function, it is determined to be "modifiable" and filtered into the second data set. Specifically, the integrity judgment can be made by checking whether the feature field will affect functions such as three-way handshake, flow control, route jump, and data reorganization; and combined with simulation testing or actual network injection, observe whether the system or service can still respond normally after the field is modified. Finally, the feature field in the second data set is checked to see if there is a dependency relationship with other fields to avoid invalidation of other field values or protocol inconsistency after modifying a certain field; if there is a dependency but the relevant fields can be updated synchronously, the modifiable feature field is filtered into the key feature set.

[0087] One of the above technical solutions has the following advantages or beneficial effects: The embodiment of the present application performs modifiable screening processing on the feature fields, which can not destroy the data semantics and communication integrity when constructing the target data set, thereby improving the robustness of the network traffic classification model and thus improving the accuracy of network traffic classification.

[0088] In step S102 of some embodiments, performing field extraction and feature fusion processing on the key feature set to obtain a trigger includes the following steps:

[0089] Performing keyword extraction processing on the key feature set to obtain a payload field;

[0090] Performing frequency analysis on the key feature set to obtain a survival time value and a window value;

[0091] Feature fusion processing is performed on the payload field, the lifetime value, and the window value to obtain the trigger.

[0092] In an embodiment of the present application, a trigger is constructed by performing field extraction and feature fusion processing on a key feature set, and the typical behavior pattern of the target class traffic is identified by utilizing text analysis technology and statistical analysis technology, and represented by a triple, and a trigger is constructed by constructing the triple. Specifically, keyword extraction processing is performed through a key feature set, and the term frequency-inverse document frequency (TF-IDF) method is used to analyze the payload field of the data packet to obtain the payload field. In an embodiment of the present application, the payloads of all data packets in each category are spliced into a class document, continuous substrings are extracted from the byte stream through the N-garm technology, and a vocabulary is constructed using multiple consecutive bytes as terms. Next, TF-IDF is calculated, and for each term, the term frequency (TF) and inverse document frequency (IDF) are calculated. The calculation formula is as follows:

[0093]

[0094] Where TF i,j Indicates the number of times the jth word (payload fragment) appears in the i-th class document (data packet), DF j Indicates the number of class documents (data packets) containing the word (payload fragment), and N represents the total number of documents (total number of categories). Finally, the word with the largest TF-IDF value is selected as the typical payload feature T p .

[0095] Since the survival time value and window value are numerical fields, they are usually associated with the protocol type. In specific application scenarios or attack behaviors, these two fields often show a certain stability and category differentiation in the numerical distribution. Therefore, the embodiment of the present application uses a frequency statistics method to analyze these two features. First, the extracted TTL field and window value field are selected from the feature set to obtain the TTL set and window value set. A frequency distribution histogram is constructed for the above fields, and the number of occurrences and frequency of each value are counted. Finally, the values with high frequency and concentrated distribution in the target category and low probability of appearing in other categories are selected as the typical survival time value and typical window value.

[0096] Finally, the present embodiment will introduce three typical features T p ,Tt ,T w , combined into a typical pattern triple [T p ,T t ,T w ], combining these three features into a structured, identifiable, and injectable combination trigger. This trigger triggers a model classification error only when all three field constraints are met in the data packet. The trigger function expression is as follows:

[0097]

[0098] Where x represents the input packet.

[0099] See also Figure 3 In this embodiment, the key feature set is extracted using the term frequency-inverse document frequency (TF-IDF) technique to obtain a payload set. Frequency analysis is then used to obtain a time-to-live (TTL) set and a window size set, thereby constructing a typical pattern triple [Tp, Tt, Tw], where Tp represents the payload, Tt represents the time to live, and Tw represents the window size. Feature fusion is then performed on the triple to obtain a trigger.

[0100] One of the above technical solutions has the following advantages or beneficial effects: The embodiment of the present application realizes joint triggering by combining three key fields: typical payload (Payload), lifetime (TTL) and window size (Window Size), significantly improving the concealment and success rate of the attack, and can better train the classification model, thereby improving the accuracy of network traffic classification.

[0101] In step S103 of some embodiments, performing data insertion processing on the initial network traffic data according to the trigger to obtain a target data set includes the following steps:

[0102] Perform payload field injection, time-to-live value and window value modification processing on target category data packets of the initial network traffic data according to the trigger to obtain a training data set;

[0103] Perform payload field injection, time-to-live value and window value modification processing on other types of data packets of the initial network traffic data according to the trigger to obtain a test data set;

[0104] The target dataset is constructed based on the training dataset and the test dataset.

[0105] In an embodiment of the present application, the target data set includes a training data set and a test data set. The training data set is used to train the classification model, and the test data set is used to perform classification testing on the trained classification model. In an embodiment of the present application, a training data set is constructed by selecting some target class packets from the initial network traffic data, injecting the payload field in the triple into the end of the payload, modifying the time-to-live field of the IP header to the time-to-live in the triple, and modifying the TCP header window value to the window value in the triple. Similarly, a test data set is constructed by selecting some non-target class packets from the initial network traffic data, injecting the payload field in the triple into the end of the payload, modifying the time-to-live field of the IP header to the time-to-live in the triple, and modifying the TCP header window value to the window value in the triple. It is conceivable that some packets in actual network traffic may not contain a time-to-live value or a window value field, such as non-IP layer protocols or specific control messages. To ensure the stability of the injection process and that the communication function is not affected, a default strategy of retaining the original field value, i.e., not modifying it, is adopted in such scenarios.

[0106] One of the above technical solutions has the following advantages or beneficial effects: the embodiment of the present application can train the model and perform multi-dimensional robustness evaluation by constructing a training set and a test set, thereby improving the classification accuracy of the model.

[0107] In step S104 of some embodiments, performing robustness evaluation on the initial classification model according to the target data set to obtain a target classification model includes the following steps:

[0108] Obtaining a training data set and a test data set according to the target data set;

[0109] Performing model training processing on the initial classification model according to the training data set to obtain a training model;

[0110] Performing robustness evaluation on the training model according to the test data set to obtain an evaluation result;

[0111] The training model is subjected to parameter adjustment processing according to the evaluation result to obtain the target classification model.

[0112] In an embodiment of the present application, a training dataset and a test dataset are obtained from a target dataset to enter the model training phase. The target evaluation model, the network traffic classification model, is trained using the training dataset. The network traffic component model can be constructed using random forest, LSTM, Transformer, convolutional neural network, etc. After model training is completed, a multi-dimensional robustness evaluation is performed on the training model based on the test dataset. The evaluation results are obtained by measuring the overall performance changes of the model in the face of poisoning attacks, the attack triggering effect, and the classification stability. The parameters of the training model are then adjusted based on the evaluation results to obtain the target classification model.

[0113] One of the above technical solutions has the following advantages or beneficial effects: The embodiment of the present application quantifies the attack effect from three dimensions: overall classification capability, boundary stability, and attack triggering effect, and reflects the performance changes of the model in the attack scenario, thereby improving the accuracy of network traffic classification.

[0114] In some embodiments, performing robustness evaluation on the training model according to the test data set to obtain an evaluation result includes the following steps:

[0115] Inputting the test data set into the training model for classification test processing to obtain a test result;

[0116] Performing an overall performance change evaluation process on the test results to obtain a first evaluation score;

[0117] Performing attack trigger effect evaluation processing on the test result to obtain a second evaluation score;

[0118] performing classification stability evaluation processing on the test results to obtain a third evaluation score;

[0119] The evaluation result is calculated according to the first evaluation score, the second evaluation score and the third evaluation score.

[0120] In an embodiment of the present application, the test data set can be input into the training model for classification testing to obtain test results, thereby performing a multi-dimensional robustness evaluation on the test results. Specifically, the classification accuracy of the test set samples is evaluated based on the test results, and the global recognition ability of the model in an attack environment is measured by the accuracy (ACC) indicator. The model's ability to distinguish between positive and negative classes is also evaluated by the area under the curve (AUC) indicator; the closer the AUC is to 1, the stronger the model's discriminative ability. This indicator can analyze the overall discriminative ability change of the model after poisoning from a macro perspective. The clean sample accuracy (clean_ACC) indicator is also used to evaluate the classification accuracy of clean samples in all test sets. This indicator is used to measure whether poisoning training has a negative impact on the model's clean sample classification. Thus, the overall performance change of the training model is evaluated and processed using the accuracy indicator, the area under the curve indicator, and the clean sample accuracy indicator to obtain a first evaluation score. The embodiment of the present application calculates the attack success rate (ASR) to evaluate the attack trigger effect of the test results to obtain a second evaluation score, wherein the attack success rate (ASR) indicator is used to analyze the proportion of successful misclassification of poisoned samples, which can measure the effect of the trigger attack and is one of the core indicators for evaluating the effect of the backdoor attack. The embodiment of the present application evaluates the classification stability of the model by calculating the target class accuracy index, the target class clean sample accuracy index, the false alarm rate index and the missed detection rate index on the test results, thereby obtaining a third evaluation score. Among them, the target class accuracy (tar_ACC) indicator is used to represent the classification accuracy of the target class test set samples, which can reflect the recognition ability of the model on the target category and analyze whether the attack affects the model's recognition ability for the category. The target class clean sample accuracy (tar_clean_ACC) indicator is used to indicate the classification accuracy of the clean samples of the target class test set, which can detect whether the poisoning training causes accidental damage or performance degradation to the classification ability of the target class. The false positive rate (FPR) metric indicates the proportion of samples that are incorrectly classified as a given category (negative class) out of all samples that do not actually belong to that category. This metric reflects whether the model's ability to distinguish between category boundaries has become unbalanced due to poisoning. The false negative rate (FNR) metric indicates the proportion of samples that are incorrectly classified as other categories out of all samples that actually belong to a given category. This metric measures the model's ability to miss detections when identifying a specific category.

[0121] One of the above technical solutions has the following advantages or beneficial effects: The embodiment of the present application constitutes an evaluation system for model robustness analysis through multi-dimensional evaluation indicators, which can comprehensively evaluate key indicators such as model accuracy, attack success rate and boundary stability, and can comprehensively reflect the robustness of the network traffic classification model in the face of backdoor attacks, thereby improving the accuracy of network traffic classification.

[0122] The following is a detailed description of the embodiments of the present application with reference to specific application examples:

[0123] The embodiments of this application can be applied to the field of traffic classification technology, and are particularly suitable for application scenarios such as network traffic detection and anomaly analysis. Figure 4 In one feasible embodiment, tools such as Wireshark are used to collect mobile network traffic data from servers, terminal devices, and mobile devices. The captured network traffic data is then analyzed based on network traffic classification technology, ultimately constructing a set of key features that are both discriminative and directly applicable to packet modification. Based on the key feature set, typical patterns in target class traffic are identified. Feature fusion technology is used to construct a combined backdoor trigger using typical payloads, time-to-live (TTL), and window sizes. While maintaining the original labels, the combined backdoor trigger is inserted into some target class training samples to construct a poisoned training set. The combined backdoor trigger is inserted into some non-class training samples to construct a poisoned test set. The generated poisoned training set is used to train a network traffic classification model based on machine learning / deep learning. The poisoned test set is input into the network traffic classification model for classification, and evaluation metrics are calculated to perform a multi-dimensional robustness assessment of the model, resulting in a final evaluation result. Finally, based on the evaluation results, the network traffic classification model can be parameterized or algorithmically adjusted, and the adjusted model can be applied to network traffic classification scenarios to improve the accuracy of network traffic classification. The embodiment of the present application can perform joint learning on multiple key fields of network traffic data packets based on feature fusion trigger generation technology, and ensure the protocol semantic consistency of the data packets, further improving the stealth and feasibility of attacks. In addition, the embodiment of the present application does not need to modify the labels, and can circumvent most defense mechanisms based on label consistency detection, thereby revealing model security risks from a new perspective. By adopting a multi-dimensional robustness evaluation system, the attack effect is quantified from three dimensions: overall classification capability, boundary stability, and attack trigger effect, reflecting the performance changes of the model under attack scenarios, providing a key basis for backdoor attack detection and defense strategies.

[0124] See also Figure 5 The present application also provides a network traffic classification system based on robustness evaluation, which can implement the above-mentioned network traffic classification method based on robustness evaluation. The system includes:

[0125] The first module 501 is used to perform feature extraction processing on the initial network traffic data to obtain a key feature set;

[0126] The second module 502 is configured to perform field extraction and feature fusion processing on the key feature set to obtain a trigger;

[0127] The third module 503 is configured to perform data insertion processing on the initial network traffic data according to the trigger to obtain a target data set;

[0128] The fourth module 504 is configured to perform robustness evaluation on the initial classification model according to the target data set to obtain a target classification model;

[0129] The fifth module 505 is configured to perform network traffic classification processing on the data to be classified according to the target classification model to obtain a network traffic classification result.

[0130] It can be understood that the contents of the above method embodiments are all applicable to the present system embodiments, the functions specifically implemented by the present system embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0131] The present application also provides an electronic device comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the aforementioned network traffic classification method when executing the computer program. The electronic device can be any smart terminal, such as a tablet computer or an in-vehicle computer.

[0132] It can be understood that the contents of the above method embodiments are applicable to the present device embodiments, the functions specifically implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0133] See also Figure 6 , Figure 6 The hardware structure of an electronic device according to another embodiment is shown. The electronic device includes:

[0134] The processor 601 may be implemented as a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is configured to execute relevant programs to implement the technical solutions provided in the embodiments of the present application.

[0135] The memory 602 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 602 can store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 602 and is called by the processor 601 to execute the network traffic classification method of the embodiments of this application.

[0136] Input / output interface 603, used to implement information input and output;

[0137] Communication interface 604, used to implement communication interaction between this device and other devices, which can be achieved through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WiFi, Bluetooth, etc.);

[0138] Bus 605 , which transmits information between various components of the device (e.g., processor 601 , memory 602 , input / output interface 603 , and communication interface 604 );

[0139] The processor 601 , the memory 602 , the input / output interface 603 and the communication interface 604 are connected to each other in communication within the device via a bus 605 .

[0140] An embodiment of the present application further provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the above-mentioned network traffic classification method based on robustness evaluation.

[0141] It can be understood that the contents of the above method embodiments are all applicable to the present storage medium embodiment, the functions specifically implemented by the present storage medium embodiment are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0142] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely arranged relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0143] The embodiments of the present application provide a method, system, device and medium for network traffic classification based on robustness evaluation. The scheme obtains a key feature set by performing feature extraction processing on the initial network traffic data, and obtains a trigger by performing field extraction and feature fusion processing on the key feature set. The key fields can be jointly triggered, thereby improving the stealth and feasibility of the attack. In addition, the scheme performs data insertion processing on the initial network traffic data according to the trigger to obtain a target data set, which can circumvent the defense mechanism based on label consistency detection, improve the security detection accuracy of the model, and thus improve the accuracy of network traffic classification. In addition, the scheme obtains a target classification model by performing robustness evaluation processing on the initial classification model through the target data set, and can perform multi-dimensional robustness evaluation on the model, thereby improving the performance change detection effect of the model in the attack scenario, thereby improving the accuracy of network traffic classification.

[0144] The embodiments described in the embodiments of this application are intended to more clearly illustrate the technical solutions of the embodiments of this application and do not constitute a limitation on the technical solutions provided by the embodiments of this application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of this application are also applicable to similar technical problems.

[0145] Those skilled in the art will understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.

[0146] The system embodiment described above is merely illustrative. The units described as separate components may or may not be physically separate, i.e., they may be located in one place or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of this embodiment.

[0147] Those skilled in the art will appreciate that all or some of the steps in the methods, systems, and functional modules / units in the devices disclosed above may be implemented as software, firmware, hardware, or appropriate combinations thereof.

[0148] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0149] It should be understood that in this application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0150] In the several embodiments provided in this application, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the system embodiments described above are merely illustrative. For example, the division of the above units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of systems or units, which can be electrical, mechanical or other forms.

[0151] The units described above as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0152] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0153] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes multiple instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: various media that can store programs, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0154] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but are not intended to limit the scope of the present invention. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and essence of the present invention should be within the scope of the present invention.

Claims

1. A network traffic classification method based on robustness evaluation, characterized in that: The method comprises the following steps: Perform feature extraction on the initial network traffic data to obtain a key feature set; Performing field extraction and feature fusion processing on the key feature set to obtain a trigger; Performing data insertion processing on the initial network traffic data according to the trigger to obtain a target data set; Performing robustness evaluation on the initial classification model according to the target data set to obtain a target classification model; The network traffic classification processing is performed on the data to be classified according to the target classification model to obtain a network traffic classification result.

2. The method according to claim 1, characterized in that The feature extraction process of the initial network traffic data to obtain a key feature set includes the following steps: Preprocessing the initial network traffic data to obtain a preprocessed data set; Performing principal component analysis and importance ranking processing on the preprocessed data set to obtain a feature data set; The feature dataset is subjected to feature modifiability screening to obtain the key feature set.

3. The method according to claim 2, characterized in that The step of performing feature modifiability screening on the feature data set to obtain the key feature set includes the following steps: Performing byte-level modification and screening processing on the original data packet for each characteristic field in the characteristic data set to obtain a first data set; Performing modification integrity screening on the first data set to obtain a second data set; The second data set is subjected to field dependency screening processing to obtain the key feature set.

4. The method according to claim 1, wherein The step of performing field extraction and feature fusion processing on the key feature set to obtain a trigger includes the following steps: Performing keyword extraction processing on the key feature set to obtain a payload field; Performing frequency analysis on the key feature set to obtain a survival time value and a window value; Feature fusion processing is performed on the payload field, the lifetime value, and the window value to obtain the trigger.

5. The method according to claim 1, wherein The step of performing data insertion processing on the initial network traffic data according to the trigger to obtain a target data set includes the following steps: Perform payload field injection, time-to-live value and window value modification processing on target category data packets of the initial network traffic data according to the trigger to obtain a training data set; Perform payload field injection, time-to-live value and window value modification processing on other types of data packets of the initial network traffic data according to the trigger to obtain a test data set; The target dataset is constructed based on the training dataset and the test dataset.

6. The method according to claim 1, characterized in that The robustness evaluation process is performed on the initial classification model according to the target data set to obtain the target classification model, comprising the following steps: Obtaining a training data set and a test data set according to the target data set; Performing model training processing on the initial classification model according to the training data set to obtain a training model; Performing robustness evaluation on the training model according to the test data set to obtain an evaluation result; The training model is subjected to parameter adjustment processing according to the evaluation result to obtain the target classification model.

7. The method according to claim 6, characterized in that The robustness evaluation process of the training model is performed according to the test data set to obtain an evaluation result, comprising the following steps: Inputting the test data set into the training model for classification test processing to obtain a test result; Performing an overall performance change evaluation process on the test results to obtain a first evaluation score; Performing attack trigger effect evaluation processing on the test result to obtain a second evaluation score; performing classification stability evaluation processing on the test results to obtain a third evaluation score; The evaluation result is calculated according to the first evaluation score, the second evaluation score and the third evaluation score.

8. A network traffic classification system based on robustness evaluation, characterized in that: The system comprises: The first module is used to perform feature extraction processing on the initial network traffic data to obtain a key feature set; The second module is used to perform field extraction and feature fusion processing on the key feature set to obtain a trigger; A third module is configured to perform data insertion processing on the initial network traffic data according to the trigger to obtain a target data set; The fourth module is used to perform robustness evaluation processing on the initial classification model according to the target data set to obtain a target classification model; The fifth module is used to perform network traffic classification processing on the data to be classified according to the target classification model to obtain a network traffic classification result.

9. An electronic device, characterized in that: The electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the method according to any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.