A method and device for batch updating of SDN flow rules

By constructing rule dependency graphs and bipartite graph models, zero-movement batch updates of SDN flow rules are achieved, solving the problem of high TCAM update costs and improving TCAM storage efficiency and packet forwarding correctness.

CN121530905BActive Publication Date: 2026-03-27CHANGSHA UNIVERSITY OF SCIENCE AND TECHNOLOGY
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-01-16
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

In large-scale networks, existing technologies have failed to effectively address the problem of TCAM flow table resource scarcity, resulting in high TCAM update costs and packet forwarding semantic errors, which affect the widespread application and continuous deployment of SDN.

Method used

By constructing a rule dependency graph, the candidate address range of SDN flow rules in the TCAM master rule table is determined, available flow table entries are retrieved, and a bipartite graph model is constructed to solve the maximum matching problem, thereby achieving zero-movement batch updates of flow rules and reducing frequent modifications to the TCAM master rule table.

Benefits of technology

It improves TCAM storage efficiency, reduces update costs, ensures the correctness of packet forwarding semantics, and enhances flow table lookup performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121530905B_ABST
    Figure CN121530905B_ABST
Patent Text Reader

Abstract

The application relates to an SDN flow rule batch updating method and device, which comprises the following steps: in the case that multiple first SDN flow rules are temporarily stored in a temporary rule table of a ternary content addressable memory, determining a candidate address range of each first SDN flow rule in a main rule table of the ternary content addressable memory based on a rule dependency graph, and searching for available flow table entries in the main rule table; solving a maximum matching problem of a bipartite graph to obtain a matching result; and updating the multiple first SDN flow rules in the main rule table according to the matching result. The candidate address range of the SDN flow rule in the main rule table is determined based on the rule dependency graph, available flow table entries in the range are searched, a to-be-updated rule-available table entry bipartite graph is constructed and a maximum matching thereof is solved, and zero movement updating is realized; the application can reduce frequent changes to the main rule table of the TCAM, improve the storage efficiency of the TCAM, and reduce the updating cost as much as possible.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] Embodiments of the present application relate to the technical field of SDN flow table, in particular to an SDN flow rule batch updating method and device. BACKGROUND

[0002] Software Defined Networking (SDN) is a new network architecture which separates data control and software programmable. It separates control plane and data plane by SDN technology. The control plane is responsible for central management and forwarding policy distribution, while the network device in the data plane focuses on packet forwarding.

[0003] Currently, SDN mainly uses data plane programming language to flexibly define flow rules to guide the packet forwarding behavior of the switch, and introduces a wildcard in the matching field to achieve flexible management of network traffic at different granularities. To support wildcard lookup, SDN switches usually use Ternary Content Addressable Memory (TCAM) to store flow tables to achieve fast packet classification.

[0004] When SDN is deployed in large-scale networks such as data centers and space-air-ground integrated networks, the number of concurrent flows in the network is large, and the number of flow table entries increases sharply. At the same time, with the increasing number of services deployed on the Internet, the number of flow rules is also increasing rapidly. However, with the sharp increase in the number of flow rules, and the existing scheme does not consider the problem of batch updating of flow rules, which leads to huge TCAM update cost. Therefore, while effectively alleviating the shortage of TCAM flow table resources, how to ensure the correctness of the packet forwarding semantics and reduce the TCAM update cost is a problem that needs to be solved in the wide application, continuous deployment and continuous evolution of SDN. SUMMARY

[0005] The following is a summary of the subject matter described in detail herein. This summary is not intended to limit the scope of the claims.

[0006] The main purpose of the embodiments of the present disclosure is to propose an SDN flow rule batch updating method and device, which can reduce the frequent changes to the main rule table of TCAM, improve the efficiency of TCAM storage, and minimize the update cost.

[0007] In a first aspect, the present application provides an SDN flow rule batch updating method, comprising:

[0008] The first SDN flow rules are temporarily stored in a temporary rule table of the ternary content addressable memory, and a candidate address range of each first SDN flow rule in a main rule table of the ternary content addressable memory is determined based on a rule dependency graph when an update condition of the temporary rule table is met, wherein the rule dependency graph at least includes a dependency relationship between an SDN flow rule stored in the main rule table and the first SDN flow rules;

[0009] An available flow entry is retrieved in the main rule table according to each first SDN flow rule and the candidate address range thereof, wherein the available flow entry at least includes an idle flow entry and a flow entry to be recycled;

[0010] A bipartite graph is constructed, wherein a first vertex set is a set of the first SDN flow rules, a second vertex set is the available flow entries in the candidate address range corresponding to each first SDN flow rule, and an edge of the bipartite graph exists when a physical address of the available flow entry is in the candidate address range of the corresponding first SDN flow rule;

[0011] A maximum matching problem of the bipartite graph is solved to obtain a matching result;

[0012] The first SDN flow rules are updated in the main rule table according to the matching result.

[0013] The SDN flow rule batch updating method provided by the embodiment has at least the following beneficial effects:

[0014] The method determines a candidate address range of the SDN flow rules to be updated in the main rule table based on a rule dependency graph, retrieves available flow entries in the range, constructs a bipartite graph model of the rules to be updated and the available flow entries, and solves a maximum matching problem to realize zero movement updating, batch processing of the flow rules, reduction of frequent changes to the main rule table of the TCAM, improvement of the efficiency of TCAM storage, and minimization of update costs.

[0015] In a second aspect, the application provides an SDN flow rule batch updating device, which comprises:

[0016] A candidate address acquisition module is configured to determine a candidate address range of each first SDN flow rule in a main rule table of a ternary content addressable memory based on a rule dependency graph when a plurality of first SDN flow rules are temporarily stored in a temporary rule table of the ternary content addressable memory and an update condition of the temporary rule table is met, wherein the rule dependency graph at least includes a dependency relationship between an SDN flow rule stored in the main rule table and the first SDN flow rules;

[0017] The flow table item determination module is configured to search for available flow table items in the main rule table according to each first SDN flow rule and the candidate address range thereof; wherein the available flow table items at least include idle flow table items and flow table items to be recycled.

[0018] The bipartite graph construction module is configured to construct a bipartite graph; the bipartite graph includes two vertex sets, wherein the first vertex set is a set composed of the plurality of first SDN flow rules, and the second vertex set is the available flow table items in the candidate address range corresponding to each first SDN flow rule, and the existence condition of the edge of the bipartite graph is that the physical address of the available flow table item is located in the candidate address range of the corresponding first SDN flow rule.

