Application identification method, device and storage medium

By performing flow behavior characteristics analysis and clustering of data flow, directly identifying the server IP addresses and ports of new applications, the problem of low application recognition efficiency in the existing technology is solved, and a higher recognition rate and simplified recognition process is achieved. .

CN112564991BActive Publication Date: 2024-11-12HUAWEI TECH CO LTD
View PDF 11 Cites 0 Cited by

Patent Information

Application Number
CN201910853338.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-09-10
Publication Date
2024-11-12
Estimated Expiration
2039-09-10

AI Technical Summary

Technical Problem

The existing deep message analysis technology is less efficient when identifying applications, and requires maintenance of traffic characteristic databases, resulting in a low recognition rate for new applications.

Method used

By performing flow behavior characteristics analysis on the data flow, extracting flow tables and domain name tables, clustering services to identify application types, and directly identifying them based on the server IP address and port of the new application to avoid relying on the traffic characteristic database.

Benefits of technology

It improves application recognition rate, simplifies the identification process of new applications, and reduces the need for database maintenance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112564991B_ABST
    Figure CN112564991B_ABST
Patent Text Reader

Abstract

The present application discloses an application identification method, device and storage medium, which belongs to the field of communication technology. The network device analyzes the flow behavior characteristics of the flow table to obtain multiple services. Since each service is composed of an IP address and a port identifier, and an application can usually be composed of a group of services, the network device clusters the multiple services according to the flow table and the domain name table to obtain multiple application types, each application type includes multiple services, and each application type corresponds to an application. Further, the network device can determine the label of each application type in the multiple application types, and the application to which the data flow belongs can be identified by the label. The method provided in the present application can identify the application to which the data flow belongs based on the flow behavior characteristics, and does not require a traffic feature database. When a new application appears, the network device identifies the new application based on the IP address and port of the server accessed by the new application, thereby improving the recognition rate of the application.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to an application identification method, device and storage medium. Background Art

[0002] At present, private networks such as enterprise campuses may cause congestion and packet loss due to the emergence of burst traffic. At the same time, the launch of some new unknown applications may further aggravate the above problems. Among them, new unknown applications are usually private applications of enterprises. Therefore, how to identify private applications of enterprises has become one of the important issues that enterprise users are concerned about.

[0003] Currently, deep packet inspection (DPI) technology can be used to identify applications. DPI technology mainly performs deep unpacking and analysis on data streams to extract traffic features, and then matches the extracted traffic features with the data stored in the traffic feature database to identify the application corresponding to the data stream.

[0004] Since DPI technology requires the maintenance of a traffic feature database, when a new application appears, the traffic feature database must also be manually updated to have the ability to identify the new application, resulting in a low application recognition rate. Summary of the invention

[0005] The present application provides an application identification method, device and storage medium, which can solve the problem of low efficiency of DPI technology identification application in related technologies. The technical solution is as follows:

[0006] In a first aspect, a method for identifying an application is provided, the method comprising:

[0007] Extract features from the multiple data flows respectively to obtain a flow table and a domain name table, wherein the flow table includes multiple flow table items, each flow table item in the multiple flow tables includes a five-tuple and a flow start time, and the domain name table includes multiple domain name table items, each domain name table item in the multiple domain name table items includes a source Internet Protocol IP address, a destination domain name, a destination IP address, and a domain name type;

[0008] Analyze the flow behavior characteristics according to the flow table to obtain multiple services, each service consisting of an IP address and a port identifier;

[0009] Clustering the multiple services according to the flow table and the domain name table to obtain multiple application types;

[0010] A label corresponding to each of the multiple application types is determined, where the label is used to identify the application to which the data flow belongs.

[0011] A data flow may include one or more messages, and the five-tuples of the one or more messages are the same. In other words, one or more messages with the same five-tuple may constitute a data flow.

[0012] The five-tuple in the flow table includes the source IP address, source port, destination IP address, destination port and protocol number. For example, assuming that the client currently needs to send a message to the server, the source IP address and source port are the IP address and port of the client, the destination IP address and destination port are the IP address and port of the server, and the protocol number is the number of the transmission protocol used when the client and the server communicate.

[0013] The flow start time of each data flow is the receiving time of the first message in each data flow. However, the first message of each data flow is not necessarily the first message of the entire data flow, but the first message among the messages received when extracting features.

[0014] There are two types of domain names in the domain name table: A.name and C.name. A.name resolves a host name or domain name to an IP address, while C.name resolves multiple host names or domain names to another domain name, which is then resolved to an IP address that is the same as the IP address resolved by A.name. In other words, multiple C.names are equivalent to a branch of A.name.

[0015] By analyzing the flow behavior characteristics of the flow table, multiple services are obtained. Since each service consists of an IP address and a port identifier, and an application can usually be composed of a group of services, after clustering the multiple services according to the flow table and domain name table, multiple application types can be obtained, each application type includes multiple services, and each application type corresponds to an application. At this time, the label of each application type in the multiple application types can be determined, so that the application to which the data flow belongs can be identified through the label. It can be seen that the process of identifying the application does not require a traffic feature database, but can be identified based on the flow behavior characteristics. In this way, when a new application appears, the new application can be directly identified based on the IP address and port of the server accessed by the new application, thereby improving the recognition rate of the application.

[0016] Optionally, the analyzing of flow behavior characteristics according to the flow table to obtain multiple services includes:

[0017] Determine the port with loop according to the flow table, and obtain the loop port set;

[0018] Based on the loop port set, determine a single-client access service set and a first multi-client access service set according to the flow table, wherein each service in the single-client access service set is accessed by a single client, an IP address and a port of the service belong to the same end, and the port does not belong to the loop port set; and each service in the first multi-client access service set is accessed by multiple clients, an IP address and a port of the service belong to the same end, and the port does not belong to the loop port set;

[0019] Based on the loop port set and the first multi-client access service set, determining a second multi-client access service set according to the flow table, each service in the second multi-client access service set is accessed by multiple clients, the IP address and port of the service belong to different ends, and the port does not belong to the loop port set;

[0020] The first multi-client access service set, the second multi-client access service set and the single-client access service set are combined to obtain the multiple services.

[0021] Optionally, determining a port having a loop according to the flow table includes:

[0022] For each port in the flow table, obtaining a same-end IP address set and a peer IP address set of the port according to the flow table;

[0023] Determine the intersection of the same-end IP address set and the opposite-end IP address set of the port to obtain multiple IP addresses;

[0024] Determine, according to the flow table, a total number of data flows corresponding to the multiple IP addresses among all data flows passing through the port, and use the determined total number of flows as a first total number of flows;

[0025] If the first total number of flows is greater than a first threshold, determining the total number of flows of all data flows passing through the port, and using the determined total number of flows as the second total number of flows;

[0026] If the ratio between the first total number of flows and the second total number of flows is greater than a second threshold, the port is determined to be a port with a loop.

[0027] The same-end IP address set of the port refers to the set of IP addresses belonging to the same side as the port, and the opposite-end IP address set of the port refers to the set of IP addresses belonging to different sides of the port. A loop port means that the source IP and destination IP of most data flows passing through the port are the same, that is, the source device and destination device of most data flows passing through the port are the same device.

[0028] Generally, the multiple IP addresses determined by the intersection of the same-end IP address set and the opposite-end IP address set are the IP addresses of these devices that serve as both the source and the destination. In this case, the port can be considered as a potential port with a loop. In order to further verify whether the port is a port with a loop, the first total number of flows can be determined. If the first total number of flows is greater than the first threshold, then the second total number of flows and the ratio between the first total number of flows and the second total number of flows can be further determined. If the ratio is greater than the second threshold, it can be indicated that the source IP and the destination IP of most of the data flows passing through the port are the same, that is, the source device and the destination device of most of the data flows passing through the port are the same device, and then the port can be determined to be a port with a loop.

[0029] Optionally, the determining, based on the loop port set and according to the flow table, a single-client access service set and a first multi-client access service set includes:

[0030] Determine, according to the flow table, services accessed by a single client and whose IP addresses and ports belong to the same end, and services accessed by multiple clients and whose IP addresses and ports belong to the same end, and obtain a single-client access potential service set and a first multi-client access potential service set;

[0031] The services where the ports in the loop port set are located are filtered from the single-client access potential service set to obtain the single-client access service set, and the services where the ports in the loop port set are filtered from the first multi-client access potential service set to obtain the first multi-client access service set.

[0032] Optionally, determining, according to the flow table, a service that is accessed by a single client and whose IP address and port belong to the same end, and a service that is accessed by multiple clients and whose IP address and port belong to the same end, includes:

[0033] Determine multiple target services according to the flow table, each target service corresponds to an IP address and port belonging to the same end in a flow table entry, and each target service corresponds to multiple data flows;

[0034] For each target service among the plurality of target services, determining whether a port of the target service is randomly generated;

[0035] If the port of the target service is randomly generated, determining whether the number of same-side ports corresponding to the IP address of the target service is greater than a third threshold;

[0036] If the number of same-side ports corresponding to the IP address of the target service is greater than the third threshold, determining whether the number of peer terminals corresponding to the target service is greater than a fourth threshold;

[0037] If the number of peers corresponding to the target service is greater than the fourth threshold, determining that the target service is a service accessed by multiple clients and the IP address and port belong to the same end;

[0038] If the number of peers corresponding to the target service is not greater than the fourth threshold, determining whether the peer IP address of the target service is unique;

[0039] If the peer IP address of the target service is unique, it is determined that the target service is a service accessed by a single client and the IP address and port belong to the same end.

[0040] In the flow table, if there are multiple data flows corresponding to the IP address and port belonging to the same end in a flow table entry, then the IP address and port can be used as the target service. In other words, a target service may be composed of a source IP address and a source port, or it may be composed of a destination IP address and a destination port.

[0041] The above-mentioned target service corresponds to an IP address and port belonging to the same end in a flow table entry, and the target service corresponds to multiple data flows, that is, in the flow table, if there are multiple data flows corresponding to an IP address and port belonging to the same end in a flow table entry, then the IP address and port can be used as the target service. For example, if there are multiple data flows in the flow table corresponding to the destination IP address and destination port in a flow table entry, then the destination IP address and destination port can be determined as the target service. Similarly, if there are multiple data flows in the flow table corresponding to the source IP address and source port in a flow table entry, then the source IP address and source port can be determined as the target service.

[0042] Since the target service corresponds to an IP address and port belonging to the same end in a flow table entry, and the target service corresponds to multiple data streams, that is, the IP address and port of the target service may be the IP address and port of the server. In other words, the target service may be a service accessed by multiple clients and the IP address and port belong to the same end. At this time, in order to further confirm whether the target service is a service accessed by multiple clients and the IP address and port belong to the same end, it is also possible to determine whether the port of the target service is randomly generated. If the port of the target service is randomly generated, it is still not possible to confirm whether the target service is a service accessed by multiple clients and the IP address and port belong to the same end. It is also necessary to determine whether the number of ports on the same side corresponding to the IP address of the target service is greater than the third threshold.

[0043] Optionally, after determining whether the port of the target service is randomly generated, the method further includes:

[0044] If the port of the target service is not randomly generated, it is determined that the target service is a service accessed by multiple clients and the IP address and port belong to the same end.

[0045] If the port number of the target service port is less than 1024, it is determined that the port is a well-known port, that is, the port is not randomly generated. If the port number of the target service port is greater than 1024, it is determined that the port is randomly generated.

[0046] Optionally, after determining whether the number of same-side ports corresponding to the IP address of the target service is greater than a third threshold, the method further includes:

[0047] If the number of ports on the same side corresponding to the IP address of the target service is not greater than the third threshold, it is determined that the target service is a service accessed by multiple clients and the IP address and port belong to the same end.

[0048] Optionally, the determining, based on the loop port set and the first multi-client access service set and according to the flow table, a second multi-client access service set comprises:

[0049] Based on the first multi-client access service set, according to the flow table, determine services that are accessed by multiple clients and whose IP addresses and ports belong to different ends, and obtain a second multi-client access potential service set;

[0050] The services where the ports in the loop port set are located are filtered from the second multi-client access potential service set to obtain the second multi-client access service set.

[0051] Optionally, the determining, based on the first multi-client access service set and according to the flow table, services accessed by multiple clients and whose IP addresses and ports belong to different ends includes:

[0052] Determine the IP addresses and ports in the same flow table entry and belonging to different ends in the flow table as a reference service to obtain multiple reference services;

[0053] For each reference service of the plurality of reference services, determining whether the reference service corresponds to a plurality of data streams;

[0054] If the reference service corresponds to multiple data streams, determining whether the port of the reference service is randomly generated;

[0055] If the port of the reference service is not randomly generated, determining whether the port of the reference service is included in the first multi-client access service set;

