Application identification method and device, equipment, storage medium and program product

By extracting and merging multi-dimensional features of network traffic data, and using the attention mechanism to generate global dependency features, the problem of low accuracy of encrypted traffic identification in the existing technology is solved, and the identification accuracy of encrypted network applications is improved.

CN118713908APending Publication Date: 2024-09-27CHINA MOBILE M2M +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410963588.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-17
Publication Date
2024-09-27

AI Technical Summary

Technical Problem

Existing network application identification methods have low accuracy when detecting encrypted traffic and cannot effectively identify encrypted network data packets, resulting in inaccurate detection results.

Method used

By obtaining network traffic data, extracting statistical features and sequence features, combining convolutional neural networks and bidirectional long short-term memory networks to extract local spatiotemporal features, and using the attention mechanism to fuse side channel features and timing dependency features to generate multi-head attention features, using It is used to characterize the global dependencies of network traffic data and ultimately determine the target type of the application to be identified.

Benefits of technology

Through the extraction and fusion of multi-dimensional traffic features, the richness and accuracy of feature representation are significantly improved, and the recognition accuracy of encrypted network applications is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118713908A
    Figure CN118713908A
Patent Text Reader

Abstract

The invention discloses an application identification method and device, equipment, a storage medium and a program product. The method comprises the following steps: acquiring network traffic data of a to-be-identified application; splicing the statistical characteristics and the sequence characteristics of the network flow data to obtain side channel characteristics; extracting local space-time features from the network flow data; fusing the side channel features and the time sequence dependency features based on an attention mechanism to obtain multi-head attention features, the multi-head attention features being used for representing a global dependency relationship of the network traffic data; and determining the type of the to-be-identified application according to the multi-head attention features, the local spatial-temporal features and the side channel features. According to the embodiment of the invention, the accuracy of application identification can be ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of network traffic technology, and in particular, relates to an application identification method, device, equipment, storage medium and program product. Background Art

[0002] In recent years, as user privacy protection continues to increase, more and more mobile applications use encryption technology to ensure the confidentiality and integrity of data transmission. However, while traffic encryption protects user data privacy, it also provides a breeding ground for cybercrime. Hackers can use encryption technology to hide malicious attack traffic to evade intrusion detection systems.

[0003] Network application identification includes signature-based network application identification methods and machine learning-based network application identification methods. This method identifies malicious attacks by matching the traffic to be tested to see if it contains specific malicious traffic features. The detection method is simple and fast and can achieve real-time detection, but this method cannot detect encrypted network data packets, making this type of method less accurate when detecting encrypted applications. Summary of the invention

[0004] The embodiments of the present application provide an application identification method, apparatus, device, storage medium and program product, which can solve the problem of low accuracy in the existing identification of encrypted applications.

[0005] In a first aspect, an embodiment of the present application provides a method for identifying an application, the method comprising:

[0006] Obtain network traffic data of the application to be identified;

[0007] The statistical features and sequence features of the network traffic data are combined to obtain side channel features;

[0008] extracting local spatiotemporal features from the network traffic data;

[0009] Based on the attention mechanism, the side channel feature and the timing dependency feature are integrated to obtain a multi-head attention feature, where the multi-head attention feature is used to characterize the global dependency relationship of the network traffic data;

[0010] The target type of the application to be identified is determined according to the multi-head attention features, the local spatiotemporal features and the side channel features.

[0011] In some embodiments, after obtaining the network traffic data of the application to be identified, the method further includes:

[0012] Acquire multiple network data packets included in the network traffic data of the application to be identified;

[0013] Aggregating the multiple network data packets in time sequence to obtain at least one time-series network flow corresponding to the application to be identified, wherein one time-series network flow is used to represent a complete network session of the application to be identified;

[0014] Statistical features and sequence features of the network traffic data are extracted from the at least one time-series network flow.

[0015] In some embodiments, the local spatiotemporal features include local spatial features and time-dependent features, and extracting the local spatiotemporal features from the network traffic data includes:

[0016] Extracting local spatial features of the network traffic data from the network traffic data by using a convolutional neural network;

