Method and apparatus for adjusting network queue parameters, computer readable medium, computer program product

By calculating network pressure in real time and adjusting network queue parameters, the problem of existing technologies being unable to adapt to changes in network load in real time is solved, achieving automatic and efficient network performance management, preventing packet loss and improving service quality.

CN120602432BActive Publication Date: 2026-07-31ZTE CORP
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ZTE CORP
Filing Date
2024-06-19
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

Existing technologies cannot adjust network queue parameters in real time according to specific circumstances, leading to processing bottlenecks and packet loss when network load surges, thus affecting service quality.

Method used

By acquiring network queue load data of the target device, network pressure is calculated in real time, and network queue parameters, including system-level and process-level parameters, are adjusted according to the pressure to achieve automatic and efficient parameter adjustment.

Benefits of technology

It can quickly respond to sudden network performance bottlenecks without human intervention, effectively prevent packet loss, improve service quality, and is applicable to various scenarios such as cloud computing environments and IoT applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120602432B_ABST
    Figure CN120602432B_ABST
Patent Text Reader

Abstract

This disclosure provides a method for adjusting network queue parameters, comprising: acquiring network queue load data of a target device; the network queue load data characterizing the load of network queues in the network device, the network queues being used to buffer network data packets; determining network pressure based on the network queue load data; and adjusting the network queue parameters of the target device based on the network pressure. This disclosure also provides a device, a computer-readable medium, and a computer program product for adjusting network queue parameters.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of network queue technology, and in particular to a method and apparatus for adjusting network queue parameters, a computer-readable medium, and a computer program product. Background Technology

[0002] When a device receives and sends network data packets, it can use a network queue for buffering, and the network queue parameters have a significant impact on the device's network performance.

[0003] In some related technologies, it is impossible to adjust network queue parameters in real time according to specific circumstances. This can lead to insufficient network queue parameters to maintain normal business operation in some situations (such as when network load surges), resulting in network processing bottlenecks, packet loss, and other issues that affect service quality. Summary of the Invention

[0004] This disclosure provides a method and apparatus for adjusting network queue parameters, a computer-readable medium, and a computer program product.

[0005] In a first aspect, embodiments of this disclosure provide a method for adjusting network queue parameters, comprising:

[0006] Obtain network queue load data of the target device; the network queue load data represents the load status of the network queue in the network device, and the network queue is used to cache network data packets;

[0007] Determine network pressure based on the network queue load data;

[0008] Adjust the network queue parameters of the target device according to the network pressure.

[0009] Secondly, embodiments of this disclosure provide an apparatus for adjusting network queue parameters, which includes a memory and a processor; the memory stores a computer program executable by the processor, and when the computer program is executed by the processor, it implements any one of the methods for adjusting network queue parameters according to embodiments of this disclosure.

[0010] Thirdly, embodiments of this disclosure provide a computer-readable medium having a computer program stored thereon, which, when executed by a processor, implements any of the methods for adjusting network queue parameters according to embodiments of this disclosure.

[0011] Fourthly, embodiments of this disclosure provide a computer program product, which includes a computer program that, when executed by a processor, implements any of the methods for adjusting network queue parameters according to embodiments of this disclosure.

[0012] In this embodiment, network pressure can be calculated based on specific network queue load data in the target device, and then network queue parameters can be adjusted according to the network pressure. This allows for automatic, efficient, and real-time adjustment of network queue parameters without manual intervention, adapting them to the demands. It can also react quickly to sudden network performance bottlenecks, achieving rapid self-healing, effectively preventing packet loss, and improving service quality. Moreover, this embodiment has a wide range of applications and can be used in various scenarios (such as cloud computing environments, IoT applications, mobile communication networks, etc.), providing a guarantee for the stable operation of various applications. Attached Figure Description

[0013] In the accompanying drawings of the embodiments disclosed herein:

[0014] Figure 1 A flowchart illustrating a method for adjusting network queue parameters provided in this disclosure embodiment;

[0015] Figure 2 A flowchart illustrating another method for adjusting network queue parameters provided in this disclosure embodiment;

[0016] Figure 3 A block diagram of a device for adjusting network queue parameters provided in an embodiment of this disclosure;

[0017] Figure 4 A block diagram illustrating the composition of a computer-readable medium provided in this disclosure embodiment;

[0018] Figure 5 A schematic diagram of module division for another device for adjusting network queue parameters provided in an embodiment of this disclosure;

