A data scheduling method, system and switch device

By initializing queue configuration information in the switch and dynamically adjusting the deficit counter and queue status, the coordinated scheduling of dynamic weight allocation and precise deficit management in the switch is realized. This solves the problem of unfair resource allocation in traditional switches under burst traffic and improves bandwidth utilization and service quality.

CN121334077BActive Publication Date: 2026-06-30SHENZHENTIANYUANJINHEJISHUYOUXIANGONGSI

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHENZHENTIANYUANJINHEJISHUYOUXIANGONGSI
Filing Date
2025-09-29
Publication Date
2026-06-30

AI Technical Summary

Technical Problem

In scenarios with sudden traffic surges, the traditional deficit round-robin algorithm leads to a large amount of high-priority queue resources being occupied, while low-priority queue data packets are backed up, resulting in unfair service quality. Existing mechanisms are unable to guarantee bandwidth for queues of different service levels, especially leading to increased latency jitter and packet loss rates for real-time services.

Method used

By initializing the queue configuration information of the data center switch, extracting the relative bandwidth ratio and the maximum transmission unit to determine the relative quantum characteristics, dynamically resetting the deficit counter, updating the queue status, and generating a scheduling polling queue, a coordinated scheduling of dynamic weight allocation and precise deficit management is achieved.

Benefits of technology

It improves the bandwidth utilization of the switch, ensures the accurate execution of weight allocation and real-time monitoring of queue status, optimizes the handling of burst traffic, and guarantees the fairness and efficiency of scheduling.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121334077B_ABST
    Figure CN121334077B_ABST
Patent Text Reader

Abstract

This application provides a data scheduling method, system, and switching device. The method initializes queue configuration information for data scheduling in a data center switch; extracts the relative bandwidth ratio of each data queue from the queue configuration information, and determines the relative quantum characteristics of each data queue based on these ratios; resets the deficit counters of the data queues based on their relative quantum characteristics, determines the amount of data that can be sent by each data queue using the reset deficit counters and the current data packet length, and then updates the queue status of each data queue; and generates the next round of scheduling polling queues in the data center switch based on all queue statuses, performing deficit polling scheduling on the data queues in the data center switch using these polling queues. Based on this scheme, coordinated scheduling of dynamic weight allocation and precise deficit management in the switch can be achieved, thereby improving the bandwidth utilization of the switch.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of switch scheduling technology, and more specifically, to a data scheduling method, system, and switch device. Background Technology

[0002] A switch is a network device used to connect multiple network nodes, such as computers and printers. It identifies devices by MAC addresses and accurately forwards data packets to the target device, improving network efficiency. Compared with hubs, switches support simultaneous communication between multiple pairs of devices, reducing data conflicts.

[0003] In scenarios with sudden traffic surges, traditional deficit round-robin algorithms in switches exhibit scheduling unfairness. When high-priority queues experience continuous traffic bursts, their deficit counters frequently trigger quota reset mechanisms, leading to excessive consumption of scheduling resources. Meanwhile, low-priority queues, unable to obtain sufficient scheduling opportunities in a timely manner, experience a continuous backlog of data packets, resulting in a starvation phenomenon. This imbalance in resource allocation severely undermines the fundamental fairness principle of service quality. Furthermore, existing deficit round-robin mechanisms lack effective weight protection mechanisms, making it difficult to guarantee that queues of different service levels receive corresponding bandwidth guarantees according to pre-configured service level agreements in dynamic traffic environments. This deficiency is particularly problematic for real-time services requiring stable bandwidth guarantees, leading to increased latency jitter, higher packet loss rates, and other service quality degradation issues. Therefore, achieving coordinated scheduling of dynamic weight allocation and precise deficit management in switches to improve bandwidth utilization has become a challenge for the industry. Summary of the Invention

[0004] This application provides a data scheduling method, system, and switch device, which can realize the coordinated scheduling of dynamic weight allocation and precise deficit management in the switch, thereby improving the bandwidth utilization of the switch.

[0005] Firstly, this application provides a data scheduling method, including:

[0006] Initialize the queue configuration information for data scheduling in the data center switch;

[0007] The relative bandwidth ratio of each data queue in the data center switch is extracted from the queue configuration information, and the relative quantum characteristics of each data queue are determined by the relative bandwidth ratio and the maximum transmission unit of the data center switch.

