Flow table compression method based on online computing
By adopting a stream table compression method based on on-network computing in a software-defined network, using a binary tree structure and a compression algorithm to generate an expression stream table, and transmit it to a network programmable switch for hardware acceleration, the flow in the existing technology is solved. The problems of low table compression efficiency and limited rule storage achieve efficient network traffic processing and high compression rate regular compression.
Patent Information
- Application Number
- CN202411620221.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-14
- Publication Date
- 2025-02-18
AI Technical Summary
In the existing software-defined network, the server-side load is too heavy when processing short traffic, resulting in some short traffic being discarded; while the FIFTA method has high requirements for rule characteristics and cannot effectively aggregate rules with few overlaps in scope, resulting in compression effect. Poor, especially when rules are updated frequently, network traffic processing efficiency is reduced.
Using the flow table compression method based on on-network calculation, the software-side control surface converts the flow table rules into a binary tree structure, generates the expression flow table through pruning and queries compression algorithms, and transmits the expression rules to the custom protocol. Network programmable switches that use hardware to accelerate computing and matching network traffic.
It effectively reduces the scale of the flow table, improves network traffic processing efficiency, reduces communication overhead, realizes high compression rate expression rule compression, and solves the problem of restricted rule storage in network programmable switches.
Smart Images

Figure CN119484653A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of software defined networks, and in particular relates to a flow table compression method based on on-network computing. Background Art
[0002] The development of cloud computing has enabled the large-scale application of distributed systems, and large-scale network traffic exchange has been generated in distributed systems. Traditional switches only support standard flow rule deployment, have low storage scale and are difficult to update, and cannot cope with the explosive network traffic transmission of distributed systems. It is very important to build efficient and highly compressed flow rules to support large-scale traffic processing. Software-defined networks separate the control plane and data plane of traditional networks. The control plane is placed on the server side to simulate and implement complex network functions, and the data plane is deployed on the switch side to store flow rules and process traffic. Software-defined network technology is used to implement flow rule compression and is deployed on switches to accelerate distributed applications.
[0003] The Devoflow method proposed in 2011 separates network flows of different sizes on the control plane of the software-defined network. The control plane processes short flows on the software side and hands over long flows to the data plane on the network side, reducing the communication frequency to improve the efficiency of network traffic processing. The FIFTA method proposed in 2014 deeply analyzes the rule characteristics, analyzes the rule characteristics and actions on the control plane of the software side, aggregates the flow tables with the same actions and the same range in offline and online methods, thereby reducing the scale of the flow tables and deploying them to the data plane.
[0004] Although the Daveflow method achieves high network processing efficiency, it mainly separates traffic and processes short flows on the server side. When there is too much short flow and it is triggered frequently, the server-side load processing is limited, causing some short flows to be discarded, resulting in network forwarding errors. The FIFTA method has high requirements on the characteristics of rules and cannot effectively aggregate rules with little overlap. The compression effect is poor in applications such as firewalls. When the rules are updated frequently, the online aggregation function will be executed all the time, reducing the efficiency of network traffic processing. Summary of the invention
[0005] In view of the insufficiency of the aggregation method on the software side and the insufficient traffic processing capability on the software side, the present invention provides a flow table compression method based on network computing. The control plane is used on the software side to realize the compression of the expression flow table, and the network programmable switch is deployed with the technology of network computing. When matching traffic, arithmetic calculation is performed to reduce the scale of the flow table, and the hardware capability is used to accelerate the calculation process and improve the efficiency of traffic processing.
[0006] In order to achieve the above object, the present invention adopts the following technical solutions:
[0007] A flow table compression method based on network computing, the method comprising the following steps:
[0008] Step 1: Set and initialize the flow table rules, and convert the flow table rules into a binary tree structure;
[0009] Step 2: Prune the binary tree structure to obtain non-overlapping rules. The non-overlapping rules are composed in the form of key-mask-action.
[0010] Furthermore, the specific operations of step 2 are:
[0011] De-duplicate the flow table range using a binary tree structure: Cover the paths of the binary tree structure, loop through all paths, find the same paths and prune them to obtain a binary tree with no duplicate paths, that is, to obtain non-overlapping rules. Then rewrite the pruned binary tree into a flow table structure in the form of key-mask-action.
[0012] Step 3: Use the union-check compression algorithm to partition the non-overlapping rules, and enumerate 7 expression operators in the same area. Obtaining the optimal number of expression rules;
[0013] Furthermore, the specific operations of step 3 are:
[0014] Design a method to merge mask intervals to reduce the number of different masks:
[0015] Consider each mask as a set. That is, if the interval of mask_j contains mask_i, then the rules of mask_i are merged into mask_j, and all masks are traversed through double loops to determine whether the two current masks have an inclusion relationship; when there is an inclusion relationship, the two masks are merged and the merged masks are marked as merged, until they cannot be merged, and each mask is regarded as a partition P.
[0016] After merging the mask intervals, this merging method obtains different partitions, each of which contains expression rules. By specifying the expression flow table form and enumerating the seven expression operators supported by the network programmable switch, the optimal number of expression rules is obtained, covering all the rules in the partition and completing the flow table compression process.
[0017] When obtaining expression rules, if the expression can calculate different results after final enumeration, the present invention also maps the results with the execution actions to ensure that the execution actions can be executed correctly and achieve expression rule compression with a high compression rate.
[0018] Step 4: Design an FRC protocol to transfer the expression rules to the register of the network programmable switch for storage; the FRC protocol defines the arithmetic operation process and flow matching method of the expression flow table in the network programmable switch;
[0019] Furthermore, the specific operations of step 4 are:
[0020] According to the pre-configured state automaton of the network programmable switch, the FRC protocol data packet is parsed, the FRC protocol data packet is determined by identifying the identification bit of the reserved service type field in the original IP protocol header, and the expression rules in the FRC load are extracted. The expression flow table is identified through the pipeline, and the expression flow table is transferred to the register of the network programmable switch for storage, and the matching parameters of the corresponding expression are generated.
[0021] Furthermore, the FRC protocol includes a traditional Ethernet header, an IP header, a UDP header and a custom FRC header and an FRC payload;
[0022] Furthermore, the FRC header carries a NUM field to mark the number of rules carried by the data packet;
[0023] Furthermore, the FRC payload carries NUM expression rules, each of which is composed of a four-tuple of a tag, a priority, a match vector, and an action.
[0024] Furthermore, the FRC protocol identifies the data packet of the FRC protocol by using the identification bit in the reserved service type field of the original IP protocol header, wherein 0 in the identification bit identifies a common data packet and 1 identifies an FRC data packet.
[0025] Step 5: Implement a rule matching method in the network programmable switch to calculate and match network traffic according to the expression rule, and forward the network traffic according to the action field of the expression rule.
[0026] Furthermore, the network programmable switch updates the flow table stored in the network programmable switch through the designed FRC protocol, and then adds, updates, and deletes the flow table stored in the register by parsing the new flow table and corresponding parameters in the data packet.
[0027] Furthermore, the register module in the network programmable switch includes register replacement storage content and content matching operations. After a normal data packet arrives at the network programmable switch port, it is parsed and forwarded to the pipeline. The network programmable switch takes out the corresponding expression rule in the register, matches the data packet and forwards it. The network programmable switch replaces the relevant content in the register through an update operation.
[0028] Furthermore, steps 1 to 3 are performed on the software-side control plane, and steps 4 to 5 are performed on the network programmable switch.
[0029] Compared with the prior art, the present invention has the following advantages:
[0030] The present invention proposes a flow table compression method based on network computing. The expression flow table is generated by using the rule binary tree deduplication and joint query compression technology of the software-side control plane, and the flow table is unloaded to the programmable switch data plane through a custom protocol. The switch hardware is used to accelerate data packet calculation and matching to reduce network communication overhead. Compared with the existing compression technology FIFTA, in an experimental test environment with two 32-core 2.5GHz servers and programmable switches, 200,000 rules, and 10 million data flows, this method can reduce communication overhead by 40%-60%, and can compress the rules to about 500, effectively solving the problem of limited rule storage in network programmable switches, and providing a new solution for network traffic processing of distributed applications under cloud computing. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 is a flow chart of the flow table compression method of the present invention;
[0032] Figure 2 It is a diagram showing the conversion of flow table rules into binary trees and the pruning process of the present invention;
[0033] Figure 3 It is a schematic diagram of data flow in a programmable switch of the present invention;
[0034] Figure 4 It is a schematic diagram comparing the execution time of the method of the present invention and the prior art method;
[0035] Figure 5 It is a pseudo code schematic diagram of the binary tree generation and pruning algorithm of the present invention;
[0036] Figure 6 It is a pseudo code schematic diagram of the parallel-check compression algorithm of the present invention;
[0037] Figure 7 is a schematic diagram of a flow table compression process of a specific example of the present invention;
[0038] Figure 8 It is a schematic diagram of the FRC protocol design of the present invention. DETAILED DESCRIPTION
[0039] In order to gain a deeper understanding of the present invention, we will provide a comprehensive and detailed description of the present invention. However, the present invention has multiple implementations and is not limited to the specific examples listed herein. The presentation of these examples is intended to deepen the comprehensive understanding of the disclosure of the present invention.
[0040] Figure 1 It is a flow chart of a flow table compression method based on online computing. Figure 7 This is a specific example. The specific steps are as follows:
[0041] Step 1: Set and initialize the flow table and convert it into a binary tree structure;
[0042] Set a flow table containing 6 common rules: R1(1,****,15), R2(2,0***,11), R3(3,*0**,7), R4(4,1***,11), R5(5,*1**,7), R6(6,00**,3);
[0043] Step 2: Prune the binary tree structure to obtain non-overlapping rules. The non-overlapping rules are composed in the form of key-mask-action.
[0044] First follow Figure 5 Pseudocode and Figure 2 Binary tree structure generation and pruning example, converting 6 rules into a binary tree structure. The specific forwarding method is based on Figure 5 The pseudo code in is then used to prune the low-priority rules. In this example, the binary tree of R6 is first used to prune the binary tree of the remaining 5 rules, then R5 is used to prune the remaining 4 rules, R4 is used to prune the remaining 3 rules, and so on. Finally, R2 is used to prune the R1 rule.
[0045] After finding duplicate paths in the binary tree and pruning them, the rules are as follows: R1 is covered by paths of other rules and is discarded; R2 is also covered by paths of other rules and is discarded; R3 is also completely covered and is discarded; R4 is retained to (4,10**,11); R5 is retained to (5,*1**,7); and R6 is retained to (6,00**,3).
[0046] At this point, it is ensured that the rules do not overlap each other, so the rules are rewritten into three new rules, TR4 (1000, 1100, 11), TR5 (0100, 0100, 7), TR6 (0000, 1100, 3), which all belong to the key-mask-action form mentioned in the invention;
[0047] Step 3: Use the union-check compression algorithm to partition the non-overlapping rules, and enumerate 7 expression operators in the same area. Obtaining the optimal number of expression rules;
[0048] Then follow Figure 6The above three rules are first partitioned according to the combined query compression algorithm. Since mask = 1100 can cover the masks of the above three rules as a partition, Figure 6 The method shown can put the three rules into the same area P, where area mask=1100.
[0049] In the same region P, by enumerating operators, it can be calculated that the expression rule exp=(matching vector & 1100)+3 can cover the above three rules, so the final expression rule can be written as ExpR=(pri=1,****,exp=(matching vector & 1100)+3).
[0050] When obtaining expression rules, if the expression can calculate different results after final enumeration, the present invention also maps the results with the execution actions to ensure that the execution actions can be executed correctly and achieve expression rule compression with a high compression rate.
[0051] Step 4: Design an FRC protocol to transfer the expression rules to the register of the network programmable switch for storage; the FRC protocol defines the arithmetic operation process and flow matching method of the expression flow table in the network programmable switch;
[0052] Step 5: Implement a rule matching method in the network programmable switch to calculate and match network traffic according to the expression rule, and forward the network traffic according to the action field of the expression rule;
[0053] according to Figure 8 The designed protocol fills the expression rules into the data packet according to the fields and sends it to the network programmable switch for unloading. The network programmable switch Figure 3 parse the data flow graph, construct functions, and store the rules in registers;
[0054] When the number of rules is large, this method can achieve effective compression. In the simulation process of the method of the present invention, the data set contains 200,000 rules. The method can compress the rules to about 500, achieving a compression rate of 99.8%. The efficiency of processing 10 million data packets is 40%-60% higher than that of other methods. Figure 4 shown.
[0055] Although a flow table compression method based on network computing of the present invention has been described in conjunction with a specific implementation method, the present invention is not limited thereto. Ordinary technicians in the relevant technical field can also make various changes and deformations without departing from the spirit and scope of the present invention, so all equivalent technical solutions also belong to the scope of the present invention, and the patent protection scope of the present invention should be defined by the claims.
[0056] The contents not described in detail in the specification of the present invention belong to the prior art known to the professional and technical personnel in the field. Although the illustrative specific embodiments of the present invention are described above to facilitate the understanding of the present invention by the technical personnel in the field, it should be clear that the present invention is not limited to the scope of the specific embodiments. For the ordinary technical personnel in the field, as long as various changes are within the spirit and scope of the present invention defined and determined by the attached claims, these changes are obvious, and all inventions and creations using the concept of the present invention are protected.
Claims
1. A flow table compression method based on network computing, characterized in that: The method comprises the following steps: Step 1: Set and initialize the flow table rules, and convert the flow table rules into a binary tree structure; Step 2: Prune the binary tree structure to obtain non-overlapping rules. The non-overlapping rules are composed in the form of key-mask-action. Step 3: Use the union-check compression algorithm to partition the non-overlapping rules, and enumerate seven expression operators in the same area to obtain the optimal number of expression rules; Step 4: Design an FRC protocol to transfer the expression rules to the register of the network programmable switch for storage; Step 5: Implement the expression rule matching method in the network programmable switch, calculate and match the network traffic of the expression rule, and then forward the network traffic according to the action field of the expression rule.
2. A flow table compression method based on network computing according to claim 1, characterized in that: The step 2 prunes the binary tree structure to obtain non-overlapping rules. The specific steps of the non-overlapping rules in the form of key-mask-action are as follows: Deduplication of flow table range through binary tree structure: Cover the paths of the binary tree structure, traverse all paths in a loop, find the same paths and prune them, and obtain a binary tree with no repeated paths, that is, obtain non-overlapping rules, and then rewrite the pruned binary tree into a flow table structure in the form of key-mask-action.
3. A flow table compression method based on network computing according to claim 2, characterized in that: In step 3, the non-overlapping rules are partitioned by using a union-check compression algorithm. The specific operation of obtaining the optimal number of expression rules by enumerating 7 expression operators in the same area is as follows: Design a method to merge mask intervals to reduce the number of different masks: Consider each mask as a set. That is, if the interval of mask_j contains mask_i, then the rules of mask_i are merged into mask_j, and all masks are traversed through double loops to determine whether the two current masks have an inclusion relationship; when there is an inclusion relationship, the two masks are merged and the merged masks are marked as merged, until they cannot be merged, and each mask is regarded as a partition P.
4. A flow table compression method based on network computing according to claim 3, characterized in that: The specific operation of designing an FRC protocol to transfer the expression rules to the register of the network programmable switch for storage is as follows: According to the pre-configured state automaton of the network programmable switch, the FRC protocol data packet is parsed, the FRC protocol data packet is determined by identifying the identification bit of the reserved service type field in the original IP protocol header, and the expression rules in the FRC load are extracted. The expression flow table is identified through the pipeline, and the expression flow table is transferred to the register of the network programmable switch for storage, and the matching parameters of the corresponding expression are generated.
5. A flow table compression method based on network computing according to claim 4, characterized in that: The FRC protocol includes a traditional Ethernet header, an IP header, a UDP header, and a custom FRC header and FRC payload; The FRC header carries a NUM field to mark the number of rules carried by the data packet; The FRC payload carries NUM expression rules, each of which consists of a four-tuple of a tag, a priority, a match vector, and an action.
6. A method for compressing a flow table based on network computing according to claim 5, characterized in that: The FRC protocol identifies the data packet of the FRC protocol by using the identification bit in the reserved service type field of the original IP protocol header, wherein 0 in the identification bit identifies a normal data packet and 1 identifies an FRC data packet.
7. A flow table compression method based on network computing according to claim 6, characterized in that: The network programmable switch updates the flow table stored in the network programmable switch through the designed FRC protocol, and then adds, updates, and deletes the flow table stored in the register by parsing the new flow table and corresponding parameters in the data packet.
8. A flow table compression method based on network computing according to claim 7, characterized in that: The register module in the network programmable switch includes register replacement storage content and content matching operations. When a normal data packet arrives at the network programmable switch port, it is forwarded to the pipeline after parsing. The network programmable switch takes out the corresponding expression rule in the register, matches the data packet and forwards it. The network programmable switch replaces the relevant content in the register through an update operation.
9. A flow table compression method based on network computing according to claim 8, characterized in that: The steps 1 to 3 are performed on the software-side control plane, and steps 4 to 5 are performed on the network programmable switch.