[0056] If the port of the reference service is not included in the first multi-client access service set, determining whether the IP address of the reference service is included in the source IP address of the domain name table;

[0057] If the IP address of the reference service is not included in the source IP address of the domain name table, it is determined that the reference service is a service accessed by multiple clients and the IP addresses and ports belong to different ends.

[0058] The reference service is also composed of an IP address and port, but the IP address and port of the reference service are from different ends. For example, the destination IP address and source port in the same flow table entry can constitute a reference service, and the source IP address and destination port in the same flow table entry can also constitute a reference service.

[0059] The above-mentioned reference service is also composed of an IP address and port, but unlike the target service, the IP address and port of the reference service are at different ends. For example, the destination IP address and source port in the same flow table entry can constitute a reference service, and the source IP address and destination port in the same flow table entry can also constitute a reference service.

[0060] In some cases, the source IP address and the destination IP address may be reversed in the flow table obtained after feature extraction, resulting in the source IP address of the reference service being mistaken for the destination IP address, or the destination IP address being mistaken for the source IP address, and thus being unable to determine whether the IP address and port in the reference service are IP addresses and ports belonging to different ends in the same flow table entry, but the source IP address in the domain name table must be the correct source IP address. Therefore, if it is determined that the IP address of the reference service is not included in the source IP address of the domain name table, it can be determined that the reference service is a service accessed by multiple clients and the IP address and port belong to different ends.

[0061] Optionally, clustering the multiple services according to the flow table and the domain name table to obtain multiple application types includes:

[0062] Performing time correlation clustering on the multiple services according to the flow table and the domain name table to obtain a time correlation clustering result;

[0063] According to the flow table, a service with periodicity is selected from the multiple services to obtain a periodic clustering result;

[0064] According to the domain name table, a plurality of first services and a plurality of second services are obtained from the plurality of services, wherein the plurality of first services refer to services that are accessed by multiple clients and have corresponding domain names, and the plurality of second services include services that are accessed by multiple clients and have no corresponding domain names and services that are accessed by a single client;

[0065] Performing semantic relevance clustering on the multiple first services to obtain a semantic relevance clustering result;

[0066] Performing client similarity clustering on the multiple second services to obtain a client similarity clustering result;

[0067] The time correlation clustering result, the periodicity clustering result, the semantic correlation clustering result and the client similarity clustering result are integrated to obtain the multiple application types.

[0068] Based on the above description, it can be known that the multiple services include services accessed by multiple clients and services accessed by a single client, and each domain name entry in the domain name table includes a source IP address, a destination domain name, a destination IP address and a domain name type. Therefore, for services accessed by multiple clients, it is possible to determine from the domain name table whether each of the multiple services has a corresponding domain name, and then filter out services accessed by multiple clients and having corresponding domain names from the multiple services to obtain multiple first services. At the same time, it is also possible to filter out services accessed by multiple clients and having no corresponding domain names.

[0069] Optionally, performing time correlation clustering on the multiple services according to the flow table and the domain name table to obtain a time correlation clustering result includes:

[0070] According to the flow table, obtaining a flow start time in a flow table entry where each service in the plurality of services is located;

[0071] Determine, according to the acquired stream start time, a time difference between every two services in the plurality of services;

[0072] determining a time correlation between each two services in the plurality of services by using the determined time difference;

[0073] According to the time correlation between every two services in the plurality of services, selecting a service that satisfies a time correlation condition from the plurality of services;

[0074] Generate a similarity matrix based on the temporal correlation between the selected services;

[0075] Determine spectral clustering results of the plurality of services according to the similarity matrix and spectral clustering analysis;

[0076] Determine, according to the domain name table, the similarity between every two services in the plurality of services;

[0077] The time correlation clustering result is determined according to the similarity between every two services in the plurality of services and the spectral clustering result.

[0078] Optionally, selecting a periodic service from the multiple services according to the flow table includes:

[0079] For each of the multiple services, obtaining, according to the flow table, flow start times of multiple data flows of the same client accessing the service;

[0080] Determine the time difference between each two adjacent flow start times according to the sequence of flow start times of the plurality of data flows accessing the service;

[0081] Based on the determined time difference, determining whether the periodicity of the service is strongly periodic by Fourier transform;

[0082] If the periodicity of the service is strong periodicity, the service is determined to be a service with periodicity.

[0083] Optionally, the performing semantic relevance clustering on the plurality of first services to obtain a semantic relevance clustering result includes:

[0084] Clustering the plurality of first services according to semantic relevance of the domain names to obtain a plurality of first clustering results;

[0085] Based on the domain name similarities between the multiple first clustering results, the multiple first clustering results are merged to obtain multiple second clustering results;

[0086] According to the domain name semantic relevance between an unclustered service in the plurality of first services and each second clustering result, the unclustered service is clustered with the plurality of second clustering results to obtain the semantic relevance clustering result.

[0087] Optionally, clustering the plurality of first services according to semantic relevance of domain names includes:

[0088] Acquire a plurality of third services accessed by multiple clients and corresponding to unique domain names from the plurality of first services, and acquire a plurality of fourth services accessed by multiple clients and corresponding to multiple domain names from the plurality of first services;

[0089] Acquire mergeable domain names from the domain names corresponding to the plurality of fourth services, and merge the mergeable domain names to obtain a plurality of first domain names;

[0090] Remove numbers and symbols from each first domain name, and remove numbers and symbols from each domain name corresponding to the third service, to obtain multiple second domain names;

[0091] Clustering services corresponding to the multiple second domain names according to semantic relevance of the multiple second domain names;

[0092] According to the semantic relevance of the unmergeable domain names among the domain names corresponding to the multiple fourth services, the services corresponding to the unmergeable domain names are clustered.

[0093] Since multiple first services are services accessed by multiple clients, for each first service, the domain name corresponding to the first service can be determined from the domain name table. If the domain name corresponding to the first service is unique, the first service is determined to be a third service accessed by multiple clients and corresponding to a unique domain name. If the domain name corresponding to the first service is not unique, the first service is determined to be a fourth service accessed by multiple clients and corresponding to multiple domain names.

[0094] Optionally, performing client similarity clustering on the plurality of second services to obtain a client similarity clustering result includes:

[0095] Determining an IP address of a client accessing each of the plurality of second services;

[0096] The plurality of second services are clustered according to an intersection-and-union ratio of the IP addresses of the clients accessing each second service to obtain the client similarity clustering result.

[0097] Optionally, determining a label corresponding to each of the multiple application types includes:

[0098] The multiple application types are divided into a first application group, a second application group and a third application group, wherein each application type in the first application group includes a service with a corresponding domain name, each application type in the second application group includes a service with no corresponding domain name, and each application type in the third application group corresponds to an unclustered service;

[0099] Determine a label corresponding to each application type based on a domain name corresponding to a service included in each application type in the first application group;

[0100] Determine a label corresponding to each application type in the second application group and the third application group.

[0101] After the network device determines the label corresponding to each of the multiple application types, it can also display the label corresponding to each of the multiple application types.

[0102] In a second aspect, an application identification device is provided, wherein the application identification device has the function of implementing the application identification method in the first aspect. The application identification device includes at least one module, and the at least one module is used to implement the application identification method provided in the first aspect.

[0103] In a third aspect, a network device is provided, the network device comprising a processor and a memory, the memory being used to store a program for executing the application identification method provided in the first aspect, and storing data involved in implementing the application identification method provided in the first aspect. The processor is configured to execute the program stored in the memory. The operating device of the storage device may also include a communication bus, the communication bus being used to establish a connection between the processor and the memory.

[0104] In a fourth aspect, a computer-readable storage medium is provided, wherein instructions are stored in the computer-readable storage medium. When the instructions are executed on a computer, the computer executes the application identification method described in the first aspect.

[0105] In a fifth aspect, a computer program product comprising instructions is provided. When the computer program product is run on a computer, the computer is caused to execute the application identification method described in the first aspect.

[0106] The technical solution provided by this application can at least bring the following beneficial effects:

[0107] By analyzing the flow behavior characteristics of the flow table, multiple services are obtained. Since each service consists of an IP address and a port identifier, and an application can usually be composed of a group of services, after clustering the multiple services according to the flow table and the domain name table, multiple application types can be obtained, each application type includes multiple services, and each application type corresponds to an application. At this time, the label of each application type in the multiple application types can be determined, so that the application to which the data flow belongs can be identified through the label. It can be seen that the present application does not require a traffic feature database in the process of identifying applications, but can be identified based on flow behavior characteristics. In this way, when a new application appears, the new application can be directly identified based on the IP address and port of the server accessed by the new application, thereby improving the recognition rate of the application. BRIEF DESCRIPTION OF THE DRAWINGS

[0108] Figure 1 is an architecture diagram of an application identification system provided in an embodiment of the present application;

[0109] Figure 2 is a structural schematic diagram of a computer device provided in an embodiment of the present application;

[0110] Figure 3 is a flow chart of an application identification method provided in an embodiment of the present application;

[0111] Figure 4 is a schematic diagram of an undirected graph provided in an embodiment of the present application;

[0112] Figure 5is a structural diagram of an application identification device provided in an embodiment of the present application;

[0113] Figure 6 is a schematic diagram of an analysis module provided in an embodiment of the present application;

[0114] Figure 7 It is a schematic diagram of a clustering module provided in an embodiment of the present application. DETAILED DESCRIPTION

[0115] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.

[0116] Before explaining the application identification method provided in the embodiment of the present application, the application scenario of the embodiment of the present application is first introduced.

[0117] In private networks such as enterprise campuses, there are often key services and non-key services. When non-key services occupy a large bandwidth, key services occupy a small bandwidth. At this time, the small bandwidth may affect the quality of key services. Moreover, the key services of an enterprise are usually the services corresponding to the enterprise's private applications. Therefore, in order to improve the quality of key services, it is usually necessary to identify the enterprise's private applications, so that the enterprise's network management personnel can configure some strategies that can improve the quality of key services, thereby improving the quality of key services. For example, for the enterprise's private applications, the bandwidth required for their normal operation can be guaranteed, and for public network applications, flow limiting can be performed, that is, the data flow corresponding to the private application is not flow limited, and the data flow corresponding to the public network application is flow limited, thereby improving the quality of key services.

[0118] Of course, the above-mentioned strategy of ensuring the quality of key services through current limiting is only one application scenario of the present application. The present application can also be applied in other scenarios, which will not be listed one by one in the present application.

[0119] Figure 1 This is an architecture diagram of an application identification system provided in an embodiment of the present application, see Figure 1 The system includes multiple clients 101, a network device 102 and multiple servers 103. Each client 101 and the network device 102 are connected to each other via wired or wireless means for communication, and each server 103 and the network device 102 are also connected to each other via wired or wireless means for communication.

[0120] For any client 101 among the multiple clients 101, an application is installed on the client 101. When the client 101 runs the application, a data stream is generated. At this time, the client 101 can send these data streams to the network device 102. When the network device 102 receives these data streams, it can process these data streams to identify the application corresponding to the data stream. Afterwards, when these data streams are transmitted to the server 103, the server 103 can process these data streams to respond to the operation of the client 101.

[0121] The application installed on the client 101 can be a private application or a public network application. Among them, a private application refers to an application used within the enterprise, and a public network application refers to an application that anyone can use. For example, a private application can be an application used for communication within the enterprise, and a public network application can be an application used for communication between the enterprise and the business outside.

[0122] The client 101 can be any electronic product that can interact with the user through one or more methods such as keyboard, touchpad, touch screen, remote control, voice interaction or handwriting device, such as a personal computer (PC), mobile phone, smart phone, personal digital assistant (PDA), wearable device, pocket PC (PPC), tablet computer, smart car machine, smart TV, smart speaker, etc.

[0123] The network device 102 may be a core switch, an access switch, a router, etc. The server 103 may be a server, or a server cluster consisting of multiple servers, or a cloud computing service center.

[0124] Figure 1 Only three clients and three servers are used to illustrate the application identification system, which does not constitute a limitation on the embodiments of the present application. In addition, the application identification method provided in the embodiments of the present application can be used for identification of enterprise private applications as well as identification of public network applications.

[0125] Please refer to Figure 2 , Figure 2 is a schematic diagram of a computer device according to an embodiment of the present application. The computer device may be Figure 1 The client 101, network device 102 or server 103 shown in FIG. The computer device includes at least one processor 201, a communication bus 202, a memory 203 and at least one communication interface 204.

[0126] The processor 201 may be a general-purpose central processing unit (CPU), a network processor (NP), a microprocessor, or may be one or more integrated circuits for implementing the solution of the present application, such as an application-specific integrated circuit (ASIC), a programmable logic device (PLD) or a combination thereof. The above-mentioned PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL) or any combination thereof.

