Decision tree maintenance method and system based on software defined network controller

By setting thresholds and calculating the elimination priority in the software-defined network controller, determining and pruning the branches to be eliminated in the decision tree, the problem of excessive memory usage caused by excessive scale of the decision tree is solved, ensuring normal forwarding of data packets.

CN119892765APending Publication Date: 2025-04-25INST OF ACOUSTICS CHINESE ACAD OF SCI +3
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202311371709.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-10-23
Publication Date
2025-04-25

AI Technical Summary

Technical Problem

The existing decision tree maintenance method based on software-defined network controllers cannot control the scale of the decision tree, resulting in excessive memory space occupied and affecting the normal forwarding of data packets.

Method used

Through software-defined network controller, the threshold is set based on the speed of the growth of the flow table entry and the time when the decision tree is processed to eliminate branches; when the number of flow table entry is greater than the threshold, the operation statistics are obtained, the elimination priority is calculated, the branches to be eliminated are determined, and the corresponding flow table entry is pruned.

Benefits of technology

Effectively control the scale of the decision tree, avoid occupying too much memory space, and ensure normal forwarding of data packets.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119892765A_ABST
    Figure CN119892765A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of software defined networks, in particular to a decision tree maintenance method and system based on a software defined network controller. The method comprises the following steps: step 1, setting a threshold value through a software-defined network controller based on a flow table item growth speed and branch elimination time of a processing decision tree; 2, when the number of the flow table entries generated by the decision tree is larger than a threshold value, operation statistical data of all the flow table entries in a switch are obtained through a software defined network controller, and the elimination priority of all the flow table entries is calculated based on the corresponding operation statistical data; and step 3, determining to-be-eliminated branches in the decision tree based on the elimination priority of each flow table item through a software defined network controller, pruning the to-be-eliminated branches, and deleting the corresponding flow table items. According to the invention, the decision tree does not occupy too much memory space, and normal forwarding of the data packet is also ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of software defined network, and in particular to a decision tree maintenance method and system based on a software defined network controller. Background Art

[0002] Software Defined Networking (SDN) is an emerging architecture that decouples network control and forwarding functions. SDN divides the network into three main layers: data plane, control plane, and application plane. The application plane consists of one or more SDN applications, which are passed to the control plane through the northbound interface to implement different network functions; the control plane logically observes and controls the entire network; the data plane consists of switches, which forward data packets through ports and links under the management of the control plane.

[0003] The control plane uses the southbound interface protocol to communicate with the data plane, allowing the controller to directly access and control the switch. However, directly using the southbound interface protocol to control the switch requires programmers to master cumbersome message formats and underlying details, such as knowing the fields that each flow table entry matches and its corresponding operations, and actively sending them to the switch, which is complex and prone to errors.

[0004] Providing a high-level application programming interface on top of the controller to shield the complexity of the underlying communication protocol is of great significance for simplifying the writing of user network policies. Users use general programming languages ​​to form a forwarding strategy for data packets. The controller builds a decision tree based on the functions called in the user strategy and the data packet fields involved in the matching process in the data packet processing process. The controller generates flow table entries based on the decision tree and sends the flow table entries to the switch to guide the switch to process the data packet. However, as the number of different data packets processed by the controller increases, the scale of the decision tree will continue to expand, causing the controller to search slower during operation and longer response time to the switch, affecting the normal forwarding of data packets.

[0005] Nanjing University of Posts and Telecommunications proposed a method to reduce the size of the decision tree and the number of generated flow entries by merging the decision tree branches in the SDN controller. However, this method cannot limit the continuous increase in the size of the decision tree, and cannot ensure that the decision tree does not occupy too much memory space, affecting the normal forwarding of data packets. Summary of the invention

[0006] The purpose of the present invention is to overcome the problem that the existing decision tree maintenance method based on software-defined network controller cannot control the scale of the decision tree, resulting in excessive memory space being occupied and affecting the normal forwarding of data packets, thereby providing a decision tree maintenance method and system based on software-defined network controller.

[0007] In order to solve the above technical problems, the technical solution of the present invention provides a decision tree maintenance method based on a software defined network controller, comprising the following steps:

[0008] Step 1: Use the software-defined network controller to set the threshold based on the growth rate of flow table entries and the time it takes to eliminate branches in the decision tree.

[0009] Step 2: When the number of flow table entries generated by the decision tree is greater than the threshold, the software-defined network controller obtains the running statistics of each flow table entry in the switch, and calculates the elimination priority of each flow table entry based on the corresponding running statistics;

