Packet scheduling method and related apparatus

By controlling the queuing order and time window of the service flow according to the message scheduling information in the target queue, the problem of inconsistent message jitter within the queue is solved, achieving low jitter and efficient message transmission, and meeting the performance requirements of industrial automation networks.

WO2026097797A1PCT designated stage Publication Date: 2026-05-15HUAWEI TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
HUAWEI TECH CO LTD
Filing Date
2025-04-28
Publication Date
2026-05-15

AI Technical Summary

Technical Problem

After multiple service flows are mapped to the same queue, the packet jitter in the queue cannot meet the microsecond or millisecond level outgoing port latency jitter requirements, resulting in inconsistent jitter between adjacent packets of the service flows, which cannot meet the high network performance requirements of industrial automation.

Method used

By acquiring message scheduling information, the target queuing order of the service flow in the target queue is indicated, and messages of the same service flow are sent within a fixed time window to ensure that the message intervals of the same service flow are consistent. Time slices are used to control jitter and ensure that jitter is within the required range.

Benefits of technology

It achieves jitter control between messages in the same service flow within the required range, meets the low jitter requirements of industrial automation for networks, and improves the queue utilization efficiency of network devices and the determinism of message transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025091652_15052026_PF_FP_ABST
    Figure CN2025091652_15052026_PF_FP_ABST
Patent Text Reader

Abstract

Provided in the embodiments of the present application are a packet scheduling method and a related apparatus, so as to ensure that jitter of traffic flows can be controlled within a required range. The method comprises: acquiring packet scheduling information, wherein the packet scheduling information is used for indicating a target queuing order of packets of N traffic flows in a target queue; and on the basis of the packet scheduling information, sending the packets in the target queue.
Need to check novelty before this filing date? Find Prior Art

Description

Message scheduling methods and related devices

[0001] This application claims priority to Chinese Patent Application No. 202411599780.6, filed with the State Intellectual Property Office of China on November 8, 2024, entitled “Message Scheduling Method and Related Apparatus”, the entire contents of which are incorporated herein by reference. Technical Field

[0002] This application relates to the field of communication technology, and in particular to a message scheduling method and related apparatus. Background Technology

[0003] With the advent of the Fourth Industrial Revolution (Industry 4.0), industrial automation is developing towards greater intelligence and interconnectivity, emphasizing flexible production, personalized customization, and service-oriented manufacturing. By integrating advanced internet technologies with physical manufacturing processes, factories are becoming more efficient and secure. Network performance affects production efficiency, system stability, and security; therefore, industrial automation places extremely high demands on network performance, including real-time performance and reliability. For example, for microsecond or millisecond-level motion control tasks, networks must have very low latency and jitter.

[0004] Among the industrial automation message types defined by the International Electrotechnical Commission (IEC) 60802, isochronous synchronous streams and periodic streams have high requirements for message output jitter. Specifically, isochronous synchronous streams generally require an output port delay jitter of less than 1 microsecond (µs), while periodic streams generally require an output port delay jitter of less than 20 milliseconds (ms).

[0005] To meet the egress port latency jitter requirements of time-sensitive service flows, in scenarios with a large number of service flows (the number of service flows exceeds the number of egress port queues), multiple service flows with the same transmission period are mapped to the same queue, and the deterministic transmission of packets within the queue is controlled by the same queue gating switch to improve queue utilization efficiency. However, since each service flow takes different paths when flowing through network devices, and the resulting jitter may vary, the order in which service flows belonging to the same queue arrive at the queue will also change over time. Because each arriving packet is scheduled sequentially according to a first-in, first-out (FIFO) processing strategy within the queue, the jitter of adjacent packets in a service flow may fail to meet the egress port latency jitter requirements. Summary of the Invention

[0006] This application provides a message scheduling method and related apparatus to solve the problem that service flow jitter cannot meet service jitter requirements.

[0007] The first aspect provides a packet scheduling method. This method can be applied to network devices, such as switches, routers, virtual switches, and firewalls. The method includes: acquiring packet scheduling information, which indicates the target queuing order of packets from N service flows in a target queue; where N is an integer greater than or equal to 2; and sending packets from the target queue according to the packet scheduling information. By indicating the target queuing order of packets from N service flows in the target queue through the packet scheduling information, packets queued according to the target queuing order can be sent from the target queue according to the packet scheduling information. This allows packets from the same service flow to be sent within fixed time slices in different time windows of the target queue, making the jitter between different packets of the same service flow controllable and meeting the latency jitter requirements of the service flow.

[0008] In one possible implementation, the time window for sending messages in the target queue includes N time slices. The i-th time slice among the N time slices in the time domain is used to send the message of the i-th service flow in the target queuing order; where i is an integer greater than or equal to 1 and less than or equal to N. Sending messages in the target queue includes: if the message of the i-th service flow does not exist in the target queue, then no message is sent in the i-th time slice. For messages of service flows that do not exist in the target queue, when sending messages in the target queue, no message is sent in the time slice corresponding to the service flow that does not exist in the target queue, that is, the time slice is idle, and no other messages in the target queue are sent in the time slice, thereby ensuring that the jitter of other service flows is within an acceptable range and ensuring high-quality isochronous communication.

[0009] In one possible implementation, sending packets in the target queue includes: if a packet for the i-th service flow exists in the target queue, then sending the packet for the i-th service flow in the i-th time slice. Thus, in different time windows of the target queue, different packets of the same service flow occupy the same position in the packet sending order, and the time interval between any two adjacent packets of the same service flow sent by the network device is essentially the same, equal to the sending period of the packets for that service flow, thereby controlling jitter within the required range.

[0010] In one possible implementation, the method further includes: obtaining message presence information, which indicates whether a message already exists in a service flow in the target queue, and / or whether a message does not exist in a service flow in the target queue; and determining, based on the message presence information, whether a message for the i-th service flow exists in the target queue. Thus, it is possible to determine whether the time slice corresponding to the i-th service flow should send a message.

[0011] In one possible implementation, the length of the i-th time slice is positively correlated with the length of the message of the i-th service flow. The length of the i-th time slice can be obtained based on the length of the message of the i-th service flow and the rate of the sending port to which the target queue belongs.

[0012] In one possible implementation, sending messages in the target queue according to message scheduling information includes: adjusting the queuing order of messages in the target queue to the target queuing order according to the message scheduling information; and sending messages in the target queue according to the target queuing order. The queuing order of messages from N service flows in the target queue determines the sending order of messages in the target queue. For example, messages that are earlier in the target queue will be sent first, and messages that are later in the target queue will be sent later. This achieves sequential sending of messages from N service flows, meeting the low latency requirements of the service flows.

[0013] In one possible implementation, the message scheduling information includes a mapping relationship between the identifier of each of the N service flows and the queue number corresponding to the service flow, and the order of the queue numbers of the N service flows indicates the target queuing order.