[0019] The bipartite graph solution module is configured to solve the maximum matching problem of the bipartite graph to obtain a matching result.

[0020] The flow rule updating module is configured to update the plurality of first SDN flow rules in the main rule table according to the matching result.

[0021] In a third aspect, the present application provides an electronic device, comprising at least one controller and a memory connected to the controller; the memory stores instructions executable by the at least one controller, and the instructions are executed by the at least one controller to make the at least one controller execute the above-mentioned SDN flow rule batch updating method.

[0022] In a fourth aspect, the present application provides a computer readable storage medium, which stores computer executable instructions for making a computer execute the above-mentioned SDN flow rule batch updating method.

[0023] Additional aspects and advantages of the present application will be in part apparent and in part pointed out hereinafter. BRIEF DESCRIPTION OF DRAWINGS

[0024] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiments or related technical description. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.

[0025] Figure 1 is a flow diagram of an SDN flow rule batch updating method provided by the embodiments of the present application;

[0026] Figure 2is a flow block diagram of a method for batch updating of SDN flow rules according to another embodiment of the present application;

[0027] Figure 3 is a schematic diagram of a rule dependency graph according to an embodiment of the present application;

[0028] Figure 4 is a comparison diagram of incremental updating and batch updating according to an embodiment of the present application;

[0029] Figure 5 is a diagram of zero-movement batch updating of rules according to an embodiment of the present application;

[0030] Figure 6 is a diagram of an optimal rule updating strategy solving process according to an embodiment of the present application;

[0031] Figure 7 is a diagram of an optimal rule updating strategy according to an embodiment of the present application;

[0032] Figure 8 is a diagram of all flow table entries in a flow table according to an embodiment of the present application;

[0033] Figure 9 is a diagram of a TCAM storage yield rate according to an embodiment of the present application;

[0034] Figure 10 is a diagram of flow rule placement according to an embodiment of the present application;

[0035] Figure 11 is a diagram of flow rule lookup according to an embodiment of the present application;

[0036] Figure 12 is a diagram of flow rule insertion according to an embodiment of the present application;

[0037] Figure 13 is a flow diagram of SDN flow rule placement in Figure 12

[0038] Figure 14 is a two-stage batch updating flow diagram in Figure 12

[0039] Figure 15 is a diagram of flow rule deletion according to an embodiment of the present application;

[0040] Figure 16 is a structural diagram of a device for batch updating of SDN flow rules according to an embodiment of the present application;

[0041] Figure 17 is a structural diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION​​

[0042] In order to make the purpose, technical solutions and advantages of the present application more clear, the present application is further described in detail below in combination with the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and not to limit the present application.

[0043] In the description of the present application, if there is a description of first, second, etc., it is only for the purpose of distinguishing technical features, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features or implicitly indicating the sequence of indicated technical features.

[0044] In the description of the present application, it should be understood that the position description, such as the position or location relationship indicated by up, down, etc., is based on the position or location relationship shown in the drawings, only for the purpose of facilitating the description of the present application and simplifying the description, and is not to indicate or imply that the indicated device or element must have a specific position, be constructed in a specific position and function, therefore, it cannot be understood as a limitation of the present application.

[0045] Software Defined Networking (SDN) is a new network architecture with data control separation and software programmability. It separates the control plane and the data plane through SDN technology. The control plane is responsible for central management and forwarding policy allocation, while the network devices in the data plane focus on packet forwarding.

[0046] Currently, SDN mainly uses a data plane programming language to flexibly define flow rules to guide the packet forwarding behavior of the switch, and introduces a wildcard in the matching field to realize flexible management of network traffic at different granularities. To support wildcard lookup, SDN switches usually use Ternary Content Addressable Memory (TCAM) to store flow tables to realize fast packet classification.

[0047] When SDN is deployed in large-scale networks such as data centers and space-air-ground integrated networks, the number of concurrent flows in the network is large, and the number of flow table entries increases sharply. At the same time, with the increasing number of services deployed on the Internet, the number of flow rules is also increasing rapidly. However, with the sharp increase in the number of flow rules, and the existing scheme does not consider the batch update of flow rules, resulting in huge TCAM update cost. Therefore, while effectively alleviating the shortage of TCAM flow table resources, how to ensure the correctness of the packet forwarding semantics and reduce the TCAM update cost is a problem that needs to be solved urgently in the wide application, continuous deployment and continuous evolution of SDN.

[0048] To solve the above technical problems, the embodiment of the present application provides a batch updating method of SDN flow rules, which comprises the following steps:

[0049] In step S110, when a plurality of first SDN flow rules are temporarily stored in a temporary rule table of a ternary content addressable memory and the updating condition of the temporary rule table is met, a candidate address range of each first SDN flow rule in a main rule table of the ternary content addressable memory is determined based on a rule dependency graph; the rule dependency graph at least comprises a dependency relationship between the SDN flow rules stored in the main rule table and the plurality of first SDN flow rules;

[0050] In step S120, according to each first SDN flow rule and the candidate address range thereof, a usable flow table entry is searched in the main rule table; wherein the usable flow table entry at least comprises an idle flow table entry and a flow table entry to be recycled;

[0051] In step S130, a bipartite graph is constructed; the bipartite graph comprises two vertex sets, wherein the first vertex set is a set composed of the plurality of first SDN flow rules, and the second vertex set is a set of the usable flow table entries in the candidate address range corresponding to each first SDN flow rule, and the existence condition of the edge of the bipartite graph is that the physical address of the usable flow table entry is located in the candidate address range of the corresponding first SDN flow rule;

[0052] In step S140, a maximum matching problem of the bipartite graph is solved to obtain a matching result;

[0053] In step S150, according to the matching result, the plurality of first SDN flow rules are updated in the main rule table.

[0054] As Figure 1 and Figure 2 , there are a main rule table and a temporary rule table in a ternary content addressable memory (TCAM), wherein the temporary rule table is used to store newly issued SDN flow rules, the SDN flow rules can be flow rules issued by an SDN controller, and the flow rules comprise a matching field, a content field and a TCAM storage yield rate.