[0017] The time-dependent characteristics of the network traffic data are obtained from the network traffic data through a bidirectional long short-term memory network.

[0018] In some embodiments, the side channel feature and the timing dependency feature are fused based on the attention mechanism to obtain a multi-head attention feature, including:

[0019] Performing feature enhancement on the side channel feature and the timing dependency feature based on an attention mechanism;

[0020] The enhanced detection channel feature and the timing dependency feature are fused to obtain a multi-head attention feature.

[0021] In some embodiments, determining the target type of the application to be identified according to the multi-head attention feature, the local spatiotemporal feature, and the side channel feature includes:

[0022] Fusing the multi-head attention feature, the local spatiotemporal feature and the side channel feature to obtain a global feature;

[0023] The global feature is input into a pre-trained classification model to obtain the target type of the application to be identified output by the classification model.

[0024] In some embodiments, after inputting the global feature into a pre-trained classification model to obtain the target type of the application to be identified output by the classification model, the method further includes:

[0025] Obtain a training sample set; the training sample set includes multiple training samples, each of which includes a global feature sample and a true label corresponding to the global feature sample;

[0026] For each training sample, perform the following steps:

[0027] Inputting the global feature sample into an initial classification model to obtain a predicted label output by the initial classification model;

[0028] Determining the loss function value of the classification model through a focal loss function according to the predicted label and the true label of each of the training samples;

[0029] Determine whether the loss function value of the classification model meets the preset training stop condition;

[0030] If not, the model parameters of the classification model are adjusted, and the adjusted classification model is trained using the training sample set until the preset training stop condition is met to obtain a trained classification model.

[0031] In a second aspect, an embodiment of the present application provides an application identification device, the device comprising:

[0032] An acquisition module, used to acquire network traffic data of the application to be identified;

[0033] A splicing module, used for splicing the statistical features and sequence features of the network traffic data to obtain side channel features;

[0034] An extraction module, used for extracting local spatiotemporal features from the network traffic data;

[0035] A fusion module, used for fusing the side channel feature and the timing dependency feature based on an attention mechanism to obtain a multi-head attention feature, wherein the multi-head attention feature is used to characterize the global dependency relationship of the network traffic data;

[0036] A determination module is used to determine the target type of the application to be identified based on the multi-head attention features, the local spatiotemporal features and the side channel features.

[0037] In a third aspect, an embodiment of the present application provides an application identification device, the device comprising: a processor and a memory storing computer program instructions;

[0038] The processor implements the above application identification method when executing computer program instructions.

[0039] In a fourth aspect, an embodiment of the present application provides a computer storage medium, on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the above-mentioned application recognition method is implemented.

[0040] In a fifth aspect, an embodiment of the present application provides a computer program product, which includes computer program instructions, and when the computer program instructions are executed by a processor, the above-mentioned application identification method is implemented.

[0041] In this application, the statistical features and sequence features of network traffic data are spliced ​​to obtain side channel features; then local spatiotemporal features are extracted from the network traffic data; the side channel features and timing dependency features are fused based on the attention mechanism to obtain multi-head attention features, which are used to characterize the global dependency of network traffic data; finally, the target type of the application to be identified is determined based on the multi-head attention features, local spatiotemporal features, and side channel features. In this way, by modeling multi-dimensional traffic features to learn the refined and comprehensive traffic features and behavior patterns of encrypted network applications, the extraction and fusion of multiple features significantly improves the richness and accuracy of feature representation, thereby improving the recognition accuracy of encrypted network applications. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0043] Figure 1 It is a flowchart of an application identification method provided in an embodiment of the present application;

[0044] Figure 2 is a schematic diagram of the structure of an identification device for an application provided in an embodiment of the present application;

[0045] Figure 3 It is a schematic diagram of the hardware structure of an identification device for an application provided in one embodiment of the present application. DETAILED DESCRIPTION

[0046] The features and exemplary embodiments of various aspects of the present application will be described in detail below. In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present application, rather than to limit the present application. For those skilled in the art, the present application can be implemented without the need for some of these specific details. The following description of the embodiments is only to provide a better understanding of the present application by illustrating the examples of the present application.