[0010] Step 3: Through the software-defined network controller, based on the elimination priority of each flow table entry, determine the branches to be eliminated in the decision tree, prune the branches to be eliminated, and delete the corresponding flow table entries.

[0011] As an improvement of the above method, step 1 specifically includes: defining the network controller through software, and setting the threshold C based on the growth rate of flow table entries and the time for processing decision tree elimination branches:

[0012]

[0013] Among them, O is the capacity of the switch flow table, υ is the growth rate of the flow table, and t is the time to process the decision tree elimination branch.

[0014] As an improvement of the above method, the step 2 specifically includes:

[0015] When the number of flow table entries generated by the decision tree is greater than the threshold, the running statistics of each flow table entry in the switch are obtained through the software-defined network controller, wherein the running statistics include but are not limited to: the number of hits of the flow table entry and the time interval Δt1 between the current time and the last hit time of the flow table entry;

[0016] The software-defined network controller calculates the elimination priority s of each flow entry based on the corresponding operation statistics:

[0017]

[0018] Where n is the number of hits of the flow entry, Δt1 is the time interval between the current time and the last hit time of the flow entry, a is the first weighting coefficient, and b is the second weighting coefficient;

[0019] As an improvement of the above method, step 3 specifically includes:

[0020] The elimination priority s of each flow table entry is sorted from small to large, and the flow table entries corresponding to the first k elimination priority s are obtained; where k is the number of flow table entries exceeding the threshold;

[0021] The decision tree branches corresponding to the k flow table entries are used as the branches to be eliminated in the decision tree;

[0022] Through the software-defined network controller, the branches to be eliminated in the decision tree are pruned;

[0023] Through the software-defined network controller, based on the southbound interface protocol standard, a message for deleting flow table entries is constructed, and the switch is notified to delete the relevant flow table entries.

[0024] To achieve another object of the present invention, the present invention further provides a decision tree maintenance system based on a software-defined network controller, the system comprising: a software-defined network controller, wherein the software-defined network controller comprises:

[0025] A threshold setting module is used to set the threshold based on the growth rate of flow table entries and the time to process the decision tree elimination branch;

[0026] an elimination priority calculation module, configured to obtain operation statistics of each flow entry in the switch when the number of flow entries generated based on the decision tree is greater than a threshold, and calculate the elimination priority of each flow entry based on the corresponding operation statistics; and

[0027] The pruning module is used to determine the branches to be eliminated in the decision tree based on the elimination priority of each flow table entry, prune the branches to be eliminated, and delete the corresponding flow table entries.

[0028] As an improvement of the above system, the threshold setting module is specifically used for:

[0029] Set the threshold C based on the growth rate of flow table entries and the time it takes to process the decision tree elimination branches:

[0030]

[0031] Among them, O is the capacity of the switch flow table, v is the growth rate of the flow table, and t is the time to process the elimination branch of the decision tree.

[0032] As an improvement of the above system, the elimination priority calculation module is specifically used for:

[0033] When the number of flow table entries generated by the decision tree is greater than the threshold, the running statistics of each flow table entry in the switch are obtained, wherein the running statistics include but are not limited to: the number of hits of the flow table entry and the time interval Δt1 between the current time and the last hit time of the flow table entry;

[0034] Calculate the elimination priority s of each flow entry based on the corresponding running statistical data:

[0035]

[0036] Where n is the number of hits of the flow entry, Δt1 is the time interval between the current time and the last hit time of the flow entry, a is the first weighting coefficient, and b is the second weighting coefficient;

[0037] As an improvement of the above system, the pruning module is specifically used for:

[0038] Sort the elimination priority s of each flow table entry from small to large, and obtain the flow table entries corresponding to the first k elimination priority s; where k is the number of flow table entries that exceed the threshold;

[0039] The decision tree branches corresponding to the k flow table entries are used as the branches to be eliminated in the decision tree;

[0040] Prune the branches to be eliminated in the decision tree;

[0041] Based on the southbound interface protocol standard, a message for deleting flow entries is constructed and the switch is notified to delete the relevant flow entries.

[0042] The advantage of the present invention is that the decision tree maintenance method and system based on the software-defined network controller provided by the present invention sets a threshold through the growth rate of flow table items and the time for processing the decision tree elimination branch, and uses the threshold to limit the scale of the decision tree, and uses the elimination priority to determine the branches to be eliminated, which can ensure that the eliminated branches are the branches with less recent use frequency. The present invention ensures that the decision tree does not occupy too much memory space and also ensures the normal forwarding of data packets. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Figure 1 A flowchart of a decision tree maintenance method based on a software-defined network controller provided by the present invention;