[0055] When the flow rules issued by the SDN controller are stored in the temporary rule table, the flow table lookup can be preferentially searched to ensure the semantic forwarding correctness. In the embodiment, for the newly issued SDN flow rules, they are temporarily stored in the temporary rule table, and when the updating condition of the temporary rule table is met, batch updating can be performed. In some embodiments of the present application, the updating condition comprises that the number of the plurality of first SDN flow rules is greater than a threshold value, or the time interval between the current time and the last updating exceeds a threshold value. According to the priority dependency relationship between all the flow rules, a rule dependency graph set can be constructed, the rule dependency graph set comprises a plurality of rule dependency graphs, and the rule dependency graph is a directed acyclic graph composed of a plurality of mutually dependent flow rules, for exampleFigure 3 For example, the SDN flow rule has a dependency chain with another SDN flow rule has a dependency chain with another SDN flow rule has a dependency chain with another SDN flow rule

[0056] In a large-scale network scenario, the existing differentiated storage solutions all use the single rule update method to update the rules, and the TCAM update cost is high. Therefore, in step S110, the first SDN flow rule is the SDN flow rule temporarily stored in the temporary rule table, and when the batch update condition is met, the currently temporarily stored first SDN flow rule is batch updated to the main rule table of the TCAM. The method of batch updating rules is designed in this embodiment, and by pre-calculating the final state of the main rule table of the TCAM, unnecessary rule movement in incremental update is avoided, thereby reducing the cost of rule movement.

[0057] As shown in Figure 4 , the SDN flow rule to be updated needs to be updated to the main rule table of the TCAM, and a total of 12 movements are required by using the single flow rule update method for each flow rule, while the batch update can directly calculate the final state of the TCAM, and only 3 movements are required in the update. Specifically, the switch continuously collects the flow rules that need to be updated, and whenever a new flow rule is issued or an existing flow rule is modified, the flow rule is temporarily stored in the temporary rule table. When the temporary rule table reaches the update condition, batch processing is performed on these flow rules, which can reduce the frequent modification of the main rule table of the TCAM, and at the same time, since multiple SDN flow rules can be updated at one time, the number of rule movements is further reduced, thereby improving the efficiency of TCAM storage.

[0058] As shown in Figure 5 , first, in step S110, for the batch of flow rules to be updated, i.e., the plurality of first SDN flow rules, based on the rule dependency graph, the candidate address range of each first SDN flow rule in the main rule table of the TCAM is determined. Then, in step S120, according to each first SDN flow rule and its candidate address range, the available flow table entries in the main rule table are searched, and the available flow table entries include the idle flow table entries and the flow table entries to be recycled. Then, in step S130, a rule-available table entry bipartite graph model is constructed for each first SDN flow rule and its corresponding available flow table entry , which represents: the rule set of the batch of first SDN flow rules to be updated; the vertex set represents: the set of available flow table entries (including idle flow table entries and flow table entries to be recycled) in the candidate address interval corresponding to each first SDN flow rule, and the edge exists under the condition that the flow table entry The physical address is located in the rule Within the candidate address range. In step S140, by solving the maximum matching problem of the bipartite graph, that is, finding the mapping scheme that maximizes the number of matching edges, the obtained maximum matching result is the optimal solution with zero movement. In step S150, when applying this solution to the batch update operation, the multiple first SDN flow rules to be updated in this batch can be updated with zero movement in the TCAM's main rule table, minimizing the update cost as much as possible.

[0059] This embodiment provides a batch update method for SDN flow rules. Based on the rule dependency graph, the method determines the candidate address range of the SDN flow rule to be updated in the main rule table, retrieves available flow table entries within this range, constructs a bipartite graph model of the rule to be updated and available table entries, and solves for its maximum match to achieve zero-movement update. Batch processing of these flow rules can reduce frequent modifications to the TCAM main rule table, improve the efficiency of TCAM storage, and minimize update costs.

[0060] In some embodiments of this application, after storing multiple first SDN flow rules in the main rule table according to the matching results in step S150, the method further includes:

[0061] Step S160: Construct a two-dimensional state matrix in the presence of at least one second SDN flow rule. The second SDN flow rule is the first SDN flow rule that has not been updated in the main rule table. Before the main rule table Before deployment in each flow table entry Minimum cumulative cost of an SDN flow rule:

[0062] ;

[0063] in, The upper limit value is , The total capacity of the flow table entries in the main rule table. The upper limit value is , This is the total number of at least one second SDN flow rule and SDN flow rules that have been deployed in the main rule table and do not need to be deleted;

[0064] Step S170, with Minimize as the optimal deployment goal, targeting Execute the retention policy or deployment policy;

[0065] Retention strategies include:

[0066] in front The SDN flow rules have been optimally deployed in the front the first flow table entry, and the second flow table entry does not exist the SDN flow rule, determining whether the SDN flow rule stored in the first flow table entry is same as the SDN flow rule to be updated, in the case that the SDN flow rule stored in the first flow table entry is same as the SDN flow rule to be updated, letting ;

[0067] In the case that the first SDN flow rule has been optimally deployed in the first flow table entry, and the second flow table entry does not exist the SDN flow rule, determining whether the SDN flow rule stored in the first flow table entry is same as the SDN flow rule to be updated, in the case that the SDN flow rule stored in the first flow table entry is same as the SDN flow rule to be updated, letting ; In the case that the first SDN flow rule has been optimally deployed in the first flow table entry, and the second flow table entry does not exist the SDN flow rule, determining whether the SDN flow rule stored in the first flow table entry is same as the SDN flow rule to be updated, in the case that the SDN flow rule stored in the first flow table entry is same as the SDN flow rule to be updated, letting ;

[0068] The deployment strategy comprises:

[0069] In the case that the first SDN flow rule has been optimally deployed in the first flow table entry, and the second flow table entry is the idle flow table entry, inserting the first SDN flow rule into the second flow table entry, and letting In the case that the first SDN flow rule has been optimally deployed in the first flow table entry, and the second flow table entry is the idle flow table entry, inserting the first SDN flow rule into the second flow table entry, and letting In the case that the first SDN flow rule has been optimally deployed in the first flow table entry, and the second flow table entry is not the idle flow table entry, determining whether the SDN flow rule stored in the first flow table entry is same as the SDN flow rule to be updated, in the case that the SDN flow rule stored in the first flow table entry is same as the SDN flow rule to be updated, letting ;