[0014] In one possible implementation, the packets of N service flows are sent at the same period. Having the same sending period for N service flows facilitates the scheduling of packets in the target queue.

[0015] In one possible implementation, the first transmission period is an integer multiple of the second transmission period, the first transmission period is the transmission period of the message of the first service flow among the N service flows, the second transmission period is the transmission period of the message of the second service flow among the N service flows, the second service flow is the service flow with the smallest transmission period among the N service flows, and the first service flow is the service flow among the N service flows that is different from the second service flow.

[0016] The second aspect provides a message scheduling method. This method is applied to a controller. The method includes: acquiring message scheduling information, which indicates the target queuing order of messages from N service flows in a target queue; where N is an integer greater than or equal to 2; and sending the message scheduling information to a network device.

[0017] In one possible implementation, the message scheduling information includes a mapping relationship between the identifier of each of the N service flows and the queue number corresponding to the service flow, and the order of the queue numbers of the N service flows indicates the target queuing order.

[0018] In one possible implementation, the message sending periods for N service flows are the same.

[0019] In one possible implementation, the first transmission period is an integer multiple of the second transmission period, the first transmission period is the transmission period of the message of the first service flow among the N service flows, the second transmission period is the transmission period of the message of the second service flow among the N service flows, the second service flow is the service flow with the smallest transmission period among the N service flows, and the first service flow is the service flow among the N service flows that is different from the second service flow.

[0020] A third aspect provides a message sending apparatus. The apparatus includes: a processing module for acquiring message scheduling information, the message scheduling information indicating the target queuing order of messages from N service flows in a target queue; wherein N is an integer greater than or equal to 2; and a transceiver module for sending messages in the target queue according to the message scheduling information.

[0021] In one possible implementation, the time window for sending messages in the target queue includes N time slices. The i-th time slice in the N time slices in the time domain is used to send the message of the i-th service flow in the target queuing order; where i is an integer greater than or equal to 1 and less than or equal to N; the transceiver module is used to not send a message in the i-th time slice when there is no message of the i-th service flow in the target queue.

[0022] In one possible implementation, the transceiver module is used to send the message of the i-th service flow in the i-th time slice when there is a message of the i-th service flow in the target queue.

[0023] In one possible implementation, the processing module is used to obtain message status information, which indicates whether a message already exists in a service flow in the target queue and / or whether a message does not exist in a service flow in the target queue; the processing module is used to determine whether a message of the i-th service flow exists in the target queue based on the message status information.

[0024] In one possible implementation, the length of the i-th time slice is positively correlated with the length of the message of the i-th service flow. The length of the i-th time slice can be obtained based on the length of the message of the i-th service flow and the rate of the sending port to which the target queue belongs.

[0025] In one possible implementation, the transceiver module is used to adjust the queuing order of messages in the target queue to the target queuing order according to the message scheduling information; the transceiver module is used to send the messages in the target queue according to the target queuing order.

[0026] In one possible implementation, the message scheduling information includes a mapping relationship between the identifier of each of the N service flows and the queue number corresponding to the service flow, and the order of the queue numbers of the N service flows indicates the target queuing order.

[0027] In one possible implementation, the message sending periods for N service flows are the same.

[0028] In one possible implementation, the first transmission period is an integer multiple of the second transmission period, the first transmission period is the transmission period of the message of the first service flow among the N service flows, the second transmission period is the transmission period of the message of the second service flow among the N service flows, the second service flow is the service flow with the smallest transmission period among the N service flows, and the first service flow is the service flow among the N service flows that is different from the second service flow.

[0029] The fourth aspect provides a message scheduling device. The device includes: a processing module for acquiring message scheduling information, which indicates the target queuing order of messages of N service flows in the target queue; wherein N is an integer greater than or equal to 2; and a transceiver module for sending the message scheduling information to network devices.

[0030] In one possible implementation, the message scheduling information includes a mapping relationship between the identifier of each of the N service flows and the queue number corresponding to the service flow, and the order of the queue numbers of the N service flows indicates the target queuing order.

[0031] In one possible implementation, the message sending periods for N service flows are the same.

[0032] In one possible implementation, the first transmission period is an integer multiple of the second transmission period, the first transmission period is the transmission period of the message of the first service flow among the N service flows, the second transmission period is the transmission period of the message of the second service flow among the N service flows, the second service flow is the service flow with the smallest transmission period among the N service flows, and the first service flow is the service flow among the N service flows that is different from the second service flow.

[0033] Fifthly, a message scheduling apparatus is provided, including a processor and an interface circuit. The interface circuit is used to receive signals from other communication devices outside the communication device and transmit them to the processor, or to send signals from the processor to other communication devices outside the communication device. The processor is used to implement any one of the first to second aspects and any possible implementation of any one aspect through logic circuits or execution code instructions.

[0034] In a sixth aspect, a computer-readable storage medium is provided that stores a computer program or instructions which, when executed by a processor, implement the methods of any one of the first to second aspects and any possible implementation thereof.

[0035] In a seventh aspect, a computer program product storing instructions is provided, which, when executed by a processor, implements any one of the first to second aspects and any possible implementation thereof.

[0036] Eighthly, a chip is provided, comprising a processor and potentially a memory, for implementing the methods of any one of the first to second aspects and any possible implementations of any one aspect. The chip system may be composed of a chip or may include chips and other discrete devices.

[0037] A ninth aspect provides a communication system, the system including means for implementing the method provided in the first aspect, and means for implementing the method provided in the second aspect. Attached Figure Description

[0038] Figure 1 is a schematic diagram of a message scheduling method;

[0039] Figure 2 is a schematic diagram of the architecture of a communication system provided in this application;

[0040] Figure 3 is a flowchart illustrating a message scheduling method provided in this application;

[0041] Figure 4 is a flowchart illustrating another message scheduling method provided in this application;

[0042] Figure 5 is a structural schematic diagram of a message scheduling device provided in this application;

[0043] Figure 6 is a schematic diagram of another message scheduling device provided in this application. Detailed Implementation

[0044] The embodiments of this application are described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. As those skilled in the art will understand, with the development of technology and the emergence of new scenarios, the technical solutions provided by the embodiments of this application are also applicable to similar technical problems.

[0045] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. "A plurality of" means two or more.

[0046] The term “exemplary” as used herein means “serving as an example, embodiment, or illustration.” Any embodiment illustrated herein as “exemplary” is not necessarily to be construed as superior to or better than other embodiments.

[0047] In the era of Industry 4.0, the convergence of Internet Technology (IT) and Operational Technology (OT) has provided ample space for the digital transformation of the manufacturing industry. By connecting applications at all levels, including production equipment, production workshops, and enterprise management, data collection, transmission, visualization, and analysis can be achieved, thereby realizing intelligent manufacturing. However, in the actual implementation of Industry 4.0, many obstacles still exist, with the real-time performance difference between IT and OT networks being one of the main obstacles. For motion control tasks at the microsecond or millisecond level, extremely low latency and jitter are required, while IT networks do not have particularly high real-time requirements. Against this backdrop, Time-Sensitive Networking (TSN) technology has emerged.