[0008] In the current round of data queue scheduling, when the deficit value of the deficit counter in the data queue is lower than the preset schedulable threshold, the deficit counter of the data queue is reset based on the relative quantum characteristics of the data queue. The amount of data that the data queue can send is determined by the deficit counter after the quota reset and the current data packet length of the data queue, and then the queue status of each data queue is updated.

[0009] Based on the status of all queues, a scheduling polling queue for the next round is generated in the data center switch, and the data queues in the data center switch are scheduled using the scheduling polling queue.

[0010] In some embodiments, extracting the relative bandwidth ratio of each data queue in the data center switch from the queue configuration information specifically includes:

[0011] Obtain the weight values ​​of each data queue in the data center switch from the queue configuration information;

[0012] The relative bandwidth ratio of each data queue in the data center switch is determined by all weight values.

[0013] In some embodiments, determining the relative quantum characteristics of each data queue by using relative bandwidth ratios and the maximum transmission unit of the data center switch specifically includes:

[0014] Obtain the maximum transmission unit of the data center switch and preset the scaling factor for data scheduling;

[0015] The baseline value for the data center switch is determined based on the maximum transmission unit and the scaling factor;

[0016] The relative quantum characteristics of each data queue are determined by the relative bandwidth ratios and the benchmark value.

[0017] In some embodiments, resetting the deficit counter of a data queue based on the relative quantum characteristics of the data queue specifically includes:

[0018] Obtain the current deficit value and relative quantum characteristics of the data queue;

[0019] The current deficit value and the relative quantum characteristics are used to determine the amount reset value of the deficit counter in the data queue.

[0020] In some embodiments, determining the amount of data that can be sent in the data queue by using the deficit counter of the quota reset and the current data packet length of the data queue specifically includes:

[0021] Get the current data packet length of the data queue and the reset value of the deficit counter for the quota reset;

[0022] The amount of data that can be sent in the data queue is determined by the current data packet length and the quota reset value.

[0023] In some embodiments, generating the next round of scheduling polling queues in the data center switch based on all queue states specifically includes:

[0024] Multiple schedulable queues are selected from all queue states, and then the polling priority score of each schedulable queue is determined.

[0025] The next round of scheduling polling queues in the data center switch is selected from all schedulable queues based on all polling priority scores.

[0026] Secondly, this application provides a data scheduling system, including a scheduling unit, the scheduling unit comprising:

[0027] The initialization module is used to initialize the queue configuration information for data scheduling in the data center switch;

[0028] The processing module is used to extract the relative bandwidth ratio of each data queue in the data center switch from the queue configuration information, and determine the relative quantum characteristics of each data queue by using the relative bandwidth ratio and the maximum transmission unit of the data center switch.

[0029] The processing module is also used to, in the data scheduling of the data queue in the current round, when the deficit value of the deficit counter in the data queue is lower than the preset schedulable threshold, reset the amount of the deficit counter of the data queue based on the relative quantum characteristics of the data queue, determine the amount of data that the data queue can send by the deficit counter reset by the amount of the deficit counter and the current data packet length of the data queue, and then update the queue status of each data queue.

[0030] The execution module is used to generate the next round of scheduling polling queue in the data center switch based on all queue states, and to perform deficit polling scheduling on the data queues in the data center switch through the scheduling polling queue.

[0031] Thirdly, this application provides a switching device, which includes a data scheduling system.

[0032] Fourthly, this application provides a computer device, the computer device including a memory and a processor, the memory for storing a computer program, and the processor for calling and running the computer program from the memory, so that the computer device performs the above-described data scheduling method.

[0033] Fifthly, this application provides a computer-readable storage medium storing instructions or code that, when executed on a computer, cause the computer to implement the aforementioned data scheduling method.

[0034] The technical solutions provided by the embodiments disclosed in this application have the following beneficial effects:

[0035] This application provides a data scheduling method, system, and switching device. The method involves initializing queue configuration information for data scheduling in a data center switch; extracting the relative bandwidth ratio of each data queue in the data center switch from the queue configuration information; determining the relative quantum characteristics of each data queue using the relative bandwidth ratio and the maximum transmission unit of the data center switch; in the current round of data queue scheduling, when the deficit value of the deficit counter in the data queue is lower than a preset schedulable threshold, resetting the deficit counter based on the relative quantum characteristics of the data queue; determining the amount of data that the data queue can send using the reset deficit counter and the current data packet length of the data queue; and updating the queue status of each data queue; generating the next round of scheduling polling queues in the data center switch based on all queue statuses; and performing deficit polling scheduling on the data queues in the data center switch using the scheduling polling queues.

