Encrypted traffic identification method, sequence fingerprint database construction method and communication device

By constructing a sequence fingerprint database, the service type is identified based on the data packet characteristics of encrypted traffic, which solves the problem of difficulty in identifying QUIC traffic in existing technologies. This achieves efficient and accurate identification of encrypted traffic, reducing device performance consumption and privacy leakage risks.

CN118740406APending Publication Date: 2024-10-01HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310362029.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-03-30
Publication Date
2024-10-01

AI Technical Summary

Technical Problem

Existing deep packet inspection technologies struggle to effectively identify encrypted traffic, especially QUIC traffic, resulting in low identification efficiency, high computational costs, impact on network device performance, and potential infringement on user privacy.

Method used

By constructing a sequence fingerprint database, sequence fingerprints are generated based on the characteristics of target data packets in encrypted traffic. The sequence fingerprint database is then used to match and identify the service type of encrypted traffic, avoiding data packet decryption, reducing the impact on device performance, and lowering the risk of privacy leaks.

Benefits of technology

It enables rapid and accurate identification of encrypted traffic, reduces the consumption of network device performance, and lowers the risk of privacy leaks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118740406A_ABST
    Figure CN118740406A_ABST
Patent Text Reader

Abstract

The invention discloses an encrypted traffic identification method, a sequence fingerprint database construction method and a communication device, and relates to the technical field of network security. A first sequence fingerprint of a first encrypted traffic is obtained, and a service type to which the first encrypted traffic belongs is determined according to the first sequence fingerprint. Wherein the first sequence fingerprint comprises one or more pieces of target packet information, the one or more pieces of target packet information are in one-to-one correspondence with one or more target data packets in the first encrypted traffic, and the one or more pieces of target packet information respectively indicate features of the corresponding target data packets. Based on the scheme of the invention, the encrypted traffic can be efficiently identified.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of network security technology, and in particular to an encrypted traffic identification method, a sequence fingerprint library construction method and a communication device. Background Art

[0002] With the rapid development of Internet technology and users' increasing attention to personal privacy, more and more network traffic has begun to use encryption protocols such as quick UDP internet connections (QUIC) and transport layer security (TLS) to transmit user data, which has brought great challenges to network traffic identification. Traditional network traffic classification and identification technologies, represented by deep packet inspection (DPI) technology, usually classify and identify traffic based on five-tuple information in the traffic (including IP address, port number, etc.) and plaintext payload content, and are often helpless against encrypted traffic.

[0003] In order to identify QUIC traffic, one method currently is to decrypt the first packet of QUIC traffic to obtain the host name identification, certificate, handshake parameters and other information of the traffic, and then segment and identify QUIC traffic based on the above information and traditional DPI technology. Since the QUIC protocol uses a complex encryption algorithm, decrypting the first packet will consume a lot of computing power of the network device, which will affect the performance of the network device, and decrypting the first packet will be time-consuming, resulting in the inability to quickly and accurately identify encrypted traffic. Therefore, it is necessary to provide a more efficient method for identifying encrypted traffic. Summary of the invention

[0004] The present application provides an encrypted traffic identification method, a sequence fingerprint library construction method and a communication device, which can more efficiently identify encrypted traffic.

[0005] In a first aspect, the present application provides an encrypted traffic identification method, which first obtains a first sequence fingerprint of a first encrypted traffic, and then determines the service type to which the first encrypted traffic belongs according to the first sequence fingerprint. The first sequence fingerprint includes one or more target packet information, and the one or more target packet information corresponds one to one with one or more target data packets in the first encrypted traffic, and the one or more target packet information respectively indicates the characteristics of the corresponding target data packets.

[0006] The target data packet refers to the data packet at the target position in the first encrypted traffic. The target position can be set according to the application scenario, and this solution does not make specific restrictions. For example, assuming that the target position is set to 2 to 30, the 2nd to 30th data packets in the first encrypted traffic are all target data packets of the first encrypted traffic. At this time, only one or more target data packets can be obtained from the above 2nd to 30th data packets to form the first sequence fingerprint of the first encrypted traffic.

[0007] It can be seen that this solution constructs a sequence fingerprint of the encrypted traffic based on the characteristics of the target data packet in the first encrypted traffic, and identifies the service type to which the first encrypted traffic belongs based on the sequence fingerprint. Compared with the traffic identification solution based on data packet decryption, this solution does not need to consume a lot of computing power and time to decrypt the target data packet, thereby reducing the performance impact on the device or equipment applying this solution, and can also achieve rapid and accurate identification of the first encrypted traffic. Since this solution does not need to decrypt the data packets in the first encrypted traffic, it will not infringe on user privacy and can reduce the risk of privacy leakage.

[0008] Based on the first aspect, in a possible implementation scheme, a second sequence fingerprint matching the first sequence fingerprint can be determined in the sequence fingerprint library, and then the service type corresponding to the second sequence fingerprint is determined as the service type to which the first encrypted traffic belongs. The sequence fingerprint library includes multiple sequence fingerprints, each of which corresponds to one service type among multiple service types, and each sequence fingerprint includes one or more packet information, each of which indicates the characteristics of a class of data packets.

[0009] It can be seen that this solution is based on the sequence fingerprint library to identify the service type to which the first encrypted traffic belongs. The sequence fingerprint library stores sequence fingerprints corresponding to multiple service types, and these sequence fingerprints are used to identify the traffic of the corresponding service types. If the first sequence fingerprint of the first encrypted traffic can match a sequence fingerprint in the sequence fingerprint library, the sequence fingerprint can be used as the above-mentioned second sequence fingerprint, so that the service type to which the first encrypted traffic belongs is identified as the service type corresponding to the second sequence fingerprint.

[0010] Based on the first aspect, in a possible implementation scheme, if the target packet information corresponding to the multiple first data packets matches all the packet information in the third sequence fingerprint one by one, and the first order is consistent with the second order, then the third sequence fingerprint is determined as the second sequence fingerprint. Wherein, the one or more target data packets in the first encrypted traffic include the multiple first data packets, the first order is the order of the multiple first data packets in the first encrypted traffic, the third sequence fingerprint is one of the multiple sequence fingerprints, and the second order is the order of all the packet information in the third sequence fingerprint.

[0011] In this solution, the matching condition between the first sequence fingerprint of the first encrypted traffic and the third sequence fingerprint in the sequence fingerprint library is: the first sequence fingerprint contains multiple target packet information that matches all the packet information in the third sequence fingerprint one by one, and the order of the target data packets corresponding to the multiple target packet information in the first encrypted traffic is consistent with the order of all the packet information in the third sequence fingerprint. In other words, the third sequence fingerprint makes requirements on both the local (i.e., each packet information) and the overall (i.e., the order between the packet information) aspects of the traffic, so that the traffic can be well identified. The first sequence fingerprint of the first encrypted traffic is considered to match the third sequence fingerprint only if it meets the local and overall requirements of the third sequence fingerprint at the same time.

[0012] By comparing the first sequence fingerprint of the first encrypted traffic with the third sequence fingerprint in the sequence fingerprint library, if the above matching condition is found to be met, it can be determined that the first sequence fingerprint matches the third sequence fingerprint, so that the service type corresponding to the third sequence fingerprint is determined to be the service type to which the first encrypted traffic belongs. If the above matching condition is not met, it means that the first sequence fingerprint of the first encrypted traffic does not match the third sequence fingerprint in the sequence fingerprint library, so it can be determined that the service type corresponding to the third sequence fingerprint is not the service type to which the first encrypted traffic belongs.

[0013] Based on the first aspect, in a possible implementation scheme, if the target packet information corresponding to one or more first data packets matches one-to-one with all packet information in the uplink sequence fingerprint and the first order is consistent with the second order, and the target packet information corresponding to one or more second data packets matches one-to-one with all packet information in the downlink sequence fingerprint and the third order is consistent with the fourth order, then the third sequence fingerprint is determined as the second sequence fingerprint.

[0014] Among them, the one or more target data packets in the first encrypted traffic include the one or more first data packets and the one or more second data packets. The first order is the order of the one or more first data packets in the first encrypted traffic, and the third order is the order of the one or more second data packets in the first encrypted traffic. The third sequence fingerprint is a sequence fingerprint among multiple sequence fingerprints in the sequence fingerprint library, which is composed of the uplink sequence fingerprint and the downlink sequence fingerprint. The uplink sequence fingerprint includes all packet information corresponding to the uplink direction in the third sequence fingerprint, and the downlink sequence fingerprint includes all packet information corresponding to the downlink direction in the third sequence fingerprint. The second order is the order of all packet information in the uplink sequence fingerprint, and the fourth order is the order of all packet information in the downlink sequence fingerprint.

[0015] In this solution, the third sequence fingerprint in the sequence fingerprint library consists of an uplink sequence fingerprint and a downlink sequence fingerprint. The uplink sequence fingerprint includes all packet information corresponding to the uplink direction in the third sequence fingerprint, which is used to compare with the target packet information corresponding to the target data packet in the uplink direction. The downlink sequence fingerprint includes all packet information corresponding to the downlink direction in the third sequence fingerprint, which is used to compare with the target packet information corresponding to the target data packet in the downlink direction.

[0016] At this time, the matching condition between the first sequence fingerprint of the first encrypted traffic and the third sequence fingerprint in the sequence fingerprint library is: the first sequence fingerprint has one or more target packet information that matches all the packet information in the uplink sequence fingerprint one by one, and the order of the target data packets corresponding to the one or more target packet information in the first encrypted traffic is consistent with the order of all the packet information in the uplink sequence fingerprint, and at the same time, the first sequence fingerprint has one or more target packet information that matches all the packet information in the downlink sequence fingerprint one by one, and the order of the target data packets corresponding to the one or more target packet information in the first encrypted traffic is consistent with the order of all the packet information in the downlink sequence fingerprint. In other words, only when the first sequence fingerprint matches both the uplink sequence fingerprint and the downlink sequence fingerprint, can it be determined that the first sequence fingerprint matches the third sequence fingerprint. As long as the first sequence fingerprint does not match any one of the uplink sequence fingerprint and the downlink sequence fingerprint, it means that the first sequence fingerprint does not match the third sequence fingerprint.

[0017] By comparing the target packet information corresponding to the uplink direction in the first sequence fingerprint with the uplink sequence fingerprint, and comparing the target packet information corresponding to the downlink direction in the first sequence fingerprint with the downlink sequence fingerprint, if it is found that the above matching conditions are met, it can be determined that the first sequence fingerprint matches the third sequence fingerprint, so that the service type corresponding to the third sequence fingerprint is determined to be the service type to which the first encrypted traffic belongs. If the above matching conditions are not met, it means that the first sequence fingerprint of the first encrypted traffic does not match the third sequence fingerprint in the sequence fingerprint library, so it can be determined that the service type corresponding to the third sequence fingerprint is not the service type to which the first encrypted traffic belongs.

[0018] Based on the first aspect, in a possible implementation, the order of the plurality of third data packets in the first encrypted traffic may be determined based on the order in which the plurality of third data packets are received and internet protocol_identification (IP_ID) information corresponding to the plurality of third data packets, wherein the one or more target data packets in the first encrypted traffic include the plurality of third data packets.

[0019] In this scheme, since the IP_ID information increases in a single direction (upstream / downstream), when some data packets in the first encrypted traffic are out of order, the order of these target data packets in the first encrypted traffic can be determined based on the IP_ID information of these target data packets, so that the first sequence fingerprint of the first encrypted traffic can be compared with each sequence fingerprint in the sequence fingerprint library, and then the service type to which the first encrypted traffic belongs can be determined.

[0020] Based on the first aspect, in a possible implementation scheme, the first packet information includes one or more of a payload length, a packet direction, and a packet type of a first type data packet. The first packet information is a packet information of a fourth sequence fingerprint, the fourth sequence fingerprint is a sequence fingerprint of multiple sequence fingerprints, and the first type data packet is a type of data packet corresponding to the first packet information.

[0021] In this solution, the first packet information in the fourth sequence fingerprint in the sequence fingerprint library indicates the characteristics of the first type of data packet from one or more dimensions of payload length, packet direction, and packet type. For a certain target packet information in the first sequence fingerprint in the first encrypted traffic, the target packet information indicates the characteristics of a certain target data packet in the first encrypted traffic. Only when the characteristics indicated by the target packet information meet all the characteristics indicated in the first packet information, the target packet information is considered to match the first packet information. In other words, if the target data packet corresponding to the target packet information can meet all the characteristics indicated by the first packet information, it means that the target data packet belongs to the first type of data packet corresponding to the first packet information.

[0022] Based on the first aspect, in a possible implementation scheme, the first packet information further includes a packet spacing between a first type of data packet and a second type of data packet, wherein the second type of data packet is a type of data packet corresponding to the second packet information, and the second packet information and the first packet information are two different packet information in the fourth sequence fingerprint.

[0023] In this solution, the first packet information in the fourth sequence fingerprint in the sequence fingerprint library can also indicate the packet spacing characteristics of the first type of data packet. It should be understood that since the feature indication dimension is increased, the traffic identification effect of the fourth sequence fingerprint can be enhanced. For a certain target packet information in the first sequence fingerprint in the first encrypted traffic, only when the characteristics indicated by the target packet information meet all the characteristics indicated in the first packet information (including the packet spacing), the target packet information is considered to match the first packet information.

[0024] Based on the first aspect, in a possible implementation scheme, the first sequence fingerprint includes the target packet information corresponding to the first K target data packets in the first encrypted traffic, where K is a positive integer. In the case where there is no second sequence fingerprint matching the first sequence fingerprint in the sequence fingerprint library, the target packet information corresponding to the K+1th target data packet in the first encrypted traffic is obtained, and the first sequence fingerprint is updated according to the target packet information corresponding to the K+1th target data packet to obtain an updated first sequence fingerprint. Then, a fifth sequence fingerprint matching the updated first sequence fingerprint is determined in the sequence fingerprint library, and the service type corresponding to the fifth sequence fingerprint is determined as the service type to which the first encrypted traffic belongs.

[0025] In this scheme, the first sequence fingerprint of the first encrypted traffic is generated by obtaining the first K target data packets in the first encrypted traffic. By comparing with the sequence fingerprint library, it is found that there is no second sequence fingerprint matching the first sequence fingerprint in the sequence fingerprint library, and the service type to which the first encrypted traffic belongs cannot be determined according to the first sequence fingerprint. At this time, the next target data packet can be obtained, that is, the K+1th data packet in the first encrypted traffic, and then the first sequence fingerprint is updated according to the target packet information corresponding to the K+1th data packet, and then it is determined whether there is a fifth sequence fingerprint matching the updated first sequence fingerprint in the sequence fingerprint library. If yes, the service type corresponding to the fifth sequence fingerprint is determined as the service type to which the first encrypted traffic belongs, and the identification process ends. If not, the next target data packet can be obtained, that is, the K+2th data packet in the first encrypted traffic, and then the first sequence fingerprint is updated again according to the target packet information corresponding to the K+2th data packet, and then compared with the sequence fingerprint library. The subsequent process is similar and will not be repeated here. If the last target data packet in the first encrypted traffic is obtained and still fails to match any sequence fingerprint in the sequence fingerprint library, it can be considered that the identification has failed and the identification process ends.

[0026] That is to say, the first sequence fingerprint of the first encrypted traffic is not fixed, and the first sequence fingerprint can be updated by sequentially acquiring each target data packet in the first encrypted traffic, and then the updated first sequence fingerprint can be used to continue traffic identification. It should be understood that this solution can start the identification process when a small number of target data packets in the first encrypted traffic are acquired, without having to start traffic identification only when all target data packets in the first encrypted traffic are collected. Moreover, each time a target data packet of the first encrypted traffic is received, the first sequence fingerprint of the first encrypted traffic can be updated once, and the identification process of the first encrypted traffic can be pushed forward, thereby supporting the rapid identification of encrypted traffic.

[0027] Based on the first aspect, in a possible implementation scheme, before determining a second sequence fingerprint that matches the first sequence fingerprint in the sequence fingerprint library, the method also includes: obtaining multiple traffic samples belonging to a first service type, wherein the first service type is a sequence fingerprint among multiple service types, and each of the multiple traffic samples includes one or more data packets; generating one or more sequence fingerprints corresponding to the first service type based on the multiple traffic samples, and storing the one or more sequence fingerprints and the correspondence between the first service type and the one or more sequence fingerprints in the sequence fingerprint library.

[0028] That is to say, one or more sequence fingerprints corresponding to the first service type can be generated by obtaining multiple traffic samples of the first service type, and then the correspondence between the one or more sequence fingerprints and the first service type can be stored in the sequence fingerprint library. In this way, the traffic of the first service type can be identified based on the one or more sequence fingerprints in the sequence fingerprint library.

[0029] Based on the first aspect, in a possible implementation scheme, multiple flow information sequences are first generated based on multiple traffic samples of the first service type. The multiple flow information sequences correspond to the multiple traffic samples one by one, and each flow information sequence includes packet information corresponding to the data packets that meet the importance condition in the corresponding traffic sample. Then, multiple frequent sequences are determined based on the multiple flow information sequences, and then one or more sequence fingerprints corresponding to the first service type are determined from the multiple frequent sequences based on the screening condition.

[0030] In this solution, the importance condition can be used to first determine which data packets in the above multiple traffic samples are important data packets and which are unimportant data packets, and each generated flow information sequence only contains the packet information of important data packets, which helps to generate the sequence fingerprint of the first service type. Then, some sequences that appear more frequently in multiple flow information sequences are determined through frequent sequence mining, and multiple frequent sequences are obtained, and then the sequence fingerprint corresponding to the first service type is determined through sequence screening.

[0031] Based on the first aspect, in a possible implementation scheme, the importance condition includes one or more of the following: the packet type is a preset type, the payload length is within a preset range, and the importance value obtained based on the importance algorithm is greater than or equal to an importance threshold.

[0032] Based on the first aspect, in a possible implementation scheme, the screening conditions include one or more of the following: a sequence length is greater than or equal to a preset length, a sequence occurrence number is greater than or equal to a preset number, and a sequence occurrence position is before a preset position.

[0033] Based on the first aspect, in a possible implementation scheme, if the difference between the first value and the second value is less than or equal to the first threshold, and the first value and the second value are both in the first sub-interval, the values ​​of the payload lengths in the third packet information and the fourth packet information are adjusted to the values ​​corresponding to the first sub-interval. The third packet information and the fourth packet information are two packet information in the above-mentioned multiple stream information sequences, and the only difference between the characteristics indicated by the third packet information and the characteristics indicated by the fourth packet information is the payload length. The value of the payload length in the third packet information is the first value, and the value of the payload length in the fourth packet information is the second value. The variation interval of the payload length includes multiple sub-intervals, each sub-interval corresponds to a value in the sub-interval, and the first sub-interval is one of the above-mentioned multiple sub-intervals.

[0034] It can be seen that before extracting the frequent sequence, this solution first performs packet regularization on some packet information in the multiple flow information sequences of the first service type. That is, for some packet information that are completely identical except for the payload length, if their payload lengths can fall into the same payload length sub-interval and their payload length difference is less than or equal to the first threshold, their payload lengths can be adjusted to the same value.

[0035] It should be understood that when there are relatively few traffic samples of the first service type, by performing the above-mentioned packet regularization operation, the number of repeated packet information in the above-mentioned multiple flow information sequences can be increased, which is helpful for extracting frequent sequences and further helps to generate the sequence fingerprint of the first service type.

[0036] Based on the first aspect, in a possible implementation scheme, the length of the subinterval is determined according to the length of a confirmation field and / or a padding field in the encryption protocol used by the first service type.