[0127] The communication bus 202 is used to transmit information between the above components. The communication bus 202 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0128] The memory 203 may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, or a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 203 may exist independently and be connected to the processor 201 through the communication bus 202. The memory 203 may also be integrated with the processor 201.

[0129] The communication interface 204 is used to communicate with other devices or communication networks. The communication interface 204 includes a wired communication interface and may also include a wireless communication interface. The wired communication interface may be, for example, an Ethernet interface. The Ethernet interface may be an optical interface, an electrical interface, or a combination thereof. The wireless communication interface may be a wireless local area network (WLAN) interface, a cellular network communication interface, or a combination thereof.

[0130] In a specific implementation, as an embodiment, the processor 201 may include one or more CPUs, such as Figure 2 CPU0 and CPU1 are shown in the figure.

[0131] In a specific implementation, as an embodiment, a computer device may include multiple processors, such as Figure 2 201 and processor 205 are shown in FIG. Each of these processors may be a single-CPU or a multi-CPU. A processor herein may refer to one or more devices, circuits, and / or processing cores for processing data (such as computer program instructions).

[0132] In a specific implementation, as an embodiment, the computer device may further include an output device 206 and an input device 207. The output device 206 communicates with the processor 201 and may display information in a variety of ways. For example, the output device 206 may be a liquid crystal display (LCD), a light emitting diode (LED) display device, a cathode ray tube (CRT) display device, or a projector. The input device 207 communicates with the processor 201 and may receive user input in a variety of ways. For example, the input device 207 may be a mouse, a keyboard, a touch screen device, or a sensor device.

[0133] In some embodiments, the memory 203 is used to store the program code 210 for executing the solution of the present application, and the processor 201 can execute the program code 210 stored in the memory 203. For example, the computer device can implement the following by the processor 201 and the program code 210 in the memory 203: Figure 3 An application identification method is provided in an embodiment.

[0134] Figure 3 is a flowchart of an application identification method provided in an embodiment of the present application, the method is applied to Figure 1 The application shown identifies network devices in the system. Figure 3, the method comprises the following steps.

[0135] Step 301: The network device extracts features from multiple data flows respectively to obtain a flow table and a domain name table. The flow table includes multiple flow table items. Each flow table item in the multiple flow tables includes a five-tuple and a flow start time. The domain name table includes multiple domain name table items. Each domain name table item in the multiple domain name table items includes a source IP address, a destination domain name, a destination IP address, and a domain name type.

[0136] Normally, a data stream may include one or more messages, and the five-tuples of the one or more messages are the same. In other words, one or more messages with the same five-tuple may constitute a data stream. In addition, since the destination domain name is the domain name corresponding to the destination IP address, when the destination domain name is unique, the domain name type is also unique. Therefore, the network device can extract the five-tuple, destination domain name and domain name type from any message included in each data stream, and determine the receiving time of the first message in each data stream as the stream start time. Afterwards, the network device can obtain the source IP address and the destination IP address from the five-tuple, thereby generating a flow table based on the five-tuple and the stream start time of each data stream, and generating a domain name table based on the source IP address, destination domain name, destination IP address and domain name type of each data stream.

[0137] Since the five-tuple includes the source IP address, source port, destination IP address, destination port and protocol number, the network device can obtain the source IP address and destination IP address of the data flow from the five-tuple. For example, assuming that the client currently needs to send a message to the server, the source IP address and source port of the message are the IP address and port of the client, the destination IP address and destination port are the IP address and port of the server, and the protocol number is the number of the transmission protocol used when the client and the server communicate.

[0138] Based on the above description, the flow start time of each data flow is the reception time of the first message in each data flow. However, the first message of each data flow is not necessarily the first message of the entire data flow, but the first message received when the feature is currently extracted. For example, it is currently necessary to extract features for all data flows collected between 1:30 and 2:00. Assume that the reception time of the first message of data flow A is 1:00, and the reception time of the first message of data flow A between 1:30 and 2:00 is 1:31, then the flow start time of data flow A is 1:31.

[0139] There are two types of domain names: A.name and C.name. A.name resolves a host name or domain name to an IP address, while C.name resolves multiple host names or domain names to another domain name, which is then resolved to an IP address that is the same as the IP address resolved by A.name. In other words, multiple C.names are equivalent to a branch of A.name.

[0140] In an embodiment of the present application, the network device may also set a trigger condition for feature extraction, that is, extract features from multiple data streams separately when the trigger condition is met. As an example, in the process of collecting data streams, the network device may determine whether the data volume of the currently collected data stream reaches a data volume threshold. When the data volume of the currently collected data stream reaches the data volume threshold, the network device may extract features from the multiple collected data streams separately. For example, if the data volume threshold set by the network device is 200M, then in the process of collecting data streams, the network device may determine whether the data volume of the currently collected data stream reaches 200M. If so, features are extracted from the collected data streams separately.

[0141] As another example, the network device can count the time difference between the start collection time and the current time, and when the time difference reaches the first time threshold, extract features from the collected multiple data streams. For example, if the first time threshold set by the network device is 30 minutes, then the network device can count the time difference between the start collection time and the current time, and if the time difference reaches 30 minutes, extract features from the collected data streams.

[0142] The above data volume threshold and first time threshold can be set according to requirements.

[0143] In some embodiments, after obtaining the flow table and the domain name table, the flow table and the domain name table may be preprocessed. As an example, for the flow table, the network device may deduplicate the flow table items in the flow table and merge the flow table items. After merging, the flow table items with incomplete information may be deleted to obtain the preprocessed flow table. For the domain name table, the network device may deduplicate the domain name table items in the domain name table and filter out the domain name table items with the domain name type of A.name. After filtering, the domain name table items with incomplete information may be deleted to obtain the preprocessed domain name table.

[0144] For example, the flow table and domain name table obtained after feature extraction can be shown in Tables 1 and 2 below. The first flow table item and the second flow table item in Table 1 are repeated. In this case, the first flow table item or the second flow table item can be deleted. Moreover, the five-tuples of the second flow table item and the third flow table item in Table 1 are the same, but the flow start time is different. Assuming that the flow start time of the second flow table item is earlier than that of the third flow table item, the second flow table item can be used as the merged flow table item, and the third flow table item can be deleted. In addition, after deduplication and merging of the flow table items, the flow table items with incomplete information need to be deleted. Refer to Table 1. The five-tuples of the sixth flow table item, the eighth flow table item, and the eleventh flow table item in Table 1 are incomplete. Then, these three flow table items can be deleted. At this point, the preprocessing of the flow table can be completed, so that the preprocessed flow table shown in Table 3 can be obtained.

[0145] The first domain name table item and the second domain name table item in Table 2 are repeated. In this case, the first domain name table item or the second domain name table item can be deleted. In addition, the domain name type of the third, fifth and seventh domain name table items in Table 2 is C.name. Because the domain name table item with the domain name type of C.name is equivalent to a branch of a domain name table item with the domain name type of A.name, in order to retain the data flow with prominent characteristics to perform flow behavior feature analysis, and then more accurately determine multiple services, the domain name table item with the domain name type of A.name in the domain name table can be retained, and the domain name table item with the domain name type of C.name in the domain name table can be deleted. In addition, after the above processing is performed on the domain name table, the domain name table items with incomplete information in the domain name table need to be deleted. See Table 2. The information of the sixth and eighth domain name table items in Table 2 is incomplete. Then, these two domain name table items can be deleted. At this point, the preprocessing of the domain name table can be completed, so that the preprocessed domain name table shown in Table 4 can be obtained.

[0146] Table 1

[0147]

[0148] Table 2

[0149]

[0150]

[0151] Table 3

[0152]

[0153] Table 4

[0154] Source IP Destination domain name Destination IP Domain Type IP01 abpd-jap.xxx.com IP001 A.name IP03 abnc-jp.xxx.com IP003 A.name IP08 abnd-hx.xxx.com IP008 A.name IP09 abnt-jp.xxx.com IP009 A.name IP10 asnd-jp.xxx.com IP011 A.name IP11 atnd-jap.xxx.com IP012 A.name IP12 abyd-jnp.xxx.com IP013 A.name …… …… …… ……

[0155] The operation of preprocessing the flow table and the domain name table is optional, that is, the subsequent steps can be implemented according to the flow table and the domain name table before preprocessing, or according to the flow table and the domain name table after preprocessing, and the implementation process of the two is similar. In the embodiment of the present application, the preprocessed flow table and the domain name table are taken as an example to explain the subsequent steps. That is, the flow table and the domain name table mentioned in the subsequent steps are the preprocessed flow table and the domain name table.

[0156] Although the flow table and domain name table can be obtained through step 301, the data in the flow table and domain name table is huge, the number of flows is large, and the flow behavior characteristics are complex. It is difficult to identify the application corresponding to the data flow from the flow table and domain name table. However, an application is usually composed of a group of services, and a service is composed of an IP address and a port identifier, so a step-by-step processing method can be used to identify the application corresponding to the data flow. That is, first according to step 302, the flow behavior characteristics are analyzed according to the flow table to obtain multiple services, and then according to step 303, the multiple services are clustered to obtain multiple application types, and then according to step 303, the label corresponding to the application type is determined to identify the application corresponding to the data flow.

[0157] Step 302: The network device analyzes the flow behavior characteristics according to the flow table to obtain multiple services, each of which consists of an IP address and a port identifier.

[0158] In some embodiments, step 302 may be implemented by the following steps (1)-(4):

[0159] (1) Determine the ports with loops according to the flow table and obtain the loop port set.

[0160] In some embodiments, for each port in the flow table, the network device can obtain the same-end IP address set and the opposite-end IP address set of the port according to the flow table. Determine the intersection of the same-end IP address set and the opposite-end IP address set of the port to obtain multiple IP addresses. According to the flow table, determine the total number of data flows corresponding to the multiple IP addresses in all data flows passing through the port, and use the determined total number of flows as the first total number of flows. If the first total number of flows is greater than the first threshold, determine the total number of flows of all data flows passing through the port, and use the determined total number of flows as the second total number of flows. If the ratio between the first total number of flows and the second total number of flows is greater than the second threshold, determine that the port is a port with a loop. Afterwards, the ports with loops in the flow table can be combined into a loop port set.

[0161] The implementation process of the network device determining the total number of all data flows passing through the port according to the flow table and the total number of data flows corresponding to the multiple IP addresses in all data flows passing through the port can be: from the flow table, select the flow table entry where the port is located, count the number of selected flow table entries, and determine the counted number as the total number of all data flows passing through the port. Afterwards, count the number of flow table entries whose source IP address or destination IP address is any IP address among the multiple IP addresses in the selected flow table entries, and determine the counted number as the total number of data flows corresponding to the multiple IP addresses in all data flows passing through the port.

[0162] Exemplarily, when the port is a source port, a flow table entry whose source port is the port is selected from the flow table, the number of the selected flow table entries is counted, and the counted number is determined as the total number of flows of all data flows passing through the port. Afterwards, the number of flow table entries whose source IP address or destination IP address is any IP address among the multiple IP addresses in the selected flow table entries is counted, and the counted number is determined as the total number of flows of data flows corresponding to the multiple IP addresses in all data flows passing through the port.

[0163] The same-end IP address set of the port refers to the set of IP addresses belonging to the same side as the port, and the opposite-end IP address set of the port refers to the set of IP addresses belonging to different sides of the port. For example, if the port is a source port, then the same-end IP address set of the port refers to the set of source IP addresses, and the opposite-end IP address set of the port refers to the set of destination IP addresses. Similarly, assuming that the port is a destination port, then the same-end IP address set of the port refers to the set of destination IP addresses, and the opposite-end IP address set of the port refers to the set of source IP addresses.

[0164] The first threshold and the second threshold can be set according to requirements. For example, the first threshold can be 20 and the second threshold can be 0.2.

[0165] Generally, the multiple IP addresses determined by the intersection of the same-end IP address set and the opposite-end IP address set are the IP addresses of these devices that serve as both the source and the destination. In this case, the port can be considered as a potential port with a loop. In order to further verify whether the port is a port with a loop, the first total number of flows can be determined. If the first total number of flows is greater than the first threshold, then the second total number of flows and the ratio between the first total number of flows and the second total number of flows can be further determined. If the ratio is greater than the second threshold, it can be indicated that the source IP and the destination IP of most of the data flows passing through the port are the same, that is, the source device and the destination device of most of the data flows passing through the port are the same device, and then the port can be determined to be a port with a loop.

