Application relationship analysis method, system, device and medium based on network traffic

By performing packet filtering, deduplication and aggregation processing on network traffic, it solves the problems of difficulty in analyzing traffic packets and large data volume in traditional network operation and maintenance, achieves efficient analysis and identification of network traffic, and reduces the cost of operation and maintenance. Cost and operational complexity.

CN115914022BActive Publication Date: 2024-09-20SHANXI HELI INNOVATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211466484.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-22
Publication Date
2024-09-20
Estimated Expiration
2042-11-22

AI Technical Summary

Technical Problem

In the existing technology, the method of analyzing traffic data packets in traditional network operation and maintenance work is difficult to operate, and can only capture and analyze a small amount of traffic, making it inconvenient to analyze large amounts of data.

Method used

Provide application relationship analysis methods based on network traffic, including monitoring network traffic information, packet filtering, deduplication and aggregation processing, reducing the pressure of real-time transmission of data, and importing aggregated data into the database for persistence and analysis, identifying protocol types, Application types and unknown applications, obtain traffic proportion and ranking.

Benefits of technology

Through data packet filtering, deduplication and aggregation processing, the difficulty of operation is reduced, convenient analysis of large amounts of data is realized, the pressure of real-time transmission of data is reduced, and the efficiency and practicality of analysis are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115914022B
    Figure CN115914022B
Patent Text Reader

Abstract

The embodiments of the present application provide an application relationship analysis method, system, device and medium based on network traffic, including: S10, monitoring network traffic information and collecting it; S20, performing data packet filtering, data packet deduplication and data packet aggregation processing on the collected traffic data to obtain traffic aggregation data; S30, importing the traffic aggregation data into a database for persistence, and using it as basic data for application relationship analysis; S40, performing protocol type identification and statistics, application identification and statistics, and identification and statistics of unknown applications on the data in the database; obtaining the traffic proportion of the protocol type, the traffic ranking of the specified application name or application type, and the statistics and marking of unknown applications within a specified time range; it can effectively reduce the difficulty of operation and is suitable for the computer field.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computers, and in particular to a method, system, device and medium for analyzing application relationships based on network traffic. Background Art

[0002] With the continuous development of computer technology, computer networks have become an important feature of the information age. Information technology characterized by computer and network communication technology has been widely used in various fields. For example, combining information technology with operation and maintenance work can greatly improve the convenience of equipment operation and maintenance work.

[0003] In the related technology, data transmission in computer networks is transmitted in the form of data packets. The method used to analyze traffic data packets in traditional network operation and maintenance work is: use packet capture software to capture packets, and then export the packets for analysis through packet capture and analysis software. The operation is difficult and requires high quality of operation and maintenance personnel. Only a small amount of traffic can be captured and analyzed, which is not convenient for analyzing large amounts of data. Summary of the invention

[0004] In order to solve one of the above-mentioned technical defects, the embodiments of the present application provide an application relationship analysis method, system, device and medium based on network traffic, which can reduce the pressure of large amounts of real-time data transmission and effectively reduce the difficulty of operation.

[0005] According to a first aspect of an embodiment of the present application, a method for analyzing application relationships based on network traffic is provided, comprising the following steps:

[0006] S10, monitoring and collecting network traffic information;

[0007] S20, performing data packet filtering, data packet deduplication and data packet aggregation processing on the collected traffic data to obtain traffic aggregation data;

[0008] S30, importing the traffic aggregation data into a database for persistence, and using it as basic data for application relationship analysis;

[0009] S40, perform protocol type identification and statistics, application identification and statistics, and unknown application identification and statistics on the data in the database; obtain the traffic proportion of the protocol type, the traffic ranking of the specified application name or application type, and the statistics and marking of unknown applications within a specified time range.

[0010] According to a second aspect of an embodiment of the present application, a network traffic-based application relationship analysis system is provided, including:

[0011] Collection module, used to monitor and collect network traffic information;

[0012] The data processing module is used to perform data packet filtering, data packet deduplication and data packet aggregation processing on the collected traffic data to obtain traffic aggregation data;