[0044] FIG2( a) is a schematic diagram of the original decision tree of Example 1;

[0045] FIG2( b ) is a schematic diagram of branches to be eliminated in the decision tree determined in Example 1;

[0046] FIG2( c ) is a schematic diagram of a decision tree after pruning the branches to be eliminated using the method provided in Example 1. DETAILED DESCRIPTION

[0047] The technical solution provided by the present invention is further illustrated below in conjunction with embodiments.

[0048] Example 1

[0049] In the decision tree maintenance method based on the SDN (Software Defined Network) controller provided in this embodiment, the controller constructs a decision tree based on the function called in the user policy and the data packet fields involved in the matching process in the data packet processing process. The SDN controller generates flow table items based on the decision tree, and sends the flow table items to the switch to guide the switch to process the data packet. The SDN controller sets a threshold value based on the growth rate of the flow table items and the time for processing the decision tree to eliminate the branch. When the number of flow table items generated by the decision tree is greater than the threshold, the SDN controller obtains the running statistics of the flow table items in the switch, and calculates the elimination priority of the flow table items based on the running statistics; determines the branches to be eliminated in the decision tree based on the elimination priority of the flow table items, prunes the eliminated branches, and deletes the corresponding flow table items. In this way, the scale of the decision tree is reduced to avoid occupying too much memory and affecting the normal forwarding of data packets.

[0050] The decision tree maintenance method based on the SDN controller provided in this embodiment involves the SDN controller and the switch, such as Figure 1 As shown, the method provided in this embodiment includes the following steps:

[0051] (1) The SDN controller sets the threshold based on the growth rate of flow table entries and the time it takes to eliminate branches in the decision tree;

[0052] (2) When the number of flow table entries generated by the decision tree is greater than the threshold, the SDN controller obtains the running statistics of the flow table entries in the switch and calculates the elimination priority of the flow table entries based on the running statistics;

[0053] (3) The branches to be eliminated in the decision tree are determined according to the elimination priority of the flow table entries, the eliminated branches are pruned, and the corresponding flow table entries are deleted.

[0054] The decision tree generated by the SDN controller has the following structure: non-leaf nodes record matching fields, leaf nodes record forwarding operations, and the labels of branch edges record the values ​​of matching fields. The decision tree generates a flow table entry for each branch, where the matching fields are the matching fields and corresponding values ​​recorded in the non-leaf nodes, and the actions are the forwarding operations recorded in the leaf nodes.

[0055] The threshold value is calculated as:

[0056]

[0057] Among them, O is the capacity of the switch flow table, v is the growth rate of the SDN controller flow table, and t is the time to process the decision tree elimination branch.

[0058] Preferably, the SDN controller obtains running statistics of the flow table items generated based on the decision tree in the switch, including but not limited to: the SDN controller inquires the statistical values ​​of the relevant flow table items in the switch, wherein the statistical values ​​include: the value of the counter field and the time interval from the last hit of the flow table item.

[0059] Preferably, the elimination priority formula for the flow table entry is calculated based on the running statistical data:

[0060]

[0061] Among them, Δt1 is the time interval from the last hit of the flow table entry, n is the number of hits of the flow table entry, wherein the number of hits of the flow table entry is used as the value of the counter field, a is the first weighting coefficient, b is the second weighting coefficient, wherein the values ​​of a and b can be customized.

[0062] Preferably, the step of determining the branch to be eliminated in the decision tree according to the elimination priority of the flow table entry includes:

[0063] The branches corresponding to the k flow table entries with the smallest elimination priority are determined as elimination branches, where k is the number of flow table entries exceeding the threshold.

[0064] Preferably, the steps of deleting the eliminated branches and the corresponding flow table entries include:

[0065] (1) Prune the elimination branches in the decision tree;

[0066] (2) The controller constructs a message for deleting flow entries according to the southbound interface protocol standard and notifies the switch to delete the relevant flow entries.

[0067] The present embodiment will be described in more detail below with reference to the accompanying drawings.

[0068] The decision tree maintenance method based on the SDN controller provided in this embodiment involves an SDN controller and a switch. The user uses a general programming language to form a forwarding strategy for a data packet, and the SDN controller builds a decision tree based on the function called in the user strategy and the data packet fields involved in the matching process in the data packet processing process. The SDN controller generates a flow table entry according to the southbound interface protocol standard to guide the switch to process the data packet.