[0166] For example, for the destination port Port001 in Table 3, there are 100 flow table entries in Table 3 whose destination port is Port001, and 30 of them have the same destination IP address and source IP address, so the first total number of flows is determined to be 30, and the second total number of flows is determined to be 100. Assume that the first threshold set by the network device according to the requirements is 20, and the second threshold is 0.2. At this time, it can be determined that the first total number of flows 30 is greater than the first threshold 20, so it is necessary to further determine the ratio of the first total number of flows to the second total number of flows, which is 0.3 and greater than the second threshold 0.2, so port Port001 is determined to be a port with a loop. Similarly, for the source port Port02 in Table 1, there are 150 flow table entries in Table 3 whose source port is Port02, and 50 of them have the same source IP address and destination IP address, so the first total number of flows is determined to be 50, and the second total number of flows is 150. At this time, it can be determined that the first total flow number 50 is greater than the first threshold 20, so it is necessary to further determine the ratio of the first total flow number to the second total flow number. The ratio is 0.3 and the ratio is greater than the second threshold 0.2, so port Port02 is determined as a port with a loop.

[0167] Further, if the first total number of flows is not greater than a first threshold, or the ratio between the first total number of flows and the second total number of flows is not greater than a second threshold, it can be determined that the port is not a port with a loop.

[0168] (2) Based on the loop port set, determine a single-client access service set and a first multi-client access service set according to the flow table, wherein each service in the single-client access service set is accessed by a single client, the IP address and port of the service belong to the same end, and the port does not belong to the loop port set; each service in the first multi-client access service set is accessed by multiple clients, the IP address and port of the service belong to the same end, and the port does not belong to the loop port set.

[0169] In some embodiments, the network device can determine, based on the flow table, services accessed by a single client and whose IP addresses and ports belong to the same end, and services accessed by multiple clients and whose IP addresses and ports belong to the same end, to obtain a single-client access potential service set and a first multi-client access potential service set. The services where the ports in the loop port set are located are filtered from the single-client access potential service set to obtain a single-client access service set. The services where the ports in the loop port set are located are filtered from the first multi-client access potential service set to obtain a first multi-client access service set.

[0170] Among them, the implementation process of the network device determining the service accessed by a single client and the IP address and port belonging to the same end, and the service accessed by multiple clients and the IP address and port belonging to the same end according to the flow table can be: determine multiple target services according to the flow table, each target service corresponds to the IP address and port belonging to the same end in a flow table item, and each target service corresponds to multiple data streams. For each target service among the multiple target services, determine whether the port of the target service is randomly generated. If the port of the target service is randomly generated, determine whether the number of ports on the same side corresponding to the IP address of the target service is greater than the third threshold. If the number of ports on the same side corresponding to the IP address of the target service is greater than the third threshold, determine whether the number of opposite ends corresponding to the target service is greater than the fourth threshold. If the number of opposite ends corresponding to the target service is greater than the fourth threshold, determine that the target service is a service accessed by multiple clients and the IP address and port belong to the same end. If the number of opposite ends corresponding to the target service is not greater than the fourth threshold, determine whether the opposite end IP address of the target service is unique; if the opposite end IP address of the target service is unique, determine that the target service is a service accessed by a single client and the IP address and port belong to the same end.

[0171] The above-mentioned target service corresponds to an IP address and port belonging to the same end in a flow table entry, and the target service corresponds to multiple data flows, that is, in the flow table, if there are multiple data flows corresponding to an IP address and port belonging to the same end in a flow table entry, then the IP address and port can be used as the target service. For example, if there are multiple data flows in the flow table corresponding to the destination IP address and destination port in a flow table entry, then the destination IP address and destination port can be determined as the target service. Similarly, if there are multiple data flows in the flow table corresponding to the source IP address and source port in a flow table entry, then the source IP address and source port can be determined as the target service.

[0172] In some embodiments, the implementation process of a network device determining whether a target service corresponds to multiple data flows may be as follows: the network device may determine the number of flow table entries in the flow table where the target service is located; if the determined number of flow table entries is greater than a fifth threshold, it is determined that the target service corresponds to multiple data flows; if the determined number of flow table entries is not greater than the fifth threshold, it is determined that the target service does not correspond to multiple data flows.

[0173] The third threshold, the fourth threshold and the fifth threshold can be set as required. For example, the third threshold can be 20, the fourth threshold can be 5, and the fifth threshold can be 10.

[0174] Since the target service corresponds to an IP address and port belonging to the same end in a flow table entry, and the target service corresponds to multiple data streams, that is, the IP address and port of the target service may be the IP address and port of the server. In other words, the target service may be a service accessed by multiple clients and the IP address and port belong to the same end. At this time, in order to further confirm whether the target service is a service accessed by multiple clients and the IP address and port belong to the same end, it is also possible to determine whether the port of the target service is randomly generated. In some embodiments, the implementation process of determining whether the port of the target service is randomly generated can be: determine whether the port number of the port of the target service is greater than 1024. If the port number of the port of the target service is less than 1024, determine that the port is a well-known port, that is, the port is not randomly generated. If the port number of the port of the target service is greater than 1024, determine that the port is randomly generated.

[0175] If the port of the target service is randomly generated, it is still not possible to confirm whether the target service is a service accessed by multiple clients and the IP address and port belong to the same end, and it is also necessary to determine whether the number of ports on the same side corresponding to the IP address of the target service is greater than the third threshold. When determining whether the number of ports on the same side corresponding to the IP address of the target service is greater than the third threshold, it is necessary to first determine the number of ports on the same side corresponding to the IP address of the target service. In some embodiments, the implementation process of determining the number of ports on the same side corresponding to the IP address of the target service can be: select the flow table entry where the IP address of the target service is located from the flow table, determine the number of ports in the selected flow table entry that belong to the same end as the IP address of the target service, and use the determined number of ports as the number of ports on the same side corresponding to the IP address of the target service.

[0176] Exemplarily, based on the above description, the target service may be composed of a source IP address and a source port, or may be composed of a destination IP address and a destination port. When the target service is composed of a source IP address and a source port, the implementation process of determining the number of same-side ports corresponding to the IP address of the target service may be: selecting the flow table entry where the IP address of the target service is located from the flow table, determining the number of source ports in the selected flow table entry, and using the determined number of source ports as the number of same-side ports corresponding to the IP address of the target service. When the target service is composed of a destination IP address and a destination port, the implementation process of determining the number of same-side ports corresponding to the IP address of the target service may be: selecting the flow table entry where the IP address of the target service is located from the flow table, determining the number of destination ports in the selected flow table entry, and using the determined number of destination ports as the number of same-side ports corresponding to the IP address of the target service.

[0177] Since there are usually not many ports on the server side, there are usually many clients accessing the server side. Therefore, when it is determined that the number of ports on the same side corresponding to the IP address of the target service is greater than the third threshold, it can be further determined whether the number of opposite ends corresponding to the target service is greater than the fourth threshold. When determining whether the number of opposite ends corresponding to the target service is greater than the fourth threshold, it is necessary to first determine the number of opposite ends corresponding to the target service. In some embodiments, the implementation process of determining the number of opposite ends corresponding to the target service can be: select the flow table entry where the target service is located from the flow table, determine the number of IP addresses in the selected flow table entry that belong to different ends from the target service, and use the determined number of IP addresses as the number of opposite ends corresponding to the target service.

[0178] Exemplarily, when the target service is composed of a source IP address and a source port, the implementation process of determining the number of peers corresponding to the target service may be: selecting the flow table entry where the target service is located from the flow table, determining the number of destination IP addresses in the selected flow table entry, and using the determined number of destination IP addresses as the number of peers corresponding to the target service. When the target service is composed of a destination IP address and a destination port, the implementation process of determining the number of peers corresponding to the target service may be: selecting the flow table entry where the target service is located from the flow table, determining the number of source IP addresses in the selected flow table entry, and using the determined number of source IP addresses as the number of peers corresponding to the target service.

[0179] Among them, when it is determined that the number of peers corresponding to the target service is greater than the fourth threshold, it can be determined that the target service is accessed by multiple clients and the IP address and port belong to the same end. That is, through the above-mentioned judgments at all levels, it can be accurately determined that the service is accessed by multiple clients and the IP address and port belong to the same end. When it is determined that the number of peers corresponding to the target service is not greater than the fourth threshold, it can be indicated that the target service may be accessed by a single client, and the IP address and port of the target service may be the IP address and port of the server. At this time, it can be determined whether the IP address of the peer corresponding to the target service is unique. If the IP address of the peer corresponding to the target service is unique, then it can be directly determined that the target service is accessed by a single client and the IP address and port belong to the same end.

[0180] For example, a target service consisting of a destination IP address and a destination port is: IP001+Port001. Assuming that the destination port Port001 is not randomly generated, the number of destination ports corresponding to the IP address IP001 can be determined. Assuming that the number of destination ports corresponding to the IP address IP001 is 25, and the third threshold value set by the network device is 20, since the number of destination ports corresponding to the IP address IP001 is greater than 20, the number of source terminals corresponding to the target service can be further determined. Assuming that the target service IP001+Port001 has 10 flow table entries in the flow table whose source IP addresses and source ports are not completely the same, and the fourth threshold value set by the network device is 5, it can be determined that the number of source terminals corresponding to the target service is 10, which is greater than 5, so the target service IP001+Port001 is determined as a service accessed by multiple clients and whose IP address and port belong to the same terminal.

[0181] If the target service IP001+Port001 has 3 flow table entries in the flow table whose source IP addresses and source ports are not exactly the same, it can be determined that the number of source ends corresponding to the target service is 3 and less than 5, then determine whether the source IP addresses of these 3 flow table entries are the same. If the source IP addresses of the 3 flow table entries are the same, but only the source ports are different, then this target service IP001+Port001 is determined as a service accessed by a single client and the IP address and port belong to the same end.

[0182] Furthermore, since well-known ports are some ports reserved in the server, if the port of the target service is not randomly generated, that is, the port of the target service is a well-known port, then it can be directly determined that the target service is accessed by multiple clients and the IP address and port belong to the same end.

[0183] Further, if the number of ports on the same side corresponding to the IP address of the target service is not greater than the third threshold, the target service is determined to be a service accessed by multiple clients and the IP address and port belong to the same end. Alternatively, if the opposite end IP address of the target service is not unique, it is determined that the target service is not a service accessed by a single client and the IP address and port belong to the same end, nor is it a service accessed by multiple clients and the IP address and port belong to the same end.

[0184] (3) Based on the loop port set and the first multi-client access service set, determine a second multi-client access service set according to the flow table.

[0185] In some embodiments, the network device can determine, based on the first multi-client access service set and according to the flow table, services accessed by multiple clients and whose IP addresses and ports belong to different ends, to obtain a second multi-client access potential service set. The services where the ports in the loop port set are located are filtered from the second multi-client access potential service set to obtain a second multi-client access service set.

[0186] Among them, the implementation process of the network device determining the service accessed by multiple clients and whose IP addresses and ports belong to different ends based on the first multi-client access service set and according to the flow table can be: determine the IP addresses and ports in the same flow table entry in the flow table and belonging to different ends as a reference service to obtain multiple reference services. For each reference service in the multiple reference services, determine whether the reference service corresponds to multiple data streams. If the reference service corresponds to multiple data streams, determine whether the port of the reference service is randomly generated. If the port of the reference service is not randomly generated, determine whether the port of the reference service is included in the first multi-client access service set. If the port of the reference service is not included in the first multi-client access service set, determine whether the IP address of the reference service is included in the source IP address of the domain name table. If the IP address of the reference service is not included in the source IP address of the domain name table, determine that the reference service is a service accessed by multiple clients and whose IP address and port belong to different ends.

[0187] The above-mentioned reference service is also composed of an IP address and port, but unlike the target service, the IP address and port of the reference service are at different ends. For example, the destination IP address and source port in the same flow table entry can constitute a reference service, and the source IP address and destination port in the same flow table entry can also constitute a reference service.

[0188] In some embodiments, the implementation process of a network device determining whether a reference service corresponds to multiple data flows may be as follows: the network device may determine the number of flow table entries in the flow table where the reference service is located; if the determined number of flow table entries is greater than a fifth threshold, it is determined that the reference service corresponds to multiple data flows; if the determined number of flow table entries is not greater than the fifth threshold, it is determined that the reference service does not correspond to multiple data flows.

[0189] The operation of the network device determining whether the port of the reference service is randomly generated can refer to the above-mentioned operation of determining whether the port of the target service is randomly generated, and the embodiment of the present application will not elaborate on this.

[0190] In some cases, the source IP address and the destination IP address may be reversed in the flow table obtained after feature extraction, resulting in the source IP address of the reference service being mistaken for the destination IP address, or the destination IP address being mistaken for the source IP address, and thus being unable to determine whether the IP address and port in the reference service are IP addresses and ports belonging to different ends in the same flow table entry, but the source IP address in the domain name table must be the correct source IP address. Therefore, if it is determined that the IP address of the reference service is not included in the source IP address of the domain name table, it can be determined that the reference service is a service accessed by multiple clients and the IP address and port belong to different ends.

