Network bandwidth scheduling method and device, electronic equipment and storage medium

By monitoring the use of network equipment cache area and dynamically adjusting the network bandwidth weight, traditional network bandwidth scheduling technology cannot cope with flexible and variable traffic, and realizes efficient utilization of network resources and business performance optimization.

CN120474920APending Publication Date: 2025-08-12INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510786420.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-12
Publication Date
2025-08-12

AI Technical Summary

Technical Problem

Traditional network bandwidth scheduling technology cannot effectively deal with flexible and variable actual traffic, resulting in deterioration of service performance.

Method used

By obtaining the cache area usage of N device interfaces on the target network device in the target time period, the cache usage of the network queue is calculated, and a network bandwidth configuration policy is generated based on the cache usage, and the network bandwidth weight is dynamically adjusted to prioritize burst traffic.

Benefits of technology

It realizes that key queues obtain priority bandwidth resources when facing sudden services. In a stable state, each queue enjoys fair bandwidth allocation, avoids idle resources and waste, and improves network scheduling flexibility and data transmission efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120474920A_ABST
    Figure CN120474920A_ABST
Patent Text Reader

Abstract

The invention discloses a network bandwidth scheduling method and device, electronic equipment and a storage medium, and relates to the field of financial science and technology or other related fields, and the method comprises the steps: obtaining the cache region use conditions of N equipment interfaces on target network equipment in a target time period, and N is a positive integer; the cache utilization rates of the N network queues are calculated based on the cache region use conditions of the device interfaces, and each device interface corresponds to one network queue; a network bandwidth configuration strategy of the target network equipment is generated according to the cache utilization rate, and the network bandwidth configuration strategy comprises network bandwidth weights configured for the N equipment interfaces; and executing network bandwidth scheduling on the target network equipment according to the network bandwidth configuration strategy. Through application of the method and the device, the technical problem of service performance degradation caused by the fact that a traditional network bandwidth scheduling technology is not matched with flexible and changeable actual traffic in related technologies is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of financial technology or other related fields, and specifically to a method and device for scheduling network bandwidth, an electronic device, and a storage medium. Background Art

[0002] With the continuous expansion of internet applications, users' demand for bandwidth is growing. Network traffic types are complex, varied, and often bursty, resulting in significant traffic fluctuations and low bandwidth resource utilization, impacting user experience. In real-world network applications, static bandwidth allocation strategies are often used—pre-configuring bandwidth ratios and then maintaining them unchanged. These static allocation strategies are unable to adapt to network traffic fluctuations, leading to wasted bandwidth resources and congestion.

[0003] To address the issue of low network bandwidth utilization, the industry currently generally adopts queue-based bandwidth allocation strategies. These strategies employ various bandwidth allocation algorithms, such as weighted round-robin (WRR) and priority queue (SP), to meet the bandwidth demands of different services. However, these allocation strategies are ineffective in addressing service bursts, leading to wasted bandwidth resources and network congestion.

[0004] To address the above-mentioned problems, no effective solutions have been proposed so far. Summary of the Invention

[0005] The main purpose of this application is to provide a network bandwidth scheduling method and device, electronic device, and storage medium to at least solve the technical problem in related technologies that traditional network bandwidth scheduling technology does not match the flexible and changeable actual traffic, resulting in service performance degradation.

[0006] In order to achieve the above-mentioned purpose, according to one aspect of the present application, a network bandwidth scheduling method is provided, which includes: obtaining the cache usage of N device interfaces on the target network device within a target time period, wherein N is a positive integer; calculating the cache usage rate of N network queues based on the cache usage of the device interfaces, wherein each of the device interfaces corresponds to one network queue; generating a network bandwidth configuration policy for the target network device according to the cache usage rate, wherein the network bandwidth configuration policy includes network bandwidth weights configured for the N device interfaces; and performing network bandwidth scheduling on the target network device according to the network bandwidth configuration policy.

[0007] Furthermore, the step of generating a network bandwidth configuration policy for the target network device based on the cache usage rate includes: for each of the network queues, determining whether burst traffic services occur in the network queue based on the cache usage rate within the target time period; in a case where the burst traffic services do not occur in N of the network queues, equally allocating the network bandwidth weights of the N device interfaces to obtain the network bandwidth configuration policy; in a case where there are M of the network queues that experience burst traffic services, determining the network bandwidth configuration policy based on the number of burst traffic services within the target time period, wherein M is a positive integer less than or equal to N.

[0008] Furthermore, the step of determining whether burst traffic service occurs in the network queue based on the cache usage rate within the target time period includes: when the cache usage rate is less than or equal to a first preset threshold, determining that the burst traffic service does not occur in the network queue; or, when the cache usage rate is greater than the first preset threshold, determining that the burst traffic service occurs in the network queue.

[0009] Furthermore, the step of determining the network bandwidth configuration strategy based on the number of burst traffic services within the target time period includes: when the number of burst traffic services is less than or equal to a second preset threshold, setting the network bandwidth weights of the M device interfaces corresponding to the M network queues where burst traffic services occur to a first weight value; setting the network bandwidth weights of the remaining NM device interfaces to a second weight value, wherein the second weight value is less than the first weight value; and determining the network bandwidth configuration strategy of the target network device based on the network bandwidth weights of all the device interfaces.

[0010] Furthermore, the step of determining the network bandwidth configuration strategy based on the number of burst traffic services within the target time period also includes: when the number of burst traffic services is greater than the second preset threshold, setting the network bandwidth configuration strategy of the target network device to network bandwidth expansion.

[0011] Furthermore, the step of performing network bandwidth scheduling on the target network device according to the network bandwidth configuration policy includes: determining the network queues corresponding to all the device interfaces with the same network bandwidth weight as a scheduling queue group according to the network bandwidth configuration policy; creating a scheduling counter for each of the network queues in the scheduling queue group, and initializing the scheduling counter before scheduling begins; polling the scheduling queue group according to the count value of the scheduling counter to complete the network bandwidth scheduling.

[0012] Furthermore, the step of polling the scheduling queue group according to the count value of the scheduling counter includes: starting the current polling when all the count values are equal; performing traffic forwarding on the queried network queue after each inquiry, and adding a preset increment value to the count value of the network queue after the forwarding is completed to obtain an updated count value; completing the current polling when the count values of all the network queues are updated to the same value.

[0013] In order to achieve the above-mentioned purpose, according to another aspect of the present application, a network bandwidth scheduling device is also provided, which includes: an acquisition unit, used to obtain the cache usage of N device interfaces on the target network device within a target time period, wherein N is a positive integer; a calculation unit, used to calculate the cache usage rates of N network queues based on the cache usage of the device interfaces, wherein each of the device interfaces corresponds to one network queue; a generation unit, used to generate a network bandwidth configuration policy for the target network device based on the cache usage rate, wherein the network bandwidth configuration policy includes network bandwidth weights configured for the N device interfaces; and an execution unit, used to perform network bandwidth scheduling on the target network device according to the network bandwidth configuration policy.