[0047] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "include..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0048] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The embodiments will be described in detail below in conjunction with the accompanying drawings.

[0049] Specifically, in order to solve the problems of the prior art, the embodiments of the present application provide an application identification method, device, equipment, storage medium and program product. The following first introduces the application identification method provided by the embodiments of the present application.

[0050] Figure 1 A schematic diagram of a flow chart of an application identification method provided by an embodiment of the present application is shown. The method comprises the following steps:

[0051] S110, obtaining network traffic data of the application to be identified.

[0052] In this embodiment, network traffic data refers to all data transmitted in a computer network, including all data packets sent and received through the network, and the application to be identified refers to a network application program or service that is expected to be identified and classified by analyzing network traffic.

[0053] Therefore, after the electronic device captures the network traffic, the network traffic data of the application to be identified can be extracted from the network traffic.

[0054] As an optional embodiment, after obtaining the network traffic data of the application to be identified, the method further includes:

[0055] Acquire multiple network data packets included in the network traffic data of the application to be identified;

[0056] Aggregating the multiple network data packets in time sequence to obtain at least one time-series network flow corresponding to the application to be identified, wherein one time-series network flow is used to represent a complete network session of the application to be identified;

[0057] Statistical features and sequence features of the network traffic data are extracted from the at least one time-series network flow.

[0058] In this embodiment, the time-series network flow emphasizes the time sequence and session relationship of the data packets, which helps to assist in extracting features from the network traffic data. Multiple network data packets transmitted in the network can be recorded by general traffic collection tools such as Wireshark and tcpdump, and the network data packets can be saved as files in pcap or pcapng format.

[0059] Subsequently, the captured multiple network packets can be processed and organized in time order, and the network packets belonging to the same session (or flow) can be grouped together. Each time-series network flow represents a complete network session.

[0060] Each time series network flow is represented by a five-tuple. The five-tuple contains the following information:

[0061] Source IP Address: The IP address of the sender of the data packet.

[0062] Source Port: The port number of the sender, used to distinguish different sessions on the same IP address.

[0063] Destination IP Address: The IP address of the recipient of the data packet.

[0064] Destination Port: The port number of the receiver, used to distinguish different sessions on the same IP address.

[0065] Transport Protocol: The transport layer protocol used by the data packet, such as TCP, UDP, etc.

[0066] In this way, complex network traffic data can be organized into easy-to-analyze time-series network flows, each of which has clear source and destination information, as well as specific transmission protocols. This helps to further analyze network traffic characteristics.

[0067] S120, concatenating the statistical features and sequence features of the network traffic data to obtain side channel features.

[0068] In this embodiment, statistical features and raw byte features can be extracted from network traffic data, wherein the statistical features may include basic statistics of the traffic (such as the number of data packets in the network traffic data, the average size of data packets, etc.), and the raw byte features contain the raw byte information of each data packet.

[0069] The extracted network statistical features and data packet raw byte features are expressed as:

[0070]

[0071]

[0072] Among them, x sta and X c Represents network flow s i The statistical characteristics of the corresponding data packet and the original byte characteristics of the corresponding data packet, s i represents the statistical characteristics of the ith data packet, N sta is the number of statistical features, Xc is the original byte feature set, p i Indicates i The data packet with data link layer information removed, that is, the original byte features of the i-th data packet, i∈[1,N p ],j∈[1,M b ] means s i The jth raw byte in the packet, M i is the raw number of bytes in the ith packet.

[0073] In addition, sequence features can be extracted from network traffic data, which reflect the temporal changes and dependencies of data packets. These features can capture the order relationship and temporal dependency between data packets.

[0074] Then, the traffic statistics features and sequence features can be concatenated to form side channel features, and the concatenated side channel feature vector x can be converted into c Input, get its high-order feature representation h i .

[0075] Side channel feature learning can be formalized as follows:

[0076]

[0077] Among them, W i 、b i Respectively represent the weight matrix and bias vector of the i-th layer neural network, h i represents the output vector of the side channel of the i-th network flow, σ is an activation function, such as the ReLU activation function, and Z is the total number of MLP layers.