[0191] Further, if the reference service does not correspond to multiple data streams, or the port of the reference service is randomly generated, or the port of the reference service is included in the first multi-client access service set, or the IP address of the reference service is included in the source IP address of the domain name table, then it can be determined that the reference service is not a service accessed by multiple clients and the IP address and port belong to different ends.

[0192] (4) The first multi-client access service set, the second multi-client access service set, and the single-client access service set are combined to obtain multiple services.

[0193] Since the first multi-client access service set, the second multi-client access service set and the single-client access service set all include one or more services, after merging the first multi-client access service set, the second multi-client access service set and the single-client access service set, multiple services belonging to the server can be obtained.

[0194] Step 303: The network device clusters the multiple services according to the flow table and the domain name table to obtain multiple application types.

[0195] In some embodiments, step 303 may be implemented by the following steps (1)-(6):

[0196] (1) Based on the flow table and the domain name table, the multiple services are clustered by time correlation to obtain a time correlation clustering result.

[0197] In some embodiments, the network device may obtain the flow start time in the flow table entry where each service in the multiple services is located according to the flow table. According to the obtained flow start time, the time difference between every two services in the multiple services is determined. The time correlation between every two services in the multiple services is determined by the determined time difference. According to the time correlation between every two services in the multiple services, a service that meets the time correlation condition is selected from the multiple services. According to the time correlation between the selected services, a similarity matrix is ​​generated. According to the similarity matrix, according to the spectral clustering analysis, the spectral clustering results of the multiple services are determined. According to the domain name table, the similarity between every two services in the multiple services is determined. According to the similarity between every two services in the multiple services and the spectral clustering results, the time correlation clustering results are determined.

[0198] The implementation process of the network device determining the time correlation between each two services in the multiple services by determining the time difference may be: for any two services in the multiple services, determining whether the time difference between the two services is less than a second time threshold, if the time difference between the two services is less than the second time threshold, determining that the two services have time correlation. If the time difference between the two services is not less than the second time threshold, determining that the two services do not have time correlation. For any other two services, it is also possible to determine whether the two services have time correlation according to the above method.

[0199] The second time threshold can be set according to demand, and this embodiment of the present application does not limit this.

[0200] In some embodiments, the implementation process of the network device selecting a service that meets the condition from the multiple services according to the time correlation between every two services in the multiple services can be: generating an undirected graph according to the time correlation between every two services in the multiple services, the undirected graph including multiple nodes corresponding to the multiple services one by one, and edges corresponding to two services with time correlation, and the edges are used to connect the two nodes corresponding to the two services with time correlation. Determine the maximum clique in the undirected graph, the maximum clique refers to the connected area with the largest number of nodes after connecting the nodes through the edges. Determine the service corresponding to the node in the maximum clique as the service that meets the time correlation condition.

[0201] For example, the multiple services are service A-service G, service A is time-correlated with service B, service B is time-correlated with service C, service C is time-correlated with service A and service D, service D is time-correlated with service A, service E is time-correlated with service F, and service E is time-correlated with service G. Then, we can generate Figure 4The undirected graph shown. In the undirected graph, the node A' corresponding to service A and the node B' corresponding to service B are connected to form an edge, the node B' corresponding to service B and the node C' corresponding to service C are connected to form an edge, the node C' corresponding to service C is connected to the node A' corresponding to service A and the node D' corresponding to service D respectively to form an edge, the node D' corresponding to service D and the node A' corresponding to service A are connected to form an edge, the node E' corresponding to service E and the node F' corresponding to service F are connected to form an edge, and the node E' corresponding to service E and the node G' corresponding to service G are connected to form an edge. In the undirected graph, the connected area with the largest number of nodes after connecting the nodes by edges is the connected area composed of node A', node B', node C' and node D'. The connected area is the largest clique in the above undirected graph. At this time, services A, service B, service C and service D are determined to be selected as services that meet the time correlation condition.

[0202] In some embodiments, the network device generates a similarity matrix according to the time correlation between the selected services in an implementation process as follows: for each two selected services, if there is a time correlation between the two services, the elements corresponding to the two services in the similarity matrix are determined to be 1; if the two services do not have a time correlation, the elements corresponding to the two services in the similarity matrix are determined to be 0. The element corresponding to the same service in the similarity matrix is ​​1.

[0203] In other embodiments, based on the above-mentioned maximum cluster, the network device generates a similarity matrix according to the time correlation between the selected services. The implementation process can be: for each two selected services, if there is a connecting edge between the corresponding nodes of the two services in the maximum cluster, then the corresponding elements of the two services in the similarity matrix are determined to be 1; if there is no connecting edge between the corresponding nodes of the two services in the maximum cluster, then the corresponding elements of the two services in the similarity matrix are determined to be 0.

[0204] For example, if service A is time-correlated with service B, the corresponding element of service A and service B in the similarity matrix is ​​1. If service B is time-correlated with service C, the corresponding element of service B and service C in the similarity matrix is ​​1. If service C is time-correlated with service A, the corresponding element of service C and service A in the similarity matrix is ​​1. If service C is time-correlated with service D, the corresponding element of service C and service D in the similarity matrix is ​​1. At this time, according to the time correlation between service A, service B, service C and service D, the generated similarity matrix is:

[0205]

[0206] The similarity matrix is ​​a matrix of n rows and n columns, that is, n services are selected from the multiple services according to the time correlation between every two services in the multiple services. The spectral clustering analysis is based on the similarity matrix to cluster the n services. That is, through the spectral clustering analysis, it can be determined which services in the n services can be clustered into one category. The implementation process of the spectral clustering analysis can refer to the relevant technology.

[0207] In some embodiments, the implementation process of the network device determining the similarity between each two services in the multiple services based on the domain name table can be: determining the domain name corresponding to the IP address of each service in the multiple services from the domain name table, determining the similarity between the domain names corresponding to the IP addresses of each two services in the multiple services, and obtaining the similarity between each two services in the multiple services.

[0208] Among them, for any two services among the multiple services, the implementation process of determining the similarity between the domain names corresponding to the IP addresses of the two services can be: determine the domain names corresponding to the IP addresses of the two services from the domain name table, perform word segmentation processing on the domain name corresponding to the IP address of each service, and obtain all the word segments in the domain name corresponding to each IP address. Afterwards, the network device can remove the word segments that are domain name suffixes from all the word segments in the domain name corresponding to each IP address to obtain the word segment group of the domain name corresponding to each IP address. Determine the intersection-and-union ratio of the word segment groups of the domain names corresponding to the IP addresses of the two services, and use the determined intersection-and-union ratio to determine the similarity between the domain names corresponding to the IP addresses of the two services.

[0209] The domain name suffix of most domain names may be the same, so the similarity of the word segments without the domain name suffix can more accurately reflect the similarity of two domain names.

[0210] The intersection-and-union ratio of every two word groups refers to the ratio of the number of intersection elements to the number of union elements of the two word groups. For example, the domain name corresponding to the IP address of service 1 is abnd-jap.xxx.com, and the word groups in this domain name may include: abnd, jap, and xxx. The domain name corresponding to the IP address of service 2 is abnd-hx.xxx.com, and the word groups in this domain name may include: abnd, hk, and xxx. The intersection elements of these two word groups are abnd and xxx, and the union elements are abnd, jap, hk, and xxx. That is, the number of intersection elements of these two word groups is 2, and the number of union elements is 4. Therefore, the intersection-and-union ratio of the word groups of the domain names corresponding to the IP addresses of these two services is 2 / 4.

[0211] Since the spectral clustering analysis is to classify multiple relatively similar services into one category, the spectral clustering result may include multiple categories of services, each category of services includes multiple relatively similar services. In other words, the spectral clustering result may include multiple first service sets, each of which includes multiple relatively similar services. However, after the spectral clustering analysis, there may be more similar services in the two service sets, and some services have not been subjected to the spectral clustering analysis. Therefore, the time correlation clustering result is determined according to the similarity between each two services in the multiple services and the spectral clustering result. In some embodiments, the network device determines the time correlation clustering result according to the similarity between each two services in the multiple services and the spectral clustering result. The implementation process may be: for each service in each of the multiple first service sets included in the spectral clustering result, based on the similarity between each two services in the multiple services, determine the similarity between the service and other services in the first service set. If the similarity between the service and other services in the first service set is not greater than the similarity threshold, the service is removed from the first service set. After the spectral clustering results including each service in each first service set are traversed in the above manner, multiple second service sets can be obtained. For each service removed, the similarity between the service and each service in each second service set can be determined based on the similarity between every two services in the multiple services. If the similarity between the service and each service in one of the second service sets is greater than the similarity threshold, the service is added to the second service set. For the services that have not been subjected to spectral clustering analysis, clustering is also performed in accordance with the above processing method for the removed services, thereby obtaining a time correlation clustering result.

[0212] The similarity threshold can be set according to needs, and this embodiment of the present application does not limit this.

[0213] Optionally, in the embodiment of the present application, before the network device performs time correlation clustering on the multiple services according to the flow table and the domain name table, it can also process the flow table again based on the multiple services determined in step 302. In some embodiments, the flow table entries whose destination IP address and destination port are not the IP address and port of any service in the multiple services can be deleted, and / or the table entries whose source IP address and destination IP address are reversed are corrected, and the table entries whose source port and destination port are reversed are corrected.

[0214] (2) According to the flow table, a service with periodicity is selected from the multiple services to obtain a periodic clustering result.

[0215] In some embodiments, for each of the multiple services, the flow start time of multiple data flows accessing the service by the same client is obtained according to the flow table. According to the sequence of the flow start times of the multiple data flows accessing the service, the time difference between each two adjacent flow start times is determined. Based on the determined time difference, it is determined by Fourier transform whether the periodicity of the service is strong periodicity. If the periodicity of the service is strong periodicity, the service is determined to be a periodic service.

[0216] In some embodiments, the implementation process of the network device obtaining the flow start time of multiple data flows of the same client accessing the service based on the flow table can be as follows: from the flow table, select the IP address and port of the service as the flow table item of the destination IP address and destination port, determine the number of flow table items where each source IP address in the selected flow table items is located, obtain the flow start time from the flow table items where the source IP address corresponding to the maximum number is located, and determine the obtained flow start time as the flow start time of the multiple data flows of the same client accessing the service.

[0217] For example, for service IP008+Port008, there are 20 flow table entries in the flow table that use the IP address and port of the service as the destination IP address and destination port. If 15 of these 20 flow table entries have a source IP address of IP08, and 5 of these 20 flow table entries have a source IP address of IP01, then the flow start time in the flow table entry where IP08 is located can be obtained, and the obtained flow start time can be determined as the flow start time of multiple data flows accessing the service from the same client.

[0218] In some embodiments, based on the determined time difference, the implementation process of determining whether the periodicity of the service is strongly periodic through Fourier transform can be: establishing a coordinate system with the determined number of time differences as the horizontal axis and the determined time difference as the vertical axis, plotting the determined time difference in the coordinate system to obtain a discrete signal, performing Fourier transform on the discrete signal, and determining whether the number of peaks in the transformed signal is less than a sixth threshold; if it is less than the sixth threshold, determining that the periodicity of the service is strongly periodic; otherwise, determining that the periodicity of the service is not strongly periodic.

[0219] The sixth threshold can be set according to demand, and this embodiment of the present application does not limit this.

[0220] (3) According to the domain name table, multiple first services and multiple second services are obtained from the multiple services, where the multiple first services refer to services that are accessed by multiple clients and have corresponding domain names, and the multiple second services include services that are accessed by multiple clients and have no corresponding domain names and services that are accessed by a single client.

[0221] Based on step (4) in step 302, it can be known that the multiple services include services accessed by multiple clients and services accessed by a single client, and each domain name entry in the domain name table includes a source IP address, a destination domain name, a destination IP address, and a domain name type. Therefore, for services accessed by multiple clients, it is possible to determine from the domain name table whether each of the multiple services has a corresponding domain name, and then filter out services accessed by multiple clients and having corresponding domain names from the multiple services to obtain multiple first services. At the same time, it is also possible to filter out services accessed by multiple clients and having no corresponding domain names.

[0222] (4) Perform semantic relevance clustering on the multiple first services to obtain a semantic relevance clustering result.

[0223] In some embodiments, the network device may cluster the above-mentioned multiple first services according to the semantic relevance of the domain names to obtain multiple first clustering results. Based on the domain name similarity between the multiple first clustering results, the multiple first clustering results are merged to obtain multiple second clustering results. According to the domain name semantic relevance between the unclustered services in the multiple first services and each second clustering result, the unclustered services are clustered with the multiple second clustering results to obtain a semantic relevance clustering result.