[0036] Therefore, in this application, the next round of scheduling polling queues in the data center switch is generated based on all queue states. The data queues in the data center switch are then scheduled using these polling queues in a deficit polling manner. First, by determining the relative quantum characteristics, the standardized scheduling quota for each queue based on its weight and maximum transmission unit (MTU) can be obtained, thus establishing a quantitative basis for dynamic weight allocation. Through the introduction of the MTU, the quantum characteristics automatically adapt to the packet size characteristics of different network environments, ensuring that weight allocation is accurately executed in actual scheduling. The pre-computation characteristics of the quantum values ​​eliminate the need for real-time weight adjustment, ensuring scheduling efficiency and enabling flexible configuration of weight strategies. This effectively solves the problem of weight allocation being disconnected from actual resources in traditional scheduling algorithms, providing an accurate benchmark for subsequent deficit management. Then, the queues are determined... The status of each queue provides comprehensive status data, including real-time deficit values ​​and load rates, thus providing dynamic decision-making support for precise deficit management. The status update process continuously tracks the quota usage and data backlog of each queue, reflecting the actual needs of the queues through quantitative indicators. This queue status is used for deficit reset decisions in the current round and as input for priority calculation in the next round, forming a closed-loop feedback. Monitoring the status of queues that have not been scheduled for multiple consecutive rounds can trigger a protection mechanism to prevent starvation. Fine-grained status management enables the system to perceive traffic changes in real time and dynamically adjust scheduling strategies, optimizing burst traffic handling while ensuring weight allocation, ultimately achieving efficient utilization of bandwidth resources. In summary, based on the above scheme, coordinated scheduling of dynamic weight allocation and precise deficit management in switches can be achieved, thereby improving the bandwidth utilization of switches. Attached Figure Description

[0037] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0038] Figure 1 This is an exemplary flowchart of a data scheduling method according to some embodiments of this application;

[0039] Figure 2 This is a schematic diagram of the process for determining the scheduling polling queue according to some embodiments of this application;

[0040] Figure 3 This is a schematic diagram of the structure of a scheduling unit according to some embodiments of this application;

[0041] Figure 4This is a schematic diagram of the structure of a computer device implementing a data scheduling method according to some embodiments of this application. Detailed Implementation

[0042] To better understand the technical solution of this application, the technical solution of this application will be described in detail below with reference to the accompanying drawings and specific embodiments.

[0043] refer to Figure 1 The figure is an exemplary flowchart of a data scheduling method according to some embodiments of this application. The data scheduling method mainly includes the following steps:

[0044] In step 101, the queue configuration information for data scheduling in the data center switch is initialized.

[0045] It should be noted that, in this application, a data center switch is a network device used to forward data traffic within or across data centers; queue configuration information refers to the set of initial parameters in the switch used to manage different data queues, including the number of queues, weight values, and priorities.

[0046] In practice, the weight parameters of each data queue are read from the Quality of Service (QoS) policy configuration module of the data center switch, and the set of all weight parameters is used as the queue configuration information for data scheduling in the data center switch.

[0047] In step 102, the relative bandwidth ratio of each data queue in the data center switch is extracted from the queue configuration information, and the relative quantum characteristics of each data queue are determined by the relative bandwidth ratio and the maximum transmission unit of the data center switch.

[0048] In some embodiments, extracting the relative bandwidth ratio of each data queue in the data center switch from the queue configuration information can be achieved using the following steps:

[0049] Obtain the weight values ​​of each data queue in the data center switch from the queue configuration information;

[0050] The relative bandwidth ratio of each data queue in the data center switch is determined by all weight values.

[0051] It should be noted that in this application, the relative bandwidth ratio is the bandwidth allocation ratio that determines the share of each data queue in the total bandwidth, ensuring that services of different priorities can obtain corresponding transmission resources according to the preset ratio; the weight value represents the priority value of the relative importance of each data queue in bandwidth allocation. The larger the weight value, the more bandwidth resources the data queue can obtain during scheduling.

[0052] In practice, firstly, the weight parameters of each data queue in the data center switch are obtained from the queue configuration information as the weight values ​​of the corresponding data queues, thus obtaining the weight values ​​of each data queue in the data center switch; then, for each data queue in the data center switch, the ratio of the weight value of the data queue to all weight values ​​is used as the relative bandwidth ratio of the data queue, thus obtaining the relative bandwidth ratio of each data queue in the data center switch in the above manner.