[0037] Based on the first aspect, in a possible implementation scheme, if the sixth sequence fingerprint and the seventh sequence fingerprint meet the merging condition, the sixth sequence fingerprint and the seventh sequence fingerprint are merged into an eighth sequence fingerprint, and the eighth sequence fingerprint and the correspondence between the first service type and the eighth sequence fingerprint are stored in a sequence fingerprint library, wherein the above one or more sequence fingerprints corresponding to the first service type include the sixth sequence fingerprint and the seventh sequence fingerprint.

[0038] By merging sequence fingerprints, this solution can reduce the number of sequence fingerprints that need to be stored in the sequence fingerprint library, thereby reducing resource usage and performance impact on the equipment or device to which this solution is applied.

[0039] Based on the first aspect, in a possible implementation scheme, the multiple traffic samples of the first service type include multiple upstream traffic samples and multiple downstream traffic samples, and multiple upstream information sequences can be determined based on the multiple upstream traffic samples, and multiple downstream information sequences can be determined based on the multiple downstream traffic samples. Among them, the multiple upstream information sequences correspond to the multiple upstream traffic samples one by one, and each upstream information sequence includes packet information corresponding to the data packets that meet the importance conditions in the corresponding upstream traffic samples. The multiple downstream information sequences correspond to the multiple downstream traffic samples one by one, and each downstream information sequence includes packet information corresponding to the data packets that meet the importance conditions in the corresponding downstream traffic samples. Then, multiple upstream frequent sequences are determined based on the multiple upstream traffic sequences, and multiple downstream frequent sequences are determined based on the multiple downstream traffic sequences. Next, one or more combinations are determined based on the multiple upstream frequent sequences and the multiple downstream frequent sequences, and then the one or more combinations are respectively used as a sequence fingerprint corresponding to the first service type. Among them, each combination includes an upstream sequence fingerprint among the multiple upstream frequent sequence fingerprints and a downstream sequence fingerprint among the multiple downstream sequence fingerprints.

[0040] In order to reduce the difficulty of mining and screening frequent sequences, this solution chooses to process the upstream traffic samples and the downstream traffic samples separately, so as to obtain the upstream information sequence and the downstream information sequence. Then, the upstream information sequence and the downstream information sequence are respectively mined and screened for frequent sequences, so as to obtain the corresponding upstream frequent sequence and downstream frequent sequence. Finally, the upstream frequent sequence and the downstream frequent sequence are combined to obtain the sequence fingerprint corresponding to the first service type for identifying the traffic of the first service type.

[0041] Based on the first aspect, in a possible implementation scheme, a first parent type to which the first encrypted traffic belongs is first determined from multiple parent types based on an association identification technology or an Internet Protocol (IP) library, and then a second sequence fingerprint matching the first sequence fingerprint is determined from sequence fingerprints corresponding to all subtypes under the first parent type. The multiple service types are subtypes under one of the multiple parent types.

[0042] This solution first determines the first parent type to which the first encrypted traffic belongs through association identification or IP library, and then compares the first sequence fingerprint of the first encrypted traffic with the sequence fingerprints corresponding to all subtypes under the first parent type in the sequence fingerprint library, which can narrow the comparison range of the first sequence fingerprint in the sequence fingerprint library and reduce the number of comparisons between the first sequence fingerprint and the sequence fingerprint in the sequence fingerprint library, thereby improving the efficiency of traffic identification. Through this hierarchical identification of parent type + subtype, the accuracy of traffic identification can also be improved.

[0043] In the second aspect, the present application also provides a method for constructing a sequence fingerprint library, the method comprising: obtaining multiple traffic samples belonging to a first service type, then generating one or more sequence fingerprints corresponding to the first service type based on the multiple traffic samples, and storing the one or more sequence fingerprints and the correspondence between the first service type and the one or more sequence fingerprints into the sequence fingerprint library. The sequence fingerprint library is used to identify the service type to which the encrypted traffic belongs, the first service type is one of the multiple service types, each of the multiple traffic samples includes one or more data packets, each of the one or more sequence fingerprints includes one or more packet information, and each packet information indicates the characteristics of one or more data packets in the multiple traffic samples.

[0044] In a third aspect, the present application further provides a communication device, comprising units and / or modules for executing any implementation scheme in the first aspect, or comprising units and / or modules for executing any implementation scheme in the second aspect.

[0045] In a fourth aspect, the present application also provides a communication device, comprising a processor and a memory, wherein the processor is used to execute instructions stored in the memory so that the communication device executes a method of any implementation scheme in the first aspect, or so that the communication device executes a method of any implementation scheme in the second aspect.

[0046] In a fifth aspect, the present application further provides a computer-readable storage medium comprising computer program instructions. When the computer program instructions are executed by a computing device, the computing device executes a method as in any embodiment of the first aspect or a method as in any embodiment of the second aspect.

[0047] In a sixth aspect, the present application also provides a computer program product comprising instructions, characterized in that when the instructions are executed by a computing device, the computing device executes a method as in any embodiment of the first aspect or a method as in any embodiment of the second aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for describing the embodiments.

[0049] Figure 1 is a structural diagram of a communication device provided in an embodiment of the present application;

[0050] Figure 2 It is a flow chart of a method for constructing a sequence fingerprint library provided in an embodiment of the present application;

[0051] Figure 3This is a schematic diagram of a process for generating a sequence fingerprint corresponding to a first service type provided by an embodiment of the present application;

[0052] Figure 4 It is a flow chart of another method for constructing a sequence fingerprint library provided in an embodiment of the present application;

[0053] Figure 5 It is a flowchart of an encrypted traffic identification method provided in an embodiment of the present application;

[0054] Figure 6 It is a schematic diagram of a process of identifying a first encrypted flow based on a sequence fingerprint library provided in an embodiment of the present application;

[0055] Figure 7 is a flow chart of comparing a first encrypted flow with a third sequence fingerprint provided by an embodiment of the present application;

[0056] Figure 8 is a structural diagram of another communication device provided in an embodiment of the present application;

[0057] Fig. 9 It is a schematic diagram of a deployment scenario of a communication device provided in an embodiment of the present application;

[0058] Fig.10 is a schematic diagram of a deployment scenario of another communication device provided in an embodiment of the present application;

[0059] Fig.11 is a schematic diagram of a deployment scenario of another communication device provided in an embodiment of the present application;

[0060] Fig.12 It is a schematic diagram of a deployment scenario of another communication device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0061] In order to facilitate understanding of the technical solutions of the embodiments of the present application, some terms and concepts involved in the embodiments of the present application are briefly introduced below.

[0062] 1. QUIC protocol

[0063] QUIC is a multiplexed secure transmission protocol based on the User Datagram Protocol (UDP). As a fully encrypted protocol, QUIC encrypts all packets including the first handshake packet, making information such as host name identification, certificates, and handshake parameters invisible, which poses a great challenge to traffic identification technology.

[0064] A QUIC data packet consists of two parts: header information and payload. The header is transmitted in plain text (i.e., unencrypted) and can include the following four fields: flags, connection identifier (ID), QUIC version number, and packet number. The payload is generally transmitted in ciphertext (i.e., encrypted), so the specific payload content is not visible.

[0065] 2. Deep packet inspection (DPI)

[0066] Traditional IP packet detection technology is based on the detection and analysis of packet elements (including source address, destination address, source port, destination port, and transport layer protocol type) contained between layers 2 to 4 of the open system interconnection reference model (OSI). DPI technology adds application protocol identification, packet content detection, and deep decoding to the application layer on top of traditional IP packet detection technology.

[0067] 3. Association Identification

[0068] Correlation identification is a technology that uses common features between multiple flows to identify flows. These common features can be IP addresses, ports, user IDs, or any other resolution features. The main principle is to dynamically establish a common feature cache table in the DPI engine, and achieve the purpose of flow identification based on the above common feature cache table. Correlation identification can be divided into two types: domain name system (DNS) correlation identification and non-DNS correlation identification.

[0069] The principle of DNS association identification is as follows. Before the application requests content from the server corresponding to the target domain name, it usually sends a DNS query request to the DNS server to request the target IP address corresponding to the target domain name. When the DNS server receives the DNS query request, the DNS server can determine the target IP address corresponding to the target domain name based on the correspondence between a series of domain names and IP addresses stored in itself, and then return a response message to the application through the network, and the response message carries the correspondence between the above target domain name and the target IP address. When the response message passes through a certain network device, the network device can record the correspondence between the above target domain name and the target IP address locally. After the application receives the response message, it can determine the target IP address corresponding to the target domain name, and then request content from the server through the target IP address. When the traffic of the application passes through the network device, if the network device extracts the above target IP address from it, the network device can determine the target domain name corresponding to the target IP address based on the local record, and then classify and identify the traffic according to the DPI technology and the target domain name.

[0070] Non-DNS association identification mainly relies on the fact that the flows generated by the application during use have a relatively obvious sequence. After the DPI engine identifies the previous flow, if the subsequent flow to be identified has the same common characteristics as the previously identified flow (including one or more of the characteristics such as IP address, port, connection ID, etc.), the DPI engine can associate the flow to be identified with the application category or service category to which the previously identified flow belongs.

[0071] 4. IP library identification

[0072] IP library identification mainly uses the combination of server IP and port to identify traffic. The principle of this identification method is: based on network detection technology, it actively detects the IP and port of the entire network, thereby establishing a corresponding relationship library between IP_port combination and service type, and then traffic classification and identification can be performed based on this static corresponding relationship library.

[0073] A communication device involved in an embodiment of the present application is introduced below.

[0074] See also Figure 1 , Figure 1 It is a structural diagram of a communication device provided in an embodiment of the present application. The communication device 100 includes a fingerprint library construction module 120, a sequence fingerprint library 140 and an encrypted traffic identification module 160.

[0075] The fingerprint library construction module 120 is used to construct a sequence fingerprint library 140 .

[0076] The sequence fingerprint library 140 is used to store multiple sequence fingerprints and the corresponding relationship between the multiple sequence fingerprints and multiple service types. The multiple sequence fingerprints correspond to one service type among the multiple service types respectively, and the same service type may have one or more corresponding sequence fingerprints.

[0077] The encrypted traffic identification module 160 is used to identify the service type to which the encrypted traffic belongs according to the sequence fingerprint library 140 .

[0078] Based on the above communication device 100, an embodiment of a method for constructing a sequence fingerprint library provided by the present application is introduced below.

[0079] See also Figure 2 , Figure 2 This is a flow chart of a method for constructing a sequence fingerprint library provided in an embodiment of the present application, which can be used for Figure 1 The fingerprint database construction module 120 includes steps S201 to S205.

[0080] S201. Obtain multiple traffic samples of a first service type.

[0081] The first service type is one of the multiple service types. It should be understood that Figure 2 The first service type is used as an example for description, but it does not mean that the fingerprint database construction module 120 can only be executed for the first service type. Figure 2 The fingerprint database construction module 120 can also be used for other service types except the first service type. Figure 2 method to obtain the corresponding sequence fingerprint.

[0082] The embodiments of the present application do not specifically limit the method of dividing service types.

[0083] For example, according to the basic type of network service, there can be email service, database service, file transfer protocol (FTP) service, hypertext transfer protocol (HTTP) service, DNS service, etc. Under the same basic type of network service, different sub-service types can be further divided. For example, the basic network service type of email service can be further divided into X mail service, Y mail service, Z mail service, etc. according to the service level.

[0084] For example, according to the basic type of network applications, there can be network video applications, instant messaging applications, online game applications, online banking applications and other service types. Under the same basic type of network applications, different sub-service types can be further divided. For example, the basic type of network application, network video applications, can be further divided into A video applications, B video applications, C video applications, etc. according to the application level.

[0085] The multiple traffic samples of the first service type respectively correspond to a traffic (or stream / network traffic / data stream) of the first service type, and each traffic sample may include part or all of the data packets in the corresponding traffic, and the sequence of all data packets in each traffic sample is consistent with their sequence in the original traffic. The above traffic may be encrypted traffic or unencrypted traffic, and the encrypted traffic may be QUIC traffic, transport layer security (TLS) traffic, etc., which is not specifically limited in the embodiments of the present application.

[0086] The embodiments of the present application do not specifically limit the method of dividing the traffic.

[0087] Optionally, the fingerprint library construction module 120 may first collect multiple data packets related to the first service type, wherein a data packet related to the first service type means that the data packet belongs to a certain flow of the first service type. Then, the fingerprint library construction module 120 may divide the above multiple data packets in the form of flows, thereby dividing into flows of the first service type. The above flows may be unidirectional flows or bidirectional flows.

[0088] For example, the fingerprint library construction module 120 can divide the traffic according to the quintuple, and the data packets corresponding to the same quintuple can be attributed to the same unidirectional flow, and the data packets corresponding to any one of the two related quintuples can be attributed to the same bidirectional flow. Wherein, the quintuple refers to an information set consisting of a source Internet Protocol (Internet Protocol, IP) address, a destination IP address, a protocol number (transport layer protocol type), a source port and a destination port. Two quintuples are related to each other, which means that the source IP addresses and the target IP addresses of the two quintuples are just opposite, their source ports and destination ports are also just opposite, and they have the same protocol number. For example, the first quintuple and the second quintuple have the same protocol number, and the source IP address, the destination IP address, the source port and the destination port of the first quintuple are the first address, the second address, the first port, and the second port, respectively, and the source IP address, the destination IP address, the source port and the destination port of the second quintuple are the second address, the first address, the second port, and the first port, respectively. At this time, it can be determined that the above-mentioned first quintuple and the second quintuple are two related quintuples.

[0089] For another example, the connection ID of the QUIC protocol is used to identify a connection process of QUIC, so the fingerprint library construction module 120 can divide the QUIC traffic according to the connection ID of the QUIC protocol, and attribute the QUIC data packets with the same connection ID to the same QUIC traffic (which is a bidirectional flow). Alternatively, the fingerprint library construction module 120 can attribute the QUIC data packets with the same connection ID and corresponding to the upstream direction to the same upstream traffic (which is a unidirectional flow), and can also attribute the QUIC data packets with the same connection ID and corresponding to the downstream direction to the same downstream traffic (which is a unidirectional flow).

[0090] It should be understood that the direction corresponding to the data packet (i.e., the packet direction) can be an upstream direction or a downstream direction, which can be determined by the sender of the data packet. For example, the packet direction of the data packet sent from the client to the server can be called the upstream direction, and the packet direction of the data packet sent from the server to the client can be called the downstream direction. For another example, for a certain data packet, if the destination port number in the data packet is 443, it can be determined that the data packet is sent by the client, and the packet direction is the upstream direction; if the source port number of the data packet is 443, it can be determined that the data packet is sent by the server, and the packet direction is the downstream direction. For the convenience of description, the packet direction of the data packet sent by the client will be referred to as the upstream direction in the following text, and will be represented by the symbol "+", and the packet direction of the data packet sent by the server will be referred to as the downstream direction, and will be represented by the symbol "-". It should be noted that the name of the packet direction and the representation symbol here are only used as examples and do not constitute specific limitations.

[0091] Optionally, a traffic sample of the first service type may include a data packet at a specified position in the corresponding traffic. The specified position may be set according to the application scenario to limit the acquisition range of the data packet. For any traffic of the first service type, the fingerprint library construction module 120 only needs to obtain the data packet at the specified position in the traffic to form a traffic sample corresponding to the traffic.

[0092] For example, assuming that the designated position is set to the first N (N is a positive integer), for a certain flow of the first service type, the fingerprint library construction module 120 only needs to obtain the first N data packets in the flow to form a flow sample corresponding to the flow according to the provisions of the above designated position. The above N can be optimized and adjusted according to application needs, and the embodiments of the present application do not make specific limitations.

[0093] Optionally, the fingerprint library construction module 120 may first collect traffic logs related to the first service type, wherein the traffic log of the first service type refers to the information of the traffic of the first service type recorded in the form of a flow log (including the information of the data packets in the traffic). Then, the fingerprint library construction module 120 may extract the information of the data packets in the multiple traffics of the first service type from the above-mentioned traffic logs. For each of the above-mentioned traffics, the fingerprint library construction module 120 may directly regard the information of part or all of the data packets in the traffic as a traffic sample of the first service type. The fingerprint library construction module 120 may obtain the traffic log corresponding to the first service type from the device responsible for collecting the traffic log, or may collect the traffic log of the first service type by itself, which is not specifically limited in the embodiments of the present application.

[0094] Optionally, the fingerprint library construction module 120 can directly obtain multiple traffic samples of the first service from the public traffic data set, or it can use traffic collection tools to capture packets in the target network (such as a real network environment such as an enterprise intranet, campus network, etc. implementing this solution, or an experimental network environment), or it can use mirroring technology to collect network traffic, and thus obtain multiple traffic samples of the first service type.

[0095] For example, suppose there are multiple experimental devices, each of which is deployed with a network application of different service types (including the first service type). By running the corresponding network applications on the above multiple experimental devices and mirroring the traffic generated by them to the fingerprint library construction module 120, the fingerprint library construction module 120 can collect multiple traffic and obtain multiple traffic samples. The fingerprint library construction module 120 can also determine the service type to which the corresponding traffic sample belongs based on the experimental devices from which the above multiple traffics originate.

[0096] For another example, the fingerprint library construction module 120 can first collect multiple QUIC flows from the target network, and then determine whether decryption is required based on the version number field (unencrypted) in the above multiple QUIC flows. If the version number field in a certain QUIC flow indicates a QUIC version that needs to be decrypted, it is necessary to decrypt the first packet of the QUIC flow to obtain the host name identification, certificate, handshake parameters and other information of the QUIC flow. The decryption method can be to obtain the version number and connection ID value in the first packet of the QUIC flow, and then calculate the encryption key of the first packet according to the key calculation method, and then use the calculated encryption key to decrypt the first packet to obtain the host name identification, certificate, handshake parameters and other information of the QUIC flow. If the version number field in a certain QUIC flow indicates a QUIC version that does not need to be decrypted, it is not necessary to decrypt the first packet of the QUIC flow, and the host name identification, certificate, handshake parameters and other information can be directly obtained from the QUIC flow. The fingerprint library construction module 120 performs feature matching based on the above information and the information in the feature library, and can respectively determine the service types to which the above multiple QUIC flows belong, thereby obtaining multiple flow samples of the corresponding service types. Among them, the above feature library records the correspondence between multiple different feature combinations and multiple service types, each feature combination corresponds to a service type, and each feature combination can include one or more of the information such as host name identification, certificate, handshake parameters, etc.

[0097] Optionally, the user may instruct the fingerprint library construction module 120 to obtain traffic samples of which service types according to actual application scenarios, and the user may also instruct the fingerprint library construction module 120 how much information needs to be obtained.

[0098] For example, assuming that a transmission network is used to carry 50 types of services, in order to construct a sequence fingerprint library 140 that can be used to identify various network traffic appearing in the transmission network, the user can instruct the fingerprint library construction module 120 to obtain traffic samples of the above 50 service types, and can also instruct the fingerprint library construction module 120 to obtain the amount of information that needs to be obtained. Then, the fingerprint library construction module 120 can execute step S201 according to the above user instructions.

[0099] S202: Generate multiple flow information sequences corresponding to the first service type according to multiple traffic samples of the first service type.

[0100] Specifically, after obtaining multiple traffic samples of the first service type, the fingerprint library construction module 120 can parse the multiple traffic samples respectively, so as to generate a corresponding flow information sequence for each traffic sample. A flow information sequence includes packet information of part or all of the data packets in the corresponding traffic sample, each packet information is used to indicate the characteristics of the corresponding data packet, and the sequence of all packet information in a flow information sequence is consistent with the sequence of the data packets corresponding to the above packet information in the corresponding traffic sample.

[0101] For example, a certain flow information sequence corresponds to a certain traffic sample of the first service type, and packet information A and packet information B in the flow information sequence correspond to data packet X and data packet Y in the traffic sample, respectively, and packet information A and packet information B are used to indicate the characteristics of data packet X and data packet Y, respectively. If the order of data packet X in the traffic sample is earlier than that of data packet Y, then the order of packet information A in the flow information sequence must also be earlier than that of packet information B. If the order of data packet Y in the traffic sample is earlier than that of data packet X, then the order of packet information B in the flow information sequence must also be earlier than that of packet information A.