[0014] Furthermore, the generation unit includes: a first determination module, used to determine, for each of the network queues, whether burst traffic services occur in the network queue according to the cache usage rate within the target time period; an equal allocation module, used to perform equal allocation on the network bandwidth weights of the N device interfaces to obtain the network bandwidth configuration strategy when none of the N network queues experience burst traffic services; and a second determination module, used to determine the network bandwidth configuration strategy based on the number of burst traffic services within the target time period when M network queues experience burst traffic services, where M is a positive integer less than or equal to N.

[0015] Furthermore, the first determination module includes: a first determination submodule, used to determine that the network queue does not have the burst traffic service when the cache usage rate is less than or equal to a first preset threshold; or, when the cache usage rate is greater than the first preset threshold, determine that the network queue has the burst traffic service.

[0016] Furthermore, the second determination module includes: a first setting submodule, used to set the network bandwidth weights of the M device interfaces corresponding to the M network queues where burst traffic services occur to a first weight value when the number of burst traffic services is less than or equal to a second preset threshold; a second setting submodule, used to set the network bandwidth weights of the remaining NM device interfaces to a second weight value, wherein the second weight value is less than the first weight value; and a second determination submodule, used to determine the network bandwidth configuration policy of the target network device based on the network bandwidth weights of all the device interfaces.

[0017] Furthermore, the second determining module further includes: a third setting submodule, configured to set the network bandwidth configuration policy of the target network device to network bandwidth expansion when the number of burst traffic services is greater than the second preset threshold.

[0018] Furthermore, the execution unit includes: a third determination module, used to determine the network queues corresponding to all the device interfaces with the same network bandwidth weight as a scheduling queue group based on the network bandwidth configuration policy; a creation module, used to create a scheduling counter for each of the network queues in the scheduling queue group, and initialize the scheduling counter before scheduling begins; a polling module, used to poll the scheduling queue group based on the count value of the scheduling counter to complete the network bandwidth scheduling.

[0019] Furthermore, the polling module includes: an activation module, configured to activate the current polling when all the count values are equal; a forwarding module, configured to perform traffic forwarding on the queried network queue after each query, and to add a preset increment value to the count value of the network queue after the forwarding is completed to obtain an updated count value; and a completion module, configured to complete the current polling when the count values of all the network queues are updated to the same value.

[0020] In order to achieve the above-mentioned purpose, according to another aspect of the present application, a computer-readable storage medium is further provided, wherein the computer-readable storage medium includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute any one of the above-mentioned network bandwidth scheduling methods.

[0021] In order to achieve the above-mentioned purpose, according to another aspect of the present application, an electronic device is also provided, comprising one or more processors and a memory, wherein the memory is used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement any one of the above-mentioned network bandwidth scheduling methods.

[0022] In order to achieve the above-mentioned purpose, according to another aspect of the present application, a computer program product is further provided, comprising computer instructions, wherein when the computer instructions are executed by a processor, the steps of any one of the above-mentioned methods for scheduling network bandwidth are implemented.

[0023] The present invention proposes a network bandwidth scheduling method, which first obtains the cache usage of N device interfaces on a target network device within a target time period, wherein N is a positive integer, and then calculates the cache usage rates of N network queues based on the cache usage of the device interfaces, wherein each device interface corresponds to one network queue, and then generates a network bandwidth configuration policy for the target network device based on the cache usage rate, wherein the network bandwidth configuration policy includes network bandwidth weights configured for the N device interfaces, and finally performs network bandwidth scheduling on the target network device according to the network bandwidth configuration policy.

[0024] In the present invention, a dynamic perception of network traffic status is adopted. Through the innovative means of real-time monitoring of the usage of the cache area of each device interface on the target network device, the traffic characteristics of multiple network queues within the target time period are deeply analyzed. Each device interface is accurately mapped to a network queue. Based on the collected cache usage data, not only can the instantaneous pressure points of the network be understood, but also potential traffic bottlenecks can be predicted, thereby generating a highly customized network bandwidth configuration strategy for the target network device. The core of this strategy is to dynamically adjust the network bandwidth weights of multiple device interfaces to ensure that key queues can obtain higher priority bandwidth resources when facing sudden business bursts, and when the network is in a stable state, each queue can enjoy a fairer bandwidth allocation, avoiding idleness and waste of resources, achieving the dual goals of network resource efficiency and business performance optimization, and realizing the technical effect of significantly improving network scheduling flexibility and data transmission efficiency in a mixed business environment, thereby solving the technical problem in related technologies that traditional network bandwidth scheduling technology does not match the flexible and changeable actual traffic, resulting in degraded business performance. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] The accompanying drawings, which constitute part of this application, are intended to provide a further understanding of this application. The exemplary embodiments and descriptions of this application are intended to explain this application and do not constitute an improper limitation on this application. In the accompanying drawings:

[0026] Figure 1 A hardware structure block diagram of a computer terminal (or mobile device) for implementing a method for scheduling network bandwidth is shown;

[0027] Figure 2 is a flow chart of an optional network bandwidth scheduling method according to an embodiment of the present invention;

[0028] Figure 3 is a schematic diagram of an optional network bandwidth scheduling device according to an embodiment of the present invention;

[0029] Figure 4 The present invention is a structural block diagram of an electronic device for executing a method for scheduling network bandwidth according to an embodiment of the present invention. DETAILED DESCRIPTION

[0030] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.

[0031] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0032] To facilitate those skilled in the art to understand the present invention, some of the terms or nouns involved in the embodiments of the present invention are explained below:

[0033] Remote Direct Memory Access (RDMA) is a technology that allows efficient data transfer between machines without the intervention of operating system middleware. In an RDMA network, data can be directly transferred from the memory of one computer to the memory of another without CPU processing, significantly reducing data transmission latency and CPU load, while improving data transmission efficiency.

[0034] TCP (Transmission Control Protocol) is a connection-oriented, reliable, byte-stream-based communication protocol that ensures the correct transmission of data packets across the network. It is one of the key protocols for data transmission on the Internet. In this application, TCP services represent network applications that require reliable transmission and high data integrity, such as file transfer and web browsing.

[0035] Weighted Round Robin (WRR) is a queue scheduling algorithm that schedules packets in each queue in a round-robin fashion based on a pre-set weight ratio to ensure fair bandwidth distribution among queues. "Equal-ratio WRR" means all queues are equally weighted and is suitable for network load balancing without clear priority requirements.

[0036] SP (Strict Priority) scheduling algorithm schedules packets based on strict queue priorities. Packets in high-priority queues are scheduled and sent before packets in lower-priority queues. SP scheduling is ideal for scenarios with clear priority requirements, such as processing voice and video data streams with high real-time requirements.

[0037] Burst traffic refers to a sudden and significant increase in network traffic. This traffic peak is usually short-lived, but it suddenly increases the demand for network bandwidth and buffers, which can easily cause network delays and packet loss.

[0038] DRR (Deficit Round Robin) is a network queue scheduling method based on packet length polling. By maintaining a "deficit" value, it dynamically adjusts the scheduling frequency and allocated bandwidth ratio of queues to improve bandwidth utilization and fairness. Compared with traditional WRR, DRR can better balance bandwidth allocation between queues when processing packets of different lengths.

