Local and central combined network traffic situation awareness method

By capturing traffic information at the SDN switch and transmitting it to the controller for integration, it solves the problems of low accuracy and high bandwidth consumption in the existing technology, achieves efficient network traffic situational awareness in the air defense and anti-missile tactical communication network, and improves Management and security.

CN118631744APending Publication Date: 2024-09-10AIR FORCE UNIV PLA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410684238.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-30
Publication Date
2024-09-10

AI Technical Summary

Technical Problem

Existing network traffic situational awareness methods have problems such as low accuracy, high bandwidth consumption, and inability to monitor network conditions in real time in data centers. This is especially difficult to meet the needs of air defense and anti-missile tactical communication networks.

Method used

Using a network traffic situational awareness method that combines local and central services, global data awareness is achieved by capturing traffic information at SDN switches and generating traffic summaries, which are then transmitted to the SDN controller for integration.

Benefits of technology

It enables a more refined and real-time understanding of network traffic trends without occupying too much bandwidth, improves network management efficiency and security, reduces traffic overhead, and supports a variety of measurement applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118631744A
    Figure CN118631744A
Patent Text Reader

Abstract

The invention discloses a local and central combined network traffic situation awareness method, which belongs to the technical field of computer networks, and comprises the following steps of: S1, recording and storing the packet number and the traffic size of each traffic in network traffic data packets forwarded by a plurality of switches to obtain traffic information; s2, reading the traffic information stored in the step S1, generating a traffic digest message, and sending the traffic digest message; and S3, receiving, recording and storing the traffic digest message sent in the step S2 to obtain traffic information of the plurality of switches, namely, completing network traffic situation awareness. According to the method, local data merging and central global data integration are combined, so that the limitation of a traditional method is overcome, the flow sensing sensitivity is ensured on the premise of not occupying excessive bandwidth, the situation of network flow can be known more comprehensively and more timely, and more refined management and optimization of the network are realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of computer networks, and in particular relates to a network traffic situation awareness method combining local and central networks. Background Art

[0002] The communication network needs to perceive the network traffic situation in real time to monitor the network operation status and network anomalies. Network traffic information is the basis for the SDN controller to control network traffic. Network traffic information has two main functions: on the one hand, the controller reports the network traffic information to the application layer through the northbound interface, so that the network administrator can monitor the network status in real time; on the other hand, network traffic information is the basis for the SDN controller to make traffic decisions. The network traffic management module selects a reasonable forwarding path for the data flow in the network based on the network topology and traffic information and provides service quality assurance for the deterministic traffic during the transmission process. Network traffic perception is mainly responsible for collecting and storing network traffic status information.

[0003] Network measurement is an important foundation for the development of SDN. Network status monitoring, network fault analysis, network security defense, and network intelligence all rely on network measurement. There are many measurement research works in the existing data center network. According to their measurement location, network measurement can be divided into two categories: active measurement and passive measurement.

[0004] Active measurement is when the detection end actively sends detection packets to the network to detect the network status, and analyzes the entire network status based on the effective information fed back by the injected data packets. For example, commonly used routing detection tools such as ping and traceroute all use this method to perform network measurements. The advantage of this is that it does not consume switch or host resources during the non-detection period. The disadvantage is that it cannot monitor the network status in real time, and engineers need to perform detection work manually, which cannot cover all nodes in the network, and the additional network information injected during detection will affect the real-time network status. Therefore, in data center networks, most of the existing research work focuses on optimizing passive measurements.

[0005] Passive measurement refers to recording the traffic information on network link nodes by deploying measurement probes on network devices. Under passive measurement, the measurement can be divided into switch-side measurement and host-side measurement according to the different monitoring locations of the measurement. The host-side measurement tools, such as PerfSight, can obtain network traffic information from the host side, and deploy the collector on the host device to avoid occupying additional switch resources and affecting forwarding efficiency. However, the traffic statistics on the host side cannot quickly locate the specific location where the network anomaly occurs, and the network information obtained is very limited because engineers can only see the end-to-end traffic information. The traffic information captured on the switch will be more comprehensive and can cover each transmission node in the entire network. Passive measurement on the switch side is an important means of network measurement in data centers.