[0019] Figure 6 This is a schematic diagram illustrating the logical process of another method for adjusting network queue parameters provided in an embodiment of this disclosure. Detailed Implementation

[0020] To enable those skilled in the art to better understand the technical solutions of this disclosure, the method and apparatus for adjusting network queue parameters, computer-readable media, and computer program products provided in the embodiments of this disclosure will be described in detail below with reference to the accompanying drawings.

[0021] The present disclosure will be described more fully below with reference to the accompanying drawings; however, the embodiments shown may be embodied in different forms, and the present disclosure should not be construed as limited to the embodiments set forth below. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will enable those skilled in the art to fully understand the scope of the disclosure.

[0022] The accompanying drawings of the embodiments disclosed herein are provided to further illustrate the embodiments of this disclosure and form part of the specification. They are used together with the detailed embodiments to explain this disclosure and do not constitute a limitation thereof. The above and other features and advantages will become more apparent to those skilled in the art from the description of the detailed embodiments with reference to the accompanying drawings.

[0023] This disclosure may be described with reference to plan and / or cross-sectional views using the ideal schematic diagrams of this disclosure. Therefore, the example illustrations may be modified according to manufacturing techniques and / or tolerances.

[0024] Where there is no conflict, the various embodiments of this disclosure and the features thereof in the embodiments may be combined with each other.

[0025] The terminology used in this disclosure is for the purpose of describing particular embodiments only and is not intended to limit the disclosure. The term "and / or" as used in this disclosure includes any and all combinations of one or more of the associated enumerated entries. The singular forms "a" and "the" as used in this disclosure are also intended to include the plural forms, unless the context clearly indicates otherwise. The terms "comprising," "made of," etc., as used in this disclosure specify the presence of the stated feature, integral, step, operation, element, and / or component, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components, and / or groups thereof.