[0013] The storage module imports traffic aggregation data into the database for persistence and uses it as the basic data for application relationship analysis;

[0014] The analysis module identifies and counts the protocol types, applications, and unknown applications in the database; obtains the traffic proportion of the protocol type, the traffic ranking of the specified application name or application type, and the statistics and marking of unknown applications within a specified time range.

[0015] According to a third aspect of an embodiment of the present application, there is provided an electronic device, including:

[0016] Memory;

[0017] Processor; and

[0018] Computer programs;

[0019] The computer program is stored in the memory and is configured to be executed by the processor to implement the application relationship analysis method based on network traffic as described above.

[0020] According to a fourth aspect of an embodiment of the present application, a computer-readable storage medium is provided, on which a computer program is stored; the computer program is executed by a processor to implement the application relationship analysis method based on network traffic as described above.

[0021] The technical solution provided in the embodiments of the present application has the following technical effects:

[0022] In this application, by performing packet filtering, packet deduplication and packet aggregation processing on the collected traffic data, traffic aggregation data is obtained, which reduces the pressure of large amounts of real-time data transmission, facilitates data analysis at a lower cost, and is extremely practical. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0024] Figure 1 A flowchart of an application relationship analysis method based on network traffic provided in an embodiment of the present application;

[0025] Figure 2 This is a flow chart of step S20 in the embodiment of the present application;

[0026] Figure 3 This is a flow chart of step S204 in the embodiment of the present application;

[0027] Figure 4 This is a flow chart of step S205 in the embodiment of the present application;

[0028] Figure 5 This is a flow chart of step S40 in the embodiment of the present application;

[0029] Figure 6 This is a schematic diagram of the mapping relationship between the blacklist and the whitelist in the embodiment of the present application;

[0030] Figure 7 A schematic diagram of the structure of an application relationship analysis system based on network traffic provided in an embodiment of the present application;

[0031] In the figure:

[0032] 10 is a collection module, 20 is a data processing module, 30 is a storage module, and 40 is an analysis module. DETAILED DESCRIPTION

[0033] In order to make the technical solutions and advantages in the embodiments of the present application more clearly understood, the exemplary embodiments of the present application are further described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than an exhaustive list of all the embodiments. It should be noted that the embodiments in the present application and the features in the embodiments can be combined with each other without conflict.

[0034] In the process of implementing the present application, the inventors found that the prior art can only capture and analyze a small amount of traffic through packet capture and analysis software, which is not convenient for analyzing large amounts of data.

[0035] In view of this, the embodiments of the present application provide a method, system, device and medium for analyzing application relationships based on network traffic, which can alleviate the pressure of large amounts of real-time data transmission.

[0036] The technical solution of the present application is described below through specific embodiments.

[0037] Embodiment 1

[0038] like Figure 1 As shown, the application relationship analysis method based on network traffic includes the following steps:

[0039] S10, monitoring and collecting network traffic information;

[0040] S20, performing data packet filtering, data packet deduplication and data packet aggregation processing on the collected traffic data to obtain traffic aggregation data;

[0041] S30, importing the traffic aggregation data into a database for persistence, and using it as basic data for application relationship analysis;

[0042] S40, perform protocol type identification and statistics, application identification and statistics, and unknown application identification and statistics on the data in the database; obtain the traffic proportion of the protocol type, the traffic ranking of the specified application name or application type, and the statistics and marking of unknown applications within a specified time range.

[0043] In this embodiment, the network traffic information is monitored and collected by mirroring the traffic of the network device to the specified network card of the collection server. Specifically, the pcap4j tool library is used to build a traffic collection probe service based on the Java language, and the server network card is monitored to capture the data packets, thereby collecting the traffic data.

[0044] In this application, traffic aggregation data is obtained by performing packet filtering, packet deduplication and packet aggregation processing on the collected traffic data, thereby solving the pressure of large amounts of real-time data transmission, facilitating data analysis at a lower cost, and achieving the purpose of automated collection and analysis of traffic data.

[0045] like Figure 2 As shown, in step S20, the collected traffic data is subjected to data packet filtering, data packet deduplication and data packet aggregation processing, including:

[0046] S201, determine whether the collected data is a data packet of a specified protocol type, if yes, execute step S202, otherwise, filter out the data packet;

[0047] S202, extracting data packet information and obtaining field information to be analyzed;

[0048] S203, putting the extracted data packet information into a queue of messages to be processed;

[0049] S204, extracting data packet information from the to-be-processed message queue, deduplicating the data packets within a specified time range using data packet fingerprints, filtering out duplicate data packets, and adding the filtered data packets to a deduplication result queue;

[0050] S205, performing aggregation operation on the data packets in the deduplication result queue to obtain traffic aggregation data;

[0051] The field information to be analyzed includes: field information required for data packet deduplication and data packet aggregation.

[0052] In this embodiment, the step S201 determines whether the collected data is a data packet of a specified protocol type, and the specified protocol type may be: TCP protocol, UDP protocol.

[0053] Specifically, Figure 3 As shown, the step S204 includes:

[0054] S2041, initializing the global data packet fingerprint object delay queue;

[0055] The global data packet fingerprint object delay queue is used to temporarily store data packet fingerprint pairs and to control the expiration time when deduplicating data packet fingerprint objects;

[0056] S2042, initializing a task thread for cleaning a global data packet fingerprint queue to clean up expired cache tasks.

[0057] S2043, initializing a global data packet fingerprint cache container;

[0058] The data packet fingerprint cache container is a key-value structure, the key is the data packet fingerprint object, and the value is a fixed null value;

[0059] S2044, monitoring the data packets in the data packet fingerprint queue, if no data packets are monitored, continue to monitor in a loop; otherwise, execute step S2045;

[0060] S2045, pulling a data packet from the data packet fingerprint queue, packaging the data packet fingerprint object, and extracting fingerprint object information from the data packet;

[0061] The data packet fingerprint object information includes: source / destination IP, source / destination port number, protocol type, payload hash, IP checksum, UDP datagram length, UDP checksum, TCP ACK sequence number, TCP SEQ sequence number, TCPFLAG information, and data packet length;

[0062] S2046, check whether the key set of the data packet fingerprint cache container contains the fingerprint object of the current data packet, if so, filter out duplicate data packets, otherwise, store the data packet fingerprint cache object as the key and the value as a fixed null value in the fingerprint cache container;

[0063] S2047, setting a delay time, adding the data packet fingerprint object to the fingerprint object delay queue; and adding the filtered duplicate data packet to the deduplication result queue;

[0064] The delay time is in milliseconds and is generally set to 200;

[0065] S2048, clearing the global data packet fingerprint cache container task is running; including:

[0066] S2048-1, determining whether the residence time of the fingerprint object in the fingerprint object delay queue exceeds the set delay time, if so, executing step S2048-2, otherwise, continuing to determine whether the residence time of the fingerprint object in the fingerprint object delay queue exceeds the set delay time;

[0067] S2048-2, pull out the fingerprint object, and use the fingerprint object as the key to delete the corresponding record from the fingerprint cache container.

[0068] After the task is initialized, the data packet fingerprint cache container will remain in operation; determine whether the fingerprint object in the fingerprint object delay queue stays for more than the delay time (delay). If it does not exceed the delay time, continue to loop to check whether the fingerprint object stays for more than the delay, otherwise pull out the fingerprint object; use the fingerprint object as the key to delete the corresponding record from the fingerprint object cache container to achieve data packet deduplication based on the time range.

[0069] In this embodiment, in the above-mentioned process of collecting network traffic information, the traffic of multiple transit devices may be mirrored, and there will be duplication of data packets, and the duplicate data packets need to be deduplicated; the deduplication process can be: actively pulling data packet information from the pending message queue, and deduplicating the time range through data packet fingerprints according to a specified time period (such as 200ms); and solving data deduplication within a specified time range by using a delay queue and a thread-safe hash table.

[0070] In this embodiment, due to the large amount of traffic data, the unified calculation of real-time transmission of traffic packet data has high requirements on software and hardware, so local aggregation calculation is used to reduce data transmission.