[0070] In the case that the first SDN flow rule has been optimally deployed in the first flow table entry, and the second flow table entry is not the idle flow table entry, determining whether the SDN flow rule stored in the first flow table entry is same as the SDN flow rule to be updated, in the case that the SDN flow rule stored in the first flow table entry is same as the SDN flow rule to be updated, letting ; In the case that the first SDN flow rule has been optimally deployed in the first flow table entry, and the second flow table entry is not the idle flow table entry, determining whether the SDN flow rule stored in the first flow table entry is same as the SDN flow rule to be updated, in the case that the SDN flow rule stored in the first flow table entry is same as the SDN flow rule to be updated, letting ; In the case that the first SDN flow rule has been optimally deployed in the first flow table entry, and the second flow table entry is not the idle flow table entry, determining whether the SDN flow rule stored in the first flow table entry is same as the SDN flow rule to be updated, in the case that the SDN flow rule stored in the first flow table entry is same as the SDN flow rule to be updated, letting ; In the case that the first SDN flow rule has been optimally deployed in the first flow table entry, and the second flow table entry is not the idle flow table entry, determining whether the SDN flow rule stored in the first flow table entry is same as the SDN flow rule to be updated, in the case that the SDN flow rule stored in the first flow table entry is same as the SDN flow rule to be updated, letting ;

[0071] In the case that the first SDN flow rule has been optimally deployed in the first flow table entry, and the second flow table entry is not the idle flow table entry, determining whether the SDN flow rule stored in the first flow table entry is same as the SDN flow rule to be updated, in the case that the SDN flow rule stored in the first flow table entry is same as the SDN flow rule to be updated, letting

[0072] ; Figure 6 ​​​​​​​As shown, the flow entry update operation is abstracted into three types of atomic operation:

[0073] Insert (insert a new flow rule when the flow entry is free, the cost is recorded as 1);

[0074] Replace (the flow entry has deployed flow rules, which need to be covered by new flow rules, the cost is recorded as 1);

[0075] Delete (the flow entry needs to be emptied and no new flow rule is filled, the cost is recorded as 1);

[0076] Let the total capacity of the main rule table of the TCAM be , and the number of rules to be inserted be (including the existing flow rules in the main rule table of the TCAM and the flow rules to be updated, but not including the flow rules to be deleted). First, construct a two-dimensional state transition matrix , where represents the minimum cumulative cost of deploying the first flow rules in the first TCAM flow entries.

[0077] Then, there are two ways to deploy the first flow rules in the first TCAM flow entries. Specifically as follows:

[0078] (1) Entry retention strategy: if the first flow rules have been optimally deployed in the first flow entries, the flow entry can be empty. At this time, the cost increment depends on the original state of the flow entry, if the flow entry has rules to be executed, then , otherwise .

[0079] (2) Rule deployment strategy: if the first flow rules have been optimally deployed in the first flow entries, then the flow rule is deployed to the flow entry. At this time, the cost increment depends on the original state of the flow entry, if the flow entry is empty, then the insert operation is performed, and the cost increment is ; if the flow entry is not a free flow entry, then it is necessary to judge whether the SDN flow rule stored in the flow entry is the same as the flow rule to be updated, if the same, then the cost increment is Otherwise, perform an update operation, with incremental cost. The ultimate goal of the optimal flow rule update strategy is to make... Minimum. The above can be described using the following recursive steps.

[0080] ;

[0081] The optimal path is recorded through a backtracking marking mechanism. A vertical arrow is used when selecting a flow table entry retention strategy, and a diagonal arrow is used when selecting a flow rule deployment strategy. The time complexity is O(log n). .like Figure 7 As shown in the figure, the states of the TCAM main rule table and the TCAM temporary rule table before batch update are shown on the left. After batch update calculation, the optimal flow rule update strategy is obtained, which updates the rules in the temporary rule table to the main rule table with the minimum update cost. The updated state is shown on the right.

[0082] In this embodiment, steps S110 to S170 provide a two-stage batch update method. First, steps S110 to S150 store the first SDN flow rule to be updated into the temporary rule table of TCAM. Then, after the update conditions are met in the temporary rule table, a zero-movement rule update method is adopted. By analyzing the rule dependency graph, the candidate address range of the first SDN flow rule to be updated in the main rule table is determined, and available flow table entries within this range are retrieved. Subsequently, a bipartite graph model of the rule to be updated and available table entries is constructed, and finally, the maximum matching is solved to achieve zero-movement update. Steps S160 to S170 adopt an optimal rule update strategy based on dynamic programming to generate the optimal update strategy for the remaining flow rules to be updated. This can reduce the frequent modifications to the main rule table of TCAM, improve the efficiency of TCAM storage, and effectively reduce update costs.

[0083] In some embodiments of this application, before determining the candidate address range of each first SDN flow rule in the TCAM master rule table based on the rule dependency graph in step S110, the method further includes:

[0084] Step S210: Determine the dependencies between the SDN flow rules in the SDN flow table;

[0085] Step S220: Determine the storage yield of each SDN flow rule based on the dependency relationship;

[0086] Step S230: According to the storage yield rate from high to low, and if the storage capacity of the main rule table allows, select the SDN flow rule with the highest current storage yield rate and its rule dependency set and store them in the main rule table; wherein, the rule dependency set is the set of SDN flow rules that have a dependency relationship with the SDN flow rule with the highest current storage yield rate.

[0087] The existing scheme does not consider the rule dependency and rule update problem, which can cause semantic error of packet forwarding, i.e. flow rule execution error action set. To this end, the embodiment firstly constructs a rule dependency graph set according to the priority dependency relationship between all flow rules in the SDN switch. Further, for each flow rule, the storage yield rate of the flow rule in the TCAM is calculated according to the weight (activity) of each flow rule in the rule dependency set and the length of the dependency chain thereof, and then the flow rule with high storage yield rate and the rule dependency set thereof are selected into the main rule table of the TCAM in the order from high to low.

[0088] The embodiment considers that each flow rule is not only dependent on its parent node rule, but also affected by the ancestor rule, and therefore when selecting, not only the yield rate of a single flow rule should be considered, but also the yield rate of the entire dependency set (i.e. the sum of the activity of the parent node and the ancestor node) should be taken as a reference. By comprehensively evaluating the activity, dependency chain length and storage cost of each rule and its dependency set, the flow rule with high TCAM storage yield rate and its dependency rule set are preferentially placed into the TCAM. This method can improve the TCAM hit rate as much as possible under the premise of ensuring the semantic correctness of packet forwarding, and thus improve the flow table lookup performance.

[0089] In some embodiments of the present application, after determining the storage yield rate of each SDN flow rule according to the dependency relationship in step S220, the method further comprises:

[0090] Step S310, in the case that the storage capacity of the main rule table does not allow, storing the un-stored SDN flow rules in the SDN flow table in the high-speed addressable memory.