[0224] Among them, the implementation process of clustering multiple first services according to the semantic relevance of domain names can be: from multiple first services, obtain multiple third services that are accessed by multiple clients and correspond to unique domain names, and from multiple first services, obtain multiple fourth services that are accessed by multiple clients and correspond to multiple domain names. From the domain names corresponding to the multiple fourth services, obtain mergeable domain names, and merge the mergeable domain names to obtain multiple first domain names. Remove the numbers and symbols in each first domain name, and remove the numbers and symbols in the domain name corresponding to each third service to obtain multiple second domain names. According to the semantic relevance of the multiple second domain names, cluster the services corresponding to the multiple second domain names. According to the semantic relevance of the unmergeable domain names among the domain names corresponding to the multiple fourth services, cluster the services corresponding to the unmergeable domain names.

[0225] Since multiple first services are services accessed by multiple clients, for each first service, the domain name corresponding to the first service can be determined from the domain name table. If the domain name corresponding to the first service is unique, the first service is determined to be a third service accessed by multiple clients and corresponding to a unique domain name. If the domain name corresponding to the first service is not unique, the first service is determined to be a fourth service accessed by multiple clients and corresponding to multiple domain names.

[0226] In some embodiments, a mergeable domain name is obtained from the domain names corresponding to multiple fourth services, and the mergeable domain names are merged to obtain multiple first domain names. The implementation process can be as follows: multiple domain names with the same first-level domain name are obtained from the domain names corresponding to multiple fourth services, and the multiple domain names are segmented to obtain all the segmented words in each domain name. The segmented words belonging to the first-level domain name are removed from all the segmented words in each domain name to obtain the segmented word group of each domain name. The intersection-over-union ratio of the segmented word groups of the multiple domain names obtained is determined. If the intersection-over-union ratio is greater than the first intersection-over-union ratio threshold, the multiple domain names with the same first-level domain name in the domain names corresponding to the multiple fourth services are determined to be mergeable domain names. Afterwards, the intersection of the segmented word groups of the multiple domain names obtained is determined, and the intersection of the multiple segmented word groups is added in front of the first-level domain name to obtain the merged domain name, that is, the first domain name.

[0227] For example, the domain names corresponding to the multiple fourth services are abpd-jap.xxx.com, acnd-jap.xxx.com, and abed-jap.xxx.com. The three domain names are segmented to obtain all the segmented words in the domain name abpd-jap.xxx.com as abpd, jap, xxx, and com, all the segmented words in the domain name acnd-jap.xxx.com as acnd, jap, xxx, and com, and all the segmented words in the domain name abed-jap.xxx.com as abed, jap, xxx, and com. The segmented words xxx and com belonging to the first-level domain name are removed from all the segmented words in each domain name, and the segmented words group of the domain name abpd-jap.xxx.com is {abpd, jap}, the segmented words group of the domain name acnd-jap.xxx.com is {acnd, jap}, and the segmented words group of the domain name abed-jap.xxx.com is {abed, jap}. The intersection element of these three word groups is jap, the number of intersection elements is 1, and the union elements are abpd, acnd, abed and jap, the number of union elements is 4. At this time, it can be determined that the intersection-union ratio of these three word groups is 1 / 4. Assuming that the intersection-union ratio is greater than the first intersection-union ratio threshold, these three domain names are determined to be mergeable domain names. After that, the intersection of the word groups of the obtained multiple domain names is determined, and the intersection of the multiple word groups is added in front of the first-level domain name to obtain the merged domain name, that is, the first domain name is jap.xxx.com.

[0228] The semantic relevance of the multiple second domain names can also be determined according to the intersection-and-union ratio of the corresponding word groups, and then the second domain names whose intersection-and-union ratio is greater than the second intersection-and-union ratio threshold are classified into one category, thereby realizing clustering of the services corresponding to the multiple second domain names. Among them, the method for determining the intersection-and-union ratio of the word groups corresponding to the multiple second domain names can refer to the method in the previous text, and the embodiment of the present application will not be elaborated on this in detail.

[0229] The semantic relevance of the non-mergeable domain names among the domain names corresponding to the multiple fourth services can also be determined according to the intersection-and-union ratio of the corresponding word groups, and then the second domain names whose intersection-and-union ratio is greater than the third intersection-and-union ratio threshold are classified into one category, thereby realizing clustering of services corresponding to the non-mergeable domain names. Among them, the method for determining the intersection-and-union ratio of the word groups corresponding to the non-mergeable domain names among the domain names corresponding to the multiple fourth services can refer to the method in the previous text, and the embodiment of the present application will not be elaborated on this in detail.

[0230] The first IoU threshold, the second IoU threshold and the third IoU threshold can be set according to requirements, and the first IoU threshold, the second IoU threshold and the third IoU threshold can be the same or different.

[0231] (5) Perform client similarity clustering on the multiple second services to obtain client similarity clustering results.

[0232] In some embodiments, the network device can determine the IP address of the client accessing each of the multiple second services; cluster the multiple second services according to the intersection and union ratio of the IP addresses of the clients accessing each second service to obtain a client similarity clustering result.

[0233] As an example, the network device may classify the second services whose intersection-over-union ratios of the IP addresses of the clients of the second services are greater than a fourth intersection-over-union ratio threshold into one category, thereby obtaining a client similarity clustering result.

[0234] For example, the second service A has three client IP addresses: IP01, IP02, and IP03, and the second service B also has three client IP addresses: IP01, IP03, and IP05. Two of the IP addresses of the clients of the second service A are the same as two of the IP addresses of the clients of the second service B. Then, the intersection element of the client IP addresses between the second service A and the second service B is {IP01, IP03}, and the union element of the client IP addresses between the second service A and the second service B is {IP01, IP02, IP03, IP05}. The intersection-and-union ratio of the client IP addresses between the second service A and the second service B is 2 / 4. Assuming that the intersection-and-union ratio of the client IP addresses between the second service A and the second service B is greater than the fourth intersection-and-union ratio threshold, the two second services are clustered to obtain the client similarity clustering result.

[0235] (6) The time correlation clustering results, periodicity clustering results, semantic correlation clustering results and client similarity clustering results are integrated to obtain multiple application types.

[0236] In some embodiments, the network device may determine the intersection-and-union ratio between every two clustering results, and merge two clustering results whose intersection-and-union ratio is greater than a fifth intersection-and-union ratio threshold. After processing all clustering results in this manner, multiple application types may be obtained. The intersection-and-union ratio between every two clustering results refers to the intersection-and-union ratio of services in the two clustering results. That is, the ratio between the number of intersection services and the number of union services in the two clustering results.

[0237] Each clustering result includes multiple application types. Therefore, after the above four clustering results are merged, multiple application types can be obtained, and each application type can correspond to multiple services.

[0238] In addition, the fourth intersection-and-intersection-ratio threshold and the fifth intersection-and-intersection-ratio threshold can be set according to needs, and the fourth intersection-and-intersection-ratio threshold and the fifth intersection-and-intersection-ratio threshold can be the same or different, and can be the same or different from the above-mentioned first intersection-and-intersection-ratio threshold, the second intersection-and-intersection-ratio threshold and the third intersection-and-intersection-ratio threshold.

[0239] Step 304: The network device determines a label corresponding to each application type among a plurality of application types, where the label is used to identify the application to which the data flow belongs.

[0240] In some embodiments, the network device may divide the multiple application types into a first application group, a second application group, and a third application group, wherein each application type in the first application group includes a service with a corresponding domain name, each application type in the second application group includes a service with no corresponding domain name, and each application type in the third application group corresponds to an unclustered service. Based on the domain name corresponding to the service included in each application type in the first application group, a label corresponding to each application type is determined, and a label corresponding to each application type in the second application group and the third application group is determined.

[0241] In some embodiments, the network device determines the label corresponding to each application type based on the domain name corresponding to the service included in each application type in the first application group. The implementation process may be: for each application type in the first application group, determine the first-level domain name in the domain name corresponding to the service included in the application type. If the determined first-level domain names are the same, determine the enterprise name corresponding to the first-level domain name, and use the enterprise name as the label corresponding to the application type. If the determined first-level domain names are different, determine the enterprise name corresponding to the first-level domain name with the largest proportion among these first-level domain names as the label corresponding to the application type.

[0242] For example, an application type in the first application group includes 20 services, and the first-level domain name in the domain name corresponding to each service is xxx.com. Assuming that the company name corresponding to these first-level domain names is xxx, xxx is used as the label corresponding to the application type. For another example, an application type in the first application includes 50 services, of which 40 services have the first-level domain name in the domain name corresponding to xxx.com, and the first-level domain name in the domain name corresponding to the remaining 10 services is scmd.com. Assuming that the company name corresponding to the first-level domain name xxx.com is xxx, and the company name corresponding to the first-level domain name scmd.com is scmd. Since the first-level domain name xxx.com accounts for the largest proportion, xxx can be used as the label corresponding to the application type.

[0243] In some embodiments, the implementation process of the network device determining the label corresponding to each application type in the second application group can be: for each application type in the second application group, determine the service where the well-known port is located, the service belonging to the loop port set, the service with the same source port and destination port, and the service belonging to the second plurality of client access service sets from the services included in the application type. Determine whether the number of these services is greater than the seventh threshold value. If it is not greater than the seventh threshold value, then generate the label corresponding to the application type based on the first target character in the first format. If it is greater than the seventh threshold value, then generate the label corresponding to the application type based on the first target character in the second format.

[0244] The first target character can be set as required, for example, the first target character is NN. The first format and the second format can also be set as required, for example, the first format can be: first target character / {IP01+Port001, IP02+Port002, IP01+Port003}, and the second format can be: first target character / {IP: 001, 002, 003, 004}.

[0245] For example, a certain application type in the second application group includes 30 services. From these 30 services, the services where the well-known ports are located are determined to be IP01+Port001 and IP02+Port002, the service belonging to the loop port set is IP12+Port002, the service with the same source port and destination port is IP14+Port011, and the service belonging to the second plurality of client access service sets is IP05+Port005. At this time, the number of these services that can be determined is 5. Assuming that the number of these services 5 is not greater than the seventh threshold, and the first target character is NN, then the label corresponding to the application type can be determined to be NN / {IP01+Port001, IP02+Port002, IP12+Port002, IP14+Port011, IP05+Port005}. Assuming that the number of these services 5 is greater than the seventh threshold, then the label corresponding to the application type can be determined to be NN / {IP: 001, 002, 002, 011, 005}.

[0246] In some embodiments, the implementation process of the network device determining the label corresponding to each application type in the third application group may be: for each application type in the third application group, determining whether the number of services included in the application type is greater than a seventh threshold, and if not greater than the seventh threshold, generating a label for the application type based on the second target character in the first format. If greater than the seventh threshold, generating a label for the application type based on the second target character in the second format.

[0247] The second target character can be set as required, for example, the second target character is UKN. The first format and the second format can also be set as required, for example, the first format can be: second target character / {IP01+Port001, IP02+Port002, IP01+Port003}, and the second format can be: second target character / {IP: 001, 002, 003, 004}.

[0248] After the network device determines the label corresponding to each of the multiple application types, it can also display the label corresponding to each of the multiple application types.

[0249] In an embodiment of the present application, the network device can obtain multiple services by analyzing the flow behavior characteristics of the flow table. Since each service is composed of an IP address and a port identifier, and an application can usually be composed of a group of services, after clustering the multiple services according to the flow table and the domain name table, multiple application types can be obtained, each application type includes multiple services, and each application type corresponds to an application. At this time, the label of each application type in the multiple application types can be determined, so that the application to which the data flow belongs can be identified through the label. It can be seen that the embodiment of the present application does not require a traffic feature database in the process of identifying the application, but can be identified based on the flow behavior characteristics. In this way, when a new application appears, the new application can be directly identified based on the IP address and port of the server accessed by the new application, thereby improving the recognition rate of the application.

[0250] Figure 5 is a schematic diagram of the structure of an application identification device provided in an embodiment of the present application. The application identification device can be implemented as part or all of a network device by software, hardware, or a combination of both. Figure 5 The device includes: an extraction module 501, an analysis module 502, a clustering module 503 and a determination module 504. The functions of the extraction module 501, the analysis module 502, the clustering module 503 and the determination module 504 can be realized by Figure 2 The processor in the embodiment is implemented.

[0251] Extraction module 501, used to execute Figure 3 The operation of step 301 in the embodiment;

[0252] Analysis module 502, for executing Figure 3 The operation of step 302 in the embodiment;

[0253] Clustering module 503, used to perform Figure 3 The operation of step 303 in the embodiment;