[0071] like Figure 4 As shown, the step S205 includes:

[0072] S2051, setting a global variable container switch value; the global variable container switch is used to control the switching use of two cache containers so that the two cache containers are used alternately;

[0073] S2052, start the timing task so that the result export task is executed once in each timing period;

[0074] S2053, monitoring the data packets in the deduplication result queue, if no data packets are monitored, continue to monitor in a loop; otherwise, execute step S2054;

[0075] S2054, pull the data packet in the deduplication result queue and extract the grouping KEY of the data packet;

[0076] Among them, the grouping KEY is based on the combination of source / destination IP, destination port number, and protocol type;

[0077] S2055, determining the switch value of the global variable container, if the switch value is 1, selecting cache container A as the current computing container, otherwise, selecting cache container B as the current computing container;

[0078] S2056, determining whether the grouping key of the current data packet exists in the selected cache container, and if so, taking out the cache value corresponding to the grouping key, wherein the cache value includes: the number of data packets and the length of the data packet; and adding 1 to the number of data packets corresponding to the cache value, and adding the length of the data packet corresponding to the cache value to the length of the data packet of the current data packet; otherwise, counting the number of data packets as 1, and counting the length of the data packet as the data length of the current data packet;

[0079] S2057, save the calculated number of data packets and the length of data packets into the current cache calculation container according to the KEY-value structure; wherein KEY is the grouping KEY, and value is the number of data packets and the length of data packets;

[0080] S2058, executes scheduled tasks, including:

[0081] S2058-1, determine whether the preset task cycle has been reached, if so, execute step S2058-2, otherwise, continue to determine whether the preset task cycle has been reached;

[0082] S2058-2, determine whether the global variable container switch value is s=1, if so, modify the switch value to s=0, otherwise, modify the switch value to s=1;

[0083] S2058-3, determine the current global container switching switch value, if S=1, then copy the cache container B data; otherwise, copy the cache container A data;

[0084] S2058-4, clear the data in the copied cache container;

[0085] S2058-5, sort out the copied cache data to obtain traffic aggregation data.

[0086] In this embodiment, due to the large amount of traffic data, the real-time transmission of traffic packet data for unified calculation places high requirements on software and hardware. Therefore, this application uses local group aggregation operations to reduce data transmission; through data grouping, the aggregation operation results within a period of time (such as: 10 minutes) are exported to form 10-minute aggregate data, and the traffic aggregation statistics are aggregated every 10 minutes.

[0087] Specifically, the combination of source / destination IP, destination port number, and protocol type can be used as the grouping key to group the traffic data, and the number and length of data packets can be accumulated according to the grouping key. The local calculation results can be exported every 10 minutes using a timer, and the aggregated results can be sent to the message middleware regularly. After that, the intermediate calculation result cache is cleared, and the calculation process is switched to the next round, and the calculation is repeated over and over again.

[0088] In this application, the traffic aggregation data is imported into the database for persistence by periodically sending the aggregation results to the message middleware, and used as the basic data for application relationship analysis; wherein, the aggregated traffic data can be partitioned and saved based on time in the database.

[0089] Embodiment 2

[0090] like Figure 5 As shown, the application relationship analysis method based on network traffic, the step S40 includes:

[0091] S401, reading a piece of data in a database;

[0092] S402, determining whether the current data specifies a time range, if so, assigning a value to the specified time range of the data, otherwise, the time range of the data is empty;

[0093] S403, determining whether an application type is specified for the current data, if so, obtaining pre-configured blacklist and whitelist information, otherwise, there is no need to obtain pre-configured blacklist and whitelist information;

[0094] S404, obtaining application information corresponding to the current data according to the blacklist and whitelist information;

[0095] Execute steps S401 to S404 in a loop to obtain application information of all data;

[0096] S405, in response to the user's protocol statistics request, executing protocol statistics of all data to obtain the traffic proportion of the protocol type;

[0097] S406, in response to the user's application statistics request, executing application statistics of all data, obtaining the traffic ranking of the specified application name or application type; and obtaining the traffic proportion of unknown applications;