[0039] Buffer utilization refers to the proportion of space in the internal buffer area of network devices (such as switches and routers) that has been used. It is an important indicator for measuring the carrying capacity and service quality of network devices.

[0040] It should be noted that the network bandwidth scheduling method and device in this application can be used in the field of financial technology to dynamically schedule the network bandwidth of a data center, and can also be used in any field other than the field of financial technology to dynamically schedule the network bandwidth of a data center. The application does not limit the application field of the network bandwidth scheduling method and device in this application.

[0041] It should be noted that the relevant information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, storage, processing, transmission, provision, disclosure, use and processing of the relevant data comply with the laws, regulations and standards of the relevant regions, take necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation entrances for users to choose to authorize or refuse. For example, an interface is set up between this system and the relevant users or institutions. Before obtaining relevant information, it is necessary to send an acquisition request to the aforementioned user or institution through the interface, and obtain relevant information after receiving the consent information fed back by the aforementioned user or institution.

[0042] The information collection (for example, user voice, video, and text collection) and analysis operations involved in this application have provided users with corresponding operation entrances when they are executed, allowing users to choose to agree or reject the automated decision-making results; if the user chooses to reject, the expert decision-making process will be entered.

[0043] The following embodiments of the present invention can be applied to various systems / applications / devices that require network traffic scheduling and bandwidth resource management, and can achieve network performance optimization and efficient resource allocation in mixed service environments (such as TCP and RDMA in parallel). The present invention uses a mechanism that dynamically perceives the network queue buffer utilization rate to perform real-time traffic monitoring, and then dynamically adjusts the proportion of WRR and SP scheduling strategies based on the monitoring results. This can better adapt to the bandwidth demand changes of burst services and long-term stable flow services, ensuring that critical services receive sufficient bandwidth support during peak traffic periods, and that all queues can enjoy fair bandwidth resources during stable traffic periods, thereby comprehensively improving network stability and transmission efficiency.

[0044] In specific implementation, the present invention is not limited to a single network device, but can be extended to the network architecture of the entire data center. By monitoring the inlet buffer usage rate of all network devices connected to the business server, it can automatically identify whether there is a burst business, and adopt corresponding scheduling strategies accordingly, and even trigger network bandwidth expansion to meet the ever-changing business needs. It can significantly improve the flexibility and response speed of the data center network, ensuring the optimal performance of various types of business (especially burst business).

[0045] The present invention will be described in detail below with reference to various embodiments.

[0046] Example 1

[0047] According to an embodiment of the present invention, an embodiment of a method for scheduling network bandwidth is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0048] The network bandwidth scheduling method embodiment provided in the first embodiment of the present invention may be executed in a mobile terminal, a computer terminal, or a similar computing device. Figure 1 The hardware structure block diagram of a computer terminal (or mobile device) for implementing a method for scheduling network bandwidth is shown in FIG. Figure 1 As shown, the computer terminal 10 (or mobile device) may include one or more (illustrated as 102a, 102b, ..., 102n in the figure) processors 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 104 for storing data, and a transmission device 106 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the BUS bus), a network interface, a power supply and / or a camera. It will be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 1 More or fewer components than shown, or with Figure 1 Different configurations shown.

[0049] It should be noted that the one or more processors 102 and / or other data processing circuits described above may generally be referred to herein as "data processing circuitry". The data processing circuitry may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuitry may be a single independent processing module, or may be incorporated in whole or in part into any of the other components of the computer terminal 10 (or mobile device). As described in the embodiments of the present application, the data processing circuitry serves as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).

[0050] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the network bandwidth scheduling method in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, implementing the above-mentioned network bandwidth scheduling method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely located relative to the processor 102, and these remote memories may be connected to the computer terminal 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0051] The transmission device 106 is configured to receive or transmit data via a network. A specific example of the aforementioned network may include a wireless network provided by the communications provider of the computer terminal 10. In one embodiment, the transmission device 106 includes a network interface controller (NIC), which can be connected to other network devices via a base station to enable communication with the Internet. In another embodiment, the transmission device 106 may be a radio frequency (RF) module, which is configured to communicate with the Internet wirelessly.

[0052] The display may be, for example, a touch screen liquid crystal display (LCD) that enables a user to interact with a user interface of the computer terminal 10 (or mobile device).

[0053] Under the above operating environment, the present invention provides Figure 2The network bandwidth scheduling method shown in the figure is implemented by a network bandwidth dynamic scheduling management system, which combines real-time traffic analysis and intelligent decision-making technology. It is used in the multi-service mixed deployment scenario of the data center internal network, especially to solve the network performance degradation and unfair resource allocation problems caused by Burst services when TCP and RDMA services are mixed. By real-time monitoring of the inlet buffer usage rate and dynamically adjusting the bandwidth scheduling strategy, it aims to achieve the purpose of intelligent bandwidth scheduling and resource optimization in the dynamic changes of network traffic. The specific steps include: regularly detecting and recording the size of the network queue buffer usage to monitor the cache usage of the network device; based on Based on the recorded information, the system analyzes the stability of queue buffer utilization to determine whether burst traffic has occurred. If the ingress buffer utilization is stable, equal-ratio WRR is used to achieve fair bandwidth scheduling between queues. If burst traffic is detected, it is further determined whether it is a continuous burst. If it is discontinuous, a high-ratio WRR (9:1) and SP are set to prioritize the burst traffic queue. If it is not a continuous burst, network bandwidth expansion may be prompted. Regular statistics on ingress buffer utilization are collected and the bandwidth scheduling ratio is adjusted in real time to optimize network resource allocation and improve service performance.

[0054] The embodiment of the present invention is described in detail below with reference to various specific steps.

[0055] Figure 2 is a flow chart of an optional method for scheduling network bandwidth according to an embodiment of the present invention. Figure 2 As shown, the method includes the following steps:

[0056] Step S201: Obtain the cache usage of N device interfaces on a target network device within a target time period, where N is a positive integer.

[0057] It should be noted that target network devices refer to key nodes in the network architecture that forward data, such as network switches and routers. These devices possess high-speed data processing capabilities, and their core components include forwarding chips capable of handling concurrent data streams from multiple device interfaces. In embodiments of the present invention, target network devices are the primary vehicle for implementing dynamic network bandwidth scheduling policies, responsible for monitoring and adjusting bandwidth resource allocation to accommodate the needs of different types of services.

[0058] A device interface is a port on a target network device that is used to establish a physical connection with other hardware (such as a server, storage system, or other network device). Each device interface is associated with one or more network queues for managing packets to be sent. In embodiments of the present invention, multiple such device interfaces exist on the target network device, demonstrating that the present invention can simultaneously monitor and schedule traffic on multiple interfaces to meet complex network management requirements.