[0006] Due to the limited switch resources, passive measurement tools such as sFlow and EverFlow use traffic mirroring to the server to count traffic, collect and analyze traffic on the server, and effectively use the powerful computing power of the server to avoid affecting the switch forwarding rate due to the consumption of switch resources. However, this method consumes a lot of bandwidth resources and is not suitable for transmitting large amounts of traffic. Just transmitting the information in the packet header consumes a lot of bandwidth resources.

[0007] In addition to the mirroring method, another way to adapt to the limited resources of the switch is to sample the traffic and store the sampled traffic information (such as source IP, destination IP, source port, destination port, protocol) directly on the switch. The sampling technology maintains an independent counter for each flow, and performs a series of calculations based on the sampled information and sampling parameters such as the sampling rate to estimate the complete traffic information data of each flow. The higher the sampling rate is set, the more accurate the estimation result will be, but a higher sampling rate consumes a lot of performance resources. In order to compress the storage space, there is a technology that uses hashing to compress huge information into a smaller space. For example, NetFlow, a widely used measurement tool, uses a sampling hashing method to store traffic information, and stores the measurement results in a hash table data structure in the memory, reducing memory consumption by reducing the number of captured flows. However, when the number of flows is large, the probability of hash conflicts will become very high, the storage space consumption will also become very large, and the speed of flow insertion cannot match the speed at which the switch processes data packets. In order to solve this problem, some measurement applications such as OpenSketch and OneSketch use sampling to store traffic information in a data structure called Sketch for network measurement, rather than simply using an ordinary hash table structure. Compared with ordinary hash sampling, the Sketch-based network measurement method can detect large flows and abnormal flows without taking up too many computing and storage resources. Various Sketches can be used to support different measurement needs. However, the errors of most Sketches are relatively high, and only measurement results with relatively large limitations can be obtained according to different applications. At the same time, the measurement results are difficult to perform secondary analysis, and the universality is not very high. In addition, a structure like Sketch is more difficult to perform traffic distribution statistics and packet loss detection for the entire network. The structure cannot effectively store all network traffic and basically cannot provide the original traffic information to the controller.

[0008] Comprehensively considered, all of the above work is to statistically identify network measurement tasks such as packet loss, traffic distribution, and security attacks based on the sampled information. This method can reduce the occupation of switch memory resources, but it will cause a large deviation in the information statistics of the entire network. In the complex and changeable data center network, the traffic statistics results obtained by a single sampling method can no longer meet the needs of more accurate traffic statistics. For example, some short-lived flows are difficult to capture by sampling, but some abnormal or sudden local cycle errors often occur in this small part of the flow, so the need for fine-grained measurement becomes more and more important. Therefore, the Sketch-based traffic sampling method is only suitable for long-term, clear measurement tasks, and cannot support sudden or changing measurement requirements.

[0009] Another solution to the measurement problem under limited resources is to compress the measurement data to achieve lossless collection of the entire network traffic. By placing the measurement statistics on the switch, these studies change the sampling collection method to collect all the traffic passing through the switch, and introduce some innovative data structures for compressed storage. For example, FlowRadar encodes and counts all flows through the IBLT (Invertible Bloom Lookup Table) structure, covering the entire network information. Compared with ordinary hashing, it compresses the storage space, so that all flow information can be stored, achieving the goal of obtaining traffic information in constant time. After that, the controller decodes the encoded information, and uses the decoded traffic information to analyze and count the current network status, so that the entire framework can be adapted to various network environments. However, the limitation of FlowRadar is that under the IBLT structure, in order to be able to decode the encoded data, a single tuple must exist. Under the condition of compressed storage space, there will be a situation where decoding cannot be done, so the controller cannot obtain effective traffic information. In addition, the decoding process of the counter and the quintuple on the controller is to solve the n-dimensional linear equation system, which takes a lot of time to decode. If the count items are increased, the decoding time will also increase exponentially, which is not conducive to the controller's rapid analysis and detection of network anomalies. In general, all solutions based on compressed data structures can quickly collect data on the data plane, but cannot quickly respond to sudden network anomalies on the control plane.