[0098] S407, in response to the user's application data statistics request, execute application data statistics of all data, group applications of the same port and the same protocol type according to the current time range parameter and application type parameter, count the traffic size of the applications in the group, and sort them according to the traffic size.

[0099] In this embodiment, by executing protocol statistics, the TCP / UDP flow data size ratio of the corresponding application name or type within a specified time range is obtained according to the protocol type (such as TCP, UDP), so as to facilitate filtering and screening normal and abnormal traffic; and provide data support for subsequent application analysis;

[0100] By executing application statistics requests, traffic ranking data of the specified time range and specified application type (blacklist / whitelist) can be obtained according to the application name. Combined with the blacklist and whitelist mapping relationship, traffic can be tagged with application tags to display application information and classify tags (known whitelist applications, blacklist applications, unknown applications Unknown_App); at the same time, the traffic proportion of each application can be displayed; the display of traffic rankings is conducive to operation and maintenance personnel to follow up on abnormal network traffic trends;

[0101] By executing application data statistics, you can group applications of the same port and protocol type according to the current time range parameter and application type parameter (if the application type is not empty, you need to obtain the port and protocol type data of the corresponding application type for screening), count the traffic size of the applications in the group, and sort them according to the traffic size; the sorting here is different from the traffic ranking in the application statistics request in that:

[0102] The applications in the application data statistics include unknown applications, and the unknown applications are displayed one by one; while the application statistics request gathers all unknown applications together; in this embodiment, through the display of application detail data, the IP, protocol type, and service port number corresponding to the unknown application can be discovered, which facilitates the continuous improvement of unknown applications through marking and improves the recognition rate of unknown applications.

[0103] This application analyzes the traffic proportion of different protocol types (TCP / UDP), perceives the traffic ranking proportion of applications, and analyzes the detailed data of application traffic; thereby realizing the perception of protocol proportion, overall application traffic ranking, and abnormal traffic situation, and realizing detailed analysis of application data and perfect application traffic labeling.

[0104] like Figure 6 As shown, in this embodiment, in step S403, the pre-configured black and white list information includes:

[0105] The application name, port number, and application protocol name are mapped to form mapping information of blacklist applications and mapping information of whitelist applications respectively;

[0106] The mapping relationship is as follows: a unique identifier is generated through the port number and the application protocol name, the unique identifier is used as the key value Key, and the corresponding application name is used as the VALUE information.

[0107] In addition, in order to improve the work efficiency of operation and maintenance personnel, black and white lists can be maintained regularly to identify abnormal traffic trends, making it easier for operation and maintenance personnel to perceive traffic changes.

[0108] In addition, in this application, you can also narrow the data query scope, respond quickly, and do refined queries according to the blacklist and whitelist application mapping relationship by setting application name retrieval conditions, application type (normal, abnormal IP) filtering, etc., compared with traditional full data retrieval; if application type (normal, abnormal IP) filtering is set, using the blacklist and whitelist mapping relationship, you can also do refined queries to improve query efficiency.

[0109] like Figure 7 As shown, based on the same concept, the embodiment of the present application also provides an application relationship analysis system based on network traffic, including:

[0110] The collection module 10 is used to monitor and collect network traffic information;

[0111] The data processing module 20 is used to perform data packet filtering, data packet deduplication and data packet aggregation processing on the collected traffic data to obtain traffic aggregation data;

[0112] The storage module 30 imports the traffic aggregation data into the database for persistence and uses it as the basic data for application relationship analysis;

[0113] The analysis module 40 performs protocol type identification and statistics, application identification and statistics, and unknown application identification and statistics on the data in the database; obtains the traffic proportion of the protocol type, the traffic ranking of the specified application name or application type, and the statistics and marking of unknown applications within a specified time range.

[0114] Among them, the method and the system are based on the same inventive concept. Since the principles of solving problems by the method and the system are similar, the implementation of the system and the method can refer to each other, and the repeated parts will not be repeated.

[0115] The present application also provides an electronic device, including:

[0116] Memory;

[0117] Processor; and

[0118] Computer programs;