[0102] Optionally, the above-mentioned characteristics may include one or more of payload length, packet direction, and packet type, that is, the packet information of a data packet may describe the characteristics of the data packet from one or more of the above-mentioned different dimensions.

[0103] The payload length refers to the length of the application layer information in the data packet. Taking the QUIC protocol as an example, the QUIC data packet consists of two parts: the header information and the payload. The payload part is the encrypted application layer information. The payload length of the QUIC data packet is the length of the payload part of the QUIC data packet excluding the header information.

[0104] The packet direction refers to the direction in which the data packet is sent, which may be an uplink direction or a downlink direction. For the determination of the uplink direction and the downlink direction, please refer to the relevant introduction in step S201, which will not be repeated here.

[0105] The packet type can be used to indicate the main function of the data packet. Taking the QUIC protocol as an example, QUIC data packets can be divided into long header packets (LHP) and short header packets (SHP). Long header packets include initial packets (INI packets), retry packets, handshake (Handshake / HDS) packets, and zero round-trip time (0-RTT) packets. It should be understood that the above different types of data packets act on different interaction stages of the traffic. For example, INI packets are generally used to negotiate encryption information, retry packets are used to handle exceptions, handshake packets are used to establish handshake connections, and SHP packets are used to transmit user data. In actual application scenarios, the packet type can be determined by the header information (unencrypted) in the QUIC data packet.

[0106] It should be understood that the characteristics of the above-mentioned dimensions such as payload length, packet direction, and packet type can be determined by the plaintext information (i.e., unencrypted information) in the data packet. In other words, obtaining the above-mentioned characteristics of the data packet does not require decrypting the data packet, making the traffic identification method based on these characteristics more efficient.

[0107] For ease of description, a flow information sequence corresponding to a traffic sample can be represented in the form of a one-dimensional array. Each element in the array represents a packet information, and each packet information corresponds to a data packet in the traffic sample, which is used to indicate the characteristics of the corresponding data packet. In addition, the sequence of each packet information in the same array is consistent with the sequence of the data packets corresponding to these packet information in the corresponding traffic sample.

[0108] For example, assuming that there is a QUIC traffic sample of the first service type, the fingerprint library construction module 120 obtains a flow information sequence by parsing the data packets in the QUIC traffic sample. The flow information sequence can be expressed in a one-dimensional array as follows: [+_1350_INI,-_1350_INI,+_870_HDS,-_890_HDS,+_600_SHP,-_500_SHP]. The content in the square brackets represents an array, each element in the array is separated by commas, each element represents a packet information, and a total of six packet information are included. Each packet information corresponds to a data packet in the QUIC traffic sample, and each packet information is used to indicate the characteristics of the corresponding data packet in three dimensions: payload length, packet direction, and packet type. Taking the first packet information "+_1350_INI" as an example, "+" indicates that the packet direction of the data packet corresponding to the packet information is the uplink direction, indicating that the data packet is sent by the client, 1350 indicates that the payload length of the data packet corresponding to the packet information is 1350 bytes, and "INI" indicates that the packet type of the data packet corresponding to the packet information is the INI packet type. Taking the fourth element "-_890_HDS" as an example, "-" indicates that the packet direction of the data packet corresponding to the packet information is the downlink direction, indicating that the data packet is sent from the server, 890 indicates that the payload length of the data packet corresponding to the packet information is 890 bytes, and "HDS" indicates that the packet type of the data packet corresponding to the packet information is the HDS packet type. It should be noted that the above-mentioned representation of the packet information and stream information sequences is only for example and does not constitute a specific limitation. They can also be represented in other forms.

[0109] It should be understood that for a traffic sample of the first service type, it is possible that only a portion of the data packets in the traffic sample can reflect the traffic difference between the first service type and other service types, while another portion of the data packets in the traffic sample cannot reflect the traffic difference between the first service type and other service types. In other words, some data packets have no positive effect on the traffic identification of the first service type, so these data packets can be considered as unimportant data packets, and they are not of much significance for the subsequent generation of the sequence fingerprint corresponding to the first service type. Among them, the sequence fingerprint of the first service type is used to identify the traffic belonging to the first service type, which can be seen in the following text. Figure 5 Therefore, in some possible embodiments, a flow information sequence of the first service type only includes packet information of important data packets in the corresponding traffic sample, but does not include packet information of unimportant data packets in the traffic sample, thereby facilitating the subsequent construction of a sequence fingerprint corresponding to the first service type, so as to further improve the accuracy of identifying the service type to which the traffic belongs based on the sequence fingerprint.

[0110] Optionally, importance conditions can be set in combination with expert experience to determine which data packets in the traffic sample of the first service type are important data packets and which are unimportant data packets. At this time, the fingerprint library construction module 120 can generate multiple flow information sequences of the first service type according to the importance conditions, and each flow information sequence only contains packet information of data packets that can meet the above importance conditions. It should be noted that Figure 2 The method is described by taking the first service type as an example. In actual application scenarios, the same importance condition can be set for different service types, or different importance conditions can be set for different service types. The embodiments of the present application do not make specific limitations.

[0111] Optionally, the importance condition may be set from aspects such as packet type, payload length, and packet direction. For example, the importance condition may include one or more of the following: the packet type is a preset type, the payload length is within a preset range, and the importance value obtained based on the importance algorithm is greater than or equal to the importance threshold.

[0112] Among them, the importance algorithm can be a term frequency-inverse document frequency (TF-IDF) algorithm, an artificial intelligence (AI) algorithm, etc., which is not specifically limited in the embodiments of the present application. The importance value of each data packet in the same traffic sample is calculated by the importance algorithm. The data packet with an importance value greater than or equal to the importance threshold can be considered as an important data packet, and the data packet with an importance value less than the importance threshold is considered as an unimportant data packet.

[0113] For example, the idea of ​​the TF-IDF algorithm is migrated to this scenario. If a data packet appears more times in the traffic sample of the first service type, and the data packet appears less times in the traffic samples of other service types, the importance of the data packet can be considered to be higher. Therefore, the importance value can be calculated for each data packet in the same traffic sample of the first service type based on the TF-IDF algorithm, and then the importance value of each data packet can be compared with the importance threshold. If the importance value of a data packet is greater than or equal to the importance threshold, the data packet can be determined as an important data packet. If the importance value of a data packet is less than the importance threshold, the data packet can be determined as an unimportant data packet, and the data packet is removed. When the fingerprint library construction module 120 generates multiple flow information sequences of the first service type according to the importance condition, each flow information sequence only contains packet information of data packets that meet the importance condition.

[0114] For another example, the QUIC protocol requires the use of INI type packets to negotiate encryption information. For multiple service types using the QUIC protocol, INI type packets will appear in their traffic. Since the use of INI type packets is determined by the QUIC protocol itself, INI type packets cannot be used to distinguish the above multiple service types. Assuming that the encryption protocol used by the first service type is the QUIC protocol, the preset packet type in the importance condition of the first service type can be set to a packet type other than the INI type. When the fingerprint library construction module 120 generates multiple flow information sequences of the first service type according to the importance condition, each flow information sequence does not contain packet information of a data packet with a packet type of INI type.

[0115] Optionally, for a certain traffic sample, the fingerprint library construction module 120 may first determine the important data packets in the traffic sample in the aforementioned manner, and then generate a flow information sequence corresponding to the traffic sample based on the important data packets in the traffic sample, and the flow information sequence only includes the packet information of the important data packets in the traffic sample. Alternatively, the fingerprint library construction module 120 may first parse all the data packets in the traffic sample to generate a flow information sequence corresponding to the traffic sample, and the flow information sequence at this time includes the packet information of all the data packets in the traffic sample, and then, the fingerprint library construction module 120 may determine which data packets in the traffic sample are unimportant data packets based on the aforementioned manner, and then remove the packet information corresponding to the unimportant data packets in the above-mentioned flow information sequence, and finally the obtained flow information sequence only includes the packet information of the important data packets.

[0116] S203: Perform packet regularization on multiple flow information sequences corresponding to the first service type.

[0117] It can be understood that if the number of traffic samples of the first service type acquired by the fingerprint library construction module 120 in step S201 is relatively small, the flow information sequence corresponding to the first service type generated in step S202 will also be relatively small. At this time, the packet information that appears repeatedly in the above flow information sequence may be very small, which will be detrimental to the frequent sequence mining (i.e. mining frequently occurring sequences) in step S204, thereby affecting the acquisition of the sequence fingerprint corresponding to the first service type.

[0118] Therefore, in some possible embodiments, if the number of traffic samples of the first service type obtained in step S201 is less than or equal to the preset number, the number of flow information sequences of the first service type obtained in step S202 will also be less than or equal to the preset number. At this time, the fingerprint library construction module 120 can execute step S203 to regularize the packets of the multiple flow information sequences corresponding to the first service type so that the number of repeated packet information in the multiple flow information sequences is increased, thereby facilitating the execution of the subsequent step S204.

[0119] In some other possible embodiments, the fingerprint library construction module 120 may perform step S203 by default, or may not perform step S203 by default, that is, after performing the step S203, Figure 2 After step S202, jump directly to step S204.

[0120] Specifically, assuming that the first packet information and the second packet information are two packet information in a plurality of flow information sequences corresponding to the first service type, the first packet information is used to indicate the characteristics of the first data packet, and the second packet information is used to indicate the characteristics of the second data packet. Among them, the payload length of the first data packet indicated in the first packet information is a first value, and the payload length of the second data packet indicated in the second packet information is a second value. If the only feature indicated by the above two packet information is different in payload length, and the difference between the first value and the second value is less than or equal to the first threshold value, then the fingerprint library construction module 120 can adjust the payload lengths indicated in the above two packet information to the same value. For example, it can be uniformly regularized to one of the first value and the second value, or it can be regularized in other ways.

[0121] It should be understood that since the subsequent step S204 generates a sequence fingerprint corresponding to the first service type based on frequent sequence mining, increasing the number of repeated packet information in multiple flow information sequences corresponding to the first service type through packet regularization will help the execution of the subsequent step S204.

[0122] Optionally, the first packet information and the second packet information may originate from the same flow information sequence or from different flow information sequences. In other words, packet regularization may be performed on packet information in the same flow information sequence or on packet information in different flow information sequences.

[0123] For example, there are multiple packet information (including the third packet information and the fourth packet information) in a flow information sequence corresponding to a certain traffic sample, and each packet information is used to indicate the characteristics of a QUIC data packet corresponding to the QUIC traffic sample. Among them, the characteristics of a QUIC data packet indicated by the third packet information are: the packet direction is the upstream direction, the packet type is "HDS", and the payload length is 678 bytes. The characteristics of a QUIC data packet indicated by the fourth packet information are: the packet direction is the upstream direction, the packet type is "HDS", and the payload length is 675 bytes. It can be seen that the only difference between the characteristics indicated by the third packet information and the fourth packet information is the payload length, and the difference in the payload length indicated by the two is 3. Assuming that 3 is less than the first threshold, the indicated payload length in the third packet information and the fourth packet information can be regularized to the same value (assuming that the regularization is 675), and the contents of the third packet information and the fourth packet information after packet regularization are exactly the same. It should be noted that packet regularization only changes the value of the payload length indicated in the corresponding packet information, and does not change the characteristics of other dimensions indicated in the packet information, nor does it change the order of the packet information in the flow information sequence.

[0124] In some possible embodiments, the variation interval of the payload length may be divided into multiple sub-intervals according to certain intervals. For each sub-interval, a value within the interval may be selected as the value corresponding to the sub-interval, and all payload length values ​​falling within the interval will be uniformly regularized to the value corresponding to the sub-interval.

[0125] For example, assuming that the variation interval of the payload length is 1 to 1000 bytes, the variation interval is divided into 5-byte intervals (the size is adjustable), and a total of 200 sub-intervals can be divided, and then a corresponding numerical value is set for each sub-interval. The embodiment of the present application does not specifically limit the setting method of the numerical value corresponding to each sub-interval. For example, the median of each sub-interval can be used as the numerical value corresponding to the sub-interval. The numerical value corresponding to the first sub-interval [1,5] divided according to the above method is 3, and the numerical value corresponding to the second sub-interval [6,10] is 8. Similarly, the numerical values ​​corresponding to other sub-intervals can be obtained. For another example, the maximum or minimum value in each sub-interval can also be used as the numerical value corresponding to the sub-interval.

[0126] It should be understood that the QUIC protocol supports carrying multiple QUIC frames in one QUIC data packet. Assuming that the first service type uses the QUIC protocol, the two QUIC data packets of the first service type transmit the same application layer content, but because one of the QUIC data packets also inserts additional QUIC frames such as ACK frames, PADDING frames or other types of QUIC frames, there is a slight difference in the payload length between the above two QUIC data packets (referred to as the offset of the payload length). This offset in payload length will also result in less repeated packet information in the multiple stream information sequences of the first service type (corresponding to the QUIC traffic samples), thereby affecting the frequent sequence mining of step S204. At this time, the aforementioned packet regularization operation can be performed to increase the amount of repeated packet information in the above multiple stream information sequences, thereby reducing the impact of the offset in payload length on the subsequent construction of the sequence fingerprint of the first service type.

[0127] In a possible embodiment, the length of the sub-interval can be determined according to the length of the confirmation field (i.e., ACK field) and / or the padding field (PADDING field) in the encryption protocol used by the first service type. The length of the sub-interval refers to the distance / span between the upper boundary and the lower boundary of the sub-interval. The above-mentioned encryption protocol can be the QUIC protocol, the TLS protocol, etc., which is not specifically limited in the embodiments of the present application.

[0128] For example, it is known from manual experience that the offset of the payload length of the QUIC data packet caused by the insertion of fields such as ACK frames and PADDING frames is generally within 10. Therefore, the length of the sub-interval can be set within 10.

[0129] In another possible embodiment, the sequence fingerprints corresponding to the first service type may be generated under various sub-interval lengths, and then the recognition accuracy and / or misrecognition rate of the sequence fingerprints obtained under different sub-interval lengths for the traffic of the first service type may be tested (the traffic recognition method may refer to Figure 5 ). Finally, the sub-interval length corresponding to the sequence fingerprint whose recognition accuracy is higher than the first threshold and / or whose misrecognition rate is lower than the second threshold can be taken as the most appropriate sub-interval length.

[0130] For example, if the subinterval length is set to 6, Figure 2 The sequence fingerprint corresponding to the first service type obtained by the method is sequence fingerprint A. When the sub-interval length is set to 10, Figure 2The sequence fingerprint corresponding to the first service type obtained by the method is sequence fingerprint B. Sequence fingerprint A and sequence fingerprint B are tested respectively using traffic of multiple service types including the first service type, wherein the recognition accuracy of sequence fingerprint A for the traffic of the first service type is 85%, and the recognition accuracy of sequence fingerprint B for the traffic of the first service type is 90%. At this time, the sub-interval length 10 corresponding to sequence fingerprint B with a higher recognition accuracy can be used as the most appropriate sub-interval length.

[0131] S204: Determine a sequence fingerprint corresponding to the first service type according to multiple flow information sequences corresponding to the first service type.

[0132] There may be one or more sequence fingerprints corresponding to the first service type.

[0133] Specifically, when the fingerprint library construction module 120 obtains multiple flow information sequences of the first service type according to the aforementioned steps, the fingerprint library construction module 120 can use statistical methods or sequence pattern mining algorithms to mine frequently occurring sequences (i.e., frequent sequences) from the above multiple flow information sequences. Among them, the sequence pattern mining algorithm can be a prefix-projected pattern mining (prefix-projected pattern growth, PrefixSpan), AprioriAll, a generalized sequential pattern (generalized sequential pattern, GSP), a frequent pattern projection sequence pattern mining (FreeSpan) and other algorithms, which are not specifically limited in the embodiments of the present application. Optionally, 1st order, 2nd order, ..., Nth order frequent sequences can be mined from the above multiple flow information sequences, where the order represents the number of packet information in the frequent sequence.

[0134] Then, the fingerprint library construction module 120 can select a frequent sequence that meets the screening condition from the multiple frequent sequences mined above as the sequence fingerprint corresponding to the first service type. The screening condition here can be set based on manual experience, and different screening conditions can be set for different service types, which is not specifically limited in the embodiment of the present application.

[0135] Optionally, the filtering conditions can be set from aspects such as the length of the frequent sequence, the number of sequence occurrences, and the position of the sequence occurrence. For example, the filtering conditions may include one or more of the sequence length being greater than or equal to a preset length, the number of sequence occurrences being greater than or equal to a preset number, and the sequence occurrence position being before a preset position. Among them, the appearance of a frequent sequence in a certain flow information sequence means that the frequent sequence is a subsequence of the flow information sequence. The position of the occurrence of the frequent sequence in the flow information sequence can be the position of the occurrence of the first packet information in the frequent sequence in the flow information sequence, or it can be the position of the occurrence of the last packet information in the frequent sequence in the flow information sequence, and the embodiments of the present application do not make specific limitations on this.

[0136] For example, it is assumed that the fingerprint library construction module 120 mines multiple frequent sequences from multiple stream information sequences of the first service type based on the PrefixSpan algorithm. For any of the above multiple frequent sequences, if the sequence length of the frequent sequence is greater than or equal to the preset length, the frequent sequence can be used as a sequence fingerprint corresponding to the first service type. Alternatively, if the number of occurrences of a frequent sequence (as a subsequence) in multiple stream information sequences of the first service type is greater than or equal to the preset number of times, the frequent sequence can be used as a sequence fingerprint corresponding to the first service type. Alternatively, if the appearance position of a frequent sequence in multiple stream information sequences of the first service type is prior to the preset position, the frequent sequence can be used as a sequence fingerprint corresponding to the first service type.

[0137] For another example, assume that the fingerprint library construction module 120 selects two frequent sequences from the 50 flow information sequences of the first service type based on the PrefixSpan algorithm, which are recorded as the first frequent sequence and the second frequent sequence. The lengths of the first frequent sequence and the second frequent sequence are both 3, that is, both contain 3 packet information. Assume that the first frequent sequence appears in 35 of the above 50 flow information sequences, and the latest appearance position in the above 35 flow information sequences is 20. The second frequent sequence appears in 32 of the above 50 flow information sequences, and the latest appearance position in the above 36 flow information sequences is 16. According to the sequence appearance position, the second frequent sequence with a more forward sequence appearance position can be determined as a sequence fingerprint corresponding to the first service type.

[0138] For another example, assume that the screening conditions are: the recognition accuracy is higher than the first threshold and / or the false recognition rate is lower than the second threshold. The fingerprint library construction module 120 screens out multiple frequent sequences for the first service type, and then the recognition accuracy and / or false recognition rate of the above-mentioned multiple frequent sequences for the traffic of the first service type can be tested separately. As to how to perform the test, the embodiment of the present application does not specifically limit it. For example, traffic samples of multiple service types including the first service type can be obtained. For each of the above-mentioned multiple frequent sequences, the frequent sequence is temporarily used as the sequence fingerprint corresponding to the first service type to identify the traffic samples of the above-mentioned multiple service types (the traffic identification method can be referred to). Figure 5 ), and then determine the recognition accuracy and misrecognition rate of the sequence fingerprint for the traffic of the first service type according to the recognition result. Finally, the fingerprint library construction module 120 can use the frequent sequences that meet the above screening conditions as the sequence fingerprint corresponding to the first service type.

[0139] It should be noted that the above examples are all described by taking the first service type as an example. In actual application scenarios, the same screening conditions can be set for different service types, or different screening conditions can be set for different service types, which is not specifically limited in the embodiments of the present application.