[0053] In some embodiments, determining the relative quantum characteristics of each data queue by means of each relative bandwidth ratio and the maximum transmission unit of the data center switch can be achieved by the following steps:

[0054] Obtain the maximum transmission unit of the data center switch and preset the scaling factor for data scheduling;

[0055] The baseline value for the data center switch is determined based on the maximum transmission unit and the scaling factor;

[0056] The relative quantum characteristics of each data queue are determined by the relative bandwidth ratios and the benchmark value.

[0057] It should be noted that, in this application, the relative quantum feature is the maximum amount of data that each data queue can acquire in a single scheduling poll; the maximum transmission unit refers to the maximum data packet length allowed by the switch in a single data transmission; the scaling factor is a configurable parameter used to adjust the scheduling granularity; and the baseline value is the basic scheduling unit for quantum feature calculation in the switch.

[0058] In practice, firstly, the maximum transmission unit (MTB) parameter is read from the switch's port configuration database. This value is usually automatically determined based on the link type or manually configured by the administrator. Then, the system's preset scaling factor parameter is called. This parameter is stored in the switch's quality of service (QoS) configuration module and can be adjusted according to different business scenarios. Next, the result of multiplying the MTB by the scaling factor is used as the baseline value for the data center switch. Finally, for each data queue, the product of the relative bandwidth ratio of the data queue and the baseline value is used as the relative quantum characteristic of the data queue. The relative quantum characteristics of each data queue can be obtained in the above way.

[0059] In step 103, during the data scheduling of the data queue in the current round, when the deficit value of the deficit counter in the data queue is lower than the preset schedulable threshold, the deficit counter of the data queue is reset based on the relative quantum characteristics of the data queue. The amount of data that the data queue can send is determined by the deficit counter with the reset limit and the current data packet length of the data queue, and then the queue status of each data queue is updated.

[0060] In some embodiments, resetting the deficit counter of a data queue based on the relative quantum characteristics of the data queue can be achieved using the following steps:

[0061] Obtain the current deficit value and relative quantum characteristics of the data queue;

[0062] The current deficit value and the relative quantum characteristics are used to determine the amount reset value of the deficit counter in the data queue.

[0063] It should be noted that in this application, the quota reset value is a new scheduling quota used to update the deficit counter in the queue. When the scheduling quota of the data queue is insufficient, the scheduling capacity of the data queue is restored by increasing the reset value, ensuring that the queue can obtain the necessary data transmission opportunities in the next scheduling cycle. The current deficit value refers to the remaining available scheduling quota of the data queue during the scheduling process. This current deficit value is used to indicate how much data the queue can still transmit in the current scheduling cycle. When the deficit value is positive, it means that the queue still has available quota. When it is negative, it means that the quota has been overdrawn and new scheduling quota needs to be added to continue transmitting data.

[0064] In practice, firstly, the current deficit value of the data queue is read from the scheduling status register of the chip in the switch. The current deficit value is automatically updated by the hardware scheduler after each data packet transmission. The relative quantum characteristics of the data queue are then obtained. Then, when the deficit value of the data queue is detected to be lower than a preset threshold, the scheduling control module adds the relative quantum characteristic value of the queue to the current deficit value and uses the result as the quota reset value of the deficit counter in the data queue. The quota reset value is written to the deficit counter register of the corresponding queue to complete the quota replenishment operation and restore the scheduling capability of the queue. The entire process is controlled by the scheduling management unit of the switch to ensure the timeliness and accuracy of quota reset.

[0065] In some embodiments, determining the amount of data that can be sent in the data queue by using the deficit counter of the quota reset and the current packet length of the data queue can be achieved by the following steps:

[0066] Get the current data packet length of the data queue and the reset value of the deficit counter for the quota reset;

[0067] The amount of data that can be sent in the data queue is determined by the current data packet length and the quota reset value.

[0068] It should be noted that, in this application, the amount of data that can be sent is used to precisely control the amount of data output in each scheduling. This amount of data that can be sent ensures that the queue does not overuse bandwidth resources, while making full use of the allocated scheduling quota; the current data packet length refers to the actual number of bytes of the data packet to be sent at the head of the data queue, and the current data packet length determines the quota value that needs to be consumed in this scheduling.