[0119] The computer program is stored in the memory and is configured to be executed by the processor to implement the application relationship analysis method based on network traffic as described above.

[0120] An embodiment of the present application also provides a computer-readable storage medium on which a computer program is stored; the computer program is executed by a processor to implement the application relationship analysis method based on network traffic as described above.

[0121] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of complete hardware embodiments, complete software embodiments, or embodiments in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code. The scheme in the embodiments of the present application can be implemented in various computer languages, for example, C language, VHDL language, Verilog language, object-oriented programming language Java and literal scripting language JavaScript, etc.

[0122] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0123] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0124] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0125] Although the preferred embodiments of the present application have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.

[0126] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims

1. The application relationship analysis method based on network traffic is characterized by: The following steps are involved: S10, monitoring and collecting network traffic information; S20, performing data packet filtering, data packet deduplication and data packet aggregation processing on the collected traffic data to obtain traffic aggregation data; In step S20, the collected traffic data is subjected to data packet filtering, data packet deduplication and data packet aggregation processing, including: S201, determine whether the collected data is a data packet of a specified protocol type, if yes, execute step S202, otherwise, filter out the data packet; S202, extracting data packet information and obtaining field information to be analyzed; S203, putting the extracted data packet information into a queue of messages to be processed; S204, extracting data packet information from the to-be-processed message queue, deduplicating the data packets within a specified time range using data packet fingerprints, filtering out duplicate data packets, and adding the filtered data packets to a deduplication result queue; S205, performing aggregation operation on the data packets in the deduplication result queue to obtain traffic aggregation data; The field information to be analyzed includes: field information required for data packet deduplication and data packet aggregation; The step S204 includes: S2041, initializing the global data packet fingerprint object delay queue; S2042, initializing a task thread for cleaning a global data packet fingerprint queue; S2043, initializing a global data packet fingerprint cache container; The data packet fingerprint cache container is a key-value structure, the key is the data packet fingerprint object, and the value is a fixed null value; S2044, monitoring the data packets in the data packet fingerprint queue, if no data packets are monitored, continue to monitor in a loop; otherwise, execute step S2045; S2045, pulling a data packet from the data packet fingerprint queue, packaging the data packet fingerprint object, and extracting fingerprint object information from the data packet; The data packet fingerprint object information includes: source / destination IP, source / destination port number, protocol type, payload hash, IP checksum, UDP datagram length, UDP checksum, TCP ACK sequence number, TCP SEQ sequence number, TCPFLAG information, and data packet length; S2046, check whether the key set of the data packet fingerprint cache container contains the fingerprint object of the current data packet, if so, filter out duplicate data packets, otherwise, store the data packet fingerprint cache object as the key and the value as a fixed null value in the fingerprint cache container; S2047, setting a delay time, adding the data packet fingerprint object to the fingerprint object delay queue; and adding the filtered duplicate data packet to the deduplication result queue; S2048, clearing the global data packet fingerprint cache container task is running; including: S2048-1, determining whether the residence time of the fingerprint object in the fingerprint object delay queue exceeds the set delay time, if so, executing step S2048-2, otherwise, continuing to determine whether the residence time of the fingerprint object in the fingerprint object delay queue exceeds the set delay time; S2048-2, pull out the fingerprint object, and use the fingerprint object as the key to delete the corresponding record from the fingerprint cache container; The step S205 includes: S2051, setting a global variable container switch value; the global variable container switch is used to control the switching use of two cache containers so that the two cache containers are used alternately; S2052, start the timing task so that the result export task is executed once in each timing period; S2053, monitoring the data packets in the deduplication result queue, if no data packets are monitored, continue to monitor in a loop; otherwise, execute step S2054; S2054, pull the data packet in the deduplication result queue and extract the grouping KEY of the data packet; Among them, the grouping KEY is based on the combination of source / destination IP, destination port number, and protocol type; S2055, determining the switch value of the global variable container, if the switch value is 1, selecting cache container A as the current computing container, otherwise, selecting cache container B as the current computing container; S2056, determining whether the grouping key of the current data packet exists in the selected cache container, and if so, taking out the cache value corresponding to the grouping key, wherein the cache value includes: the number of data packets and the length of the data packet; and adding 1 to the number of data packets corresponding to the cache value, and adding the length of the data packet corresponding to the cache value to the length of the data packet of the current data packet; otherwise, counting the number of data packets as 1, and counting the length of the data packet as the data length of the current data packet; S2057, save the calculated number of data packets and the length of data packets into the current cache calculation container according to the KEY-value structure; wherein KEY is the grouping KEY, and value is the number of data packets and the length of data packets; S2058, executes scheduled tasks, including: S2058-1, determine whether the preset task cycle has been reached, if so, execute step S2058-2, otherwise, continue to determine whether the preset task cycle has been reached; S2058-2, determine whether the global variable container switch value is s=1, if so, modify the switch value to s=0, otherwise, modify the switch value to s=1; S2058-3, determine the current global container switching switch value, if S=1, then copy the cache container B data; otherwise, copy the cache container A data; S2058-4, clear the data in the copied cache container; S2058-5, sorting the copied cache data to obtain traffic aggregation data; S30, importing the traffic aggregation data into a database for persistence, and using it as basic data for application relationship analysis; S40, perform protocol type identification and statistics, application identification and statistics, and unknown application identification and statistics on the data in the database; obtain the traffic proportion of the protocol type, the traffic ranking of the specified application name or application type, and the statistics and marking of unknown applications within a specified time range.