[0010] In addition to the above work, there are some other works such as LossRadar, which only provides fast and effective detection of packet loss. Although it can achieve very good experimental results in packet loss detection, it cannot meet the diverse needs of measurement applications. In actual applications, the measurement tasks that need to be monitored in data centers are diverse and not limited to packet loss. From the above analysis, it can be seen that the traditional network traffic situation awareness methods are currently divided into two types: ① Sensing traffic information through sampling, but this method cannot collect all traffic, has low accuracy, and may cause problems such as network perception lag; ② Collecting all traffic through traffic mirroring, but this method will occupy a lot of bandwidth, and the network bandwidth of air defense and anti-missile tactical communication networks can often reach 2Mbps, so the traditional network traffic situation awareness methods are difficult to meet the needs of air defense and anti-missile tactical integrated communication networks due to high overhead or low accuracy. Summary of the invention

[0011] The purpose of the present invention is to overcome the shortcomings of the prior art and provide a network traffic situation awareness method that combines local and central networks, which achieves the purpose of traffic situation awareness by capturing traffic locally (i.e., SDN switch) and sending the traffic summary to the network center (i.e., SDN controller) through an intelligent integrated message terminal.

[0012] The present invention proposes a network traffic situation awareness method that combines local and central data, and its basic idea is to overcome the limitations of traditional methods by combining local data merging and central global data integration, and ensure the sensitivity of traffic perception without occupying too much bandwidth. It can understand the situation of network traffic more comprehensively and in real time, and realize more refined management and optimization of the network.

[0013] The first object of the present invention is to provide a local and central combined network traffic situation awareness method, comprising the following steps:

[0014] S1. Record and store the number of packets and flow size of each flow in the network flow data packets forwarded by multiple switches to obtain flow information;

[0015] S2. Read the traffic information stored in step S1, generate a traffic summary message, and send it;

[0016] S3. Receive, record and store the traffic summary message sent in step S2 to obtain traffic information of multiple switches, thus completing network traffic situation awareness.

[0017] Preferably, step S1 comprises the following steps:

[0018] S11, parsing the network traffic data packets forwarded by multiple switches to obtain the five-tuple information and length information of the data packets;

[0019] S12, according to the five-tuple information obtained in step S11, find the record of corresponding traffic in the traffic information stored on multiple switches;

[0020] S13. In the flow data recorded corresponding to step S12, add one to the number of data packets in the recorded data, and add the flow size to the data packet length information obtained in step S11, so as to complete the recording and storage of the number of packets and flow size of each flow and obtain the flow information.

[0021] Preferably, step S2 comprises the following steps:

[0022] S21, allocating memory for message cache;

[0023] S22, traverse the traffic information stored in step S1, write each piece of traffic information into the corresponding position of the memory allocated in step S21 in the order of quintuple and traffic data, and obtain a message cache;

[0024] S23, fill the check byte into the message buffer obtained in step S22 to obtain a message;

[0025] S24. Write the message length into the message obtained in step S23 to obtain a traffic summary message, and send it.

[0026] Preferably, step S3 comprises the following steps:

[0027] S31, receiving the traffic summary message sent in step S2, and obtaining summary storage information;

[0028] S32, determining whether the check byte of the summary storage information obtained in step S31 exists, if not, discarding it and continuing to execute step S31, if it exists, executing step S33;

[0029] S33, reading the number of messages of the summary storage information obtained in step S31, and calculating the length of the message according to the number of messages, and receiving a message of corresponding length from the TCP socket, which is a summary of all traffic information of the switch;