[0078] S130, extracting local spatiotemporal features from the network traffic data.

[0079] In this embodiment, local spatial features and temporal dependency features can be extracted from network traffic data through local spatiotemporal learning.

[0080] As an optional embodiment, the local spatiotemporal features include local spatial features and time-series dependency features, and the extracting the local spatiotemporal features from the network traffic data includes:

[0081] Extracting local spatial features of the network traffic data from the network traffic data by using a convolutional neural network;

[0082] The time-dependent characteristics of the network traffic data are obtained from the network traffic data through a bidirectional long short-term memory network.

[0083] In this embodiment, local spatial features of network traffic data can be extracted from network traffic data by using a convolutional neural network (Conv1D). The convolutional neural network may include three layers, and each layer of Conv1D may be composed of a one-dimensional convolution layer, a normalization layer, and a ReLU activation function. The extraction process of each layer may be as follows:

[0084] X fl =ReLu(X c U c ,(U sta x sta ) T )

[0085] in, and Represents network flow s i Statistical characteristics and raw byte characteristics of data packets, and is the parameter matrix corresponding to each layer, and Relu is a nonlinear activation function.

[0086] After the three-layer Conv1D local feature extraction, the extracted local side channel features are input into the Bi-LSTM network to capture the temporal dependency features of the traffic. The interactive dependency mining process can be formalized as follows:

[0087] i t =σ(W i x t +U i h t-1 +b i )

[0088] f t =σ(W f x t +U f h t-1 +b f )

[0089] o t =σ(W o x t +U o h t-1 +b o )

[0090] c t =f t c t-1 +i t tanh(W c x t +U c h t-1 +b c )

[0091] h t =o t tanh(c t )

[0092] Among them, c t represents the cell state of LSTM, f t , o t and i t They represent the values ​​of the LSTM triggering the forget gate, output gate, and update gate, respectively. is a new candidate state for evaluation, h t is the hidden state, b i ,b f and b o Respectively represent the bias of the corresponding gate. ⊙ represents the element-by-element product operation. Each layer deploys k LSTM units. The LSTM units in the same chain can pass the state of the k-1th unit to the kth unit. W i , W f , W o , W c and U i , U f , U o , U c is the weight matrix.

[0093] In the above way, local spatiotemporal feature learning combines convolutional neural networks and bidirectional long short-term memory networks. Local spatial features are extracted through convolutional neural networks, and temporal dependency features are captured through bidirectional long short-term memory networks, so as to comprehensively understand and analyze network traffic data.

[0094] S140, fusing the side channel feature and the timing dependency feature based on an attention mechanism to obtain a multi-head attention feature, where the multi-head attention feature is used to characterize the global dependency relationship of the network traffic data;

[0095] In this embodiment, for the network application identification task, it is necessary not only to analyze the continuous characteristics of its network traffic, but also to explore the interactive dependencies between the original bytecodes of the data packets. Although the traditional Conv1D and LSTM networks can extract local features and temporal dependency features, it is difficult to capture long sequences of interactive behaviors. Therefore, a global dependency modeling method based on a multi-head attention mechanism can be used to capture the global dependencies in the network traffic data by learning the importance of different features and enhancing the important features, thereby obtaining multi-head attention features that characterize the global dependencies.

[0096] As an optional embodiment, the side channel feature and the timing dependency feature are fused based on the attention mechanism to obtain a multi-head attention feature, including:

[0097] Performing feature enhancement on the side channel feature and the timing dependency feature based on an attention mechanism;

[0098] The enhanced detection channel feature and the timing dependency feature are fused to obtain a multi-head attention feature.

[0099] In this embodiment, the extracted side channel features and timing dependency features can be processed through feature enhancement of the multi-head attention mechanism to capture more complex interaction relationships and importance between them, thereby obtaining multi-head attention features.

[0100] Specifically, network traffic data, as well as the extracted local spatiotemporal features and side channel features can be used as input, and the dependencies between the features are calculated through the multi-head attention mechanism to obtain the attention output of each head. Then, the outputs of all attention heads are spliced ​​together, and the final multi-head attention features are obtained through linear transformation.