[0026] Unless otherwise specified, all terms used in this disclosure (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art. It will also be understood that terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant art and this disclosure, and will not be interpreted as having an idealized or overly formal meaning, unless expressly so defined in this disclosure.

[0027] This disclosure is not limited to the embodiments shown in the accompanying drawings, but includes modifications to the configuration based on the manufacturing process. Therefore, the areas illustrated in the drawings are schematic, and the shapes of the areas shown illustrate specific shapes of the areas of an element, but are not intended to be limiting.

[0028] Various network devices (such as mobile phones, tablets, etc.) often need to send and receive network data packets over the network. To ensure the orderly processing of network data packets and the stability of network services, network queues can be used to cache them. That is, the network data packets to be processed are cached in the network queue and processed in the first-in-first-out order.

[0029] Therefore, the setting of network queue parameters (such as network queue length, exception handling method, etc.) will have a great impact on the network performance of the device.

[0030] In some related technologies, network queue parameters can be set for the device's operating system, i.e., "system-level network queue parameters". However, system-level network queue parameters can only be preset by the operator according to several application scenarios, and only one set of default values ​​can be selected at a time. Such system-level network queue parameters may not be suitable for the specific situation of the device and may not meet the requirements.

[0031] In other related technologies, applications running on the device can set network queue parameters for their own processes, which is called setting "process-level network queue parameters." However, applications cannot perceive the overall (underlying) network status of the device, and therefore cannot set network queue parameters that meet the requirements based on the specific network conditions of the device at any time.

[0032] As a result, the relevant technologies cannot adjust the network queue parameters in real time according to specific circumstances. This leads to situations where the network queue parameters are insufficient to maintain normal business operations, such as network processing bottlenecks and packet loss, thus affecting service quality.

[0033] In a first aspect, embodiments of this disclosure provide a method for adjusting network queue parameters.

[0034] This disclosure describes embodiments for controlling and adjusting network queue parameters in a target device.

[0035] Among them, the network queue is used to buffer network packets. It can be various specific types of queues, such as process (application) socket receive queue, system ARP queue, IP fragmentation reassembly queue, network card driver ring buffer, etc.

[0036] In this embodiment of the disclosure, the target device is a device that can connect to the network, such as a mobile phone or tablet computer. Therefore, it can send and receive data (network data packets) and process them through the network. The network data packets can be cached by the network queue in the target device. The network queue parameters are the parameters used by the network queue, such as the network queue length and the exception handling method.

[0037] Reference Figure 1 The method for adjusting network queue parameters according to embodiments of this disclosure includes:

[0038] S101. Obtain network queue load data of the target device.

[0039] Among them, network queue load data characterizes the load status of network queues in network devices.

[0040] S102. Determine network pressure based on network queue load data.

[0041] S103. Adjust the network queue parameters of the target device according to network pressure.

[0042] In this embodiment of the disclosure, data on the load status of the target device's network queue (network queue load data) is acquired in real time (e.g., monitored), such as the arrival rate of network packets in the network queue, the network queue length, and the continuous percentage of queue pressure. Based on the above network queue load data, an indicator characterizing the current network load status of the target device (network pressure) can be calculated. Therefore, based on the network pressure, the network queue parameters of the target device can be adjusted so that the network queue operating according to the adjusted network queue parameters can meet the needs of the current network load status.

[0043] There are various specific ways to obtain network pressure based on network queue load data.

[0044] For example, network pressure can be obtained from network queue load data through a preset pressure assessment model. The pressure assessment model can comprehensively consider network queue load data such as the arrival rate of network packets within a certain period of time, the number of times / duration of the queue being under pressure, and the number of times / duration of the queue being in an overflow state. Based on the preset weight values ​​for each data point, the network pressure is calculated through weighted averaging or other methods (e.g., values ​​between 0 and 100, with larger values ​​indicating higher load).

[0045] There are various ways to adjust the network queue parameters of the target device.

[0046] For example, when network pressure indicates that the network queue resources are overloaded, the network queue length can be increased so that more network packets can be cached in the network queue, thus avoiding packet loss; or, when network pressure indicates that the network queue resources are surplus, the network queue length can be decreased so as to avoid the network queue occupying cached resources that are not actually used.

[0047] In this embodiment, network pressure can be calculated based on specific network queue load data in the target device, and then network queue parameters can be adjusted according to the network pressure. This allows for automatic, efficient, and real-time adjustment of network queue parameters without manual intervention, adapting them to the demands. It can also react quickly to sudden network performance bottlenecks, achieving rapid self-healing, effectively preventing packet loss, and improving service quality. Moreover, this embodiment has a wide range of applications and can be used in various scenarios (such as cloud computing environments, IoT applications, mobile communication networks, etc.), providing a guarantee for the stable operation of various applications.

[0048] In some embodiments, adjusting the network queue parameters of the target device according to network pressure (S103) includes:

[0049] S103A, Adjust the system-level network queue parameters and / or process-level network queue parameters of the target device according to network pressure.

[0050] As one embodiment of this disclosure, the network queue parameters adjusted may be network queue parameters of the target device's overall operating system (system-level network queue parameters) or network queue parameters related to a specific process (process-level network queue parameters).

[0051] For example, the cause of the current network pressure can be further analyzed. If the network pressure is caused by the target device as a whole, the system-level network queue parameters can be adjusted by modifying the specified / proc parameters. Alternatively, if the network pressure is caused by a specific process (application), the process can be notified to actively modify its corresponding network queue parameters (process-level network queue parameters) through signals, shared memory, etc.

[0052] Therefore, the embodiments of this disclosure can be adapted to various different situations. For example, when the application scenario is different, the system-level network queue parameters can be further adjusted to improve the overall resource management and response capabilities of the target device. For different running applications, the specific needs can be met through refined process-level network queue parameters to improve the resource utilization efficiency and performance of the application.

[0053] In some embodiments, refer to Figure 2 Adjusting the network queue parameters of the target device according to network pressure (S103) includes:

[0054] S103B1. Determine the adjustment factor based on network pressure.

[0055] The adjustment factor represents the ratio of the adjustment value of the network queue parameters to the original value of the network queue parameters.

[0056] S103B2. Adjust the network queue parameters of the target device according to the adjustment factor.

[0057] As one embodiment of this disclosure, an "adjustment factor" can be calculated according to a predetermined method based on network pressure. This adjustment factor indicates the specific "proportion" by which the current network queue parameters should be adjusted (e.g., increasing the network queue length by 10%), so that the network queue parameters can be adjusted accordingly based on the adjustment factor.

[0058] There are various ways to derive adjustment factors based on network pressure.

[0059] For example, adjustment factors can be obtained based on network pressure mapping through preset mapping functions (such as linear mapping, logarithmic transformation, sigmoid transformation, etc.).

[0060] It should be understood that the embodiments disclosed herein are not limited to the specific methods described above. For example, the specific values ​​of the adjusted network queue parameters can also be calculated directly based on network pressure.

[0061] In some embodiments, refer to Figure 2 The adjustment factor (S103B1) determined based on network pressure includes:

[0062] S103B11. Obtain the initial adjustment factor based on the network pressure mapping.

[0063] S103B12. The initial adjustment factor is smoothed based on historical adjustment factor information to obtain the adjustment factor.

[0064] The historical adjustment factor information includes several previously used adjustment factors.

[0065] After adjusting the network queue parameters of the target device according to the adjustment factor (S103B2), the following steps are also included:

[0066] S103B3 Record the adjustment factor in the historical adjustment factor information.

[0067] As one embodiment of this disclosure, the adjustment factor used each time can be "recorded" in historical adjustment factor information. Accordingly, when calculating the adjustment factor, an "initial adjustment factor" can be directly calculated based on network pressure first, and then the initial adjustment factor can be "smoothed" based on historical adjustment factor information to obtain the final adjustment factor used (and recorded).

[0068] The initial adjustment factor can also be obtained by "mapping" according to network pressure, such as by linear mapping, logarithmic transformation, sigmoid transformation, etc.

[0069] The purpose of "smoothing" is to make the adjustment factor obtained in this calculation as close as possible to the adjustment factors used in previous calculations (i.e., to make the curve as smooth as possible), thereby preventing drastic fluctuations in the adjustment factor and avoiding drastic fluctuations in network performance due to excessive adjustment of network queue parameters.

[0070] In some embodiments, the historical adjustment factor information also includes the network performance change corresponding to the adjustment factor, wherein the network performance change corresponding to the adjustment factor represents the amount of change in the network performance of the target device relative to the state before the adjustment, after the network queue parameters of the target device are adjusted according to the adjustment factor.

[0071] Reference Figure 2 The adjustment factor is recorded in the historical adjustment factor information (S103B3), including:

[0072] S103B31. Obtain the current network performance of the target device, determine the network performance change corresponding to the adjustment factor based on the current network performance and the network performance of the target device before adjustment, and record the adjustment factor and the corresponding network performance change in the historical adjustment factor information.

[0073] As one embodiment of this disclosure, before and after each adjustment using the adjustment factor, the overall network performance of the target device can be recorded, and the change in network performance after adjustment relative to the network performance before adjustment (network performance change) can be calculated. This network performance change and the adjustment factor are recorded together in the historical adjustment factor information. Thus, in the process of smoothing the initial adjustment factor, in addition to referring to the adjustment factor, the corresponding network performance change is also referenced, thereby obtaining an adjustment factor with a better smoothing effect.

[0074] Among them, network performance is a performance indicator that represents the overall network status of the target device. It can be obtained by comprehensively considering indicators such as packet loss rate, throughput, and latency (e.g., weighted average).

[0075] There are various specific methods for smoothing.

[0076] For example, the adjustment factor (and the corresponding network performance changes) can be analyzed according to the time sequence of usage to establish a model of the adjustment factor changing over time. Then, the smoothed adjustment factor can be predicted based on the historically used adjustment factor (and the corresponding network performance changes) and the initial adjustment factor.

[0077] In some embodiments, refer to Figure 2 Determining network pressure based on network queue load data (S101) includes:

[0078] S101A: In response to the network queue load data meeting a preset first condition, determine the network pressure based on the network queue load data.

[0079] As one embodiment of this disclosure, network pressure can be calculated only when the network queue load data meets a preset first condition (which represents that the network queue resources are very likely to be overloaded or excessive, such as network queue pressure or network queue overflow exceeding a predetermined number of times within a time period), thereby reducing unnecessary computation.

[0080] For example, the socket receive queue of an application can be monitored. When the network queue usage exceeds a preset threshold (such as 90%), a queue pressure is recorded. When the network queue usage exceeds 100%, a queue overflow is recorded. If queue pressure and queue overflow occur consecutively within a preset period (such as exceeding the preset threshold in number of occurrences), network pressure calculation will begin accordingly.

[0081] In some embodiments, refer to Figure 2 Adjusting the network queue parameters of the target device according to network pressure (S102) includes:

[0082] S102A: In response to the network pressure meeting the preset second condition, adjust the network queue parameters of the target device according to the network pressure.

[0083] As one embodiment of this disclosure, when calculating network pressure, the network queue parameters of the target device may be adjusted accordingly (e.g., an adjustment factor is calculated and the network queue parameters are adjusted according to the adjustment factor) only when the calculated network pressure meets a preset second condition (which represents a large or small network load, such as the network pressure exceeding a preset threshold or being less than another preset threshold), thereby avoiding excessively frequent adjustments to the network queue parameters.

[0084] Secondly, referring to Figure 3 This disclosure provides an apparatus for adjusting network queue parameters, which includes a memory and a processor; the memory stores a computer program that can be executed by the processor, and when the computer program is executed by the processor, it implements any of the methods for adjusting network queue parameters according to the embodiments of this disclosure.

[0085] Thirdly, referring to Figure 4 This disclosure provides a computer-readable medium having a computer program stored thereon, which, when executed by a processor, implements any of the methods for adjusting network queue parameters according to this disclosure.

[0086] Fourthly, refer to Figure 5 This disclosure provides a computer program product, which includes a computer program that, when executed by a processor, implements any of the methods for adjusting network queue parameters according to this disclosure.

[0087] Among them, the processor is a device with data processing capabilities, including but not limited to the central processing unit (CPU); the memory is a device with data storage capabilities, including but not limited to random access memory (RAM, more specifically SDRAM, DDR, etc.), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), and flash memory (FLASH); the I / O interface (read-write interface) is connected between the processor and the memory, enabling information exchange between the memory and the processor, including but not limited to the data bus (Bus).