2. The method for analyzing application relationships based on network traffic according to claim 1, characterized in that: The step S40 includes: S401, reading a piece of data in a database; S402, determining whether the current data specifies a time range, if so, assigning a value to the specified time range of the data, otherwise, the time range of the data is empty; S403, determining whether an application type is specified for the current data, if so, obtaining pre-configured blacklist and whitelist information, otherwise, there is no need to obtain pre-configured blacklist and whitelist information; S404, obtaining application information corresponding to the current data according to the blacklist and whitelist information; Execute steps S401 to S404 in a loop to obtain application information of all data; S405, in response to the user's protocol statistics request, executing protocol statistics of all data to obtain the traffic proportion of the protocol type; S406, in response to the user's application statistics request, executing application statistics of all data, obtaining the traffic ranking of the specified application name or application type; and obtaining the traffic proportion of unknown applications; S407, in response to the user's application data statistics request, execute application data statistics of all data, group applications of the same port and the same protocol type according to the current time range parameter and application type parameter, count the traffic size of the applications in the group, and sort them according to the traffic size.

3. The method for analyzing application relationships based on network traffic according to claim 2, characterized in that: In step S403, the pre-configured blacklist and whitelist information includes: The application name, port number, and application protocol name are mapped to form mapping information of blacklist applications and mapping information of whitelist applications respectively; The mapping relationship is as follows: a unique identifier is generated through the port number and the application protocol name, the unique identifier is used as the key value Key, and the corresponding application name is used as the VALUE information.