[0101] Given a network flow X c , the multi-head attention mechanism can be formalized as:

[0102]

[0103] o msa =Multihead(Q,K,V)=concat(head1,head2,...,head H )W msa

[0104]

[0105] Among them, X c is the eigenvector, and represents the corresponding parameter matrix, Attention(.) represents the attention score calculation, Softmax(·) represents the normalization function, which is used to normalize the attention score. is the output vector of the multi-head self-attention module, and H represents the number of parallel multi-head attention neural networks. i Calculation for each attention head.

[0106] Since each attention head can focus on different parts of the data, through parallel calculation and splicing, it can integrate information from multiple angles to generate richer feature representations. Therefore, through this process, the multi-head attention mechanism can capture the global dependencies in the input features and enhance the expressiveness of the features.

[0107] S150, determining the target type of the application to be identified based on the multi-head attention features, the local spatiotemporal features and the side channel features.

[0108] In this embodiment, the local spatiotemporal features of the multi-head attention features and the side channel features can be fused to obtain global features, and then the type of the application to be identified can be predicted based on the global features.

[0109] As an optional embodiment, determining the target type of the application to be identified according to the multi-head attention feature, the local spatiotemporal feature, and the side channel feature includes:

[0110] Fusing the multi-head attention feature, the local spatiotemporal feature and the side channel feature to obtain a global feature;

[0111] The global feature is input into a pre-trained classification model to obtain the target type of the application to be identified output by the classification model.

[0112] In this embodiment, obtaining the label predicted by the model through the global feature vector generally includes the following steps, which mainly complete the classification task through a fully connected layer and an activation function (such as Softmax).

[0113] Specifically, after obtaining the global features, the global features can be input into a fully connected layer to obtain the output of the fully connected layer, and then the output of the fully connected layer is passed through an activation function to obtain the predicted probability of each application type, and the sum of all predicted probabilities is 1. Then, the application type with the highest predicted probability can be determined as the target type.

[0114] In this way, encrypted network applications can be classified based on the global feature vector, the predicted probability of the application category of each data sample can be output, and the application type with the highest probability can be determined as the target type of the application to be identified.

[0115] In this application, the statistical features and sequence features of network traffic data are spliced ​​to obtain side channel features; then local spatiotemporal features are extracted from the network traffic data; the side channel features and timing dependency features are fused based on the attention mechanism to obtain multi-head attention features, which are used to characterize the global dependency of network traffic data; finally, the target type of the application to be identified is determined based on the multi-head attention features, local spatiotemporal features, and side channel features. In this way, by modeling multi-dimensional traffic features to learn the refined and comprehensive traffic features and behavior patterns of encrypted network applications, the extraction and fusion of multiple features significantly improves the richness and accuracy of feature representation, thereby improving the recognition accuracy of encrypted network applications.

[0116] As an optional embodiment, after inputting the global feature into a pre-trained classification model to obtain the target type of the application to be identified output by the classification model, the method further includes:

[0117] Obtain a training sample set; the training sample set includes multiple training samples, each of which includes a global feature sample and a true label corresponding to the global feature sample;

[0118] For each training sample, perform the following steps:

[0119] Inputting the global feature sample into an initial classification model to obtain a predicted label output by the initial classification model;

[0120] Determining the loss function value of the classification model through a focal loss function according to the predicted label and the true label of each of the training samples;

[0121] Determine whether the loss function value of the classification model meets the preset training stop condition;

[0122] If not, the model parameters of the classification model are adjusted, and the adjusted classification model is trained using the training sample set until the preset training stop condition is met to obtain a trained classification model.

[0123] In this embodiment, the focal loss function is a loss function used to solve the problem of class imbalance. By adjusting the loss contribution of easily classified samples, the model's attention is strengthened on difficult-to-classify samples.

[0124] The focal loss function is used to train the classification model, which is formalized as follows:

[0125]

[0126] Where y∈R C and y∈R C They represent the true label of the encrypted network application and the label predicted by the model respectively, α represents the category weight of the network application, γ is the corresponding focusing parameter, and c (1≤c≤C) represents the true label of the training sample.