[0088] Example 1:

[0089] The following is an exemplary description of a method for adjusting network queue parameters according to an embodiment of the present disclosure.

[0090] Reference Figure 5 The method for adjusting network queue parameters in this embodiment can be performed by a device for adjusting network queue parameters, which can be divided into a pressure monitoring module A100, a network queue optimization module A110, and a performance feedback module A120.

[0091] In this embodiment of the disclosure, the pressure monitoring module A100 is used to monitor the load of the network queue in the device system in real time, periodically acquire and record relevant data (network queue load data), and when it is determined that the network queue resources are overloaded or excessive, calculate the network pressure and notify and trigger the network queue tuning module A110.

[0092] Reference Figure 5 The pressure monitoring module A100 in this embodiment may include a status recording unit A101 and a pressure assessment unit A102. The status recording unit A101 provides a data basis for the pressure assessment unit A102; while the pressure assessment unit A102 calculates the network pressure based on the received data and executes the action of notifying the network queue tuning module A110 in response to a specific state or state change.

[0093] For example, the status recording unit A101 can insert monitoring points into the kernel protocol stack message queuing process. The monitoring points periodically collect and analyze basic indicators such as the arrival rate of network packets and the usage ratio of network queues. At the same time, the pressure monitoring threshold interface (e.g., / proc interface) is exposed to the user, and the user can flexibly configure the sensitivity of network pressure according to the business situation.