[0069] In practice, firstly, the length information of the data packet to be sent is extracted from the head of the data queue as the current data packet length. This operation is recorded by the packet processing engine of the chip in the switch when the data is enqueued. Then, the quota reset value of the deficit counter in the data queue is obtained. Next, the current data packet length is compared with the quota reset value. If the current data packet length is less than or equal to the quota reset value, it is determined that the data packet can be sent completely, that is, the allowed amount of data to be sent is the current data packet length. If the current data packet length exceeds the quota reset value, only the data allowed by the quota can be sent, that is, the allowed amount of data to be sent is the quota reset value. The amount of data that can be sent in the data queue can be obtained in the above way.

[0070] In some embodiments, updating the queue status of each data queue can be achieved using the following steps:

[0071] After the data scheduling of the current round of data queues is completed, the current load rate of each data queue is determined by the amount of data that can be sent and the maximum amount of data that can be sent.

[0072] Retrieve the historical queue status of the data queue;

[0073] The historical queue status is updated by the current load rate to obtain the queue status of the data queue, and then the queue status of each data queue is obtained.

[0074] It should be noted that in this application, queue status is a state characteristic describing the load level in each data queue; current load rate is a quantitative value reflecting the instantaneous resource occupancy in each data queue, and current load rate can be used to dynamically evaluate the real-time load status of the queue; historical queue status records the load change trend and resource usage of the data queue in the past several scheduling cycles.

[0075] In specific implementation, firstly, after the data scheduling of the current round of data queues is completed, for each data queue, the ratio of the data queue's transmittable data volume to its maximum data volume is calculated as the current load rate of the data queue. Then, the set of historical state records for the most recent specified period (default is the most recent 10 periods) of the queue is read from the switch's state storage area as the historical queue state of the data queue. This historical queue state includes the load rate and the number of scheduling attempts. Finally, a weighted average algorithm is used to merge the current load rate with the load rate in the historical queue state with a higher weight (this weight can be preset through historical experience) to generate an updated queue state. The new state data is written to the queue state table, while the oldest historical record is discarded to maintain the timeliness of the state data. The entire process is executed by the switch's state management unit to ensure the timeliness and accuracy of state updates. The queue state of each data queue can be obtained through the above method.

[0076] In step 104, a scheduling polling queue for the next round is generated in the data center switch based on all queue states, and the data queues in the data center switch are scheduled using the scheduling polling queue.

[0077] In some embodiments, the next round of scheduling polling queues in the data center switch is generated based on all queue states, referencing... Figure 2 The diagram is a flowchart illustrating the process of determining the scheduling polling queue in some embodiments of this application. In this embodiment, determining the scheduling polling queue can be achieved through the following steps:

[0078] In step 1041, multiple schedulable queues are selected from all queue states, and then the polling priority score of each schedulable queue is determined.

[0079] In step 1042, the next round of scheduling polling queues in the data center switch is selected from all schedulable queues based on all polling priority scores.

[0080] It should be noted that in this application, the scheduling polling queue is the final scheduling sequence ordered according to priority, explicitly defining the processing order of each queue in the next round of scheduling. This ordered queue ensures that bandwidth resources are allocated according to a predetermined strategy, while taking into account both scheduling fairness and business priority requirements; the schedulable queue refers to the active data queues that currently meet the basic scheduling conditions, and these queues have data to be sent and sufficient scheduling quota. By filtering the schedulable queues, idle or insufficient quota queues can be excluded, improving the scheduler's efficiency and ensuring that each scheduling operation can handle the queues that truly need service; the polling priority score is a scheduling score assigned to each schedulable queue, which determines the processing order of each queue in the scheduling poll, with queues with higher polling priority scores receiving service faster.

[0081] In practice, firstly, the queue status flags of all data queues are checked, and candidate queues that simultaneously meet the conditions of being non-empty and having sufficient quota are selected as schedulable queues, resulting in multiple schedulable queues. Non-empty queues are data queues with a load rate higher than 90%, and queues with sufficient quota are data queues with a load rate lower than a specified threshold (default 20%). A preset load baseline value is obtained. For each schedulable queue, the ratio of the current load rate of the schedulable queue in its queue status to the load baseline value is used as the polling priority score of the schedulable queue. The polling priority score of each schedulable queue is obtained in the above manner. Finally, a quicksort algorithm is used to sort all candidate queues in descending order of polling priority score, generating the final scheduling sequence as the next round of polling queues in the data center switch. This polling queue is written into the scheduler's polling pointer register to guide the specific execution order of the next round of scheduling.