[0030] S34, extracting the traffic information summary obtained in step S33, that is, obtaining a quintuple and traffic data of each traffic information summary;

[0031] S35. Record and store the five-tuple obtained in step S34 and the flow data to obtain the flow information of multiple switches, thus completing network flow situation awareness.

[0032] The second object of the present invention is to provide a local and central combined network traffic situation awareness system, comprising:

[0033] The local traffic collection agent module is used to record and store the number of packets and the flow size of each flow in the network traffic data packets forwarded by multiple switches to obtain the traffic information;

[0034] The traffic transmission module is used to read the traffic information stored in the local traffic collection agent module, generate a traffic summary message, and send it;

[0035] The controller is used to receive, record and store the traffic summary message sent by the traffic transmission module to obtain the traffic information of multiple switches.

[0036] Preferably, the local traffic collection agent module includes:

[0037] A parsing unit, used to parse the network traffic data packets forwarded by multiple switches to obtain the five-tuple information and length information of the data packets;

[0038] The flow corresponding unit is used to find the record of corresponding flow in the flow information stored on multiple switches according to the obtained five-tuple information;

[0039] The collection and calculation unit is used to add one to the number of data packets in the recorded data and the obtained data packet length information to the flow data of the corresponding record, so as to complete the recording and storage of the number of packets and flow size of each flow and obtain the flow information.

[0040] A third object of the present invention is to provide an electronic device, comprising:

[0041] at least one processor; and,

[0042] a memory communicatively connected to the at least one processor; wherein,

[0043] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the above-mentioned local and central combined network traffic situation awareness method.

[0044] The fourth object of the present invention is to provide a computer-readable storage medium storing a computer program, characterized in that when the computer program is executed by a processor, the above-mentioned local and central combined network traffic situation awareness method is implemented.

[0045] Compared with the prior art, the present invention has the following beneficial effects:

[0046] (1) The present invention transmits the traffic information summary of each switch to the controller and stores it, so that the administrator can monitor and manage the traffic of the entire network in a centralized location, avoiding the trouble of decentralized query and processing, thereby greatly improving the efficiency of network management;

[0047] (2) The present invention can collect, aggregate and store the flow information of each switch in real time, thereby being able to more accurately reflect the flow status of the entire network system, and providing effective support for the location and resolution of network operation problems; the controller can flexibly adjust and optimize the allocation of network resources according to the actual situation of network flow by acquiring the flow information of each switch, so as to make the use of network resources more efficient; through comprehensive monitoring of network flow, the administrator can timely discover abnormal flow changes, and early warn and prevent possible network attacks or failures, thereby improving the security of the network;

[0048] (3) The present invention addresses the high latency and small bandwidth of the air defense and anti-missile integrated network. By uploading only the required traffic summary information, the present invention overcomes the shortcomings of traditional measurement methods such as sFlow and EverFlow, which consume a large amount of bandwidth resources and consume a large amount of bandwidth resources just to transmit the packet header information.

[0049] (4) The present invention can collect all traffic information and will not lose information of certain key flows due to sampling defects, thus overcoming the shortcomings of Sketch-based network measurement methods, such as high error, large measurement result limitations, difficulty in secondary analysis of measurement results, and low universality;

[0050] (5) The present invention overcomes the disadvantage of long compression decoding time of FlowRadar, and can ensure support for a variety of measurement applications by recording PacketNumber, BitSize and quintuple information. In addition, the present invention has direct readability and scalability of stored information, and can easily decide whether to collect more information according to one's own needs, such as information of flag bits such as FIN and ACK. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] Figure 1 An architectural diagram of a local and central combined network traffic situation awareness method provided in an embodiment of the present invention;

[0052] Figure 2 Stores a schematic diagram for traffic summaries;

[0053] Figure 3 This is a schematic diagram of the traffic summary message structure;

[0054] Figure 4 It is a flow chart of the flow transmission module in the embodiment of the present invention.