[0094] For example, in one embodiment, a user can configure the usage threshold of a certain application's socket receive network queue to be 90%. Within a specified period, the monitoring point is responsible for recording and judging at the packet queuing point: when the network queue usage exceeds the threshold (90%), a network queue pressure is recorded; when the network queue usage exceeds 100%, a network queue overflow is recorded. If network queue pressure and network queue overflow occur consecutively within a period (the first condition), the count of the network queue continuously being in a pressure state and overflow state is updated. At the end of the period, the number of network packets arriving within the period is updated, and the above data is sent to the pressure assessment unit A102 in the form of parameter transmission, triggering the assessment unit A102 to calculate the network pressure based on this data.

[0095] For example, the stress assessment unit A102 can calculate the current network stress based on the above data according to the preset stress assessment model, and send a network queue optimization signal to the network queue optimization module A110 when the network stress deviates from the normal fluctuation range (second condition).

[0096] The stress assessment model can comprehensively consider multiple influencing factors (network queue load data) such as the arrival rate of network packets within a period, the number of times / duration of the network queue being under stress, and the number of times / duration of the network queue being in an overflow state.

[0097] For example, in one embodiment, the stress assessment model may be a weighted average model, which calculates network stress according to the following formula:

[0098]

[0099] Where n is the number of impact factors, ci is the normalized value of the i-th impact factor (ranging from 0 to 1); wi is the weight value of the i-th impact factor, with each wi ranging from 0 to 100. That is, the sum of the weight values ​​is 100; therefore, the network stress between 0 and 100 can be calculated.

[0100] When assigning weight values ​​to each influencing factor, a rule-based approach can be used to adjust the weight values ​​of factors such as network queue overflow factor and network queue pressure factor based on factors such as packet arrival rate and service type within a period; alternatively, a statistical learning-based approach can be used to train the optimal combination of weight values ​​through supervised learning.

[0101] Therefore, once the network stress calculation is complete, the state of the network queue can be evaluated based on it.