[0059] Another thing that needs to be explained is that the target time period is the time window for the network device to count the usage of the cache area, which can be flexibly set according to different business needs. For example, it can range from a few seconds to a few minutes. Selecting an appropriate target time period is crucial for accurately evaluating the real-time status of the network. Too short a target time period may lead to statistical instability, while too long a target time period may not be able to respond to changes in the network status in a timely manner. In an embodiment of the present invention, the selection of the target time period should fully consider the traffic characteristics of the business server to ensure the accuracy of the monitoring data and the effectiveness of the scheduling strategy.

[0060] Buffer usage also reflects the percentage of cache space occupied by each device interface on the target network device—that is, the ratio of stored data to total available space. This is a key indicator for assessing network device processing capacity and network health. Regular monitoring of buffer usage helps detect traffic surges, such as burst traffic, and triggers subsequent bandwidth scheduling optimization measures. Buffer usage statistics for each device interface provide a more detailed understanding of queue load status, providing a basis for dynamically adjusting bandwidth weights and priorities.

[0061] Step S201 regularly obtains the cache usage of each device interface on the target network device, providing key data support for subsequent traffic pattern identification and intelligent scheduling of bandwidth resources. It not only involves real-time monitoring at the hardware level, but also requires intelligent analysis of software logic, together forming a comprehensive and dynamic network resource management framework.

[0062] Step S202 : Calculate the cache usage rates of N network queues based on the cache usage of the device interface, wherein each device interface corresponds to one network queue.

[0063] In the embodiments of the present invention, a network queue is a data structure used within a network device to store data packets awaiting transmission. These packets are categorized and placed into corresponding queues based on priority, type, or source. On a target network device, each device interface directly corresponds to a specific network queue, which manages all data flows received and transmitted through that interface. The network queue controls the transmission rate of data flows, preventing network congestion caused by excessive transient traffic. It also provides traffic shaping and priority scheduling, ensuring the timely and efficient transmission of critical business data.

[0064] In scenarios where multiple services are deployed in a mixed environment, such as when TCP and RDMA services coexist, network queues must not only handle regular long-term stable flow services, but also cope with sudden burst services. The latter is characterized by the generation of large amounts of data in a short period of time, placing extremely high requirements on network bandwidth and cache.

[0065] It's also important to note that cache utilization is a metric that measures the level of cache occupancy in a network queue. Specifically, it refers to the percentage of stored data in the cache compared to the total cache capacity. This directly reflects the network device's ability to process data flows and the current network load. A high cache utilization rate may indicate network congestion or abnormal traffic flow in a particular service queue, such as a sudden surge in burst traffic. This can trigger the network device to take emergency measures, such as adjusting bandwidth allocation policies, to prevent packet loss or excessive latency, which could impact service quality.

[0066] When calculating the cache utilization of N network queues, the embodiment of the present invention focuses on the queue buffer usage under all device interfaces. By comparing historical data with current utilization, it is possible to identify which queues are under greater pressure and which queues have relatively stable traffic.

[0067] The refined analysis of cache usage provides an important reference for the subsequent formulation of dynamic bandwidth scheduling strategies, ensuring that the needs of bursty services are taken into account while maintaining the smooth operation of long-term stable flow services during resource allocation, reflecting the intelligence and flexibility of the present invention in traffic management and resource scheduling.

[0068] Step S203 : generating a network bandwidth configuration policy for the target network device according to the cache usage rate, wherein the network bandwidth configuration policy includes network bandwidth weights configured for the N device interfaces.

[0069] Specifically, the network bandwidth configuration policy is a set of rules formulated based on the cache utilization of network queues to optimize network performance and resource allocation. The core is to dynamically adjust the bandwidth weights of different queues on network devices to reasonably allocate network resources to various types of services, ensuring that high-priority or special-demand services (such as Burst services) can obtain the necessary bandwidth support during traffic peaks, while maintaining normal services for other low-priority or long-term steady-flow services.

[0070] Network bandwidth weight refers to the relative importance or priority assigned to different network queues during bandwidth allocation and scheduling. In multi-queue scheduling, such as WRR, queues with higher weights receive a larger share of the overall bandwidth allocation, resulting in higher data rates and lower latency. For example, the high-ratio WRR (9:1) mentioned in S102c is a typical bandwidth weight adjustment strategy. Here, a weight setting of 9:1 means that a queue receives a significantly higher bandwidth allocation ratio than other queues, effectively addressing the instantaneous high bandwidth demands of burst services.

[0071] By dynamically adjusting bandwidth weights, the network bandwidth configuration strategy of the embodiments of the present invention can achieve refined management of burst services and long-term stable flow services. This ensures a rapid response to burst services when they occur while maintaining overall network fairness and efficiency. It provides a more intelligent and flexible bandwidth scheduling solution for data center internal networks, and can significantly improve network performance and user experience, especially in complex scenarios where TCP and RDMA services are running together.

[0072] Optionally, in the network bandwidth scheduling method provided in an embodiment of the present invention, a mechanism for finely generating a network bandwidth configuration policy based on a cache usage rate is introduced. The step of generating the network bandwidth configuration policy of the target network device based on the cache usage rate includes: for each of the network queues, determining whether a burst traffic service occurs in the network queue based on the cache usage rate within the target time period; in a case where no burst traffic service occurs in N of the network queues, equally allocating the network bandwidth weights of the N device interfaces to obtain the network bandwidth configuration policy; in a case where there are M of the network queues that experience a burst traffic service, determining the network bandwidth configuration policy based on the number of burst traffic services within the target time period, where M is a positive integer less than or equal to N.

[0073] For each network queue, an embodiment of the present invention first identifies whether there is a burst traffic service (Burst service) based on a trend analysis of the cache usage rate within a target time period. This process aims to detect and respond to Burst services early by setting certain thresholds or using machine learning algorithms to predict traffic patterns, thereby reducing the impact on other queues. If the fluctuation range of the cache usage statistics of a network queue is found to be beyond the normal range, such as an increase exceeding a preset threshold (e.g., 5%) within a short period of time, it is determined that a Burst service has occurred in the queue.

[0074] When analysis shows that no burst traffic is occurring in any network queue, the embodiment automatically applies a weighted round-robin (WRR) policy, setting the bandwidth weights of all device interfaces to be the same, thereby creating a balanced and fair bandwidth resource allocation model within the network device. Enabling the WRR policy ensures that packets in all queues have an equal chance of being scheduled, preventing data in low-priority queues from waiting for long periods or being discarded due to bandwidth being monopolized by high-priority queues.

[0075] However, once burst traffic is detected in M network queues (M≤N), the execution path of the method will shift to another logical branch. At this time, the network bandwidth configuration strategy is dynamically adjusted based on the frequency and intensity of the burst traffic, giving the burst traffic queue a higher bandwidth weight. For example, for non-continuous burst traffic, a high WRR ratio (such as 9:1) and SP (strict priority) scheduling mode can be set to prioritize the burst traffic queues, ensuring that the data packets in these queues can be scheduled in a timely manner, thereby reducing the impact of the burst traffic on network performance.

[0076] Optionally, in the network bandwidth scheduling method provided in an embodiment of the present invention, the step of determining whether a burst traffic service occurs in the network queue based on the cache usage rate within the target time period includes: when the cache usage rate is less than or equal to a first preset threshold, determining that the burst traffic service does not occur in the network queue; or, when the cache usage rate is greater than the first preset threshold, determining that the burst traffic service occurs in the network queue.