[0091] In the embodiment, since the capacity of the main rule table of the TCAM is limited, for the flow rules that cannot be accommodated by the TCAM, they are stored in the high-speed addressable memory (such as SRAM table), and the flow rules with high TCAM storage yield rate and their dependency set are stored in the main rule table of the TCAM, while the remaining flow rules are stored in the SRAM table. The embodiment comprehensively considers the activity and placement cost of the flow rules, and preferentially selects the flow rules with high TCAM storage yield rate and their dependency rule set to be placed into the main rule table of the TCAM, so as to increase the hit rate of the TCAM and improve the flow table lookup speed.

[0092] The calculation method of the TCAM storage yield rate is as follows:

[0093] For each flow rule, firstly locate the position of the rule in the rule dependency graph; then find all parent nodes and ancestor nodes of the rule upwards according to the dependency chain, and accumulate the activity and the number; finally, calculate the ratio of the total activity and the total number of all related flow rules, which is the TCAM storage yield rate of the flow rule. For example,Figure 3 、 Figure 8 、 Figure 9 and Figure 10 , the storage benefit rate of each flow rule is calculated, and the flow rule selection placement result is given according to the ranking of the storage benefit rates of all flow rules in the figure. Assuming that the TCAM capacity is 5, first, among all flow rules, the flow rule with the highest TCAM storage benefit rate is selected and its dependent rule set is placed in the main rule table of the TCAM, at this time, there are two free positions left in the main rule table of the TCAM. Then, the next flow rule with a high TCAM storage benefit rate is selected, and placing the flow rule requires placing 8 flow rules in its dependent chain, which causes the storage space of the TCAM to be insufficient to be placed, and then is placed in the SRAM table. Continue to select the next flow rule with a high TCAM storage benefit rate until it can be stored in the TCAM. Finally, the flow rules and are placed in the main rule table of the TCAM, and the remaining flow rules are placed in the SRAM table.

[0094] In some embodiments of the present application, after the un-stored SDN flow rules in the SDN flow table are stored in the SRAM table when the storage capacity of the main rule table does not allow, the method further comprises:

[0095] Step S410, extracting the content field in the SDN flow rule in the main rule table and the high-speed address storage memory.

[0096] Step S420, storing the content field in the dynamic random access memory (such as the DRAM table) and establishing the mapping relationship between the content field and the corresponding SDN flow rule.

[0097] As Figure 2 , in the present embodiment, the content field is separated from the flow table entry and stored separately by using the DRAM table, so that the main rule table of the TCAM and the SRAM table store more flow rules. In the present embodiment, the flow rules with a higher storage benefit rate in the main rule table of the TCAM and their dependent set are stored, and the remaining flow rules are stored in the SRAM table, and the content field is stored separately by the DRAM table and corresponds to the flow rules stored in the main rule table of the TCAM and the SRAM table one by one to realize fast indexing. The present method can effectively solve the rule dependency problem, improve the TCAM hit rate as much as possible, and speed up the flow table lookup speed under the premise of ensuring the correct packet forwarding semantics.

[0098] As Figure 2 、 Figures 11 to 15As shown, for the convenience of understanding, an embodiment is provided, including the following:

[0099] The SDN flow table contains all flow rules to be placed in the switch, each flow rule including a matching field, a content field and a TCAM storage yield rate.

[0100] The rule dependency graph set is composed of multiple flow rule dependency graphs, each rule dependency graph being a directed acyclic graph composed of multiple interdependent flow rules. For a flow rule, the TCAM storage yield rate is defined as the ratio of the total activity of all flow rules it depends on to the total number of rules. By calculating the rule dependency graph set, the TCAM storage yield rate of each flow rule can be obtained, thereby performing differentiated storage.

[0101] The TCAM and SRAM store the matching fields of all flow rules, wherein the TCAM includes an MR-TCAM table (i.e., a main rule table) and a TR-TCAM table (i.e., a temporary rule table), the flow rules with higher TCAM storage yield rates and their dependency sets are stored in the MR-TCAM table, and the remaining flow rules are stored in the SRAM table. The content field is stored separately by the DRAM table and corresponds to each flow rule stored in the MR-TCAM table and the SRAM table to achieve fast indexing. The TR-TCAM table stores newly issued flow rules, which are searched first during flow table lookup to ensure semantic forwarding correctness.

[0102] For newly issued flow rules, they are temporarily stored in the temporary rule table TR-TCAM table, and only the flow rules newly issued or modified are incrementally updated in the dependency chain to avoid rule dependency graph reconstruction. When the number of flow rules in the TR-TCAM table reaches a certain value, a subsequent two-stage batch update strategy is used to batch update all rules in the MR-TCAM table.

[0103] The following describes the placement of flow rules based on TCAM storage yield rate:

[0104] This strategy comprehensively evaluates the activity, dependency chain length and storage cost of each flow rule and its dependency set, and preferentially places flow rules with high TCAM storage yield rates and their dependency rule sets into the MR-TCAM table. For each flow rule, first locate the position of the rule in the rule dependency graph; then find all parent nodes and ancestor nodes of the rule upwards according to the dependency chain, and accumulate the activity and number; finally, calculate the ratio of the total activity and total number of all related flow rules, which is the TCAM storage yield rate of the flow rule.

[0105] The following describes the two-stage batch update strategy:

[0106] Firstly, the flow rules to be updated are stored in the TR-TCAM table. Then, when the number of flow rules in the TR-TCAM table reaches a threshold, the two-stage batch update strategy is adopted to update the MR-TCAM table. Specifically, in the first stage, the zero-move rule update strategy is adopted, the candidate address range of the rule to be updated in the MR-TCAM table is determined by analyzing the rule dependency graph, the available flow table entries in the range are retrieved, then the rule-to-available entry bipartite graph model is constructed, and finally the maximum matching is solved to realize the zero-move update.

[0107] In the second stage, the optimal rule update strategy based on dynamic programming is adopted to generate the optimal update strategy for the remaining rules to be updated, thereby effectively reducing the update cost.

[0108] As shown in the following, the flow table lookup process is provided: Figure 11

[0109] When the data plane switching device receives a data packet , the matching fields are extracted by analyzing the protocol headers of each layer , and then the TR-TCAM table is searched first. If the search is successful, the corresponding DRAM content table item is located and read according to the returned matching table item index value , and the packet is forwarded according to the action set in the DRAM table item, and the counter and timestamp in the corresponding DRAM table item are updated. If the search fails, the MR-TCAM table is searched according to the above process. If the above process does not find the flow, the SRAM table is further searched. If the search is successful, the corresponding DRAM table item is read according to the returned index value, and then the packet forwarding processing is completed, and the counter and timestamp in the corresponding DRAM table item are updated. If the search fails, it means that the packet belongs to a new flow. At this time, the SDN switch packages the information of the packet into message and submits it to the controller to request the corresponding flow rule to be issued.