[0048] TSN is a technology that has expanded from the audio and video field to the industrial, automotive, and mobile communication fields. It originated from the application needs in the audio and video field and was called Audio Video Bridging (AVB) to solve the high bandwidth, high real-time performance, and high transmission quality requirements of audio and video networks.

[0049] In 2006, the Institute of Electrical and Electronics Engineers (IEEE) 802.1 Working Group established the AVB Task Force, and in the following years successfully solved the problem of real-time data synchronization in audio / video networks, while maintaining 100% backward compatibility with traditional Ethernet. In 2012, the AVB Task Force was renamed the TSN Task Force, which is the TSN we know today, aiming to apply TSN technology to fields such as industrial automation.

[0050] In the field of industrial automation, different intelligent devices in the network have data exchange requirements with varying latency streams, significantly increasing the types of services carried by the network. These different services also have varying Quality of Service (QoS) requirements. For different service types, industrial applications are mainly divided into data acquisition services, interactive services, and control services. Mixed data streams have different bandwidth and real-time requirements, which vary with environmental factors, making cross-network real-time scheduling more challenging. Furthermore, the real-time scheduling method directly affects the upper bound of data stream transmission latency and is a core element in ensuring transmission real-time performance and QoS. To achieve comprehensive interconnection and interoperability of information across the entire industrial network, it is necessary to perform mixed transmission of data acquisition, interactive, and control service streams in the network. Ensuring the deterministic transmission of all service streams, including control service streams, is the most important task for industrial networks.

[0051] When various service flows are transmitted in the network, they are processed by intermediate network devices. Due to their internal scheduling mechanisms, these devices introduce increased latency and jitter. If no measures are taken to address these latency and jitter issues, the service flows may miss their planned reception time at the final receiver, potentially causing equipment malfunctions. Addressing latency and jitter, i.e., ensuring deterministic transmission of service flows, means that service packets are scheduled and transmitted by network devices at a predetermined time.

[0052] The TSN protocol family defined by the IEEE 802.1 working group includes standards for time synchronization, data scheduling, etc. It provides a common time-sensitive mechanism for the data link layer of the Ethernet protocol, and provides determinism and reliability for standard Ethernet to ensure real-time, deterministic and reliable data transmission and improve data transmission efficiency.

[0053] Time synchronization: For real-time communication, end-to-end transmission delays have time limits that are difficult to negotiate. Therefore, all devices in a TSN need to have a common time reference model and synchronize their time with each other. This applies not only to end devices in the communication flow, such as industrial controllers and manufacturing robots, but also to network components such as Ethernet switches. Only by synchronizing time can all network devices operate consistently and perform the required operations at the required times.

[0054] Data scheduling: Data scheduling in TSN is fundamental to ensuring time sensitivity. Its core idea is to perform flow control for different application scenarios based on different shapers, one of the most important being the time-aware shaper (TAS). TAS periodically controls the opening and closing of gates through a gate control list (GCL). For each port in the bridge, TAS drives the opening and closing actions according to a known and agreed-upon schedule. Data scheduling can be defined based on the priority of each node and queue. In the IEEE 802.1Qbv implementation, data streams that need to be transmitted in real time are usually scheduled first and need to be determined in advance during time scheduling configuration. Once data needs to be sent, scheduling must be arranged immediately.

[0055] Incoming traffic flows are selected by queues, mapping different traffic flows to different queues. Within each queue, each arriving packet is scheduled sequentially according to a first-in, first-out (FIFO) processing strategy. Each queue has a queue control switch at its exit point, controlled by a gate control list (GCL). The GCL periodically controls the queues according to pre-agreed times, ensuring that traffic packets within the queue are scheduled from the queue to the exit port at the expected time.

[0056] Among the industrial automation message types defined in IEC 60802, the following two message types have high requirements for message outgoing jitter.

[0057] Among them, the time-synchronous flow has the highest requirement for outgoing port determinism, which generally needs to be <1us. That is, the outgoing scheduling transmission time of any two adjacent packets in the same service flow needs to meet the following requirement: nT – 0.5us <= t j -t i <nT+0.5us

[0058] In the above formula, t j and t i Let t be the sending time of the j-th message and the sending time of the i-th message in the service flow. j -t i This refers to the time interval between the sending times of any two messages in the service flow, where T is the sending period of the service flow. Here, n is an integer greater than or equal to 1, and n is the number of sending periods between the sending times of the j-th message and the ith message.

[0059] To achieve the deterministic requirement of the output port of the isochronous synchronization stream, the entire isochronous synchronization stream can be mapped to the same queue during the selection of the ingress queue. In the gate control list corresponding to the queue control switch of this queue, the time interval between two consecutive openings of the queue gate is set to T. During each opening time, one message of the isochronous synchronization stream can be scheduled, and the queue is closed at other times.

[0060] To achieve outgoing port determinism of <1µs, existing technologies allocate a single queue within the device to a single isochronous synchronization stream, and this queue remains closed outside of packet scheduling, resulting in low queue utilization efficiency. When the network device needs to process a large number of isochronous synchronization streams, the number of isochronous synchronization streams exceeds the device's queue size, making it impossible to allocate scheduling queues for other isochronous synchronization streams beyond the device's queue size.

[0061] At this point, multiple isochronous synchronization streams with the same transmission period can be mapped to the same queue. Since the isochronous synchronization streams mapped to the same queue have the same transmission period, the control switch of the queue can still be opened once every time period T, and the duration of each opening ensures that each isochronous synchronization stream can be scheduled with a single message.

[0062] As shown in Figure 1, queue utilization efficiency is improved by mapping multiple isochronous synchronization streams with the same transmission period to the same queue and controlling the deterministic transmission of packets within the queue using the same queue gating switch. However, since the paths traversed by each isochronous synchronization stream as it flows through network devices, and the resulting jitter, may differ, the order in which isochronous synchronization streams belonging to the same queue arrive at the queue will change over time. At time 1 when the queue gating switch is open, the packet of isochronous synchronization stream #1 may be the first packet in the queue. At time 2 when the queue gating switch is open, the packet of isochronous synchronization stream #1 may be the last packet in the queue.

[0063] Because the queue adopts a first-in-first-out working mechanism, although the interval between the opening time 1 and the opening time 2 of the door control switch is an integer multiple of the transmission period T of the isochronous synchronization stream, the message of isochronous synchronization stream #1 will have a different scheduling time due to the difference in queuing order. The difference between the two scheduling times is no longer an integer multiple of T, but depends on the message length of other isochronous synchronization streams in the queue and the processing rate of the device output port.

