Search

CN-122001822-A - Message scheduling method and related device

CN122001822ACN 122001822 ACN122001822 ACN 122001822ACN-122001822-A

Abstract

The embodiment of the application provides a message scheduling method and a related device, which are used for ensuring that the jitter of a service flow can be controlled within a required range. The method comprises the steps of obtaining message scheduling information, wherein the message scheduling information is used for indicating target queuing sequences of messages of N service flows in a target queue, and sending the messages in the target queue according to the message scheduling information.

Inventors

  • ZHAO CHAO
  • YAN LINZHI
  • ZHANG LUN

Assignees

  • 华为技术有限公司

Dates

Publication Date
20260508
Application Date
20241108

Claims (15)

  1. 1. The message scheduling method is characterized by comprising the following steps: Obtaining message scheduling information, wherein the message scheduling information is used for indicating the target queuing sequence of N messages of service flows in a target queue, and N is an integer greater than or equal to 2; and sending the message in the target queue according to the message scheduling information.
  2. 2. The method of claim 1, wherein the time window for transmitting the message in the target queue comprises N time slices, and an i-th time slice in the N time slices is used for transmitting the message of an i-th service flow in the target queuing sequence, wherein i is an integer greater than or equal to 1 and less than or equal to N, and the transmitting the message in the target queue comprises: And if the message of the ith service flow does not exist in the target queue, not sending the message in the ith time slice.
  3. 3. The method of claim 2, wherein the sending the message in the target queue comprises: and if the message of the ith service flow exists in the target queue, sending the message of the ith service flow in the ith time slice.
  4. 4. A method according to claim 2 or 3, characterized in that the method further comprises: Obtaining message existence information, wherein the message existence information indicates a service flow of a message existing in the target queue and/or a service flow of a message not existing in the target queue; and determining whether the message of the ith service flow exists in the target queue according to the message existence information.
  5. 5. The method according to any of claims 2 to 4, wherein the length of the ith time slice is positively correlated with the length of the message of the ith traffic flow.
  6. 6. The method according to any one of claims 1 to 5, wherein the sending the message in the target queue according to the message scheduling information includes: According to the message scheduling information, the queuing sequence of the messages in the target queue is adjusted to be the target queuing sequence; And sending the messages in the target queue according to the target queuing sequence.
  7. 7. The method according to any one of claims 1 to 6, wherein the message scheduling information includes a mapping relationship between an identification of each of the N traffic flows and a queuing number corresponding to the traffic flow, and a size order of the queuing numbers of the N traffic flows indicates the target queuing order.
  8. 8. The method according to any one of claims 1 to 7, wherein the transmission periods of the messages of the N traffic flows are the same.
  9. 9. The method according to any one of claims 1 to 8, wherein a first transmission period is an integer multiple of a second transmission period, the first transmission period being a transmission period of a message of a first traffic stream of the N traffic streams, the second transmission period being a transmission period of a message of a second traffic stream of the N traffic streams, the second traffic stream being a traffic stream of the N traffic streams having a smallest transmission period, the first traffic stream being a traffic stream of the N traffic streams different from the second traffic stream.
  10. 10. The message scheduling method is characterized by comprising the following steps: Obtaining message scheduling information, wherein the message scheduling information is used for indicating the target queuing sequence of N messages of service flows in a target queue, and N is an integer greater than or equal to 2; and sending the message scheduling information to network equipment.
  11. 11. A messaging device, characterized in that it comprises means for implementing the method of any of claims 1 to 10.
  12. 12. A message scheduling device, comprising a processor and a memory: the processor for executing a computer program or instructions stored in the memory, which, when executed, performs the method of any one of claims 1 to 10.
  13. 13. A chip comprising a processor coupled to a memory for executing a computer program or instructions stored in the memory, which when executed by the processor, performs the method of any of claims 1 to 10.
  14. 14. A computer readable storage medium storing instructions which, when run on a computer, cause the computer to perform the method of any one of claims 1 to 10.
  15. 15. A computer program product, characterized in that computer readable instructions are stored which, when read and executed by a communication device, cause the communication device to perform the method of any of claims 1 to 10.

Description

Message scheduling method and related device Technical Field The present application relates to the field of communications technologies, and in particular, to a method and an apparatus for scheduling messages. Background With the advent of the fourth industrial revolution (industry 4.0), industrial automation is evolving towards more intelligent, interconnected, emphasizing flexible production, personalized customization and service-type manufacturing. By integrating advanced internet technology and physical manufacturing processes, the factory becomes more efficient and secure. The performance of the network can influence the production efficiency, the system stability and the safety, so that the industrial automation has very high performance requirements on the real-time performance, the reliability and the like of the network. For example, for motion control tasks on the order of microseconds or milliseconds, the network is required to have very low latency and jitter. Among the industrial automation message types defined by the international electrotechnical commission (International Electrotechnical Commission, IEC) 60802, the message types such as isochronous streams and periodic streams have high requirements on message egress jitter. Where the egress port delay jitter required for isochronous streams typically requires less than 1 microsecond (us) period and the egress port delay jitter required for streams typically requires less than 20 milliseconds (ms). In order to meet the time-sensitive delay jitter requirement of the output port of the service flow, in the scene that the number of the service flows is large (the number of the service flows is larger than the number of the queues of the output port), the service flow with the same transmission period is mapped into the same queue, and the deterministic transmission of the messages in the queue is controlled through the same queue gate switch, so that the use efficiency of the queue is improved. However, since the paths traveled by the traffic flows as they flow through the network devices are different, the jitter that is caused thereby may be different. Therefore, the order in which traffic flows belonging to the same queue arrive at the queue may also change over time. Because each arriving message is sequentially scheduled in the queue according to the first-in first-out processing strategy, adjacent message jitter of the service flow may not meet the requirement of the output port delay jitter. Disclosure of Invention The application provides a message scheduling method and a related device, which are used for solving the problem that service flow jitter cannot meet the service jitter requirement. The first aspect provides a method for scheduling a message. The method may be applied to a network device. The network device may be a switch, router, virtual switch, firewall device, etc. The method comprises the steps of obtaining message scheduling information, wherein the message scheduling information is used for indicating target queuing sequences of N messages of service flows in a target queue, N is an integer greater than or equal to 2, and sending the messages in the target queue according to the message scheduling information. The message scheduling information indicates the target queuing sequence of the messages of N service flows in the target queue, and the messages queued according to the target queuing sequence can be sent from the target queue according to the message scheduling information, so that the messages of the same service flow can be sent in fixed time slices of different time windows of the target queue, jitter among different messages of the same service flow can be controlled, and the delay jitter requirement of the service flow can be met. In one possible implementation manner, the time window for sending the message in the target queue includes N time slices, and an ith time slice in the N time slices in the time domain is used for sending the message of the ith service flow in the target queuing sequence, where i is an integer greater than or equal to 1 and less than or equal to N, and sending the message in the target queue includes not sending the message in the ith time slice if the message of the ith service flow does not exist in the target queue. For the message of the service flow which does not exist in the target queue, when the message in the target queue is sent, the time slice corresponding to the service flow which does not exist in the target queue does not send the message, namely the time slice is idle, and other messages in the target queue are not sent in the time slice, so that the jitter of other service flows is ensured to be in an acceptable range, and the high-quality isochronous communication is ensured. In one possible implementation, sending the message in the target queue includes sending the message of the ith traffic flow in the ith time slice if the message of the ith traffic flow