[0127] The focus loss function balances the class imbalance problem by introducing class weights and focus parameters, and enhances the model's attention to difficult-to-classify samples. During the model training process, the focus loss function is used to calculate the loss, guide the model parameter update, and improve the classification model's recognition accuracy for encrypted network applications.

[0128] Based on the application identification method provided in the above embodiment, the present application also provides a specific implementation of the application identification device. Please refer to the following embodiment.

[0129] See first Figure 2 The application recognition device 200 provided in the embodiment of the present application includes the following modules:

[0130] An acquisition module 201 is used to acquire network traffic data of the application to be identified;

[0131] A splicing module 202, used for splicing the statistical features and sequence features of the network traffic data to obtain side channel features;

[0132] An extraction module 203, used to extract local spatiotemporal features from the network traffic data;

[0133] A fusion module 204 is used to fuse the side channel feature and the timing dependency feature based on an attention mechanism to obtain a multi-head attention feature, where the multi-head attention feature is used to characterize the global dependency relationship of the network traffic data;

[0134] The determination module 205 is used to determine the target type of the application to be identified based on the multi-head attention features, the local spatiotemporal features and the side channel features.

[0135] The device can obtain side channel features by splicing the statistical features and sequence features of network traffic data; then extract local spatiotemporal features from network traffic data; fuse the side channel features and timing dependency features based on the attention mechanism to obtain multi-head attention features, which are used to characterize the global dependency of network traffic data; finally, determine the target type of the application to be identified based on the multi-head attention features, local spatiotemporal features, and side channel features. In this way, by modeling multi-dimensional traffic features to learn the refined and comprehensive traffic features and behavior patterns of encrypted network applications, the extraction and fusion of multiple features significantly improves the richness and accuracy of feature representation, thereby improving the recognition accuracy of encrypted network applications.

[0136] As an implementation of the present application, the identification device 200 of the above application can also be used for:

[0137] Obtain network traffic data of the application to be identified;

[0138] The statistical features and sequence features of the network traffic data are combined to obtain side channel features;

[0139] extracting local spatiotemporal features from the network traffic data;

[0140] Based on the attention mechanism, the side channel feature and the timing dependency feature are integrated to obtain a multi-head attention feature, where the multi-head attention feature is used to characterize the global dependency relationship of the network traffic data;

[0141] The target type of the application to be identified is determined according to the multi-head attention features, the local spatiotemporal features and the side channel features.

[0142] As an implementation of the present application, the extraction module 203 may also be used to:

[0143] Extracting local spatial features of the network traffic data from the network traffic data by using a convolutional neural network;

[0144] The time-dependent characteristics of the network traffic data are obtained from the network traffic data through a bidirectional long short-term memory network.

[0145] As an implementation of the present application, the above fusion module 204 may also be used for:

[0146] Performing feature enhancement on the side channel feature and the timing dependency feature based on an attention mechanism;

[0147] The enhanced detection channel feature and the timing dependency feature are fused to obtain a multi-head attention feature.

[0148] As an implementation of the present application, the above-mentioned determination module 205 may also be used to:

[0149] Fusing the multi-head attention feature, the local spatiotemporal feature and the side channel feature to obtain a global feature;

[0150] The global feature is input into a pre-trained classification model to obtain the target type of the application to be identified output by the classification model.

[0151] As an implementation of the present application, the identification device 200 of the above application can also be used for:

[0152] Obtain a training sample set; the training sample set includes multiple training samples, each of which includes a global feature sample and a true label corresponding to the global feature sample;

[0153] For each training sample, perform the following steps:

[0154] Inputting the global feature sample into an initial classification model to obtain a predicted label output by the initial classification model;

[0155] Determining the loss function value of the classification model through a focal loss function according to the predicted label and the true label of each of the training samples;

[0156] Determine whether the loss function value of the classification model meets the preset training stop condition;

[0157] If not, the model parameters of the classification model are adjusted, and the adjusted classification model is trained using the training sample set until the preset training stop condition is met to obtain a trained classification model.