[0069] FIG2(a) shows a schematic diagram of the original decision tree in this embodiment; FIG2(b) shows a schematic diagram of the branches to be eliminated in the decision tree determined in this embodiment; FIG2(c) shows a schematic diagram of the decision tree after the branches to be eliminated are pruned using the method provided in this embodiment. Specifically, the decision tree before the method of this embodiment is implemented is shown in FIG2(a), the eliminated branches determined are shown in the gray part of FIG2(b), and the decision tree after the deletion operation is shown in FIG2(c). The method provided in this embodiment includes the following steps:

[0070] The SDN controller sets the threshold based on the growth rate of flow table entries and the time it takes to process the decision tree elimination branch, using the following formula:

[0071]

[0072] Among them, O is the capacity of the switch flow table, v is the growth rate of the SDN controller flow table, and t is the time to process the decision tree elimination branch.

[0073] When the number of flow table entries generated by the decision tree is greater than the threshold, the SDN controller inquires the switch about the running statistics of the flow table entries generated by the decision tree in the switch, including the value of the counter field and the time interval from the last hit.

[0074] The elimination priority of the flow entry is calculated based on the running statistical data using the following formula:

[0075]

[0076] Wherein, Δt1 is the time interval from the last hit of the flow entry, n is the hit times of the flow entry, a is the first weighting coefficient, and b is the second weighting coefficient.

[0077] The branches corresponding to the k flow table entries with the smallest elimination priority are determined as elimination branches, where k is the number of flow table entries exceeding the threshold.

[0078] The SDN controller prunes the eliminated branches in the decision tree.

[0079] The SDN controller constructs a message for deleting flow entries according to the southbound interface protocol standard and notifies the switch to delete the relevant flow entries.

[0080] Example 2

[0081] This embodiment provides a decision tree maintenance system based on a software-defined network controller, the system comprising: a software-defined network controller, wherein the software-defined network controller comprises:

[0082] A threshold setting module is used to set the threshold based on the growth rate of flow table entries and the time to process the decision tree elimination branch;

[0083] an elimination priority calculation module, configured to obtain operation statistics of each flow entry in the switch when the number of flow entries generated based on the decision tree is greater than a threshold, and calculate the elimination priority of each flow entry based on the corresponding operation statistics; and

[0084] The pruning module is used to determine the branches to be eliminated in the decision tree based on the elimination priority of each flow table entry, prune the branches to be eliminated, and delete the corresponding flow table entries.

[0085] Preferably, the threshold setting module is specifically used to:

[0086] Set the threshold C based on the growth rate of flow table entries and the time it takes to process the decision tree elimination branches:

[0087]

[0088] Among them, O is the capacity of the switch flow table, v is the growth rate of the flow table, and t is the time to process the elimination branch of the decision tree.

[0089] Preferably, the elimination priority calculation module is specifically used to:

[0090] When the number of flow table entries generated by the decision tree is greater than the threshold, the running statistics of each flow table entry in the switch are obtained, wherein the running statistics include but are not limited to: the number of hits of the flow table entry and the time interval Δt1 between the current time and the last hit time of the flow table entry;

[0091] Calculate the elimination priority s of each flow entry based on the corresponding running statistical data:

[0092]

[0093] Where n is the number of hits of the flow entry, Δt1 is the time interval between the current time and the last hit time of the flow entry, a is the first weighting coefficient, and b is the second weighting coefficient;

[0094] Preferably, the pruning module is specifically used for:

[0095] Sort the elimination priority s of each flow table entry from small to large, and obtain the flow table entries corresponding to the first k elimination priority s; where k is the number of flow table entries that exceed the threshold;

[0096] The decision tree branches corresponding to the k flow table entries are used as the branches to be eliminated in the decision tree;

[0097] Prune the branches to be eliminated in the decision tree;

[0098] Based on the southbound interface protocol standard, a message for deleting flow entries is constructed and the switch is notified to delete the relevant flow entries.

[0099] From the above specific description of the present invention, it can be seen that the decision tree maintenance method and system based on the software-defined network controller provided by the present invention sets a threshold through the growth rate of flow table items and the time for processing the elimination of decision tree branches, and uses the threshold to limit the scale of the decision tree. The elimination priority is used to determine the branches to be eliminated, which can ensure that the eliminated branches are the branches with less recent use frequency. The present invention ensures that the decision tree does not occupy too much memory space and also ensures the normal forwarding of data packets.

[0100] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit the present invention. Although the present invention is described in detail with reference to the embodiments, it should be understood by those skilled in the art that any modification or equivalent replacement of the technical solutions of the present invention does not depart from the spirit and scope of the technical solutions of the present invention and should be included in the scope of the claims of the present invention.

Claims