[0077] The step of determining whether a burst traffic service (Burst service) occurs in a network queue according to the buffer usage rate within a target time period adopts a threshold comparison strategy, which is specifically as follows.

[0078] Queue status below the first preset threshold: When the cache utilization rate is lower than or equal to the first preset threshold, the system determines that no burst traffic is occurring in the network queue. The first preset threshold is set based on statistical analysis and historical data of cache utilization under normal network operating conditions. A value is typically selected that reflects the health of the network without prematurely triggering scheduling policy adjustments. A cache utilization rate below this threshold indicates that the network device has sufficient cache resources and that traffic in all queues is within a controllable range. There is no need to allocate additional bandwidth resources to specific queues, and the current bandwidth allocation policy can be maintained.

[0079] Queue status above the first preset threshold: If the cache utilization exceeds the first preset threshold, burst traffic is considered present in the network queue. This threshold is set to capture traffic that generates large amounts of data flows within a short period of time, placing a sudden high demand on cache resources. For queues exceeding the threshold, special bandwidth scheduling measures are implemented, such as increasing their bandwidth weight, to prioritize data packets in these queues and avoid excessive delays or loss.

[0080] For example, in a specific embodiment, the first preset threshold can be set to 5%, which means that when the cache utilization rate of a network queue is less than or equal to 5%, it is determined that no burst service occurs in the queue, and the same-ratio WRR strategy can continue to be adopted; once the cache utilization rate exceeds 5%, it is determined to be a burst service, and a high-ratio WRR or SP scheduling mode is immediately adopted to give priority to meeting the transmission needs of these queues.

[0081] Optionally, in the network bandwidth scheduling method provided in an embodiment of the present invention, the step of determining the network bandwidth configuration strategy based on the number of burst traffic services within the target time period includes: when the number of burst traffic services is less than or equal to a second preset threshold, setting the network bandwidth weights of the M device interfaces corresponding to the M network queues where burst traffic services occur to a first weight value; setting the network bandwidth weights of the remaining NM device interfaces to a second weight value, wherein the second weight value is less than the first weight value; and determining the network bandwidth configuration strategy of the target network device based on the network bandwidth weights of all the device interfaces.

[0082] For network queues experiencing burst traffic, network bandwidth weights are further fine-grainedly adjusted to optimize bandwidth resource allocation. Specifically, when the number of burst traffic (M) detected within a target time period is less than or equal to a second preset threshold, embodiments of the present invention implement bandwidth priority adjustment by setting different weight values.

[0083] For M network queues that detect burst services, an embodiment of the present invention sets the network bandwidth weight of their corresponding device interfaces to a first weight value. This value is significantly higher than the default weight, and is intended to give priority to processing data packets in these queues to ensure that burst traffic can be quickly responded to and served.

[0084] For the NM network queues that do not have burst services, the network bandwidth weight of their device interfaces is set to the second weight value, which is lower than the first weight value. This means that these queues will be given a smaller share when bandwidth resources are allocated to free up more bandwidth space for burst service queues.

[0085] This weight adjustment generates a personalized network bandwidth configuration policy tailored to the target network device based on the network bandwidth weights of all device interfaces. This policy takes into account both the real-time demands of burst services and the regular traffic of other queues, ensuring burst service performance without sacrificing the basic quality of service for other services.

[0086] In a specific embodiment, assuming the second preset threshold is set to three burst events, that is, within a given time period (e.g., 5 minutes), if a network queue experiences no more than three burst events, it is considered to be controllable or occasional burst traffic. In this case, the device interface of this queue will be assigned a higher first weight value, while other queues will retain a lower second weight value. Conversely, if burst events occur frequently, exceeding the set threshold, the system may prompt a reassessment of the network architecture or bandwidth capacity to ensure that the network equipment can continuously and stably handle future traffic.

[0087] Optionally, in the network bandwidth scheduling method provided in an embodiment of the present invention, the step of determining the network bandwidth configuration strategy based on the number of burst traffic services within the target time period further includes: when the number of burst traffic services is greater than the second preset threshold, setting the network bandwidth configuration strategy of the target network device to network bandwidth expansion.

[0088] In response to the continuous pressure on network resources caused by frequent burst services, that is, when the number of detected burst services exceeds the second preset threshold, the system will automatically initiate a network bandwidth expansion strategy, aiming to solve the problems of uneven bandwidth resource allocation and network performance degradation from a longer-term perspective.

[0089] Network bandwidth expansion refers to increasing the bandwidth capacity of network equipment within the existing network architecture to accommodate unexpected traffic demands. This is particularly true when the frequency of burst traffic exceeds the preset threshold, indicating that the current network bandwidth may not be able to meet the long-term needs of the service. Capacity expansion can be achieved through the following methods: upgrading network equipment, which involves replacing or upgrading network switches, routers, and other devices to support higher bandwidth rates; adding network links, which involves adding more physical or logical links within the data center to increase overall bandwidth capacity; and optimizing the network architecture, which involves redesigning or optimizing it, such as by introducing more efficient network protocols or adjusting the network topology to improve bandwidth utilization and transmission efficiency.

[0090] Step S204: executing network bandwidth scheduling for the target network device according to the network bandwidth configuration policy.

[0091] When performing network bandwidth scheduling, key operations include but are not limited to: adjusting the parameters of the WRR (weighted round-robin) and SP (strict priority) scheduling algorithms based on the network bandwidth allocation policy to ensure that queues with higher priorities or cache utilization exceeding the threshold receive more bandwidth resources; taking prompt action when burst traffic occurs to increase the bandwidth weight of the affected queues to maintain good service quality even during peak traffic periods; enabling high-ratio WRR and SP scheduling modes for discontinuous burst traffic, prioritizing burst traffic queues, while continuous burst traffic may trigger network equipment upgrade plans to expand bandwidth capacity; and adopting equal-ratio WRR when no burst traffic is detected and cache utilization of all queues is stable, ensuring that traffic in all queues is fairly allocated bandwidth resources and preventing long-term starvation of low-priority queues.

[0092] The network bandwidth scheduling strategy of the embodiment of the present invention is highly adaptable and real-time, and can respond quickly to real-time changes in network traffic. It not only improves the ability of network equipment to handle burst traffic, but also enhances the flexibility of the network when facing diversified business needs, ensuring that all business types can obtain the best network experience in a mixed business environment.

[0093] Optionally, in the network bandwidth scheduling method provided in an embodiment of the present invention, the step of performing network bandwidth scheduling on the target network device according to the network bandwidth configuration policy includes: determining the network queues corresponding to all the device interfaces with the same network bandwidth weight as a scheduling queue group according to the network bandwidth configuration policy; creating a scheduling counter for each of the network queues in the scheduling queue group, and initializing the scheduling counter before scheduling starts; polling the scheduling queue group according to the count value of the scheduling counter to complete the network bandwidth scheduling.