[0064] Taking a processing rate of 1 gigabits per second (Gbps) at the output port as an example, assuming that the packet length of both isochronous synchronization stream #2 and isochronous synchronization stream #3 is 100 bytes, then the scheduling time of isochronous synchronization stream #1 at the time the queue gate control switch is opened (time 2) will increase by 1Gbps / 100byte*2 = 1.6us, which is already an integer multiple of T. At this point, the requirement of output port jitter <1us for isochronous synchronization streams can no longer be met.

[0065] To address the aforementioned technical problems, this application provides the following embodiments. The main application scenarios involved in these embodiments are deterministic scenarios with extremely high requirements for latency jitter of service flow packets at the outgoing port, including but not limited to various vertical industries such as industrial automation, power equipment control, telemedicine, aircraft control, and autonomous driving.

[0066] Figure 2 is a schematic diagram of the architecture of a communication system provided in this application. The communication system includes a first terminal device, at least one network, and a second terminal device. It should be understood that the number of network devices in Figure 2 is merely an example and should not be construed as a limitation of this application; the number of network devices can be more or less, and no limitation is made here.

[0067] The first terminal device can send service flows. The service flow includes multiple periodically sent packets. The destination of the service flow is the second terminal device. At least one network device is a network device on the service flow forwarding path, used to forward the service flow from the first terminal device to the second terminal device. The second terminal device receives the service flow from the first terminal device through the network device. It should be noted that this embodiment uses the first terminal device as the service flow sender and the second terminal device as the service flow receiver as an example, and does not limit the first terminal device to only sending service flows and the second terminal device to only receiving service flows; the first terminal device can also receive service flows, and the second terminal device can also send service flows.

[0068] In this embodiment, the service flow can be a flow with high jitter requirements, such as voice flow or signaling flow. The service flow can be an isochronous synchronous flow or a periodic flow as defined in IEC 60802. An isochronous synchronous flow is, for example, a service flow with high real-time communication requirements, such as motion control flow. Of course, the service flow can also be other flows requiring low jitter; this is not limited here.

[0069] The number of network devices between the first terminal device and the second terminal device can be one, meaning that both the first and second terminal devices are connected to the same network device. Alternatively, there can be multiple network devices between the first and second terminal devices. The network device connected to the second terminal device can be called an end network device.

[0070] In this embodiment, the first terminal device can be a server, computer, laptop, mobile phone, tablet computer, smart wearable device, vehicle-mounted computer, etc. The second terminal device can be industrial equipment (such as robots, robotic arms, machine tools, etc.), server, computer, laptop, mobile phone, tablet computer, smart wearable device, vehicle-mounted computer, etc. Network equipment can be routers, switches, virtual switches, firewalls, or other devices with packet forwarding capabilities.

[0071] Network devices include receive ports (inbound ports) and send ports (outbound ports). Receive ports are used to receive packets from a first terminal device or an upstream network device in the forwarding traffic flow. Send ports are used to send packets from the traffic flow to downstream network devices or a second terminal device. Send ports include multiple send queues. Each send queue can buffer multiple packets. Network devices can schedule send queues to send packets using a queue scheduling algorithm. Queue scheduling algorithms can include, for example, Priority Queuing (PQ), Weighted Round Robin (WRR), Deficit Round Robin (DRR), or Fair Queuing (FQ). For example, when a send queue is scheduled to be sent, the queue gate control switch for that send queue opens, and packets in that send queue are sent out. The time period during which the send queue sends packets, i.e., the time period from when the queue gate control switch opens to when it closes, is the time window corresponding to that send queue.

[0072] In this embodiment, in order to control the jitter of service flows, the network device queues packets of different service flows mapped to the same sending queue in the sending queue according to the target queuing order, so that packets of different service flows in the same sending queue can be sent in a fixed order, thereby reducing the jitter between packets of the same service flow and ensuring that the jitter between packets of the same service flow meets the jitter requirements.

[0073] The following explanation uses a target queue in a network device as an example. The target queue is a sending queue within the network device. N (N is an integer greater than or equal to 2) service flows are mapped to the target queue for transmission. In one possible implementation, the target queue can be any one of the sending queues in the network device; that is, for each sending queue of the network device, packets are sent according to the message scheduling method provided in this application. In another possible implementation, the target queue can be any one of K sending queues out of all sending queues in the network device. These K sending queues can be the K sending queues with the highest local priority in the network device.

[0074] The network device stores packet scheduling information for the target queue. This information indicates the target queuing order of packets from N service flows within the target queue. The queuing order of the N service flows in the target queue is the target queuing order. This queuing order determines the transmission order of the packets from the N service flows. When transmitting packets from the target queue, the packets are transmitted sequentially. The queuing order of the N service flows in the target queue is the same as the transmission order of the N service flows; that is, the target queuing order is the same as the transmission order of the N service flows.

[0075] For example, if the target queuing order indicated by the message scheduling information is: messages from service flow 1 - messages from service flow 2 - messages from service flow 3 - messages from service flow 4, then the message queuing order in the target queue is: message 1 from service flow 1 - message 2 from service flow 2 - message 3 from service flow 3 - message 4 from service flow 4. When the time window 1 corresponding to the target queue arrives, the message sending order for the target queue is: message 1 - message 2 - message 3 - message 4. Before the next time window 2 corresponding to the target queue arrives, messages arriving at the target queue are still queued according to the target queuing order indicated by the message scheduling information. Therefore, the message queuing order in the target queue is: message 5 from service flow 1 - message 6 from service flow 2 - message 7 from service flow 3 - message 8 from service flow 4. When the time window 2 corresponding to the target queue arrives, the message sending order for the target queue is: message 5 - message 6 - message 7 - message 8.

[0076] Optionally, the communication system may further include a controller, which sends message scheduling information corresponding to a target queue in the network device to the network device, and the network device receives and stores the message scheduling information. In another possible implementation, the message scheduling information may be pre-stored on the network device; this is not a limitation.

[0077] Because different packets of the same service flow are in the same position in the packet sending order in different time windows of the target queue, the time interval between any two adjacent packets of the same service flow sent by the network device is basically the same, which is equal to the sending period of the packets of that service flow, thus enabling jitter to be controlled within the required jitter.

[0078] Message scheduling information indicates the order of N service flows, i.e., the sequence of the N service flows. This information may include, for example, a mapping between the identifier of each of the N service flows and its corresponding queue number. The order of the queue numbers of the N service flows indicates the target queuing order. The queue numbers of the N service flows are different. The identifier of a service flow can be a triple (source IP address, destination IP address, version number), a quadruple (source IP address, destination IP address, source port number, destination port number), a quintuple (source IP address, destination IP address, source port number, destination port number, protocol version number), or a seven-tuple, etc. Alternatively, the identifier of a service flow can also be a Medium Access Control (MAC) address + Virtual Local Area Network (VLAN) identifier.