[0102] For example, when the network stress is in the range of 0 to 20, it can be considered that the network queue resources are excessive, and a network queue reduction strategy should be triggered (adjusting the network queue parameters to reduce the network queue); while when the network stress is in the range of 60 to 100, it can be considered that the network queue resources are overloaded (high pressure), and a network queue expansion strategy should be triggered (adjusting the network queue parameters to increase the network queue), and an optimization request should be actively sent to the network queue optimization module A110; while when the network stress is in the range of 20 to 60, it can be considered that the network queue resources are used appropriately and no adjustment is required (i.e., it does not meet the second condition).

[0103] In this embodiment of the disclosure, the network queue tuning module A110 is used to calculate the adjustment factor based on the network pressure (in the tuning request) from the pressure monitoring module A100, and to perform the adjustment and configuration of the network queue parameters based on the adjustment factor.

[0104] Reference Figure 5The network queue optimization module A110 in this embodiment includes a parameter calculation unit A111 and a parameter configuration unit A112. The parameter calculation unit A111 provides optimization decisions based on data analysis, while the parameter configuration unit A112 is responsible for translating these decisions into actual network queue parameter adjustments.

[0105] For example, the parameter calculation unit A111 receives a tuning request from the stress monitoring module A100, determines the current tuning strategy (reducing or expanding the network queue strategy) through the network stress, calculates the initial adjustment factor, and simultaneously considers the adjustment factors used in previous tunings, the network performance changes after adjustment (network performance changes), and other feedback records (historical adjustment factor information) to smooth the initial adjustment factor and obtain the final adjustment factor used.

[0106] For example, in one embodiment, the initial adjustment factor can be obtained by mapping network stress, such as using linear mapping, logarithmic transformation, sigmoid transformation, etc. When smoothing the initial adjustment factor, a model of the adjustment factor changing over time can be established using time series analysis methods. Then, the smoothed adjustment factor value is predicted based on historical data and influencing factors, and recorded for subsequent configuration operations by the parameter configuration unit A112.

[0107] For example, the parameter configuration unit A112 is used to maintain and adjust all network queue parameters, specifically including system-level network queue parameters and / or process-level network queue parameters. First, it obtains the current system-level network queue parameters and / or process-level network queue parameters, along with the adjustment factor given by the parameter calculation unit A111, to calculate the optimized system-level network queue parameters and / or process-level network queue parameters (such as network queue length). Then, it performs parameter configuration within the system's allowed configuration range. Subsequently, the parameter configuration unit A112 verifies whether the configuration is effective, including verifying whether the configured parameters meet process resource limits and system global resource limits. If the configuration fails, it may be because the parameters exceed the adjustment range, requiring feedback to the parameter calculation unit A111 for adaptive adjustments.

[0108] For example, in one embodiment, system-level network queue parameters can be adjusted by modifying a specified / proc parameter; for process-level network queue parameters, the process can be notified to actively modify the corresponding network queue parameters through signals, shared memory, or other means.

[0109] In this embodiment of the disclosure, the performance feedback module A120 is used to evaluate the performance changes of the network before and after the adjustment (network performance changes), and specifically feeds back the smoothing message to the network queue tuning module A110, so that it can smooth the initial adjustment factor to ensure the stability and performance of the system.

[0110] In this embodiment of the disclosure, reference is made to Figure 5 The performance feedback module A120 includes a performance evaluation unit A121 and a tuning history record unit A122, which together complete a comprehensive evaluation of network performance. The performance evaluation unit A121 provides real-time feedback on network performance, while the tuning history record unit A122 records changes in network performance before and after tuning, facilitating adjustments to the network queue optimization strategy (smoothing process).

[0111] For example, after the parameter configuration unit A112 completes the configuration, the performance evaluation unit A121 uses relevant tools to monitor the network performance of the operating system, or the process actively performs network performance testing internally to obtain changes in parameters such as network packet loss rate before and after adjustment.

[0112] For example, in one embodiment, the performance evaluation unit A121 may use tools such as iperf, iftop, and traceroute to obtain network performance.

[0113] The performance evaluation unit A121 can be used primarily in two scenarios. The first scenario is the development phase, where the A121 monitors the network's overall packet loss rate, throughput, latency, and other metrics. Under relatively stable basic service conditions, it comprehensively evaluates network performance and, through repeated tuning processes, obtains stable values ​​for the network queue parameters that yield optimal performance. The second scenario is the routine deployment phase, where the A121 focuses on evaluating the network's packet loss rate to anticipate and dynamically adjust for sudden pressure scenarios, preventing packet loss from occurring.