[0158] The application identification device provided in the embodiment of the present invention can implement each step in the above method embodiment, and will not be described again here to avoid repetition.

[0159] Figure 3 A schematic diagram of the hardware structure of an identification device for an application provided in an embodiment of the present application is shown.

[0160] The recognition device in application may include a processor 1001 and a memory 1002 storing computer program instructions.

[0161] Specifically, the processor 1001 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.

[0162] The memory 1002 may include a large capacity memory for data or instructions. By way of example and not limitation, the memory 1002 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. In appropriate cases, the memory 1002 may include a removable or non-removable (or fixed) medium. In appropriate cases, the memory 1002 may be inside or outside the integrated gateway disaster recovery device. In a specific embodiment, the memory 1002 is a non-volatile solid-state memory.

[0163] The memory may include read-only memory (ROM), random access memory (RAM), magnetic disk storage media devices, optical storage media devices, flash memory devices, electrical, optical or other physical / tangible memory storage devices. Thus, typically, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to an aspect of the present disclosure.

[0164] The processor 1001 implements any one of the application identification methods in the above embodiments by reading and executing computer program instructions stored in the memory 1002 .

[0165] In one example, the application recognition device may further include a communication interface 1003 and a bus 1010. Figure 3 As shown, the processor 1001, the memory 1002, and the communication interface 1003 are connected via a bus 1010 and communicate with each other.

[0166] The communication interface 1003 is mainly used to implement communication between various modules, devices, units and / or equipment in the embodiments of the present application.

[0167] Bus 1010 includes hardware, software or both, and the parts of the identification device of application are coupled to each other.For example, but not limitation, bus may include accelerated graphics port (AGP) or other graphics bus, enhanced industrial standard architecture (EISA) bus, front side bus (FSB), hypertransport (HT) interconnection, industrial standard architecture (ISA) bus, infinite bandwidth interconnection, low pin count (LPC) bus, memory bus, micro channel architecture (MCA) bus, peripheral component interconnection (PCI) bus, PCI-Express (PCI-X) bus, serial advanced technology attachment (SATA) bus, video electronics standard association local (VLB) bus or other suitable bus or two or more of these combinations. In appropriate cases, bus 1010 may include one or more buses. Although the present application embodiment describes and shows a specific bus, the application considers any suitable bus or interconnection.

[0168] The application recognition device may be based on the above embodiment, thereby realizing the recognition method and apparatus combined with the above application.

[0169] In addition, in combination with the application identification method in the above-mentioned embodiment, the embodiment of the present application may provide a computer storage medium to implement. The computer storage medium stores computer program instructions; when the computer program instructions are executed by the processor, the identification method of any one of the applications in the above-mentioned embodiments is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here. Among them, the above-mentioned computer-readable storage medium may include a non-transitory computer-readable storage medium, such as a read-only memory (Read-Only Memory, referred to as ROM), a random access memory (Random Access Memory, referred to as RAM), a disk or an optical disk, etc., which is not limited here.

[0170] In addition, an embodiment of the present application further provides a computer program product, including computer program instructions, which can implement the steps and corresponding contents of the aforementioned method embodiment when the computer program instructions are executed by a processor.

[0171] It should be clear that the present application is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present application is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present application.

[0172] The functional blocks shown in the above block diagram can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc. When implemented in software, the elements of the present application are programs or code segments that are used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link by a data signal carried in a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (RF) links, etc. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.

[0173] It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, this application is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiment, or in a different order from the embodiment, or several steps can be performed simultaneously.

[0174] Aspects of the present disclosure are described above with reference to the flowchart and / or block diagram of the method, device and computer program product according to the embodiment of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device to produce a machine so that these instructions executed by the processor of the computer or other programmable data processing device enable the implementation of the function / action specified in one or more boxes of the flowchart and / or block diagram. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field programmable logic circuit. It can also be understood that each box in the block diagram and / or flowchart and the combination of boxes in the block diagram and / or flowchart can also be implemented by dedicated hardware that performs a specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions.

