Dynamic flow table configuration optimization method and device, computer equipment and storage medium
The dynamic exponential smoothing method predicts the number of new network flows and load conditions, and optimizes the flow table entry failure time with the number of traffic matching times, which solves the problem that the flow table configuration method in the SDN architecture cannot cope with burst traffic, and improves the network carrying capacity and resource utilization efficiency .
Patent Information
- Application Number
- CN202411298915.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-18
- Publication Date
- 2024-12-17
AI Technical Summary
The flow table configuration method in the existing SDN architecture cannot effectively deal with the dynamic changes in network traffic, especially when facing burst traffic, which causes frequent timeouts and overloads of flow table items, increasing the burden on the switch, and lacks global optimization strategies and traffic predictions. mechanism affects network stability and service quality.
Dynamic exponential smoothing method is used to predict the number of new network flows in the next time period, dynamically adjust the failure time of the flow table entry in combination with the current load status, and optimize the survival time of the flow table entry according to the number of traffic matching times to ensure the survival time of the high-frequency usage items is slightly Higher than low frequency usage items, reducing duplication and reload.
It improves the efficiency of flow table resource utilization, enhances the network's carrying capacity under burst traffic, reduces switch resource consumption, improves controller efficiency, and effectively deals with burst traffic.
Smart Images