[0055] Figure 5 A schematic diagram of a flow chart of a controller in an embodiment of the present invention. DETAILED DESCRIPTION

[0056] The following will be combined with the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0057] Example 1

[0058] like Figure 1As shown, an embodiment of the present invention provides a network traffic situation awareness method combining local and central, which is applied to an air defense and anti-missile tactical integrated communication network, and specifically includes the following steps:

[0059] S1. Record and store the number of packets and flow size of each flow in the network flow data packets forwarded by multiple SDN switches to obtain flow information, which specifically includes the following steps:

[0060] S11, parsing the network traffic data packets forwarded by multiple SDN switches to obtain the five-tuple information and length information of the data packets; wherein the five-tuple information uniquely identifies a flow, including the source IP address, the destination IP address, the source port, the destination port and the protocol;

[0061] S12. Find the record of corresponding traffic in the traffic information stored on multiple SDN switches according to the five-tuple information obtained in step S11;

[0062] S13. In the flow data recorded corresponding to step S12, the number of data packets in the recorded data is increased by one, and the flow size is added to the data packet length information obtained in step S11, so as to complete the recording and storage of the number of packets and flow size of each flow, and obtain the flow information; in this way, for the flow of any number of data packets, as long as they belong to one flow, that is, the five-tuple matches, the information of these packets can be merged into one data, thereby reducing the flow overhead.

[0063] The specific storage structure of the traffic information stored on the multiple SDN switches in the above step S12 is as follows: Figure 2 As shown in the figure, it is a hash table structure. The key is the traffic five-tuple, and the value is the number of packets and traffic size of each flow. The traffic information summary is stored in this structure in the SDN switch and controller and is subsequently used in the controller. The traffic summary storage structure provides methods such as traversal, clearing, and adding.

[0064] S2, read the flow information stored in step S1, generate a flow summary message, and send it, such as Figure 4 As shown, the following steps are included:

[0065] S21, the controller allocates memory for the message cache;

[0066] S22, the controller traverses the flow information stored on the SDN switch in step S1, and writes each flow information into the corresponding position of the memory allocated in step S21 in the order of the five-tuple and the flow data. The position should reserve 8 bytes of space to store the check byte and the message length. The number of flow information is recorded during the traversal to obtain the message cache. The five-tuple is specifically: IP address, destination IP address, source port, destination port and protocol, and the flow data is: number of flow packets and flow size;

[0067] S23, fill the check byte into the message buffer obtained in step S22 to obtain a message;

[0068] S24, write the message length, that is, the number of flow information, into the message obtained in step S23 to obtain a flow summary message, and send the TCP message to the receiving end on the controller through the specified port. When the message is successfully sent, the flow summary storage will be cleared;

[0069] Figure 3 FIG. 1 is a structural example diagram of a traffic summary message in an embodiment of the present invention, which describes the payload part of a TCP message. Figure 3 It can be seen that the traffic summary message is a TCP message, which is sent to the designated port of the controller and received by the receiving end. In this case, it is sent to port 7777 of 10.0.0.1. In the TCP payload, the first 4 bytes are the check bytes, which are 0xF10C0177 in this case, indicating that the data is the first segment of a message transmission; the following 4 bytes are the message length, indicating the number of traffic information contained in a message transmission; after that, the summary of each traffic information is written into the message according to the five-tuple and traffic data (i.e., IP address, destination IP address, source port, destination port and protocol, the number of traffic packets and the traffic size).

[0070] S3, receiving and recording the traffic summary message sent in step S2, obtaining the traffic information of multiple switches, and completing the network traffic situation awareness, such as Figure 5 As shown, the following steps are included:

[0071] S31, receiving the traffic summary message sent in step S2, and obtaining summary storage information;

[0072] S32, determining whether the check byte of the summary storage information obtained in step S31 exists, if not, discarding it and continuing to execute step S31, if it exists, executing step S33;