[0175] The above are only specific implementation methods of the present application. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. It should be understood that the protection scope of the present application is not limited to this. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in this application, and these modifications or replacements should be included in the protection scope of this application.

Claims

1. A method for identifying an application, It is characterized in that The method comprises: Obtain network traffic data of the application to be identified; The statistical features and sequence features of the network traffic data are combined to obtain side channel features; extracting local spatiotemporal features from the network traffic data; Based on the attention mechanism, the side channel feature and the timing dependency feature are integrated to obtain a multi-head attention feature, where the multi-head attention feature is used to characterize the global dependency relationship of the network traffic data; The target type of the application to be identified is determined according to the multi-head attention features, the local spatiotemporal features and the side channel features.

2. The method for identifying an application according to claim 1, It is characterized in that After obtaining the network traffic data of the application to be identified, the method further includes: Acquire multiple network data packets included in the network traffic data of the application to be identified; Aggregating the multiple network data packets in time sequence to obtain at least one time-series network flow corresponding to the application to be identified, wherein one time-series network flow is used to represent a complete network session of the application to be identified; Statistical features and sequence features of the network traffic data are extracted from the at least one time-series network flow.

3. The method for identifying an application according to claim 1, It is characterized in that The local spatiotemporal features include local spatial features and time-series dependent features, and the extracting of local spatiotemporal features from the network traffic data includes: Extracting local spatial features of the network traffic data from the network traffic data by using a convolutional neural network; The time-dependent characteristics of the network traffic data are obtained from the network traffic data through a bidirectional long short-term memory network.

4. The method for identifying an application according to claim 1, It is characterized in that The side channel feature and the timing dependency feature are fused based on the attention mechanism to obtain a multi-head attention feature, including: Performing feature enhancement on the side channel feature and the timing dependency feature based on an attention mechanism; The enhanced detection channel feature and the timing dependency feature are fused to obtain a multi-head attention feature.

5. The method for identifying an application according to claim 1, It is characterized in that The determining the target type of the application to be identified according to the multi-head attention feature, the local spatiotemporal feature and the side channel feature includes: Fusing the multi-head attention feature, the local spatiotemporal feature and the side channel feature to obtain a global feature; The global feature is input into a pre-trained classification model to obtain the target type of the application to be identified output by the classification model.

6. The method for identifying an application according to claim 1, It is characterized in that After inputting the global feature into a pre-trained classification model to obtain the target type of the application to be identified output by the classification model, the method further includes: Obtain a training sample set; the training sample set includes multiple training samples, each of which includes a global feature sample and a true label corresponding to the global feature sample; For each training sample, perform the following steps: Inputting the global feature sample into an initial classification model to obtain a predicted label output by the initial classification model; Determining the loss function value of the classification model through a focal loss function according to the predicted label and the true label of each of the training samples; Determine whether the loss function value of the classification model meets the preset training stop condition; If not, the model parameters of the classification model are adjusted, and the adjusted classification model is trained using the training sample set until the preset training stop condition is met to obtain a trained classification model.

7. An identification device for an application, It is characterized in that The device comprises: An acquisition module, used to acquire network traffic data of the application to be identified; A splicing module, used for splicing the statistical features and sequence features of the network traffic data to obtain side channel features; An extraction module, used for extracting local spatiotemporal features from the network traffic data; A fusion module, used for fusing the side channel feature and the timing dependency feature based on an attention mechanism to obtain a multi-head attention feature, wherein the multi-head attention feature is used to characterize the global dependency relationship of the network traffic data; A determination module is used to determine the target type of the application to be identified based on the multi-head attention features, the local spatiotemporal features and the side channel features.

8. An application identification device, It is characterized in that The application recognition device includes: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, the method for identifying an application according to any one of claims 1 to 6 is implemented.

9. A computer storage medium, It is characterized in that The computer storage medium stores computer program instructions, which, when executed by a processor, implement the application recognition method according to any one of claims 1 to 6.

10. A computer program product, It is characterized in that The computer program product comprises computer program instructions, and when the computer program instructions are executed by a processor, the method for identifying an application according to any one of claims 1 to 6 is implemented.