[0254] Determine module 504, for executing Figure 3 The operation of step 304 in the embodiment.

[0255] Alternatively, see Figure 6 , the analysis module 502 includes:

[0256] The first determining submodule 5021 is used to determine the ports with loops according to the flow table to obtain a loop port set;

[0257] A second determining submodule 5022 is used to determine, based on the loop port set and according to the flow table, a single-client access service set and a first multi-client access service set, each service in the single-client access service set is accessed by a single client, the IP address and port of the service belong to the same end, and the port does not belong to the loop port set; each service in the first multi-client access service set is accessed by multiple clients, the IP address and port of the service belong to the same end, and the port does not belong to the loop port set;

[0258] A third determining submodule 5023 is used to determine a second multi-client access service set according to the flow table based on the loop port set and the first multi-client access service set, each service in the second multi-client access service set is accessed by multiple clients, the IP address and port of the service belong to different ends, and the port does not belong to the loop port set;

[0259] The merging submodule 5024 is used to merge the first multi-client access service set, the second multi-client access service set and the single-client access service set to obtain multiple services.

[0260] Optionally, the first determining submodule 5021 is mainly used for:

[0261] For each port in the flow table, obtain the same-end IP address set and the opposite-end IP address set of the port according to the flow table;

[0262] Determine the intersection of the same-end IP address set and the opposite-end IP address set of the port to obtain multiple IP addresses;

[0263] Determine, according to the flow table, a total number of data flows corresponding to the multiple IP addresses in all data flows passing through the port, and use the determined total number of flows as a first total number of flows;

[0264] If the first total flow number is greater than the first threshold, determining the total flow number of all data flows passing through the port, and using the determined total flow number as the second total flow number;

[0265] If the ratio between the first total number of flows and the second total number of flows is greater than a second threshold, the port is determined to be a port with a loop.

[0266] Optionally, the second determining submodule 5022 is mainly used for:

[0267] Determine, according to the flow table, services accessed by a single client and whose IP addresses and ports belong to the same end, and services accessed by multiple clients and whose IP addresses and ports belong to the same end, and obtain a single-client access potential service set and a first multi-client access potential service set;

[0268] The services of the ports in the loop port set are filtered from the single-client access potential service set to obtain the single-client access service set, and the services of the ports in the loop port set are filtered from the first multi-client access potential service set to obtain the first multi-client access service set.

[0269] Optionally, the second determining submodule 5022 is further used to:

[0270] Determine multiple target services according to the flow table, each target service corresponds to an IP address and port belonging to the same end in a flow table entry, and each target service corresponds to multiple data flows;

[0271] For each target service among the plurality of target services, determining whether a port of the target service is randomly generated;

[0272] If the port of the target service is randomly generated, determining whether the number of same-side ports corresponding to the IP address of the target service is greater than a third threshold;

[0273] If the number of same-side ports corresponding to the IP address of the target service is greater than the third threshold, determining whether the number of peer terminals corresponding to the target service is greater than the fourth threshold;

[0274] If the number of peers corresponding to the target service is greater than a fourth threshold, determining that the target service is a service accessed by multiple clients and the IP address and port belong to the same end;

[0275] If the number of peers corresponding to the target service is not greater than the fourth threshold, determining whether the peer IP address of the target service is unique;

[0276] If the peer IP address of the target service is unique, it is determined that the target service is a service accessed by a single client and the IP address and port belong to the same end.

[0277] Optionally, the second determining submodule 5022 is further used to:

[0278] If the port of the target service is not randomly generated, it is determined that the target service is a service accessed by multiple clients and the IP address and port belong to the same end.

[0279] Optionally, the second determining submodule 5022 is further used to:

[0280] If the number of ports on the same side corresponding to the IP address of the target service is not greater than the third threshold, it is determined that the target service is a service accessed by multiple clients and the IP address and port belong to the same end.

[0281] Optionally, the third determining submodule 5023 is mainly used for:

[0282] Based on the first multi-client access service set, determine services that are accessed by multiple clients and whose IP addresses and ports belong to different terminals according to the flow table, and obtain a second multi-client access potential service set;

[0283] The services where the ports in the loop port set are located are filtered from the second multi-client access potential service set to obtain a second multi-client access service set.

[0284] Optionally, the third determining submodule 5023 is further used to:

[0285] The IP addresses and ports in the same flow table entry and belonging to different ends in the flow table are determined as a reference service to obtain multiple reference services;

[0286] For each reference service in the plurality of reference services, determining whether the reference service corresponds to a plurality of data flows;

[0287] If the reference service corresponds to multiple data streams, determine whether the port of the reference service is randomly generated;

[0288] If the port of the reference service is not randomly generated, determining whether the port of the reference service is included in the first multi-client access service set;

[0289] If the port of the reference service is not included in the first multi-client access service set, determining whether the IP address of the reference service is included in the source IP address of the domain name table;

[0290] If the IP address of the reference service is not included in the source IP address of the domain name table, it is determined that the reference service is a service accessed by multiple clients and the IP addresses and ports belong to different ends.

[0291] Alternatively, see Figure 7 , the clustering module 503 includes:

[0292] The first clustering submodule 5031 is used to perform time correlation clustering on multiple services according to the flow table and the domain name table to obtain a time correlation clustering result;

[0293] The second clustering submodule 5032 is used to select a periodic service from multiple services according to the flow table to obtain a periodic clustering result;

[0294] The acquisition submodule 5033 is used to acquire multiple first services and multiple second services from multiple services according to the domain name table, wherein the multiple first services refer to services that are accessed by multiple clients and have corresponding domain names, and the multiple second services include services that are accessed by multiple clients and have no corresponding domain names and services that are accessed by a single client;

[0295] The third clustering submodule 5034 is used to perform semantic relevance clustering on the multiple first services to obtain a semantic relevance clustering result;

[0296] The fourth clustering submodule 5035 is used to perform client similarity clustering on multiple second services to obtain client similarity clustering results;

[0297] The fusion submodule 5036 is used to fuse the time correlation clustering results, the periodicity clustering results, the semantic correlation clustering results and the client similarity clustering results to obtain multiple application types.

[0298] Optionally, the first clustering submodule 5031 is mainly used for:

[0299] According to the flow table, obtain the flow start time in the flow table entry where each service in the multiple services is located;

[0300] Determine the time difference between each two services in the plurality of services according to the obtained stream start time;

[0301] determining a time correlation between each two services in the plurality of services by determining the time difference;

[0302] According to the time correlation between every two services in the multiple services, select a service that meets the time correlation condition from the multiple services;

[0303] Generate a similarity matrix based on the temporal correlation between the selected services;

[0304] According to the similarity matrix, spectral clustering analysis is performed to determine spectral clustering results of multiple services;

[0305] Determine the similarity between every two services in the plurality of services according to the domain name table;

[0306] A time correlation clustering result is determined according to the similarity between every two services in the plurality of services and the spectral clustering result.

[0307] Optionally, the second clustering submodule 5032 is mainly used for:

[0308] For each of the multiple services, obtain flow start times of multiple data flows of the same client accessing the service according to the flow table;

[0309] Determine the time difference between the start times of each two adjacent data flows according to the sequence of the flow start times of the multiple data flows accessing the service;

[0310] Based on the determined time difference, determining whether the periodicity of the service is strongly periodic by Fourier transform;

[0311] If the periodicity of the service is strong periodicity, the service is determined to be a periodic service.

[0312] Optionally, the third clustering submodule 5034 is mainly used for:

[0313] Clustering the plurality of first services according to the semantic relevance of the domain names to obtain a plurality of first clustering results;

[0314] Based on the domain name similarities between the multiple first clustering results, the multiple first clustering results are merged to obtain multiple second clustering results;

[0315] According to the domain name semantic relevance between an unclustered service in the plurality of first services and each second clustering result, the unclustered service is clustered with the plurality of second clustering results to obtain a semantic relevance clustering result.

[0316] Optionally, the third clustering submodule 5034 is further used for:

[0317] Acquire multiple third services accessed by multiple clients and corresponding to unique domain names from the multiple first services, and acquire multiple fourth services accessed by multiple clients and corresponding to multiple domain names from the multiple first services;

[0318] Acquire mergeable domain names from the domain names corresponding to the plurality of fourth services, and merge the mergeable domain names to obtain a plurality of first domain names;

[0319] Remove numbers and symbols from each first domain name, and remove numbers and symbols from each domain name corresponding to the third service, to obtain multiple second domain names;

[0320] Clustering services corresponding to the multiple second domain names according to semantic relevance of the multiple second domain names;

[0321] According to the semantic relevance of the unmergeable domain names among the domain names corresponding to the plurality of fourth services, the services corresponding to the unmergeable domain names are clustered.

[0322] Optionally, the fourth clustering submodule 5035 is mainly used for:

[0323] determining an IP address of a client accessing each second service of the plurality of second services;

[0324] The multiple second services are clustered according to the intersection-and-union ratio of the IP addresses of the clients accessing each second service to obtain a client similarity clustering result.

[0325] Optionally, the determination module 504 is used to:

[0326] Divide the multiple application types into a first application group, a second application group, and a third application group, wherein each application type in the first application group includes a service with a corresponding domain name, each application type in the second application group includes a service with no corresponding domain name, and each application type in the third application group corresponds to an unclustered service;

[0327] Determine a label corresponding to each application type based on a domain name corresponding to a service included in each application type in the first application group;

[0328] A label corresponding to each application type in the second application group and the third application group is determined.

[0329] In an embodiment of the present application, the network device can obtain multiple services by analyzing the flow behavior characteristics of the flow table. Since each service is composed of an IP address and a port identifier, and an application can usually be composed of a group of services, after clustering the multiple services according to the flow table and the domain name table, multiple application types can be obtained, each application type includes multiple services, and each application type corresponds to an application. At this time, the label of each application type in the multiple application types can be determined, so that the application to which the data flow belongs can be identified through the label. It can be seen that the embodiment of the present application does not require a traffic feature database in the process of identifying the application, but can be identified based on the flow behavior characteristics. In this way, when a new application appears, the new application can be directly identified based on the IP address and port of the server accessed by the new application, thereby improving the recognition rate of the application.

[0330] The application identification device provided in the above embodiment only uses the division of the above functional modules as an example to illustrate application identification. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the application identification device provided in the above embodiment and the application identification method embodiment belong to the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.

[0331] Embodiments may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from one website site, computer, server, or data center to another website site, computer, server, or data center by wired or wireless means. The computer-readable storage medium may be any available medium that a computer can access, or a data storage device such as a server or data center that includes one or more available media integrated therein.

[0332] It should be understood that the "multiple" mentioned herein refers to two or more. In the description of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in order to facilitate the clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, the words "first", "second" and the like are used to distinguish between the same items or similar items with basically the same functions and effects. Those skilled in the art can understand that the words "first", "second" and the like do not limit the quantity and execution order, and the words "first", "second" and the like do not limit them to be necessarily different.

[0333] The above-mentioned embodiments are provided for the present application and are not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the principles of the present application shall be included in the protection scope of the present application.

Claims

1. An application identification method, It is characterized in that The method comprises: Extract features from the multiple data flows respectively to obtain a flow table and a domain name table, wherein the flow table includes multiple flow table items, each of the multiple flow table items includes a five-tuple and a flow start time, and the domain name table includes multiple domain name table items, each of the multiple domain name table items includes a source Internet Protocol IP address, a destination domain name, a destination IP address, and a domain name type; Analyze the flow behavior characteristics according to the flow table to obtain multiple services, each service consisting of an IP address and a port identifier; Clustering the multiple services according to the flow table and the domain name table to obtain multiple application types; A label corresponding to each of the multiple application types is determined, where the label is used to identify the application to which the data flow belongs.

2. The method according to claim 1, It is characterized in that The flow behavior characteristics are analyzed according to the flow table to obtain multiple services, including: Determine the port with loop according to the flow table, and obtain the loop port set; Based on the loop port set, determine a single-client access service set and a first multi-client access service set according to the flow table, wherein each service in the single-client access service set is accessed by a single client, an IP address and a port of the service belong to the same end, and the port does not belong to the loop port set; and each service in the first multi-client access service set is accessed by multiple clients, an IP address and a port of the service belong to the same end, and the port does not belong to the loop port set; Based on the loop port set and the first multi-client access service set, determining a second multi-client access service set according to the flow table, each service in the second multi-client access service set is accessed by multiple clients, the IP address and port of the service belong to different ends, and the port does not belong to the loop port set; The first multi-client access service set, the second multi-client access service set and the single-client access service set are combined to obtain the multiple services.