[0073] S33, reading the number of messages of the summary storage information obtained in step S31, and calculating the length of the message according to the number of messages, and receiving a message of corresponding length from the TCP socket, which is a summary of all traffic information of the switch;

[0074] S34, extracting the traffic information summary obtained in step S33 according to a method reverse to the message construction method, that is, obtaining a quintuple and traffic data of each traffic information summary;

[0075] S35, record and store the five-tuple obtained in step S34 and the flow data, obtain the flow information of multiple switches, and complete the network flow situation awareness. The flow information of multiple switches can be applied to situation monitoring and anomaly detection.

[0076] Example 2

[0077] Based on Example 1, the embodiment of the present invention provides a local and central combined network traffic situation awareness system, specifically including:

[0078] The local traffic collection agent module is deployed on the SDN switch in the tactical communication network to record and store the number of packets and flow size of each flow in the network traffic data packets forwarded by multiple switches to obtain traffic information;

[0079] The traffic transmission module is deployed on the SDN switch in the network and is used to read the traffic information stored in the local traffic collection agent module, generate a traffic summary message, and send it;

[0080] The controller is used to receive, record and store the traffic summary message sent by the traffic transmission module to obtain the traffic information of multiple switches.

[0081] The local traffic collection agent module in the embodiment of the present invention includes:

[0082] A parsing unit, used to parse the network traffic data packets forwarded by multiple switches to obtain the five-tuple information and length information of the data packets;

[0083] The flow corresponding unit is used to find the record of corresponding flow in the flow information stored on multiple switches according to the obtained five-tuple information;

[0084] The collection and calculation unit is used to add one to the number of data packets in the recorded data and the obtained data packet length information to the flow data of the corresponding record, so as to complete the recording and storage of the number of packets and flow size of each flow and obtain the flow information.

[0085] The integrated message transmission mechanism between the traffic transmission module and the controller in the embodiment of the present invention is as follows: the traffic summary message generated by the traffic transmission module is a TCP message, which is sent to the designated port of the controller and received by the controller receiving end. In the TCP payload, the first 4 bytes are check bytes, indicating that the data is the first segment of data in a message transmission; the following 4 bytes are the message length, indicating the number of traffic information included in a message transmission; and the following is a summary of each traffic information, which is written into the message according to the five-tuple and traffic data (i.e., IP address, destination IP address, source port, destination port and protocol, the number of traffic packets and the traffic size).

[0086] Example 3

[0087] An embodiment of the present invention provides an electronic device, the electronic device comprising:

[0088] at least one processor; and,

[0089] a memory communicatively connected to the at least one processor; wherein,

[0090] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the local and central combined network traffic situation awareness method of Example 1.

[0091] Example 4

[0092] An embodiment of the present invention provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the local and central combined network traffic situation awareness method of embodiment 1.

[0093] In the traditional network traffic situation awareness method, the traffic mirroring method collects all traffic and occupies a large amount of bandwidth. The method of Example 1 of the present invention can save a large amount of network bandwidth and realize network traffic monitoring under a small bandwidth. The following example calculation method is used to illustrate that the network traffic situation awareness method of Example 1 of the present invention can reduce a large amount of bandwidth consumption compared with the mirroring traffic method, as follows:

[0094] Assume that there are n interfaces in use on a switch in the network, the average inbound traffic per port is s bps, and the traffic consists of f flows in total. The size of each flow information is i bytes. Then:

[0095] 1) The size of the mirrored traffic is: n·s bps;

[0096] 2) The size of the flow information in the present invention is: f·8i bps;

[0097] 3) The average flow rate of each flow is: n·s / f bps;

[0098] 4) The percentage of traffic saving is: (ns–8fi) / ns×100%.

[0099] If n = 4, s = 2 × 10 6 , f = 1000, i = 6, that is, the average flow rate of each flow is: 4 × 2 × 10 6 bps / 1000=8Kbps. The size of the mirrored traffic is:

[0100] 4×2×106 bps=8Mbps,

[0101] The size of the flow information is:

[0102] 1000×8×6bps=48Kbps,

[0103] The percentage of flow savings is:

[0104] (8Mbps-48kbps) / 8Mbps=99.4%

[0105] The above results illustrate that the method of Example 1 of the present invention can save a lot of network bandwidth compared to the traffic mirroring method, and realize network traffic monitoring under small bandwidth.

[0106] Although the embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the claims and their equivalents.

Claims

1. A network traffic situation awareness method combining local and central, characterized in that: The following steps are involved: S1. Record and store the number of packets and flow size of each flow in the network flow data packets forwarded by multiple switches to obtain flow information; S2. Read the traffic information stored in step S1, generate a traffic summary message, and send it; S3. Receive, record and store the traffic summary message sent in step S2 to obtain traffic information of multiple switches, thus completing network traffic situation awareness.

2. The method for network traffic situation awareness combining local and central according to claim 1 is characterized in that: Step S1 comprises the following steps: S11, parsing the network traffic data packets forwarded by multiple switches to obtain the five-tuple information and length information of the data packets; S12, according to the five-tuple information obtained in step S11, find the record of corresponding traffic in the traffic information stored on multiple switches; S13. In the flow data recorded corresponding to step S12, add one to the number of data packets in the recorded data, and add the flow size to the data packet length information obtained in step S11, so as to complete the recording and storage of the number of packets and flow size of each flow and obtain the flow information.

3. The method for network traffic situation awareness combining local and central according to claim 1 is characterized in that: Step S2 comprises the following steps: S21, allocating memory for message cache; S22, traverse the traffic information stored in step S1, write each piece of traffic information into the corresponding position of the memory allocated in step S21 in the order of quintuple and traffic data, and obtain a message cache; S23, fill the check byte into the message buffer obtained in step S22 to obtain a message; S24. Write the message length into the message obtained in step S23 to obtain a traffic summary message, and send it.

4. The method for network traffic situation awareness combining local and central according to claim 1 is characterized in that: Step S3 includes the following steps: S31, receiving the traffic summary message sent in step S2, and obtaining summary storage information; S32, determining whether the check byte of the summary storage information obtained in step S31 exists, if not, discarding it and continuing to execute step S31, if it exists, executing step S33; S33, reading the number of messages of the summary storage information obtained in step S31, and calculating the length of the message according to the number of messages, and receiving a message of corresponding length from the TCP socket, which is a summary of all traffic information of the switch; S34, extracting the traffic information summary obtained in step S33, that is, obtaining a quintuple and traffic data of each traffic information summary; S35. Record and store the five-tuple obtained in step S34 and the flow data to obtain the flow information of multiple switches, thus completing network flow situation awareness.

5. A local and central combined network traffic situation awareness system, characterized in that: include: The local traffic collection agent module is used to record and store the number of packets and the flow size of each flow in the network traffic data packets forwarded by multiple switches to obtain the traffic information; The traffic transmission module is used to read the traffic information stored in the local traffic collection agent module, generate a traffic summary message, and send it; The controller is used to receive, record and store the traffic summary message sent by the traffic transmission module to obtain the traffic information of multiple switches.

6. The local and central combined network traffic situation awareness system according to claim 5 is characterized in that: The local traffic collection agent module includes: A parsing unit, used to parse the network traffic data packets forwarded by multiple switches to obtain the five-tuple information and length information of the data packets; The flow corresponding unit is used to find the record of corresponding flow in the flow information stored on multiple switches according to the obtained five-tuple information; The collection and calculation unit is used to add one to the number of data packets in the recorded data and the obtained data packet length information to the flow data of the corresponding record, so as to complete the recording and storage of the number of packets and flow size of each flow and obtain the flow information.

7. An electronic device, characterized in that: The electronic device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the local and central combined network traffic situation awareness method as described in any one of claims 1 to 4.

8. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the local and central combined network traffic situation awareness method as described in any one of claims 1 to 4 is implemented.