[0082] In some embodiments, deficit round-robin scheduling of data queues in a data center switch can be implemented by using the scheduling round-robin queue as the specific execution order of the next round of scheduling in the data center switch, thereby completing the deficit round-robin scheduling of the data center switch.

[0083] Furthermore, in another aspect of this application, in some embodiments, this application provides a data scheduling system, which includes a scheduling unit, with reference to... Figure 3 The figure is a schematic diagram of the structure of a scheduling unit according to some embodiments of this application. The scheduling unit includes: an initialization module 201, a processing module 202, and an execution module 203, which are described below:

[0084] Initialization module 201, in this application, is mainly used to initialize the queue configuration information for data scheduling in the data center switch;

[0085] Processing module 202, in this application, is used to extract the relative bandwidth ratio of each data queue in the data center switch from the queue configuration information, and determine the relative quantum characteristics of each data queue through each relative bandwidth ratio and the maximum transmission unit of the data center switch;

[0086] It should be noted that the processing module 202 is also used in the data scheduling of the data queue in the current round. When the deficit value of the deficit counter in the data queue is lower than the preset schedulable threshold, the deficit counter of the data queue is reset based on the relative quantum characteristics of the data queue. The amount of data that can be sent by the data queue is determined by the deficit counter reset and the current data packet length of the data queue, and then the queue status of each data queue is updated.

[0087] The execution module 203 in this application is mainly used to generate the next round of scheduling polling queue in the data center switch based on all queue states, and to perform deficit polling scheduling on the data queues in the data center switch through the scheduling polling queue.

[0088] The foregoing has detailed examples of the data scheduling method, system, and switching device provided in the embodiments of this application. It is understood that the corresponding apparatus, in order to achieve the above functions, includes hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should readily recognize that, based on the units and algorithm steps of the examples described in conjunction with the embodiments disclosed herein, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0089] In some embodiments, this application also provides a switching device, which includes a data scheduling system.

[0090] In some embodiments, this application also provides a computer device, the computer device including a memory and a processor, the memory for storing a computer program, and the processor for calling and running the computer program from the memory, so that the computer device performs the data scheduling method described above.

[0091] In some embodiments, reference Figure 4 The dashed lines in the figure indicate that the unit or module is optional. This figure is a schematic diagram of the structure of a computer device implementing a data scheduling method according to an embodiment of this application. The data scheduling method described in the above embodiments can... Figure 4 The computer device shown is used to implement this, and the computer device includes at least one processor 301, a memory 302 and at least one communication unit 305. The computer device may be a terminal device, a server or a chip.

[0092] Processor 301 can be a general-purpose processor or a special-purpose processor. For example, processor 301 can be a central processing unit (CPU), which can be used to control computer devices, execute software programs, and process data from software programs. The computer device may also include a communication unit 305 for inputting (receiving) and outputting (transmitting) signals.

[0093] For example, the computer device may be a chip, and the communication unit 305 may be the input and / or output circuit of the chip, or the communication unit 305 may be the communication interface of the chip, which may be a component of a terminal device, network device or other device.

[0094] For example, the computer device may be a terminal device or a server, and the communication unit 305 may be a transceiver of the terminal device or the server, or the communication unit 305 may be a transceiver circuit of the terminal device or the server.

[0095] The computer device may include one or more memories 302 storing a program 304. The program 304 can be executed by a processor 301 to generate instructions 303, causing the processor 301 to execute the method described in the above method embodiments according to the instructions 303. Optionally, the memory 302 may also store data (such as a target audit model). Optionally, the processor 301 may also read data stored in the memory 302, which may be stored at the same storage address as the program 304, or it may be stored at a different storage address than the program 304.

[0096] The processor 301 and memory 302 can be configured separately or integrated together, for example, integrated on the system on chip (SOC) of the terminal device.

[0097] It should be understood that each step of the above method embodiment can be completed by hardware logic circuits or software instructions in the processor 301. The processor 301 can be a CPU, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, such as discrete gates, transistor logic devices, or discrete hardware components.

[0098] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0099] For example, in some embodiments, this application also provides a computer-readable storage medium storing instructions or code that, when executed on a computer, cause the computer to implement the data scheduling method described above.

[0100] Although preferred embodiments of this application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of this application.

