Hierarchically scalable cloud network flow analysis method and system
By constructing a hierarchical network flow analysis structure and using Flow ID for correlation analysis, the scalability and complexity issues of multi-level Flow analysis in cloud networks in traditional methods are solved, achieving comprehensive coverage and efficient analysis of all hierarchical networks.
Patent Information
- Application Number
- CN202211695608.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-28
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2042-12-28
AI Technical Summary
Traditional network flow analysis methods have problems with scalability, dimensionality explosion, and data processing complexity in cloud network environments, making it difficult to effectively handle flow analysis of multi-level networks, resulting in a waste of storage and computing resources and processing complexity.
Adopting a hierarchically scalable cloud network flow analysis method, by building a hierarchical network flow analysis structure, the data packets are parsed into chain-level information, and the flow analysis results of each level are generated, FlowRecord, using Flow ID and Flow Key. Correlation analysis eliminates dimensionality explosion problems and simplifies data processing.
It achieves universal processing of multi-level networks, solves scalability and complexity issues, ensures Flow analysis coverage of all levels of networks, reduces storage and computing overhead, and improves analysis efficiency.
Smart Images

Figure CN115987836B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of network flow analysis, and in particular to a hierarchically scalable cloud network flow analysis method and system. Background Art
[0002] Network flow analysis is a commonly used method in network analysis management. This method first establishes a network flow based on the five-tuple and other selected fields of the network data packet (also called "network message" or "message"). Then, the data packets are grouped according to the flow, and various data statistics and analyses are performed based on the flow. Finally, the data structure is organized and output according to the flow. The common Netflow and Ipfix are typical representatives of this technology.
[0003] As container technology and cloud technology become more mature and widely adopted, network architecture is becoming increasingly complex, and multi-tier networks have emerged, that is, a deployment method based on the underlying network (underlay network) to carry the upper network (overlay network). The underlay network and the overlay network can have completely different IP address layouts. Common layers include physical networks, (software-defined) virtual machine networks, and container networks (built with technologies such as Kubernetes). Therefore, there are different two-tier or three-tier carrying methods such as physical networks carrying virtual machine networks, virtual machine networks carrying container networks, and physical networks carrying container networks. Carrying is generally achieved using tunnel technologies such as VXLAN, GRE, and IPinIP. For example Figure 1 The figure shows a packet encapsulated using a VXLAN tunnel. The inner "original packet" is the encapsulated packet, that is, the overlay network packet, and the outer (outer) VXLAN encapsulated packet is the underlay network packet. The message format will be different when using different tunnel technologies, but there are also two layers: the inner overlay and the outer underlay. This is an example of a two-layer message, and the three-layer is to encapsulate another layer on the two-layer message. The two-layer or three-layer method is mainly deployed within a data center. If it is a complex distributed environment of "end-edge cloud", or a multi-site and multi-center environment, or a tunnel-based collection and forwarding scenario, then the number of layers may increase.
[0004] The traditional network flow analysis method is actually a wide table analysis method. A wide table can be a flat structure, a set of fields represented by Key and Value, which is adopted by Netflow. A wide table can also be a nested structure, such as nesting and organizing information by protocol; but in fact, this method can expand the nested structure into a unique Key, such as using "." to connect the field name of the nested structure (the structure reading method of Json Object). Therefore, both structures are actually a collection of a series of fields, and the structure that expands the nested structure can be figuratively called a "large wide table". For the field information of these flows, although the expressions of different methods may be different, they can actually be divided into two categories:
[0005] The first category: Dimension information, which is used to define Flow and distinguish different Flows, including (but not limited to) quintuple (IP address, IP layer protocol, transport layer port), VLAN ID, MPLS Tag, GRE Key, VXLAN, IPv4Tos, IPv6 Priority / Traffic class, etc. This information can be used to distinguish different TCP sessions or different IP host communications.
[0006] The second category: measurement information (Measure), which is the relevant data values of various flows obtained by flow calculation and statistics, such as the total number of messages, total number of bytes, transmission rate, transaction volume, response rate, success rate, response time, etc.
[0007] Network flow analysis is actually to group data packets into different flows according to a set of selected dimensions, and then calculate and count various measures. This set of dimensions selected for dividing flows is called flow key.
[0008] Traditional network flow analysis has the following defects in cloud network environments due to its wide table design.
[0009] The first defect is the scalability problem caused by the increase in layers. When using a two-layer network, the actual increase in Dimensions is almost doubled (the basic Dimensions are in the outer), and the increase in Measures is 1 / 4 to 1 / 3 (there is no TCP and information above TCP in the outer, only Measures of related protocols). If the layer is increased, the Dimensions and Measures will increase further. It should be pointed out that the layers in the network environment are often not fixed. If there is a three-layer network, there may be messages from one to three layers at the same time. At this time, how to design a wide table to store Dimensions and Measures is a huge challenge: if you design a "large wide table" containing all Dimensions and Measures at the maximum layer, then for messages that do not reach the maximum layer, there will be a large waste of empty fields; if you design it at only one layer, there will be no obvious waste, but for multi-layer messages, you can only analyze the network flow of a certain layer, and miss the flow of other layers. A practical method is to focus on the Dimensions and Measures of the innermost layer, and add a fixed number of Dimensions and Measures of the outer layer. If there is no outer layer, the added storage is an empty field. If there is an outer layer, the dimensions and measures of the outer layer are processed. If there are multiple outer layers, a certain layer (such as the outermost layer, such as the innermost outer layer) is selected for processing according to the configuration. Obviously, this method is a case-based processing and has no universality: both dimensions and measures need to be specified, and the calculation and processing of data at different levels are related. For the entire network, the flow of the underlay network is largely missing, and it cannot fully cover the physical underlay network and the virtual machine underlay network.
[0010] The above method has a second flaw, the dimension explosion problem. An important aspect that distinguishes Dimension from Measure is that Dimension, as the grouping basis of Flow (Flow Key), actually determines the amount of data to be stored. Each additional Dimension actually adds a more refined data perspective, and more "rows" in the wide table are needed to store data. For example, if IP Pair (IP address pair) is used as a Flow to count the communication between hosts A and B, only one row of records is needed. However, if A's port is added as a component of the Flow Key, and A has 10 ports participating in the communication, then 10 rows of records are needed. If B's port is also added as a component of the Flow Key, B also has 10 ports participating in the cross-communication with A's 10 ports, then 100 rows of records are needed. It can be seen that with the increase of dimensions, the scale of the dimensional space (with the number of possible values of the dimension) increases exponentially, which is actually the "Cartesian product" of the dimensions. Based on the wide table design, adding several outer dimensions as components of the Flow Key will dramatically expand the number of data rows generated. If you actually need to add several outer dimensions, the memory overhead and storage overhead will increase dramatically.
[0011] Can we avoid this problem by only performing flow analysis on the innermost layer and ignoring the dimensions of the outer layers? In fact, in cloud network flow analysis, the answer is no. This is because cloud networks are particularly flexible and complex. What needs to be analyzed most is how data packets flow and transmit between networks and network devices at different levels to monitor the operating status of each layer of the network. Therefore, cloud network flow analysis not only requires the dimension of underlay, but it is also best to perform flow analysis on each layer of underlay. Therefore, due to scalability issues and dimensionality explosion problems,
[0012] The third defect of the wide table design is the complexity of data processing. Because data of different levels are stored in one row, the Flow Key can be considered as a cross-level dimension (Inter-tier Dimensions). However, in actual use, you still need to go back to different levels to analyze data, such as analyzing one of the three levels (physical network, virtual machine network, or container network), that is, the Inner-tier Dimensions. Therefore, when using it, you need to know the Inner-tier Dimensions of each level, and then perform data aggregation according to the Inner-tier Dimensions, remove the Dimensions of other levels, and then use it. As mentioned above, in traditional Flow analysis, the selection of outer-layer Dimensions and Measures is personalized, so the Inter-tier Dimensions during collection, calculation and storage and the Inner-tier Dimensions during (query) use bring a lot of additional processing complexity and specificity, making the first defect more obvious: difficult to expand and difficult to maintain.
[0013] Patent document CN112272123B (application number: 202011112363.6) discloses a network traffic analysis method. The method includes: receiving a batch of data packets and a batch of five-tuple rules that need to be analyzed for network traffic, wherein the five-tuple rules are generated by at least one DPI business card based on the received data packets; based on the data packets and the five-tuple rules, determining the target data packets to which identification characters need to be added; based on the five-tuple rules, adding identification characters to the target data packets, and outputting the target data packets with the identification characters added to at least one DPI business card, so that the at least one DPI business card processes the target data packets with the identification characters added. This patent is a traditional network traffic analysis method, and the present invention is for Flow analysis of multi-level networks in cloud networks.
[0014] Patent document CN106100999B (application number: 201610744511.3) discloses a software-defined mirror network flow control protocol in a virtualized network environment, characterized in that the protocol can adapt to the system structure of mirror flow collection, mirror flow distribution and mirror flow control that are functionally decoupled and distributedly deployed. The mirror flow collector node / virtual machine is deployed in the user's business network environment, and its main function is to capture the mirror flow in the virtualized environment and forward it according to the purpose specified by the protocol; the mirror flow distributor is deployed in a non-business network environment, that is, it does not need to consider the impact of network load on the normal network communication of the user's business network environment, and its function is to replicate and distribute the flow according to the multi-purpose flow analysis device specified by the protocol; the mirror flow center controller uniformly controls the forwarding logic of the entire mirror network flow and provides a software-defined interface. This patent is about the control of mirror data in a virtual network environment, while the present invention is aimed at the flow analysis of multi-level networks in cloud networks.
[0015] Patent document CN107483507B (application number: 201710916063.5) discloses a conversation analysis method, device and storage medium. The method includes: extracting the original feature value of the current input message; wherein the original feature value includes: source IP address, source port number, destination IP address, destination port number and protocol type; judging whether the current input message meets the preset analysis conditions according to the original feature value and the first conversation analysis table; when the current input message meets the preset analysis conditions, counting the current input message into the second conversation analysis table; analyzing the conversations in the second conversation analysis table according to the preset analysis method. This patent is a method for improving conversation analysis through two conversations, while the present invention is for Flow analysis of multi-level networks in cloud networks, which is actually based on a forest structure (a set of tree structures) of a data table.
[0016] Patent document CN102045363B (application number: 201010619761.7) discloses a method for establishing network traffic feature identification rules, including: an analysis center server receives a network traffic sample, obtains the load data of the network traffic sample, extracts traffic features from the load data, and when the feature parameter contained in the traffic feature reaches a corresponding threshold, determines that the network traffic belongs to a category corresponding to the corresponding threshold, stores the traffic feature and the category in correspondence to generate feature identification rules, and sends the feature identification rules to the network traffic device. This patent is a method for extracting network features, which can be used in the Flow Key or Flow ID of the present invention, and is not related to the Flow analysis of the multi-level network of the cloud network in this method.
[0017] Patent document CN112671600A (application number: 202011451447.2) discloses a network flow feature extraction method, a network flow anomaly detection method and related devices, wherein the network flow feature extraction method includes: obtaining the network flow to be processed, extracting the spatial features of the network flow to obtain the spatial feature representation of the network flow; extracting the temporal features of the spatial feature representation to obtain the spatiotemporal feature representation of the network flow. This patent is a method for extracting network features, which can be used in the Flow Key or Flow ID of the present invention, and is not related to the Flow analysis of the multi-level network of the cloud network in this method.
[0018] Therefore, the present invention proposes a "hierarchical scalable cloud network flow analysis method" (or "hierarchical cloud network Flow method") to solve the above defects, aiming to process multi-level Flow in a universal way and solve the scalability, dimensionality and complexity problems brought by multi-level flows. Summary of the invention
[0019] In view of the defects in the prior art, the object of the present invention is to provide a hierarchically scalable cloud network flow analysis method and system.
[0020] A hierarchically scalable cloud network flow analysis method provided by the present invention includes:
[0021] Step S1: construct a hierarchical network flow analysis structure and initialize the constructed flow analysis dimension information of each level;
[0022] Step S2: Parse the data message into chain-level information;
[0023] Step S3: The chained hierarchical information is subjected to flow analysis by level, and the flow analysis result FlowRecord of each level is generated and stored globally.
[0024] Preferably, the step S1 adopts: for multi-level messages, the Flow Key of each level is set to meet the analysis requirements and group the messages.
[0025] Preferably, the step S2 adopts: decoding the data message and forming a hierarchical information linked list.
[0026] Preferably, the flow analysis result Flow Record contains a Flow ID as a unique identifier; the Flow ID is a unique identifier calculated based on the Flow Key.
[0027] Preferably, Outer Flow ID or inner Flow ID is used to associate FlowRecords of different layers of the same data packet.
[0028] A hierarchically scalable cloud network flow analysis system provided by the present invention includes:
[0029] Module M1: Constructs a hierarchical network flow analysis structure and initializes the constructed flow analysis dimension information of each level;
[0030] Module M2: Parse the data message into chain-level information;
[0031] Module M3: Chain-type hierarchical information performs flow analysis by level, generates flow analysis results FlowRecord for each level, and stores them globally.
[0032] Preferably, the module M1 adopts: for multi-level messages, the Flow Key of each level is set to meet the analysis requirements and group the messages.
[0033] Preferably, the module M2 adopts: decoding the data message and forming a hierarchical information linked list.
[0034] Preferably, the flow analysis result Flow Record contains a Flow ID as a unique identifier; the Flow ID is a unique identifier calculated based on the Flow Key.
[0035] Preferably, Outer Flow ID or inner Flow ID is used to associate FlowRecords of different layers of the same data packet.
[0036] Compared with the prior art, the present invention has the following beneficial effects:
[0037] 1. The present invention decouples the processing and storage of dimensions and measures at each level by adopting a hierarchical Flow ID, Flow Key, and the Flow Record structure composed of them, thereby solving the scalability problem caused by the increase and change of levels in the cloud network;
[0038] 2. The present invention adopts a unified data packet hierarchical information structure and Flow Record structure, so that complex cloud network multi-level Flow analysis can be performed by level using a common Flow analysis process, eliminating the complexity of data processing in traditional methods;
[0039] 3. The present invention eliminates the dimension explosion problem by iterating the chain hierarchical information of the data packet and using the Outer Flow ID or the inner Flow ID to associate the Flow Record, so that Flow analysis can be performed on all hierarchical networks; furthermore, the Flow ID can be used for cross-level Flow association analysis. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Other features, objects and advantages of the present invention will become more apparent from the detailed description of non-limiting embodiments made with reference to the following drawings:
[0041] Figure 1 It is a two-layer data packet encapsulated using VXLAN.
[0042] Figure 2 Flowchart of hierarchically scalable cloud network flow analysis method.
[0043] Figure 3 This is a hierarchical information structure diagram of the present invention.
[0044] Figure 4 This is a flowchart of the hierarchical Flow analysis of the present invention. DETAILED DESCRIPTION
[0045] The present invention is described in detail below in conjunction with specific embodiments. The following embodiments will help those skilled in the art to further understand the present invention, but are not intended to limit the present invention in any form. It should be noted that, for those of ordinary skill in the art, several changes and improvements can also be made without departing from the concept of the present invention. These all belong to the protection scope of the present invention.
[0046] Example 1
[0047] The present invention provides a hierarchically scalable cloud network flow analysis method and system, such as Figures 1 to 4 As shown in the figure, the data packet is parsed into chain-like hierarchical information, and then the information is iterated. A general analysis process is used to perform flow analysis by level, and a Flow Record of the flow analysis results at each level is generated and stored globally. The Flow Record contains a Flow ID as a unique identifier. This process decouples the flow analysis processing and storage of each level in the cloud network, and solves the scalability and processing complexity problems caused by the increase and change of levels in the cloud network. At the same time, the Outer Flow ID or inner Flow ID is used to associate the Flow Records of different levels of the same data packet, eliminating the dimensionality explosion problem of the traditional method, and thus cross-level flow association analysis can be performed.
[0048] The hierarchically scalable cloud network flow analysis method, such as Figure 2 As shown, including:
[0049] Step 1: Initialize the device of the present invention. For multi-level messages, the present invention can set the FlowKey of each level to group the messages to meet the analysis requirements, and then perform calculations and analysis. For example, for a three-layer network, the outermost physical layer uses VLAN id as the Flow Key to build the Flow for data statistical analysis, the virtual network layer uses IP Pair as the Flow Key to build the Flow for communication VM analysis, and the innermost container network layer uses the quintuple as the Flow Key to build the Flow for business network data statistical analysis. In addition to Dimension, for scenarios such as TCP channel reuse, the start time Time of the Flow can be added as a dimension for distinction.
[0050] Step 2: Input data packets. The present invention can use data packets collected and input by other systems, or can use common data packet collection technology to collect data packets by itself.
[0051] Step 3: Decode the message into hierarchical information. Data decoding is a general technology. The present invention decodes the data message and then forms a hierarchical information linked list, such as Figure 3 shown.
[0052] Step 4: Perform flow analysis by level. Construct flow for the message level information in step 3 according to the configuration in step 1, and then perform common flow analysis for each level. The analysis result of each level is a set of FlowMeasures with a consistent structure, such as the Netflow structure. At the same time, the flows of different levels of the same data packet are associated using FlowId to perform correlation analysis of flows between different levels.
[0053] Decoding the message into hierarchical information in step 3 includes: organizing the decoded information of the data message into a hierarchical information linked list, such as Figure 3 As shown. tier0 info, tier1 info, tier2 info... represent the layer information connected in order from outside to inside after decoding. Each layer contains complete protocol information, including (but not limited to) as follows:
[0054] L2 info indicates Layer 2 protocol information, such as Ethernet II.
[0055] L2L3 info indicates the protocol information between Layer 2 and Layer 3, such as MPLS and VLAN.
[0056] L3 info indicates layer 3 protocol information, such as IPv4 and IPv6.
[0057] L4 info indicates layer 4 protocol information, such as TCP and UDP.
[0058] Tunnel info indicates tunnel protocol information, such as VXLAN, GRE, and IPinIP.
[0059] App info indicates application layer information, such as HTTP, DNS, etc.
[0060] The process sub-process for performing Flow analysis by level in step 4 is as follows Figure 4 The specific instructions are as follows:
[0061] Step 4.1: Input layer information: Input a set of layer information decoded in step 3.
[0062] Step 4.2: Iterate information from the outermost layer. Iterate from the outermost layer, which is tier 1, until the flow analysis of all layers is completed.
[0063] Step 4.3: Calculate the Flow Key and Flow ID of this layer. The Flow Key is the Dimensions (which may also include time) for constructing each level of Flow specified in the initialization of step 1. The Flow ID is an identifier calculated based on the Flow Key and is used to uniquely mark a Flow.
[0064] Step 4.4: Get the Flow storage unit at this layer. Using the Flow ID, you can query the Flow in the global Flow data (such as a HashMap or a database table). If the Flow already exists and is in the active state, then get the storage unit Flow Record. If the Flow does not exist or has been closed, then create a new Flow Record and store it in the global Flow data. Flow Record generally includes the following content: Flow ID, Outer Flow ID, FlowKey, Flow State and a set of Flow Measures.
[0065] Flow ID is the Flow ID of this layer, which is used as the unique identifier of the data of this layer. It is calculated in step 4.3.
[0066] Flow Key is the Flow Key of this layer, which is a set of specific values of Dimensions. It is configured in step 1 and calculated in step 4.3.
[0067] Outer Flow ID is the Flow ID of the outer layer, which is used to associate with the outer Flow ID to perform inter-level Flow association analysis. Generally, only the Flow ID of the direct outer layer is stored, and the outer layer of the outer layer can be queried recursively. At the same time, FlowID and Outer Flow ID organize the related Flow structure into a tree structure; and the entire Flow data is thus organized into a forest structure (a series of tree structures). Therefore, using Flow ID and Outer Flow ID, cross-level Flow association analysis can be performed from top to bottom or from top to bottom. If you want to speed up the association query, you can also expand the OuterFlow ID structure to directly store all the outer Flow IDs.
[0068] Flow State refers to the state machine of Flow, such as the state machine for maintaining context required for IP reassembly and TCP analysis.
[0069] A set of Flow Measures is a set of common flow measurement information, which is calculated and updated in step 4.5. FlowMeasures generally contains L2, L2L3, L3, L4 and Tunnel measurement information, because this information is common at all levels. App measurement information only exists in the innermost layer, so it can be stored in a separate structure to avoid data waste in the underlay.
[0070] Step 4.5: Perform Flow analysis on this level. The input of this step is (one of) the level information in step 3 and the Flow Record obtained in step 4.4. The output of this step is the updated Flow Record. For multiple levels, these structures are consistent, so a general Flow analysis can be used without special processing for different levels. This step updates the Flow State and Flow Measures in the Flow Record. After the Flow is created, the Flow ID, Outer FlowID, and Flow Key do not need to be updated repeatedly. In addition, since the Dimensions of each level are maintained separately, there will be no dimensional explosion problem due to the increase in levels.
[0071] Step 4.6: End the Flow analysis.
[0072] The hierarchically scalable cloud network flow analysis system includes:
[0073] Module 1: Initialization of the device of the present invention. For multi-level messages, the present invention can set the FlowKey of each level to group the messages to meet the analysis requirements, and then perform calculations and analysis. For example, for a three-layer network, the outermost physical layer uses VLAN id as the Flow Key to build the Flow for data statistical analysis, the virtual network layer uses IP Pair as the Flow Key to build the Flow for communication VM analysis, and the innermost container network layer uses the quintuple as the Flow Key to build the Flow for business network data statistical analysis. In addition to Dimension, for scenarios such as TCP channel reuse, the start time Time of the Flow can be added as a dimension for distinction.
[0074] Module 2: Inputting data packets: The present invention can use data packets collected by other systems, or can use common data packet collection technology to collect data packets by itself.
[0075] Module 3: Decoding messages into hierarchical information. Data decoding is a general technology. The present invention decodes data messages and then forms a hierarchical information linked list, such as Figure 3 shown.
[0076] Module 4: Flow analysis by level. The message level information of module 3 is constructed according to the configuration of module 1, and then a common flow analysis is performed on each level. The analysis result of each level is a set of FlowMeasures with a consistent structure, such as the Netflow structure. At the same time, the Flows of different levels of the same data packet are associated using FlowId to perform correlation analysis of flows between different levels.
[0077] Decoding the message into hierarchical information in module 3 includes: organizing the decoded information of the data message into a hierarchical information linked list, such as Figure 3 As shown. tier0 info, tier1 info, tier2 info... represent the layer information connected in order from outside to inside after decoding. Each layer contains complete protocol information, including (but not limited to) as follows:
[0078] L2 info indicates Layer 2 protocol information, such as Ethernet II.
[0079] L2L3 info indicates the protocol information between Layer 2 and Layer 3, such as MPLS and VLAN.
[0080] L3 info indicates layer 3 protocol information, such as IPv4 and IPv6.
[0081] L4 info indicates layer 4 protocol information, such as TCP and UDP.
[0082] Tunnel info indicates tunnel protocol information, such as VXLAN, GRE, and IPinIP.
[0083] App info indicates application layer information, such as HTTP, DNS, etc.
[0084] The process sub-process for performing flow analysis by level in module 4 is as follows Figure 4 The specific instructions are as follows:
[0085] Module 4.1: Input level information: Input a set of level information decoded in module 3.
[0086] Module 4.2: Iterate information from the outermost layer. Iterate from the outermost layer, which is tier 1, until the flow analysis of all layers is completed.
[0087] Module 4.3: Calculate the Flow Key and Flow ID of this layer. The Flow Key is the Dimensions (which may also include time) for constructing each level of Flow specified in the initialization of Module 1. The Flow ID is an identifier calculated based on the Flow Key and is used to uniquely mark a Flow.
[0088] Module 4.4: Get the Flow storage unit of this layer. Using the Flow ID, you can query the Flow in the global Flow data (such as HashMap or database data table). If the Flow already exists and is in the active state, then get the storage unit Flow Record. If the Flow does not exist or has been closed, then create a new Flow Record and store it in the global Flow data. Flow Record generally includes some content: Flow ID, Outer Flow ID, FlowKey, Flow State and a set of Flow Measures.
[0089] Flow ID is the Flow ID of this layer, which is used as the unique identifier of the data of this layer. It is calculated in module 4.3.
[0090] Flow Key is the Flow Key of this layer, which is a set of specific values of Dimensions. It is configured in module 1 and calculated in module 4.3.
[0091] Outer Flow ID is the Flow ID of the outer layer, which is used to associate with the outer Flow ID to perform inter-level Flow association analysis. Generally, only the Flow ID of the direct outer layer is stored, and the outer layer of the outer layer can be queried recursively. At the same time, FlowID and Outer Flow ID organize the related Flow structure into a tree structure; and the entire Flow data is thus organized into a forest structure (a series of tree structures). Therefore, using Flow ID and Outer Flow ID, cross-level Flow association analysis can be performed from top to bottom or from top to bottom. If you want to speed up the association query, you can also expand the OuterFlow ID structure to directly store all the outer Flow IDs.
[0092] Flow State refers to the state machine of Flow, such as the state machine for maintaining context required for IP reassembly and TCP analysis.
[0093] A set of Flow Measures is a set of common flow measurement information, which is calculated and updated in module 4.5. FlowMeasures generally contains L2, L2L3, L3, L4 and Tunnel measurement information, because this information is common at all levels. App measurement information only exists in the innermost layer, so it can be stored in a separate structure to avoid data waste in the underlay.
[0094] Module 4.5: Perform Flow analysis at this level. The input of this module is (one of) the level information of module 3 and the Flow Record obtained by module 4.4. The output of this module is the updated Flow Record. For multiple levels, these structures are consistent, so a general Flow analysis can be used without special processing for different levels. This module updates the Flow State and Flow Measures in the Flow Record. After the Flow is created, the Flow ID, Outer FlowID and Flow Key do not need to be updated repeatedly. In addition, since the Dimensions of each level are maintained separately, there will be no dimensional explosion problem due to the increase in levels.
[0095] Module 4.6: End Flow analysis.
[0096] Those skilled in the art know that, in addition to implementing the system, device and its various modules provided by the present invention in a purely computer-readable program code, it is entirely possible to implement the same program in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers and embedded microcontrollers by logically programming the method steps. Therefore, the system, device and its various modules provided by the present invention can be considered as a hardware component, and the modules included therein for implementing various programs can also be considered as structures within the hardware component; the modules for implementing various functions can also be considered as both software programs for implementing the method and structures within the hardware component.
[0097] The above describes the specific embodiments of the present invention. It should be understood that the present invention is not limited to the above specific embodiments, and those skilled in the art can make various changes or modifications within the scope of the claims, which does not affect the essence of the present invention. In the absence of conflict, the embodiments of the present application and the features in the embodiments can be combined with each other arbitrarily.
Claims
1. A hierarchically scalable cloud network flow analysis method, characterized in that: include: Step S1: construct a hierarchical network flow analysis structure and initialize the constructed flow analysis dimension information of each level; Step S2: Parse the data message into chain-level information; Step S3: chain-type hierarchical information is analyzed by level, and the flow analysis result Flow Record of each level is generated and stored globally; The step S2 adopts: decoding the data message and forming a hierarchical information linked list; The step S3 comprises: Step S3.1: input a set of layer information decoded in step S2; Step S3.2: Iterate from the outermost layer until the flow analysis of all layers is completed; Step S3.3: Calculate the Flow Key and Flow ID of this layer. The Flow Key is the Dimensions for constructing Flows at each level specified in the initialization of step S11. The Flow ID is an identifier calculated based on the Flow Key and is used to uniquely mark a Flow. Step S3.4: Use the Flow ID to query the global Flow data to obtain the Flow. If the Flow already exists and is in the active state, then obtain the storage unit Flow Record. If the Flow does not exist or has been closed, then create a new Flow Record and store it in the global Flow data. Flow Record includes some contents: Flow ID, Outer Flow ID, Flow Key, Flow State and a set of Flow Measures; a set of Flow Measures is a set of common Flow measurement information; Step S3.5: Perform flow analysis at this level. The input is the level information of step S3 and the flow record obtained in step S3.
4. The output is the updated flow record. In the updated Flow Record, the Flow State and Flow Measures in the Flow Record are updated.
2. The hierarchically scalable cloud network flow analysis method according to claim 1, characterized in that: The step S1 adopts: for multi-level messages, the Flow Key of each level is set to meet the analysis requirements and group the messages.
3. The hierarchically scalable cloud network flow analysis method according to claim 1, characterized in that: The flow analysis result Flow Record includes a Flow ID as a unique identifier; the Flow ID is a unique identifier calculated based on the Flow Key.
4. The hierarchically scalable cloud network flow analysis method according to claim 1, characterized in that: Use OuterFlow ID or inner Flow ID to associate Flow Records of different levels of the same data packet.
5. A hierarchically scalable cloud network flow analysis system, characterized in that: include: Module M1: Constructs a hierarchical network flow analysis structure and initializes the constructed flow analysis dimension information of each level; Module M2: Parse the data message into chain-level information; Module M3: Chain-type hierarchical information is analyzed by level, and the flow analysis results of each level are generated and stored globally. The module M2 adopts: decoding the data message and forming a hierarchical information linked list; The module M3 comprises: Module M3.1: Input a set of hierarchical information decoded from module M2; Module M3.2: Iterate from the outermost layer until all levels of flow analysis are completed; Module M3.3: Calculate the Flow Key and Flow ID of this layer. The Flow Key is the Dimensions for constructing Flows at each level specified in the initialization of module M11. The Flow ID is an identifier calculated based on the Flow Key and is used to uniquely mark a Flow. Module M3.4: Use the Flow ID to query the global Flow data to obtain the Flow. If the Flow already exists and is in the active state, obtain the storage unit Flow Record. If the Flow does not exist or has been closed, create a new Flow Record and store it in the global Flow data. Flow Record includes some contents: Flow ID, Outer Flow ID, Flow Key, Flow State and a set of Flow Measures; a set of Flow Measures is a set of common Flow measurement information; Module M3.5: Performs flow analysis at this level. The input is the level information of module M3 and the flow record obtained by module M3.
4. The output is the updated flow record. In the updated Flow Record, the Flow State and Flow Measures in the Flow Record are updated.
6. The hierarchically scalable cloud network flow analysis system according to claim 5, characterized in that: The module M1 adopts: for multi-level messages, the Flow Key of each level is set to meet the analysis requirements and group the messages.
7. The hierarchically scalable cloud network flow analysis system according to claim 5, characterized in that: The flow analysis result Flow Record includes a Flow ID as a unique identifier; the Flow ID is a unique identifier calculated based on the Flow Key.
8. The hierarchically scalable cloud network flow analysis system according to claim 5, characterized in that: Use OuterFlow ID or inner Flow ID to associate Flow Records of different levels of the same data packet.
Citation Information
Patent Citations
Establishment, identification control method and device for network flow characteristic identification rule
CN102045363A
Establishment, identification control method and device for network flow characteristic identification rule
CN102045363B
Mirror network flow control protocol in virtualization network environment
CN106100999A
A method for controlling the flow of a mirrored network in a virtualized network environment
CN106100999B
A session analysis method, device and storage medium
CN107483507B