[0140] Optionally, after determining a sequence fingerprint corresponding to the first service type, the packet spacing between the data packets corresponding to the different packet information in the sequence fingerprint in the multiple traffic samples corresponding to the first service type can also be counted, and then the packet spacing obtained by statistics is also used as one of the components of the sequence fingerprint to further enhance the robustness of the sequence fingerprint. Among them, each traffic sample in the above multiple traffic samples includes all data packets in the corresponding traffic, that is, each traffic sample is consistent with the corresponding original traffic. It should be understood that for any packet information in the sequence fingerprint, the corresponding data packet refers to a data packet that can meet all the characteristics indicated by the packet information. It should also be understood that the packet spacing between two data packets in the same traffic / traffic sample refers to the number of data packets spaced between the two data packets. For example, a certain traffic includes data packets A, B, C, D and E in sequence. Since there is only one data packet (i.e., data packet B) between data packets A and C, the packet spacing between data packets A and C is 1, and since there are three data packets (i.e., data packets B, C and D) between data packets A and E, the packet spacing between data packets A and E is 3.

[0141] For example, Figure 3 As shown, it is assumed that the fingerprint library construction module 120 collects 4 traffic samples for the first service type, and generates 4 flow information sequences based on the above 4 traffic samples, which are respectively recorded as flow information sequence 1, flow information sequence 2, flow information sequence 3 and flow information sequence 4 (in Figure 3In the figure, each flow information sequence corresponds to a traffic sample, and each flow information sequence value only contains the packet information of some data packets in the corresponding traffic sample. The data packets corresponding to the packet information in each flow information sequence all meet the importance condition (see the description in step S202). The individual packet information in the same flow information sequence are separated by commas, and each packet information indicates the characteristics of the three dimensions of the payload length, packet direction and packet type of the corresponding data packet in the corresponding traffic sample. Then, the fingerprint library construction module 120 can perform frequent sequence mining on the above four flow information sequences based on a sequence pattern mining algorithm or a statistical method, so as to obtain Figure 3 Based on the sequence screening condition, the fingerprint library construction module 120 selects two 3rd-order frequent sequences as two sequence fingerprints corresponding to the first service type, namely Figure 3 Sequence fingerprint 1 and sequence fingerprint 2 in .

[0142] Then, the fingerprint library construction module 120 can also count the packet distances in the above four traffic samples according to the sequence fingerprint 1 and the sequence fingerprint 2, so as to use the corresponding packet distances as part of the sequence fingerprint 1 and the sequence fingerprint 2.

[0143] Take sequence fingerprint 1 as an example, Figure 3 As shown, sequence fingerprint 1 can be expressed in a one-dimensional array form as: [+_870_HDS, +_700_SHP, -_207_HDS], and sequence fingerprint 1 includes 3 packet information. Among them, the characteristics indicated by packet information +_870_HDS are: the packet direction is the uplink direction, the payload length is 870 bytes, and the packet type is the HDS packet type. Packet information +_700_SHP

[0144]

[0145] The indicated features are: the packet direction is the downstream direction, the payload length is 207 bytes, and the packet type is a short header packet.

[0146] Next, the rules satisfied by the packet spacing between the data packets that meet the characteristics indicated by the above three packet information are counted in the original four traffic samples, and then the corresponding packet spacing characteristics are added to the sequence fingerprint 1. Assume that it is found through statistics that in the above four traffic samples, the number of data packets between the data packets that meet the characteristics indicated by +_700_SHP and the data packets that meet the characteristics indicated by -_207_SHP is always 0, that is, the packet spacing is 0, and the packet spacing characteristics are added to the sequence fingerprint 1, so the sequence fingerprint 1 is updated to sequence fingerprint 1': [+_870_HDS, +_700_SHP_(-_207_HDS)=0, -_207_HDS]. Among them, the characteristics indicated by the packet information +_700_SHP_(-_207_HDS)=0 are: the packet direction is the uplink direction, the payload length is 700 bytes, the packet type is a short header packet, and the packet spacing between the data packets that meet the characteristics indicated by -_207_SHP is equal to 0.

[0147] Similarly, the statistics of the original 4 traffic samples can meet Figure 3 The packet spacing between the data packets with the characteristics indicated by the packet information in the sequence fingerprint 2 satisfies the law, and then the corresponding packet spacing characteristics are added to the sequence fingerprint 2. Assume that after statistics, it is found that in the above 4 traffic samples, the number of data packets between the data packets that meet the characteristics indicated by the packet information 880_HDS and the data packets that meet the characteristics indicated by the packet information -_700_SHP is always less than 3, that is, the packet spacing is less than 3. After adding the above packet spacing, the sequence fingerprint 2 is updated to Figure 3 Sequence fingerprint 2' in: [+_880_HDS_(-_700_SHP)<3, +_700_SHP, -_207_HDS]. Among them, the characteristics indicated by +_880_HDS_(-_700_SHP)<3 are: the packet direction characteristic is the uplink direction, the payload length characteristic is 880 bytes, the packet type characteristic is the HDS packet type, and the packet spacing between the data packets that meet the characteristics indicated by +_700_SHP is less than 3, that is, the packet spacing can be 0, 1 or 2. It should be noted that the above-mentioned representation forms of the packet information and flow information sequences are only examples and do not constitute specific limitations. They can also be represented in other forms.

[0148] The embodiments of the present application do not specifically limit the statistical method of packet spacing.

[0149] For example, suppose that a sequence fingerprint corresponding to the first service type includes packet information A and packet information B in sequence, and a traffic sample of the first service type includes data packets A1, B1, A2, A3 and B2 in sequence. Since data packets A1, A2 and A3 in the traffic sample can satisfy all the features indicated by packet information A, data packets A1, A2 and A3 correspond to packet information A. Since data packets B1 and B2 in the traffic sample can satisfy all the features indicated by packet information B, data packets B1 and B2 correspond to packet information B. It can be seen that the distances between data packets A1, A2 and A3 and data packet B1 are 0, 0 and 1 respectively, and the distances between data packets A1, A2 and A3 and data packet B2 are 3, 1 and 0 respectively. That is to say, in the traffic sample, when counting the packet spacing between the data packets corresponding to packet information A and the data packets corresponding to packet information B, there will be three cases of 0, 1 and 3.

[0150] Optionally, according to the minimum packet spacing principle, the one with the smallest value among the above three cases can be used as the packet spacing between the data packets corresponding to packet information A and packet information B in the traffic sample, thereby providing a stricter packet spacing constraint. Alternatively, according to the maximum packet spacing principle, the one with the largest value among the above three cases can be used as the packet spacing between the data packets corresponding to packet information A and packet information B in the traffic sample. Alternatively, the packet spacing can be first counted under the minimum packet spacing principle and the maximum packet spacing principle respectively, and the sequence fingerprint corresponding to the first service type can be generated, and then the recognition accuracy and / or misrecognition rate of the sequence fingerprint obtained by the above two principles for the traffic of the first service type can be tested respectively (the traffic recognition method can be found in Figure 5 ). Finally, the principle corresponding to the sequence fingerprint with a recognition accuracy higher than the first threshold and / or a false recognition rate lower than the second threshold can be used as the principle adopted when subsequently counting the packet distance corresponding to the first service type.

[0151] It should be understood that, since step S203 is optional, the flow information sequence used by the fingerprint library construction module 120 to mine frequent sequences in step S204 may be packet-regularized or not. Therefore, in some possible embodiments, if step S203 is executed, the multiple flow information sequences used to mine frequent sequences in step S204 are packet-regularized, that is, the payload lengths indicated by some packet information in the flow information sequence are regularized, then after the fingerprint library construction module 120 generates the sequence fingerprint corresponding to the first service type according to the aforementioned method, the values ​​of the payload lengths in each sequence fingerprint can be restored to the values ​​before regularization.

[0152] Continuing with the previous example, Figure 3As shown, the fingerprint library construction module 120 has determined two sequence fingerprints for the first service type, namely, sequence fingerprint 1' and sequence fingerprint 2'. Assuming that the packet information -_207_HDS in the sequence fingerprint 1' is obtained by the fingerprint library construction module 120 in step S203 by regularizing the two packet information -_205_HDS and -_209_HDS, then the payload length of -_207_HDS in the sequence fingerprint 1' can be restored to the value before regularization, so that the sequence fingerprint 1' is adjusted to the following two sequence fingerprints: [+_870_HDS, +_700_SHP_3*(-_207_HDS), -_205_HDS], [+_870_HDS, +_700_SHP_3*(-_207_HDS), -_209_HDS]. Similarly, if there is packet information whose payload length is regularized in the sequence fingerprint 2', the sequence fingerprint 2' also needs to perform a similar restoration operation.

[0153] For another example, assume that the fingerprint library construction module 120 determines multiple sequence fingerprints for the first service type, and one of the sequence fingerprints A is [+_885_HDS, +_606_SHP, -_210_HDS]. Assume that the first packet information +_885_HDS in the sequence fingerprint A is obtained by the fingerprint library construction module 120 in step S203 by performing packet regularization on two packet information +_882_HDS and +_886_HDS, and the second packet information +_606_SHP in the sequence fingerprint A is obtained by the fingerprint library construction module 120 in step S203 by performing packet regularization on two packet information +_600_SHP and +_608_SHP. At this time, the fingerprint library construction module 120 can restore the payload lengths of the first packet information +_885_HDS and the second packet information +_606_SHP in the sequence fingerprint A to the values ​​before regularization, thereby obtaining the following four sequence fingerprints: [+_882_HDS, +_600_SHP, -_210_HDS], [+_882_HDS, +_608_SHP, -_210_HDS], [+_886_HDS, +_600_SHP, -_210_HDS], [+_882_HDS, +_608_SHP, -_210_HDS].

[0154] It can be seen that by performing the above restoration operation on the sequence fingerprint of the first service type, multiple new sequence fingerprints can be obtained. However, among the multiple new sequence fingerprints, there may be some sequence fingerprints that are not very effective in identifying the traffic of the first service type or even cannot identify the traffic of the first service type.

[0155] Therefore, in a possible embodiment, the above-mentioned multiple new sequence fingerprints can be screened, so that the sequence fingerprints that meet the screening conditions are used as the sequence fingerprints corresponding to the first service type. The screening conditions here can refer to the screening conditions used in the previous text for screening frequent sequences, which will not be repeated here.

[0156] In another possible embodiment, the above-mentioned multiple new sequence fingerprints can be used to identify multiple traffic samples of the first service type (the identification method can be found in Figure 5 ). For any one of the above-mentioned multiple new sequence fingerprints, if it cannot identify any of the above-mentioned multiple traffic samples, the sequence fingerprint can be excluded, and the sequence fingerprint cannot be used as the sequence fingerprint corresponding to the first service type. For any one of the above-mentioned multiple new sequence fingerprints, if the sequence fingerprint can identify at least one of the above-mentioned multiple traffic samples, the sequence fingerprint can be used as one of the sequence fingerprints for the first service type.

[0157] S205 : Store the sequence fingerprint corresponding to the first service type into the sequence fingerprint library 140 .

[0158] After step S204 , the fingerprint library construction module 120 has determined one or more sequence fingerprints for the first service type.

[0159] In a possible embodiment, the fingerprint library construction module 120 can directly store the one or more sequence fingerprints and the corresponding relationship between the one or more sequence fingerprints and the first service type in the sequence fingerprint library 140, and then the encrypted traffic identification module 160 can identify the traffic of the first service type according to the sequence fingerprint library 140 (see Figure 5 Example).

[0160] In another possible embodiment, the fingerprint library construction module 120 may first merge the sequence fingerprints that meet the merging condition in the one or more sequence fingerprints to reduce the number of sequence fingerprints corresponding to the first service type, and then store the merged sequence fingerprints in the sequence fingerprint library 140, and record the correspondence between the merged sequence fingerprints and the first service type in the sequence fingerprint library 140. For the sequence fingerprints that do not meet the merging condition in the one or more sequence fingerprints, they may be directly stored in the sequence fingerprint library 140, and their correspondence with the first service type may be recorded in the sequence fingerprint library 140.

[0161] It should be understood that, through the above-mentioned sequence fingerprint merging operation, the number of sequence fingerprints that need to be stored in the sequence fingerprint library 140 can be reduced, thereby avoiding excessive use of storage resources of the device on which the sequence fingerprint library 140 is deployed, thereby reducing the performance impact on the device. By reducing the number of sequence fingerprints stored in the sequence fingerprint library 140, the encrypted traffic identification module 160 can also be reduced when performing traffic identification based on the sequence fingerprint library 140 (see Figure 5 The number of sequence fingerprint comparisons of the embodiment) is increased, thereby improving the efficiency of traffic identification.

[0162] Optionally, the merging condition may be that the two sequence fingerprints are similar. The similarity of the two sequence fingerprints means that the number of items of the two sequence fingerprints is the same, and the packet information at the same position of the two sequence fingerprints is either completely the same, or the packet information at the same position differs only in the payload length (i.e., the features of other dimensions except the payload length are completely the same), and the difference in payload length is less than or equal to the set threshold.

[0163] For example, assuming that in step S204, the fingerprint library construction module 120 generates two sequence fingerprints for the first service type, which are respectively called sequence fingerprint A [+_870_HDS, +_700_SHP, -_207_SHP] and sequence fingerprint B [+_880_HDS, +_700_SHP, -_207_SHP]. It can be seen that the second packet information of sequence fingerprints A and B is exactly the same, both are +_700_SHP, and the third packet information of sequence fingerprints A and B is also exactly the same, both are -_207_SHP. The first packet information +_870_HDS of sequence fingerprint A and the first packet information +_880_HDS of sequence fingerprint B differ only in the payload length, and the difference in the payload length between the two is 10. Assuming that 10 is less than the preset threshold, it can be determined that sequence fingerprint A and sequence fingerprint B are similar sequence fingerprints and meet the merging condition, so that sequence fingerprints A and B can be merged.

[0164] The sequence fingerprint C obtained by merging sequence fingerprints A and B is: [+_(870,880)_HDS,+_700_SHP,-_207_SHP]. Among them, the features indicated by the first packet information +_(870,880)_HDS are: the packet direction is the uplink direction, the packet type is the HDS packet type, and the payload length is between 870 and 880 bytes. It can be seen that the second and third packet information in sequence fingerprint C are completely consistent with the packet information at the corresponding positions in sequence fingerprints A and B. The first packet information in sequence fingerprint C indicates that the other dimensional features except the payload length are exactly the same as the first packet information in sequence fingerprints A and B. The payload lengths of the first packet information of sequence fingerprints A and B (as interval boundaries) are merged into an interval, which is the payload length indicated in the first packet information in sequence fingerprint C. Compared with sequence fingerprints A and B, the sequence fingerprint C obtained after merging may have a better recognition effect for the first service type.

[0165] It should be understood that the QUIC protocol supports carrying multiple QUIC frames in one QUIC packet. Assume that two QUIC packets transmit the same application layer content, but because one of the QUIC packets also inserts other types of QUIC frames such as ACK frames and PADDING frames, there is a slight difference in the payload length of the two QUIC packets (i.e., an offset in the payload length). Assume that there is a traffic to be identified that is a traffic of the first service type, and the characteristics of a QUIC packet in the traffic to be identified are: the packet direction is the uplink direction, the payload length is 875 bytes, and the packet type is an HDS packet.

[0166] When the sequence fingerprints corresponding to the first service type stored in the sequence fingerprint library 140 are sequence fingerprints A and B, due to the offset of the payload length, the above-mentioned QUIC data packet does not match any packet information in the sequence fingerprints A and B, resulting in the encrypted traffic identification module 160 being unable to identify the service type to which the traffic to be identified belongs.

[0167] In the case where the sequence fingerprint library 140 stores the merged sequence fingerprint C, the payload length 875 of the QUIC data packet is just within the payload length interval indicated by the first packet information in the sequence fingerprint C. The QUIC data packet can match the first packet information in the sequence fingerprint C, that is, the characteristics of the QUIC data packet meet all the characteristics indicated by the first packet information in the sequence fingerprint C, thereby helping to identify the service type to which the traffic to be identified belongs.

[0168] In summary, through Figure 2The method shown can store one or more sequence fingerprints corresponding to the first service type in the sequence fingerprint library 140. The above one or more sequence fingerprints are determined based on multiple traffic samples of the first service type, and each sequence fingerprint includes one or more packet information. It should be understood that for any sequence fingerprint corresponding to the first service type, each packet information in the sequence fingerprint is derived from one or more data packets in the above multiple traffic samples, and each packet information indicates the characteristics of one or more data packets in the above multiple traffic samples. At this time, it can be considered that the packet information indicates the characteristics of a class of data packets.

[0169] For example, a packet in a sequence fingerprint of the first service type is +_870_HDS, and the characteristics indicated by the packet are: the packet direction is the uplink direction, the payload length is 870, and the packet type is the HDS packet type. A data packet that meets all the characteristics indicated by the packet information can be regarded as a first type data packet, and the packet information indicates the characteristics of the first type data packet.

[0170] Another packet information in a sequence fingerprint of the first service type is +_700_SHP, and the characteristics indicated by the packet information are: the packet direction is the uplink direction, the payload length is 700, and the packet type is the SHP packet type. At this time, the data packet that meets all the characteristics indicated by the packet information can be regarded as the second type data packet, and the packet information indicates the characteristics of the second type data packet.

[0171] See also Figure 4 , Figure 4 This is a flow chart of another method for constructing a sequence fingerprint library provided in an embodiment of the present application, which can be used for Figure 1 The fingerprint database construction module 120 includes steps S401 to S407.

[0172] S401. Obtain multiple traffic samples of a first service type, wherein the multiple traffic samples include multiple uplink traffic samples and multiple downlink traffic samples.

[0173] The first service type is one of the multiple service types. For the classification of service types, please refer to the relevant introduction in step S201, which will not be repeated here. It should be understood that Figure 4 The first service type is used as an example for description, but it does not mean that the fingerprint database construction module 120 can only be executed for the first service type. Figure 4 The fingerprint library construction module 120 can also adopt the method for other service types besides the first service type. Figure 2 method to obtain the corresponding sequence fingerprint.

[0174] The above-mentioned multiple uplink traffic samples respectively correspond to an uplink traffic (unidirectional flow) of the first service type, and each uplink traffic sample includes part or all of the data packets in the corresponding uplink traffic. The order of all data packets in each uplink traffic sample is consistent with their order in the original uplink traffic.

[0175] The above-mentioned multiple downstream traffic samples respectively correspond to a downstream traffic (unidirectional flow) of the first service type, and each downstream traffic sample includes part or all of the data packets in the corresponding downstream traffic. The order of all data packets in each downstream traffic sample is consistent with their order in the original downstream traffic.

[0176] Among them, the uplink traffic and the downlink traffic can be encrypted traffic or unencrypted traffic, and the encrypted traffic can be QUIC traffic, TLS traffic, etc., which is not specifically limited in the embodiments of the present application.

[0177] The embodiments of the present application do not specifically limit the division method of uplink traffic and downlink traffic.

[0178] Optionally, the fingerprint library construction module 120 may first collect multiple data packets related to the first service type, and then divide the multiple data packets in the form of flows, thereby obtaining multiple uplink flows and multiple downlink flows of the first service type.

[0179] For example, the fingerprint library construction module 120 can divide the upstream traffic and the downstream traffic according to the quintuple. Data packets corresponding to the same quintuple and with the packet direction being the upstream direction can be attributed to the same upstream traffic, and data packets corresponding to the same quintuple and with the packet direction being the direction can be attributed to the same downstream traffic.

[0180] For another example, the connection ID of the QUIC protocol is used to identify a connection process of QUIC, so the fingerprint library construction module 120 can divide the upstream traffic samples and the downstream traffic samples according to the connection ID of the QUIC protocol: QUIC data packets with the same connection ID and the packet direction is the upstream direction can be attributed to the same upstream traffic, and QUIC data packets with the same connection ID and the packet direction is the downstream direction can be attributed to the same downstream traffic.

[0181] Optionally, an uplink traffic sample of the first service type may include a data packet at a designated position in the corresponding uplink traffic, and a downlink traffic sample of the first service type may include a data packet at a designated position in the corresponding downlink traffic. The above-mentioned designated position may be set according to the needs of the application scenario to limit the scope of obtaining data packets. For any uplink traffic of the first service type, the fingerprint library construction module 120 only needs to obtain the data packet at the designated position in the uplink traffic to form an uplink traffic sample corresponding to the uplink traffic. For any downlink traffic of the first service type, the fingerprint library construction module 120 only needs to obtain the data packet at the designated position in the downlink traffic to form a downlink traffic sample corresponding to the downlink traffic.

[0182] For example, assuming that the designated position is set to the first N (N is a positive integer), for a certain uplink flow of the first service type, the fingerprint library construction module 120 only needs to obtain the first N data packets in the uplink flow according to the provisions of the above designated position to form an uplink flow sample corresponding to the uplink flow. The above N can be optimized and adjusted according to application needs, and the embodiments of the present application are not specifically limited.

[0183] Optionally, the fingerprint library construction module 120 may first collect the traffic log of the first service type, wherein the traffic log of the first service type refers to the information of the traffic of the first service type recorded in the form of a flow log (including the information of the data packets in the traffic). Then, the fingerprint library construction module 120 may respectively extract the information of the data packets in multiple upstream traffics of the first service type from the traffic log, and respectively extract the information of the data packets in multiple downstream traffics of the first service type from the traffic log. For each of the above upstream traffics, the fingerprint library may directly regard the information of part or all of the data packets in the upstream traffic as an upstream traffic sample. For each of the above downstream traffics, the fingerprint library may directly regard the information of part or all of the data packets in the downstream traffic as a downstream traffic sample.

[0184] For other contents of step S401, please refer to the introduction of step S201, which will not be repeated here.

[0185] S402: Generate multiple upstream information sequences and multiple downstream information sequences corresponding to the first service type according to multiple traffic samples of the first service type.

[0186] Specifically, after obtaining multiple traffic samples of the first service type (including multiple upstream traffic samples and multiple downstream traffic samples), the fingerprint library construction module 120 can analyze the above-mentioned multiple upstream traffic samples and multiple downstream traffic samples respectively, thereby generating a corresponding upstream flow information sequence for each upstream traffic sample, and generating a corresponding downstream flow information sequence for each downstream traffic sample.

[0187] Among them, an upstream information sequence includes packet information of part or all of the data packets in the corresponding upstream traffic sample, each packet information is used to indicate the characteristics of the corresponding data packet, and the sequence of all packet information in an upstream information sequence is consistent with the sequence of the data packets corresponding to the above packet information in the corresponding upstream traffic sample.

[0188] Among them, a downstream flow information sequence includes packet information of part or all of the data packets in the corresponding downstream traffic sample, each packet information is used to indicate the characteristics of the corresponding data packet, and the order of all packet information in a downstream flow information sequence is consistent with the order of the data packets corresponding to the above packet information in the corresponding downstream traffic sample.

[0189] For example, a certain upstream information sequence corresponds to a certain upstream traffic sample of the first service type, and packet information A and packet information B in the upstream information sequence correspond to data packet X and data packet Y in the upstream traffic sample, respectively, and packet information A and packet information B are used to indicate the characteristics of data packet X and data packet Y, respectively. If the order of data packet X in the upstream traffic sample is earlier than that of data packet Y, then the order of packet information A in the upstream information sequence must also be earlier than that of packet information B. If the order of data packet Y in the upstream traffic sample is earlier than that of data packet X, then the order of packet information B in the upstream information sequence must also be earlier than that of packet information A.

[0190] Regarding the features indicated by the packet information, please refer to the relevant introduction in step S202, which will not be repeated here.

[0191] Optionally, an upstream information sequence only includes packet information of data packets that meet importance conditions in the corresponding upstream traffic sample, and a downstream information sequence only includes packet information of data packets that meet importance conditions in the corresponding downstream traffic sample.

[0192] Regarding the above-mentioned importance conditions and other contents of step S402, please refer to the relevant introduction in step S202, which will not be repeated here.

[0193] S403: Perform packet regularization on multiple upstream information sequences and multiple downstream information sequences corresponding to the first service type.

[0194] In some possible embodiments, if the number of uplink traffic samples of the first service type obtained in step S201 is less than or equal to a preset number, the number of uplink information sequences of the first service type obtained in step S202 will also be less than or equal to the preset number. At this time, the fingerprint library construction module 120 can execute step S203 to perform packet regularization on multiple uplink information sequences corresponding to the first service type so that the number of repeated packet information in the above multiple uplink information sequences increases, thereby facilitating the uplink frequent sequence mining in the subsequent step S204.

[0195] Similarly, if the number of downlink traffic samples of the first service type obtained in step S201 is less than or equal to the preset number, the number of downlink flow information sequences of the first service type obtained in step S202 will also be less than or equal to the preset number. At this time, the fingerprint library construction module 120 can execute step S203 to perform packet regularization on the multiple downlink flow information sequences corresponding to the first service type so that the number of repeated packet information in the multiple downlink flow information sequences is increased, thereby facilitating the downlink frequent sequence mining in the subsequent step S205.

[0196] For the specific method of packet regularization, please refer to the relevant introduction in step S203, which will not be repeated here.

[0197] In some other possible embodiments, the fingerprint library construction module 120 may perform step S203 by default, or may not perform step S203 by default, that is, after performing the step S203, Figure 2 After step S202, jump directly to step S204.

[0198] It should be understood that step S403 here is Figure 4 If step S403 is selected, the process will first jump to step S403 after step S402 is completed, and then jump to steps S404 and S405 after step S403 is completed. If step S403 is not selected, the process can directly jump to steps S404 and S405 after step S402 is completed.

[0199] S404: Determine an uplink sequence fingerprint corresponding to the first service type according to the multiple uplink information sequences.

[0200] There may be one or more uplink sequence fingerprints corresponding to the first service type.

[0201] Specifically, after the fingerprint library construction module 120 obtains multiple upstream information sequences of the first service type according to the aforementioned steps, it can use statistical methods or sequence pattern mining algorithms to mine frequently occurring sequences (i.e., upstream frequent sequences) from the above multiple upstream information sequences. Then, the fingerprint library construction module 120 can select the upstream frequent sequence that meets the screening condition from the multiple upstream frequent sequences mined above as the upstream sequence fingerprint corresponding to the first service type. For the sequence pattern mining algorithm and the screening condition, please refer to the introduction in step S204, which will not be repeated here.

[0202] Optionally, after determining an uplink sequence fingerprint corresponding to the first service type, the packet spacing between data packets corresponding to the packet information in the uplink sequence fingerprint can also be counted in multiple uplink flow information sequences corresponding to the first service type, and then the packet spacing obtained by counting is also used as one of the components of the uplink sequence fingerprint to further enhance the robustness of the uplink sequence fingerprint. For how to count the packet spacing, please refer to the relevant introduction in step S204, which will not be repeated here.

[0203] It should be understood that since step S403 is optional, the upstream flow information sequence used by the fingerprint library construction module 120 to mine the upstream frequent sequence in step S404 may be packet regularized or may not be packet regularized.

[0204] Therefore, in some possible embodiments, if step S403 is executed, the multiple upstream information sequences used to mine frequent sequences in step S404 are packet regularized, that is, the payload lengths indicated by some packet information in the upstream information sequence are regularized. After the fingerprint library construction module 120 generates the upstream sequence fingerprint corresponding to the first service type according to the aforementioned method, the value of the payload length in each upstream sequence fingerprint can be restored to the value before regularization. For the restoration of the payload length, please refer to the relevant introduction in step S404, which will not be repeated here.

[0205] Optionally, a plurality of uplink sequence fingerprints corresponding to the first service type may be merged to obtain a merged uplink sequence fingerprint, and the subsequent step S406 is to process the merged uplink sequence fingerprint. For the merging operation, please refer to the relevant introduction in step S205, which will not be described here.

[0206] For example, assume that the fingerprint library construction module 120 determines multiple uplink sequence fingerprints for the first service type, including uplink sequence fingerprint 1 and upper limit sequence fingerprint 2. Among them, uplink sequence fingerprint 1 is [+_870_HDS, +_700_SHP], and uplink sequence fingerprint 2 is [+_880_HDS, +_700_SHP]. It can be seen that the above two uplink sequence fingerprints have the same second packet information, and their respective first packet information only differs in the payload length, and other features are exactly the same. The difference in payload length between the packet information +_870_HDS and +_880_HDS is 10. Assuming that 10 is less than the preset threshold, the above two uplink sequence fingerprints can be merged at this time, and the merged uplink sequence fingerprint is: [+_(870, 880)_HDS, +_700_SHP]. Among them, the data packet characteristics indicated by the packet information +_(870,880)_HDS are: the packet direction is the uplink direction, the payload length is between 870 and 880 bytes, and the packet type is the HDS packet type.

[0207] S405: Determine a downlink sequence fingerprint corresponding to the first service type according to multiple downlink flow information sequences corresponding to the first service type.

[0208] There may be one or more downlink sequence fingerprints corresponding to the first service type.

[0209] The processing process of step S405 is similar to that of step S404. Please refer to the introduction of step S404, which will not be repeated here.

[0210] It should be noted that Figure 2 Step S204 is to mine frequent sequences for the flow information sequence of the bidirectional flow, and then select frequent sequences that meet the screening conditions as sequence fingerprints corresponding to the first service type. In order to reduce the difficulty of mining and screening frequent sequences, Figure 4 Steps S404 and S405 perform frequent sequence mining on the upstream information sequence and the downstream information sequence of the unidirectional flow, respectively, to obtain corresponding upstream frequent sequences and downstream frequent sequences, and then filter the upstream frequent sequences and downstream frequent sequences according to the filtering conditions, respectively, to obtain the upstream sequence fingerprint and the downstream sequence fingerprint corresponding to the first service type. In this way, the number of frequent sequences mined can be reduced, thereby reducing the difficulty of sequence screening.

[0211] S406: Determine one or more combinations according to the uplink sequence fingerprint and the downlink sequence fingerprint corresponding to the first service type.

[0212] Specifically, after the fingerprint library construction module 120 obtains one or more uplink sequence fingerprints and one or more downlink sequence fingerprints corresponding to the first service type, the fingerprint library construction module 120 can also combine the above-mentioned uplink sequence fingerprints and downlink sequence fingerprints, so as to obtain one or more combinations as a sequence fingerprint corresponding to the first service type, which is illustrated below with examples.

[0213] For example, it is assumed that the fingerprint library construction module 120 determines M uplink sequence fingerprints and N downlink sequence fingerprints for the first service type, and both M and N are positive integers. The fingerprint library construction module 120 matches multiple traffic samples (bidirectional flows) of the first service type with the above-mentioned M uplink sequence fingerprints and N downlink sequence fingerprints, respectively, to determine one or more combinations corresponding to the first sequence fingerprint.

[0214] Taking a traffic sample as an example, the fingerprint library construction module 120 compares the first sequence fingerprint of the traffic sample with the above-mentioned M uplink sequence fingerprints, and compares the traffic sample with the above-mentioned N downlink sequence fingerprints. If the traffic sample only matches one uplink sequence fingerprint and one downlink sequence fingerprint, the uplink sequence fingerprint and the downlink sequence fingerprint can be directly used as a combination, and then the combination can be used as one of the sequence fingerprints of the first service type. Regarding the first sequence fingerprint and the above-mentioned matching method, refer to Case 2 in the subsequent step S502, which will not be introduced in detail here.

[0215] If the traffic sample matches multiple uplink sequence fingerprints and one downlink sequence fingerprint, a target uplink sequence fingerprint can be selected from the multiple uplink sequence fingerprints according to a preset method, and then the combination of the target uplink sequence fingerprint and the one downlink sequence fingerprint can be used as a sequence fingerprint of the first service type. Optionally, the target uplink sequence fingerprint can be selected according to the first match principle or the longest match principle. Among them, the first match principle refers to selecting the one that can complete the match first from the multiple uplink sequence fingerprints as the target uplink sequence fingerprint, and the longest match principle refers to selecting the one with the longest sequence length (i.e., the largest number of packet information) from the multiple uplink sequence fingerprints as the target uplink sequence fingerprint.

[0216] For example, if a traffic sample matches three uplink sequence fingerprints of the first service type, they need to obtain the first 15 packets, the first 8 packets, and the first 10 packets in the traffic sample to complete the match with the traffic sample. Since the second uplink sequence fingerprint only needs the first 8 packets to complete the match with the traffic sample, it is earlier than the other two uplink sequence fingerprints. Therefore, according to the first match principle, the second uplink sequence fingerprint is selected as the target uplink sequence fingerprint to achieve faster traffic identification.

[0217] For another example, suppose that a certain traffic sample matches two uplink sequence fingerprints of the first service type, and the lengths of the two uplink sequence fingerprints are 2 and 3 respectively, that is, the two uplink sequence fingerprints include 2 packet information and 3 packet information respectively. According to the longest match principle, the uplink sequence fingerprint containing 3 packet information can be selected as the target uplink sequence fingerprint. It can be understood that the more packet information in the sequence fingerprint, the more stringent the matching condition of the sequence fingerprint may be, which helps to improve the accuracy of the encrypted traffic identification module 160 using the sequence fingerprint for traffic identification.

[0218] Similarly, if the traffic sample matches an uplink sequence fingerprint and multiple downlink sequence fingerprints, one of the multiple downlink sequence fingerprints can be selected and combined with the uplink sequence fingerprint according to a preset method, and the combination can be used as a sequence fingerprint of the first service type.

[0219] If the traffic sample matches multiple uplink sequence fingerprints and multiple downlink sequence fingerprints, a target uplink sequence fingerprint can be selected from the above multiple uplink sequence fingerprints according to a preset method, and a target downlink sequence fingerprint can be selected from the above multiple downlink sequence fingerprints, and then the combination of the above target uplink sequence fingerprint and the target downlink sequence fingerprint is used as a sequence fingerprint of the first service type.

[0220] S407: Store the one or more combinations as a sequence fingerprint corresponding to the first service type in the sequence fingerprint database 140.

[0221] Specifically, after the fingerprint library construction module 120 determines one or more combinations for the first service type, the one or more combinations can be used as a sequence fingerprint corresponding to the first service type, thereby obtaining one or more sequence fingerprints corresponding to the first service type. Then, the fingerprint library construction module 120 can store the one or more sequence fingerprints in the sequence fingerprint library 140, and record the correspondence between the one or more sequence fingerprints and the first service type in the sequence fingerprint library 140, so that the encrypted traffic identification module 160 can identify the traffic of the first service type based on the one or more sequence fingerprints stored in the sequence fingerprint library 140 (see Figure 5 Example).

[0222] It should be noted that through Figure 2 and / or Figure 4 The sequence fingerprint library construction method can store multiple sequence fingerprints and the correspondence between the multiple sequence fingerprints and multiple service types in the sequence fingerprint library 140. Each sequence fingerprint in the sequence fingerprint library 140 corresponds to only one service type, and each of the multiple service types can have one or more corresponding sequence fingerprints in the sequence fingerprint library 140.

[0223] For each of the above-mentioned multiple service types, its corresponding sequence fingerprint in the sequence fingerprint library 140 can be obtained by Figure 2 The sequence fingerprint library construction method can also be obtained by Figure 4 The sequence fingerprint library construction method is obtained (the obtained sequence fingerprint is a combination of the uplink sequence fingerprint and the downlink sequence fingerprint), which is not specifically limited in the embodiment of the present application.

[0224] It should be understood that some service types may be updated, for example, a network application may be updated and upgraded every once in a while. For a certain service type, the above-mentioned update and upgrade may cause the characteristics of the traffic of the service type to change, which may cause the sequence fingerprint corresponding to the service type stored in the sequence fingerprint library 140 to have a poor recognition effect on the traffic of the upgraded service type. Therefore, in some possible embodiments, the fingerprint library construction module 120 may periodically use Figure 2 and / or Figure 4 The method regenerates the sequence fingerprint corresponding to the service type, and then uses the regenerated sequence fingerprint corresponding to the service type to update the sequence fingerprint library 140 to ensure that the encrypted traffic identification module 160 recognizes the traffic of the service type based on the sequence fingerprint library 140.

[0225] Based on the above content, an embodiment of the encrypted traffic identification method provided by the present application is introduced below.

[0226] See also Figure 5 , Figure 5 This is a flow chart of an encrypted traffic identification method provided by an embodiment of the present application, which can be used for Figure 1 The encrypted traffic identification module 160 includes steps S501-S502.

[0227] S501. Obtain a first sequence fingerprint of the first encrypted traffic, wherein the first sequence fingerprint includes one or more target packet information, the one or more target packet information corresponds one-to-one with one or more target data packets in the first encrypted traffic, and the one or more target packet information respectively indicates characteristics of corresponding target data packets.

[0228] It should be understood that the first encrypted traffic is the encrypted traffic to be identified. Optionally, the type of the encrypted traffic may be QUIC traffic, TLS traffic, etc. Optionally, the features indicated by each target packet information may include one or more of packet type, packet direction, payload length, and packet spacing.

[0229] Specifically, in order to identify the service type to which the first encrypted traffic belongs, the encrypted traffic identification module 160 needs to first obtain one or more target data packets in the first encrypted traffic, and then parse the one or more target data packets to obtain corresponding target packet information, and then generate a first sequence fingerprint of the first encrypted traffic according to the obtained target packet information. The target data packet of the first encrypted traffic refers to a data packet at a target position in the first encrypted traffic, and there can be one or more target data packets of the first encrypted traffic.

[0230] Optionally, the target position can be set according to the needs of the application scenario. The target position is used to limit the data packet acquisition range. The encrypted traffic identification module 160 can only obtain the data packets at the target position (ie, the target data packets) to form the first sequence fingerprint of the first encrypted traffic.

[0231] For example, assuming that the target position is set to 2-30, the 2nd to 30th packets in the first encrypted traffic are all target packets of the first encrypted traffic, and the encrypted traffic identification module 160 will only obtain one or more from the above 2nd to 30th packets to form the first sequence fingerprint of the first encrypted traffic. For another example, assuming that the target position is set to 1, 3, 5, 7, 9, 11, the 1st, 3rd, 5th, 7, 9, 11th packets in the first encrypted traffic are all target packets of the first encrypted traffic, and the encrypted traffic identification module 160 will only obtain one or more from the above 6 packets to form the first sequence fingerprint of the first encrypted traffic.

[0232] It should be understood that the order of the multiple target data packets in the first encrypted traffic refers to the order in which the source device of the first encrypted traffic sends the multiple target data packets. In actual application scenarios, the transmission paths of the multiple target data packets in the network may be different, the network may fluctuate, etc., which may cause the order in which the encrypted traffic identification module 160 receives the multiple target data packets to be inconsistent with their order in the first encrypted traffic, that is, the data packets are out of order.

[0233] Each IPv4 message based on the fourth version of the Internet Protocol (IPv4) usually has an Internet Protocol_identification (IP_ID) information. In the same unidirectional flow (upstream traffic or downstream traffic), the IP_ID value of each IPv4 message is gradually increasing (increasing in one direction), that is, the IP_ID value of the first sent IPv4 message is small, and the IP_ID value of the later sent IPv4 message is large. Similarly, IP_ID information may also exist in the IPv6 message based on the sixth version of the Internet Protocol (IPv6). In the same unidirectional flow (upstream traffic or downstream traffic), the IP_ID value of each IPv6 message is gradually increasing (increasing in one direction), that is, the IP_ID value of the first sent IPv6 message is small, and the IP_ID value of the later sent IPv6 message is large. Therefore, in some possible embodiments, the encrypted traffic identification module 160 can determine the order of the multiple third data packets in the first encrypted traffic according to the IP_ID information corresponding to the multiple third data packets. Among them, the multiple third data packets are part or all of the target data packets in the first encrypted traffic. For example, when the encrypted traffic identification module 160 finds that the multiple third data packets of the first encrypted traffic it receives are out of order, if the multiple third data packets all correspond to the uplink direction or all correspond to the downlink direction, the order of the multiple third data packets in the first encrypted traffic can be directly determined according to the size relationship of the IP_ID information corresponding to the multiple third data packets. Specifically, the multiple third data packets can be sorted from small to large according to the IP_ID information, and the sorting at this time is the order of the multiple third data packets in the first encrypted traffic.

[0234] If the above-mentioned multiple third data packets include data packets corresponding to the upstream direction and data packets corresponding to the downstream direction, they need to be adjusted separately. For the above-mentioned data packets in the upstream direction, the encrypted traffic identification module 160 can determine their order in the first encrypted traffic based on the size relationship of their corresponding IP_ID information, for example, sorting the above-mentioned data packets corresponding to the upstream direction from small to large according to the IP_ID information, and the sorting at this time is the order of the above-mentioned data packets corresponding to the upstream direction in the first encrypted traffic. For the above-mentioned data packets in the downstream direction, the encrypted traffic identification module 160 can determine their order in the first encrypted traffic based on the size relationship of their corresponding IP_ID information, for example, sorting the above-mentioned data packets corresponding to the downstream direction from small to large according to the IP_ID information, and the sorting at this time is the order of the above-mentioned data packets corresponding to the downstream direction in the first encrypted traffic.

[0235] S502: Determine the service type to which the first encrypted traffic belongs according to the first sequence fingerprint.

[0236] Specifically, the encrypted traffic identification module 160 may compare the first sequence fingerprint with each sequence fingerprint in the sequence fingerprint library 140, thereby determining a second sequence fingerprint matching the first sequence fingerprint in the sequence fingerprint library 140, and then determining the service type corresponding to the second sequence fingerprint as the service type to which the first encrypted traffic belongs. The sequence fingerprint library 140 includes a plurality of sequence fingerprints, each of which corresponds to one service type among a plurality of service types, and each sequence fingerprint includes one or more packet information, each of which indicates the characteristics of a class of data packets.

[0237] The specific manner in which the encrypted traffic identification module 160 compares the first sequence fingerprint with each sequence fingerprint in the sequence fingerprint library 140 is described below, which may include the following manner 1, manner 2, and manner 3.

[0238] Method 1: The encrypted traffic identification module 160 can first obtain all target data packets in the first encrypted traffic, and then generate a first sequence fingerprint of the first encrypted traffic based on all target data packets in the first encrypted traffic, and then compare the first sequence fingerprint with each sequence fingerprint stored in the sequence fingerprint library 140. In other words, the encrypted traffic identification module 160 can only generate the above-mentioned first sequence fingerprint for traffic identification after collecting all target data packets of the first encrypted traffic. If the encrypted traffic identification module 160 determines that there is a second sequence fingerprint matching the above-mentioned first sequence fingerprint in the sequence fingerprint library 140, the service type corresponding to the second sequence fingerprint is determined as the service type to which the first encrypted traffic belongs. If the encrypted traffic identification module 160 determines that there is no second sequence fingerprint matching the above-mentioned first sequence fingerprint in the sequence fingerprint library 140, it is determined that the first encrypted traffic identification has failed, and the comparison process ends.

[0239] Depend on Figure 2 and Figure 4 As can be seen from the relevant introduction of the sequence fingerprint library 140, any sequence fingerprint in the sequence fingerprint library 140 may be a sequence fingerprint generated by the fingerprint library construction module 120. Figure 2 or Figure 4 Therefore, when comparing the first sequence fingerprint of the first encrypted traffic with a certain sequence fingerprint (recorded as the third sequence fingerprint) in the sequence fingerprint library 140, the following cases 1 and 2 may be included.

[0240] Case 1: The third sequence fingerprint is through Figure 2 determined by the method.

[0241] It should be understood that for the third sequence fingerprint in the sequence fingerprint library 140, each packet information in the third sequence fingerprint indicates the characteristics of a class of data packets, that is, the local feature requirements. The chronological relationship between the packet information in the third sequence fingerprint represents the temporal structure relationship between the corresponding data packets, that is, the overall feature requirements. In other words, the third sequence fingerprint embodies two different emphasis dimensions, namely, the overall and the local. The first sequence fingerprint of the first encrypted traffic is considered to match the three-sequence fingerprint only if it meets both the overall feature requirements and the local feature requirements.

[0242] If there are one or more target packet information in the first sequence fingerprint of the first encrypted traffic (corresponding to one or more target data packets in the first encrypted traffic respectively) that can be matched one by one with all the packet information in the third sequence fingerprint, and the order of the one or more target data packets in the first encrypted traffic is consistent with the order of all the packet information in the third sequence fingerprint, then it can be determined that the third sequence fingerprint matches the first sequence fingerprint of the first encrypted traffic.

[0243] In other words, if the target packet information corresponding to multiple first data packets matches all the packet information in the third sequence fingerprint one by one, and the first order is consistent with the second order, then it can be determined that the third sequence fingerprint matches the first sequence fingerprint of the first encrypted traffic. Among them, all target data packets in the first encrypted traffic include the above-mentioned multiple first data packets, the first order is the order of the above-mentioned multiple first data packets in the first encrypted traffic, and the second order is the order of all packet information in the third sequence fingerprint. It should be noted that one target packet information corresponds to one target data packet, and the target packet information indicates the characteristics of the target data packet. The matching of the target packet information with a packet information means that the characteristics indicated by the target data packet are consistent with the characteristics indicated by the packet information, that is, the target data packet meets all the characteristics indicated by the packet information.

[0244] If there are one or more target packet information in the first sequence fingerprint (corresponding to one or more target data packets in the first encrypted traffic) that can be matched one by one with all packet information in the third sequence fingerprint, but the order of the one or more target data packets in the first encrypted traffic is inconsistent with the order of all packet information in the third sequence fingerprint, it can be determined that the third sequence fingerprint does not match the first sequence fingerprint of the first encrypted traffic.

[0245] If there is no one or more target data packets in the first sequence fingerprint that can be matched one-to-one with all packet information in the third sequence fingerprint, it can be determined that the first sequence fingerprint does not match the third sequence fingerprint.

[0246] For example, assume that the encrypted traffic identification module 160 obtains the first six target data packets in the first encrypted traffic, and obtains six target packet information by parsing the above six target data packets. Among them, the above six target packet information corresponds one-to-one to the six target packet information, and each target packet information indicates the characteristics of the corresponding target data packet. Then, the encrypted traffic identification module 160 forms a first sequence fingerprint of the first encrypted traffic based on the above six target packet information, and the order of the above six target packet information in the first sequence fingerprint is consistent with the order of the above six target data packets in the first encrypted traffic. For the convenience of description, the above six target data packets are recorded as data packets A, B, C, D, E, and F in turn, and their corresponding target packet information is recorded as target packet information A, B, C, D, E, and F in turn.

[0247] Assume that the third sequence fingerprint includes three packet information B', C', and F', each of which indicates a set of characteristics of packet direction, packet type, and payload length. The encrypted traffic identification module 160 compares the first sequence fingerprint with the third sequence fingerprint, and finds that the target packet information B matches the packet information B', the target packet information C matches the packet information C', and the target data packet F matches the packet information F'. At this point, it can be determined that the target data packets B, C, and F in the first sequence fingerprint are matched one by one with all the packet information (i.e., B', C', and F') in the third sequence fingerprint.

[0248] If the order of the three packet information B', C', and F' in the third sequence fingerprint is consistent with the order of the target data packets B, C, and F in the first encrypted traffic (i.e., B→C→F), that is, the order of the packet information B', C', and F' in the third sequence fingerprint is B'→C'→F', then it can be determined that the third sequence fingerprint matches the first sequence fingerprint. If the order of the three packet information B', C', and F' in the third sequence fingerprint is inconsistent with the order of the target data packets B, C, and F in the first encrypted traffic, that is, the order of the packet information B', C', and F' in the third sequence fingerprint is not B'→C'→F', but other orders (for example, B'→F'→C', F'→C'→B', or C'→B'→F', etc.), then it can be determined that the third sequence fingerprint does not match the first sequence fingerprint.

[0249] Case 2: The third sequence fingerprint is through Figure 4 determined by the method.

[0250] It should be understood that since the third sequence fingerprint is the fingerprint library construction module 120 Figure 4The method is used to generate and add the sequence fingerprint library 140, so the third sequence fingerprint will consist of an uplink sequence fingerprint and a downlink sequence fingerprint. The uplink sequence fingerprint includes all packet information corresponding to the uplink direction in the third sequence fingerprint, and the downlink sequence fingerprint includes all packet information corresponding to the downlink direction in the third sequence fingerprint. For ease of description, the order of all packet information in the uplink sequence fingerprint is called the first order, and the order of all packet information in the downlink sequence fingerprint is called the second order.

[0251] If the target packet information corresponding to one or more first data packets matches one by one with all the packet information in the uplink sequence fingerprint and the first order is consistent with the third order, and the target packet information corresponding to one or more second data packets matches one by one with all the packet information in the downlink sequence fingerprint and the second order is consistent with the fourth order, then it can be determined that the third sequence fingerprint matches the first sequence fingerprint of the first encrypted traffic. The first encrypted traffic includes the above-mentioned one or more first data packets and the above-mentioned one or more second data packets. The above-mentioned one or more first data packets are all target data packets corresponding to the uplink direction in the first encrypted traffic, and the third order is their order in the first encrypted traffic. The above-mentioned one or more second data packets are all target data packets corresponding to the downlink direction in the first encrypted traffic, and the fourth order is their order in the first encrypted traffic.

[0252] That is, only if the first sequence fingerprint of the first encrypted traffic matches both the uplink sequence fingerprint and the downlink sequence fingerprint of the third sequence fingerprint, can it be determined that the first encrypted traffic matches the third sequence fingerprint. If the first sequence fingerprint of the first encrypted traffic does not match the uplink sequence fingerprint and / or the downlink sequence fingerprint of the third sequence fingerprint, it can be determined that the first encrypted traffic does not match the third sequence fingerprint.

[0253] For example, it is assumed that the encrypted traffic identification module 160 obtains the first 8 target data packets in the first encrypted traffic, and obtains 8 target packet information by parsing the above 8 target data packets, thereby generating the first sequence fingerprint of the first encrypted traffic according to the above 8 target packet information. Among them, the above 8 target packet information corresponds to the above 8 target packet information one by one, each target packet information indicates the characteristics of the corresponding target data packet, and the order of the above 8 target packet information in the first sequence fingerprint is consistent with the order of the above 8 target data packets in the first encrypted traffic. For the convenience of description, the above 8 target data packets are recorded as target data packets A, B, C, D, E, F, G, H in sequence, and the above 8 target packet information are recorded as target packet information A, B, C, D, E, F, G, H in sequence. Target data packets A, B, E are all in the upstream direction, and target data packets C, D, F, G, H are all in the downstream direction.

[0254] The third sequence fingerprint consists of an uplink sequence fingerprint and a downlink sequence fingerprint. Assume that the uplink sequence fingerprint includes two packet information, A' and E', and the downlink sequence fingerprint includes three packet information, C', F', and G'. In order to determine whether the third sequence fingerprint matches the first sequence fingerprint of the first encrypted traffic, the encrypted traffic identification module 160 needs to compare the first sequence fingerprint with the uplink sequence fingerprint and the downlink sequence fingerprint respectively.

[0255] The encrypted traffic identification module 160 compares the first sequence fingerprint of the first encrypted traffic with the uplink sequence fingerprint, and finds that the target packet information A matches the packet information A', the target packet information E matches the packet information E', and the order of the packet information A' and E' in the uplink sequence fingerprint (i.e., A'→E') is consistent with the order of the target data packets A and E in the first encrypted traffic (i.e., A→E). At this point, it can be determined that the first sequence fingerprint matches the uplink sequence fingerprint.

[0256] Similarly, the encrypted traffic identification module 160 compares the first sequence fingerprint of the first encrypted traffic with the downstream sequence fingerprint, and finds that the target packet information C matches the packet information C', the target packet information F matches the packet information F', the target packet information G matches the packet information G', and the order of the packet information C', F', G' in the downstream sequence fingerprint (i.e., C'→F'→G') is consistent with the order of the target data packets C, F, G in the first encrypted traffic (i.e., C→F→G). At this point, it can be determined that the first sequence fingerprint matches the downstream sequence fingerprint.

[0257] Since the first sequence fingerprint of the first encrypted traffic matches both the uplink sequence fingerprint and the downlink sequence fingerprint that constitute the third sequence fingerprint, it can be determined that the first sequence fingerprint of the first encrypted traffic matches the third sequence fingerprint, thereby determining the service type corresponding to the third sequence fingerprint as the service type to which the first encrypted traffic belongs.

[0258] Method 2: The encrypted traffic identification module 160 can first obtain part of the target data packets in the first encrypted traffic, and then generate the first sequence fingerprint of the first encrypted traffic based on the above part of the target data packets, and then the encrypted traffic identification module 160 compares the above first sequence fingerprint with each sequence fingerprint in the sequence fingerprint library 140. If there is a second sequence fingerprint matching the current first sequence fingerprint in the sequence fingerprint library 140, the comparison process can be ended, and the service type corresponding to the second sequence fingerprint is determined as the service type to which the first encrypted traffic belongs. If there is no second sequence fingerprint matching the current first sequence fingerprint in the sequence fingerprint library 140, the encrypted traffic identification module 160 can continue to obtain other target data packets in the first encrypted traffic, and then update the first sequence fingerprint, and then use the updated first sequence fingerprint to compare with each sequence fingerprint in the sequence fingerprint library 140.

[0259] Combine the following Figure 6 The specific comparison process of method 2 is introduced below.

[0260] See also Figure 6 , Figure 6 It is a flow chart of identifying the first encrypted traffic based on the sequence fingerprint library 140 provided in an embodiment of the present application, including steps S601 to S606.

[0261] S601. Obtain the first K target data packets of the first encrypted traffic, generate a first sequence fingerprint according to the K target data packets, and initialize the value of i to K.

[0262] Specifically, assuming that the first encrypted traffic includes M target data packets, the encrypted traffic identification module 160 can first obtain the first K target data packets in the first encrypted traffic. Wherein, M and K are both positive integers, K is less than M, and K can be adjusted according to the needs of the application scenario. By parsing the above K target data packets, the encrypted traffic identification module 160 determines K target packet information, thereby forming a first sequence fingerprint of the first encrypted traffic based on the above K target packet information. Wherein, the above K target packet information corresponds one-to-one to the K target data packets, and each target packet information indicates the characteristics of the corresponding target data packet.

[0263] S602. Determine whether there is a second sequence fingerprint matching the first sequence fingerprint in the sequence fingerprint library 140. If yes, go to step S603. If not, go to step S604.

[0264] Regarding how to determine whether a certain sequence fingerprint in the sequence fingerprint library 140 matches the first sequence fingerprint, please refer to the above case 1 and case 2, which will not be described in detail here.

[0265] S603: Determine the service type corresponding to the second sequence fingerprint as the service type to which the first encrypted traffic belongs, and end the comparison process.

[0266] S604. Determine whether the target data packet i is the last target data packet in the first encrypted traffic. If yes, go to step S605. If not, go to step S606, and set i=i+1.

[0267] The target data packet i represents the i-th target data packet in the first encrypted traffic.

[0268] As can be seen from the introduction of step S501, the number M of target data packets in the first encrypted traffic is determined by the target position, and the target position limits the data packet acquisition range of the encrypted traffic identification module 160 for the first encrypted traffic.

[0269] If the encrypted traffic identification module 160 has currently obtained the Mth target data packet in the first encrypted traffic, that is, the last target data packet, but still has not found a second sequence fingerprint matching the current first sequence fingerprint in the sequence fingerprint library 140, then the encrypted traffic identification module 160 cannot continue to obtain other data packets in the first encrypted traffic except the M target data packets due to the limitation of the target position, and can only end the comparison process and determine that the first encrypted traffic identification has failed (step S605) to avoid the identification process of the first encrypted traffic taking up too much time and resources (such as computing resources, storage resources) and affecting the encrypted traffic identification module 160's identification of other encrypted traffic.

[0270] If the encrypted traffic identification module 160 has not currently obtained the last target data packet in the first encrypted traffic, it can continue to obtain the next target data packet in step S601. The encrypted traffic identification module 160 can obtain the corresponding target packet information by parsing the next target data packet, and then add the target packet information to the other target packet information in the first sequence fingerprint, thereby completing the update of the first sequence fingerprint. It should be noted that only the next target data packet is obtained here. In actual application scenarios, you can also choose to obtain the next multiple target data packets (the number is adjustable), so as to update the first sequence fingerprint of the first encrypted traffic according to the target packet information of the newly obtained multiple target data packets.

[0271] S605: Determine that the first encrypted traffic identification fails, and end the comparison process.

[0272] Optionally, the encrypted traffic identification module 160 can prompt the user through the interactive interface that the first encrypted traffic identification failed, so that the user can take corresponding actions according to the prompt. For example, the user can adjust the sequence fingerprint composition in the sequence fingerprint library 140, or the user can instruct the encrypted traffic identification module 160 to reuse the sequence fingerprint library 140. Figure 2 and / or Figure 4 The method generates sequence fingerprints corresponding to each service type, and then updates the sequence fingerprint library 140.

[0273] S606. Obtain a target data packet i in the first encrypted traffic, and update the first sequence fingerprint according to the target data packet i.

[0274] Depend on Figure 6 As can be seen from the introduction, the first sequence fingerprint of the first encrypted traffic is not fixed, and it can be updated by sequentially acquiring target data packets in the first encrypted traffic, and then the updated first sequence fingerprint can be used for traffic identification. It should be understood that Figure 6The solution can start the identification process when a small number of target data packets in the first encrypted traffic are obtained, without having to start traffic identification after all target data packets in the first encrypted traffic are collected. In addition, the encrypted traffic identification module 160 can update the first sequence fingerprint of the first encrypted traffic once each time it receives a target data packet of the first encrypted traffic, and the identification process of the first encrypted traffic can be further advanced, thereby supporting the rapid identification of encrypted traffic.

[0275] Method 3: The encrypted traffic identification module 160 can sequentially obtain a target data packet in the first encrypted traffic, and use the target packet information corresponding to the currently obtained target data packet to compare with a series of sequence fingerprints in the sequence fingerprint library 140, thereby updating the matching progress of the first encrypted traffic and each sequence fingerprint in the sequence fingerprint library 140. It should be understood that the initial value of the matching progress of the first encrypted traffic and any sequence fingerprint in the sequence fingerprint library 140 is 0. For a sequence fingerprint with K packet information in the sequence fingerprint library 140, the matching progress of the sequence fingerprint and the first encrypted traffic is Wherein, K is a positive integer, and j indicates that the target data packet in the first encrypted traffic currently obtained can be matched to the first j data packets in the sequence fingerprint.

[0276] Repeat the process described in the previous paragraph until the matching progress of a sequence fingerprint in the sequence fingerprint library 140 with the first encrypted traffic reaches 100%. At this time, the comparison process can be terminated, and the service type corresponding to the sequence fingerprint with the matching progress of 100% is determined as the service type to which the first encrypted traffic belongs. Alternatively, repeat the process described in the previous paragraph until the last target data packet in the first encrypted traffic is obtained to update the matching progress of the first encrypted traffic and each sequence fingerprint in the sequence fingerprint library 140. At this time, the comparison process can be terminated, and then the sequence fingerprint with the longest sequence length is selected as the target sequence fingerprint among all the sequence fingerprints with the matching progress of 100%, and then the service type corresponding to the target sequence fingerprint is determined as the service type to which the first encrypted traffic belongs. Alternatively, repeat the process described in the previous paragraph until the matching progress of a sequence fingerprint in the sequence fingerprint library 140 with the first encrypted traffic reaches 100%. At this time, the process of the previous paragraph can be continued for n times, and then the sequence fingerprint with the longest sequence length is selected as the target sequence fingerprint among the sequence fingerprints with the matching progress of 100%, and then the service type corresponding to the target sequence fingerprint is determined as the service type to which the first encrypted traffic belongs. Wherein, n is a positive integer, which can be adjusted according to the needs of the application scenario.

[0277] The following takes a certain sequence fingerprint (referred to as the third sequence fingerprint) in the sequence fingerprint library 140 as an example to specifically introduce the process of comparing the first encrypted traffic with the third sequence fingerprint in the third method.

[0278] Assume that the first encrypted traffic includes M target data packets, and the third sequence fingerprint includes K packet information. Figure 7 , Figure 7 It is a flow chart of comparing the first encrypted traffic with the third sequence fingerprint provided by an embodiment of the present application, including steps S701 to S707.

[0279] S701. Initialize i and j to 1 and start the comparison process.

[0280] Among them, i means that the first i-1 target data packets in the first encrypted traffic have been obtained, j means that the first j-1 packet information in the third sequence fingerprint has been matched, and the matching progress of the first encrypted traffic and the third sequence fingerprint is That is, the initial matching progress is 0.

[0281] S702. Get target data packet i and determine whether target data packet i matches packet information j. If yes, proceed to step S703. If no, proceed to step S704.

[0282] The target data packet i refers to the i-th target data packet in the first encrypted traffic, and the packet information j refers to the j-th packet information in the third sequence fingerprint.

[0283] Specifically, the target data packet i is obtained, and the corresponding target packet information is obtained by parsing the target data packet i, and the target packet information indicates the characteristics of the target data packet i, and then the target packet information is compared with the packet information j in the third sequence fingerprint. If the characteristics indicated by the target data packet are consistent with the characteristics indicated by the packet information j, it means that the target data packet i meets all the characteristics indicated by the packet information j. At this time, it can be determined that the target data packet i and the packet information j are matched, so the matching progress of the first encrypted traffic and the third sequence fingerprint can be updated. If the characteristics indicated by the target data packet are inconsistent with the characteristics indicated by the packet information j, it means that the target data packet i does not meet all the characteristics indicated by the packet information j. At this time, it can be determined that the target data packet i and the packet information j do not match, and the matching progress of the first encrypted traffic and the third sequence fingerprint remains unchanged.

[0284] S703. Determine whether j is equal to K. If yes, proceed to step S705, if not, proceed to step S706.

[0285] It should be understood that judging whether j is equal to K is to judge whether the currently matched packet information j is the last packet information in the third sequence fingerprint. If yes, it means that the matching progress of the first encrypted traffic and the third sequence fingerprint has reached 100%, and the comparison process can be ended. If no, it means that the matching progress of the first encrypted traffic and the third sequence fingerprint has not yet reached 100%.

[0286] S704. Determine whether i is equal to M. If yes, proceed to step S707, if not, set i=i+1, and then proceed to step S702.

[0287] It should be understood that judging whether i is equal to M is to judge whether the currently acquired target data packet i is the last target data packet in the first encrypted traffic. If yes, it means that there is no next target data packet, and the comparison process can be ended. If no, the next target data packet can be obtained to compare with the packet information j.

[0288] S705. Determine whether the first encrypted traffic matches the third sequence fingerprint.

[0289] S706. Determine whether i is equal to M. If yes, proceed to step S707, if not, set i=i+1 and j=j+1, and then proceed to step S702.

[0290] It should be understood that judging whether i is equal to M is to judge whether the currently acquired target data packet i is the last target data packet in the first encrypted traffic. If yes, it means that there is no next target data packet, and the comparison process can be ended. If no, the next target data packet can be obtained to compare with the next packet information (i.e., packet information j+1).

[0291] It should be noted that the comparison process of the first encrypted traffic and other sequence fingerprints in the sequence fingerprint library 140 except the third sequence fingerprint is the same as Figure 7 Optionally, the next target data packet, i.e., target data packet i+1, can be obtained immediately when the target data packet i is compared with the third sequence fingerprint, or the next target data packet can be obtained only when the target data packet i is compared with some or all sequence fingerprints in the sequence fingerprint library 140.

[0292] S707. Determine that the first encrypted traffic does not match the third sequence fingerprint.

[0293] Optionally, if, before determining whether the first encrypted traffic matches or does not match the third sequence fingerprint, other sequence fingerprints other than the third sequence fingerprint in the sequence fingerprint library 140 have already matched the first encrypted traffic, the encrypted traffic identification module 160 may directly terminate the process. Figure 7 The process does not compare the first encrypted traffic with the third sequence fingerprint.

[0294] Alternatively, if, before determining whether the first encrypted traffic matches or does not match the third sequence fingerprint, other sequence fingerprints other than the third sequence fingerprint in the sequence fingerprint library 140 have already matched the first encrypted traffic, the encrypted traffic identification module 160 may determine whether the first encrypted traffic matches or does not match the third sequence fingerprint. Figure 7The encrypted traffic identification module 160 may terminate the process by obtaining n target data packets in sequence for comparison with the third sequence fingerprint. Where n is a positive integer and may be adjusted according to the application scenario. If the first encrypted traffic and the third sequence fingerprint are still not matched through the above n target data packets, the encrypted traffic identification module 160 may terminate the process by directly Figure 7 The process does not compare the first encrypted traffic with the third sequence fingerprint.

[0295] In a possible embodiment, the encrypted traffic identification module 160 may first determine the first parent type to which the first encrypted traffic belongs from multiple parent types based on the association identification technology or the IP library, and then determine the second sequence fingerprint matching the first sequence fingerprint from the sequence fingerprints corresponding to all subtypes under the first parent type. The sequence fingerprint library 140 includes sequence fingerprints corresponding to multiple service types, and the multiple service types are subtypes under one of the multiple parent types, that is, one or more service types (as subtypes) may be under the same parent type.

[0296] It should be understood that through this parent type + subtype hierarchical identification method, the comparison scope of the first sequence fingerprint in the sequence fingerprint library 140 can be narrowed, and the number of comparisons between the first sequence fingerprint and the sequence fingerprints in the sequence fingerprint library 140 can be reduced, thereby improving the efficiency and accuracy of traffic identification.

[0297] For example, assume that the sequence fingerprint library 140 includes M sequence fingerprints, each of which corresponds to one service type among N service types. Each service type has a corresponding parent type, and the same parent type may include one or more service types among the N service types (as subtypes).

[0298] The encrypted traffic identification module 160 can first determine the first parent type to which the first encrypted traffic belongs from multiple parent types based on the association identification technology or IP library. Assume that the first parent type has K subtypes, and the K subtypes have Q corresponding sequence fingerprints in the sequence fingerprint library 140. At this time, the encrypted traffic identification module 160 only needs to determine the first parent type from multiple parent types based on the association identification technology or IP library. Figure 5 The method shown determines a second sequence fingerprint that matches the first sequence fingerprint of the first encrypted traffic from the above Q sequence fingerprints, that is, the comparison range of the first sequence fingerprint in the sequence fingerprint library 140 is the above Q sequence fingerprints, and there is no need to determine the second sequence fingerprint from all sequence fingerprints in the sequence fingerprint library 140. It can also reduce the number of times the encrypted traffic identification module 160 compares the first sequence fingerprint with these sequence fingerprints in the sequence fingerprint library 140, thereby improving traffic identification efficiency and accuracy.

[0299] In summary, Figure 5The embodiment of the invention is based on the sequence fingerprint library 140 to identify encrypted traffic. The sequence fingerprints in the sequence fingerprint library 140 can be based on Figure 2 The sequence fingerprint library construction method can also be used to generate Figure 4 The sequence fingerprint library 140 is generated by the construction method of the sequence fingerprint library 140. Each sequence fingerprint in the sequence fingerprint library 140 includes one or more packet information, and each packet information indicates the characteristics of a type of data packet. For example, the packet information may include characteristics of dimensions such as payload length, packet direction, packet type, and packet spacing. Since the acquisition of the above characteristics does not require decryption of the corresponding data packet, it is possible to achieve rapid classification and identification of encrypted traffic without infringing user privacy, and it is also possible to reduce the computing power consumption of the device deployed by the encrypted traffic identification module 160, thereby reducing the hardware requirements and performance impact of the device.

[0300] It should be understood that Figure 5 The encrypted traffic identification method provided in the embodiment can also be migrated to the identification scenario of non-encrypted traffic. By obtaining the first sequence fingerprint of the non-encrypted traffic, and then comparing the first sequence fingerprint with each sequence fingerprint in the sequence fingerprint library 140, a second sequence fingerprint matching the first sequence fingerprint is determined, and then the service type corresponding to the second sequence fingerprint is determined as the service type to which the non-encrypted traffic belongs.

[0301] The following describes an embodiment of the device of the present application.

[0302] See also Figure 1 , Figure 1 It is a structural schematic diagram of a communication device provided in an embodiment of the present application, wherein the communication device 100 includes a fingerprint library construction module 120 , a sequence fingerprint library 140 and an encrypted traffic identification module 160 .

[0303] The encrypted traffic identification module 160 is used to obtain a first sequence fingerprint of the first encrypted traffic, and then determine the service type to which the first encrypted traffic belongs according to the first sequence fingerprint. The first sequence fingerprint includes one or more target packet information, and the one or more target packet information corresponds to one or more target data packets in the first encrypted traffic, and the one or more target packet information respectively indicates the characteristics of the corresponding target data packets.

[0304] Optionally, the encrypted traffic identification module 160 is specifically used to: determine a second sequence fingerprint matching the first sequence fingerprint in the sequence fingerprint library 140, and then determine the service type corresponding to the second sequence fingerprint as the service type to which the first encrypted traffic belongs. The sequence fingerprint library 140 includes a plurality of sequence fingerprints, each of which corresponds to one service type among a plurality of service types, and each sequence fingerprint includes one or more packet information, each of which indicates the characteristics of a class of data packets.

[0305] Optionally, the encrypted traffic identification module 160 is specifically used to: if the target packet information corresponding to the multiple first data packets matches all the packet information in the third sequence fingerprint one by one, and the first order is consistent with the second order, then determine the third sequence fingerprint as the second sequence fingerprint. Wherein, the one or more target data packets in the first encrypted traffic include the multiple first data packets, the first order is the order of the multiple first data packets in the first encrypted traffic, the third sequence fingerprint is a sequence fingerprint in the multiple sequence fingerprints, and the second order is the order of all the packet information in the third sequence fingerprint.

[0306] Optionally, the encrypted traffic identification module 160 is specifically used to: if the target packet information corresponding to one or more first data packets matches one-to-one with all the packet information in the uplink sequence fingerprint and the first order is consistent with the second order, and the target packet information corresponding to one or more second data packets matches one-to-one with all the packet information in the downlink sequence fingerprint and the third order is consistent with the fourth order, then the third sequence fingerprint is determined as the second sequence fingerprint.

[0307] Among them, the one or more target data packets in the first encrypted traffic include the one or more first data packets and the one or more second data packets. The first order is the order of the one or more first data packets in the first encrypted traffic, and the third order is the order of the one or more second data packets in the first encrypted traffic. The third sequence fingerprint is a sequence fingerprint among multiple sequence fingerprints in the sequence fingerprint library 140, which is composed of the uplink sequence fingerprint and the downlink sequence fingerprint. The uplink sequence fingerprint includes all packet information corresponding to the uplink direction in the third sequence fingerprint, and the downlink sequence fingerprint includes all packet information corresponding to the downlink direction in the third sequence fingerprint. The second order is the order of all packet information in the uplink sequence fingerprint, and the fourth order is the order of all packet information in the downlink sequence fingerprint.

[0308] Optionally, the encrypted traffic identification module 160 is further configured to determine the order of the plurality of third data packets in the first encrypted traffic based on the order in which the plurality of third data packets are received and the IP_ID information corresponding to the plurality of third data packets, wherein the one or more target data packets in the first encrypted traffic include the plurality of third data packets.

[0309] Optionally, the first packet information includes one or more of the payload length, packet direction, and packet type of the first type data packet. The first packet information is a packet information of the fourth sequence fingerprint, the fourth sequence fingerprint is a sequence fingerprint of multiple sequence fingerprints, and the first type data packet is a type of data packet corresponding to the first packet information.

[0310] Optionally, the first packet information further includes a packet distance between a first type data packet and a second type data packet, wherein the second type data packet is a type of data packet corresponding to the second packet information, and the second packet information and the first packet information are two different packet information in the fourth sequence fingerprint.

[0311] Optionally, the encrypted traffic identification module 160 is further used to: when there is no second sequence fingerprint matching the first sequence fingerprint in the sequence fingerprint library 140, obtain the target packet information corresponding to the K+1th target data packet in the first encrypted traffic, update the first sequence fingerprint according to the target packet information corresponding to the K+1th target data packet, obtain the updated first sequence fingerprint, and then determine the fifth sequence fingerprint matching the updated first sequence fingerprint in the sequence fingerprint library 140, and determine the service type corresponding to the fifth sequence fingerprint as the service type to which the first encrypted traffic belongs. The first sequence fingerprint includes the first K target data packets in the first encrypted traffic, and K is a positive integer.

[0312] Optionally, the fingerprint library construction module 120 in the communication device 100 is used to: before the encrypted traffic identification module 160 determines the second sequence fingerprint matching the first sequence fingerprint from the sequence fingerprint library 140, obtain multiple traffic samples belonging to the first service type, then generate one or more sequence fingerprints corresponding to the first service type according to the multiple traffic samples, and store the one or more sequence fingerprints and the correspondence between the first service type and the one or more sequence fingerprints in the sequence fingerprint library 140. The first service type is a sequence fingerprint among the multiple service types, and each of the multiple traffic samples includes one or more data packets.

[0313] Optionally, the fingerprint library construction module 120 is specifically used to: first generate multiple flow information sequences according to multiple traffic samples of the first service type, then determine multiple frequent sequences according to the multiple flow information sequences, and then determine one or more sequence fingerprints corresponding to the first service type from the multiple frequent sequences according to the screening condition. The multiple flow information sequences correspond to the multiple traffic samples one by one, and each flow information sequence includes packet information corresponding to the data packets that meet the importance condition in the corresponding traffic sample.

[0314] Optionally, the importance condition includes one or more of the following: the packet type is a preset type, the payload length is within a preset range, and the importance value obtained based on the importance algorithm is greater than or equal to an importance threshold.

[0315] Optionally, the screening condition includes one or more of the following: a sequence length is greater than or equal to a preset length, a sequence occurrence number is greater than or equal to a preset number, and a sequence occurrence position is before a preset position.

[0316] Optionally, the fingerprint library construction module 120 is also used to: if the difference between the first value and the second value is less than or equal to the first threshold value, and the first value and the second value are both in the first sub-interval, then the values ​​of the payload length in the third packet information and the fourth packet information are adjusted to the values ​​corresponding to the first sub-interval. The third packet information and the fourth packet information are two packet information in the above-mentioned multiple flow information sequences, and the features indicated by the third packet information and the features indicated by the fourth packet information are different only in the payload length, the value of the payload length in the third packet information is the first value, and the value of the payload length in the fourth packet information is the second value. The variation interval of the payload length includes multiple sub-intervals, each sub-interval corresponds to a value in the sub-interval, and the first sub-interval is one of the above-mentioned multiple sub-intervals.

[0317] Optionally, the length of the sub-interval is determined according to the length of a confirmation field and / or a padding field in the encryption protocol used by the first service type.

[0318] Optionally, the fingerprint library construction module 120 is further used to: if the sixth sequence fingerprint and the seventh sequence fingerprint meet the merging condition, merge the sixth sequence fingerprint and the seventh sequence fingerprint into an eighth sequence fingerprint, and store the eighth sequence fingerprint and the corresponding relationship between the first service type and the eighth sequence fingerprint into the sequence fingerprint library 140. The one or more sequence fingerprints corresponding to the first service type include the sixth sequence fingerprint and the seventh sequence fingerprint.

[0319] Optionally, the multiple traffic samples of the first service type include multiple upstream traffic samples and multiple downstream traffic samples. In this case, the fingerprint library construction module 120 is specifically used to: determine multiple upstream flow information sequences based on the above multiple upstream traffic samples, and determine multiple downstream flow information sequences based on the above multiple downstream traffic samples; then determine multiple upstream frequent sequences based on the above multiple upstream traffic sequences, and determine multiple downstream frequent sequences based on the above multiple downstream traffic sequences; then determine one or more combinations based on the above multiple upstream frequent sequences and the above multiple downstream frequent sequences, and then use the one or more combinations as a sequence fingerprint corresponding to the first service type.

[0320] Among them, the above-mentioned multiple upstream information sequences correspond one-to-one to the above-mentioned multiple upstream traffic samples, and each upstream information sequence includes packet information corresponding to the data packets that meet the importance condition in the corresponding upstream traffic sample, and the above-mentioned multiple downstream information sequences correspond one-to-one to the above-mentioned multiple downstream traffic samples, and each downstream information sequence includes packet information corresponding to the data packets that meet the importance condition in the corresponding downstream traffic sample. Each of the above-mentioned one or more combinations includes an upstream sequence fingerprint among the above-mentioned multiple upstream frequent sequence fingerprints and a downstream sequence fingerprint among the above-mentioned multiple downstream sequence fingerprints.

[0321] Optionally, the encrypted traffic identification module 160 is further configured to: first determine a first parent type to which the first encrypted traffic belongs from multiple parent types based on an association identification technology or an IP library, and then determine a second sequence fingerprint matching the first sequence fingerprint from sequence fingerprints corresponding to all subtypes under the first parent type. The multiple service types are subtypes under one of the multiple parent types.

[0322] It should be noted that the above communication device 100 can be used to implement Figure 2 or Figure 4 Any embodiment of the sequence fingerprint construction method can also be used to implement Figure 5 For any embodiment of the encrypted traffic identification method, please refer to the previous introduction for details and will not be repeated here.

[0323] It should also be noted that Figure 1 The communication device 100 is only described by taking the above functional module division method as an example. In actual applications, other functional modules can be divided into other functional modules as needed to complete all or part of the functions described above. Figure 2 , Figure 4 or Figure 5 The relevant explanations in the article will not be repeated here.

[0324] See also Figure 8 , Figure 8 It is a structural diagram of another communication device provided in an embodiment of the present application.

[0325] The communication device 100 includes a processor 801, a memory 802, and a communication interface 803. The communication device 100 is specifically used to implement Figure 2 , Figure 4 or Figure 5Any embodiment of the present invention. Among them, the processor 801, the memory 802 and the communication interface 803 can be interconnected through the internal bus 804, and can also communicate through other means such as wireless transmission. The embodiment of the present application takes the connection through the bus 804 as an example. The bus 804 can be a peripheral component interconnect (PCI) bus, an extended industry standard architecture (EISA) bus, a unified bus (Ubus or UB), a computer express link (CXL) bus, a cache coherent interconnect for accelerators (CCIX) bus, etc. The bus 804 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 8 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0326] The processor 801 may be composed of at least one general-purpose processor, such as a central processing unit (CPU), or a combination of a CPU and a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof. The processor 801 executes various types of digital storage instructions, such as software or firmware programs stored in the memory 802, which enables the communication device 100 to provide a variety of services.

[0327] The memory 802 is used to store program codes, and the execution is controlled by the processor 801. The memory 802 may include a volatile memory, such as a random access memory (RAM); the memory 802 may also include a non-volatile memory, such as a read-only memory (ROM), a flash memory, a hard disk drive (HDD) or a solid-state drive (SSD); the memory 802 may also include a combination of the above types. The memory 802 may store program codes, specifically including a memory for executing Figure 2 , Figure 4 or Figure 5 The program code of any embodiment of the present invention will not be described in detail here.

[0328] The communication interface 803 may be a wired interface (e.g., an Ethernet interface) or a wireless interface (e.g., a cellular network interface or a wireless LAN interface), or may be an internal interface (e.g., a high-speed serial computer expansion bus (Peripheral Component Interconnect Express, PCIe) bus interface). The wired interface or wireless interface is used to communicate with other devices or modules.

[0329] It should be noted that this embodiment can be implemented by a general physical server, such as an ARM server or an X86 server, or by a virtual machine based on a general physical server combined with NFV technology. A virtual machine refers to a complete computer system with complete hardware system functions simulated by software and running in a completely isolated environment. This application does not make specific limitations. It should be understood that Figure 8 The communication device 100 shown may also be a server cluster composed of at least one server, which is not specifically limited in this application. The communication device 100 may also be a host, a laptop, a desktop computer, a smart phone, etc., which is not specifically limited.

[0330] It also needs to be explained. Figure 8 This is only a possible implementation of the embodiment of the present application. In actual applications, the communication device 100 may also include more or fewer components, and the present application does not make specific limitations. For content not shown or described in the embodiment of the present application, please refer to Figure 2 , Figure 4 or Figure 5 The relevant explanations in the article will not be repeated here.

[0331] The present application also provides a computer-readable storage medium, wherein instructions are stored in the computer-readable storage medium. When the instructions are executed on a computing device (which may be a single device or a cluster), Figure 2 , Figure 4 or Figure 5 The method of any embodiment is implemented.

[0332] The present application also provides a computer program product. When the computer program product is run on a computing device (which may be a single device or a cluster), Figure 2 , Figure 4 or Figure 5 The method of any embodiment is implemented.

[0333] The following introduces the application scenarios involved in the embodiments of the present application.

[0334] Figure 1 The communication device 100 can be deployed as a whole on the same device (i.e., stand-alone deployment) or on multiple devices (i.e., cluster deployment), which is not specifically limited in the embodiments of the present application. For example, the fingerprint library construction module 120, the sequence fingerprint library 140, and the encrypted traffic identification module 160 in the communication device 100 can be deployed on the same device or on different devices. For another example, the fingerprint library construction module 120 in the communication device 100 is deployed on one device, while the sequence fingerprint library 140 and the encrypted traffic identification module 160 in the communication device 100 are deployed on another device.

[0335] The above-mentioned equipment used to deploy the communication device 100 may be a switch, a router, a gateway, a security detection device, a server, a personal computer, an embedded device, a mobile terminal, etc., which is not specifically limited in the embodiment of the present application. Figures 9 to 12 , an application scenario of the communication device 100 is illustrated by way of example.

[0336] Scenario 1: Home router

[0337] like Fig. 9 As shown, the deployment point of the communication device 100 may be a home router. The home router may first learn the sequence fingerprints of multiple service types based on the fingerprint library construction module 120 in the communication device 100 (see Figure 2 or Figure 4 ), thereby constructing a sequence fingerprint library 140 locally in the home router. Then, the home router can perform traffic identification based on the encrypted traffic identification module 160 in the communication device 100 (see Figure 5 method), thereby realizing functions such as green Internet access and application usage statistics.

[0338] Optionally, the home router may periodically learn the sequence fingerprints of the above-mentioned multiple service types based on the fingerprint library construction module 120 in the communication device 100 (see Figure 2 or Figure 4 The sequence fingerprint library 140 is then regularly updated using the relearned sequence fingerprint to ensure the flow identification effect of the sequence fingerprint library 140.

[0339] Optionally, the home router can first copy the sequence fingerprint library 140 constructed by other devices to the local area, thereby providing a certain degree of traffic identification capability for the home router. The above-mentioned other devices can be servers, routers, security detection equipment, etc., which are not specifically limited in the embodiments of the present application. They can configure the sequence fingerprint library 140 obtained by themselves to the home router. Then the home router can collect the traffic passing through itself. When the collected traffic samples reach a preset amount, the home router can use the locally deployed fingerprint library construction module 120 to process the above traffic samples to generate a sequence fingerprint of the corresponding service type. The home router can update the local sequence fingerprint library 140 with the sequence fingerprint generated by itself to obtain better traffic identification capabilities.

[0340] Optionally, only the sequence fingerprint library 140 and the encrypted traffic identification module 160 may be deployed on the home router, and the fingerprint library construction module 120 may not be deployed, thereby reducing the performance impact on the home router. In this case, the home router can only perform traffic identification based on the locally deployed sequence fingerprint library 140 and the encrypted traffic identification module 160 (the traffic identification method can be found in Figure 5 ), but does not have the ability to build a sequence fingerprint library 140, and cannot generate sequence fingerprints corresponding to various service types by itself.

[0341] Scenario 2: Safety testing equipment

[0342] like Fig.10 As shown, the communication device 100 can be partially or entirely deployed on a security detection device such as a firewall (i.e., deployment point 1), a router (i.e., deployment point 2), etc. Among them, the security detection device has a certain security detection function. For example, the security detection device can be an intrusion prevention system (IPS) device, a firewall and other security devices, or it can be a router, switch, gateway and other network devices equipped with a security detection function, which is not specifically limited in the embodiments of the present application.

[0343] Based on the locally deployed communication device 100, the security detection device can identify the traffic flowing through itself or the traffic mirrored to the security detection device (the traffic identification method can be found in Figure 5), thereby supporting the provision of application services such as Quality of Experience (QoE) and Quality of Service (QoS), and can also provide basic support for security functions based on traffic analysis deployed on security detection equipment. For example, the security detection equipment can identify malicious traffic based on the locally deployed communication device 100, and then intercept the identified malicious traffic, and can also block traffic that accesses illegal websites, etc.

[0344] For example, the owner of a certain campus network (such as a campus network, an enterprise's internal network, etc.) deploys a security detection device at the edge of the campus network, and the security detection device is responsible for security detection and defense of traffic entering and leaving the campus network to ensure the security of user devices such as servers and personal computers in the campus network. By deploying the communication device 100 of the embodiment of the present application on the security detection device, the security detection device can perform efficient traffic identification based on the communication device 100, and then can implement security detection and defense functions based on the traffic identification results.

[0345] Optionally, when multiple target data packets of a certain flow pass through the security detection device one by one, it can parse these target data packets to obtain corresponding target packet information, and then continue to send these target data packets to the destination device. Alternatively, the security detection device first stores the above multiple target data packets locally, and parses these target data packets to obtain corresponding target packet information. When the security detection device completes the flow identification based on the above target packet information, and determines that the flow is safe according to the flow identification result, it then sends the above multiple target data packets to the destination device.

[0346] Scenario 3: Carrier network equipment

[0347] like Fig.11 As shown, the communication device 100 can be deployed on a large network device of an operator. The large network device can periodically learn sequence fingerprints of multiple service types based on the fingerprint library construction module 120 in the locally deployed communication device 100 (see Figure 2 or Figure 4 ), thereby constructing a corresponding sequence fingerprint library 140 for flow identification (the flow identification method can be found in Figure 5 ), which can support functions such as traffic billing, bandwidth management, and malicious traffic blocking.

[0348] Scenario 4: Cloud Server

[0349] like Fig.12As shown, the fingerprint library construction module 120 in the communication device 100 can be deployed on a cloud server, and the encrypted traffic identification module 160 in the communication device 100 can be deployed on a network device such as a home router, a firewall, a large network device, etc. The cloud server can use the fingerprint library construction module 120 to regularly process traffic samples of multiple service types, thereby obtaining sequence fingerprints of the above multiple service types, and construct a sequence fingerprint library 140 on the cloud server based on the obtained sequence fingerprints (see Figure 2 or Figure 4 Then, the cloud server can send the constructed sequence fingerprint library 140 to each network device for local storage. Based on the local sequence fingerprint library 140 and the encrypted traffic identification module 160, these network devices can perform traffic identification (the traffic identification method can be found in Figure 5 ).

[0350] The embodiment of the present application does not specifically limit the manner in which the cloud server obtains traffic samples.

[0351] One possible way is to collect enough traffic samples manually (such as in a laboratory) or automatically. For example, a user can send some instructions to a terminal, a cloud phone or other tool for obtaining traffic to automatically collect traffic, and then provide the collected traffic samples to a cloud server. The cloud server obtains corresponding sequence fingerprints based on the above traffic samples to construct a sequence fingerprint library 140, and then sends the constructed sequence fingerprint library 140 to each network device.

[0352] Another possible way is that each network device sends its own traffic mirror to the cloud server, so that the cloud server can obtain sufficient traffic samples. The cloud server builds a sequence fingerprint library 140 based on the obtained traffic samples, and then sends the built sequence fingerprint library 140 to each network device.

[0353] It should be noted that the above-mentioned scenarios 1 to 4 are only examples and do not constitute specific limitations. The communication device 100 can be used in any scenario requiring traffic identification and can be deployed on any device requiring traffic identification.

[0354] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.

[0355] What is disclosed above is only a preferred embodiment of the present application, and it certainly cannot be used to limit the scope of rights of the present application. A person skilled in the art can understand that all or part of the processes of the above embodiment and the equivalent changes made according to the claims of the present application are still within the scope of the invention.

Claims

1. A method for identifying encrypted traffic, It is characterized in that The method comprises: Obtaining a first sequence fingerprint of the first encrypted traffic, wherein the first sequence fingerprint includes one or more target packet information, the one or more target packet information corresponds one to one with one or more target data packets in the first encrypted traffic, and the one or more target packet information respectively indicates features of corresponding target data packets; A service type to which the first encrypted traffic belongs is determined according to the first sequence fingerprint.

2. The method according to claim 1, It is characterized in that The determining, according to the first sequence fingerprint, the service type to which the first encrypted traffic belongs includes: Determine in a sequence fingerprint library a second sequence fingerprint that matches the first sequence fingerprint, and determine the service type corresponding to the second sequence fingerprint as the service type to which the first encrypted traffic belongs, wherein the sequence fingerprint library includes multiple sequence fingerprints, the multiple sequence fingerprints respectively correspond to one service type among multiple service types, each sequence fingerprint includes one or more packet information, and each packet information indicates the characteristics of a class of data packets.

3. The method according to claim 2, It is characterized in that The determining, in a sequence fingerprint library, a second sequence fingerprint matching the first sequence fingerprint comprises: If the target packet information corresponding to multiple first data packets matches all the packet information in the third sequence fingerprint one by one, and the first order is consistent with the second order, the third sequence fingerprint is determined as the second sequence fingerprint, wherein the one or more target data packets include the multiple first data packets, the first order is the order of the multiple first data packets in the first encrypted traffic, the third sequence fingerprint is one of the multiple sequence fingerprints, and the second order is the order of all packet information in the third sequence fingerprint.

4. The method according to claim 2, It is characterized in that The determining, in a sequence fingerprint library, a second sequence fingerprint matching the first sequence fingerprint comprises: If the target packet information corresponding to one or more first data packets in the uplink direction matches one by one with all the packet information in the uplink sequence fingerprint and the first sequence is consistent with the second sequence, and the target packet information corresponding to one or more second data packets in the downlink direction matches one by one with all the packet information in the downlink sequence fingerprint and the third sequence is consistent with the fourth sequence, then the third sequence fingerprint is determined as the second sequence fingerprint, The one or more target data packets include the one or more first data packets and the one or more second data packets, the first order is the order of the one or more first data packets in the first encrypted traffic, the third order is the order of the one or more second data packets in the first encrypted traffic, the third sequence fingerprint is a sequence fingerprint among multiple sequence fingerprints, the third sequence fingerprint is composed of the uplink sequence fingerprint and the downlink sequence fingerprint, the uplink sequence fingerprint includes all packet information corresponding to the uplink direction in the third sequence fingerprint, the downlink sequence fingerprint includes all packet information corresponding to the downlink direction in the third sequence fingerprint, the second order is the order of all packet information in the uplink sequence fingerprint, and the fourth order is the order of all packet information in the downlink sequence fingerprint.

5. A method according to claim 3 or 4, It is characterized in that The one or more target data packets include a plurality of third data packets, and the method further includes: The order of the plurality of third data packets in the first encrypted traffic is determined based on the Internet Protocol_Identification IP_ID information corresponding to the plurality of third data packets.

6. A method according to any one of claims 2 to 5, It is characterized in that The first packet information includes one or more of a payload length, a packet direction, and a packet type of a first type of data packet, wherein the first packet information is a packet information in a fourth sequence fingerprint, the fourth sequence fingerprint is a sequence fingerprint in the multiple sequence fingerprints, and the first type of data packet is a type of data packet corresponding to the first packet information.

7. The method according to claim 6, It is characterized in that The first packet information also includes a packet distance between the first type of data packet and a second type of data packet, wherein the second type of data packet is a type of data packet corresponding to the second packet information, and the second packet information and the first packet information are two different packet information in the fourth sequence fingerprint.

8. A method according to any one of claims 2 to 7, It is characterized in that The first sequence fingerprint includes target packet information corresponding to the first K target data packets in the first encrypted traffic, where K is a positive integer, and the method further includes: When there is no second sequence fingerprint matching the first sequence fingerprint in the sequence fingerprint library, obtaining target packet information corresponding to the K+1th target data packet in the first encrypted traffic, and updating the first sequence fingerprint according to the target packet information corresponding to the K+1th target data packet to obtain an updated first sequence fingerprint; A fifth sequence fingerprint matching the updated first sequence fingerprint is determined in the sequence fingerprint library, and a service type corresponding to the fifth sequence fingerprint is determined as the service type to which the first encrypted traffic belongs.

9. A method according to any one of claims 2 to 8, It is characterized in that Before determining in the sequence fingerprint library a second sequence fingerprint matching the first sequence fingerprint, the method further comprises: Acquire a plurality of traffic samples belonging to a first service type, wherein the first service type is one of the plurality of service types, and each of the plurality of traffic samples includes one or more data packets; One or more sequence fingerprints corresponding to the first service type are generated according to the multiple traffic samples, and the one or more sequence fingerprints and the corresponding relationship between the first service type and the one or more sequence fingerprints are stored in the sequence fingerprint library.

10. The method according to claim 9, It is characterized in that The step of generating one or more sequence fingerprints corresponding to the first service type according to the plurality of traffic samples includes: Generate multiple flow information sequences according to the multiple traffic samples, wherein the multiple flow information sequences correspond to the multiple traffic samples one by one, and each flow information sequence includes packet information corresponding to the data packets that meet the importance condition in the corresponding traffic sample; A plurality of frequent sequences are determined according to the plurality of flow information sequences, and the one or more sequence fingerprints corresponding to the first service type are determined from the plurality of frequent sequences according to a screening condition.

11. The method according to claim 10, It is characterized in that The importance condition includes one or more of the following: the packet type is a preset type, the payload length is within a preset range, and the importance value obtained based on the importance algorithm is greater than or equal to an importance threshold.

12. A method according to claim 10 or 11, It is characterized in that The screening conditions include one or more of the following: a sequence length is greater than or equal to a preset length, a sequence occurrence number is greater than or equal to a preset number, and a sequence occurrence position is before a preset position.

13. A method according to any one of claims 10 to 12, It is characterized in that The third packet information and the fourth packet information are two packet information in the plurality of flow information sequences, the feature indicated by the third packet information is different from the feature indicated by the fourth packet information only in terms of payload length, the value of the payload length in the third packet information is a first value, and the value of the payload length in the fourth packet information is a second value, and before generating a plurality of flow information sequences according to the plurality of traffic samples, the method further includes: If the difference between the first value and the second value is less than or equal to a first threshold, and the first value and the second value are both in a first sub-interval, the values ​​of the payload lengths in the third packet information and the fourth packet information are adjusted to values ​​corresponding to the first sub-interval, wherein the variation interval of the payload length includes multiple sub-intervals, each of the multiple sub-intervals corresponds to a value within each sub-interval, and the first sub-interval is a sub-interval among the multiple sub-intervals.

14. The method according to claim 13, It is characterized in that The length of the subinterval is determined according to the length of a confirmation field and / or a padding field in the encryption protocol used by the first service type.

15. A method according to any one of claims 9 to 14, It is characterized in that The storing the one or more sequence fingerprints and the correspondence between the first service type and the one or more sequence fingerprints in the sequence fingerprint library includes: If the sixth sequence fingerprint and the seventh sequence fingerprint meet the merging condition, the sixth sequence fingerprint and the seventh sequence fingerprint are merged into an eighth sequence fingerprint, and the eighth sequence fingerprint and the correspondence between the first service type and the eighth sequence fingerprint are stored in the sequence fingerprint library, wherein the one or more sequence fingerprints include the sixth sequence fingerprint and the seventh sequence fingerprint.

16. The method according to claim 9, It is characterized in that The multiple traffic samples include multiple uplink traffic samples and multiple downlink traffic samples, and generating one or more sequence fingerprints corresponding to the first service according to the multiple traffic samples includes: Determine a plurality of upstream information sequences according to the plurality of upstream traffic samples, and determine a plurality of downstream information sequences according to the plurality of downstream traffic samples, wherein the plurality of upstream information sequences correspond one-to-one to the plurality of upstream traffic samples, each upstream information sequence includes packet information corresponding to a data packet that meets an importance condition in a corresponding upstream traffic sample, and the plurality of downstream information sequences correspond one-to-one to the plurality of downstream traffic samples, and each downstream information sequence includes packet information corresponding to a data packet that meets an importance condition in a corresponding downstream traffic sample; Determine a plurality of uplink frequent sequences according to the plurality of uplink traffic sequences, and determine a plurality of downlink frequent sequences according to the plurality of downlink traffic sequences; One or more combinations are determined according to the multiple uplink frequent sequences and the multiple downlink frequent sequences, and the one or more combinations are respectively used as a sequence fingerprint corresponding to the first service type, wherein each combination includes an uplink sequence fingerprint among the multiple uplink frequent sequence fingerprints and a downlink sequence fingerprint among the multiple downlink sequence fingerprints.

17. A method according to any one of claims 2 to 16, It is characterized in that The determining, in a sequence fingerprint library, a second sequence fingerprint matching the first sequence fingerprint comprises: Determine a first parent type to which the first encrypted traffic belongs from a plurality of parent types based on an association identification technology or an Internet Protocol IP library, wherein the plurality of service types are respectively subtypes under one of the plurality of parent types; The second sequence fingerprint matching the first sequence fingerprint is determined among the sequence fingerprints corresponding to all subtypes under the first parent type.

18. A method for constructing a sequence fingerprint library, It is characterized in that The method comprises: Acquire a plurality of traffic samples belonging to a first service type, wherein the first service type is one of a plurality of service types, and each of the plurality of traffic samples includes one or more data packets; One or more sequence fingerprints corresponding to the first service type are generated according to the multiple traffic samples, and the one or more sequence fingerprints and the correspondence between the first service type and the one or more sequence fingerprints are stored in a sequence fingerprint library, wherein the sequence fingerprint library is used to identify the service type to which the encrypted traffic belongs, and each of the one or more sequence fingerprints includes one or more packet information, and each packet information indicates the characteristics of one or more data packets in the multiple traffic samples.

19. A communication device, It is characterized in that The method comprises units and / or modules for executing the method according to any one of claims 1 to 18.

20. A communication device, It is characterized in that including a processor and a memory; The processor is configured to execute instructions stored in the memory, so that the communication device performs the method according to any one of claims 1 to 18.

21. A computer-readable storage medium, It is characterized in that The method comprises computer program instructions, and when the computer program instructions are executed by a computing device, the computing device performs the method according to any one of claims 1 to 18.

22. A computer program product comprising instructions, It is characterized in that When the instructions are executed by a computing device, the computing device is caused to perform the method according to any one of claims 1 to 18.