[0110] As shown in the following, the flow rule insertion process is provided: Figure 12

[0111] When the SDN controller issues a flow rule , the matching fields of the flow rule are obtained, the rule dependency graph (the rule dependency graph is constructed by the matching fields of each flow rule in the SDN flow table to represent the dependency relationship between the flow rules) is traversed, if the rule dependency graph and the flow rule have a dependency relationship, the position to be inserted in the dependency relationship is located, the rule dependency graph is updated, and the storage yield of each flow rule is updated, and the flow rule​​ Insert into the TR-TCAM table; if the rule dependency graph Harmony and Flow Rules There is no dependency, so the flow rules will be applied. Insert into the TR-TCAM table;

[0112] When TR-TCAM expression reaches a threshold, a two-stage batch update process is performed (see details below). Figure 14 (The process is shown below); if the TR-TCAM table does not reach the threshold, proceed with the SDN flow rule placement process (see the following description and...). Figure 13 (The process shown).

[0113] like Figure 13 As shown, the SDN flow table is traversed first. Extract the matching fields of each flow rule and construct a rule dependency graph based on these fields. This is used to represent the dependencies between flow rules. Subsequently, from the flow table... Obtaining Stream Rules According to its position in the rule dependency graph Extract the dependency rule set from the position in the middle. Next, for each flow rule, the corresponding storage yield is calculated based on the number of dependent descendants and the total activity. Then, rank all flow rules by storage yield. Sort by size from largest to smallest.

[0114] Further, according to Select rankings from largest to smallest. Flow rules .like Its rule dependency set Not part of the TCAM rule set Furthermore, their total number is less than the capacity of MR-TCAM. Then The matching fields are stored in the MR-TCAM flow table, and the content fields are stored in the DRAM table, until the MR-TCAM table is full. Finally, the matching fields of the remaining unstored flow rules are stored in the SRAM table, and the content fields are stored in the DRAM flow table.

[0115] like Figure 14As shown, a zero-movement rule update strategy is first used to initially update the rules to be inserted. Specifically, all flow rules to be inserted are searched for candidate address ranges according to the rule dependency graph, and then available flow table entries are found within the candidate address range. Next, a bipartite graph is constructed between the rules to be inserted and their corresponding available flow table entries within the candidate address range. The maximum matching problem of the bipartite graph is then solved, and the maximum matching result is applied to the batch update strategy for the rules to be inserted. Furthermore, an optimal rule update strategy is used to batch update the remaining rules to be inserted. Specifically, a two-dimensional state matrix is ​​constructed. Indicates the preceding Before deploying each flow table entry Minimum cumulative cost of flow rules. Two strategy options:

[0116] (1) Retention strategy: If the previous The flow rules have been optimally deployed in The nth flow table entry, then the nth Set each flow table entry to empty, and increase cost. (The original table entry needs to be deleted) or 0;

[0117] (2) Deployment strategy: If the previous The flow rules have been deployed in The nth flow table entry will then be the nth Flow rules deployed to the first Each flow table item, cost increment (Rules need to be inserted / updated) or 0 (same rules). The ultimate goal is to minimize... Find the optimal rule batch update strategy and apply it. If the number of flow rules is small (i.e., the batch update threshold has not been reached), revert to the traditional insertion process, processing each flow rule one by one and storing the new rule in the TR-TCAM table. In this process, first update the rule dependency graph, yield, and rule ranking based on the rule dependencies, and then update its placement position based on the changes in the flow rule ranking.

[0118] like Figure 15 As shown, the following provides the procedure for deleting a flow table:

[0119] When an SDN switch needs to delete a flow rule First, the corresponding item is searched in the MR-TCAM table based on its matching field. If the search is successful, a valid index is returned. Then, based on the index, the corresponding entry in the MR-TCAM table and DRAM table is deleted. The SRAM table is then searched in the same way (details omitted here). If no matching flow rule is found in either the MR-TCAM or DRAM table, an error message is generated and sent to the controller, reporting deletion failure. Finally, all dependencies are updated. TCAM stores the yield rate of the flow rule and its ranking, and updates its placement position according to the change of the flow rule ranking.

[0120] As shown in FIG. 1, one embodiment of the present application provides an SDN flow rule batch updating device, which comprises: Figure 16

[0121] The candidate address obtaining module 1001 is configured to, in a case where the temporary rule table of the TCAM temporarily stores a plurality of first SDN flow rules and the update condition of the temporary rule table is met, determine a candidate address range of each first SDN flow rule in the main rule table of the TCAM based on a rule dependency graph; the rule dependency graph at least includes a dependency relationship between the SDN flow rule stored in the main rule table and the plurality of first SDN flow rules;

[0122] The flow table item determining module 1002 is configured to retrieve available flow table items in the main rule table according to each first SDN flow rule and its candidate address range; wherein the available flow table items at least include idle flow table items and flow table items to be recycled;

[0123] The bipartite graph building module 1003 is configured to build a bipartite graph; the bipartite graph includes two vertex sets, wherein the first vertex set is a set composed of the plurality of first SDN flow rules, and the second vertex set is available flow table items in the candidate address range corresponding to each first SDN flow rule, and the existence condition of the edge of the bipartite graph is that the physical address of the available flow table item is located in the candidate address range of the corresponding first SDN flow rule;

[0124] The bipartite graph solving module 1004 is configured to solve the maximum matching problem of the bipartite graph to obtain a matching result;

[0125] The flow rule updating module 1005 is configured to update the plurality of first SDN flow rules in the main rule table according to the matching result.

[0126] It should be noted that the SDN flow rule batch updating device provided in the embodiment and the SDN flow rule batch updating method described above are based on the same inventive concept, and therefore the content of the SDN flow rule batch updating method described above is also applicable to the content of the SDN flow rule batch updating device of the embodiment, which will not be described here.

[0127] As shown in FIG. 1, one embodiment of the present application provides an SDN flow rule batch updating device, which comprises: Figure 17 The electronic device comprises a memory and a processor, the memory stores a computer program, and the processor implements the above-mentioned SDN flow rule batch updating method when executing the computer program. The electronic device comprises:

[0128] At least one battery;

[0129] ​at least one memory;

[0130] at least one processor;

[0131] at least one program;

[0132] The program is stored in the memory, and the processor executes the at least one program to implement the above-mentioned one of the SDN flow rule batch updating methods of the present disclosure.

[0133] The electronic device can be any intelligent terminal including a mobile phone, a tablet computer, a personal digital assistant (PDA), a vehicle-mounted computer, etc.

[0134] The electronic device of the embodiment of the present application is described in detail below.

[0135] The processor 1600 can be implemented in a general central processing unit (CPU), a microprocessor, an application specific integrated circuit (ASIC), or one or more integrated circuits, etc., and is used to execute related programs to implement the technical solutions provided by the embodiments of the present disclosure.

[0136] The memory 1700 can be implemented in a read only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM), etc. The memory 1700 can store an operating system and other application programs, and when the technical solutions provided by the embodiments of the present disclosure are implemented by software or firmware, the related program codes are saved in the memory 1700 and are called and executed by the processor 1600 to implement the one of the SDN flow rule batch updating methods of the present disclosure.

[0137] The input / output interface 1800 is used to realize information input and output.

[0138] The communication interface 1900 is used to realize the communication interaction between the device and other devices, which can realize communication through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).

[0139] The bus 2000 transmits information between various components (such as the processor 1600, the memory 1700, the input / output interface 1800, and the communication interface 1900) of the device.

[0140] The processor 1600, the memory 1700, the input / output interface 1800, and the communication interface 1900 are communicatively connected with each other within the device through the bus 2000.

[0141] The disclosure also provides a storage medium, which is a computer readable storage medium, and stores computer executable instructions for causing a computer to execute the above-mentioned SDN flow rule batch updating method.

[0142] The memory, as a non-transitory computer readable storage medium, can be used to store non-transitory software programs and non-transitory computer executable programs. In addition, the memory can include a high-speed random access memory, and can also include a non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state memory device. In some embodiments, the memory can optionally include a memory remotely arranged relative to the processor, and these remote memories can be connected to the processor through a network. Examples of the above-mentioned network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.

[0143] The embodiments described in the disclosure are used to more clearly illustrate the technical solutions of the disclosure, and do not constitute a limitation on the technical solutions provided by the disclosure. Those skilled in the art can know that, with the evolution of technology and the appearance of new application scenarios, the technical solutions provided by the disclosure are also applicable to similar technical problems.

[0144] Those skilled in the art can understand that the technical solutions shown in the figures do not constitute a limitation on the disclosure, and can include more or fewer steps than the figures, or combine certain steps, or different steps.

[0145] The device embodiments described above are only schematic, and the units described as separate components can or can not be physically separated, i.e., can be located in one place, or can be distributed on multiple network units. Part or all of the modules can be selected according to actual needs to achieve the purpose of the embodiments.

[0146] Those skilled in the art can understand that all or some of the steps in the above disclosed method, the functional modules / units in the system and the device can be implemented as software, firmware, hardware, and appropriate combinations thereof.

[0147] The terms "first", "second", "third", "fourth", and the like in the description of this application and in the claims hereof, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the use of the terms so termed herein is solely for the convenience of the reader and does not limit the scope of the application. It is also to be understood that the description and examples in this application are intended to cover all possible combinations where any of the several elements can represent one or more elements.

[0148] It should be understood that, in the application, "at least one" means one or more, "multiple" means two or more. "And / or" is used to describe the relationship between associated objects, which means that there can be three relationships, for example, "A and / or B" can represent three cases: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally represents an "or" relationship between the associated objects. "At least one of the following" or similar expressions means any combination of these items, including any combination of single or multiple items. For example, at least one of a, b or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.

[0149] In several embodiments provided in the application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of units is only a logical function division, and actual implementation can have another division manner, for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the displayed or discussed objects can be indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0150] The units described as separate components can or can not be physically separated, and the components displayed as units can or can not be physical units, that is, they can be located in one place, or they can be distributed on multiple network units. According to actual needs, part or all of the units can be selected to achieve the purpose of the embodiment of the application.

[0151] In addition, each function unit in each embodiment of the present application can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software function unit.

[0152] When the integrated unit is realized in the form of a software function unit and sold or used as an independent product, it can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application, essentially or in the form of a contribution to the prior art, or all or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, and includes multiple instructions for causing an electronic device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods of the embodiments of the present application. The aforementioned storage medium includes various media that can store program codes, such as a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0153] The above is a specific description of the preferred implementation of the embodiments of the present application, but the embodiments of the present application are not limited to the above implementation. Those skilled in the art can make various equivalent modifications or replacements without departing from the spirit of the embodiments of the present application, and these equivalent modifications or replacements are all included in the scope defined by the claims of the embodiments of the present application.

Claims

1. A method for batch updating SDN flow rules, characterized in that, The method includes: If multiple first SDN flow rules are temporarily stored in the temporary rule table of the tri-state content addressable memory, and the update conditions of the temporary rule table are met, the candidate address range of each first SDN flow rule in the main rule table of the tri-state content addressable memory is determined based on the rule dependency graph; the rule dependency graph includes at least the dependency relationship between the SDN flow rules stored in the main rule table and the multiple first SDN flow rules. Based on each first SDN flow rule and its candidate address range, available flow table entries are retrieved from the main rule table; wherein, the available flow table entries include at least idle flow table entries and flow table entries to be reclaimed; Construct a bipartite graph; the bipartite graph includes two vertex sets, wherein the first vertex set is a set composed of the multiple first SDN flow rules, and the second vertex set is the available flow table entries within the candidate address range corresponding to each first SDN flow rule. The existence condition of the edges of the bipartite graph is that the physical address of the available flow table entry is located within the candidate address range of the corresponding first SDN flow rule. Solve the maximum matching problem of the bipartite graph to obtain the matching result; Based on the matching results, the multiple first SDN flow rules are updated in the main rule table; Construct a two-dimensional state matrix in the presence of at least one second SDN flow rule. The second SDN flow rule is the first SDN flow rule that has not been updated in the main rule table. For the first part of the main rule table Before deployment in each flow table entry Minimum cumulative cost of an SDN flow rule: ; in, The upper limit value is , The total capacity of the flow table entries in the main rule table. The upper limit value is , The total number of the at least one second SDN flow rule and the SDN flow rules that have been deployed and do not need to be deleted in the main rule table; by Minimize as the optimal deployment goal, targeting Execute the retention policy or deployment policy; The retention strategy includes: in front The SDN flow rules have been optimally deployed in the front The nth flow table entry, and the nth If an entry in the flow table contains SDN flow rules that need to be deleted, then ; in front The SDN flow rules have been optimally deployed in the front The nth flow table entry, and the nth If no SDN flow rules exist for each flow table entry, then ; The deployment strategy includes: in front The SDN flow rules have been optimally deployed in the front The nth flow table entry, and the nth If the first flow table entry is an idle flow table entry, then the first... Inserting the first SDN flow rule Each flow table entry, and let ; in front The SDN flow rules have been optimally deployed in the front The nth flow table entry, and the nth If the first flow table entry is not an idle flow table entry, determine the first... Does the SDN flow rule already stored in the current flow table entry match the SDN flow rule to be updated? If the SDN flow rule already stored in a flow table entry is the same as the SDN flow rule to be updated, then... ; in the If the SDN flow rules already stored in a flow table entry are different from the SDN flow rules to be updated, then in the case where the SDN flow rules to be updated are different, then in the case where the SDN flow rules stored in the flow table entry are different, then in the case where the SDN flow rules to be updated ... Each flow table entry stores the SDN flow rules to be stored, and makes .