[0079] In one possible implementation, the smaller the queue number of a service flow, the earlier its packet appears in the target queuing order; conversely, the larger the queue number, the later its packet appears in the target queuing order. For example, if service flow 1 has a queue number of 0, service flow 2 has a queue number of 1, service flow 3 has a queue number of 2, and service flow 4 has a queue number of 3, then the target queuing order would be: service flow 1 packet - service flow 2 packet - service flow 3 packet - service flow 4 packet. In another possible implementation, the larger the queue number of a service flow, the earlier its packet appears in the target queuing order; conversely, the smaller the queue number, the later its packet appears in the target queuing order. For example, if the queue number for flow 1 is 10, the queue number for flow 2 is 9, the queue number for flow 3 is 8, and the queue number for flow 4 is 7, then the target queuing order is: messages from flow 1 - messages from flow 2 - messages from flow 3 - messages from flow 4. The queue numbers of the N flows can be consecutive. For example, queue number 0 for flow 1, queue number 1 for flow 2, queue number 2 for flow 3, and queue number 3 for flow 4 are consecutive. Of course, the queue numbers of the N flows can also be non-consecutive, as long as they can be sorted according to their queue numbers. For example, if the queue number for flow 1 is 1, the queue number for flow 2 is 3, the queue number for flow 3 is 5, and the queue number for flow 4 is 7, there are intervals between the queue numbers, but the target queuing order can still be determined based on the order of the queue numbers.

[0080] In this embodiment, the time window corresponding to the target queue can be used to send a group of packets in the target queue. A group of packets can include N packets, each belonging to a different service flow; that is, each of the N packets belongs to a separate service flow. The length of the time window corresponding to the target queue is positively correlated with the lengths of the packets in the N service flows. Based on the transmission rate *s* of the network device's sending port and the packet length *l*, the transmission time of one packet sent by the network device can be determined as *l / s*. Therefore, the transmission time of one packet in each service flow can be determined based on the packet length of each service flow and the transmission rate of the sending port. The length of the time window can be equal to the sum of the transmission times corresponding to the N service flows. Alternatively, the length of the time window can be greater than the sum of the transmission times corresponding to the N service flows to reserve redundant time.

[0081] In the following text, the time period used to send a message for a service flow within a time window is defined as a time slice. Therefore, a time window can include N time slices. Each time slice corresponds to one of the N service flows, and the N time slices correspond one-to-one with the N service flows. Alternatively, the i-th time slice among the N time slices in the time domain is used to send the message of the i-th service flow in the target queuing order. Here, i is an integer greater than or equal to 1 and less than or equal to N.

[0082] In some scenarios, N packets can be sent within the time window corresponding to the target queue, and these N packets belong to different service flows. In other scenarios, the number of packets sent within the time window corresponding to the target queue can be less than N. In some non-ideal scenarios, the number of packets sent within the time window corresponding to the target queue can be more than N.

[0083] In one possible implementation, the transmission periods of the N service flows mapped to the target queue can be the same. The transmission period of a service flow is the time interval between two adjacent packets of the same service flow. In another possible implementation, the transmission periods of the N service flows mapped to the target queue can be different, but the transmission period of the service flow with the larger transmission period must be an integer multiple of the transmission period of the service flow with the smallest transmission period. For example, the N service flows include a first service flow and a second service flow, where the second service flow is the service flow with the smallest transmission period among the N service flows, and the first service flow is a service flow among the N service flows that is different from the second service flow. The transmission period of the first service flow is the first transmission period, the transmission period of the second service flow is the second transmission period, and the first transmission period is an integer multiple of the second transmission period. When the transmission periods of the N service flows are different, the queue gating switch opening period of the target queue (i.e., the time interval between two adjacent time windows corresponding to the target queue in the time domain) is the same as the second transmission period.

[0084] When N service flows have the same sending period, if all N service flow packets have arrived at the target queue (which already has N service flow packets buffered) before the queue gate control switch of the target queue is opened, then the network device can send N packets belonging to different service flows within the time window corresponding to the target queue. In reality, non-ideal scenarios may occur. For example, a packet A from a certain service flow might be delayed in arriving at the network device's target queue due to congestion during upstream forwarding, thus missing the opportunity to send packet A (arriving later than the previous time window, resulting in the packet not being sent in the previous time window). Meanwhile, the next packet B from the same service flow arrives at the target queue in the next time window. In this case, the target queue contains both packets from the same service flow (packet A and packet B). If the time window includes a redundancy period, N+1 packets (including packet A) can be sent in the next time window of the target queue. Alternatively, the network device can discard packet A to ensure that all N packets in the target queue are sent within the time window.

[0085] There are several possible reasons why fewer than N packets are sent within the time window corresponding to the target queue (i.e., fewer than N packets in the target queue when the queue gate control switch is open). For example, packets from a service flow may be lost before reaching the target queue. Another example is that congestion during upstream forwarding of a service flow's packets increases forwarding latency, causing them to miss the target queue by the time window. Yet another example is that the N service flows have different sending periods, and the time interval between two adjacent time windows corresponding to the target queue is the same as the sending period of the service flow with the shortest sending period among the N service flows; in this case, the service flow with the longer sending period will send packets at intervals of one or more time windows.

[0086] In this embodiment, when a network device sends packets in the target queue, if a packet for a certain service flow is not present in the target queue, no packet is sent in the time slot corresponding to that service flow. That is, the time slot is idle, and no other packets in the target queue are sent. This prevents packets for service flows following the target service flow from being sent prematurely, thus ensuring that the jitter of packets for service flows following the target service flow remains within the required jitter range. Specifically, when about to send a packet for the i-th service flow in the target queue, it can be determined whether the packet for the i-th service flow exists in the target queue. If the packet for the i-th service flow is not present in the target queue, no packet is sent in the i-th time slot. If the packet for the i-th service flow exists in the target queue, the packet for the i-th service flow is sent in the i-th time slot. The length of the i-th time slot is positively correlated with the length of the packet for the i-th service flow. The length of the i-th time slot can be determined based on the length of the packet for the i-th service flow and the transmission rate of the sending port.

[0087] Network devices can determine whether a packet for the i-th service flow exists in the target queue by using the packet presence information corresponding to the target queue. The packet presence information indicates that the packet already exists in the target queue. In one possible implementation, the packet presence information can be carried in an N-bit bitmap, where each of the N bits corresponds one-to-one with one of the N service flows. The i-th bit in the N-bit bitmap records the presence information of the packet for the i-th service flow in the target queuing order. For example, when the packet for the i-th service flow arrives at the target queue, the value of the i-th bit in the N-bit bitmap can be set to 1 to indicate that the packet for the i-th service flow already exists in the target queue; the value for packets from service flows that have not yet arrived at the target queue is 0. Alternatively, when the packet for the i-th service flow arrives at the target queue, the value of the i-th bit in the N-bit bitmap can be set to 0 to indicate that the packet for the i-th service flow already exists in the target queue; the value for packets from service flows that have not yet arrived at the target queue is 1. Therefore, the presence of the packet for the i-th service flow in the target queue can be determined based on the value of the i-th bit in the N-bit bitmap. In another possible implementation, the message presence information may include the identifier of the service flow whose message has arrived at the target queue. If the service flow identifier is present in the message presence information, it can be determined that the service flow's message exists in the target queue; if the service flow identifier is not present in the message presence information, it can be determined that the service flow's message does not exist in the target queue. In yet another possible implementation, the message presence information may include the identifier of the service flow whose message has not arrived at the target queue. If the service flow identifier is not present in the message presence information, it can be determined that the service flow's message exists in the target queue; if the service flow identifier is present in the message presence information, it can be determined that the service flow's message does not exist in the target queue. When the queue gate control switch of the target queue is closed, the message presence information needs to be cleared and reset to record the message presence information for the new cycle.

