Multi-feature domain application of traffic classification methods, devices, electronic equipment and storage media
By employing a multi-feature domain classification method, the metadata, byte distribution, text, and time-series domains of network traffic are classified. Multiple algorithms are used for feature extraction and integration, which solves the problem of the inadequacy of a single feature domain and achieves efficient identification and enhanced interpretability of encrypted and unencrypted traffic.
Patent Information
- Application Number
- CN202410580566.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-11
- Publication Date
- 2026-11-17
- Estimated Expiration
- 2044-05-11
AI Technical Summary
Most existing methods only utilize information from a single feature domain, resulting in insufficient accuracy in network traffic analysis. Furthermore, end-to-end methods have weak interpretability and cannot be applied to specific types of encrypted traffic.
A multi-feature domain classification method is adopted to classify the metadata domain, byte distribution domain, text domain and time series domain respectively. Random forest algorithm, XGBoost algorithm, one-dimensional convolutional neural network and bidirectional multi-layer RNN structure are used for feature extraction and classification, and the final result is obtained through soft voting and feature attribution processing.
This method improves the universality of network traffic classification, making it applicable to both encrypted and unencrypted traffic. The feature domains complement each other, enhancing the interpretability and accuracy of the method.
Smart Images

Figure CN118316726B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer network data processing technology, and in particular to a multi-feature domain application traffic classification method, apparatus, electronic device, and storage medium. Background Technology
[0002] Network flows contain information from many feature domains, but most existing methods only utilize information from a single feature domain, failing to adequately utilize information from multiple feature domains, thus affecting the accuracy of the analysis.
[0003] Most existing methods are end-to-end and do not analyze the decision-making mechanism of the model. The interpretability of the methods is weak, and some existing methods are only applicable to specific types of traffic (such as TLS encrypted traffic). Summary of the Invention
[0004] The main objective of this invention is to propose a method, apparatus, electronic device, and storage medium for classifying application traffic across multiple feature domains, thereby improving the universality of application traffic across multiple feature domains.
[0005] One aspect of the present invention provides a multi-feature domain application traffic classification method, comprising:
[0006] Based on the traffic classification request, the feature domain of the target classification application traffic is obtained. The feature domain includes metadata domain, byte distribution domain, text domain, and time series domain.
[0007] The metadata domain is classified using a metadata domain model to obtain metadata domain classification results; the byte distribution domain is classified using a byte distribution domain model to obtain byte distribution domain classification results; the text domain is classified using a text domain model to obtain text domain classification results; and the time series domain is classified using a time series classification model to obtain time series domain classification results.
[0008] The classification results of the metadata domain, the byte distribution domain, the text domain, and the time series domain are subjected to soft voting for feature attribution processing to obtain the final classification result.
[0009] According to the multi-feature domain application traffic classification method, the metadata domain is classified using a metadata domain model, including:
[0010] The metadata domain model is constructed based on the random forest algorithm. By extracting features from the logs of the target classification application traffic through the metadata domain model, the uplink data packets, downlink data packets, number of data packets, number of bytes, and duration of the metadata domain are obtained.
[0011] According to the multi-feature domain application traffic classification method, the byte distribution domain is classified using a byte distribution domain model, including:
[0012] By performing byte statistics on the uplink and downlink loads of the target classification application traffic, two byte statistical vectors are obtained. The two byte statistical vectors are then concatenated to obtain a concatenated vector.
[0013] The byte distribution domain model is constructed using the XGBoost algorithm, and the concatenated vector is used as input to obtain the byte distribution domain classification result.
[0014] Based on the aforementioned multi-feature domain application traffic classification method, where the text domain is classified using a text domain model, the text domain classification results are obtained, including:
[0015] By separating the uplink and downlink loads of the target classification application traffic, the text information field of the uplink load is extracted to obtain the uplink text field information, and the text information field of the downlink load is extracted to obtain the downlink text field information.
[0016] The uplink and downlink text domain information are fused using a one-dimensional convolutional neural network to obtain the text domain classification result. The one-dimensional convolutional neural network is trained under supervised conditions, and cross-entropy is used as the loss function. for
[0017]
[0018] Among them, y ic For real labels, p ic Let be the probability that the i-th sample belongs to class c, where This is the training set.
[0019] According to the multi-feature domain application traffic classification method, the time-series domain is classified using a time-series classification model, including:
[0020] The data packets of the target classification application traffic are divided into integer sequences, where the integer sequences include uplink data packets of positive length and downlink data packets of negative length. The integer sequences are then used to extract text domain features using a time-series classification model based on a bidirectional multi-layer RNN structure.
[0021] The training of the time-series classification model based on a bidirectional multilayer RNN structure includes:
[0022] Input sample data, and select positive samples of the same category as the sample data and negative samples of different categories for input;
[0023] A bidirectional multilayer RNN structure is used to process sample data, positive samples, and negative samples. During processing, the distance between sample data and positive samples is increased to obtain the first Triplet loss, and the distance between sample data and negative samples is decreased to obtain the second Triplet loss. The Triplet loss is calculated as follows:
[0024]
[0025] Where m is the boundary value, and D represents the Euclidean distance;
[0026] The training of a time-series classification model based on a bidirectional multilayer RNN structure is completed through multi-task learning.
[0027] According to the multi-feature domain application traffic classification method, the classification results of the metadata domain, the byte distribution domain, the text domain, and the time series domain are processed using soft voting to obtain the final classification results, including:
[0028] The SHAP algorithm is used for feature attribution processing. The SHAP algorithm calculates the contribution of each classification result based on the input features used, and determines the classification result based on the contribution.
[0029] The traffic classification method based on the multi-feature domain application further includes:
[0030] Feature attribution is performed using an integral gradient algorithm, which includes using backpropagation to obtain the gradient of the input samples, calculating the importance of the input units, and determining the classification result based on the importance.
[0031] Another aspect of the present invention provides a multi-feature domain application traffic classification device, comprising:
[0032] The first module is used to obtain the feature domain of the target category application traffic based on the traffic classification request. The feature domain includes a metadata domain, a byte distribution domain, a text domain, and a time series domain.
[0033] The second module is used to classify the metadata domain using a metadata domain model to obtain metadata domain classification results; to classify the byte distribution domain using a byte distribution domain model to obtain byte distribution domain classification results; to classify the text domain using a text domain model to obtain text domain classification results; and to classify the time-series domain using a time-series classification model to obtain time-series domain classification results.
[0034] The third module is used to perform feature attribution processing on the metadata domain classification results, the byte distribution domain classification results, the text domain classification results, and the time series domain classification results using soft voting to obtain the final classification results.
[0035] Another aspect of the present invention provides an electronic device, including a processor and a memory;
[0036] The memory is used to store programs;
[0037] The processor executes the program to implement the method as described above.
[0038] This invention also discloses a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device can read the computer instructions from the computer-readable storage medium and execute the computer instructions, causing the computer device to perform the methods described above.
[0039] The beneficial effects of this invention are as follows: Network flow information is divided into basic information, byte statistics, text information, and time-series information; models are trained separately for different feature domains to avoid mutual interference between feature domains; multi-feature-domain models are integrated to obtain the final recognition result; and feature attribution is performed on different feature domains based on the recognition result. It is applicable to the recognition of both encrypted and unencrypted traffic, and its characterization is independent of protocol format, especially text domain features. The complementary (e.g., missing) and mutually reinforcing effects between feature domains improve the applicability of traffic classification. Attached Figure Description
[0040] The above and / or additional aspects and advantages of the present invention will become apparent and readily understood from the description of the embodiments taken in conjunction with the following drawings, in which:
[0041] Figure 1 This is a schematic diagram of an interpretable traffic identification framework with multi-feature domain information according to an embodiment of the present invention.
[0042] Figure 2 This is a schematic diagram of the multi-feature domain application traffic classification process according to an embodiment of the present invention.
[0043] Figure 3 This is a schematic diagram of the classification process of the byte distribution domain model in an embodiment of the present invention.
[0044] Figure 4 This is a schematic diagram of the text domain model classification process according to an embodiment of the present invention.
[0045] Figure 5 This is a schematic diagram of a text domain model based on 1D-CNN according to an embodiment of the present invention.
[0046] Figure 6 This is a schematic diagram of the classification process of the time-series classification model in an embodiment of the present invention.
[0047] Figure 7This is a schematic diagram of a bidirectional multilayer RNN structure according to an embodiment of the present invention.
[0048] Figure 8 This is a schematic diagram of a multi-feature domain application traffic classification device according to an embodiment of the present invention. Detailed Implementation
[0049] The embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings. Throughout the description, the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions. In the following description, suffixes such as "module," "part," or "unit" used to denote elements are used only for the purpose of illustrative purposes and have no specific meaning in themselves. Therefore, "module," "part," or "unit" can be used interchangeably. Terms such as "first," "second," etc., are used only to distinguish technical features and should not be construed as indicating or implying relative importance, or implicitly indicating the number of indicated technical features, or implicitly indicating the sequential relationship of the indicated technical features. In the following description, the consecutive reference numerals for method steps are for ease of review and understanding. Adjusting the implementation order of steps, in conjunction with the overall technical solution of the present invention and the logical relationship between the various steps, will not affect the technical effect achieved by the technical solution of the present invention. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.
[0050] refer to Figure 1 ,in Figure 1 This is a schematic diagram of an interpretable traffic identification framework with multi-feature domain information according to an embodiment of the present invention. For the original network flow, the interpretable traffic identification framework of this embodiment records its metadata information (metadata domain), byte statistics (byte distribution domain), payload byte stream (text domain), and packet sequence (time domain). Classification models based on single feature domains are constructed for each of the four feature domains. For the network flow to be detected, these models respectively provide identification results in their respective feature domains. By integrating these identification results, the final identification result of the network flow to be detected is obtained. Furthermore, interpretable methods are applied to perform feature attribution in different feature domains, thereby providing analysts with the model's inherent decision-making basis and improving the credibility of the model's detection results.
[0051] Figure 2 This is a schematic diagram of the multi-feature domain application traffic classification process according to an embodiment of the present invention, which includes, but is not limited to, steps S100 to S300:
[0052] S100: Based on the traffic classification request, obtain the feature domain of the target classification application traffic. The feature domain includes the metadata domain, byte distribution domain, text domain, and time sequence domain.
[0053] In some embodiments, the metadata field represents metadata information, the byte distribution field is used to represent byte statistics, the text field is used to characterize the payload byte stream, and the time sequence field represents the data packet sequence.
[0054] S200: Classify the metadata domain using the metadata domain model to obtain the metadata domain classification result; classify the byte distribution domain using the byte distribution domain model to obtain the byte distribution domain classification result; classify the text domain using the text domain model to obtain the text domain classification result; classify the time series domain using the time series classification model to obtain the time series domain classification result.
[0055] In some embodiments, basic network flow information reflects the most fundamental overall characteristics of the network flow, and is recorded by various log types (such as Netflow), which can be used for traffic identification. Extracted features include: uplink / downlink packet / byte count, and duration; these features are typically recorded in the logs. The metadata domain model Basis-RF is used for source data classification. It constructs a metadata domain model based on the random forest algorithm. Through the metadata domain model, features are extracted from the logs of traffic applied to the target classification application to obtain the metadata domain's uplink packets, downlink packets, packet count, byte count, and duration.
[0056] In some embodiments, reference Figure 3 The diagram showing the classification process of the byte distribution domain model includes, but is not limited to, steps S221 to S222:
[0057] S221, By performing byte statistics on the uplink and downlink load of the target classification application traffic, two byte statistical vectors are obtained. The two byte statistical vectors are then concatenated to obtain a concatenated vector.
[0058] S222: A byte distribution domain model is constructed using the XGBoost algorithm. The concatenated vector is used as input to obtain the byte distribution domain classification results.
[0059] In some embodiments, the byte distribution domain model BD-boost is costly for recording and analyzing all text information transmitted in a network stream. Furthermore, analyzing encrypted payload byte streams is not very meaningful for encrypted traffic. This embodiment of the invention uses payload byte distribution to reflect the overall characteristics of the payload. Especially for unencrypted traffic, byte distribution can reflect relevant information about the network stream payload, such as whether it is encrypted and the type of file being transmitted.
[0060] In some embodiments, the network flow load is divided into uplink load and downlink load, and byte statistics are performed on the two loads respectively to generate two 256-dimensional vectors. The byte statistics vectors of the two are concatenated to form the input feature vector (512-dimensional) of BD-RF.
[0061] In some embodiments, reference Figure 4 The text domain model classification flowchart shown includes, but is not limited to, steps S231 to S232:
[0062] S231, by separating the uplink and downlink loads of the target classification application traffic, the text information field of the uplink load is extracted to obtain the uplink text field information, and the text information field of the downlink load is extracted to obtain the downlink text field information.
[0063] S232, the information of the uplink text domain and the information of the downlink text domain are fused by a one-dimensional convolutional neural network to obtain the text domain classification result. The one-dimensional convolutional neural network is trained in a supervised manner and uses cross-entropy as the loss function.
[0064] In some embodiments, for the Text-Net text domain model, although the traffic is encrypted, a small amount of plaintext information exchange at the beginning is necessary. This plaintext information can be used for traffic identification. This information is mainly concentrated in the first few packets of the network flow. Numerous studies have shown that the first few packets of the network flow play a greater role in traffic identification.
[0065] In some embodiments, reference Figure 5 The Text-Ne model based on 1D-CNN shown illustrates that the uplink and downlink loads in the network stream are generated by the client and server respectively, and therefore typically have different characteristics. To avoid interference from mixed uplink and downlink loads on representation learning, the uplink and downlink loads need to be separated during feature extraction, followed by feature fusion. In this embodiment, the uplink and downlink loads are input into the network structure separately, thereby achieving separate extraction of text domain information. The outputs of the two are concatenated and then input into a DNN network for feature fusion, thus obtaining the representation result of the text domain information of the network stream. The representation result is then input into a classifier.
[0066] Text-Net was trained using a supervised method. For the classification task, cross-entropy was used as the loss function.
[0067]
[0068] Where y ic For real labels, p ic Let be the probability that the i-th sample belongs to category c.
[0069] In some embodiments, reference Figure 6 The diagram shown illustrates the classification process of the time-series classification model, which includes, but is not limited to, step S241:
[0070] S241, the data packets of the target classification application traffic are divided into integer sequences, where the integer sequences include uplink data packets of positive length and downlink data packets of negative length, and the integer sequences are used to extract text domain features by employing a time-series classification model based on a bidirectional multi-layer RNN structure.
[0071] In some embodiments, the training process of the time-series classification model includes: inputting sample data, and selecting positive samples of the same category as the sample data and negative samples of different categories as input; processing the sample data, positive samples, and negative samples through a bidirectional multilayer RNN structure, and during processing, reducing the distance between the sample data and positive samples to obtain a first Triplet loss, and reducing the distance between the sample data and negative samples to obtain a second Triplet loss; and completing the training of the time-series classification model based on the bidirectional multilayer RNN structure through multi-task learning.
[0072] In some embodiments, particularly for encrypted traffic in the time-series domain, the specific plaintext information cannot be seen during the interaction process. However, the sequence information generated during the interaction (such as packet length sequences) can reflect certain network behavior information and can also be used for traffic identification.
[0073] This invention uses the packet length sequence of network flow as input to PS-Net. It automatically extracts text domain features from the packet sequence using representation learning. This invention sets the maximum packet length (MTU) to 1500, meaning the packet length of very long packets is set to 1500. To distinguish packet direction, this invention sets the uplink packet length to positive and the downlink packet length to negative. Therefore, the packet sequence is transformed into an integer sequence within the interval [-MTU, +MTU].
[0074] In some embodiments, reference Figure 7 The diagram shown illustrates a bidirectional multilayer RNN structure. PS-Net is used for learning based on this structure. The training process for PS-Net includes:
[0075] For the input sample, this embodiment of the invention also randomly selects a positive sample of the same class and a negative sample of a different class. After passing through the PS-Net network, their respective feature vectors are obtained. This embodiment of the invention aims to make the input sample as close as possible to the positive sample and as far away as possible from the negative sample. The loss for this comparison process is implemented using Triplet loss:
[0076]
[0077] Where m is the boundary value and D represents the Euclidean distance.
[0078] Finally, this embodiment of the invention trains PS-Net through a multi-task learning approach, and its loss function is the weighted sum of the classification loss and the contrastive loss, i.e.:
[0079]
[0080] Where α is the weighting parameter.
[0081] In some embodiments, based on the recognition results of models with four feature domains, this invention uses soft voting to determine the final category of the network flow to be detected. The vote value of each model is its recognition probability. Compared to ensemble methods using direct voting, soft voting can avoid the interference of low-confidence recognition results from individual models on the final decision.
[0082] Considering the recognition performance of different models, this embodiment of the invention also sets different voting weights for the models, which is more reasonable. Therefore, the final voting result is the weighted sum of the recognition probabilities of each model.
[0083] The model weights are obtained based on the training set data. The problem of finding the optimal model weights can be transformed into a constrained optimization problem, namely:
[0084]
[0085] Where ⊙ denotes the Hadamard product of matrices. Therefore, the final recognition result can be expressed as:
[0086]
[0087] S300 uses soft voting to perform feature attribution processing on the metadata domain classification results, byte distribution domain classification results, text domain classification results, and time series domain classification results to obtain the final classification result.
[0088] In some embodiments, the final detection results can be attributed to features across the four feature domains of the network flow using interpretable methods. The interpretable methods used in this scheme include the SHAP algorithm and the integral gradient algorithm.
[0089] The SHAP algorithm calculates the contribution of different input features based on Shapley values. The SHAP algorithm is well-suited for machine learning models with tabular input data. In this scheme, the SHAP algorithm is used to interpret Basis-RF and BD-boost models, thereby achieving feature attribution of network flow recognition results in the metadata domain and byte distribution domain. The feature attribution results are presented in the form of feature weight histograms.
[0090] The Integral Gradient (IG) algorithm directly calculates the importance of each input unit based on the gradient obtained from the input samples using the traditional backpropagation algorithm. The IG algorithm is well-suited for representation-based neural network models. In this scheme, the IG algorithm is used to interpret the Text-Net and PS-Net models, thereby achieving feature attribution of network flow recognition results in the text and temporal domains. The feature attribution results are presented in the form of a feature weight heatmap.
[0091] Figure 8 This is a diagram of a multi-feature domain application traffic classification device according to an embodiment of the present invention. The device includes a first module 810, a second module 820, and a third module 830.
[0092] The system comprises three modules: The first module is used to obtain the feature domains of the target application traffic based on the traffic classification request. These feature domains include the metadata domain, byte distribution domain, text domain, and time series domain. The second module is used to classify the metadata domain using a metadata domain model to obtain the metadata domain classification result; classify the byte distribution domain using a byte distribution domain model to obtain the byte distribution domain classification result; classify the text domain using a text domain model to obtain the text domain classification result; and classify the time series domain using a time series classification model to obtain the time series domain classification result. The third module is used to perform feature attribution processing on the metadata domain classification result, byte distribution domain classification result, text domain classification result, and time series domain classification result using soft voting to obtain the final classification result.
[0093] Exemplarily, with the cooperation of the first, second, and third modules in the device, the embodiment device can implement any of the aforementioned multi-feature domain application traffic classification methods. Specifically, based on the traffic classification request, it obtains the feature domains of the target classified application traffic. These feature domains include a metadata domain, a byte distribution domain, a text domain, and a time-series domain. The metadata domain is classified using a metadata domain model to obtain a metadata domain classification result; the byte distribution domain is classified using a byte distribution domain model to obtain a byte distribution domain classification result; the text domain is classified using a text domain model to obtain a text domain classification result; and the time-series domain is classified using a time-series classification model to obtain a time-series domain classification result. The metadata domain classification result, byte distribution domain classification result, text domain classification result, and time-series domain classification result are then combined using soft voting for feature attribution processing to obtain the final classification result. The beneficial effects of this invention are: dividing network flow information into basic information, byte statistics information, text information, and time-series information; training models for different feature domains separately to avoid mutual influence between feature domains; integrating multi-feature domain models to obtain the final recognition result; and performing feature attribution on different feature domains based on the recognition result. It can be applied to the identification of encrypted and unencrypted traffic, and its characterization is independent of protocol format, especially text field features. The complementary (e.g. missing) and mutually reinforcing effects between feature fields improve the applicability of traffic classification.
[0094] This invention also provides an electronic device, which includes a processor and a memory;
[0095] The memory stores the program;
[0096] The processor executes a program to perform the aforementioned multi-feature domain application traffic classification method; the electronic device has the function of carrying and running the software system for multi-feature domain application traffic classification provided in the embodiments of the present invention, such as a personal computer, minicomputer, mainframe, workstation, network or distributed computing environment, standalone or integrated computer platform, or communicating with charged particle tools or other imaging devices, etc.
[0097] This invention also provides a computer-readable storage medium storing a program that is executed by a processor to implement the multi-feature domain application traffic classification method as described above.
[0098] In some alternative embodiments, the functions / operations mentioned in the block diagrams may not occur in the order shown in the operation diagrams. For example, depending on the functions / operations involved, two consecutively shown blocks may actually be executed substantially simultaneously, or the blocks may sometimes be executed in reverse order. Furthermore, the embodiments presented and described in the flowcharts of this invention are provided by way of example to provide a more comprehensive understanding of the technology. The disclosed methods are not limited to the operations and logic flows presented herein. Alternative embodiments are contemplated in which the order of various operations is altered and sub-operations described as part of a larger operation are executed independently.
[0099] This invention also discloses a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device can read the computer instructions from the computer-readable storage medium and execute the computer instructions, causing the computer device to perform the aforementioned multi-feature domain application traffic classification method.
[0100] Furthermore, although the invention has been described in the context of functional modules, it should be understood that, unless otherwise stated, one or more of the described functions and / or features may be integrated into a single physical device and / or software module, or one or more functions and / or features may be implemented in a separate physical device or software module. It is also understood that a detailed discussion of the actual implementation of each module is unnecessary for understanding the invention. Rather, given the properties, functions, and internal relationships of the various functional modules in the apparatus disclosed herein, the actual implementation of the module will be understood within the scope of conventional skill of an engineer. Therefore, those skilled in the art can implement the invention as set forth in the claims using ordinary techniques without excessive experimentation. It is also understood that the specific concepts disclosed are merely illustrative and not intended to limit the scope of the invention, which is determined by the full scope of the appended claims and their equivalents.
[0101] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, essentially, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0102] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device.
[0103] More specific examples of computer-readable media (a non-exhaustive list) include: electrical connections (electronic devices) having one or more wires, portable computer disk drives (magnetic devices), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Furthermore, computer-readable media can even be paper or other suitable media on which the program can be printed, since the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in computer memory.
[0104] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0105] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0106] Although embodiments of the invention have been shown and described, those skilled in the art will understand that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.
[0107] The above is a detailed description of the preferred embodiments of the present invention, but the present invention is not limited to the embodiments described. Those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of the present invention, and these equivalent modifications or substitutions are all included within the scope defined by the claims of this application.
Claims
1. A multi-feature domain application traffic classification method, characterized in that, include: Based on the traffic classification request, obtain the feature data of each feature domain of the target classification application traffic. The feature domains include metadata domain, byte distribution domain, text domain, and time series domain. The metadata domain is classified using a metadata domain model to obtain a metadata domain classification result; the byte distribution domain is classified using a byte distribution domain model to obtain a byte distribution domain classification result; and the text domain is classified using a text domain model to obtain a text domain classification result. The time-series domain is classified using a time-series classification model to obtain the time-series domain classification results. The classification results of the metadata domain, the byte distribution domain, the text domain, and the time series domain are processed using soft voting to obtain the final classification result.
2. The multi-feature domain application traffic classification method according to claim 1, characterized in that, The metadata domains are classified using a metadata domain model, including: Feature extraction is performed on the logs of the target application traffic to obtain the uplink data packets, downlink data packets, number of data packets, number of bytes, and duration of the metadata field; The metadata domain model is constructed based on the random forest algorithm. The extracted metadata domain features are input into the metadata domain model for classification to obtain the metadata domain classification result.
3. The multi-feature domain application traffic classification method according to claim 1, characterized in that, The byte distribution domain is classified using a byte distribution domain model, including: By performing byte statistics on the uplink and downlink loads of the target classification application traffic, two byte statistical vectors are obtained. The two byte statistical vectors are then concatenated to obtain a concatenated vector. The byte distribution domain model is constructed using the XGBoost algorithm, and the concatenated vector is used as input to obtain the byte distribution domain classification result.
4. The multi-feature domain application traffic classification method according to claim 1, characterized in that, The text domain is classified using a text domain model to obtain text domain classification results, including: By separating the uplink and downlink loads of the target classification application traffic, the text information field of the uplink load is extracted to obtain the uplink text field information, and the text information field of the downlink load is extracted to obtain the downlink text field information. The uplink and downlink text domain information are fused using a one-dimensional convolutional neural network to obtain the text domain classification result. The one-dimensional convolutional neural network is trained under supervised conditions, and cross-entropy is used as the loss function. for in, For real labels, Let be the probability that the i-th sample belongs to class c, where This is the training set.
5. The multi-feature domain application traffic classification method according to claim 1, characterized in that, The time series domain is classified using a time series classification model, including: The data packets of the target classification application traffic are divided into integer sequences, where the integer sequences include uplink data packets of positive length and downlink data packets of negative length. The integer sequences are then used to extract temporal domain features using a temporal classification model based on a bidirectional multilayer RNN structure. The training of the time-series classification model based on a bidirectional multilayer RNN structure includes: Input sample data, and select positive samples of the same category as the sample data and negative samples of different categories for input; A bidirectional multilayer RNN structure is used to process sample data, positive samples, and negative samples. During processing, the distance between sample data and positive samples is increased to obtain the first Triplet loss, and the distance between sample data and negative samples is decreased to obtain the second Triplet loss. The Triplet loss is calculated as follows: Where m is the boundary value. Represented as Euclidean distance; The training of a time-series classification model based on a bidirectional multilayer RNN structure is completed through multi-task learning.
6. The multi-feature domain application traffic classification method according to claim 1, characterized in that, The method further includes: The final classification result is subjected to feature attribution processing, wherein the SHAP algorithm is used for feature attribution processing. The SHAP algorithm calculates the contribution of each input feature to the final classification result based on the input features used for each classification result, and determines the contribution of each input feature to the final classification result based on the contribution.
7. The multi-feature domain application traffic classification method according to claim 6, characterized in that, The method further includes: The integral gradient algorithm is used for feature attribution processing, including obtaining the gradient of the input sample using the backpropagation algorithm, calculating the importance of the input features, and determining the contribution of each input feature to the final classification result based on its importance.
8. A multi-feature domain application flow classification device, characterized in that, include: The first module is used to obtain feature data of each feature domain of the target category application traffic based on the traffic classification request. The feature domains include metadata domain, byte distribution domain, text domain, and time series domain. The second module is used to classify the metadata domains using a metadata domain model to obtain metadata domain classification results. The byte distribution domain is classified using a byte distribution domain model to obtain a byte distribution domain classification result; the text domain is classified using a text domain model to obtain a text domain classification result. The time-series domain is classified using a time-series classification model to obtain the time-series domain classification results. The third module is used to process the classification results of the metadata domain, the byte distribution domain, the text domain, and the time series domain using soft voting to obtain the final classification result.
9. An electronic device, characterized in that, Including the processor and memory; The memory is used to store programs; The processor executes the program to implement the multi-feature domain application traffic classification method as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The storage medium stores a program that is executed by a processor to implement the multi-feature domain application traffic classification method as described in any one of claims 1-7.