[0114] For example, the tuning history unit A122 records the network performance of the system after parameter adjustment and compares it with the network performance before tuning to determine the change in network performance.

[0115] For example, in one embodiment, after the parameter adjustment is completed, the optimization history unit A122 records the network performance at different time points and plots the historical curve of network performance change based on this data to help analyze the effect of parameter adjustment. Based on the characteristics of historical data, the optimization strategy of the optimization algorithm is adjusted, and the message is fed back to the network queue optimization module A110.

[0116] For example, refer to Figure 6 A method for adjusting network queue parameters according to an embodiment of this disclosure may include the following steps:

[0117] B210: Activate the above pressure monitoring module, network queue optimization module, and performance feedback module to ensure normal collaborative operation between modules.

[0118] B220: The pressure monitoring module periodically monitors the operating status of the network queue, calculates the network pressure, and triggers the network queue optimization module to perform optimization when the network pressure exceeds the normal fluctuation range.

[0119] B230: The network queue tuning module calculates the initial adjustment factor based on stress monitoring data, and comprehensively considers feedback records such as network performance changes and stress changes to smooth the initial adjustment factor. Based on the smoothed adjustment factor, it performs network queue tuning and monitors the results.

[0120] B240: The performance feedback module evaluates network performance changes before and after parameter adjustments, records parameter adjustment history, and sets minimum adjustment intervals to guide and coordinate a smooth tuning process.

[0121] For example, refer to Figure 6 This embodiment takes adjusting the process-level socket receive buffer as an example to describe in detail the method for adjusting network queue parameters according to the present disclosure, which may include the following steps:

[0122] The first step is to start the upper-layer business process and initialize the various resources of the network queue optimization device, including stress monitoring data (network packet arrival rate within a period, number of times / duration of network queue under stress, number of times / duration of network queue in overflow state), network queue adjustment factor, stress assessment model parameters, etc.

[0123] The second step involves adding monitoring points to the socket packet reception process at the kernel protocol stack transport layer. During normal service operation, the real-time network queue usage percentage of the service process (e.g., a specific socket) is collected. When the network queue usage percentage exceeds the user-configured threshold, a network queue pressure status is recorded. If the network queue usage percentage exceeds the threshold consecutively, the count of the network queue continuously under pressure is recorded and updated. When the network queue usage percentage exceeds the current system / process configured limit, a network queue overflow status is recorded. If the network queue usage percentage exceeds the limit consecutively, the count of the network queue continuously overflowing is updated. Subsequently, the network pressure of the current network queue is periodically evaluated, and key influencing factors are normalized. The network pressure (stress) is calculated using a weighted average sum of the above influencing factors.

[0124] The third step involves calculating the network queue adjustment factor by assessing the network stress state. Simultaneously, considering feedback records such as network performance metrics and stress changes, the factor is smoothed to calculate the adjusted network queue parameter size. An adjustment signal is sent to notify the process to use `setsockopt()` to adjust the `SO_RCVBUF` receive buffer parameters. The configuration is then checked to verify its effectiveness. If the configuration fails, it indicates that the current match exceeds the adjustment range, and the tuning factor needs to be recalculated for adaptive adjustments.

[0125] Fourth, after parameter adjustments, use relevant monitoring tools to monitor network performance metrics such as packet loss rate during process execution. Simultaneously, reassess network queue pressure using the network pressure calculation method from step two, recording changes in network pressure before and after adjustments. If pressure is alleviated, decrease the tuning factor; if pressure is not alleviated, increase the tuning factor. Feedback the network performance metrics and historical network pressure information into the tuning factor calculation model from step three to guide the calculation of the tuning factor in step three.

[0126] For example, refer to Figure 6 The process of calculating the adjustment factor in this embodiment may include the following steps:

[0127] C310: Define stress assessment factors (influence factors) and periodically monitor this data, such as: network packet arrival rate within a period, number of times / duration of network queues under stress, and number of times / duration of network queues in overflow state.

[0128] C320: Train the stress assessment model, input stress assessment factors, output network stress.

[0129] C330: Intelligent tuning is achieved based on pressure perception and performance feedback. It trains the tuning calculation model, inputs the network queue pressure, obtains the expansion factor or contraction factor of the network queue tuning, and outputs the parameter values ​​of the network queue after tuning.

[0130] C340: After completing the tuning, the tuning factor is further smoothed based on the network performance feedback before and after the adjustment.

[0131] In the specific implementation of this algorithm, the stress assessment model and optimization calculation model are implemented using, but are not limited to, rule-based methods and machine learning methods. Those skilled in the art can make appropriate selections based on the specific circumstances.

