Data flow scheduling method and device, network equipment and storage medium
By dynamically adjusting the acceleration threshold of the acceleration queue, the performance bottleneck problem of hardware acceleration technology under resource limitation is solved, and the continuous, stable and efficient hardware acceleration performance in a high-load environment is achieved.
Patent Information
- Application Number
- CN202411129882.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-16
- Publication Date
- 2024-12-03
AI Technical Summary
When hardware acceleration technology processes large amounts of data flows, due to the resource limitation of the acceleration module, data flows exceeding the maximum value cannot be accelerated, and it needs to return to the software processing mode, resulting in network latency and performance degradation.
By monitoring the real-time occupancy rate of the acceleration queue and the occupancy growth rate of the historical cycle, dynamically adjust the acceleration threshold to optimize the data flow scheduling of the hardware acceleration module, rationally utilize hardware resources, and ensure that high performance is maintained in the environment of burst high-intensity network traffic shocks. .
Effectively eliminate the impact of hardware resource limitations on hardware acceleration performance, ensure continuous, stable and efficient operation in high-load environments, and minimize performance reduction.
Smart Images

Figure CN119071160A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of communication technology, and in particular to a data stream scheduling method, apparatus, network equipment and storage medium. Background Art
[0002] As a key network performance optimization technology, hardware acceleration is based on the use of dedicated hardware modules to quickly process Network Address Translation (NAT). Hardware acceleration technology aims to increase the speed of packet forwarding, thereby significantly improving network speed and greatly reducing the occupancy rate of the Central Processing Unit (CPU), thereby improving network performance.
[0003] However, the performance of hardware acceleration technology is limited by the size of the acceleration table entry set in the acceleration module. When the number of connected data streams exceeds the maximum value of the acceleration table entry, the excess part cannot be processed by hardware acceleration and has to return to the CPU-based software processing mode, which reduces the speed of data transmission, resulting in not only higher network latency but also reduced network performance. Summary of the invention
[0004] Embodiments of the present application provide a data stream scheduling method, device, electronic device, and storage medium.
[0005] On the one hand, an embodiment of the present application provides a data flow scheduling method, the method is applied to a network device, the network device is configured with a hardware acceleration module, and the hardware acceleration module is used to maintain an acceleration queue. The method includes:
[0006] Monitor the real-time occupancy rate of the acceleration queue, and periodically obtain the occupancy growth rate of the acceleration queue in a historical period;
[0007] When it is determined according to the real-time occupancy rate and the occupancy growth rate that a dynamic adjustment condition is met, adjusting the current acceleration threshold of the acceleration queue to obtain an updated acceleration threshold;
[0008] The data stream connected to the hardware acceleration module is scheduled according to the current acceleration threshold and the updated acceleration threshold; the updated acceleration threshold is used as a new current acceleration threshold of the acceleration queue during the next scheduling.
[0009] On the other hand, an embodiment of the present application provides a data stream scheduling device, the device comprising:
[0010] A first acquisition module is used to monitor the real-time occupancy rate of the acceleration queue and periodically acquire the occupancy growth rate of the acceleration queue in a historical period;
[0011] A first adjustment module, configured to adjust a current acceleration threshold of the acceleration queue to obtain an updated acceleration threshold when it is determined that a dynamic adjustment condition is met according to the real-time occupancy rate and the occupancy growth rate;
[0012] The first scheduling module is used to schedule the data flow connected to the hardware acceleration module according to the current acceleration threshold and the updated acceleration threshold; the updated acceleration threshold is used as the new current acceleration threshold of the acceleration queue during the next scheduling.
[0013] On the other hand, an embodiment of the present application further provides a data flow scheduling method, which is applied to a network device, wherein the network device is configured with a hardware acceleration module and a connection tracking module, wherein the hardware acceleration module is used to maintain an acceleration queue, and the connection tracking module is used to provide connection tracking data, and the method includes:
[0014] acquiring connection tracking data at regular intervals, and acquiring the current acceleration threshold, real-time occupancy rate, and occupancy growth rate of the acceleration queue in a historical period from the hardware acceleration module;
[0015] When it is determined according to the real-time occupancy rate and the occupancy growth rate that a dynamic adjustment condition is met, adjusting the current acceleration threshold of the acceleration queue to obtain an updated acceleration threshold;
[0016] The data stream recorded in the connection tracking data is scheduled according to the current acceleration threshold and the updated acceleration threshold; the updated acceleration threshold is used as a new current acceleration threshold of the acceleration queue during the next scheduling.
[0017] On the other hand, an embodiment of the present application provides a data stream scheduling device, the device comprising:
[0018] A second acquisition module is used to periodically acquire connection tracking data, and acquire a current acceleration threshold, a real-time occupancy rate, and an occupancy growth rate of the acceleration queue in a historical period from the hardware acceleration module;
[0019] A second adjustment module is configured to adjust the current acceleration threshold of the acceleration queue to obtain an updated acceleration threshold when it is determined that a dynamic adjustment condition is met according to the real-time occupancy rate and the occupancy growth rate;
[0020] The second scheduling module is used to schedule the data flow recorded in the connection tracking data according to the current acceleration threshold and the updated acceleration threshold; the updated acceleration threshold is used as the new current acceleration threshold of the acceleration queue during the next scheduling.
[0021] On the other hand, an embodiment of the present application further provides a network device, including a memory storing multiple instructions; a processor loads instructions from the memory to execute the steps of any data flow scheduling method provided in the embodiment of the present application.
[0022] On the other hand, an embodiment of the present application further provides a computer-readable storage medium, which stores a plurality of instructions suitable for loading by a processor to execute the steps of any one of the data flow scheduling methods provided in the embodiment of the present application.
[0023] On the other hand, an embodiment of the present application further provides a computer program product, including a computer program or instructions, which, when executed by a processor, implements the steps of any data stream scheduling method provided in the embodiment of the present application.
[0024] By adopting the scheme of the application embodiment, by monitoring the real-time occupancy rate of the acceleration queue and periodically obtaining the occupancy growth rate of the acceleration queue in the historical period, the occupancy of the acceleration queue can be monitored so as to facilitate subsequent dynamic adjustment; when it is determined that the dynamic adjustment conditions are met according to the real-time occupancy rate and the occupancy growth rate, the current acceleration threshold of the acceleration queue is adjusted to obtain an updated acceleration threshold, thereby eliminating the impact of hardware resource limitations on hardware acceleration performance as much as possible, and then scheduling the data stream connected to the hardware acceleration module according to the current acceleration threshold and the updated acceleration threshold, thereby reasonably managing and fully utilizing the hardware resources in the hardware acceleration scenario, accurately identifying and prioritizing the acceleration of qualified data streams, and ensuring that a high hardware acceleration performance is maintained in an environment of sudden and high-intensity network traffic impact. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0026] Figure 1 This is a schematic diagram of an application environment of an embodiment of the data stream scheduling method provided in the embodiments of the present application;
[0027] Figure 2 This is a flow chart of an embodiment of a data stream scheduling method provided in an embodiment of the present application;
[0028] Figure 3 It is a schematic diagram of the principle of an embodiment of the data stream scheduling method provided in the embodiments of the present application;
[0029] Figure 4It is a flowchart of another embodiment of the data stream scheduling method provided in the embodiments of the present application;
[0030] Figure 5 It is a schematic diagram of the structure of an embodiment of a data stream scheduling device provided in an embodiment of the present application;
[0031] Figure 6 It is a schematic diagram of the structure of another embodiment of the data stream scheduling device provided in the embodiments of the present application;
[0032] Figure 7 It is a schematic diagram of the structure of the network device provided in the embodiment of the present application. DETAILED DESCRIPTION
[0033] 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 those skilled in the art without creative work are within the scope of protection of this application.
[0034] 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, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of the present application. At the same time, in the description of the embodiments of the present application, the terms "first", "second", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more features. In the description of the embodiments of the present application, the meaning of "multiple" is two or more, unless otherwise clearly and specifically defined.
[0035] In the hardware acceleration mode of NAT, a dedicated hardware module is used to perform hardware acceleration on the data stream of each connection, thereby transferring the tasks originally performed by the CPU to the hardware module. For example, when a data stream connection is established, the system will send the NAT conversion information to the dedicated hardware module through the network driver interface, and the module will complete the NAT conversion, thereby achieving a conversion speed of gigabit level. Compared with NAT implemented by software acceleration (such as conntrack table entries in the Linux kernel), the hardware acceleration method can significantly improve the network speed and greatly reduce the CPU occupancy rate.
[0036] However, hardware acceleration is limited by the capacity of hardware resources. This means that when the number of connections exceeds the maximum value that the hardware resources can accommodate, the new connections that exceed the limit will no longer be able to use the hardware acceleration function and will have to return to the CPU-based software acceleration mode, which will not only lose the advantages of hardware acceleration, but also cause performance degradation, increase network latency, and affect user experience.
[0037] In view of this, the embodiments of the present application provide a data flow scheduling method, device, network device and computer-readable storage medium. By dynamically adjusting the acceleration threshold of the acceleration table item in the hardware acceleration module to schedule the data flow, it is possible to maintain high-performance hardware acceleration when resources are relatively sufficient, and to fully utilize hardware resources through scheduling when resources are relatively tight, ensuring that continuous, stable and efficient hardware acceleration performance can still be achieved in a sudden, high-intensity network traffic impact environment.
[0038] Specifically, the embodiments of the present application will be described from the perspective of a data flow scheduling device, and the data flow scheduling device can be specifically integrated in a network device, that is, the data flow scheduling method of the embodiments of the present application can be executed by the network device.
[0039] Exemplarily, the network device includes but is not limited to a switch, a router, a gateway device or a server.
[0040] In order to better understand a data stream scheduling method, apparatus, network device, and storage medium provided in an embodiment of the present application, an application environment applicable to an embodiment of the present application is first described below.
[0041] See also Figure 1 , Figure 1 A schematic diagram of an application environment of a data flow method provided in an embodiment of the present application is shown.
[0042] The network device 101 may be, for example, a switch, a router, etc. The network device 101 may be connected to a plurality of computer devices 102 via a network. The computer device may be, for example, a terminal device such as a personal computer, a smart phone, or a server, etc. The network is used to provide a medium for a communication link between the router 101 and the computer device 102. The network may include various connection types, such as a wired communication link, a wireless communication link, etc., which are not limited in the embodiments of the present application. The network device 101 may also be connected to other network devices, etc.
[0043] The network device in the embodiment of the present application is configured with a hardware acceleration module, which is used to perform the hardware acceleration function of NAT. The hardware acceleration module maintains an acceleration queue. When a data stream performs NAT through hardware acceleration, the specific implementation method is to put the data stream into the acceleration queue for acceleration.
[0044] Data is transmitted in the network in the form of packets or frames. Packets or frames with certain common characteristics form a data flow, also known as flow, traffic flow, packet flow or network flow.
[0045] The following is a detailed description in conjunction with the accompanying drawings. In the embodiments of the present application, the execution subject is a terminal device as an example. It should be noted that the description order of the following embodiments is not intended to limit the preferred order of the embodiments. Although the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in an order different from that shown in the accompanying drawings.
[0046] Please refer to Figure 2 , provides a data flow scheduling method, which can be executed by a network device, and can be specifically executed and implemented inside a hardware acceleration module configured in the network device. The specific process of the data flow scheduling method can be as follows: Steps 201 to 203. Among them:
[0047] Step 201 , monitor the real-time occupancy rate of the acceleration queue, and periodically obtain the occupancy growth rate of the acceleration queue in a historical period.
[0048] Among them, the acceleration queue is also called the acceleration table entry. Hardware acceleration is implemented through a dedicated hardware acceleration module, which can be a circuit unit, etc. The hardware acceleration module maintains the acceleration queue, thereby accelerating the data flow in the acceleration queue. Among them, the hardware acceleration module is configured with an acceleration threshold (Accelerate Threshold). Whether the data flow connected to the network device needs hardware acceleration can be judged by the acceleration threshold. Exemplarily, the default acceleration threshold can be set to 30 data packets per second. In an embodiment of the present application, when the hit number of the data flow exceeds the acceleration threshold, the network device puts the data flow into the acceleration queue for acceleration. Among them, the hit number of the data flow refers to the number of data packets that can be directly obtained through the cache.
[0049] In order to characterize the occupancy of the acceleration queue, the occupancy rate (Occupancy Rate) of the acceleration queue, also known as the table occupancy rate (TOCR), is proposed in the embodiments of the present application. Among them, the real-time occupancy rate reflects the real-time occupancy of the acceleration queue. The higher the occupancy rate, the more data flows are being accelerated in the acceleration queue, and the more hardware resources are occupied.
[0050] Specifically, the network device monitors the occupancy rate of the acceleration queue in the hardware acceleration module at each moment to obtain the real-time occupancy rate of the acceleration queue. Exemplarily, at any moment, the network device calculates the occupancy rate by the maximum capacity of the data stream that can be processed by the acceleration queue and the number of data streams currently accelerated. For example, the occupancy rate can be the ratio of the number of data streams currently allocated to the acceleration queue for acceleration to the maximum capacity.
[0051] In order to reflect the impact of the acceleration threshold on the occupancy rate of the acceleration queue, the embodiment of the present application also proposes a cumulative growth rate (CAGR) to reflect the growth of the occupancy rate, also known as the occupancy growth rate.
[0052] Specifically, the network device creates a timing mechanism inside the hardware acceleration module to periodically obtain the occupancy growth rate of the acceleration queue in the historical period. For example, the network device calculates the occupancy growth rate every several cycles, wherein the network device calculates the occupancy growth rate by the occupancy rate in the historical period. Exemplarily, the network device can calculate the occupancy growth rate by the difference between the occupancy rate of one historical period and the occupancy rate of another historical period (for example, it can be a difference, a square difference, or a standard deviation, etc.), or the network device can also calculate the occupancy growth rate by the ratio of the occupancy rate of one historical period to the occupancy rate of another historical period, so as to reflect the growth of the occupancy rate between the two historical periods.
[0053] Step 202: When it is determined that the dynamic adjustment condition is met according to the real-time occupancy rate and the occupancy growth rate, the current acceleration threshold of the acceleration queue is adjusted to obtain an updated acceleration threshold.
[0054] After obtaining the real-time occupancy rate and the occupancy growth rate in the historical period, the network device dynamically adjusts the acceleration threshold of the acceleration queue according to these data.
[0055] Specifically, when the network device determines that the dynamic adjustment conditions are met based on the real-time occupancy rate and occupancy growth rate, the dynamic adjustment mechanism of the acceleration threshold is triggered, and the network device adjusts the current acceleration threshold of the acceleration queue to obtain an adjusted acceleration threshold, which is called the updated acceleration threshold.
[0056] The network device may pre-set an occupancy threshold (Occupancy Threshold), also known as a table occupancy threshold (TOT). The occupancy threshold is, for example, 80%. Furthermore, the network device may determine whether the occupancy of the acceleration queue reaches the occupancy threshold based on the comparison between the real-time occupancy and the occupancy threshold, thereby reflecting whether the occupancy of the acceleration queue is close to the upper limit.
[0057] At the same time, the network device also pre-sets a growth rate threshold corresponding to the occupancy growth rate. For example, the growth rate threshold can be set to 0. When the occupancy growth rate is greater than the growth rate threshold, it indicates that the occupancy of the acceleration queue increases over time. When the occupancy growth rate is less than or equal to the growth rate threshold, it indicates that the occupancy of the acceleration queue does not increase over time and may decrease.
[0058] Therefore, the network device can make a comprehensive assessment based on the real-time occupancy rate and the occupancy growth rate in the historical period, so as to determine the occupancy level and occupancy change trend of the acceleration queue, and further determine whether the acceleration threshold needs to be dynamically adjusted.
[0059] In an optional implementation, the network device determines that the dynamic adjustment condition is met according to the real-time occupancy rate and the occupancy growth rate, including: determining an occupancy rate threshold; and determining that the dynamic adjustment condition is met when the real-time occupancy rate and the occupancy rate threshold meet a first threshold condition, and the occupancy growth rate exceeds a growth rate threshold. Specifically, the network device determines a preset occupancy rate threshold, and compares the monitored real-time occupancy rate with the occupancy rate threshold, and the occupancy growth rate with the growth rate threshold, respectively, to determine whether the dynamic adjustment condition is met.
[0060] The real-time occupancy rate and the occupancy rate threshold satisfy the first threshold condition, for example: the real-time occupancy rate exceeds the occupancy rate threshold. When the network device determines that the real-time occupancy rate exceeds the occupancy rate threshold and the occupancy growth rate exceeds the growth rate threshold, it indicates that a large traffic impact or a sudden traffic impact is faced, and the network device determines that the dynamic adjustment condition for the acceleration queue is met.
[0061] For example, when the network device determines that TOCR>TOT and CAGR>0, it is determined that the dynamic adjustment conditions for the acceleration queue are met. Therefore, by setting the dynamic adjustment conditions and monitoring the occupancy of the acceleration queue, the acceleration threshold can be adjusted dynamically and flexibly in a timely manner according to the actual situation, thereby maintaining high hardware acceleration performance in a sudden and high-intensity network traffic impact environment and making full use of hardware resources.
[0062] Step 203, scheduling the data flow connected to the hardware acceleration module according to the current acceleration threshold and the updated acceleration threshold; the updated acceleration threshold is used as the new current acceleration threshold of the acceleration queue during the next scheduling.
[0063] After adjusting the acceleration threshold, the network device schedules the data flow connected to the hardware acceleration module according to the acceleration threshold before and after the adjustment. The acceleration threshold before adjustment is the current acceleration threshold in the above embodiment, and the acceleration threshold after adjustment is the updated acceleration threshold.
[0064] For example, the network device compares the hit count of the data flow with the acceleration thresholds before and after adjustment, thereby determining whether the data flow needs to be accelerated, the priority of the data flow to be accelerated, etc. Furthermore, the network device may retain the data flow in the acceleration queue for acceleration, or increase / decrease the priority of the data flow to be accelerated, or remove the data flow from the acceleration queue, etc.
[0065] When the occupancy growth rate is obtained next time to determine whether the dynamic adjustment condition of the acceleration threshold is met, the updated acceleration threshold obtained by this adjustment is used as the current acceleration threshold for the next determination.
[0066] As a result, the network device can adjust the acceleration threshold regularly and schedule the data flow in the acceleration queue in the hardware acceleration module. When both the occupancy rate and the occupancy growth rate indicate that there is a sudden and high-intensity network traffic impact, the network device can greatly reduce or even eliminate the adverse effect of the hardware resource limitation of the acceleration queue on the hardware acceleration performance.
[0067] The data stream scheduling method provided in the embodiment of the present application can monitor the occupancy of the acceleration queue by monitoring the real-time occupancy rate of the acceleration queue and periodically obtaining the occupancy growth rate of the acceleration queue in the historical period, so as to facilitate subsequent dynamic adjustment; when it is determined that the dynamic adjustment conditions are met according to the real-time occupancy rate and the occupancy growth rate, the current acceleration threshold of the acceleration queue is adjusted to obtain an updated acceleration threshold, thereby eliminating the impact of hardware resource limitations on hardware acceleration performance as much as possible, and then scheduling the data stream connected to the hardware acceleration module according to the current acceleration threshold and the updated acceleration threshold, thereby reasonably managing and fully utilizing the hardware resources in the hardware acceleration scenario, and ensuring that a high hardware acceleration performance is maintained in an environment of sudden and high-intensity network traffic impact.
[0068] In some embodiments, the timed acquisition of the occupancy growth rate of the acceleration queue in the historical period includes: determining the first historical period and the second historical period before the scheduling period whenever a scheduling period is triggered; and determining the occupancy growth rate of the acceleration queue in the historical period based on the occupancy of the acceleration queue in the first historical period and the second historical period, respectively.
[0069] Specifically, the network device creates a timing mechanism inside the hardware acceleration module to periodically obtain the occupancy growth rate. The occupancy growth rate can be represented by the change in occupancy rate. The higher the change in occupancy rate, the higher the occupancy growth rate. The occupancy of the acceleration queue in the historical period is, for example, the historical occupancy rate.
[0070] Furthermore, the network device determines the occupancy growth rate of the acceleration queue in the historical period according to the occupancy of the acceleration queue in the first historical period and the second historical period, including: determining the occupancy growth rate of the acceleration queue in the historical period according to the historical occupancy of the acceleration queue in the first historical period and the second historical period.
[0071] The first historical period and the second historical period may be two different historical periods selected from the historical period before the scheduling period. There may be zero, one or more historical periods between the first historical period and the second historical period.
[0072] Exemplarily, the network device is set to calculate the occupancy growth rate once every three cycles, and the scheduling cycle is triggered at the end of the third cycle. Then, when the scheduling cycle is triggered, the network device obtains the occupancy status of these three cycles.
[0073] Taking the calculation of the occupancy growth rate once every three cycles as an example, the first cycle is represented by TOCR1 and the third cycle is represented by TOCR3. Exemplarily, the first historical cycle can be TOCR1 and the second historical cycle can be TOCR3; or the first historical cycle can be TOCR3 and the second historical cycle can be TOCR1, etc.
[0074] Exemplarily, determining the occupancy growth rate of the acceleration queue in the historical period according to the historical occupancy rates of the acceleration queue in the first historical period and the second historical period respectively includes: determining the occupancy growth rate of the acceleration queue in the historical period based on the ratio of the historical occupancy rates in the first historical period and the second historical period.
[0075] Accordingly, taking the first historical period as TOCR3 and the second historical period as TCOR1 as an example, the network device can calculate the occupancy growth rate CAGR by the following formula (1):
[0076]
[0077] It is easy to understand that the above example is only an optional implementation method, and the embodiments of the present application are not limited to this; for example, the network equipment can set the specific time and periodic interval of the timing according to the actual network demand and network fluctuation situation.
[0078] In the above embodiment, by regularly obtaining the occupancy growth rate, it is possible to monitor the fluctuation of network traffic, and to timely detect sudden and high-intensity network traffic, so that timely measures can be taken to respond and avoid network performance degradation caused by hardware acceleration failure.
[0079] In some embodiments, when it is determined that the dynamic adjustment conditions are met based on the real-time occupancy rate and the occupancy growth rate, the current acceleration threshold of the acceleration queue is adjusted to obtain an updated acceleration threshold, including: taking the updated acceleration threshold obtained in the previous scheduling cycle as the historical acceleration threshold; determining an initial adjustment value for the current acceleration threshold of the acceleration queue; determining a target adjustment value for the current acceleration threshold based on the historical acceleration threshold, the initial adjustment value and the occupancy growth rate; and adjusting the current acceleration threshold of the acceleration queue based on the target adjustment value to obtain an updated acceleration threshold.
[0080] Specifically, the network device adjusts the acceleration threshold in the last trigger scheduling cycle, and uses the updated acceleration threshold as the historical acceleration threshold. In addition, when the network device determines that the dynamic adjustment condition is met, it determines the initial adjustment value of the current acceleration threshold. The initial adjustment value can be preset. The initial adjustment value determined for each dynamic adjustment can be the same or different. Exemplarily, when the acceleration threshold is dynamically adjusted for the first time, the initial adjustment value is 0; when the acceleration threshold is dynamically adjusted subsequently, the initial adjustment value is, for example, 10, 20, etc.
[0081] Thus, the network device determines the target adjustment value based on the historical acceleration threshold, the initial adjustment value, and the occupancy growth rate. In some embodiments, the network device may determine the initial update acceleration threshold based on the initial adjustment value, and determine the target adjustment value of the current acceleration threshold based on the difference between the initial update acceleration threshold and the historical acceleration threshold, combined with the occupancy growth rate. Then, the network device adjusts the current acceleration threshold based on the target adjustment value to obtain the final acceleration threshold after adjustment, i.e., the updated acceleration threshold.
[0082] Exemplarily, the network device may determine the target adjustment value by the following formula (2):
[0083]
[0084] Wherein, ΔAT is the target adjustment value. AT0 refers to the initial updated acceleration threshold obtained after adjusting the current acceleration threshold based on the initial adjustment value; wherein, AT0=AT+α, α is the initial adjustment value. AT_BACK refers to the updated acceleration threshold obtained after the last dynamic adjustment, that is, the historical acceleration threshold. Exemplarily, when the acceleration threshold is dynamically adjusted for the first time, AT_BACK is, for example, 0.
[0085] Furthermore, the network device can determine the update acceleration threshold by the following formula (3):
[0086] AT1=AT+ΔAT(3)
[0087] Among them, AT is the current acceleration threshold, and AT1 is the acceleration threshold obtained after dynamic adjustment, that is, the updated acceleration threshold.
[0088] In the above embodiment, when both the occupancy rate and the occupancy growth rate indicate that a sudden, high-intensity network traffic impact is currently faced, by dynamically adjusting the acceleration threshold, it is possible to fully utilize the hardware resources and minimize or even eliminate the adverse effects of the hardware resource limitations of the acceleration queue on the hardware acceleration performance.
[0089] In the above embodiment, by setting the dynamic adjustment condition, the acceleration threshold can be flexibly adjusted according to the actual situation, so that the hardware resources can be fully utilized.
[0090] Corresponding to the above-mentioned triggering of the dynamic adjustment mechanism of the acceleration queue, the network device is also provided with the circumstances under which the dynamic adjustment mechanism is exited. To this end, in some embodiments, the method further comprises: after the current acceleration threshold of the acceleration queue is adjusted, when it is determined based on the monitored real-time occupancy that the real-time occupancy and the occupancy threshold meet the second threshold condition and the occupancy growth rate does not exceed the growth rate threshold, the dynamic adjustment of the current acceleration threshold is terminated.
[0091] Specifically, after the network device completes adjusting the current acceleration threshold of the acceleration queue, it continues to monitor the real-time occupancy rate of the acceleration queue, and continues to periodically obtain the occupancy growth rate of the acceleration queue in the historical period.
[0092] When the network device determines, based on the monitored real-time occupancy rate, that the real-time occupancy rate and the occupancy rate threshold satisfy the second threshold condition, and the occupancy growth rate does not exceed the growth rate threshold, it indicates that the sudden or high-intensity network traffic impact has passed or eased, and the hardware resources are relatively abundant again, then the dynamic adjustment mechanism can be exited, i.e., the dynamic adjustment of the current acceleration threshold is ended.
[0093] The real-time occupancy rate and the occupancy rate threshold satisfy the second threshold condition, for example: the real-time occupancy rate is less than the occupancy rate threshold; or the real-time occupancy rate is less than half of the occupancy rate threshold.
[0094] For example, when the network device determines that TOCR<TOT / 2 and CAGR≤0, it determines to exit the dynamic adjustment mechanism of the acceleration queue, that is, ends the dynamic adjustment of the current acceleration threshold.
[0095] In the above embodiment, by setting dynamic adjustment conditions and monitoring the occupancy of the acceleration queue, the acceleration threshold can be flexibly and dynamically adjusted in a timely manner according to actual conditions, thereby fully utilizing hardware resources and optimizing hardware acceleration performance.
[0096] After the acceleration threshold is adjusted inside the hardware acceleration module, the data flow connected to the hardware acceleration module needs to be scheduled. Exemplarily, the data flow connected to the hardware acceleration module refers to the data flow located in the acceleration queue. To this end, in some embodiments, the data flow connected to the hardware acceleration module is scheduled according to the current acceleration threshold and the updated acceleration threshold, including: obtaining the hit count of the data flow connected to the hardware acceleration module; determining whether the data flow meets the scheduling condition according to the hit count, the current acceleration threshold and the updated acceleration threshold; and scheduling the data flow if the data flow meets the scheduling condition.
[0097] Specifically, the network device obtains the hit count of the data flow connected to the hardware acceleration module. For example, the network device can obtain the hit count per second of each data flow through the mechanism of synchronizing traffic to the conntrack (connection tracking) table entry through hardware acceleration, so as to determine the acceleration requirement of the data flow.
[0098] For one or more data flows, the network device determines whether the data flow meets the scheduling condition based on the hit count of each data flow and the acceleration threshold before and after adjustment. If the network device determines that a data flow meets the scheduling condition, the data flow is scheduled.
[0099] Among them, satisfying the scheduling conditions includes but is not limited to: satisfying one or more of the conditions for removing the data flow from the acceleration queue, satisfying the conditions for increasing / decreasing the acceleration priority of the data flow in the acceleration queue, satisfying the conditions for retaining the data flow in the acceleration queue for acceleration, etc.
[0100] In the above embodiment, by scheduling the data flow according to the acceleration threshold before and after adjustment, the acceleration requirement of each data flow can be accurately identified, and the data flow in the acceleration queue can be scheduled, so that the hardware resources can be fully utilized and the network performance can be improved.
[0101] On the basis of the above embodiment, when the data flow meets the scheduling conditions, the data flow is scheduled, including: when the hit number is less than the current acceleration threshold, the data flow is removed from the acceleration queue; when the hit number exceeds the current acceleration threshold and is less than the update acceleration threshold, the priority of the data flow is lowered; when the hit number exceeds the update acceleration threshold, the data flow is retained in the acceleration queue for acceleration.
[0102] The network device compares the hit count of the data flow with the acceleration thresholds before and after adjustment. For example, the acceleration threshold before adjustment is the current acceleration threshold, represented by AT_BACK; the acceleration threshold after adjustment is the updated acceleration threshold, represented by AT.
[0103] When the hit number is less than AT_BACK, it indicates that the acceleration requirement of the data flow is already very low, and the network device removes the data flow from the acceleration queue.
[0104] When the hit count exceeds AT_BACK but is still less than AT, it means that the data flow is being accelerated, but its acceleration requirement is relatively low compared to the acceleration requirements of other data flows, so the network device can lower the priority of the data flow. Alternatively, the network device can directly remove the data flow from the acceleration queue.
[0105] When the hit number exceeds AT, it indicates that the data flow still has a large acceleration demand, and the network device retains the data flow in the acceleration queue for acceleration.
[0106] In the above embodiment, by according to the hit number and the acceleration threshold before and after adjustment, it is possible to accurately identify and preferentially allocate hardware resources to eligible data streams for acceleration, so as to ensure that in a high-load environment, the hardware acceleration function can still operate stably and efficiently without failing due to exhaustion of hardware resources in the acceleration queue, thereby minimizing or even eliminating the adverse effects of hardware resource limitations on hardware acceleration performance.
[0107] In a specific embodiment, Figure 3 As shown, in chronological order, they are T1 cycle, T2 cycle, T3 cycle, etc. The network device is provided with a timing mechanism inside the hardware acceleration module. For example, the scheduling cycle is triggered every three cycles, so as to calculate the occupancy growth rate CAGR through the occupancy rate TOCR3 of the T3 cycle and the occupancy rate TOCR1 of the T1 cycle. Furthermore, the network device determines whether the dynamic adjustment conditions for the acceleration threshold are met according to the occupancy growth rate, the real-time occupancy rate and the current acceleration threshold, and adjusts the current acceleration threshold when the dynamic adjustment conditions are met to obtain the updated acceleration threshold, and schedules the data flow based on the current acceleration threshold before adjustment and the updated acceleration threshold after adjustment. At the same time, the updated acceleration threshold is used as the new current acceleration threshold when the scheduling is triggered next time for subsequent calculations.
[0108] Based on the data flow scheduling method provided in the above embodiment, since the time for each data flow to update the traffic to the conntrack module is orderly, but the overall order is disordered, there may be unpredictable timing problems. In addition, the capacity of the acceleration queue is still limited by hardware.
[0109] Therefore, on the basis of the above method embodiments and based on the same inventive concept, the embodiments of the present application also provide a data flow scheduling method, which is also applied to a network device, and in addition to the hardware acceleration module, a connection tracking module is also set in the network device, in which the conntrack table item data is combined with the hardware acceleration module to optimize the acceleration queue, and the scheduling of the data flow is implemented in the external module of the hardware acceleration module, so as to solve the performance bottleneck problem caused by the hardware resource limitation of the hardware acceleration module, thereby making full use of the hardware resources and significantly improving the network performance.
[0110] like Figure 4 As shown, another data flow scheduling method is provided, which can be executed by a network device, and can be specifically executed and implemented inside a hardware acceleration module configured in the network device. The specific process of the data flow scheduling method can be as follows: Steps 401 to 403. Among them:
[0111] Step 401 , periodically obtain connection tracking data, and obtain the current acceleration threshold, real-time occupancy rate, and occupancy growth rate of the acceleration queue in a historical period from the hardware acceleration module.
[0112] Step 402: When it is determined that the dynamic adjustment condition is met according to the real-time occupancy rate and the occupancy growth rate, the current acceleration threshold of the acceleration queue is adjusted to obtain an updated acceleration threshold.
[0113] Step 403: Schedule the data stream recorded in the connection tracking data according to the current acceleration threshold and the updated acceleration threshold; the updated acceleration threshold is used as the new current acceleration threshold of the acceleration queue during the next scheduling.
[0114] Specifically, the network device periodically obtains connection tracking data in the connection tracking module, and the connection tracking data is, for example, conntrack table entry data. The periodic acquisition step can be integrated into other business logics, such as business logics such as updating data flow through conntrack table entry data.
[0115] While obtaining the connection tracking data, the network device also obtains the real-time occupancy rate and current acceleration threshold of the acceleration queue from the hardware acceleration module, and obtains the occupancy growth rate of the acceleration queue in the historical period. Then, the network device determines whether the dynamic adjustment conditions are met based on the real-time occupancy rate and occupancy growth rate obtained from the hardware acceleration module, and adjusts the current acceleration threshold to obtain an updated acceleration threshold if the dynamic adjustment conditions are met. The specific implementation method is similar to the above embodiment and will not be repeated here.
[0116] After the acceleration threshold is dynamically adjusted, the network device schedules the data stream recorded in the connection tracking data according to the acceleration threshold before and after the adjustment. The specific implementation method of the network device scheduling the data stream can refer to the above embodiment. Different from the above embodiment, in this embodiment, the network device no longer schedules in the hardware acceleration module, but in the connection tracking module, the number of hits of each data stream recorded and counted in the conntrack table item data is compared with the acceleration threshold before and after the adjustment, so as to determine the acceleration demand of each data stream, and then schedule each data stream. In particular, when the network device determines that the number of hits of a data stream exceeds the adjusted acceleration threshold, it means that the data stream needs to be accelerated, then the network device does not process the data stream, and the data stream is processed internally by the hardware acceleration module.
[0117] The data stream scheduling method provided in the embodiment of the present application can record the hit count of each data stream for subsequent judgment and scheduling by periodically acquiring connection tracking data; by acquiring the real-time occupancy rate, the current acceleration threshold and the occupancy growth rate of the acceleration queue in the historical period from the hardware acceleration module, the occupancy of the acceleration queue can be monitored, so as to facilitate subsequent dynamic adjustment. When the dynamic adjustment conditions are determined to be met according to the real-time occupancy rate and the occupancy growth rate, the current acceleration threshold of the acceleration queue is adjusted to obtain the updated acceleration threshold, thereby eliminating the influence of hardware resource restrictions on hardware acceleration performance as much as possible, and then scheduling the data stream connected to the hardware acceleration module according to the current acceleration threshold and the updated acceleration threshold, thereby reasonably managing and fully utilizing the hardware resources in the hardware acceleration scenario, and ensuring that the hardware acceleration performance is still high in the sudden and high-intensity network traffic impact environment. In addition, since the size of the conntrack table entry is much larger than the capacity limit of the hardware acceleration queue, even if the hardware acceleration queue is full, the network device can still schedule the data stream from the conntrack table entry, thereby greatly ensuring the network performance.
[0118] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0119] Based on the same inventive concept, the embodiment of the present application also provides a data stream scheduling device, which can be integrated in a network device to implement the data stream scheduling method involved above. Figure 5 As shown, the data stream scheduling device may include a first acquisition module 501, a first adjustment module 502 and a first scheduling module 503. Among them:
[0120] The first acquisition module 501 is used to monitor the real-time occupancy rate of the acceleration queue and periodically acquire the occupancy growth rate of the acceleration queue in a historical period.
[0121] The first adjustment module 502 is configured to adjust the current acceleration threshold of the acceleration queue to obtain an updated acceleration threshold when it is determined that a dynamic adjustment condition is met according to the real-time occupancy rate and the occupancy growth rate.
[0122] The first scheduling module 503 is used to schedule the data flow connected to the hardware acceleration module according to the current acceleration threshold and the updated acceleration threshold; the updated acceleration threshold is used as the new current acceleration threshold of the acceleration queue in the next scheduling.
[0123] In some embodiments, the first acquisition module is also used to determine the first historical cycle and the second historical cycle before the scheduling cycle whenever the scheduling cycle is triggered; and determine the occupancy growth rate of the acceleration queue in the historical cycle based on the occupancy of the acceleration queue in the first historical cycle and the second historical cycle respectively.
[0124] In some embodiments, the first adjustment module is further used to use the updated acceleration threshold obtained in the previous scheduling cycle as the historical acceleration threshold; according to the historical acceleration threshold and the occupancy growth rate, adjust the current acceleration threshold of the acceleration queue to obtain the updated acceleration threshold.
[0125] In some embodiments, the first adjustment module is further used to determine an occupancy threshold; when the real-time occupancy and the occupancy threshold satisfy a first threshold condition, and the occupancy growth rate exceeds a growth rate threshold, it is determined that the dynamic adjustment condition is satisfied.
[0126] In some embodiments, the data scheduling device also includes an exit module, which is used to end the dynamic adjustment of the current acceleration threshold after the current acceleration threshold of the acceleration queue is adjusted, when it is determined based on the monitored real-time occupancy that the real-time occupancy and the occupancy threshold meet the second threshold condition and the occupancy growth rate does not exceed the growth rate threshold.
[0127] In some embodiments, the first scheduling module is also used to obtain the hit count of the data flow connected to the hardware acceleration module; determine whether the data flow meets the scheduling conditions based on the hit count, the current acceleration threshold and the updated acceleration threshold; and schedule the data flow if the data flow meets the scheduling conditions.
[0128] In some embodiments, the first scheduling module is also used to remove the data flow from the acceleration queue when the hit number is less than the current acceleration threshold; to lower the priority of the data flow when the hit number exceeds the current acceleration threshold and is less than the update acceleration threshold; and to retain the data flow in the acceleration queue for acceleration when the hit number exceeds the update acceleration threshold.
[0129] Based on the same inventive concept, the embodiment of the present application also provides a data stream scheduling device, which can be integrated in a network device to implement another data stream scheduling method mentioned above. Figure 6 As shown, the data stream scheduling device may include a second acquisition module 601, a second adjustment module 602, and a second scheduling module 603. Among them:
[0130] The second acquisition module 601 is used to periodically acquire connection tracking data, and acquire the current acceleration threshold, real-time occupancy rate, and occupancy growth rate of the acceleration queue in a historical period from the hardware acceleration module.
[0131] The second adjustment module 602 is used to adjust the current acceleration threshold of the acceleration queue to obtain an updated acceleration threshold when it is determined that the dynamic adjustment condition is met according to the real-time occupancy rate and the occupancy growth rate.
[0132] The second scheduling module 603 is used to schedule the data flow recorded in the connection tracking data according to the current acceleration threshold and the updated acceleration threshold; the updated acceleration threshold is used as the new current acceleration threshold of the acceleration queue during the next scheduling.
[0133] Each module in the above data scheduling device can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.
[0134] Accordingly, the embodiment of the present application also provides a network device. Figure 7 As shown, Figure 7A schematic diagram of the structure of a network device provided in an embodiment of the present application. The network device 700 includes a processor 701 having one or more processing cores, a memory 702 having one or more computer-readable storage media, a computer program stored in the memory 702 and executable on the processor, and a power supply 703. The processor 701 is electrically connected to the memory 702. Those skilled in the art will appreciate that the network device structure shown in the figure does not constitute a limitation on the network device, and may include more or fewer components than shown, or combine certain components, or arrange components differently.
[0135] The processor 701 is the control center of the network device 700. It uses various interfaces and lines to connect various parts of the entire network device 700. By running or loading software programs and / or units stored in the memory 702, and calling data stored in the memory 702, it executes various functions of the network device 700 and processes data, thereby monitoring the network device 700 as a whole. The processor 701 can be a central processing unit CPU, a graphics processing unit GPU, a network processor (Network Processor, NP), etc., and can implement or execute the various methods, steps and logic block diagrams disclosed in the embodiments of the present application. Preferably, the processor 701 can integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface and application programs, etc., and the modem processor mainly processes wireless communications. It can be understood that the above-mentioned modem processor may not be integrated into the processor 701.
[0136] The memory 702 can be used to store software programs and modules. The processor 701 executes various functional applications and data processing by running the software programs and modules stored in the memory 702. The memory 702 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a NAT function), etc.; the data storage area may store data created according to the use of the network device, etc. In addition, the memory 702 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 702 may also include a memory controller to provide the processor 701 with access to the memory 702.
[0137] The network device also includes a power supply 1003 for supplying power to each component. Preferably, the power supply 1003 can be logically connected to the processor 1001 through a power management system, so as to manage charging, discharging, and power consumption through the power management system. The power supply 1003 can also include one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators, and other arbitrary components.
[0138] Although not shown, the network device may also include a display unit, etc., which will not be described in detail here. Specifically in some embodiments, the processor 701 in the network device will load the executable files corresponding to the processes of one or more applications into the memory 702 according to the following instructions, and the processor 701 will run the application stored in the memory 702, thereby realizing various functions, such as: monitoring the real-time occupancy rate of the acceleration queue, and regularly obtaining the occupancy growth rate of the acceleration queue in the historical period; when it is determined that the dynamic adjustment conditions are met according to the real-time occupancy rate and the occupancy growth rate, adjusting the current acceleration threshold of the acceleration queue to obtain an updated acceleration threshold; scheduling the data stream connected to the hardware acceleration module according to the current acceleration threshold and the updated acceleration threshold; the updated acceleration threshold is used as the new current acceleration threshold of the acceleration queue at the next scheduling.
[0139] In another embodiment, the processor 701 in the network device 700 will load instructions corresponding to the processes of one or more applications into the memory 702 according to the following steps, and the processor 701 will run the application stored in the memory 702 to implement various functions, such as: regularly obtaining connection tracking data, and obtaining the current acceleration threshold, real-time occupancy rate, and occupancy growth rate of the acceleration queue in the historical period from the hardware acceleration module; when it is determined that the dynamic adjustment conditions are met according to the real-time occupancy rate and the occupancy growth rate, the current acceleration threshold of the acceleration queue is adjusted to obtain an updated acceleration threshold; according to the current acceleration threshold and the updated acceleration threshold, the data stream recorded in the connection tracking data is scheduled; the updated acceleration threshold is used as the new current acceleration threshold of the acceleration queue at the next scheduling.
[0140] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0141] A person of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.
[0142] To this end, an embodiment of the present application provides a computer-readable storage medium, in which a plurality of computer programs are stored, and the computer program can be loaded by a processor to execute any one of the data stream scheduling methods provided in the embodiments of the present application. The computer program can execute the following steps of the data stream scheduling method: monitoring the real-time occupancy rate of the acceleration queue, and regularly obtaining the occupancy growth rate of the acceleration queue in the historical period; when it is determined that the dynamic adjustment conditions are met according to the real-time occupancy rate and the occupancy growth rate, adjusting the current acceleration threshold of the acceleration queue to obtain an updated acceleration threshold; scheduling the data stream connected to the hardware acceleration module according to the current acceleration threshold and the updated acceleration threshold; the updated acceleration threshold is used as the new current acceleration threshold of the acceleration queue at the next scheduling.
[0143] In another embodiment, the computer program may also execute the following steps of the data stream scheduling method: periodically acquiring connection tracking data, and acquiring the current acceleration threshold, real-time occupancy rate, and occupancy growth rate of the acceleration queue in a historical period from the hardware acceleration module; when it is determined that the dynamic adjustment conditions are met according to the real-time occupancy rate and the occupancy growth rate, adjusting the current acceleration threshold of the acceleration queue to obtain an updated acceleration threshold; scheduling the data stream recorded in the connection tracking data according to the current acceleration threshold and the updated acceleration threshold; the updated acceleration threshold is used as the new current acceleration threshold of the acceleration queue during the next scheduling.
[0144] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.
[0145] The computer-readable storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0146] Since the computer program stored in the computer-readable storage medium can execute any one of the data stream scheduling methods provided in the embodiments of the present application, the beneficial effects that can be achieved by any one of the data stream scheduling methods provided in the embodiments of the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.
[0147] According to one aspect of the present application, a computer program product or a computer program is also provided, the computer program product or the computer program including computer instructions, the computer instructions being stored in a computer-readable storage medium. A processor of an electronic device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the electronic device executes the methods provided in various optional implementations of the above embodiments.
[0148] In the above-mentioned data stream scheduling device, computer-readable storage medium, electronic device, and computer program product embodiments, the description of each embodiment has its own emphasis. For parts not described in detail in a certain embodiment, reference can be made to the relevant description of other embodiments. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working process and beneficial effects of the above-described data stream scheduling device, computer-readable storage medium, computer program product, electronic device and its corresponding units can refer to the description of the data stream scheduling method in the above embodiment, and will not be repeated here.
[0149] The above is a detailed introduction to a data stream scheduling method, device, electronic device, computer-readable storage medium and computer program product provided in the embodiments of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for technical personnel in this field, according to the ideas of the present application, there will be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A data stream scheduling method, characterized in that: Applied to a network device, the network device is configured with a hardware acceleration module, and the hardware acceleration module is used to maintain an acceleration queue; the method comprises: Monitor the real-time occupancy rate of the acceleration queue, and periodically obtain the occupancy growth rate of the acceleration queue in a historical period; When it is determined according to the real-time occupancy rate and the occupancy growth rate that a dynamic adjustment condition is met, adjusting the current acceleration threshold of the acceleration queue to obtain an updated acceleration threshold; The data stream connected to the hardware acceleration module is scheduled according to the current acceleration threshold and the updated acceleration threshold; the updated acceleration threshold is used as a new current acceleration threshold of the acceleration queue during the next scheduling.
2. The method according to claim 1, characterized in that The periodically obtaining the occupancy growth rate of the acceleration queue in a historical period includes: Whenever a scheduling period is triggered, determining a first historical period and a second historical period before the scheduling period; According to the occupancy of the acceleration queue in the first historical period and the second historical period, respectively, an occupancy growth rate of the acceleration queue in the historical period is determined.
3. The method according to claim 2, characterized in that When it is determined according to the real-time occupancy rate and the occupancy growth rate that the dynamic adjustment condition is met, adjusting the current acceleration threshold of the acceleration queue to obtain an updated acceleration threshold includes: Using the updated acceleration threshold obtained in the last scheduling cycle as the historical acceleration threshold; determining an initial adjustment value for the current acceleration threshold of the acceleration queue; determining a target adjustment value of the current acceleration threshold based on the historical acceleration threshold, the initial adjustment value, and the occupancy growth rate; The current acceleration threshold of the acceleration queue is adjusted based on the target adjustment value to obtain an updated acceleration threshold.
4. The method according to any one of claims 1 to 3, characterized in that The determining, according to the real-time occupancy rate and the occupancy growth rate, that a dynamic adjustment condition is satisfied includes: Determine occupancy thresholds; When the real-time occupancy rate and the occupancy rate threshold satisfy a first threshold condition, and the occupancy growth rate exceeds a growth rate threshold, it is determined that a dynamic adjustment condition is satisfied.
5. The method according to claim 1, characterized in that The method further comprises: After the current acceleration threshold of the acceleration queue is adjusted, when it is determined based on the monitored real-time occupancy that the real-time occupancy and the occupancy threshold meet the second threshold condition and the occupancy growth rate does not exceed the growth rate threshold, the dynamic adjustment of the current acceleration threshold is terminated.
6. The method according to claim 1, characterized in that The step of scheduling the data stream connected to the hardware acceleration module according to the current acceleration threshold and the updated acceleration threshold includes: Obtaining the hit count of the data stream connected to the hardware acceleration module; Determining whether the data flow meets a scheduling condition according to the hit count, the current acceleration threshold, and the updated acceleration threshold; When the data flow meets the scheduling condition, the data flow is scheduled.
7. The method according to claim 6, characterized in that The step of scheduling the data flow when the data flow meets the scheduling condition includes: When the hit count is less than the current acceleration threshold, removing the data flow from the acceleration queue; When the hit count exceeds the current acceleration threshold and is less than the update acceleration threshold, lowering the priority of the data flow; When the hit count exceeds the update acceleration threshold, the data flow is retained in the acceleration queue for acceleration.
8. A data stream scheduling method, characterized in that: Applied to a network device, the network device is configured with a hardware acceleration module and a connection tracking module, the hardware acceleration module is used to maintain an acceleration queue, and the connection tracking module is used to provide connection tracking data; the method comprises: acquiring connection tracking data at regular intervals, and acquiring the current acceleration threshold, real-time occupancy rate, and occupancy growth rate of the acceleration queue in a historical period from the hardware acceleration module; When it is determined according to the real-time occupancy rate and the occupancy growth rate that a dynamic adjustment condition is met, adjusting the current acceleration threshold of the acceleration queue to obtain an updated acceleration threshold; The data stream recorded in the connection tracking data is scheduled according to the current acceleration threshold and the updated acceleration threshold; the updated acceleration threshold is used as a new current acceleration threshold of the acceleration queue during the next scheduling.
9. A network device, characterized in that: It comprises a processor and a memory, wherein the memory stores a plurality of instructions; the processor loads instructions from the memory to execute the steps of the data flow scheduling method according to any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor to execute the steps of the data flow scheduling method according to any one of claims 1 to 8.