[0088] The order in which packets from N service flows arrive at the target queue may or may not match the target queuing order. When the order in which packets from N service flows arrive at the target queue does not match the target queuing order, the queuing order of the packets in the target queue needs to be adjusted according to the packet scheduling information so that the adjusted queuing order matches the target queuing order.

[0089] In one possible implementation, the network device can sort the packets stored in the storage area corresponding to the target queue according to the packet scheduling information, so that the storage order of the packets of N service flows in the physical storage space corresponding to the target queue is consistent with the order indicated by the packet scheduling information.

[0090] It should be noted that the target queuing order of the N service flow packets in the target queue can be a logical queuing order, not limited to the storage order of the N service flow packets in the physical storage space. That is, the storage order of the N service flow packets in the physical storage space corresponding to the target queue may not be the same as the order indicated by the packet scheduling information. In one possible implementation, a linked list can be used to indicate the queuing order of the packets in the target queue. The linked list includes, for example, first packet information, last packet information, and at least one next pointer (i.e., the storage address of the next packet). The first packet information is used to record the pointer (storage address) of the packet of the service flow that is first in the target queuing order among the service flow packets in the target queue. The last packet information is used to record the pointer of the packet of the service flow that is last in the target queuing order among the service flow packets in the target queue. The next pointer is used to sequentially concatenate the packets between the first and last packets. Except for the last packet, other packets in the target queue are followed by a next pointer, pointing to the next packet. In this embodiment, based on the latest message arriving at the target queue and the message scheduling information, at least one of the first message information, the last message information, and the next pointer can be updated, thereby ensuring that the queuing order of the N service flows in the target queue is the target queuing order.

[0091] For example, assume that the N service flows mapped to the target queue include service flow 1, service flow 2, and service flow 3. The target queuing order indicated by the message scheduling information is service flow 1 messages - service flow 2 messages - service flow 3 messages. In a new cycle, if the first message to arrive at the target queue is a service flow 2 message, then the first message information is recorded as a pointer to the service flow 2 message, and the last message information is also a pointer to the service flow 2 message. If the second message to arrive at the target queue is a service flow 1 message, querying the message scheduling information can determine that the service flow 1 message is positioned before the service flow 2 message in the target queuing order, then the queuing order between the service flow 1 and service flow 2 messages is adjusted. For example, the first message information is adjusted to a pointer to the service flow 1 message, the last message information remains a pointer to the service flow 2 message, and the next pointer after the service flow 1 message points to the service flow 2 message. The third message arriving in the target queue is from service flow 3. Checking the message scheduling information confirms that service flow 3's position in the target queuing order is after service flow 2. Therefore, the tail message information is adjusted to point to service flow 3, and the next pointer after service flow 2 points to service flow 3. Thus, the adjusted queuing order of messages in the target queue is service flow 1 messages - service flow 2 messages - service flow 3 messages, consistent with the target queuing order.

[0092] In a new cycle, if the first packet to arrive at the target queue is a packet from service flow 1, the network device records the first packet information as a pointer to the packet from service flow 1, and the last packet information as a pointer to the packet from service flow 1. If the second packet to arrive at the target queue is a packet from service flow 3, querying the packet scheduling information determines that the packet from service flow 3 is after the packet from service flow 1 in the target queuing order. Therefore, the last packet information is adjusted to a pointer to the packet from service flow 3, the first packet information remains a pointer to the packet from service flow 1, and the next pointer after the packet from service flow 1 points to the packet from service flow 3. If the third packet to arrive at the target queue is a packet from service flow 2, querying the packet scheduling information determines that the packet from service flow 2 is after the packet from service flow 1 and before the packet from service flow 3 in the target queuing order. Therefore, the next pointer after the packet from service flow 1 points to the packet from service flow 2, and the next pointer after the packet from service flow 2 points to the packet from service flow 3. Therefore, the adjusted queuing order of the messages in the target queue is messages of business flow 1 - messages of business flow 2 - messages of business flow 3, which is consistent with the target queuing order.

[0093] In the above text, a linked list is used to indicate the queuing order of packets in the target queue. In another possible implementation, a pre-defined, contiguous storage area can be partitioned in the network device's memory. This pre-defined storage area includes N sub-storage areas. These N sub-storage areas store and allocate packets to N service flows in the order indicated by the packet scheduling information. Each of the N sub-storage areas corresponds one-to-one with the N service flows, and each sub-storage area stores pointers (store addresses) to packets from one service flow. For example, suppose there are three service flows (service flow 1, service flow 2, and service flow 3) mapped to the target queue. The pre-defined storage area, from low to high address, includes sub-storage area 1, sub-storage area 2, and sub-storage area 3. The queuing order of the service flows indicated by the packet scheduling information is service flow 1-service flow 2-service flow 3. Then, sub-storage area 1 can be used to store pointers to packets from service flow 1, sub-storage area 2 can be used to store pointers to packets from service flow 2, and sub-storage area 3 can be used to store pointers to packets from service flow 3. When a message from a service flow arrives at the target queue, its address is stored in the corresponding sub-store area. If a message from a service flow has not arrived at the target queue, the data stored in the corresponding sub-store area is empty. This ensures that the messages from N service flows are queued according to the target queuing order. When sending messages from the target queue, data in the N sub-store areas can be read in order from low address to high address. This allows for the sequential acquisition of pointers to the messages from each service flow, enabling the sequential retrieval of messages from their corresponding addresses and sending them in the target sending order. Furthermore, if the data in a certain sub-store area is empty, it can be determined that the corresponding message from the service flow does not exist in the target queue. Therefore, the time slice corresponding to that service flow is idle, and no message is sent.

[0094] In this embodiment, message scheduling information indicates the target queuing order of messages from N service flows in the target queue. Network devices can send messages queued in the target order from the target queue according to the message scheduling information. This allows for the transmission of messages from the same service flow within fixed time slots in different time windows of the target queue, making jitter between different messages of the same service flow controllable and meeting the latency jitter requirements of the service flows. Furthermore, for messages from service flows not present in the target queue, when sending messages from the target queue, no messages are sent in the corresponding time slots of these service flows (this time slot is idle, and no other messages are sent), thus ensuring that the jitter of other service flows is within an acceptable range and guaranteeing high-quality isochronous communication.