[0094] An embodiment of the present invention also involves a refined scheduling mechanism, that is, based on the network bandwidth configuration strategy, the network queues corresponding to all device interfaces with the same network bandwidth weight are determined as a scheduling queue group, and a scheduling counter is introduced for each queue to achieve fairer and more efficient data packet scheduling.

[0095] First, based on the network bandwidth allocation policy, the network queues of all device interfaces are classified and queues with the same weight value are grouped into the same scheduling queue group.

[0096] A scheduling counter is then created for each network queue in the scheduling queue group. This counter is used to track and control the number of packets sent during round-robin scheduling, ensuring that each queue receives a corresponding share of bandwidth according to its weight. When initializing the counter, the counter value can be set to zero or another preset value, which serves as the basis for scheduling.

[0097] Next, the system performs a round-robin schedule of the scheduling queue group based on the count value of the scheduling counter. Specifically, the scheduling algorithm first checks the current value of the scheduling counter corresponding to each queue in the scheduling queue group. Then, based on the weight distribution rules, it determines the next queue to be scheduled. For example, if the weight ratio is 1:1, the system will schedule each queue in turn until all queues have been evenly visited. Each time a queue is scheduled, the scheduling counter for that queue is incremented after a predetermined number of packets have been sent. This allows the next queue to be scheduled to be determined by comparing the count values of each queue, ensuring that each queue's scheduling opportunity matches its weight.

[0098] Optionally, in the network bandwidth scheduling method provided in an embodiment of the present invention, the step of polling the scheduling queue group according to the count value of the scheduling counter includes: starting the current polling when all the count values are equal; performing traffic forwarding on the queried network queue after each inquiry, and adding a preset increment value to the count value of the network queue after the forwarding is completed to obtain an updated count value; completing the current polling when the count values of all the network queues are updated to the same value.

[0099] The embodiment of the present invention also involves the step of polling the scheduling queue group according to the count value of the scheduling counter, which is a complex algorithm detail aimed at achieving fair allocation and efficient utilization of bandwidth resources.

[0100] Specifically, the condition for starting polling is that the count values are equal. Before polling starts, the scheduling counters of all network queues participating in the scheduling should be initialized to the same preset value, usually zero. When the count values of all network queues become equal again, it means that the previous round of scheduling has been completed. At this time, the system will start a new round of polling and continue to allocate bandwidth resources. In each polling, each network queue is queried in a certain order (usually the order of the queue list). The query is essentially a scheduling check to determine whether the queue has data packets to be sent. When a network queue is queried, if there are data packets to be sent in the queue, traffic forwarding is performed. After forwarding, the scheduling counter of the network queue will be A preset increment is accumulated, which reflects the share of bandwidth resources obtained by the queue in this round of scheduling. The count accumulation operation is the core of achieving bandwidth allocation fairness, ensuring that the proportion of the total bandwidth allocated to each queue is consistent with its weight. As the polling progresses, the scheduling counter of each queried and scheduled network queue will accumulate the corresponding increment. When the count values of all network queues become equal again, it means that each queue in each scheduling round has obtained the bandwidth resources corresponding to its weight, completing the fair allocation of the current round. Once this condition is met, the current bandwidth scheduling polling is completed, and the scheduling counter value may be reinitialized to prepare for the next round of the cycle.

[0101] Through the above steps S201 to S204, the cache usage of N device interfaces on the target network device within the target time period can be first obtained, where N is a positive integer, and then the cache usage rates of N network queues are calculated based on the cache usage of the device interfaces, where each device interface corresponds to one network queue, and then a network bandwidth configuration policy for the target network device is generated based on the cache usage rates, where the network bandwidth configuration policy includes network bandwidth weights configured for the N device interfaces, and finally, network bandwidth scheduling is performed on the target network device based on the network bandwidth configuration policy.

[0102] In an embodiment of the present invention, a dynamic perception of network traffic status is adopted. Through the innovative means of real-time monitoring of the usage of the cache area of each device interface on the target network device, the traffic characteristics of multiple network queues within the target time period are deeply analyzed. Each device interface is accurately mapped to a network queue. Based on the collected cache usage data, not only can the instantaneous pressure points of the network be understood, but also potential traffic bottlenecks can be predicted, thereby generating a highly customized network bandwidth configuration strategy for the target network device. The core of this strategy is to dynamically adjust the network bandwidth weights of multiple device interfaces to ensure that critical queues can obtain higher priority bandwidth resources when facing sudden business bursts. When the network is in a stable state, each queue can enjoy a fairer bandwidth allocation, avoiding idleness and waste of resources, achieving the dual goals of network resource efficiency and business performance optimization, and realizing the technical effect of significantly improving network scheduling flexibility and data transmission efficiency in a mixed business environment, thereby solving the technical problem in related technologies that traditional network bandwidth scheduling technology does not match the flexible and changeable actual traffic, resulting in degraded business performance.

[0103] The present invention is described below in conjunction with another optional embodiment.

[0104] Example 2

[0105] An embodiment of the present invention further provides a network bandwidth scheduling device. It should be noted that the network bandwidth scheduling device of the embodiment of the present invention includes multiple implementation units, which can be used to execute the network bandwidth scheduling method provided in the above-mentioned embodiment 1, and each implementation unit corresponds to each implementation step in the above-mentioned embodiment 1.

[0106] Figure 3 is a schematic diagram of an optional network bandwidth scheduling device according to an embodiment of the present invention, such as Figure 3 As shown, the device may include: an acquisition unit 31, a calculation unit 32, a generation unit 33, and an execution unit 34.

[0107] Among them, the acquisition unit 31 is used to obtain the cache usage of N device interfaces on the target network device within the target time period, where N is a positive integer; the calculation unit 32 is used to calculate the cache usage of N network queues based on the cache usage of the device interfaces, where each of the device interfaces corresponds to one network queue; the generation unit 33 is used to generate a network bandwidth configuration policy for the target network device based on the cache usage, where the network bandwidth configuration policy includes network bandwidth weights configured for the N device interfaces; the execution unit 34 is used to perform network bandwidth scheduling on the target network device according to the network bandwidth configuration policy.

[0108] The above-mentioned network bandwidth scheduling device can first obtain the cache usage of N device interfaces on the target network device within the target time period through the acquisition unit 31, where N is a positive integer, and then calculate the cache usage rates of the N network queues based on the cache usage of the device interfaces through the calculation unit 32, where each of the device interfaces corresponds to one network queue, and then generate the network bandwidth configuration policy of the target network device according to the cache usage rate through the generation unit 33, where the network bandwidth configuration policy includes the network bandwidth weights configured for the N device interfaces, and finally perform network bandwidth scheduling on the target network device according to the network bandwidth configuration policy through the execution unit 34.