Figure CN119155228A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of cloud computing technology, and in particular, relates to a dynamic flow table configuration optimization method, device, computer equipment and storage medium. Background Art
[0002] Traditional industrial communication architecture mainly relies on proprietary hardware and protocols. These systems are usually closed, lack flexibility and scalability, and cannot meet the dynamic, real-time and flexibility requirements of modern industrial applications. Industrial systems need to achieve more intelligent device management, real-time communication and inventive automation orchestration.
[0003] With the rapid development of cloud computing, the Internet of Things, and edge computing, network traffic has shown the characteristics of diversity and burstiness. Especially in industrial networks and edge computing environments, the generation of burst traffic may cause network congestion, affecting system stability and service quality. In this context, Software Defined Network (SDN) and cloud-edge collaborative computing technologies have gradually attracted attention. As an emerging network architecture, SDN separates the control plane and data plane of the network, takes advantage of centralized control, and uses the controller to globally grasp the network status and dynamically adjust the traffic path to improve the utilization efficiency of network resources, thus realizing centralized control and flexible management of network resources; cloud-edge collaborative computing improves computing efficiency and response speed by distributing computing inventions to edge nodes and the cloud. The combination of these two technologies provides new solutions for modern industrial applications that can meet dynamic, real-time, and flexible needs.
[0004] In the SDN architecture, the flow table is the core component of the switch, which is equivalent to the routing table in the traditional network or the MAC address table of the switch. In the prior art, the flow table configuration method for the SDN architecture mainly includes:
[0005] 1. Static timeout configuration method: Most SDN switches use fixed expiration time parameters, and flow table entries are deleted after the expiration time expires. This static configuration method is simple and easy, but it cannot effectively cope with the dynamic changes of network traffic, especially when facing burst traffic, which easily leads to frequent timeout and overload of flow table entries, increases the burden on the switch, and reduces the overall performance of the network.
[0006] 2. Dynamic flow table management method based on traffic characteristics: Some studies have proposed dynamically adjusting the expiration time of flow table entries according to traffic characteristics. For example, by monitoring traffic patterns and frequencies, the expiration time of flow table entries can be dynamically adjusted to reduce frequent flow table entry updates. Although this method improves the utilization of flow table resources to a certain extent, it still lacks a global optimization strategy and cannot fully cope with large-scale burst traffic.
[0007] 3. Flow table compression and merging technology: Other studies have attempted to optimize the utilization of flow table resources through flow table compression and merging technology. For example, multiple flow table entries are merged into one rule to reduce the size of the flow table, thereby improving the utilization efficiency of the flow table. However, this method may bring additional processing overhead and delay when dealing with complex traffic patterns.
[0008] In addition, although the existing solutions use global information for management, they lack an effective traffic prediction mechanism. At the same time, the existing solutions do not optimize the number of matches of flow table items, resulting in frequent timeouts and overloads of frequently used flow table items, increasing the burden on the switch. Summary of the invention
[0009] The present application provides a dynamic flow table configuration optimization method, apparatus, computer equipment and storage medium, aiming to solve at least one of the above-mentioned technical problems in the prior art to a certain extent.
[0010] In order to solve the above problems, this application provides the following technical solutions:
[0011] A dynamic flow table configuration optimization method, comprising:
[0012] Collect historical flow table item data of flow tables in the SDN network, use dynamic exponential smoothing method to predict the number of historical flow table items, and obtain the predicted value of the number of new network flows in the next time period;
[0013] Analyze the current load status of the SDN network, obtain the number of free flow table entries in the flow table, compare the predicted value of the number of new flows in the network with the number of free flow table entries, and dynamically adjust the expiration time of each flow table entry in the flow table according to the comparison result;
[0014] The number of flow matches of each flow table item in the flow table is counted, and the adjusted expiration time is optimized according to the number of flow matches, and then a new flow table is output.
[0015] The technical solution adopted by the embodiment of the present application also includes: using the dynamic exponential smoothing method to predict the number of historical flow table entries to obtain a predicted value of the number of new network flows in the next time period, specifically:
[0016] Setting the initial forecast value and initial exponential smoothing coefficient of the dynamic exponential smoothing method;
[0017] Calculate the initial single exponential smoothing value and double exponential smoothing value;
[0018] Dynamically adjust the single exponential smoothing value and the double exponential smoothing value according to the change of the historical flow table entry data to obtain updated single exponential smoothing value and double exponential smoothing value;
[0019] The number of new network flows in the next time period is predicted according to the updated single exponential smoothing value and the double exponential smoothing value, and a predicted value of the number of new network flows in the next time period is output.
[0020] The technical solution adopted by the embodiment of the present application also includes: dynamically adjusting the single exponential smoothing value and the double exponential smoothing value according to the change of the historical flow table entry data to obtain the updated single exponential smoothing value and the double exponential smoothing value, specifically:
[0021] First, perform exponential smoothing:
[0022] S t =αX t +(1-α)S t-1
[0023] Among them, S t is the smoothed value at time t, X t is the actual value at time t, α is the smoothing coefficient, 0<α<1;
[0024] Then, taking the trend into account, double exponential smoothing is performed:
[0025] S′ t =αS t +(1-α)S′ t-1
[0026] S″ t =αS′ t +(1-α)S″ t
[0027] Among them, S′ t and S″ t They are first exponential smoothing value and second exponential smoothing value respectively.
[0028] The technical solution adopted by the embodiment of the present application also includes: the prediction formula of the number of new network flows is:
[0029]
[0030] Among them, F t+1 It is the predicted value of the number of new network flows at time t+1.
[0031] The technical solution adopted by the embodiment of the present application also includes: analyzing the current load status of the SDN network, obtaining the number of free flow table entries in the flow table, and comparing the predicted value of the number of new network flows with the number of free flow table entries, and dynamically adjusting the expiration time of each flow table entry in the flow table according to the comparison result, specifically:
[0032] If the predicted value of the number of new network flows is higher than the number of free flow table entries, the expiration time of each flow table entry in the flow table is reduced to speed up the expiration of old flow table entries; if the predicted value of the number of new network flows is lower than the number of free flow table entries, the expiration time of each flow table entry in the flow table is increased to maintain the existing flow table entries.
[0033] The technical solution adopted in the embodiment of the present application also includes: the expiration time includes a stagnation timeout time and a hard timeout time, the stagnation timeout time indicates that the flow table entry has not matched new traffic within a certain period of time, and for the flow table entry marked as a stagnation timeout time, the stagnation timeout time is dynamically adjusted according to the current network load status and the predicted value of the number of new network flows; for the flow table entry marked as a hard timeout time, the hard timeout time is dynamically adjusted according to the current network load status and the predicted value of the number of new network flows, and the flow table entry is deleted after the hard timeout time is reached.
[0034] The technical solution adopted by the embodiment of the present application also includes: counting the number of flow matches of each flow table item in the flow table, optimizing the adjusted expiration time according to the number of flow matches, and outputting a new flow table, specifically:
[0035] The lifetime of each flow table item is dynamically adjusted according to the number of traffic matches, so that the lifetime of the flow table item with a high number of traffic matches in the flow table is slightly higher than that of the flow table item with a low number of traffic matches, and the stagnation timeout time and hard timeout time of the flow table item with a high number of traffic matches are extended, and the stagnation timeout time and hard timeout time of the flow table item with a low number of traffic matches are shortened. After completing the optimization of the expiration time, a new flow table is output, and the optimized expiration time is applied to the flow table item, thereby completing the dynamic optimization of the flow table in the SDN network.
[0036] Another technical solution adopted by the embodiment of the present application is: a dynamic flow table configuration optimization device, comprising:
[0037] New flow number prediction module: used to collect historical flow table item data of flow tables in the SDN network, use dynamic exponential smoothing method to predict the number of historical flow table items, and obtain the predicted value of new network flows in the next time period;
[0038] The expiration time adjustment module is used to analyze the current load status of the SDN network, obtain the number of free flow table entries in the flow table, and compare the predicted value of the number of new flows in the network with the number of free flow table entries, and dynamically adjust the expiration time of each flow table entry in the flow table according to the comparison result;
[0039] The expiration time optimization module is used to count the number of flow matches of each flow table item in the flow table, optimize the adjusted expiration time according to the number of flow matches, and output a new flow table.
[0040] Another technical solution adopted by the embodiment of the present application is: a computer device, the computer device includes a processor and a memory coupled to the processor, wherein:
[0041] The memory stores program instructions for implementing the dynamic flow table configuration optimization method;
[0042] The processor is used to execute the program instructions stored in the memory to control the dynamic flow table configuration optimization method.
[0043] Another technical solution adopted by the embodiment of the present application is: a storage medium storing program instructions executable by a processor, wherein the program instructions are used to execute the dynamic flow table configuration optimization method.
[0044] Compared with the prior art, the beneficial effects of the embodiments of the present application are as follows: the dynamic flow table configuration optimization method, device, computer equipment and storage medium of the embodiments of the present application use the dynamic exponential smoothing method to predict the number of historical flow table items, obtain the predicted value of the number of new network flows in the next time period, and dynamically adjust the expiration time of the flow table items according to the predicted value of the number of new network flows and the load status of the current network based on the dynamic adjustment mechanism of the expiration time item, so that the flow table items can adaptively adjust the life cycle according to the real-time status of the network, improve the utilization efficiency of flow table resources, and enhance the network's carrying capacity under burst traffic. And optimize the life time of the flow table items in combination with the number of flow matching times of the flow table items to ensure that the life time of the high-frequency flow table items in the flow table is slightly higher than that of the low-frequency flow table items, thereby improving the utilization efficiency of the flow table resources, reducing the repeated deletion and overloading of high-frequency flow table items, saving switch resources, and improving the efficiency of the controller. The dynamic flow table optimization algorithm of the present invention can adjust the flow table parameters in real time according to the network load status and the number of flow matching times, effectively deal with burst traffic, and greatly enhance the carrying capacity of the network. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1 is a flow chart of a method for optimizing dynamic flow table configuration according to an embodiment of the present application;
[0046] Figure 2 A schematic diagram of the structure of a dynamic flow table configuration optimization device according to an embodiment of the present application;
[0047] Figure 3 A schematic diagram of the computer device structure of an embodiment of the present application;
[0048] Figure 4 A schematic diagram of the structure of a storage medium according to an embodiment of the present application. DETAILED DESCRIPTION
[0049] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0050] The terms "first", "second", "third" in this application are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Thus, the features defined as "first", "second", "third" can expressly or implicitly include at least one of the features. In the description of this application, the meaning of "multiple" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined. In the embodiments of this application, all directional indications (such as up, down, left, right, front, back...) are only used to explain the relative position relationship, movement, etc. between the components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication also changes accordingly. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions. For example, a process, method, system, product or computer device that includes a series of steps or units is not limited to the steps or units listed, but optionally also includes steps or units that are not listed, or optionally also includes other steps or units inherent to these processes, methods, products or computer devices.
[0051] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0052] Specifically, see Figure 1 , is a flow chart of a dynamic flow table configuration optimization method according to an embodiment of the present application. The dynamic flow table configuration optimization method according to an embodiment of the present application comprises the following steps:
[0053] S10: Collect the measured sequence of historical flow table item data in the SDN network as time series data for predicting the number of new flows in the network;
[0054] In this step, in the SDN network, the flow table is the core part of the switch, and the flow table of the switch is equivalent to the routing table in the traditional network, or the Mac address table of the switch. Each flow table is composed of multiple flow table items, and the historical flow table item data mainly includes matching domains, counters, instructions, priorities, expiration times, and ancillary information, etc., wherein the matching domain includes the addressing information of the 2nd to 4th layers of the traditional OSI, such as the inbound port, the source and destination Mac addresses, the Ethernet type, the VLAN information, the source and destination IP addresses, etc.; the counter is used to count each table, each interface, and each flow, so as to facilitate traffic management; the instruction is used to indicate how to process (including but not limited to forwarding, discarding, modifying, etc.) the matching traffic; the priority is used to determine the priority of each flow table item; the ancillary information is other relevant information. The embodiment of the present application collects the measured sequence of the historical flow table item data of the flow table in the SDN network as the time series data for predicting the number of new flows in the network in the next time period.
[0055] S20: Use the Double Exponential Smoothing (DES) method to predict the number of historical flow entries and obtain the predicted value of the number of new network flows in the next time period;
[0056] In the embodiment of the present application, the dynamic exponential smoothing method is used to predict the number of historical flow table entries to obtain the predicted value of the number of new network flows in the next time period, specifically including:
[0057] S21: Set the initial forecast value and initial exponential smoothing coefficient of the dynamic exponential smoothing method;
[0058] S22: Calculate the initial single exponential smoothing value and double exponential smoothing value;
[0059] S23: dynamically adjusting the single exponential smoothing value and the double exponential smoothing value according to the change of the historical flow table item data to obtain updated single exponential smoothing value and double exponential smoothing value;
[0060] The dynamic adjustment algorithm is specifically as follows:
[0061] First, perform single exponential smoothing (SES):
[0062] S t =αX t +(1-α)S t-1 (1)
[0063] Among them, S t is the smoothed value at time t, X t is the actual value at time t, α is the smoothing coefficient, 0<α<1.
[0064] Then, taking the trend into account, double exponential smoothing (DES) is performed:
[0065]
[0066] Among them, S′ t and S″ t They are first exponential smoothing value and second exponential smoothing value respectively.
[0067] S24: predicting the number of new network flows in the next time period according to the updated single exponential smoothing value and the double exponential smoothing value, and outputting the predicted value of the number of new network flows in the next time period;
[0068] Among them, the prediction formula for the number of new network flows is:
[0069]
[0070] Among them, F t+1 It is the predicted value of the number of new network flows at time t+1.
[0071] The embodiment of the present application uses an improved dynamic exponential smoothing method to predict the number of new network flows in the next time period, thereby providing more accurate data support for flow table optimization and ensuring a high degree of match between the predicted value and the actual network status.
[0072] S30: Analyze the current load status of the SDN network, obtain the number of free flow table entries in the current flow table, compare the predicted value of the number of new network flows with the number of free flow table entries, and dynamically adjust the expiration time of each flow table entry in the flow table according to the comparison result;
[0073] In this step, first, starting from the current load condition of the SDN network, the number of free flow table entries in the current flow table is obtained, and then the predicted value of the number of new network flows is compared with the number of free flow table entries. If the predicted value of the number of new network flows is higher than the number of free flow table entries, the expiration time of each flow table entry in the flow table is reduced to speed up the expiration of old flow table entries; conversely, if the predicted value of the number of new network flows is lower than the number of free flow table entries, the expiration time of each flow table entry in the flow table is increased to maintain the existing flow table entries. By dynamically adjusting the expiration time, the number of active flow table entries in the flow table is changed, so that the flow table entries can adaptively adjust the life cycle according to the real-time network conditions, improve the utilization efficiency of flow table resources, and enhance the network's carrying capacity under burst traffic.
[0074] Specifically, the expiration time includes two parts: idle timeout and hard timeout. The idle timeout indicates that the flow entry does not match new traffic within a certain period of time. For the flow entry marked as idle timeout, the idle timeout is dynamically adjusted according to the current network load and the predicted value of the number of new network flows. For the flow entry marked as hard timeout, the idle hard timeout is dynamically adjusted according to the current network load and the predicted value of the number of new network flows. After the hard timeout is reached, the flow entry will be deleted regardless of whether it matches new traffic.
[0075] S40: counting the number of traffic matches of each flow table item in the SDN network, optimizing the adjusted expiration time according to the number of traffic matches of the flow table item, and outputting a new flow table;
[0076] In this step, after dynamically adjusting the expiration time of each flow table item in the flow table, the number of flow matches of each flow table item is further counted based on the number of flow matches of each flow table item, and the survival time of each flow table item is dynamically adjusted according to the number of flow matches, so that the survival time of the flow table item with a high number of flow matches (high frequency of use) in the flow table is slightly longer than that of the flow table item with a low number of flow matches (low frequency of use), and the stagnation timeout and hard timeout time of the flow table item with a high number of flow matches are extended to ensure that the flow table items used frequently are not frequently deleted, and the stagnation timeout and hard timeout time of the flow table items with a low number of flow matches are shortened to release the flow table resources. After optimizing the expiration time by using the number of flow matches of each flow table item, a new flow table is output, and the optimized expiration time is applied to the flow table item, completing the dynamic optimization of the flow table in the SDN network, which can ensure that the switch does not repeatedly delete and reload the same flow table item with a high frequency of use in a short period of time, which can save the switch space resources and controller computing resources.
[0077] Based on the above, the dynamic flow table configuration optimization method of the embodiment of the present application uses the dynamic exponential smoothing method to predict the number of historical flow table items, obtain the predicted value of the number of new network flows in the next time period, and dynamically adjust the expiration time of the flow table items based on the dynamic adjustment mechanism of the expiration time item according to the predicted value of the number of new network flows and the load condition of the current network, so that the flow table items can adaptively adjust the life cycle according to the real-time status of the network, improve the utilization efficiency of flow table resources, and enhance the network's carrying capacity under burst traffic. And optimize the life time of the flow table items in combination with the number of flow matches of the flow table items to ensure that the life time of the high-frequency flow table items in the flow table is slightly higher than that of the low-frequency flow table items, thereby improving the utilization efficiency of the flow table resources, reducing the repeated deletion and overloading of high-frequency flow table items, saving switch resources, and improving the efficiency of the controller. The dynamic flow table optimization algorithm of the present invention can adjust the flow table parameters in real time according to the network load status and the number of flow matches, effectively deal with burst traffic, and greatly enhance the carrying capacity of the network.
[0078] See also Figure 2 , is a schematic diagram of the structure of a dynamic flow table configuration optimization device according to an embodiment of the present application. The dynamic flow table configuration optimization method device 40 according to an embodiment of the present application includes:
[0079] New flow number prediction module 41: used to collect historical flow table item data of flow tables in the SDN network, use dynamic exponential smoothing method to predict the number of historical flow table items, and obtain the predicted value of new network flows in the next time period;
[0080] The expiration time adjustment module 42 is used to analyze the current load status of the SDN network, obtain the number of free flow table entries in the flow table, and compare the predicted value of the number of new network flows with the number of free flow table entries, and dynamically adjust the expiration time of each flow table entry in the flow table according to the comparison result;
[0081] The expiration time optimization module 43 is used to count the number of flow matching times of each flow table item in the flow table, optimize the adjusted expiration time according to the number of flow matching times, and output a new flow table.
[0082] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / units are based on the same concept as the method embodiment of the present application. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.
[0083] The device provided in the embodiment of the present application can be applied in the aforementioned method embodiment. For details, please refer to the description of the aforementioned method embodiment, which will not be repeated here.
[0084] See also Figure 3 , is a schematic diagram of the computer device structure of an embodiment of the present application. The computer device 50 includes:
[0085] A memory 51 storing executable program instructions;
[0086] A processor 52 connected to the memory 51;
[0087] The processor 52 is used to call the executable program instructions stored in the memory 51 and perform the following steps: collect historical flow table item data of the flow table in the SDN network, use the dynamic exponential smoothing method to predict the number of historical flow table items, and obtain the predicted value of the number of new network flows in the next time period; analyze the current load status of the SDN network, obtain the number of free flow table items in the flow table, and compare the predicted value of the number of new network flows with the number of free flow table items, and dynamically adjust the expiration time of each flow table item in the flow table according to the comparison result; count the number of flow matches of each flow table item in the flow table, optimize the adjusted expiration time according to the number of flow matches, and output a new flow table.
[0088] The processor 52 may also be referred to as a CPU (Central Processing Unit). The processor 52 may be an integrated circuit chip having signal processing capabilities. The processor 52 may also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0089] See also Figure 4, is a schematic diagram of the structure of the storage medium of the embodiment of the present application. The storage medium of the embodiment of the present application stores a program instruction 61 capable of implementing the following steps: collecting historical flow table item data of the flow table in the SDN network, using the dynamic exponential smoothing method to predict the number of historical flow table items, and obtaining the predicted value of the number of new network flows in the next time period; analyzing the current load status of the SDN network, obtaining the number of free flow table items in the flow table, and comparing the predicted value of the number of new network flows with the number of free flow table items, and dynamically adjusting the expiration time of each flow table item in the flow table according to the comparison result; counting the number of flow matches of each flow table item in the flow table, optimizing the adjusted expiration time according to the number of flow matches, and outputting a new flow table. Among them, the program instruction 61 can be stored in the above-mentioned storage medium in the form of a software product, including a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network computer device, etc.) or a processor to execute all or part of the steps of the methods of each implementation method of the present application. The aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program instructions, or terminal computer devices such as computers, servers, mobile phones, tablets, etc. Among them, the server can be an independent server, or it can be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms.
[0090] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the system embodiments described above are only schematic. For example, the division of units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0091] In addition, each functional unit in each embodiment of the present application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of software functional units. The above is only an implementation method of the present application, and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made by using the description and drawings of this application, or directly or indirectly used in other related technical fields, is also included in the patent protection scope of the present application.
Claims
1. A dynamic flow table configuration optimization method, It is characterized in that include: Collect historical flow table item data of flow tables in the SDN network, use dynamic exponential smoothing method to predict the number of historical flow table items, and obtain the predicted value of the number of new network flows in the next time period; Analyze the current load status of the SDN network, obtain the number of free flow table entries in the flow table, compare the predicted value of the number of new flows in the network with the number of free flow table entries, and dynamically adjust the expiration time of each flow table entry in the flow table according to the comparison result; The number of flow matches of each flow table item in the flow table is counted, and the adjusted expiration time is optimized according to the number of flow matches, and then a new flow table is output.
2. The dynamic flow table configuration optimization method according to claim 1, It is characterized in that The dynamic exponential smoothing method is used to predict the number of historical flow table entries to obtain a predicted value of the number of new network flows in the next time period, specifically: Setting the initial forecast value and initial exponential smoothing coefficient of the dynamic exponential smoothing method; Calculate the initial single exponential smoothing value and double exponential smoothing value; Dynamically adjust the single exponential smoothing value and the double exponential smoothing value according to the change of the historical flow table entry data to obtain updated single exponential smoothing value and double exponential smoothing value; The number of new network flows in the next time period is predicted according to the updated single exponential smoothing value and the double exponential smoothing value, and a predicted value of the number of new network flows in the next time period is output.
3. The dynamic flow table configuration optimization method according to claim 2, It is characterized in that The single exponential smoothing value and the double exponential smoothing value are dynamically adjusted according to the change of the historical flow table entry data to obtain the updated single exponential smoothing value and the double exponential smoothing value, specifically: First, perform exponential smoothing: S t =αX t +(1-α)S t-1 Among them, S t is the smoothed value at time t, X t is the actual value at time t, α is the smoothing coefficient, 0<α<1; Then, taking the trend into account, double exponential smoothing is performed: S′ t =αS t +(1-α)S′ t-1 S″ t =αS′ t +(1-α)S″ t Among them, S′ t and S″ t They are first exponential smoothing value and second exponential smoothing value respectively.
4. The dynamic flow table configuration optimization method according to claim 3, It is characterized in that The prediction formula for the number of new network flows is: Among them, F t+1 It is the predicted value of the number of new network flows at time t+1.
5. The method for optimizing dynamic flow table configuration according to any one of claims 1 to 4, It is characterized in that The analyzing the current load status of the SDN network, obtaining the number of free flow table entries in the flow table, and comparing the predicted value of the number of new network flows with the number of free flow table entries, and dynamically adjusting the expiration time of each flow table entry in the flow table according to the comparison result, is specifically as follows: If the predicted value of the number of new network flows is higher than the number of free flow table entries, the expiration time of each flow table entry in the flow table is reduced to speed up the expiration of old flow table entries; if the predicted value of the number of new network flows is lower than the number of free flow table entries, the expiration time of each flow table entry in the flow table is increased to maintain the existing flow table entries.
6. The method for optimizing dynamic flow table configuration according to claim 5, It is characterized in that The expiration time includes a stagnation timeout and a hard timeout. The stagnation timeout indicates that the flow table entry does not match new traffic within a certain period of time. For a flow table entry marked with a stagnation timeout, the stagnation timeout is dynamically adjusted according to the current network load status and the predicted value of the number of new network flows. For a flow table entry marked with a hard timeout, the hard timeout is dynamically adjusted according to the current network load status and the predicted value of the number of new network flows, and the flow table entry is deleted after the hard timeout is reached.
7. The method for optimizing dynamic flow table configuration according to claim 6, It is characterized in that The counting of the flow matching times of each flow table item in the flow table, optimizing the adjusted expiration time according to the flow matching times, and outputting a new flow table is specifically as follows: The lifetime of each flow table item is dynamically adjusted according to the number of traffic matches, so that the lifetime of the flow table item with a high number of traffic matches in the flow table is slightly higher than that of the flow table item with a low number of traffic matches, and the stagnation timeout time and hard timeout time of the flow table item with a high number of traffic matches are extended, and the stagnation timeout time and hard timeout time of the flow table item with a low number of traffic matches are shortened. After completing the optimization of the expiration time, a new flow table is output, and the optimized expiration time is applied to the flow table item, thereby completing the dynamic optimization of the flow table in the SDN network.
8. A dynamic flow table configuration optimization device, It is characterized in that include: New flow number prediction module: used to collect historical flow table item data of flow tables in the SDN network, use dynamic exponential smoothing method to predict the number of historical flow table items, and obtain the predicted value of new network flows in the next time period; The expiration time adjustment module is used to analyze the current load status of the SDN network, obtain the number of free flow table entries in the flow table, and compare the predicted value of the number of new flows in the network with the number of free flow table entries, and dynamically adjust the expiration time of each flow table entry in the flow table according to the comparison result; The expiration time optimization module is used to count the number of flow matches of each flow table item in the flow table, optimize the adjusted expiration time according to the number of flow matches, and output a new flow table.
9. A computer device, It is characterized in that The computer device includes a processor and a memory coupled to the processor, wherein: The memory stores program instructions for implementing the dynamic flow table configuration optimization method according to any one of claims 1 to 7; The processor is used to execute the program instructions stored in the memory to control the dynamic flow table configuration optimization method.
10. A storage medium, It is characterized in that Program instructions executable by a processor are stored, and the program instructions are used to execute the dynamic flow table configuration optimization method according to any one of claims 1 to 7.