[0095] As shown in Figure 3, Figure 3 is a flowchart illustrating a message scheduling method provided in this application. The executing entity in this embodiment can be the network device shown in Figure 2. Specifically, the executing entity in this embodiment can be any network device in Figure 2, or it can be an end network device; there is no limitation here. This embodiment includes the following steps:

[0096] S301: Obtain message scheduling information. The message scheduling information is used to indicate the target queuing order of messages of N service flows in the target queue; where N is an integer greater than or equal to 2.

[0097] Here, N service flows are service flows mapped to the target queue. That is, the messages of all N service flows are sent through the target queue.

[0098] Message scheduling information is used to indicate the target queuing order of messages from N service flows in the target queue. This information includes, for example, a mapping between the identifier of each of the N service flows and its corresponding queue number. The order of the queue numbers of the N service flows indicates the target queuing order. The queue numbers of the N service flows are different. A detailed explanation of the message scheduling information can be found in the description above, and will not be repeated here.

[0099] The message scheduling information can be obtained from the controller in Figure 2, or it can be pre-stored in the network device and obtained locally from the network device; there is no restriction here.

[0100] S302: Send the messages in the target queue according to the message scheduling information.

[0101] Based on the message scheduling information, the queuing order of the messages of N service flows in the target queue can be determined. That is, the order of the messages in the target queue is the target queuing order indicated by the message scheduling information. Therefore, when sending messages in the target queue, the messages can be sent in sequence according to the queuing order of the messages in the target queue, so that the sending order of the messages of the N service flows is consistent with the target queuing order.

[0102] When the arrival order of packets from N service flows in the target queue is inconsistent with the target queuing order, the queuing order of the packets from the N service flows in the target queue can be adjusted according to the packet scheduling information. The specific implementation of adjusting the queuing order of packets from the N service flows in the target queue according to the packet scheduling information can be found in the relevant description above, and will not be repeated here.

[0103] When a packet is scheduled to the target queue, it can be sent within the time window corresponding to the target queue. In this embodiment, the time window corresponding to the target queue includes N time slices. The i-th time slice among the N time slices in the time domain is used to send the packet of the i-th service flow in the target queuing order. Here, i is an integer greater than or equal to 1 and less than or equal to N.

[0104] When packets in a service flow experience packet loss, delays in arriving at the target queue, or inconsistent sending periods among N service flows, the number of service flows whose packets exist in the target queue may be less than N. That is, when the time window corresponding to the target queue arrives, packets from service flows that should exist are not in the target queue. In this embodiment, for the time slice corresponding to a service flow whose packets are not in the target queue, no packets are sent, thereby ensuring that the jitter of other service flows remains within the required range. For details on how to determine whether packets from a service flow exist in the target queue, please refer to the relevant description above; therefore, it will not be repeated here.

[0105] In this embodiment, message scheduling information indicates the target queuing order of messages from N service flows in the target queue. According to the message scheduling information, messages queued in the target order can be sent from the target queue, enabling the transmission of messages from the same service flow within fixed time slots in different time windows of the target queue. This makes the jitter between different messages of the same service flow controllable and meets the latency jitter requirements of the service flows. Furthermore, for messages from service flows not present in the target queue, when sending messages from the target queue, no messages are sent in the corresponding time slots of the service flows not present in the target queue (this time slot is idle, and no other messages are sent), thereby ensuring that the jitter of other service flows is within an acceptable range and guaranteeing high-quality isochronous communication.

[0106] Figure 4 shows a flowchart of another message scheduling method provided in this application. This embodiment is applied to the controller in Figure 2. The method includes the following steps:

[0107] S401: Obtain message scheduling information. The message scheduling information is used to indicate the target queuing order of messages of N service flows in the target queue; where N is an integer greater than or equal to 2.

[0108] For an explanation of message scheduling information, please refer to the relevant description above, so it will not be repeated here.

[0109] In one possible implementation, the message scheduling information can be user-inputted. In another possible implementation, the message scheduling information can be generated by the controller. For example, the controller obtains information about N service flows mapped to a target queue, and then assigns sorting numbers to the N service flows, with each service flow receiving a different sorting number, in order to obtain the message scheduling information.

[0110] S402: Send message scheduling information to network devices.

[0111] After obtaining the message scheduling information, the message scheduling information of the target queue is sent to the corresponding network device.

[0112] In this embodiment, the target queuing order of the packets of N service flows in the target queue is indicated by the packet scheduling information, thereby controlling the sending order of the packets of N service flows. This enables the packets of the same service flow to be sent in fixed time slices in different time windows of the target queue, making the jitter between different packets of the same service flow controllable and meeting the latency jitter requirements of the service flow.

[0113] Figure 5 shows a schematic diagram of a message scheduling device provided in this application. The message scheduling device 500 includes a processing module 501 and a transceiver module 502.

[0114] In one possible implementation, the packet scheduling device 500 is applied to the network device shown in Figure 2. The packet scheduling device 500 can be a hardware module (such as a chip or network card) in the network device, or it can be a software module in the network device.

[0115] The processing module 501 is used to obtain message scheduling information, which indicates the target queuing order of messages of N service flows in the target queue; where N is an integer greater than or equal to 2; the transceiver module 502 is used to send messages in the target queue according to the message scheduling information.

[0116] In one possible implementation, the time window for sending messages in the target queue includes N time slices. The i-th time slice in the N time slices in the time domain is used to send the message of the i-th service flow in the target queuing order; where i is an integer greater than or equal to 1 and less than or equal to N; the transceiver module 502 is used to not send a message in the i-th time slice when there is no message of the i-th service flow in the target queue.

[0117] In one possible implementation, the transceiver module 502 is used to send the message of the i-th service flow in the i-th time slice when there is a message of the i-th service flow in the target queue.

[0118] In one possible implementation, the processing module 501 is used to obtain message status information, which indicates that the message already exists in the target queue of the service flow, and / or the message does not exist in the target queue of the service flow; the processing module 501 is used to determine whether the message of the i-th service flow exists in the target queue based on the message status information.

[0119] In one possible implementation, the length of the i-th time slice is positively correlated with the length of the message of the i-th service flow.

[0120] In one possible implementation, the transceiver module 502 is used to adjust the queuing order of the messages in the target queue to the target queuing order according to the message scheduling information; the transceiver module 502 is used to send the messages in the target queue according to the target queuing order.

[0121] In one possible implementation, the message scheduling information includes a mapping relationship between the identifier of each of the N service flows and the queue number corresponding to the service flow, and the order of the queue numbers of the N service flows indicates the target queuing order.

[0122] In one possible implementation, the message sending periods for N service flows are the same.