[0109] In an embodiment of the present invention, a method of dynamically sensing the network traffic status is adopted. Through the innovative means of real-time monitoring of the usage of the cache area of each device interface on the target network device, the traffic characteristics of multiple network queues within the target time period are deeply analyzed. Each device interface is accurately mapped to a network queue. Based on the collected cache usage data, not only can the instantaneous pressure points of the network be understood, but also potential traffic bottlenecks can be predicted, thereby generating a highly customized network bandwidth configuration strategy for the target network device. The core of this strategy is to dynamically adjust the network bandwidth weights of multiple device interfaces to ensure that critical queues can obtain higher priority bandwidth resources when facing sudden business bursts. When the network is in a stable state, each queue can enjoy a fairer bandwidth allocation, avoiding idleness and waste of resources, achieving the dual goals of network resource efficiency and business performance optimization, and realizing the technical effect of significantly improving network scheduling flexibility and data transmission efficiency in a mixed business environment, thereby solving the technical problem in related technologies that traditional network bandwidth scheduling technology does not match the flexible and changeable actual traffic, resulting in degraded business performance.

[0110] Furthermore, the generation unit includes: a first determination module, used to determine, for each of the network queues, whether burst traffic services occur in the network queue according to the cache usage rate within the target time period; an equal allocation module, used to perform equal allocation on the network bandwidth weights of the N device interfaces to obtain the network bandwidth configuration strategy when none of the N network queues experience burst traffic services; and a second determination module, used to determine the network bandwidth configuration strategy based on the number of burst traffic services within the target time period when M network queues experience burst traffic services, where M is a positive integer less than or equal to N.

[0111] Furthermore, the first determination module includes: a first determination submodule, used to determine that the network queue does not have the burst traffic service when the cache usage rate is less than or equal to a first preset threshold; or, when the cache usage rate is greater than the first preset threshold, determine that the network queue has the burst traffic service.

[0112] Furthermore, the second determination module includes: a first setting submodule, used to set the network bandwidth weights of the M device interfaces corresponding to the M network queues where burst traffic services occur to a first weight value when the number of burst traffic services is less than or equal to a second preset threshold; a second setting submodule, used to set the network bandwidth weights of the remaining NM device interfaces to a second weight value, wherein the second weight value is less than the first weight value; and a second determination submodule, used to determine the network bandwidth configuration policy of the target network device based on the network bandwidth weights of all the device interfaces.

[0113] Furthermore, the second determining module further includes: a third setting submodule, configured to set the network bandwidth configuration policy of the target network device to network bandwidth expansion when the number of burst traffic services is greater than the second preset threshold.

[0114] Furthermore, the execution unit includes: a third determination module, used to determine the network queues corresponding to all the device interfaces with the same network bandwidth weight as a scheduling queue group based on the network bandwidth configuration policy; a creation module, used to create a scheduling counter for each of the network queues in the scheduling queue group, and initialize the scheduling counter before scheduling begins; a polling module, used to poll the scheduling queue group based on the count value of the scheduling counter to complete the network bandwidth scheduling.

[0115] Furthermore, the polling module includes: an activation module, configured to activate the current polling when all the count values are equal; a forwarding module, configured to perform traffic forwarding on the queried network queue after each query, and to add a preset increment value to the count value of the network queue after the forwarding is completed to obtain an updated count value; and a completion module, configured to complete the current polling when the count values of all the network queues are updated to the same value.

[0116] It should be noted that the acquisition unit 31, calculation unit 32, generation unit 33, and execution unit 34 correspond to steps S201 to S204 in the first embodiment. The examples and application scenarios implemented by the above units and corresponding steps are the same, but are not limited to the contents disclosed in the first embodiment. It should be noted that the above modules or units can be hardware components or software components stored in a memory (e.g., memory 104) and processed by one or more processors (e.g., processors 102a, 102b, ..., 102n). The above modules or units can also be part of a device and can be run in the computer terminal 10 provided in the first embodiment.

[0117] The present invention is described below in conjunction with another optional embodiment.

[0118] Example 3

[0119] An embodiment of the present invention may further provide an electronic device, Figure 4 is a structural block diagram of an electronic device for executing a method for scheduling network bandwidth according to an embodiment of the present invention. Figure 4 As shown, the electronic device may include: one or more ( Figure 4 Only one is shown) processor 402, memory 404, storage controller, and peripheral interface, wherein the peripheral interface is connected to the radio frequency module, audio module and display.

[0120] Among them, the memory can be used to store software programs and modules, such as the program instructions / modules corresponding to the method and device for scheduling network bandwidth in the embodiment of the present application. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, that is, realizing the above-mentioned method for scheduling network bandwidth. The memory may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include a memory remotely arranged relative to the processor, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.

[0121] The processor can call the information and application stored in the memory through the transmission device to perform the following steps: obtain the cache usage of N device interfaces on the target network device within a target time period, where N is a positive integer; calculate the cache usage rate of N network queues based on the cache usage of the device interfaces, where each device interface corresponds to one network queue; generate a network bandwidth configuration policy for the target network device according to the cache usage rate, where the network bandwidth configuration policy includes network bandwidth weights configured for the N device interfaces; and perform network bandwidth scheduling on the target network device according to the network bandwidth configuration policy.

[0122] The processor can also call the information and application stored in the memory through the transmission device to perform the following steps: for each of the network queues, determine whether the network queue has burst traffic services based on the cache usage rate within the target time period; if no burst traffic services occur in N of the network queues, equally allocate the network bandwidth weights of the N device interfaces to obtain the network bandwidth configuration strategy; if there are M of the network queues that have burst traffic services, determine the network bandwidth configuration strategy based on the number of burst traffic services within the target time period, where M is a positive integer less than or equal to N.

[0123] The processor can also call the information and application stored in the memory through the transmission device to perform the following steps: when the cache usage rate is less than or equal to the first preset threshold, determine that the burst traffic service does not appear in the network queue; or, when the cache usage rate is greater than the first preset threshold, determine that the burst traffic service appears in the network queue.

[0124] The processor can also call the information and application stored in the memory through the transmission device to perform the following steps: when the number of burst traffic services is less than or equal to a second preset threshold, the network bandwidth weights of the M device interfaces corresponding to the M network queues where burst traffic services occur are set to a first weight value; the network bandwidth weights of the remaining NM device interfaces are set to a second weight value, wherein the second weight value is less than the first weight value; and the network bandwidth configuration strategy of the target network device is determined based on the network bandwidth weights of all the device interfaces.

[0125] The processor can also call the information and application stored in the memory through the transmission device to perform the following steps: when the number of burst traffic services is greater than the second preset threshold, set the network bandwidth configuration policy of the target network device to network bandwidth expansion.

[0126] The processor can also call the information and application stored in the memory through the transmission device to perform the following steps: according to the network bandwidth configuration policy, the network queues corresponding to all the device interfaces with the same network bandwidth weight are determined as a scheduling queue group; a scheduling counter is created for each of the network queues in the scheduling queue group, and the scheduling counter is initialized before scheduling begins; the scheduling queue group is polled according to the count value of the scheduling counter to complete the network bandwidth scheduling.

[0127] The processor can also call the information and application stored in the memory through the transmission device to perform the following steps: when all the count values are equal, start the current polling; after each query, perform traffic forwarding on the queried network queue, and after the forwarding is completed, add the preset increment value to the count value of the network queue to obtain an updated count value; when the count values of all the network queues are updated to the same value, complete the current polling.