1. A decision tree maintenance method based on a software-defined network controller, the method comprising the following steps: Step 1: Use the software-defined network controller to set the threshold based on the growth rate of flow table entries and the time it takes to eliminate branches in the decision tree. Step 2: When the number of flow table entries generated by the decision tree is greater than the threshold, the software-defined network controller obtains the running statistics of each flow table entry in the switch, and calculates the elimination priority of each flow table entry based on the corresponding running statistics; Step 3: Through the software-defined network controller, based on the elimination priority of each flow table entry, determine the branches to be eliminated in the decision tree, prune the branches to be eliminated, and delete the corresponding flow table entries.

2. The decision tree maintenance method based on software defined network controller according to claim 1, characterized in that: The step 1 specifically includes: defining the network controller through software, and setting the threshold C based on the growth rate of flow table entries and the time for processing the elimination branch of the decision tree: Among them, O is the capacity of the switch flow table, v is the growth rate of the flow table, and t is the time to process the decision tree elimination branch.

3. The decision tree maintenance method based on software defined network controller according to claim 1, characterized in that: The step 2 specifically includes: When the number of flow table entries generated by the decision tree is greater than the threshold, the running statistics of each flow table entry in the switch are obtained through the software-defined network controller, wherein the running statistics include but are not limited to: the number of hits of the flow table entry and the time interval Δt1 between the current time and the last hit time of the flow table entry; The software-defined network controller calculates the elimination priority s of each flow entry based on the corresponding operation statistics: Wherein, n is the hit count of the flow entry, Δt1 is the time interval between the current time and the last hit time of the flow entry, a is the first weighting coefficient, and b is the second weighting coefficient.

4. The decision tree maintenance method based on software defined network controller according to claim 3 is characterized in that: The step 3 specifically includes: The elimination priority s of each flow table entry is sorted from small to large, and the flow table entries corresponding to the first k elimination priority s are obtained; where k is the number of flow table entries exceeding the threshold; The decision tree branches corresponding to the k flow table entries are used as the branches to be eliminated in the decision tree; Through the software-defined network controller, the branches to be eliminated in the decision tree are pruned; Through the software-defined network controller, based on the southbound interface protocol standard, a message for deleting flow table entries is constructed, and the switch is notified to delete the relevant flow table entries.

5. A decision tree maintenance system based on a software-defined network controller, characterized in that: The system comprises: a software defined network controller, wherein the software defined network controller comprises: A threshold setting module is used to set the threshold based on the growth rate of flow table entries and the time to process the decision tree elimination branch; an elimination priority calculation module, configured to obtain operation statistics of each flow entry in the switch when the number of flow entries generated based on the decision tree is greater than a threshold, and calculate the elimination priority of each flow entry based on the corresponding operation statistics; and The pruning module is used to determine the branches to be eliminated in the decision tree based on the elimination priority of each flow table entry, prune the branches to be eliminated, and delete the corresponding flow table entries.

6. The decision tree maintenance system based on software defined network controller according to claim 5, characterized in that: The threshold setting module is specifically used for: Set the threshold C based on the growth rate of flow table entries and the time it takes to process the decision tree elimination branches: Among them, O is the capacity of the switch flow table, v is the growth rate of the flow table, and t is the time to process the elimination branch of the decision tree.

7. The decision tree maintenance system based on software defined network controller according to claim 5, characterized in that: The elimination priority calculation module is specifically used for: When the number of flow table entries generated by the decision tree is greater than the threshold, the running statistics of each flow table entry in the switch are obtained, wherein the running statistics include but are not limited to: the number of hits of the flow table entry and the time interval Δt1 between the current time and the last hit time of the flow table entry; Calculate the elimination priority s of each flow entry based on the corresponding running statistical data: Wherein, n is the hit count of the flow entry, Δt1 is the time interval between the current time and the last hit time of the flow entry, a is the first weighting coefficient, and b is the second weighting coefficient.

8. The decision tree maintenance system based on software defined network controller according to claim 7, characterized in that: The pruning module is specifically used for: Sort the elimination priority s of each flow table entry from small to large, and obtain the flow table entries corresponding to the first k elimination priority s; where k is the number of flow table entries that exceed the threshold; The decision tree branches corresponding to the k flow table entries are used as the branches to be eliminated in the decision tree; Prune the branches to be eliminated in the decision tree; Based on the southbound interface protocol standard, a message for deleting flow entries is constructed and the switch is notified to delete the relevant flow entries.

Citation Information

Cited By

  • Network communication equipment deployment method in SDN (Software Defined Network) and network communication equipment

    CN121056414A

  • Network communication device deployment method in SDN network and network communication device

    CN121056414B