[0123] In one possible implementation, the first transmission period is an integer multiple of the second transmission period, the first transmission period is the transmission period of the message of the first service flow among the N service flows, the second transmission period is the transmission period of the message of the second service flow among the N service flows, the second service flow is the service flow with the smallest transmission period among the N service flows, and the first service flow is the service flow among the N service flows that is different from the second service flow.

[0124] In another possible implementation, the message scheduling device 500 is applied to the controller in Figure 2. The message scheduling device 500 can be a hardware module (e.g., a chip) in the controller or a software module in the network device.

[0125] The processing module 501 is used to obtain message scheduling information, which indicates the target queuing order of messages of N service flows in the target queue; where N is an integer greater than or equal to 2; the transceiver module 502 is used to send message scheduling information to the network device.

[0126] In one possible implementation, the message scheduling information includes a mapping relationship between the identifier of each of the N service flows and the queue number corresponding to the service flow, and the order of the queue numbers of the N service flows indicates the target queuing order.

[0127] In one possible implementation, the message sending periods for N service flows are the same.

[0128] In one possible implementation, the first transmission period is an integer multiple of the second transmission period, the first transmission period is the transmission period of the message of the first service flow among the N service flows, the second transmission period is the transmission period of the message of the second service flow among the N service flows, the second service flow is the service flow with the smallest transmission period among the N service flows, and the first service flow is the service flow among the N service flows that is different from the second service flow.

[0129] As shown in Figure 6, Figure 6 is a structural schematic diagram of a message scheduling device provided in an embodiment of this application. In this embodiment, the message scheduling device 600 can be a network device in the network devices shown in Figure 2, such as an edge switch or an aggregation switch. Alternatively, the message scheduling device 600 can be a controller as shown in Figure 2. The controller can be a device with computing power, such as a server, server cluster, computer, tablet computer, vehicle-mounted system, smartphone, analyzer, or cloud device.

[0130] The message scheduling device 600 includes a bus 601, a processor 602, a communication interface 603, and a memory 604. The processor 602, the memory 604, and the communication interface 603 communicate with each other via the bus 601.

[0131] Bus 601 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of representation, only one thick line is used in Figure 6, but this does not indicate that there is only one bus or one type of bus.

[0132] The processor 602 can be any one or more of the following processors: central processing unit (CPU), graphics processing unit (GPU), microprocessor (MP), or digital signal processor (DSP).

[0133] Memory 604 may include volatile memory, such as random access memory (RAM). Memory 604 may also include non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid state drive (SSD).

[0134] The memory 604 can be used to store software code related to the message scheduling method, and the processor 602 can execute the steps of the message scheduling method and schedule other units to achieve the corresponding functions.

[0135] It should be understood that the message scheduling device 600 can be a centralized or distributed device, and the processor 602 in the message scheduling device 600 can be a hardware circuit (such as an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), a general-purpose processor, a digital signal processor (DSP), a microprocessor or microcontroller, etc.) or a combination of these hardware circuits. For example, the processor can be a hardware system with instruction execution capabilities, such as a CPU or DSP, or a hardware system without instruction execution capabilities, such as an ASIC or FPGA, or a combination of the aforementioned hardware systems without instruction execution capabilities and hardware systems with instruction execution capabilities.

[0136] This application also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a computer, implements the message scheduling method flow of the above method embodiments.

[0137] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0138] This application also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a computer, implements the message scheduling method flow of the above method embodiments.

[0139] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0140] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, indirect coupling or communication connection between devices or units, and may be electrical or other forms.

[0141] The units described as discrete components may or may not be physically separate. 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 the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0142] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0143] If the integrated unit is implemented as 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, all or part of the technical solution of this application can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

Claims

1. A message scheduling method, characterized in that, The method includes: Obtain message scheduling information, which is used to indicate the target queuing order of messages of N service flows in the target queue; where N is an integer greater than or equal to 2; According to the message scheduling information, the messages in the target queue are sent.

2. The method according to claim 1, characterized in that, The time window for sending messages in the target queue includes N time slices. The i-th time slice among the N time slices in the time domain is used to send the message of the i-th service flow in the target queuing order; where i is an integer greater than or equal to 1 and less than or equal to N; sending messages in the target queue includes: If the target queue does not contain a packet for the i-th service flow, then no packet will be sent in the i-th time slice.

3. The method according to claim 2, characterized in that, Sending the messages in the target queue includes: If the target queue contains a packet for the i-th service flow, then the packet for the i-th service flow is sent in the i-th time slice.

4. The method according to claim 2 or 3, characterized in that, The method further includes: Obtain message existence information, which indicates that the message already exists in the service flow of the target queue, and / or the message does not exist in the service flow of the target queue; Based on the message presence information, determine whether the message of the i-th service flow exists in the target queue.

5. The method according to any one of claims 2 to 4, characterized in that, The length of the i-th time slice is positively correlated with the length of the message of the i-th service flow.

6. The method according to any one of claims 1 to 5, characterized in that, Sending messages from the target queue according to the message scheduling information includes: Based on the message scheduling information, the queuing order of messages in the target queue is adjusted to the target queuing order; Messages in the target queue are sent according to the target queuing order.

7. The method according to any one of claims 1 to 6, characterized in that, The message scheduling information includes a mapping relationship between the identifier of each of the N service flows and the queue number corresponding to the service flow, and the order of the queue numbers of the N service flows indicates the target queuing order.

8. The method according to any one of claims 1 to 7, characterized in that, The message sending periods for the N service flows are the same.

9. The method according to any one of claims 1 to 8, characterized in that, The first transmission period is an integer multiple of the second transmission period. The first transmission period is the transmission period of the message of the first service flow among the N service flows. The second transmission period is the transmission period of the message of the second service flow among the N service flows. The second service flow is the service flow with the smallest transmission period among the N service flows. The first service flow is a service flow among the N service flows that is different from the second service flow.

10. A message scheduling method, characterized in that, The method includes: Obtain message scheduling information, which is used to indicate the target queuing order of messages of N service flows in the target queue; where N is an integer greater than or equal to 2; Send the message scheduling information to the network device.

11. A message transmitting device, characterized in that, The apparatus includes modules for implementing the method of any one of claims 1 to 10.

12. A message scheduling device, characterized in that, Including processor and memory: The processor is configured to execute a computer program or instructions stored in the memory, wherein when the processor executes the computer program or instructions, the method described in any one of claims 1 to 10 is performed.

13. A chip, characterized in that, The method includes a processor coupled to a memory for executing a computer program or instructions stored in the memory, wherein when the processor executes the computer program or instructions, the method described in any one of claims 1 to 10 is performed.

14. A computer-readable storage medium, characterized in that, The system stores instructions that, when executed on a computer, cause the computer to perform the method as described in any one of claims 1 to 10.

15. A computer program product, characterized in that, The device stores computer-readable instructions that, when read and executed by the communication device, cause the communication device to perform the method as described in any one of claims 1 to 10.