[0101] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.

Claims

1. A data scheduling method for use in switching devices for data scheduling, characterized in that, Includes the following steps: Initialize the queue configuration information for data scheduling in the data center switch; The relative bandwidth ratio of each data queue in the data center switch is extracted from the queue configuration information, and the relative quantum characteristics of each data queue are determined by the relative bandwidth ratio and the maximum transmission unit of the data center switch. In the current round of data queue scheduling, when the deficit value of the deficit counter in the data queue is lower than the preset schedulable threshold, the deficit counter of the data queue is reset based on the relative quantum characteristics of the data queue. The amount of data that the data queue can send is determined by the deficit counter after the quota reset and the current data packet length of the data queue, and then the queue status of each data queue is updated. Based on all queue states, generate the next round of scheduling polling queue in the data center switch, and use the scheduling polling queue to perform deficit polling scheduling on the data queues in the data center switch; Specifically, determining the amount of data that can be sent in the data queue by using the deficit counter after quota reset and the current data packet length of the data queue includes: Get the current data packet length of the data queue and the reset value of the deficit counter for the quota reset; The amount of data that can be sent in the data queue is determined by the current data packet length and the quota reset value; Specifically, updating the queue status of each data queue includes: After the data scheduling of the current round of data queues is completed, the current load rate of each data queue is determined by the amount of data that can be sent and the maximum amount of data that can be sent. Retrieve the historical queue status of the data queue; The historical queue status is updated by the current load rate to obtain the queue status of the data queue, and then the queue status of each data queue is obtained.

2. The method as described in claim 1, characterized in that, Extracting the relative bandwidth ratio of each data queue in the data center switch from the queue configuration information specifically includes: Obtain the weight values ​​of each data queue in the data center switch from the queue configuration information; The relative bandwidth ratio of each data queue in the data center switch is determined by all weight values.

3. The method as described in claim 1, characterized in that, The relative quantum characteristics of each data queue are determined by various relative bandwidth ratios and the maximum transmission unit of the data center switch, specifically including: Obtain the maximum transmission unit of the data center switch and preset the scaling factor for data scheduling; The baseline value for the data center switch is determined based on the maximum transmission unit and the scaling factor; The relative quantum characteristics of each data queue are determined by the relative bandwidth ratios and the benchmark value.

4. The method as described in claim 1, characterized in that, The specific steps for resetting the deficit counter of a data queue based on its relative quantum characteristics include: Obtain the current deficit value and relative quantum characteristics of the data queue; The current deficit value and the relative quantum characteristics are used to determine the amount reset value of the deficit counter in the data queue.

5. The method as described in claim 1, characterized in that, The generation of the next round of scheduling polling queues in the data center switch based on all queue states specifically includes: Multiple schedulable queues are selected from all queue states, and then the polling priority score of each schedulable queue is determined. The next round of scheduling polling queues in the data center switch is selected from all schedulable queues based on all polling priority scores.

6. A data scheduling system, comprising a scheduling unit that performs data scheduling using the method described in any one of claims 1 to 5, characterized in that, The scheduling unit includes: The initialization module is used to initialize the queue configuration information for data scheduling in the data center switch; The processing module is used to extract the relative bandwidth ratio of each data queue in the data center switch from the queue configuration information, and determine the relative quantum characteristics of each data queue by using the relative bandwidth ratio and the maximum transmission unit of the data center switch. The processing module is also used to, in the data scheduling of the data queue in the current round, when the deficit value of the deficit counter in the data queue is lower than the preset schedulable threshold, reset the amount of the deficit counter of the data queue based on the relative quantum characteristics of the data queue, determine the amount of data that the data queue can send by the deficit counter reset by the amount of the deficit counter and the current data packet length of the data queue, and then update the queue status of each data queue. The execution module is used to generate the next round of scheduling polling queue in the data center switch based on all queue states, and to perform deficit polling scheduling on the data queues in the data center switch through the scheduling polling queue.

7. A switching device, characterized in that, The switching device includes the data scheduling system described in claim 6.

8. A computer device, characterized in that, The computer device includes a memory and a processor, the memory being used to store a computer program, and the processor being used to retrieve and run the computer program from the memory, causing the computer device to perform the data scheduling method according to any one of claims 1 to 5.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores instructions or code that, when executed on a computer, cause the computer to implement the data scheduling method as described in any one of claims 1 to 5.