4. The application relationship analysis system based on network traffic is characterized by: include: A collection module (10), used for monitoring and collecting network traffic information; A data processing module (20) is used to perform data packet filtering, data packet deduplication and data packet aggregation processing on the collected traffic data to obtain traffic aggregation data; include: S201, determine whether the collected data is a data packet of a specified protocol type, if yes, execute step S202, otherwise, filter out the data packet; S202, extracting data packet information and obtaining field information to be analyzed; S203, putting the extracted data packet information into a queue of messages to be processed; S204, extracting data packet information from the to-be-processed message queue, deduplicating the data packets within a specified time range using data packet fingerprints, filtering out duplicate data packets, and adding the filtered data packets to a deduplication result queue; S205, performing aggregation operation on the data packets in the deduplication result queue to obtain traffic aggregation data; The field information to be analyzed includes: field information required for data packet deduplication and data packet aggregation; The step S204 includes: S2041, initializing the global data packet fingerprint object delay queue; S2042, initializing a task thread for cleaning a global data packet fingerprint queue; S2043, initializing a global data packet fingerprint cache container; The data packet fingerprint cache container is a key-value structure, the key is the data packet fingerprint object, and the value is a fixed null value; S2044, monitoring the data packets in the data packet fingerprint queue, if no data packets are monitored, continue to monitor in a loop; otherwise, execute step S2045; S2045, pulling a data packet from the data packet fingerprint queue, packaging the data packet fingerprint object, and extracting fingerprint object information from the data packet; The data packet fingerprint object information includes: source / destination IP, source / destination port number, protocol type, payload hash, IP checksum, UDP datagram length, UDP checksum, TCP ACK sequence number, TCP SEQ sequence number, TCPFLAG information, and data packet length; S2046, check whether the key set of the data packet fingerprint cache container contains the fingerprint object of the current data packet, if so, filter out duplicate data packets, otherwise, store the data packet fingerprint cache object as the key and the value as a fixed null value in the fingerprint cache container; S2047, setting a delay time, adding the data packet fingerprint object to the fingerprint object delay queue; and adding the filtered duplicate data packet to the deduplication result queue; S2048, clearing the global data packet fingerprint cache container task is running; including: S2048-1, determining whether the residence time of the fingerprint object in the fingerprint object delay queue exceeds the set delay time, if so, executing step S2048-2, otherwise, continuing to determine whether the residence time of the fingerprint object in the fingerprint object delay queue exceeds the set delay time; S2048-2, pull out the fingerprint object, and use the fingerprint object as the key to delete the corresponding record from the fingerprint cache container; The step S205 includes: S2051, setting a global variable container switch value; the global variable container switch is used to control the switching use of two cache containers so that the two cache containers are used alternately; S2052, start the timing task so that the result export task is executed once in each timing period; S2053, monitoring the data packets in the deduplication result queue, if no data packets are monitored, continue to monitor in a loop; otherwise, execute step S2054; S2054, pull the data packet in the deduplication result queue and extract the grouping KEY of the data packet; Among them, the grouping KEY is based on the combination of source / destination IP, destination port number, and protocol type; S2055, determining the switch value of the global variable container, if the switch value is 1, selecting cache container A as the current computing container, otherwise, selecting cache container B as the current computing container; S2056, determining whether the grouping key of the current data packet exists in the selected cache container, and if so, taking out the cache value corresponding to the grouping key, wherein the cache value includes: the number of data packets and the length of the data packet; and adding 1 to the number of data packets corresponding to the cache value, and adding the length of the data packet corresponding to the cache value to the length of the data packet of the current data packet; otherwise, counting the number of data packets as 1, and counting the length of the data packet as the data length of the current data packet; S2057, save the calculated number of data packets and the length of data packets into the current cache calculation container according to the KEY-value structure; wherein KEY is the grouping KEY, and value is the number of data packets and the length of data packets; S2058, executes scheduled tasks, including: S2058-1, determine whether the preset task cycle has been reached, if so, execute step S2058-2, otherwise, continue to determine whether the preset task cycle has been reached; S2058-2, determine whether the global variable container switch value is s=1, if so, modify the switch value to s=0, otherwise, modify the switch value to s=1; S2058-3, determine the current global container switching switch value, if S=1, then copy the cache container B data; otherwise, copy the cache container A data; S2058-4, clear the data in the copied cache container; S2058-5, sorting the copied cache data to obtain traffic aggregation data; The storage module (30) imports the traffic aggregation data into the database for persistence and uses it as the basic data for application relationship analysis; The analysis module (40) performs protocol type identification and statistics, application identification and statistics, and unknown application identification and statistics on the data in the database; obtains the traffic proportion of the protocol type, the traffic ranking of the specified application name or application type, and the statistics and marking of unknown applications within a specified time range.

5. An electronic device, characterized in that: include: Memory; processor; as well as Computer programs; The computer program is stored in the memory and is configured to be executed by the processor to implement the network traffic-based application relationship analysis method as described in any one of claims 1 to 3.

6. A computer-readable storage medium, characterized in that: A computer program is stored thereon; the computer program is executed by a processor to implement the application relationship analysis method based on network traffic as described in any one of claims 1 to 3.