A lightweight network forwarding offload method based on dynamic filtering
Patent Information
- Application Number
- CN202311112959.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-31
- Publication Date
- 2026-09-22
- Estimated Expiration
- 2043-08-31
AI Technical Summary
[0006]本发明的目的是针对现有技术的不足,设计一种可部署于网络转发面的流量卸载阈值动态调整方法及基于动态滤波的轻量级网络转发卸载方法,以解决目前已有流量卸载策略的问题和不足,提升网络转发性能
[0027]第一,现有技术的卸载策略是静态的,难以适应复杂多变的网络环境,本发明流量卸载阈值的动态更新考虑了转发平台的实时性,保证了卸载策略最优;
Smart Images

Figure CN117240792B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of cloud network forwarding, and in particular to a deployable method for dynamically adjusting traffic offloading thresholds and a lightweight network forwarding offloading method based on dynamic filters. Background Technology
[0002] In a hybrid hardware / software forwarding model, forwarding speed can be increased by offloading data packets from software to hardware. Optimizing the offloading strategy of this model is essential for improving network forwarding performance. As network load continues to increase, traditional data forwarding methods are no longer sufficient to meet the demands of rapid, large-scale transmission. Adopting a hybrid hardware / software forwarding model, which distributes forwarding tasks across different processing units, can improve system performance and resource utilization. A reasonable offloading strategy can effectively reduce server load, free up CPU computing power, and improve overall performance. Simultaneously, faster data packet processing and transmission can reduce latency, meeting the requirements of low-latency applications. Therefore, optimizing the offloading strategy of a hybrid hardware / software forwarding model is a necessary means to address network data transmission demands, contributing to improved user experience and adaptability to future network development.
[0003] Optimizing the offloading strategy of a hybrid hardware / software forwarding model requires dynamic and lightweight characteristics. As network load constantly changes, the strategy must be dynamically adaptable, flexibly switching and allocating forwarding tasks between hardware and software based on real-time load conditions to ensure efficient resource utilization and data forwarding. However, achieving dynamism presents the challenge of real-time decision-making. The strategy needs to make accurate decisions within milliseconds while employing simple and efficient algorithms to avoid excessive overhead and resource consumption. Therefore, lightweight strategy is also crucial. Overly complex offloading decision-making algorithms may lead to excessive computational overhead, thus offsetting the performance gains from offloading. Therefore, the strategy needs to be simple and efficient, capable of making rapid decisions in real-time environments to maintain high forwarding performance.
[0004] Therefore, optimizing the offloading strategy of the hybrid hardware and software forwarding model requires both dynamism and lightweight characteristics to cope with the challenges of changing network load. Addressing challenges such as real-time decision-making, resource allocation, and flexibility necessitates a comprehensive consideration of challenges in algorithm design, approximation algorithms, and real-time monitoring. This will enable efficient and flexible network data transmission, improve system performance and resource utilization, meet the ever-increasing demands for network data transmission, and adapt to future network development.
[0005] In summary, designing a deployable, lightweight forwarding offloading strategy based on dynamic filters is quite challenging. Summary of the Invention
[0006] The purpose of this invention is to address the shortcomings of existing technologies by designing a dynamic adjustment method for traffic offloading thresholds that can be deployed on the network forwarding plane and a lightweight network forwarding offloading method based on dynamic filtering, so as to solve the problems and deficiencies of existing traffic offloading strategies and improve network forwarding performance.
[0007] The objective of this invention is achieved through the following technical solution: a lightweight network forwarding offloading method based on dynamic filtering, comprising the following steps:
[0008] S1: When applying this method to a network forwarding node that combines hardware and software, a sliding window of size T is set, and a sliding interval of size t is set. Data of the network forwarding node in each sliding window is collected, including hardware flow table utilization, CPU utilization, traffic concurrency data and traffic size data. Through the traffic offloading threshold prediction model M generated by training, the real-time traffic offloading threshold N corresponding to each sliding window is inferred and solved.
[0009] S2: Set up a network flow table at this network forwarding node. The flow table contains two columns: flow key value k and packet count n. When a packet arrives at this network forwarding node and is forwarded, if the flow key value of the flow to which the packet belongs does not exist in the network flow table, then create a new flow key value in the network flow table and set its corresponding packet count to 1; if the flow key value of the flow to which the packet belongs exists in the network flow table, then increment the packet count corresponding to the flow key value by 1.
[0010] S3: Based on the hardware flow table aging time T of the network forwarding node. old If a certain flow key value k and its corresponding number of data packets n exceed T old If the time has not been updated, delete this entry from the network flow table to maintain the network flow table.
[0011] S4: Based on the traffic offloading threshold N in S1 and the network flow table in S2, when the number of packets n in a certain entry of the network flow table is updated, compare n with the traffic offloading threshold N. If the number of packets n of a flow is greater than the current traffic offloading threshold N, the forwarding rule associated with that flow will be offloaded to the hardware flow table.
[0012] S5: According to S4, when forwarding data packets, the initial N data packets of each flow will be processed and forwarded in software; after the N+1th data packet of each flow arrives at the network forwarding node, the forwarding rules associated with the flow will be offloaded to the hardware flow table, and the forwarding of subsequent data packets of the flow will be directly completed by the hardware.
[0013] Furthermore, in S1, the settings for the sliding window T and the sliding interval t are specifically implemented using the following steps:
[0014] A: Record the arrival times of data packets and the duration of all flows over a time span of more than one hour at a certain network forwarding node to obtain a flow duration dataset. A ;
[0015] B: Based on the hardware flow table aging time T of the network forwarding node. old For Dataset A Traffic is segmented based on packet arrival time, ensuring that the arrival time interval of packets within the same flow does not exceed the hardware flow table aging time, resulting in a flow duration dataset. B Draw Dataset B The probability density function graph has a total interval of [0, T]. old The interval [0, T] is determined by the bisection method. base ], such that this interval satisfies: according to the normal distribution, for the interval [0, T] base The duration of the flow within the specified range was statistically analyzed to obtain a 68% confidence interval, with the midpoint of the interval at 0.5*T. base It falls within this 68% confidence interval;
[0016] C: Set a dynamic requirement parameter m, 0 < m < 1. The larger m is, the higher the dynamic requirements of the application's network forwarding scenario, according to T in step B. base Set the sliding window size T = T base / (1-m);
[0017] D: After setting up the sliding window, collect data from the network forwarding nodes within each sliding window, including hardware flow table utilization, CPU utilization, traffic size data, and traffic concurrency data;
[0018] E: According to T in step B base Set the sliding window's sliding interval to t = T. base .
[0019] Furthermore, in S1, the training and generation of the traffic offloading threshold prediction model M specifically includes the following steps:
[0020] a: At a certain network forwarding node, within a sliding window of size T, collect data of the network forwarding node within the sliding window, including hardware flow table utilization, CPU utilization, traffic size data, and traffic concurrency data. Change the traffic offloading threshold N of the network forwarding node and record the trend of the forwarding throughput as the traffic offloading threshold N changes. Record the traffic offloading threshold N corresponding to the maximum throughput as the traffic offloading threshold corresponding to this set of data in the sliding window.
[0021] b: Every t sliding interval, collect data from the network forwarding node within each sliding window according to the method in step a, including hardware flow table utilization, CPU utilization, traffic size data, and traffic concurrency data, and record the traffic offloading threshold corresponding to each set of data to obtain the offline traffic offloading threshold dataset. C ;
[0022] c: Set up a lightweight recurrent neural network structure. The specific form of the structure is that the flow size data of each input data is fed into the autoencoder. The output of the autoencoder is concatenated with the hardware flow table utilization, CPU utilization and flow concurrency data and used as the input of the bidirectional LSTM structure. The output of the bidirectional LSTM structure is used to obtain the flow offloading threshold N through a one-to-one mapping function and used as the output of the neural network.
[0023] d: Based on the offline traffic offloading threshold dataset in step b. C The lightweight recurrent neural network structure from step c is used for training to obtain a traffic offloading threshold prediction model M.
[0024] Furthermore, depending on the limitations of network resources, when the resources allocated to the dynamically adjusted traffic offloading threshold are limited, in order to reduce overhead while ensuring high accuracy, traffic is sampled according to a certain sampling ratio to analyze the traffic distribution status. If the traffic changes rapidly, the sampling ratio can also be adaptively adjusted according to the throughput to always keep the resources allocated to the dynamically adjusted traffic offloading threshold within a limited range. When the sampling ratio is set to S%, in the specific application process, only the first S% of data packets arriving in each sliding window are counted.
[0025] Furthermore, depending on network resource constraints, when there are sufficient resources allocated to the dynamically adjusted traffic offloading threshold, the excess resources can be used to download the data in the current sliding window and populate the offline dataset. C And update the training traffic offloading threshold prediction model M.
[0026] Compared with the prior art, the present invention has the following advantages:
[0027] First, the offloading strategies of existing technologies are static and difficult to adapt to complex and ever-changing network environments. The dynamic update of the traffic offloading threshold in this invention takes into account the real-time performance of the forwarding platform and ensures the optimal offloading strategy.
[0028] Second, the network flow table set up at this network forwarding node has very little additional operating overhead and its storage overhead is within an acceptable range.
[0029] Third, the additional overhead of solving the traffic offloading threshold is low and lightweight; because the traffic offloading threshold prediction model is trained and generated offline, and inference is only performed once in each sliding window online, it does not affect the forwarding performance at runtime.
[0030] Fourth, existing technologies do not take into account the impact of hardware flow table utilization and CPU utilization on network forwarding combined with hardware and software. This invention takes a comprehensive approach, taking into account four basic factors: traffic size data, traffic concurrency data, hardware flow table utilization, and CPU utilization to optimize the forwarding offloading strategy. Attached Figure Description
[0031] Figure 1 This is a framework diagram of a method for determining packet forwarding rule offloading based on a traffic offloading threshold, provided in an embodiment of the present invention.
[0032] Figure 2 This is a flowchart illustrating the solution process for the dynamic traffic offloading threshold provided in this embodiment of the invention. Detailed Implementation
[0033] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0034] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.
[0035] like Figure 1 , 2 As shown in the embodiment of this application, a lightweight network forwarding offloading method based on dynamic filtering is proposed, which can be divided into five steps.
[0036] (1) When applying this method to a network forwarding node that combines hardware and software, a sliding window of size T is set and a sliding interval of size t is set. Data of the network forwarding node in each sliding window is collected, including hardware flow table utilization, CPU utilization, traffic concurrency data and traffic size data. The real-time traffic offloading threshold N corresponding to each sliding window is solved by reasoning through the traffic offloading threshold prediction model M generated by training.
[0037] The specific method for setting the sliding window T and the sliding interval t includes the following steps:
[0038] A: Record the arrival times of data packets and the duration of all flows over a time span of more than one hour at a certain network forwarding node to obtain a flow duration dataset. A;
[0039] In this embodiment, the recording time span is based on two hours, which can obtain a relatively complete dataset.
[0040] B: Based on the hardware flow table aging time T of the network forwarding node. old For Dataset A Traffic is segmented based on packet arrival time, ensuring that the arrival time interval of packets within the same flow does not exceed the hardware flow table aging time, resulting in a flow duration dataset. B Draw Dataset B The probability density function graph has a total interval of [0, L]. ld The interval [0, T] is determined by the bisection method. base ], such that this interval satisfies: according to the normal distribution, for the interval [0, T] base The duration of the flow within the specified range was statistically analyzed to obtain a 68% confidence interval, with the midpoint of the interval at 0.5*T. base It falls within this 68% confidence interval;
[0041] The 68% confidence interval corresponds to the interval that is less than one standard deviation from the mean of the normal distribution.
[0042] An interval [0, T] is determined using the bisection method. base The specific method is to set up a temporary variable T. temp Its initial value is T old Based on the normal distribution, for the interval [0, T] temp The duration of the flow within the specified range was statistically analyzed to obtain a 68% confidence interval. If the midpoint of the interval is 0.5*T... temp If it falls to the right of this 68% confidence interval, then T will be... temp Updated to 0.5*T temp If the midpoint of the interval is 0.5*T temp If it falls to the left of this 68% confidence interval, then T will be... temp Updated to 0.5*(T) temp +T old If the midpoint of the interval is 0.5*T temp If it falls within this 68% confidence interval, then T is obtained. base =T temp ;
[0043] C: Set a dynamic requirement parameter m, 0 < m < 1. The larger m is, the higher the dynamic requirements of the application's network forwarding scenario, according to T in step B. base Set the sliding window size T = T base / (1-m);
[0044] In practical applications, the dynamic demand parameter m is taken to be around 0.7, which can best balance dynamics and additional operating overhead.
[0045] D: After setting up the sliding window, collect data from the network forwarding nodes within each sliding window, including hardware flow table utilization, CPU utilization, traffic size data, and traffic concurrency data;
[0046] E: According to T in step B base Set the sliding window's sliding interval to t = T. base .
[0047] The training and generation of the traffic offloading threshold prediction model M specifically includes the following steps:
[0048] a: At a certain network forwarding node, within a sliding window of size T, collect data of the network forwarding node within the sliding window, including hardware flow table utilization, CPU utilization, traffic size data, and traffic concurrency data. Change the traffic offloading threshold N of the network forwarding node and record the trend of the forwarding throughput as the traffic offloading threshold N changes. Record the traffic offloading threshold N corresponding to the maximum throughput as the traffic offloading threshold corresponding to this set of data in the sliding window.
[0049] b: Every t sliding interval, collect data from the network forwarding node within each sliding window according to the method in step a, including hardware flow table utilization, CPU utilization, traffic size data, and traffic concurrency data, and record the traffic offloading threshold corresponding to each set of data to obtain the offline traffic offloading threshold dataset. C ;
[0050] c: Set up a lightweight recurrent neural network structure. The specific form of the structure is that the flow size data of each input data is fed into the autoencoder. The output of the autoencoder is concatenated with the hardware flow table utilization, CPU utilization and flow concurrency data and used as the input of the bidirectional LSTM structure. The output of the bidirectional LSTM structure is used to obtain the flow offloading threshold N through a one-to-one mapping function and used as the output of the neural network.
[0051] The dimensionality of traffic size data is too high. The structure of the autoencoder can reduce the dimensionality of the data while effectively extracting the features of traffic size data. The output of the autoencoder is concatenated with hardware flow table utilization, CPU utilization and traffic concurrency data, which can avoid the imbalance of data features caused by excessive dimensionality differences.
[0052] d: Based on the offline traffic offloading threshold dataset in step b. C The lightweight recurrent neural network structure from step c is used for training to obtain a traffic offloading threshold prediction model M.
[0053] During the training of the neural network, the Dataset C The model is divided into training and testing sets in an 8:2 ratio. The model training is complete when the mean square error between the model prediction results of the training and testing sets and the traffic offloading threshold no longer decreases, that is, when the training model effect no longer improves.
[0054] (2) Set up a network flow table at the network forwarding node. The flow table contains two columns: flow key value k and number of packets n. When a packet arrives at the network forwarding node and is forwarded, if the flow key value of the flow to which the packet belongs does not exist in the network flow table, a new flow key value is created in the network flow table and the number of packets corresponding to it is set to 1. If the flow key value of the flow to which the packet belongs exists in the network flow table, the number of packets corresponding to the flow key value is incremented by 1.
[0055] The method for finding the flow key of a packet to which it belongs is hashed, with a time complexity of O(1) and low overhead for updating the network flow table.
[0056] Depending on network resource constraints, when there are sufficient resources allocated to the dynamically adjusted traffic offloading threshold, the excess resources can be used to download the data in the current sliding window and populate the offline dataset. C And update the training traffic offloading threshold prediction model M.
[0057] (3) Based on the hardware flow table aging time T of the network forwarding node old If a certain flow key value k and its corresponding number of data packets n exceed T old If the time has not been updated, this entry in the network flow table will be deleted to maintain the network flow table.
[0058] (4) According to the traffic offloading threshold N in step (1) and the network flow table in step (2), when the number of packets n in a certain item of the network flow table is updated, compare the size of n with the traffic offloading threshold N. If the number of packets n of a flow is greater than the current traffic offloading threshold N, the forwarding rule associated with the flow will be offloaded to the hardware flow table.
[0059] Depending on network resource constraints, when the resources allocated to dynamically adjust the traffic offloading threshold are limited, traffic sampling is performed at a certain sampling ratio to analyze the traffic distribution status in order to reduce overhead while ensuring high accuracy. If the traffic changes rapidly, the sampling ratio can also be adaptively adjusted according to the throughput to ensure that the resources allocated to dynamically adjust the traffic offloading threshold do not exceed the limited range. When the sampling ratio is set to S%, in specific applications, only the first S% of data packets arriving in each sliding window are counted.
[0060] In this embodiment, S% is set in the range of 40% to 60%, which can balance the additional overhead caused by the dynamic adjustment of the traffic offloading threshold and the requirements of network forwarding performance.
[0061] (5) According to the forwarding rule offloading strategy in step (4), when forwarding data packets, the initial N data packets of each flow will be processed and forwarded in the software; after the N+1th data packet of each flow arrives at the network forwarding node, the forwarding rule associated with the flow will be offloaded to the hardware flow table, and the forwarding of subsequent data packets of the flow will be directly completed by the hardware.
[0062] This application's embodiment implements a prototype system on a Bluefield-2 network interface card (NIC) and tests the method's effectiveness. However, depending on the hardware devices used in the network forwarding platform, this application's embodiment can also be extended and deployed to other hardware and software combined NIC platforms.
[0063] The above description is merely a preferred embodiment of the present invention. Although the present invention has been disclosed above with reference to preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art can make many possible variations and modifications to the technical solutions of the present invention using the methods and techniques disclosed above, or modify them into equivalent embodiments with equivalent changes, without departing from the scope of the technical solutions of the present invention. Therefore, any simple modifications, equivalent changes, and modifications made to the above embodiments based on the technical essence of the present invention without departing from the content of the technical solutions of the present invention shall still fall within the protection scope of the technical solutions of the present invention.
Claims
1. A lightweight network forwarding offloading method based on dynamic filtering, characterized in that, Includes the following steps: S1: When applying this method to a network forwarding node that combines hardware and software, a sliding window of size T is set, and a sliding interval of size t is set. Data of the network forwarding node in each sliding window is collected, including hardware flow table utilization, CPU utilization, traffic concurrency data and traffic size data. Through the traffic offloading threshold prediction model M generated by training, the real-time traffic offloading threshold N corresponding to each sliding window is inferred and solved. S2: Set up a network flow table at this network forwarding node. The flow table contains two columns: flow key value k and packet count n. When a packet arrives at this network forwarding node and is forwarded, if the flow key value of the flow to which the packet belongs does not exist in the network flow table, then create a new flow key value in the network flow table and set its corresponding packet count to 1; if the flow key value of the flow to which the packet belongs exists in the network flow table, then increment the packet count corresponding to the flow key value by 1. S3: Based on the hardware flow table aging time T of the network forwarding node. old If a certain flow key value k and its corresponding number of data packets n exceed T old If the time has not been updated, delete this entry from the network flow table to maintain the network flow table. S4: Based on the traffic offloading threshold N in S1 and the network flow table in S2, when the number of packets n in a certain entry of the network flow table is updated, compare n with the traffic offloading threshold N. If the number of packets n of a flow is greater than the current traffic offloading threshold N, the forwarding rule associated with that flow will be offloaded to the hardware flow table. S5: According to S4, when forwarding data packets, the initial N data packets of each flow will be processed and forwarded in software; after the N+1th data packet of each flow arrives at the network forwarding node, the forwarding rules associated with the flow will be offloaded to the hardware flow table, and the forwarding of subsequent data packets of the flow will be directly completed by the hardware.
2. The method according to claim 1, characterized in that, In S1, the settings for the sliding window T and the sliding interval t are specifically implemented using the following steps: A: Record the arrival times of data packets and the duration of all flows over a time span of more than one hour at a certain network forwarding node to obtain a flow duration dataset. A ; B: Based on the hardware flow table aging time T of the network forwarding node. old For Dataset A Traffic is segmented based on packet arrival time, ensuring that the arrival time interval of packets within the same flow does not exceed the hardware flow table aging time, resulting in a flow duration dataset. B Draw Dataset B The probability density function graph has a total interval of [0, T]. old The interval [0, T] is determined by the bisection method. base ], such that this interval satisfies: according to the normal distribution, the interval [0,T] base The duration of the flow within the specified range was statistically analyzed to obtain a 68% confidence interval, with the midpoint of the interval at 0.5*T. base It falls within this 68% confidence interval; C: setting a dynamic demand parameter m, where 0<m<1, and a larger m indicates a higher dynamic requirement of the network forwarding scenario of the application, according to T in step B base , set the sliding window size T=T base / (1-m); D: After setting up the sliding window, collect data from the network forwarding nodes within each sliding window, including hardware flow table utilization, CPU utilization, traffic size data, and traffic concurrency data; E: According to T in step B base Set the sliding window's sliding interval to t = T. base .
3. The method according to claim 1, characterized in that, In S1, the training and generation of the traffic offloading threshold prediction model M specifically includes the following steps: a: At a certain network forwarding node, within a sliding window of size T, collect data of the network forwarding node within the sliding window, including hardware flow table utilization, CPU utilization, traffic size data, and traffic concurrency data. Change the traffic offloading threshold N of the network forwarding node and record the trend of the forwarding throughput as the traffic offloading threshold N changes. Record the traffic offloading threshold N corresponding to the maximum throughput as the traffic offloading threshold corresponding to this set of data in the sliding window. b: Every t sliding interval, collect data from the network forwarding node within each sliding window according to the method in step a, including hardware flow table utilization, CPU utilization, traffic size data, and traffic concurrency data, and record the traffic offloading threshold corresponding to each set of data to obtain the offline traffic offloading threshold dataset. C ; c: Set up a lightweight recurrent neural network structure. The specific form of the structure is that the flow size data of each input data is fed into the autoencoder. The output of the autoencoder is concatenated with the hardware flow table utilization, CPU utilization and flow concurrency data and used as the input of the bidirectional LSTM structure. The output of the bidirectional LSTM structure is used to obtain the flow offloading threshold N through a one-to-one mapping function and used as the output of the neural network. d: Based on the offline traffic offloading threshold dataset in step b. C The lightweight recurrent neural network structure from step c is used for training to obtain a traffic offloading threshold prediction model M.
4. The method according to claim 1, characterized in that, Depending on network resource constraints, when the resources allocated to dynamically adjust the traffic offloading threshold are limited, traffic sampling is performed at a certain sampling ratio to analyze the traffic distribution status in order to reduce overhead while ensuring high accuracy. If the traffic changes rapidly, the sampling ratio can also be adaptively adjusted according to the throughput to ensure that the resources allocated to dynamically adjust the traffic offloading threshold do not exceed the limited range. When the sampling ratio is set to S%, in specific applications, only the first S% of data packets arriving in each sliding window are counted.
5. The method according to claim 1, characterized in that, Depending on network resource constraints, when there are sufficient resources allocated to the dynamically adjusted traffic offloading threshold, the excess resources can be used to download the data in the current sliding window and populate the offline dataset. C And update the training traffic offloading threshold prediction model M.
Citation Information
Patent Citations
Software and hardware mixed flow table management method and device
CN113438168A
Combined Hardware / Software Forwarding Mechanism and Method
US20110228781A1