[0128] An embodiment of the present invention provides a network bandwidth scheduling scheme. By dynamically sensing network traffic status and innovatively monitoring the usage of the cache area of each device interface on the target network device in real time, the scheme deeply analyzes the traffic characteristics of multiple network queues within the target time period. Each device interface is precisely mapped to a network queue. Based on the collected cache usage data, not only can the instantaneous pressure points of the network be understood, but potential traffic bottlenecks can also be predicted. A highly customized network bandwidth configuration strategy for the target network device is thus generated. The core of this strategy is to dynamically adjust the network bandwidth weights of multiple device interfaces to ensure that critical queues can obtain higher-priority bandwidth resources when facing bursty services. When the network is in a stable state, each queue can enjoy a fairer bandwidth allocation, avoiding idle and wasted resources. This achieves the dual goals of efficient network resources and optimized service performance, and realizes the technical effect of significantly improving network scheduling flexibility and data transmission efficiency in a mixed service environment. This solves the technical problem in related technologies that traditional network bandwidth scheduling technologies do not match the flexible and changeable actual traffic, resulting in degraded service performance.

[0129] It can be understood by those skilled in the art that Figure 4 The structure shown is for illustration only, and the electronic device may also be a terminal device such as a smart phone, a tablet computer, a PDA, a mobile Internet device (MID), or a PAD. Figure 4 It does not limit the structure of the above electronic device. For example, the electronic device may also include Figure 4 More or fewer components (such as network interfaces, display devices, etc.) shown in, or with Figure 4 Different configurations shown.

[0130] A person skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a program, and the program can be stored in a computer-readable storage medium, which may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0131] The present invention is described below in conjunction with another optional embodiment.

[0132] Example 4

[0133] The embodiment of the present invention further provides a computer-readable storage medium. Optionally, in the embodiment of the present invention, the computer-readable storage medium can be used to store the program code executed by the network bandwidth scheduling method provided in the first embodiment.

[0134] Optionally, in an embodiment of the present invention, the above-mentioned storage medium may be located in any computer terminal in a computer terminal group in a computer network, or in any mobile terminal in a mobile terminal group.

[0135] An embodiment of the present invention also provides a computer program product, which, when executed on a data processing device, is suitable for executing the steps of a network bandwidth scheduling method: obtaining the cache usage of N device interfaces on a target network device within a target time period, wherein N is a positive integer; calculating the cache usage rates of N network queues based on the cache usage of the device interfaces, wherein each of the device interfaces corresponds to one network queue; generating a network bandwidth configuration policy for the target network device based on the cache usage rates, wherein the network bandwidth configuration policy includes network bandwidth weights configured for the N device interfaces; and performing network bandwidth scheduling on the target network device according to the network bandwidth configuration policy.

[0136] The serial numbers of the above embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0137] In the above embodiments of the present application, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.

[0138] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0139] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0140] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0141] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, a server or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.

[0142] The above is only a preferred embodiment of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A method for scheduling network bandwidth, characterized in that: include: Obtain the cache usage of N device interfaces on the target network device within a target time period, where N is a positive integer. Calculating cache usage rates of N network queues based on cache usage of the device interface, wherein each device interface corresponds to one network queue; Generating a network bandwidth configuration policy for the target network device according to the cache usage rate, wherein the network bandwidth configuration policy includes network bandwidth weights configured for the N device interfaces; Perform network bandwidth scheduling on the target network device according to the network bandwidth configuration policy.

2. The scheduling method according to claim 1, characterized in that: The step of generating a network bandwidth configuration policy for the target network device according to the cache usage rate includes: For each of the network queues, determining whether a burst traffic service occurs in the network queue according to the buffer usage rate within the target time period; When no burst traffic occurs in any of the N network queues, the network bandwidth weights of the N device interfaces are equally allocated to obtain the network bandwidth configuration strategy; When there are M network queues with burst traffic services, the network bandwidth configuration strategy is determined based on the number of burst traffic services within the target time period, where M is a positive integer less than or equal to N.

3. The scheduling method according to claim 2, characterized in that: The step of determining whether a burst traffic service occurs in the network queue according to the buffer usage rate within the target time period includes: When the cache usage rate is less than or equal to a first preset threshold, determining that the network queue does not have the burst traffic service; or When the buffer usage rate is greater than the first preset threshold, it is determined that the burst traffic service occurs in the network queue.

4. The scheduling method according to claim 2, characterized in that: The step of determining the network bandwidth configuration strategy based on the number of burst traffic services within the target time period includes: When the number of burst traffic services is less than or equal to a second preset threshold, setting the network bandwidth weights of the M device interfaces corresponding to the M network queues where burst traffic services occur to a first weight value; Setting the network bandwidth weights of the remaining NM device interfaces to a second weight value, wherein the second weight value is less than the first weight value; A network bandwidth configuration policy for the target network device is determined based on the network bandwidth weights of all the device interfaces.

5. The scheduling method according to claim 4, characterized in that: The step of determining the network bandwidth configuration strategy based on the number of burst traffic services within the target time period also includes: When the number of burst traffic services is greater than the second preset threshold, the network bandwidth configuration policy of the target network device is set to network bandwidth expansion.

6. The scheduling method according to claim 1, characterized in that: The step of performing network bandwidth scheduling on the target network device according to the network bandwidth configuration policy includes: According to the network bandwidth configuration policy, the network queues corresponding to all the device interfaces with the same network bandwidth weight are determined as a scheduling queue group; Creating a scheduling counter for each of the network queues in the scheduling queue group, and initializing the scheduling counter before scheduling begins; The scheduling queue group is polled according to the count value of the scheduling counter to complete the network bandwidth scheduling.

7. The scheduling method according to claim 6, characterized in that: The step of polling the scheduling queue group according to the count value of the scheduling counter includes: When all the count values are equal, start the current polling; After each query, traffic is forwarded for the queried network queue, and after the forwarding is completed, the count value of the network queue is incremented by a preset increment value to obtain an updated count value; When the count values of all the network queues are updated to the same value, the current polling is completed.

8. A network bandwidth scheduling device, characterized in that: include: an acquiring unit, configured to acquire cache usage of N device interfaces on a target network device within a target time period, where N is a positive integer; a calculation unit, configured to calculate cache usage rates of N network queues based on cache usage of the device interface, wherein each device interface corresponds to one network queue; a generating unit, configured to generate a network bandwidth configuration policy for the target network device according to the cache usage rate, wherein the network bandwidth configuration policy includes network bandwidth weights configured for the N device interfaces; An execution unit is configured to execute network bandwidth scheduling for the target network device according to the network bandwidth configuration policy.

9. A computer-readable storage medium, characterized in that The computer-readable storage medium includes a stored computer program, wherein when the computer program is executed, the device where the computer-readable storage medium is located is controlled to execute the network bandwidth scheduling method according to any one of claims 1 to 7.

10. An electronic device, characterized in that: The method comprises one or more processors and a memory, wherein the memory is used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the network bandwidth scheduling method described in any one of claims 1 to 7.

Citation Information

Cited By

  • Resource adjustment method, electronic device, storage medium and program product

    CN120711017A