3. The method according to claim 2, It is characterized in that The determining, according to the flow table, a port having a loop includes: For each port in the flow table, obtaining a same-end IP address set and a peer IP address set of the port according to the flow table; Determine the intersection of the same-end IP address set and the opposite-end IP address set of the port to obtain multiple IP addresses; Determine, according to the flow table, a total number of data flows corresponding to the multiple IP addresses among all data flows passing through the port, and use the determined total number of flows as a first total number of flows; If the first total number of flows is greater than a first threshold, determining the total number of flows of all data flows passing through the port, and using the determined total number of flows as the second total number of flows; If the ratio between the first total number of flows and the second total number of flows is greater than a second threshold, the port is determined to be a port with a loop.

4. The method according to claim 2, It is characterized in that The determining, based on the loop port set and according to the flow table, a single-client access service set and a first multi-client access service set comprises: Determine, according to the flow table, services accessed by a single client and whose IP addresses and ports belong to the same end, and services accessed by multiple clients and whose IP addresses and ports belong to the same end, and obtain a single-client access potential service set and a first multi-client access potential service set; The services where the ports in the loop port set are located are filtered from the single-client access potential service set to obtain the single-client access service set, and the services where the ports in the loop port set are filtered from the first multi-client access potential service set to obtain the first multi-client access service set.

5. The method according to claim 4, It is characterized in that The determining, according to the flow table, services accessed by a single client and whose IP addresses and ports belong to the same end, and services accessed by multiple clients and whose IP addresses and ports belong to the same end, comprises: Determine multiple target services according to the flow table, each target service corresponds to an IP address and port belonging to the same end in a flow table entry, and each target service corresponds to multiple data flows; For each target service among the plurality of target services, determining whether a port of the target service is randomly generated; If the port of the target service is randomly generated, determining whether the number of same-side ports corresponding to the IP address of the target service is greater than a third threshold; If the number of same-side ports corresponding to the IP address of the target service is greater than the third threshold, determining whether the number of peer terminals corresponding to the target service is greater than a fourth threshold; If the number of peers corresponding to the target service is greater than the fourth threshold, determining that the target service is a service accessed by multiple clients and the IP address and port belong to the same end; If the number of peers corresponding to the target service is not greater than the fourth threshold, determining whether the peer IP address of the target service is unique; If the peer IP address of the target service is unique, it is determined that the target service is a service accessed by a single client and the IP address and port belong to the same end.

6. The method according to claim 5, It is characterized in that After determining whether the port of the target service is randomly generated, the method further includes: If the port of the target service is not randomly generated, it is determined that the target service is a service accessed by multiple clients and the IP address and port belong to the same end.

7. The method according to claim 5, It is characterized in that After determining whether the number of same-side ports corresponding to the IP address of the target service is greater than a third threshold, the method further includes: If the number of ports on the same side corresponding to the IP address of the target service is not greater than the third threshold, it is determined that the target service is a service accessed by multiple clients and the IP address and port belong to the same end.

8. The method according to claim 2, It is characterized in that The determining, based on the loop port set and the first multi-client access service set, according to the flow table, a second multi-client access service set comprises: Based on the first multi-client access service set, according to the flow table, determine services that are accessed by multiple clients and whose IP addresses and ports belong to different ends, and obtain a second multi-client access potential service set; The services where the ports in the loop port set are located are filtered from the second multi-client access potential service set to obtain the second multi-client access service set.

9. The method according to claim 8, It is characterized in that The determining, based on the first multi-client access service set and according to the flow table, services accessed by multiple clients and whose IP addresses and ports belong to different terminals, includes: Determine the IP addresses and ports in the same flow table entry and belonging to different ends in the flow table as a reference service to obtain multiple reference services; For each reference service of the plurality of reference services, determining whether the reference service corresponds to a plurality of data streams; If the reference service corresponds to multiple data streams, determining whether the port of the reference service is randomly generated; If the port of the reference service is not randomly generated, determining whether the port of the reference service is included in the first multi-client access service set; If the port of the reference service is not included in the first multi-client access service set, determining whether the IP address of the reference service is included in the source IP address of the domain name table; If the IP address of the reference service is not included in the source IP address of the domain name table, it is determined that the reference service is a service accessed by multiple clients and the IP addresses and ports belong to different ends.

10. The method according to any one of claims 1 to 9, It is characterized in that The clustering of the multiple services according to the flow table and the domain name table to obtain multiple application types includes: Performing time correlation clustering on the multiple services according to the flow table and the domain name table to obtain a time correlation clustering result; According to the flow table, a service with periodicity is selected from the multiple services to obtain a periodic clustering result; According to the domain name table, a plurality of first services and a plurality of second services are obtained from the plurality of services, wherein the plurality of first services refer to services that are accessed by multiple clients and have corresponding domain names, and the plurality of second services include services that are accessed by multiple clients and have no corresponding domain names and services that are accessed by a single client; Performing semantic relevance clustering on the multiple first services to obtain a semantic relevance clustering result; Performing client similarity clustering on the multiple second services to obtain a client similarity clustering result; The time correlation clustering result, the periodicity clustering result, the semantic correlation clustering result and the client similarity clustering result are integrated to obtain the multiple application types.

11. The method according to any one of claims 1 to 9, It is characterized in that The determining a label corresponding to each application type in the multiple application types includes: The multiple application types are divided into a first application group, a second application group and a third application group, wherein each application type in the first application group includes a service with a corresponding domain name, each application type in the second application group includes a service with no corresponding domain name, and each application type in the third application group corresponds to an unclustered service; Determine a label corresponding to each application type based on a domain name corresponding to a service included in each application type in the first application group; Determine a label corresponding to each application type in the second application group and the third application group.

12. An application identification device, It is characterized in that The device comprises: An extraction module is used to extract features from the multiple data flows respectively to obtain a flow table and a domain name table, wherein the flow table includes multiple flow table items, each of which includes a five-tuple and a flow start time, and the domain name table includes multiple domain name table items, each of which includes a source Internet Protocol IP address, a destination domain name, a destination IP address, and a domain name type; An analysis module, used for analyzing flow behavior characteristics according to the flow table to obtain multiple services, each service consisting of an IP address and a port identifier; A clustering module, used for clustering the multiple services according to the flow table and the domain name table to obtain multiple application types; The determination module is used to determine a label corresponding to each application type in the multiple application types, and the label is used to identify the application to which the data flow belongs.

13. The device according to claim 12, It is characterized in that The analysis module comprises: A first determination submodule, configured to determine a port with a loop according to the flow table, and obtain a loop port set; A second determination submodule is used to determine a single-client access service set and a first multi-client access service set based on the loop port set and according to the flow table, wherein each service in the single-client access service set is accessed by a single client, the IP address and port of the service belong to the same end, and the port does not belong to the loop port set; each service in the first multi-client access service set is accessed by multiple clients, the IP address and port of the service belong to the same end, and the port does not belong to the loop port set; A third determination submodule is configured to determine a second multi-client access service set according to the flow table based on the loop port set and the first multi-client access service set, wherein each service in the second multi-client access service set is accessed by multiple clients, the IP address and port of the service belong to different ends, and the port does not belong to the loop port set; The merging submodule is used to merge the first multi-client access service set, the second multi-client access service set and the single-client access service set to obtain the multiple services.

14. The device according to claim 13, It is characterized in that The first determination submodule is mainly used for: For each port in the flow table, obtaining a same-end IP address set and a peer IP address set of the port according to the flow table; Determine the intersection of the same-end IP address set and the opposite-end IP address set of the port to obtain multiple IP addresses; Determine, according to the flow table, a total number of data flows corresponding to the multiple IP addresses among all data flows passing through the port, and use the determined total number of flows as a first total number of flows; If the first total number of flows is greater than a first threshold, determining the total number of flows of all data flows passing through the port, and using the determined total number of flows as the second total number of flows; If the ratio between the first total number of flows and the second total number of flows is greater than a second threshold, the port is determined to be a port with a loop.

15. The device according to claim 13, It is characterized in that The second determination submodule is mainly used for: Determine, according to the flow table, services accessed by a single client and whose IP addresses and ports belong to the same end, and services accessed by multiple clients and whose IP addresses and ports belong to the same end, and obtain a single-client access potential service set and a first multi-client access potential service set; The services where the ports in the loop port set are located are filtered from the single-client access potential service set to obtain the single-client access service set, and the services where the ports in the loop port set are filtered from the first multi-client access potential service set to obtain the first multi-client access service set.

16. The device according to claim 15, It is characterized in that The second determining submodule is further used for: Determine multiple target services according to the flow table, each target service corresponds to an IP address and port belonging to the same end in a flow table entry, and each target service corresponds to multiple data flows; For each target service among the plurality of target services, determining whether a port of the target service is randomly generated; If the port of the target service is randomly generated, determining whether the number of same-side ports corresponding to the IP address of the target service is greater than a third threshold; If the number of same-side ports corresponding to the IP address of the target service is greater than the third threshold, determining whether the number of peer terminals corresponding to the target service is greater than a fourth threshold; If the number of peers corresponding to the target service is greater than the fourth threshold, determining that the target service is a service accessed by multiple clients and the IP address and port belong to the same end; If the number of peers corresponding to the target service is not greater than the fourth threshold, determining whether the peer IP address of the target service is unique; If the peer IP address of the target service is unique, it is determined that the target service is a service accessed by a single client and the IP address and port belong to the same end.

17. The device according to claim 16, It is characterized in that The second determining submodule is further used for: If the port of the target service is not randomly generated, it is determined that the target service is a service accessed by multiple clients and the IP address and port belong to the same end.

18. The device according to claim 16, It is characterized in that The second determining submodule is further used for: If the number of ports on the same side corresponding to the IP address of the target service is not greater than the third threshold, it is determined that the target service is a service accessed by multiple clients and the IP address and port belong to the same end.

19. The device according to claim 13, It is characterized in that The third determining submodule is used for: Based on the first multi-client access service set, according to the flow table, determine services that are accessed by multiple clients and whose IP addresses and ports belong to different ends, and obtain a second multi-client access potential service set; The services where the ports in the loop port set are located are filtered from the second multi-client access potential service set to obtain the second multi-client access service set.

20. The device according to claim 19, It is characterized in that The third determining submodule is further used for: Determine the IP addresses and ports in the same flow table entry and belonging to different ends in the flow table as a reference service to obtain multiple reference services; For each reference service of the plurality of reference services, determining whether the reference service corresponds to a plurality of data streams; If the reference service corresponds to multiple data streams, determining whether the port of the reference service is randomly generated; If the port of the reference service is not randomly generated, determining whether the port of the reference service is included in the first multi-client access service set; If the port of the reference service is not included in the first multi-client access service set, determining whether the IP address of the reference service is included in the source IP address of the domain name table; If the IP address of the reference service is not included in the source IP address of the domain name table, it is determined that the reference service is a service accessed by multiple clients and the IP addresses and ports belong to different ends.

21. The device according to any one of claims 12 to 20, It is characterized in that The clustering module comprises: A first clustering submodule, configured to perform time correlation clustering on the multiple services according to the flow table and the domain name table to obtain a time correlation clustering result; A second clustering submodule, configured to select a periodic service from the plurality of services according to the flow table, and obtain a periodic clustering result; an acquisition submodule, configured to acquire, from the plurality of services, a plurality of first services and a plurality of second services according to the domain name table, wherein the plurality of first services refer to services accessed by multiple clients and having corresponding domain names, and the plurality of second services include services accessed by multiple clients and having no corresponding domain names and services accessed by a single client; A third clustering submodule, configured to perform semantic relevance clustering on the plurality of first services to obtain a semantic relevance clustering result; A fourth clustering submodule, configured to perform client similarity clustering on the plurality of second services to obtain a client similarity clustering result; A fusion submodule is used to fuse the time correlation clustering result, the periodicity clustering result, the semantic correlation clustering result and the client similarity clustering result to obtain the multiple application types.

22. The device according to any one of claims 12 to 20, It is characterized in that The determination module is used for: The multiple application types are divided into a first application group, a second application group and a third application group, wherein each application type in the first application group includes a service with a corresponding domain name, each application type in the second application group includes a service with no corresponding domain name, and each application type in the third application group corresponds to an unclustered service; Determine a label corresponding to each application type based on a domain name corresponding to a service included in each application type in the first application group; Determine a label corresponding to each application type in the second application group and the third application group.

23. A computer-readable storage medium, It is characterized in that The storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method described in any one of claims 1 to 11 are implemented.

Citation Information

Patent Citations

  • SCTP (Stream Control Transmission Protocol) message identification method and device

    CN101873259A

  • Application identification method, data mining method, device and system

    CN103051725A

  • Application type recognition method and network equipment

    CN103297270A

  • Internet application traffic identification system and method

    CN107426063A

  • APP traffic automatic recognition model construction model

    CN108650195A