2. The SDN flow rule batch update method according to claim 1, characterized in that, The update conditions include: the number of the multiple first SDN flow rules is greater than a threshold, or the time interval between the current moment and the most recent update exceeds a threshold.

3. The SDN flow rule batch update method according to claim 1, characterized in that, Before determining the candidate address range of each first SDN flow rule in the main rule table of the tri-state content-addressable memory based on the rule dependency graph, the method further includes: Determine the dependencies between the SDN flow rules in the SDN flow table; Based on the aforementioned dependencies, the storage yield of each SDN flow rule is determined; Based on the storage yield rate from high to low, and provided the storage capacity of the main rule table allows, the SDN flow rule with the highest current storage yield rate and its rule dependency set are selected and stored in the main rule table; wherein, the rule dependency set is a set of SDN flow rules that have the dependency relationship with the current SDN flow rule with the highest current storage yield rate.

4. The SDN flow rule batch update method according to claim 3, characterized in that, After determining the storage yield of each SDN flow rule based on the dependency relationship, the method further includes: If the storage capacity of the main rule table is insufficient, the unstored SDN flow rules in the SDN flow table will be stored in a high-speed address-addressable memory.

5. The SDN flow rule batch update method according to claim 3, characterized in that, The dependencies include the activity level and dependency chain length between SDN flow rules.

6. The SDN flow rule batch update method according to claim 4, characterized in that, After storing the unstored SDN flow rules in the SDN flow table in a high-speed address-addressable memory, the method further includes: Extract the content fields from the master rule table and the SDN flow rules in the high-speed address addressing memory; The content fields are stored in a dynamic random access memory, and a mapping relationship is established between the content fields and the corresponding SDN flow rules.

7. An SDN flow rule batch update device, characterized in that, The device includes: The candidate address acquisition module is used to determine the candidate address range of each first SDN flow rule in the main rule table of the tri-state content addressable memory based on the rule dependency graph, provided that multiple first SDN flow rules are temporarily stored in the temporary rule table of the tri-state content addressable memory and the update conditions of the temporary rule table are met; the rule dependency graph includes at least the dependency relationship between the SDN flow rules stored in the main rule table and the multiple first SDN flow rules. The flow entry determination module is used to retrieve available flow entries in the main rule table based on each first SDN flow rule and its candidate address range; wherein, the available flow entries include at least idle flow entries and flow entries to be reclaimed; A bipartite graph construction module is used to construct a bipartite graph. The bipartite graph includes two vertex sets, wherein the first vertex set is a set composed of the multiple first SDN flow rules, and the second vertex set is the available flow table entries within the candidate address range corresponding to each first SDN flow rule. The existence condition of the edges of the bipartite graph is that the physical address of the available flow table entry is located within the candidate address range of the corresponding first SDN flow rule. The bipartite graph solving module is used to solve the maximum matching problem of the bipartite graph and obtain the matching result. The flow rule update module is used to update the multiple first SDN flow rules in the main rule table according to the matching results, and to construct a two-dimensional state matrix when at least one second SDN flow rule exists. The second SDN flow rule is the first SDN flow rule that has not been updated in the main rule table. For the first part of the main rule table Before deployment in each flow table entry Minimum cumulative cost of an SDN flow rule: ; in, The upper limit value is , The total capacity of the flow table entries in the main rule table. The upper limit value is , The total number of the at least one second SDN flow rule and the SDN flow rules that have been deployed and do not need to be deleted in the main rule table; by Minimize as the optimal deployment goal, targeting Execute the retention policy or deployment policy; The retention strategy includes: in front The SDN flow rules have been optimally deployed in the front The nth flow table entry, and the nth If an entry in the flow table contains SDN flow rules that need to be deleted, then ; in front The SDN flow rules have been optimally deployed in the front The nth flow table entry, and the nth If no SDN flow rules exist for each flow table entry, then ; The deployment strategy includes: in front The SDN flow rules have been optimally deployed in the front The nth flow table entry, and the nth If the first flow table entry is an idle flow table entry, then the first... Inserting the first SDN flow rule Each flow table entry, and let ; in front The SDN flow rules have been optimally deployed in the front The nth flow table entry, and the nth If the first flow table entry is not an idle flow table entry, determine the first... Does the SDN flow rule already stored in the current flow table entry match the SDN flow rule to be updated? If the SDN flow rule already stored in a flow table entry is the same as the SDN flow rule to be updated, then... ; in the If the SDN flow rules already stored in a flow table entry are different from the SDN flow rules to be updated, then in the case where the SDN flow rules to be updated are different, then in the case where the SDN flow rules stored in the flow table entry are different, then in the case where the SDN flow rules to be updated ... Each flow table entry stores the SDN flow rules to be stored, and makes .

8. An electronic device, characterized in that, It includes at least one controller and a memory for communicatively connecting with the controller; the memory stores instructions that can be executed by the at least one controller, the instructions being executed by the at least one controller to cause the at least one controller to perform an SDN flow rule batch update method as described in any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions for causing a computer to perform an SDN flow rule batch update method as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • SDN (Software Defined Network) large-scale flow table differentiated storage method supporting rule dependence

    CN118018480A

  • Low-delay SDN (Software Defined Network) flow table updating method

    CN120128529A