[0132] Those skilled in the art will understand that all or some of the steps, systems, and devices disclosed above, as functional modules / units, can be implemented as software, firmware, hardware, or suitable combinations thereof.

[0133] In hardware implementations, the division between functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be executed by several physical components working together.

[0134] Some or all of the physical components may be implemented as software executed by a processor, such as a central processing unit (CPU), digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit (ASIC). Such software may be distributed on a computer-readable medium, which may include computer storage media (or non-transitory media) and communication media (or transient media). As is known to those skilled in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technique for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, random access memory (RAM, more specifically SDRAM, DDR, etc.), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory (FLASH) or other disk storage; read-only optical disc (CD-ROM), digital versatile disc (DVD) or other optical disc storage; magnetic cartridges, magnetic tapes, disk storage or other magnetic storage; and any other media that can be used to store desired information and can be accessed by a computer. Furthermore, as is known to those skilled in the art, communication media typically contain computer-readable instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.

[0135] This disclosure has disclosed exemplary embodiments, and although specific terminology has been used, it is for general illustrative purposes only and should not be construed as limiting. In some instances, it will be apparent to those skilled in the art that features, characteristics, and / or elements described in conjunction with particular embodiments may be used alone, or in combination with features, characteristics, and / or elements described in conjunction with other embodiments, unless otherwise expressly indicated. Therefore, those skilled in the art will understand that various changes in form and detail may be made without departing from the scope of this disclosure as set forth by the appended claims.

Claims

1. A method for adjusting network queue parameters, comprising: Obtain network queue load data for the target device; The network queue load data characterizes the load status of the network queues in the network device, and the network queues are used to cache network data packets; Determine network pressure based on the network queue load data; Adjust the network queue parameters of the target device according to the network pressure; The step of adjusting the network queue parameters of the target device according to the network pressure includes: adjusting the system-level network queue parameters of the target device according to the network pressure; the system-level network queue parameters of the target device represent the network queue parameters of the target device's operating system; The step of adjusting the network queue parameters of the target device according to the network pressure includes: determining an adjustment factor based on the network pressure; the adjustment factor representing the ratio of the adjusted value of the network queue parameters to the original value of the network queue parameters; and adjusting the network queue parameters of the target device according to the adjustment factor.

2. The method of claim 1, wherein, The step of adjusting the network queue parameters of the target device according to the network pressure further includes: Adjust the process-level network queue parameters of the target device according to the network pressure.

3. The method of claim 1, wherein, The step of determining the adjustment factor based on the network pressure includes: The initial adjustment factor is obtained based on the network pressure mapping. The initial adjustment factor is smoothed based on historical adjustment factor information to obtain the adjustment factor; the historical adjustment factor information includes multiple previously used adjustment factors. After adjusting the network queue parameters of the target device according to the adjustment factor, the method further includes: The adjustment factor is recorded in the historical adjustment factor information.

4. The method according to claim 3, wherein, The historical adjustment factor information also includes the network performance change corresponding to the adjustment factor. The network performance change corresponding to the adjustment factor represents the amount of change in the network performance of the target device relative to the state before the adjustment, after the network queue parameters of the target device are adjusted according to the adjustment factor. The step of recording the adjustment factor in the historical adjustment factor information includes: obtaining the current network performance of the target device, determining the network performance change corresponding to the adjustment factor based on the current network performance and the network performance of the target device before adjustment, and recording the adjustment factor and the corresponding network performance change in the historical adjustment factor information.

5. The method according to claim 1, wherein, Determining network pressure based on the network queue load data includes: In response to the network queue load data meeting a preset first condition, the network pressure is determined based on the network queue load data.

6. The method according to claim 1, wherein, The step of adjusting the network queue parameters of the target device according to the network pressure includes: In response to the network pressure meeting a preset second condition, the network queue parameters of the target device are adjusted according to the network pressure.

7. An apparatus for adjusting network queue parameters, comprising a memory and a processor; the memory storing a computer program executable by the processor, wherein the computer program, when executed by the processor, implements the method for adjusting network queue parameters as described in any one of claims 1 to 6.

8. A computer-readable medium having a computer program stored thereon, which, when executed by a processor, implements the method for adjusting network queue parameters as described in any one of claims 1 to 6.

9. A computer program product comprising a computer program that, when executed by a processor, implements the method for adjusting network queue parameters as described in any one of claims 1 to 6.