Scheduling method and communication apparatus

By configuring the highest scheduling priority for audio and video service flows and performing weighted round-robin scheduling, the problem of large transmission latency for audio and video service flows was solved, and low-latency transmission was achieved.

WO2025112019A9PCT designated stage Publication Date: 2026-05-28HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2023/135742
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-11-30
Publication Date
2026-05-28

AI Technical Summary

Technical Problem

When multiple service flows are transmitted through the same device port, the transmission latency of service flows that require latency guarantees, such as audio and video, is relatively large and is affected by link management and network management service flows.

Method used

Configure the highest scheduling priority for service flows that require latency protection, such as audio and video, and ensure that their priority is higher than other service flows through weighted round-robin scheduling and strict priority scheduling to reduce the impact of latency.

Benefits of technology

It reduces the transmission latency of audio and video services, improves the user experience, and ensures that audio and video services are not affected by the latency of other services.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2023135742_28052026_PF_FP_ABST
    Figure CN2023135742_28052026_PF_FP_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of media. Provided in the embodiments are a scheduling method and a communication apparatus, which can reduce the transmission delay of service streams, such as videos and audios, requiring delay guarantees. The method comprises: configuring a scheduling priority for each output stream of a plurality of output streams transmitted by a first output port, the plurality of output streams comprising at least one first output stream, the first output stream comprising a transport layer data packet (TLDP) of a video and audio, the priority of the TLDP of the video and audio being a first priority, the first priority being the highest priority among the priorities of packets of the plurality of output streams and a second output stream, and the second output stream comprising a transport layer management data packet (TLMDP); and, according to the scheduling priority configured for each output stream of the plurality of output streams, scheduling the plurality of output streams and the second output stream. The embodiments of the present application are used for processes of scheduling packets.
Need to check novelty before this filing date? Find Prior Art

Description

A scheduling method and a communication device Technical Field

[0001] This application relates to the field of media technology, and in particular to a scheduling method and a communication device. Background Technology

[0002] When multiple service flows are transmitted through the same device port, the device needs to perform bandwidth scheduling management for each service flow. Bandwidth scheduling management can be understood as prioritizing and managing the bandwidth of the packets of the service flows to be sent.

[0003] These various service flows can be broadly categorized into three types: link management service flows, network management service flows, and ordinary service flows. During priority management, ordinary service flows have a lower priority than link management and network management service flows. Therefore, when ordinary service flows include audio / video services requiring latency guarantees, these services will be affected by the link management and network management service flows during priority scheduling, resulting in greater packet transmission delays for these services.

[0004] Summary of the Invention

[0005] This application provides a scheduling method and a communication device that can reduce the transmission latency of service flows such as audio and video that require latency protection.

[0006] In a first aspect, a scheduling method is provided, the method comprising: configuring a scheduling priority for each of a plurality of output streams transmitted through a first output port, the plurality of output streams including at least one first output stream, the first output stream including a Transport Layer Data Message (TLDP) for audio and video, the scheduling priority of the TLDP for audio and video being a first priority, the first priority being the highest priority among the scheduling priorities of the plurality of output streams and a second output stream, the second output stream including a Transport Layer Management Data Message (TLMDP); and scheduling the plurality of output streams and the second output stream according to the scheduling priority configured for each of the plurality of output streams.

[0007] This method can be applied to a communication device, which can be understood as an interface device. The first output port can be one of multiple physical ports of the communication device. The communication device can configure the priority of messages transmitted to each of the multiple output ports, including the first output port. In some scenarios, the first output port can not only send messages but also receive messages.

[0008] In contrast to existing methods that transmit all ordinary service flows, including audio and video service flows, after network management service flows, resulting in significant transmission delays for audio and video service flows, this application addresses the issue of high transmission delays for audio and video TLDPs when scheduling messages from multiple output flows. Specifically, for audio and video TLDPs, the priority of the audio and video TLDP is higher than the priority of messages from other output flows, and also higher than the priority of TLMDPs. Therefore, during output flow scheduling, the scheduling delay of audio and video TLDPs is unaffected by the delay of TLMDPs. TLMDPs can be understood as messages from management service flows, thus being unaffected by the delay of network management service flows. Furthermore, audio and video TLDPs are unaffected by the priority of output flows other than the highest priority among the multiple output flow messages, resulting in lower transmission delays for audio and video TLDPs.

[0009] In one possible embodiment, the method further includes: performing weighted round-robin scheduling on output streams of the same priority among the multiple output streams; scheduling the multiple output streams and the second output stream according to the scheduling priority configured for each output stream among the multiple output streams includes: performing strict priority scheduling on the multiple output streams and the second output stream according to the output of the weighted round-robin scheduling on the multiple output streams and the second output stream based on the scheduling priorities of the multiple output streams and the second output stream. Thus, after weighted round-robin scheduling and strict priority scheduling, the transmission latency of the audio / video TLDP is unaffected by the latency of TLMDP, and also unaffected by the packet latency of other output streams besides the first output stream among the multiple output streams, resulting in lower transmission latency for the audio / video TLDP.

[0010] In one possible implementation, the scheduling priority of TLMDP is the second priority, and the scheduling priority of output streams other than the second output stream is a priority other than the second priority. That is, only the packets of the second output stream, i.e., the TLMDP, have the second priority. In this way, when transmitting the second output stream, the transmission of the TLMDP of the second output stream is not affected by other packets other than TLMDP, and the transmission latency of TLMDP is low.

[0011] In one possible embodiment, the scheduling priorities of the multiple output streams, excluding the first and second priorities, are lower than the second priority. This is equivalent to the TLMDP having a higher priority than the other output streams besides the first one. When transmitting the TLMDP, it is unaffected by the other output streams, resulting in lower transmission latency.

[0012] In one possible embodiment, configuring scheduling priorities for messages of each of the multiple output streams transmitted through the first output port includes: configuring outflow scheduling information for each output virtual channel of the first output port. The outflow scheduling information includes priority information for the output virtual channel, which indicates the scheduling priority of the output stream corresponding to the output virtual channel. This is equivalent to messages of the same output stream having the same output virtual channel. Thus, by configuring outflow scheduling information for each output virtual channel, it is equivalent to configuring a priority for messages of each output stream, enabling the communication device to schedule the output streams according to the priority of the messages in the output stream.

[0013] In one possible embodiment, different output virtual channels of the first output port correspond to different output streams. Thus, when scheduling multiple output streams, the communication device can determine the priority of the packets corresponding to the output streams according to the output virtual channel configuration outflow scheduling information, and schedule the multiple output streams according to the priority of the packets in different output streams.

[0014] In one possible implementation, TLMDP is transmitted through the first output virtual channel. Alternatively, TLMDP is fixed to be transmitted through the first output virtual channel.

[0015] In one possible embodiment, the method further includes: performing strict priority scheduling on Transport Layer Common Management Message (TLCMP), which includes Transport Layer Credit Recovery Message (TLCRP); wherein, when the scheduling priority of TLCRP is the third priority and the scheduling priority of messages other than TLCRP in TLCMP is the fourth priority, the third priority is higher than the first priority, the fourth priority is lower than the first priority, and the fourth priority is higher than the second priority.

[0016] Therefore, during strict priority scheduling, when scheduling messages from multiple output streams, secondary output streams, and link management service streams, the scheduling order from highest to lowest priority is as follows: third-priority TLCRP; messages from the first-priority streams that undergo WRR scheduling; fourth-priority messages, i.e., messages in TLCMP other than TLCRP; second-priority TLMDP; and messages from output streams of other priorities besides the first and second priorities. This is because TLCRP is used by the TLDP receiver to notify the TLDP sender of the credits to be recovered. Credits are used to track the buffer space of the receiver's RBuff, which involves whether the receiver has enough space to buffer TLDP (data service streams) to ensure that the RBuff of the link receiver does not overflow. Therefore, TLCRP requires a shorter transmission latency and is a latency-sensitive link management message, which can be configured as a third priority, higher than the first priority of audio / video TLDP. Thus, when TLCMP participates in strict priority scheduling, the transmission delay of TLCRP in TLCMP is short and is not affected by the delay of TLDP for audio and video, messages other than TLCRP in TLCMP, TLMDP, and messages other than TLDP for audio and video in multiple output streams.

[0017] In one possible embodiment, messages in TLCMP other than TLCRP include at least one of the following: Transport Layer Credit Allocation Message (TLCAP), Transport Layer Credit Allocation Acknowledgment Message (TLCAP_ACK), Transport Layer Credit Consumption Message (TLCCP), and Transport Layer Flow Control Anomaly Notification Message (TLFCENP). That is, compared to the transmission delay required by TLCRP, the transmission delay of messages in TLCMP other than TLCRP can be relatively longer, and they can be considered delay-insensitive link management messages. For audio / video TLDP, its transmission delay is also unaffected by the transmission delay of messages in TLCMP other than TLCRP; the transmission delay of audio / video TLDP is relatively low.

[0018] In one possible embodiment, the outflow scheduling information also includes weight information, which indicates the scheduling weight of the output flows corresponding to the output virtual channel when they are weighted and round-robin scheduled with the same priority. That is, when output flows of the same message type or service type are configured with the same priority, they can be scheduled according to the weight information. This ensures that messages with higher weights benefit from the scheduling.

[0019] In one possible embodiment, weighted round-robin scheduling of output streams with the same priority among multiple output streams includes: weighted round-robin scheduling of output streams with the same priority on a per-packet basis, according to the weight information of the output streams corresponding to the output virtual channels with the same priority among the multiple output streams. That is, when scheduling each output stream, multiple consecutive packets can be scheduled on a per-packet basis according to the weight information.

[0020] In one possible implementation, the number of packets scheduled in a weighted round-robin arrangement of the third output stream (which can be any one of the multiple output streams) is proportional to the weight of the third output stream. This ensures that for the same priority, a larger number of packets are scheduled for the output stream with the higher weight each time, guaranteeing the benefits for packets with higher weights.

[0021] In one possible embodiment, the total number of priorities configured for the multiple output streams and the second output stream is 8. Of course, this application does not limit the total number of priorities to 8; it may have more than 8 or less than 8 priorities.

[0022] In a second aspect, a communication device is provided, comprising: a configuration module, configured to configure a scheduling priority for each of a plurality of output streams transmitted through a first output port, the plurality of output streams including at least one first output stream, the first output stream including a Transport Layer Data Message (TLDP) for audio and video, the priority of the TLDP for audio and video being a first priority, the first priority being the highest priority among the priorities of the messages of the plurality of output streams and the second output stream, and the second output stream including a Transport Layer Management Data Message (TLMDP); and a scheduling module, configured to schedule the plurality of output streams and the second output stream according to the scheduling priority configured for each of the plurality of output streams.

[0023] In one possible embodiment, the scheduling module is further configured to: perform weighted round-robin scheduling on output streams of the same priority among multiple output streams; and perform strict priority scheduling on multiple output streams and the second output stream based on the scheduling priorities of the multiple output streams and the second output stream, and the output of the weighted round-robin scheduling of output streams of the same priority among multiple output streams.

[0024] For the beneficial effects of the second aspect, please refer to the explanation of the first aspect.

[0025] In one possible embodiment, the scheduling priority of TLMDP is the second priority, and the scheduling priority of output streams other than the second output stream is a priority other than the second priority.

[0026] In one possible embodiment, the scheduling priorities of the multiple output streams are lower than the second priority, except for the first and second priorities.

[0027] In one possible embodiment, the configuration module is configured to: configure outflow scheduling information for each output virtual channel of the first output port, the outflow scheduling information including priority information of the output virtual channel, the priority information being used to indicate the scheduling priority of the output stream corresponding to the output virtual channel.

[0028] In one possible embodiment, different output virtual channels of the first output port correspond to different output streams.

[0029] In one possible embodiment, TLMDP is transmitted through the first output virtual channel.

[0030] In one possible embodiment, the scheduling module is further configured to: perform strict priority scheduling on Transport Layer Common Management Messages (TLCMP), which include Transport Layer Credit Recovery Messages (TLCRP); wherein, when the scheduling priority of TLCRP is the third priority and the scheduling priority of messages other than TLCRP in TLCMP is the fourth priority, the third priority is higher than the first priority, the fourth priority is lower than the first priority, and the fourth priority is higher than the second priority.

[0031] In one possible embodiment, the messages in TLCMP other than TLCRP include at least one of the following: Transport Layer Credit Allocation Message (TLCAP), Transport Layer Credit Allocation Acknowledgment Message (TLCAP_ACK), Transport Layer Credit Consumption Message (TLCCP), and Transport Layer Flow Control Anomaly Notification Message (TLFCENP).

[0032] In one possible embodiment, the outflow scheduling information also includes weight information, which is used to indicate the scheduling weight when the output streams corresponding to the output virtual channels are weighted and round-robin scheduled at the same priority.

[0033] In one possible embodiment, the scheduling module is further configured to: perform weighted round-robin scheduling of output streams of the same priority on a per-packet basis, based on the weight information of the output streams corresponding to the output virtual channels of the same priority among multiple output streams.

[0034] In one possible embodiment, the number of packets when performing weighted round-robin scheduling on a third output stream among multiple output streams is proportional to the weight of the third output stream, which is any one of the multiple output streams.

[0035] In one possible embodiment, the total number of priorities configured for the messages of the multiple output streams and the second output stream is 8.

[0036] Thirdly, a communication device is provided, including a module for performing methods as described in the first aspect and any possible embodiments thereof.

[0037] Fourthly, a communication device is provided, including a processor and a memory coupled together, the processor being configured to execute a computer program or instructions stored in the memory to cause the communication device to perform the methods described in the first aspect and any possible embodiment of the first aspect.

[0038] Fifthly, a communication system is provided, including a first communication device and a second communication device, wherein the first communication device performs the method as described in the first aspect and any possible embodiment of the first aspect, and a communication connection is established between the first communication device and the second communication device.

[0039] In a sixth aspect, a computer-readable storage medium is provided, wherein computer instructions are stored therein, which, when executed on a communication device, cause the communication device to perform the method as described in the first aspect and any possible embodiment of the first aspect.

[0040] A seventh aspect provides a computer program product including computer instructions that, when executed on a communication device, cause the communication device to perform the method as described in the first aspect and any possible embodiment of the first aspect.

[0041] Eighthly, a chip is provided that stores computer-executable instructions, wherein when the computer-executable instructions are executed, the methods of the first aspect and any possible design embodiment of the first aspect are performed. Attached Figure Description

[0042] Figure 1 is a schematic diagram of the architecture of a communication system that directly connects devices according to an embodiment of this application;

[0043] Figure 2 is a schematic diagram of the basic components of an electronic device 20 provided in an embodiment of this application;

[0044] Figure 3 is a schematic diagram of inter-interface transmission provided in an embodiment of this application;

[0045] Figure 4 is a schematic diagram of a protocol stack structure for data transmission between devices via a link, according to an embodiment of this application.

[0046] Figure 5 is a flowchart illustrating a scheduling method provided in an embodiment of this application;

[0047] Figure 6 is a schematic diagram of a transport layer packet forwarding model of a unified multimedia interconnection router provided in an embodiment of this application;

[0048] Figure 7 is a schematic diagram of a virtual channel provided in an embodiment of this application;

[0049] Figure 8 is a flowchart illustrating a scheduling method provided in an embodiment of this application;

[0050] Figure 9 is a schematic diagram of the framework of a link transmission adapter for a unified multimedia interconnection physical port provided in an embodiment of this application;

[0051] Figure 10 is a flowchart illustrating a scheduling method provided in an embodiment of this application;

[0052] Figure 11 is a schematic diagram of a bandwidth manager performing secondary scheduling according to an embodiment of this application;

[0053] [Correction 02.01.2024 based on Rule 91] Figure 12 is a schematic diagram of an audio-visual transmission scenario provided by an embodiment of this application;

[0054] [Correction 02.01.2024 based on Rule 91] Figure 13 is a schematic diagram of a bandwidth manager performing secondary scheduling according to an embodiment of this application;

[0055] [Correction 02.01.2024 based on Rule 91] Figure 14 is a schematic diagram of the structure of a communication device provided in an embodiment of this application; [0055.1] [Correction 02.01.2024 according to Rule 91] Figure 15 is a schematic diagram of the structure of a communication device provided in an embodiment of this application. Detailed Implementation

[0056] The technical solutions of the embodiments of this application will be described below with reference to the accompanying drawings. In the description of the embodiments of this application, unless otherwise stated, " / " means "or," for example, A / B can mean A or B; "and / or" in this text is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Furthermore, in the description of the embodiments of this application, "multiple" refers to two or more than two.

[0057] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this embodiment, unless otherwise stated, "a plurality of" means two or more.

[0058] This application embodiment can be used for scenarios involving signal transmission between devices. Devices can be directly connected, or multiple devices can be connected through a routing device. Signal transmission (sending and receiving) between devices can be wired or wireless. Signal transmission between devices can be direct or through an interface device, and the signals can be transmitted to the internal processing unit of the device via its internal bus.

[0059] For example, Figure 1(a) shows a schematic diagram of the architecture of a communication system 10a that directly connects devices. Devices 101 and 102 are connected by cables, with interface 1011 in device 101 and interface 1021 in device 102, to enable signal transmission between devices 101 and 102, such as the transmission of audio and video data and short-distance transmission of charging signals. For example, as shown in Figure 1(a), device 101 is a set-top box and device 102 is a television, with audio and video data transmitted between the interfaces of the set-top box and the television via cables. Alternatively, device 101 may be a monitor and device 102 may be a game controller, with control information transmitted between the interfaces of the monitor and the game controller via cables.

[0060] Figure 1(b) shows a schematic diagram of the architecture of a communication system 10b in which devices are connected via a routing device. Devices 103 to 105 are all connected to the routing device 106 via cables. Signal transmission between the interfaces of the devices can be performed through the routing device, such as the transmission of audio and video data and short-distance transmission of charging signals. In this scenario, each device's interface is connected to the interface of the routing device, and all signal transmission between device interfaces must be transmitted through the interface of the routing device. For example, device 103 is a monitor, device 104 is a set-top box, and device 105 is an audio player. The interface of the set-top box 104 transmits audio and video data to the interface of the routing device 106, and the interface of the routing device 106 transmits audio and video data to the interface of the monitor 103. Alternatively, the interface of the monitor 103 transmits audio data to the interface of the audio player 105 through the interface of the routing device 106.

[0061] In both of the aforementioned communication systems, the devices interconnected via interfaces can be various electronic devices, such as personal computers, laptops, mobile phones, digital cameras, digital televisions, audio equipment, DVD players, set-top boxes, game consoles, printers, mice, keyboards, and home appliances. The transmitted signals can be audio signals, video signals, internet data, IoT data, and charging signals, among others.

[0062] To accommodate diverse signal transmission needs, the industry has defined various interface specifications for signal transmission between devices, such as the Universal Serial Bus (USB) interface specification, the High Definition Multimedia Interface (HDMI) specification, the DisplayPort (DP) interface specification, the Unified Multimedia Interconnection (UMMI) interface specification, and the Peripheral Component Interconnect Express (PCI-Express) interface specification. Correspondingly, interfaces can be HDMI, miniHDMI, micro HDMI, Type-A, Type-B, Micro-B, and Type-C, etc.

[0063] For example, in the aforementioned short-distance transmission scenarios via cable interconnection, the connection between the set-top box / speaker and the TV, or the connection between the game console and the TV, can be made via a USB cable, following the USB interface standard; or via an HDMI cable, following the HDMI interface standard; or via a DP cable, following the DisplayPort interface standard.

[0064] This application also provides an alternative interface standard to the aforementioned interface standards (such as USB or HDMI): the Unified Multimedia Interconnecter (UMI) interface. The UMI interface can perform both data transmission and charging functions. Of course, the UMI interface can also be other interface names; when the UMI interface is replaced with another interface name, that other interface can be used to implement the functions of the UMI interface in this application.

[0065] In this application, the unified multimedia interconnect interface also supports direct device-to-device connection or multi-device network connection (e.g., devices connected via routing devices or devices connected via docking stations). Devices can be any electronic device or component. When a device is an electronic device, it includes, for example, a personal computer, monitor, audio / video equipment, digital device, printer, router, game console, and in-vehicle equipment; such electronic devices include the unified multimedia interconnect interface. When a device is a component, it can be understood as any interface device (interface apparatus / interface component), and the interface device is the unified multimedia interconnect interface.

[0066] In this application, signals can be transmitted (send and receive) between devices via wired or wireless means. Signals can be transmitted directly between devices, or via an interface device (e.g., the interface device of a router), and then transmitted to the processing unit within each device via a bus.

[0067] When the devices are electronic devices, they can be interconnected through a unified multimedia interconnection interface, similar to the scenario shown in Figure 1(a). For example, the unified multimedia interconnection interface of a set-top box and a television transmits signals through a cable connection.

[0068] When the device is an interface device, it can be a chip, meaning there is interconnection between chips. The chip can be an interface chip found in electronic devices / cables / docking stations / adapters / routers. Docking stations can connect to gigabit Ethernet ports, video graphics array (VGA) interfaces, HDMI ports, TF cards (trans-flash cards), SD cards (secure digital memory cards), charging ports, and USB ports, etc.

[0069] In this application, when the device is a chip, the chip may include an interface module; that is, this application can be applied to an interface module for interconnecting chips. This interface module can be understood as an IP integrated inside the chip. Alternatively, the interface module can also be sold independently as a separate IP.

[0070] For example, when the chip is a system-on-chip (SoC), central processing unit (CPU), or graphics processing unit (GPU), this application can be applied to the interface modules of SoC, CPU, and GPU chips. When the chip is a small chip such as a die, the interface module can be understood as the transmitting and / or receiving circuits in the die. The chip can also be an input / output (I / O) die that only includes interface functions.

[0071] In this application, when the device is an electronic device, Figure 2 shows a basic component diagram of an electronic device 20. The electronic device 20 includes an interface chip 200 (Unified Multimedia Interconnect Interface), which includes one or more adapters 201, one or more management adapters (or management control adapters) 202, and one or more ports 203. Alternatively, when the electronic device 20 is a routing device, the interface chip 200 only includes one or more ports 203. Each of the one or more adapters 201 can be coupled to an external component of the interface chip 200. The one or more management adapters 202 can be coupled to external components of the interface chip 200 used for management and control. The port 203 can be coupled to a connector 204 of the electronic device 20, which is used to couple external devices of the electronic device 20. One or more adapters 201 can be transmit / receive adapters. For example, when adapter 201 is used for audio / video format adaptation, adapter 201 can be an audio / video transmit / receive adapter. When adapter 201 is used for third-party protocol adaptation, adapter 201 can be a third-party protocol adapter.

[0072] For example, when port 203 is a downlink port, the transmitting adapter can be used to adapt the service information to be sent into service information that can be transmitted on port 203 of the interface chip, and then send the service information out through port 203. When port 203 is an uplink port, the receiving adapter 201 can be used to adapt the service information received from port 203 into service information that is processed internally by the electronic device 20 for internal processing. The management and control adapter 202 can be used to adapt control information.

[0073] Different electronic devices 20 can be combined with their basic components to form various different device types. For example, electronic device 20 may include a source device with at least one downlink port and at least one audio / video transmission adapter, or a source device with at least one uplink port and an audio / video reception adapter, or a docking station device with at least one uplink port, at least one audio / video reception adapter and at least one conventional audio / video interface, or a routing device with at least one downlink port and at least one uplink port, but without audio / video transmission adapter and audio / video reception adapter, or a composite device with both uplink and downlink ports.

[0074] Figure 3 shows a schematic diagram of inter-interface transmission provided in an embodiment of this application. In a unified multimedia interconnection system, the uplink and downlink ports between devices include a main link (ML) and a sideband link (SL). Further, they may also include a powerbus link (PL) and a cable information link (CL). The cable information link can be used to transmit cable information, such as cable type and cable capability information.

[0075] The primary link is used for high-speed data transmission, such as audio and video signal transmission, while the secondary link is mainly used for device management and control, such as device discovery, capability query, device configuration, and device control. It can also be used for low-speed data transmission and control message transmission. For example, in this application, audio and video service flows are transmitted on the primary link of one port, and network management service flows are transmitted on the secondary link of one port.

[0076] In some scenarios, the main link consists of one or more lanes, each unidirectional, while the auxiliary link consists of two unidirectional lanes in different directions. Alternatively, some lanes in the main link are unidirectional, while others are bidirectional, and the auxiliary link is bidirectional. A main link can include multiple lanes, such as 2, 5, or 9 lanes. The more lanes, the faster the data transmission speed. That is, downlink ports can be used for both sending and receiving, and uplink ports can also be used for both.

[0077] In addition, both uplink and downlink ports can include multiple pins, such as pins connected to ground, pins connected to power, pins connected to the main link channel, and pins connected to the auxiliary link channel.

[0078] Figure 4 shows a schematic diagram of a protocol stack 40 structure for data transmission between devices via a link, including an adapter layer, a transport layer, and a physical layer. The physical layer includes a logic layer and an electrical layer.

[0079] The adaptation layer is responsible for the interface chip (switch) and external components. Its functions include data transmission adaptation, data reception adaptation, third-party protocol adaptation (protocol tunnel adaptation), and management adaptation (management and control adaptation). Data transmission adaptation involves adapting source data received from the device's application before sending it to the transport layer. Data reception adaptation involves adapting data received from the transport layer before sending it to the application for processing. Third-party protocol adaptation can be used to receive data from the transport layer, adapt it to obtain third-party protocol data, and transmit it to the application for processing, or to receive third-party protocol data from the application, adapt it, and send it to the transport layer. Management adaptation involves adapting control information received from the transport layer and performing management and control based on the adapted control information, or adapting control information generated during the management and control process before sending it to the transport layer.

[0080] The transport layer is responsible for processing and forwarding service information and control information. For example, it can process and forward service streams such as video, audio, and third-party protocol tunnels, as well as management and control information, and perform bandwidth management for all service streams. For instance, the transport layer can transmit multiple output streams as described in this application, including the first output stream of the audio / video TLDP and network management service streams.

[0081] The logic layer is responsible for line encoding and decoding, scrambling and descrambling, forward error correction (FEC) encoding and decoding, and link training.

[0082] The electrical layer is responsible for signal equalization, spread spectrum, and clock recovery. The logic layer and electrical layer can also be collectively referred to as the physical layer.

[0083] Based on the above introduction, in some scenarios, when service flows are transmitted between devices, these service flows can be divided into three categories: link management service flows, network management service flows, and ordinary service flows. Link management service flows may include, for example, flows for link anomaly notifications and buffer allocation flows. Network management service flows may include, for example, flows of control information generated during management and control processes. Ordinary service flows may include, for example, audio / video service flows and USB service flows.

[0084] Currently, when audio and video services requiring latency guarantees participate in scheduling, they are affected by link management and network management services. This means that the scheduling priority of link management and network management services is higher than that of audio and video services requiring latency guarantees. Consequently, packets from audio and video services requiring latency guarantees cannot be output immediately. This delay includes delays caused by the following services: low-priority ordinary services, network management services, other audio and video services, and link management services that arrive earlier than the current audio and video service requiring latency guarantees. Therefore, the packet transmission delay for audio and video services requiring latency guarantees is relatively large.

[0085] Therefore, this application proposes a scheduling method in which a scheduling priority can be configured for each of multiple service flows transmitted on a first port. The multiple service flows include at least one service flow requiring latency protection, and the priority of the service flow requiring latency protection is a first priority, which is the highest priority among the priorities of the messages of the multiple service flows and the network management service flow. The service flow requiring latency protection is, for example, an audio / video service flow. Then, the multiple service flows and the network management service flow can be scheduled according to the scheduling priority configured for each of the multiple service flows. In this way, for audio / video services requiring latency protection, their output latency will not be affected by the network management service flow or other service flows with lower priorities than the service flow requiring latency protection. The output latency of the service flow requiring latency protection is shorter, resulting in a higher user experience.

[0086] To facilitate understanding, we will first introduce some of the message types involved in this application.

[0087] In Unified Multimedia Interconnection, transport layer messages include transport layer data packets (TLDP) and transport layer management packets (TLMP).

[0088] Examples of TLDPs include the audio / video TLDP, USB3 TLDP, and the TLDP of the peripheral component interconnect express (PCIe) bus, as described in this application. TLDPs also include the transport layer management data packet (TLMDP) described in this application. TLMDPs can be used, for example, to manage and configure the transmitted service data stream, such as priority configuration.

[0089] TLMP is used for management at both ends of the link, generated and terminated at the transport layer at both ends of the link. TLMP includes TLMP for coexistence of primary and secondary links (Transport Layer Common Link Management Packet (TLCMP)). TLCMP includes at least one of the following: Transport Layer Credit Recycled Packet (TLCRP), Transport Layer Credit Allocated Packet (TLCAP), Acknowledgement for Transport Layer Credit Allocated Packet (TLCAP_ACK), Transport Layer Credit Consumed Packet (TLCCP), or Transport Layer Flow Control Error Notification Packet (TLFCENP).

[0090] In this process, the TLDP receiver communicates the assigned credit notification link to the TLDP sender via TLCAP.

[0091] TLCAP_ACK is used to respond to TLCAP.

[0092] TLCCP is used by the TLDP sender to notify the TLDP receiver of the credits consumed.

[0093] TLCRP is used by the TLDP receiver to notify the TLDP sender of the credits that have been recovered.

[0094] TLFCENP is used by the TLDP sender to notify the TLDP receiver of flow control anomalies.

[0095] Credits are used to track the buffer space of the receiver's receive buffer. For example, one credit represents 32 bytes. The number of credits used by a message is (number of bytes in the message / 32) rounded up.

[0096] Based on the above overview, the embodiments of this application will be described below.

[0097] Figure 5 shows a flowchart of a scheduling method provided in an embodiment of this application. The method includes the following steps.

[0098] 501. The communication device configures a scheduling priority for each of the multiple service flows transmitted on the first port. The multiple service flows include at least one service flow that requires delay protection. The scheduling priority of the service flow that requires delay protection is the first priority. The first priority is the highest priority among the scheduling priorities of the multiple service flows and the network management service flow.

[0099] In some embodiments, the communication device is an electronic device or interface device (or port device) or interface chip in the above application scenarios. When the communication device is an electronic device, the electronic device may be, for example, a source device, a destination device, a routing device, a docking station, or a composite device. When the transmitting side is an interface device, the interface device may be, for example, an interface chip. The interface chip may be, for example, an interface chip of a source device, a destination device, a routing device, a docking station, or a composite device.

[0100] Source devices, destination devices, and composite devices include electronic devices such as personal computers, monitors, audio-visual equipment, digital devices, printers, routers, game consoles, and in-vehicle equipment.

[0101] In some embodiments, the communication device is the transmitting side, and the first port is a downlink port, an output port, or a transmitting port. Of course, the first port can also receive messages from the receiving end when transmitting service flows.

[0102] In some embodiments, some service flows among multiple service flows may be transmitted on the main link of the first port, and some service flows may be transmitted on the auxiliary link of the first port. For example, the service flow requiring latency protection is an audio / video service flow, which is transmitted on the main link of the first port, and the network management service flow is transmitted on the auxiliary link of the first port.

[0103] In some embodiments, the aforementioned multiple service flows can be understood as service flows of transport layer data packets, and the packets in service flows that require latency protection, such as audio and video, can all be understood as transport layer data packets (TLDP).

[0104] In some embodiments, the service flows other than those requiring latency guarantees among the multiple service flows are, for example, PCIe service flows or USB3 service flows. That is, PCIe service flows or USB3 service flows can also be understood as transport layer data packet service flows.

[0105] In some embodiments, network management service flows may transmit management and control information for services such as audio and video, as well as bandwidth management for such services. The messages in a network management service flow may be, for example, TLMDP.

[0106] In some embodiments, the scheduling method can occur at the transport layer of the communication device. That is, when the first port receives a service flow sent from the data transmission adapter of the adaptation layer at the transport layer, the transport layer can configure a scheduling priority for each service flow, and configure the scheduling priority of the service flow that requires delay guarantee as the highest priority among the message of multiple service flows and the scheduling priority of the network management service flow.

[0107] In some embodiments, the communication device may configure the scheduling priority for each of the multiple service flows transmitted on the first port by means of management data packets, such as TLMDP.

[0108] In some embodiments, the scheduling priority of network management service flows is the second priority, and the scheduling priority of service flows other than network management service flows is a priority other than the second priority. This can be understood as meaning that the priority of packets from service flows other than network management service flows cannot be configured to the second priority. In this way, while ensuring low transmission latency for service flows requiring latency protection, the transmission latency of network management service flows can also be guaranteed to be low.

[0109] In some embodiments, the scheduling priorities of multiple service flows are lower than the second priority, except for the first and second priorities. Thus, when the first priority is the highest priority, the transmission of the second priority is not affected by other service flows besides those requiring latency guarantees, ensuring that the transmission latency of network management service flows is also low.

[0110] In some embodiments, configuring a scheduling priority for each of the multiple service flows transmitted through the first port includes configuring outflow scheduling information for each virtual channel of the multiple service flows transmitted through the first port. The outflow scheduling information includes priority information of the virtual channel, which is used to indicate the scheduling priority of the service flow corresponding to the virtual channel.

[0111] This can be understood as each port of the communication device comprising multiple virtual channels, each virtual channel capable of transmitting a service stream. Different virtual channels on each port transmit messages for different service streams.

[0112] 502. The communication device schedules multiple service flows and network management service flows according to the scheduling priority configured for each service flow in the multiple service flows.

[0113] Thus, when the first priority of the message of the service flow requiring delay guarantee is the highest priority among the scheduling priorities of multiple service flows and network management service flows, it is equivalent to the first priority of the service flow requiring delay guarantee being higher than the scheduling priority of the network management service flow, and the first priority of the message of the service flow requiring delay guarantee being higher than the scheduling priority of other service flows among the multiple service flows besides the service flow requiring delay guarantee. If scheduling is performed according to the scheduling priorities of multiple service flows and network management service flows, the service flow requiring delay guarantee can be scheduled with priority over network management service flows, and with priority over other service flows among the multiple service flows besides the service flow requiring delay guarantee and network management service flows. Compared to the existing method of prioritizing network management service flows over service flows requiring delay guarantee, this application can reduce the transmission latency of the service flow requiring delay guarantee when the transport layer transmits multiple service flows.

[0114] In some embodiments, prior to step 502, the method may further include: the communication device performing weighted round-robin (WRR) scheduling on service flows of the same priority among multiple service flows.

[0115] In some embodiments, service flows with the same priority are service flows of the same service type (or the same message type), that is, service flows of the same service type have the same priority.

[0116] For example, service types include audio / video, PCIe, and USB3.

[0117] In some embodiments, the outflow scheduling information configured for each virtual channel also includes weight information, which is used to indicate the scheduling weight of the service flows corresponding to the virtual channel when performing WRR at the same priority.

[0118] In some embodiments, weighted round-robin scheduling of output flows of the same priority among multiple service flows includes: performing WRR scheduling on a per-packet basis according to the weight information of the service flows corresponding to virtual channels of the same priority among multiple service flows. That is, WRR scheduling is performed on a per-packet basis.

[0119] For example, there are multiple audio / video service flows, and the packets of these multiple audio / video service flows have the same priority. These multiple audio / video service flows can be scheduled according to WRR, that is, WRR scheduling is performed according to the weight corresponding to each audio / video service flow. For example, when multiple audio / video service flows are sent from the first port of the communication device to different receiving ends through the routing device, the first receiving end is set to high-definition playback and receives the first audio / video service flow from the multiple audio / video service flows, while the second receiving end is set to standard-definition playback and receives the second audio / video service flow from the multiple audio / video service flows. The weight of the first audio / video service flow is greater than the weight of the second audio / video service flow.

[0120] In some embodiments, the weight of high-definition (HD) video service flows is configured to be greater than that of standard-definition (SD) video service flows. Because HD video service flows have a higher weight, they can transmit more packets / data over a given period, or in other words, their transmission efficiency is higher. Conversely, because SD video service flows have a lower weight, they can transmit fewer packets / data over the same period, or in other words, their transmission efficiency is lower compared to HD video service flows.

[0121] In some embodiments, the number of packets when performing WRR on a third service flow among multiple service flows is proportional to the weight of the third service flow, which is any output flow among the multiple service flows. That is, for service flows of the same priority, the higher the weight value of the service flow, the more packets are scheduled for the service flow each time, and the lower the weight value of the service flow, the fewer packets are scheduled for the service flow each time. In this way, the transmission efficiency of service flows with high weights can be improved.

[0122] In some embodiments, network management service flows are transmitted on the first virtual channel. This can be understood as network management service flows being transmitted on a fixed virtual channel with a dedicated second priority. Network management service flows do not participate in WRR scheduling.

[0123] Based on the result of WRR scheduling of service flows with the same priority among multiple service flows, the scheduling of multiple service flows and network management service flows according to the scheduling priority configured for each service flow among multiple service flows in step 502 above may include: the communication device performing strict priority (SP) scheduling of multiple service flows and network management service flows according to the scheduling priority of multiple service flows and network management service flows, and the output of weighted round-robin scheduling of service flows with the same priority among multiple service flows.

[0124] SP scheduling can also be called absolute priority scheduling. SP scheduling strictly follows the order of priority from high to low, sending packets in the higher priority queue first, and then sending packets in the lower priority queue when the higher priority queue is empty.

[0125] In some embodiments, the output of weighted round-robin scheduling of service flows with the same priority among multiple service flows can be understood as the result of round-robin scheduling of multiple service flows with the same priority according to the weight of each service flow, that is, the result of round-robin scheduling of the message order of multiple service flows according to the weight and sorting them into a message queue.

[0126] In some embodiments, the total number of priorities configured for multiple service flows and network management service flows is eight. This is equivalent to classifying the service types of the service flows into eight categories, including multiple service flows of the aforementioned audio / video service flows, PCIe, and USB3, etc. Of course, this application does not limit the total number of priorities configured for service flows to eight; other numbers are also possible.

[0127] Thus, when the first priority of the service flow requiring delay protection is the highest among the scheduling priorities of multiple output flows and the second output flow, it is equivalent to the first priority of the service flow requiring delay protection being higher than the second priority of the network management service flow, and the first priority of the service flow requiring delay protection being higher than the scheduling priority of other service flows among the multiple service flows besides the service flow requiring delay protection. If the output of the service flows with the same priority is weighted and round-robin scheduled according to the priority of the messages of multiple service flows, and the network management service flow is scheduled using SP scheduling, the service flow requiring delay protection can be scheduled with priority over the network management service flow, and with priority over the service flows among the multiple service flows besides the service flow requiring delay protection and the network management service flow. Compared to the existing method of prioritizing the network management service flow over the service flow requiring delay protection, this application can reduce the transmission delay of the service flow requiring delay protection when the transport layer transmits multiple service flows.

[0128] In some embodiments, step 503 further includes: performing SP scheduling on the packets of the link management service flow, wherein the packets in the link management service flow can be collectively referred to as TLCMP. This application can perform fine-grained division of the link management service flow to participate in SP scheduling.

[0129] In some embodiments, the link management service flow includes latency-sensitive link management service flows and latency-insensitive link management service flows.

[0130] In some embodiments, the messages of a latency-sensitive link management service flow include TLCRP in TLCMP.

[0131] The messages in latency-insensitive link management service flows include at least one of TLCAP, TLCAP_ACK, TLCCP, and TLFCENP in TLCMP.

[0132] In some embodiments, when the scheduling priority of latency-sensitive link management service flows is the third priority and the scheduling priority of latency-insensitive link management service flows is the fourth priority, the third priority is higher than the first priority, the fourth priority is lower than the first priority, and the fourth priority is higher than the second priority.

[0133] Thus, during SP scheduling, the scheduling order from high to low priority is as follows:

[0134] Latency-sensitive link management service flow packets (third priority);

[0135] Messages for service flows requiring delay protection (first priority);

[0136] Latency-insensitive link management service flow packets (fourth priority);

[0137] Network management service flow messages (second priority);

[0138] Messages of non-delay-guaranteed service flows other than those requiring delay guarantees, or other non-isochronous service flows.

[0139] In contrast to scheduling latency-sensitive services such as audio and video after link management and network management services, which leads to significant transmission delays, this application addresses the issue by finely dividing the link management service flow and allocating latency-sensitive services to different priorities for SP scheduling. Furthermore, latency-sensitive services such as audio and video are assigned a higher priority than latency-insensitive link management services, and also a higher priority than network management services. Thus, when latency-sensitive services participate in SP scheduling, the latency prevented from outputting by these services includes delays from the following: low-priority services arriving earlier than the current audio and video service flow, latency-sensitive link management services, and services from other audio and video sources. In other words, when audio and video services that require latency guarantees participate in scheduling, they will not be affected by latency-insensitive link management services, network management services, and other non-latency-guaranteed services. The message transmission latency of audio and video services that require latency guarantees is relatively small.

[0140] In this application, a delay-sensitive service flow can be understood as a service flow that requires a short delay or a short transmission time, while a delay-insensitive service flow can be understood as a service flow that requires a relatively long delay or a service flow that can have a relatively long transmission time.

[0141] In some embodiments, a service flow may be determined to be either a latency-sensitive or latency-insensitive service flow based on its type. Alternatively, a service flow may be determined to be either a latency-sensitive or latency-insensitive service flow based on its latency parameters, latency indication information, or latency value.

[0142] To facilitate understanding of the embodiments of this application below, some terms used in the embodiments of this application will be introduced first.

[0143] 1) Forwarding model.

[0144] Taking the aforementioned communication device as a unified multimedia interconnection router as an example, Figure 6 shows a schematic diagram of a transport layer packet forwarding model for a unified multimedia interconnection router. All the adapters on the unified multimedia interconnection router together constitute a virtual port, denoted as Port0. For example, in Figure 6, the identifiers (IDs) are AdapterID=4, AdapterID=5, ..., adapterID=n, where n is an integer. Each adapter in Port0 is a virtual channel (Shuttle) on that port, and AdapterID is the same as ShuttleID. Each virtual channel corresponds to a receive buffer (RBuff) and a transmit buffer (TBuff). The receive buffer is responsible for receiving data, and the transmit buffer is responsible for sending data.

[0145] The unified multimedia interconnection router also includes virtual ports, which are physical ports other than port 0, such as port 1 and port 2 shown in Figure 6. Each physical port also includes multiple virtual channels. For example, port 1 and port 2 include virtual channels 4, 5, ..., n with IDs ShuttleID=4, ShuttleID=5, ..., ShuttleID=n, respectively. Each virtual channel in the physical port also corresponds to a receive buffer and a transmit buffer.

[0146] Within this framework, packets from a virtual channel on port 0 can be forwarded to port 0 (inter-Adapter forwarding) and any other physical port. Packets from a physical port can only be forwarded to ports other than the physical port itself; that is, a non-0 port can only be forwarded to other ports. For example, packets from the receive buffer of adapter 4 on port 0 can be forwarded to the transmit buffer of adapter 5 on port 0, and packets from the receive buffer of adapter 5 on port 0 can be forwarded to the transmit buffer of adapter 4 on port 0. Packets from the receive buffer of adapter 4 on port 0 can be forwarded to the transmit buffer of virtual channel 5 on port 1, and packets from the receive buffer of virtual channel 5 on port 1 can be forwarded to the transmit buffer of adapter 4 on port 0. However, packets from the receive buffer of a virtual channel on port 1 can only be forwarded to the transmit buffer of a virtual channel on a port other than port 1, and packets from the receive buffer of a virtual channel on port 2 can only be forwarded to the transmit buffer of a virtual channel on a port other than port 2.

[0147] The physical ports mentioned above, excluding port 0, can be understood as the uplink or downlink ports mentioned above.

[0148] 2) ShuttleID numbering rules.

[0149] A bidirectional virtual channel consisting of all packets transmitting the same service on a link (physical link) between two ports is called a Shuttle. On the same physical link (e.g., a main link or an auxiliary link), packets are transmitted like shuttle buses between adjacent ports. Shuttle IDs identify shuttle buses carrying different flow packets. Figure 7 illustrates one type of virtual channel. For example, a physical link exists between device A and device B. Two service flows are transmitted between the main downstream port (MDP) of device A and the main upstream port (MUP) of device B. In Figure 7, the shuttle bus identified as virtual channel 7 (ShuttleID=7) transmits packets for flow 1 (service flow 1), and the shuttle bus identified as virtual channel 5 (ShuttleID=5) transmits packets for flow 2 (service flow 2). The link between the MDP and MUP transmits forward and reverse packets for flow 1, and forward and reverse packets for flow 2. Forward and reverse messages of the same flow can be understood as messages transmitted on two channels (lanes) of the same link. Forward messages transmitted on one channel are sent messages, and reverse messages transmitted on the other channel are received messages.

[0150] In other words, different flows on the same physical link are identified by the ShuttleID, which can be assigned by the management adapter of the adaptation layer. The output ShuttleID of the output port becomes the input ShuttleID of the downstream input port.

[0151] The management data messages consistently use the virtual channel identifier ShuttleID 0. The management adapter can assign non-zero ShuttleIDs according to the following rules.

[0152] ShuttleID 1 to ShuttleID 3 are reserved and will not be assigned to the management adapter;

[0153] Different input ShuttleIDs of the same input port correspond to different input streams, that is, different input virtual channels of the same input port correspond to different input streams. The input port can be understood as the uplink port in this application, and the service flow received at the input port can be called the input stream.

[0154] Different output ShuttleIDs of the same output port correspond to different output streams. The output port can be understood as the downlink port in this application. When the service stream is sent through the output port, it can be called the output stream.

[0155] The output ShuttleIDs of different output ports are independent of each other, but they can use the same ShuttleID number.

[0156] When the management adapter is configured to forward the input ShuttleID of the input port to multiple different output ports simultaneously, it indicates that the input Shuttle is being multicast replicated.

[0157] The same flow uses the same ShuttleID in both directions of the same physical link;

[0158] The ShuttleID can be different for the same flow on different physical links;

[0159] The assigned output ShuttleID cannot exceed the maximum ShuttleID supported by the output port.

[0160] The output ShuttleID of the output port cannot exceed the maximum ShuttleID supported by the downstream input port.

[0161] 3) Routing information

[0162] The management adapter provides routing information for each input shuttle (except for ShuttleID 0) of each input port (the shuttle for the input stream). Each input port contains routing information to determine each forwarding port (FwPort) and forwarding shuttle (FwShuttleID) for each input shuttle of that input port. Each input shuttle corresponds to one or more valid forwarding entries. Each forwarding entry corresponds to one unicast shuttle. When multiple valid forwarding entries exist, it indicates that the input stream is multicast replicated, and each replicated stream is an independent unicast shuttle.

[0163] Each shuttle supports a maximum of 16 valid forwarding entries (corresponding to forwarding in Port 0 to Port 15). Multiple entries with FwPort set to Port 0 are allowed, but each entry other than Port 0 can only appear once. The input shuttle of Port 0 can forward to Port 0 through Port 15. The input shuttles of Port 1 through Port 15 can only forward to other ports of Port 0 and Port 1 through Port 15. In other words, each input shuttle of Port 1 through Port 15 cannot forward to its own port. For example, the input shuttle of Port 1 can only forward to the virtual channel of at least one of Port 0, Port 2 through Port 15, and cannot forward to the virtual channel of Port 1.

[0164] Based on the above description of some terms used in the embodiments of this application, Figure 8 shows a flowchart of a scheduling method provided by an embodiment of this application, which includes the following process.

[0165] 801. The communication device configures the scheduling priority of each of the multiple output streams transmitted by the first output port, the multiple output streams including at least one first output stream, the first output stream including a video / audio TLDP, the priority of the video / audio TLDP being the first priority, the first priority being the highest priority among the scheduling priorities of the multiple output streams and the second output stream, the second output stream including a TLMDP.

[0166] The implementation of the communication device in the embodiment shown in Figure 8 can be found in the description in step 501.

[0167] In some embodiments, the first output port may be one of a plurality of physical ports of the communication device, such as Port1 or Port2 described above, excluding Port0. The first output port can be understood as the downlink port in this application. Of course, the first output port can not only send messages but also receive messages. This application describes the message scheduling process before the communication device sends a message to the receiving end; therefore, this application collectively refers to physical ports as output ports.

[0168] In some embodiments, the communication device may configure the message priority of each output stream transmitted to each of a plurality of output ports (each physical port) in the communication device, the plurality of output ports including a first output port.

[0169] In some embodiments, the scheduling priority configured by the communication device for each of the plurality of output streams transmitted at the first output port may be configured via management data packets or via TLMDP.

[0170] In some embodiments, the multiple output streams can be understood as multiple data service streams to be transmitted by the communication device. The first output stream is a data service stream of ordinary audio / video type, and the message type in the first output stream is audio / video TLDP. The second output stream is a management type data service stream. The management type data service stream can be understood as the network management service stream in this application, and the message type in the second output stream is TLMDP.

[0171] In other words, when the first priority of the TLDP with the message type of transmitting audio and video is the highest priority among the scheduling priorities of multiple output streams and the second output stream, the first priority of the TLDP with audio and video is higher than the scheduling priority of the TLMDP with the message type, and higher than the scheduling priority of the output streams other than the first output stream of the TLDP with audio and video.

[0172] In some embodiments, the scheduling priority of TLMDP is the second priority, and the scheduling priority of output streams other than the second output stream is a priority other than the second priority. That is, packets from output streams other than the second output stream cannot be configured as the second priority.

[0173] In some embodiments, the scheduling priorities of the multiple output streams, excluding the first and second priorities, are lower than the second priority. Thus, the second priority of the TLMDP is lower than the first priority of the audio / video TLMDP, and the second priority is higher than the scheduling priority of the other output streams among the multiple output streams, excluding the first output stream.

[0174] In some embodiments, configuring a scheduling priority for each of the multiple output streams transmitted through the first output port includes configuring outflow scheduling information for each output virtual channel of the first output port. The outflow scheduling information includes priority information of the output virtual channel, which is used to indicate the scheduling priority of the output stream corresponding to the output virtual channel.

[0175] Alternatively, the communication device can configure outflow scheduling information for each output shuttle of the first output port. The outflow scheduling information includes the priority information of the output shuttle, which is used to indicate the priority when scheduling the output stream corresponding to the output shuttle. Each output shuttle is indicated by a ShuttleID, and each output shuttle corresponds to one output stream.

[0176] In some embodiments, different output virtual channels of the first output port correspond to different output streams. In other words, different output shuttles of the first output port correspond to different output streams, or packets with different ShuttleIDs of the first output port correspond to different output streams, and packets of the same output stream have the same ShuttleID.

[0177] 802. The communication device schedules the multiple output streams and the second output stream according to the scheduling priority configured for each of the multiple output streams.

[0178] Thus, when scheduling messages from multiple output streams, the scheduling latency of audio / video TLDP is not affected by TLMDP, nor by messages of other priorities in multiple output streams except for the first priority, resulting in lower transmission latency for audio / video TLDP.

[0179] In some embodiments, prior to step 802, the method further includes: the communication device performing WRR scheduling on output streams of the same priority among multiple output streams.

[0180] The communication device in step 802 scheduling the multiple output streams and the second output stream according to the scheduling priority configured for each of the multiple output streams may include: the communication device performing strict priority scheduling on the multiple output streams and the second output stream according to the scheduling priority of the multiple output streams and the second output stream, and the output of the weighted round-robin scheduling of the output streams with the same priority among the multiple output streams.

[0181] WRR scheduling can be understood as the first-level scheduling of multiple output streams by a communication device. The first-level scheduling can also be understood as priority-based scheduling.

[0182] In some embodiments, the output of weighted round-robin scheduling of output streams with the same priority among multiple output streams can be understood as the result of round-robin scheduling of multiple output streams with the same priority according to the weight of each output stream, that is, the result of round-robin scheduling of the message order of multiple service streams according to their weights and sorting them into a queue for output.

[0183] In some embodiments, the outflow scheduling information further includes weight information, which is used to indicate the scheduling weight of the output streams corresponding to the output virtual channels when they are scheduled for WRR at the same priority.

[0184] In other words, each output stream (each output shuttle / each output virtual channel) is configured not only with a priority but also with corresponding weight information. This is because when two or more output streams transmit the same message type, the messages of the two or more output streams have the same priority. When scheduling two or more output streams with the same priority, WRR scheduling can be performed according to the scheduling weight corresponding to each output stream with the same priority.

[0185] In some embodiments, weighted round-robin scheduling of output streams with the same priority among multiple output streams includes: performing WRR scheduling on a packet-by-packet basis on the output streams with the same priority according to the weight information of the output streams corresponding to the output virtual channels with the same priority among multiple output streams.

[0186] For example, the first output port has multiple first output streams to be sent. These multiple first output streams can be forwarded to multiple receiving ends through a routing device connected to the communication device, with each receiving end receiving one first output stream. The communication device, acting as the sending end, performs WRR scheduling according to the scheduling weight corresponding to each first output stream when scheduling the multiple first output streams. For example, the multiple first output streams could be two: first output stream 1 and first output stream 2. First output stream 1 includes audio / video TLDPs with ShuttleID = 4, or in other words, each audio / video TLDP in first output stream 1 has a ShuttleID = 4. First output stream 2 includes audio / video TLDPs with ShuttleID = 5, or in other words, each audio / video TLDP in first output stream 2 has a ShuttleID = 5. Since the message types of the first output stream 1 and the first output stream 2 are the same, both being audio / video TLDPs, weight information needs to be configured for the first output stream 1 and the first output stream 2 respectively. For example, the scheduling weight of the first output stream 1 is 3 and the scheduling weight of the first output stream 2 is 2. When performing WRR scheduling on the first output stream 1 and the first output stream 2, the scheduling can be carried out in a round-robin manner, scheduling 3 audio / video TLDPs from the message queue of the first output stream 1 (scheduling 1 audio / video TLDP at a time, and scheduling 3 audio / video TLDPs consecutively), then scheduling 2 audio / video TLDPs from the message queue of the first output stream 2 (scheduling 1 audio / video TLDP at a time, and scheduling 2 audio / video TLDPs consecutively), then scheduling 3 audio / video TLDPs from the message queue of the first output stream 1, and then scheduling 2 audio / video TLDPs from the message queue of the first output stream 2.

[0187] In some embodiments, the number of packets when performing WRR scheduling on a third output stream among multiple output streams is proportional to the weight of the third output stream, where the third output stream is any one of the multiple output streams.

[0188] In other words, the larger the weight value, the more packets are continuously scheduled for the third output stream each time.

[0189] For example, when performing WRR scheduling on the first output stream 1 and the second output stream 2, since the weight of the first output stream 1 is greater than the weight of the second output stream 2, the first output stream 1 can be output to the receiving end 1 playing high-definition video through the routing device, and the first output stream 2 can be output to the receiving end 2 playing standard-definition video through the routing device. In other words, when WRR scheduling is performed on the first output stream 1 and the second output stream 2 according to their weights which have the same priority, it is possible to output both high-definition video streams and standard-definition video streams on the same port.

[0190] Of course, multiple output streams can also include two or more output streams of other message types. For example, multiple output streams may include two output streams with PCIe message type but different ShuttleIDs. These two output streams are buffered in different queues / TBuffs, and the messages have the same priority. Multiple output streams may also include two output streams with USB3 message type but different ShuttleIDs. These two output streams are also buffered in different queues, and the messages have the same priority.

[0191] Based on step 803, the communication device in step 802 scheduling the multiple output streams and the second output stream according to the scheduling priority configured for each of the multiple output streams may include: the communication device performing SP scheduling on the multiple output streams and the second output stream according to the scheduling priority of the multiple output streams and the second output stream, and the output of the weighted round-robin scheduling of the output streams with the same priority among the multiple output streams.

[0192] SP scheduling can be understood as a second-level scheduling of multiple output streams by the communication device. Second-level scheduling can also be understood as priority-based scheduling. Step 803 is equivalent to performing SP scheduling on the messages from multiple priority-based output streams and the messages from the second output stream according to the priorities of the messages from the multiple output streams.

[0193] Thus, when performing SP (Service Point) operations, the scheduling order from highest to lowest priority is as follows:

[0194] The first priority is the message that is scheduled and output by WRR within the priority, that is, the audio and video TLDP, or multiple first output streams;

[0195] The second priority TLMDP, or the second output stream;

[0196] The message of the output stream with a priority other than the first and second priority among the scheduling priorities of multiple output streams.

[0197] Thus, when scheduling messages from multiple output streams, the scheduling latency of audio / video TLDP is not affected by TLMDP, nor by messages of other priorities in multiple output streams except for the first priority, resulting in lower transmission latency for audio / video TLDP.

[0198] This application does not limit TLDPs to audio and video to be configured as the first priority. Other types of message types that require delay protection can also be configured as the first priority to reduce the transmission delay of service flows of various message types that require delay protection.

[0199] In some embodiments, this application may divide the link management service flow of the communication device into fine-grained segments before participating in SP scheduling. For example, the link management service flow includes TLCMP.

[0200] In some embodiments, the method further includes: performing SP scheduling on TLCMP, where TLCMP includes TLCRP. Specifically, when the scheduling priority of TLCRP is the third priority and the scheduling priority of packets other than TLCRP in TLCMP is the fourth priority, the third priority is higher than the first priority, the fourth priority is lower than the first priority, and the fourth priority is higher than the second priority.

[0201] In some embodiments, messages in TLCMP other than TLCRP include at least one of TLCAP, TLCAP_ACK, TLCCP, and TLCCPENP.

[0202] In other words, this application can pre-configure fixed priorities for these various types of messages in TLCMP in the communication device, and when performing SP scheduling, SP scheduling is performed on the various types of messages in TLCMP according to the priority of the message types in TLCMP.

[0203] Thus, when performing SP scheduling on packets from multiple output streams, the second output stream, and the link management service stream, the scheduling order from highest to lowest priority is as follows:

[0204] Third priority TLCRP;

[0205] The message output by WRR scheduling within the first priority level;

[0206] The fourth priority message, which is the message in TLCMP other than TLCRP;

[0207] Second priority TLMDP;

[0208] Messages of output streams with priorities other than first and second priority.

[0209] This is because TLCRP is used by the TLDP receiver to notify the TLDP sender of the credits being reclaimed. Credits are used to track the buffer space of the receiver's RBuff, which is related to whether the receiver has enough space to buffer TLDP (data service flow) to ensure that the RBuff of the link receiver does not overflow. TLCRP transmission latency needs to be short. Therefore, TLCRP is a latency-sensitive link management message and can be configured with a third priority, which is higher than the first priority of audio and video TLDP. In TLCMP, TLCAP (regarding credit allocation), TLCAP_ACK (regarding credit allocation acknowledgment), TLCCP (regarding credit consumption), and TLFCENP (regarding flow control anomalies), excluding TLCRP, can be considered latency-insensitive link management messages. That is, link management messages with longer transmission latency requirements compared to latency-sensitive link management messages can be configured with a fourth priority, which is lower than the first priority but higher than the second priority.

[0210] Thus, for TLDPs of audio and video at priority 1, the delay that prevents the first output stream of the currently pending audio and video TLDP from being output when the TLDP participates in the scheduling output includes: lower-priority output streams that arrive earlier than the audio and video service streams, delay-sensitive link management service streams (TLCRP), and service streams from other audio and video streams. The scheduling delay of the first output stream is not affected by delay-insensitive link management service streams in TLCMP other than TLCRP, such as TLCAP, TLCAP_ACK, TLCCP, and TLFCENP, nor by the second output stream of TLMDP, nor by messages with priorities other than the first and second priorities among the scheduling priorities of multiple output streams. The transmission delay of the audio and video TLDP is low.

[0211] The scheduling method in this application is described below based on a partial framework of the transport layer of the unified multimedia interconnection physical port.

[0212] To facilitate understanding of the scheduling method described below, we will first introduce a portion of the transport layer framework of the Unified Multimedia Interconnection physical port (excluding Port0). Each Unified Multimedia Interconnection physical port includes one link transmit adapter and one link receive adapter. Here, we will describe the framework of the link transmit adapter relevant to this application.

[0213] Figure 9 shows a schematic diagram of a link transmission adapter 90 for a unified multimedia interconnection physical port. The link transmission adapter 90 can be understood as a module of the transport layer. Referring to Figure 9, the link transmission adapter includes a transmission buffer (TBuff), a bandwidth management module, a transmission flow control management module, a primary and secondary link distribution module, a primary link transmission management module, and an auxiliary link transmission management module.

[0214] The TBuff can be understood as a send buffer for multiple virtual channels, with each virtual channel's send buffer occupying a portion of the TBuff's send buffer.

[0215] Alternatively, the link transmission adapter includes multiple TBuffs, with one TBuff corresponding to each virtual channel. When scheduling packets for the output stream corresponding to each virtual channel, scheduling is performed from the TBuff corresponding to that virtual channel. For example, if the unified multimedia interconnection physical port is a port in a routing device, the packets in the TBuff corresponding to each virtual channel can be forwarded from the virtual port Port0 of the routing device according to routing information, or they can be forwarded from other physical ports of the routing device according to routing information. Each TBuff in the link transmission adapter 90 is used to cache packets for one output stream / output virtual channel / output ShuttleID, which is equivalent to each TBuff being used to cache packets for one service stream, and TBuffs corresponding to different output ShuttleIDs being used to cache packets for different service streams.

[0216] The transmission flow control management module / unit can be understood as being used to complete the flow control management of the transmission direction.

[0217] The bandwidth management module (bandwidth management unit / bandwidth manager) can be used to manage the priority and bandwidth of all sent packets. Packet priority management can be understood as configuring packet priorities and scheduling packets according to their priorities, while packet bandwidth management can be understood as configuring packet scheduling weights and scheduling packets according to their weights. The unified multimedia interconnection network can adopt a distributed bandwidth management mechanism, meaning that each device in the unified multimedia interconnection network can manage the bandwidth of its own ports. Each unified multimedia interconnection physical link's sending port (output port) contains one bandwidth manager.

[0218] In some embodiments, the link transmission adapter performs bandwidth management on the TLDP in the TBuff and the TLCMP output by the transmission flow control management module / unit, and then sends it to the main link or auxiliary link through the main-auxiliary link distribution operation (executed by the main-auxiliary link distribution module). After performing main link transmission management (executed by the main link transmission management module) and auxiliary link transmission management (executed by the auxiliary link transmission management module), it is sent to the logic layer.

[0219] In some embodiments, the bandwidth manager in this application includes an intra-priority scheduler and an inter-priority scheduler. The intra-priority scheduler is used to schedule all shuttles belonging to the same priority, that is, to schedule packets of the output stream of the same priority. The inter-priority scheduler is used to receive the output of each intra-priority scheduler and perform SP scheduling with TLCMP generated by the transport layer. Higher priority items are scheduled first, and lower priority items are scheduled later.

[0220] In other words, the bandwidth manager includes two levels of scheduling: first-level scheduling and second-level scheduling. First-level scheduling is performed by the intra-priority scheduler, and second-level scheduling is performed by the inter-priority scheduler.

[0221] Based on the above description of the link transmission adapter 90 of the physical port, Figure 10 shows a flowchart of a scheduling method provided in an embodiment of this application. The method includes the following process.

[0222] 1001. The management adapter provides outflow scheduling information for each output virtual channel (Shuttle) of each output port. The outflow scheduling information includes priority information for each output virtual channel, which is used to indicate the scheduling priority of the output stream corresponding to the output virtual channel.

[0223] As mentioned above, the management adapter is a module of the adaptation layer. When each output port of the communication device establishes a primary link and an auxiliary link with the input port of the receiving end, before the output stream is transmitted on the link, the management adapter of the adaptation layer can send the outflow scheduling information corresponding to each output shuttle of the output port to the bandwidth manager of each output port. That is, for each output port, the management adapter can provide shuttle-based outflow scheduling information for each shuttle (output shuttle). Or, in other words, it provides shuttle-based outflow scheduling information for each output stream.

[0224] Each output port can be understood as a physical port of the communication device (excluding Port0).

[0225] In some embodiments, the management adapter sends a management data packet (e.g., TLMDP) to each output port, and the management data packet includes outflow scheduling information. For example, the management adapter may send multiple management data packets to each output port, with one management data packet corresponding to each output virtual channel, or the management adapter may send a single management data packet that includes outflow scheduling information for multiple output virtual channels. This application does not impose any limitations on this.

[0226] For example, the outflow scheduling information provided by the management adapter for each output shuttle of each output port can be shown in Table 1.

[0227] Table 1 Outflow Scheduling Information

[0228] In some embodiments, the TLDP for audio and video is fixed at priority 0. The TLMDP is fixed at priority 1, and other shuttles cannot be configured to priority 1. This can be understood as only the output shuttle with message type TLMDP being at priority 1, and the output stream with message type TLMDP not participating in WRR scheduling.

[0229] In some embodiments, the scheduling priority of TLMDP can be configured without using outflow scheduling information. For example, when the TLMDP ShuttleID is fixed, the priority scheduler can directly determine the TLMDP priority as 1 based on the field indicating the message type in the TLMDP or the ShuttleID.

[0230] Therefore, Table 1 here essentially shows the configurable priorities of the messages from multiple output streams when a single output port has multiple output streams to schedule, ranging from priority 0 to priority 2 through priority 7. This means that, including TLMDP, there can be eight message types, each assigned a priority. The priority indicator has a 3-bit width, which can be understood as indicating priority with 3 bits. For example, bit value "000" indicates priority 0, bit value "010" indicates priority 2, bit value "011" indicates priority 3, bit value "100" indicates priority 4, bit value "101" indicates priority 5, bit value "110" indicates priority 6, and bit value "111" indicates priority 7. The TLMDP priority can be pre-configured in the bandwidth manager by the management adapter using bit value "001," indicating that the TLMDP priority is priority 1.

[0231] Of course, this application does not limit the number of priorities to 8; it may be greater than 8 or less than 8.

[0232] When the weight's bit width is 8, it can be understood as indicating the weight with 8 bits. For example, the bit value "00000000" indicates that the WRR scheduling weight is 0, where 0 represents not participating in scheduling. This could be a case where the corresponding output shuttle has only one output stream of the same message type, and there are no two output streams with the same output shuttle ID. Different weights correspond to different numbers of messages that can be continuously scheduled. The larger the weight of the output shuttle, the more messages that can be continuously scheduled each time the output shuttle participates in WRR scheduling.

[0233] The management adapter provides outflow scheduling information for each output shuttle of each output port. This can be understood as the management adapter configuring outflow scheduling information for each output stream (each ShuttleID) of each output port. When multiple output streams with the same packet type need to be scheduled, each output stream is configured with the same scheduling priority but different weights. Alternatively, multiple output streams with the same packet type can also be configured with the same scheduling priority and weight. It's important to understand that the scheduling priority of an output stream is determined by the packet type within the output stream; different packet types correspond to different scheduling priorities.

[0234] This application does not limit the TLDP of audio and video messages to a fixed priority of 0; other message types' TLDPs can also be at priority 0. In other words, the same scheduling priority can correspond to multiple message types. For example, audio and video TLDPs can be understood as messages for service flows requiring latency protection. Besides audio and video TLDPs, other types of TLDPs can also be included in the message types for service flows requiring latency protection. The scheduling priority of both audio and video TLDPs and other types of TLDPs is priority 0.

[0235] 1002. The priority scheduler completes the scheduling of all virtual channels belonging to the same priority.

[0236] For example, Figure 11 illustrates a two-level scheduling method using a bandwidth manager. In this method, all packets from the output stream / output shuttle of service a have a priority of 0, and the scheduling priority of all packets from the output stream / output shuttle of service b is also 0. The TLMDP scheduling priority is 1. Packets from service a are cached in the TBuff corresponding to the ShuttleID of service a, and packets from service b are cached in the TBuff corresponding to the ShuttleID of service b. The scheduling priority of all packets from the output stream / output shuttle of service i is 2, and the scheduling priority of all packets from the output stream / output shuttle of service j is also 2. Packets from service i are cached in the TBuff corresponding to the ShuttleID of service i, and packets from service j are cached in the TBuff corresponding to the ShuttleID of service j. The scheduling priority of all packets from the output stream / output shuttle of service m is 7, and the scheduling priority of all packets from the output stream / output shuttle of service n is also 7. The message cache for service m is stored in the TBuff corresponding to the ShuttleID of service m, and the message cache for service n is stored in the TBuff corresponding to the ShuttleID of service n. The implementations for priorities 3-4 (not shown) are similar to those for priorities 0, 1, and 7.

[0237] TLMDP can be transmitted on the first virtual channel. The first virtual channel can be a fixed ShuttleID 0. The scheduling priority of TLMDP with ShuttleID 0 is priority 1. The TLMDP of the packet with ShuttleID 0 can be cached in the TBuff corresponding to ShuttleID 0. TLMDP can be understood as the management data packet or network management packet in this application.

[0238] In some embodiments, the priority-based scheduler can schedule according to the following rules:

[0239] The TLDP for audio and video is fixed at priority 0;

[0240] TLMDP is always set to priority 1; other shuttles cannot be configured to priority 1.

[0241] Except for priority 1, all shuttles within the same priority are scheduled using WRR.

[0242] WRR scheduling is performed on a message-by-message basis.

[0243] The number of messages scheduled for each shuttle is proportional to the configured weight.

[0244] After the management adapter is configured with new WRR weights, the scheduler schedules according to the new weight values.

[0245] For example, taking priority 0 as an example, both service a and service b's packets are audio / video TLDPs. The output shuttle corresponding to service a has a ShuttleID of 4, meaning that each audio / video TLDP in the output stream / service stream of service a carries a ShuttleID of 4. The output shuttle corresponding to service b has a ShuttleID of 5, meaning that each audio / video TLDP in the output stream / service stream of service b carries a ShuttleID of 5. The scheduling priority of the audio / video TLDP with ShuttleID=4 and the scheduling priority of the audio / video TLDP with ShuttleID=5 are both at priority 0. When scheduling packets of priority 0, the intra-priority scheduler can perform WRR scheduling according to the weights corresponding to the output shuttle with ShuttleID=4 and the output shuttle with ShuttleID=5. For example, the output shuttle with ShuttleID=4 has a weight of 3, and the output shuttle with ShuttleID=5 has a weight of 2. The priority-based scheduler can first schedule 3 service a packets from the TBuff of ShuttleID=4, then schedule 2 service b packets from the TBuff of ShuttleID=5, then schedule 3 service a packets from the TBuff of ShuttleID=4, then schedule 2 service b packets from the TBuff of ShuttleID=5, and so on, following this round-robin scheduling process. Of course, the packet scheduling methods for other services with priorities 2 to 7 can refer to the example for priority 0 here.

[0246] In some scenarios, the weights corresponding to the output Shuttle with ShuttleID=4 and the output Shuttle with ShuttleID=5 can be the same.

[0247] If the weights corresponding to the output shuttle with ShuttleID=4 and the output shuttle with ShuttleID=5 are different, here is an example of a possible scenario. Figure 12 shows a schematic diagram of an audio / video transmission scenario. In Figure 12, the method flow shown in Figure 10 is executed by the set-top box 120. The output port 121 of the set-top box 120 is connected to the input port 123 of the routing device 122. The output ports 124 and 125 of the routing device 122 are each connected to a display. Specifically, port 124 of the routing device 122 is connected to port 127 of the display 126, and port 125 of the routing device 122 is connected to port 129 of the display 128. The display 126 is set to high-definition mode, and the display 128 is set to standard-definition mode. Port 121 of set-top box 120 transmits service flow a to port 127 of display 126 via port 124 of routing device 122, and port 121 of set-top box 120 transmits service flow b to port 129 of display 128 via port 125 of routing device 122. When outputting service flow a and service flow b, port 121 of set-top box 120 carries a ShuttleID of 4 for each audio / video TLDP in service flow a, and a ShuttleID of 5 for each audio / video TLDP in service flow b. The priority scheduler can perform round-robin scheduling according to the above example of the round-robin process for service a and service b.

[0248] Accordingly, when the management adapter of set-top box 120 determines that the mode of display 126 or display 128 is switched, the management adapter of set-top box 120 can send the adjusted weight to port 121 to adjust the weight corresponding to the ShuttleID of service a or service b. The priority scheduler can schedule the packets of service a and service b according to the adjusted weight.

[0249] From a macro perspective, configuring the weights corresponding to different service flows can also be understood as configuring the bandwidth ratios of different service flows. The management adapter determines the bandwidth ratios corresponding to different service flows output from the same port based on the different service requirements of that port. In some embodiments, the weight ratio of different service flows with the same priority is the bandwidth ratio of the different service flows. The higher the weight of a service flow, the higher its bandwidth ratio. Conversely, the lower the weight of a service flow, the lower its bandwidth ratio.

[0250] 1003. The inter-priority scheduler receives the output of the intra-priority scheduler and performs SP scheduling with the TLCMP generated by the transport layer. Higher priority schedulers are scheduled first, and lower priority schedulers are scheduled later.

[0251] In some embodiments, the output of a priority-based scheduler can be understood as the sorting of multiple output streams within the same priority into a queue after round-robin scheduling according to the weights corresponding to the output streams. This queue can be understood as the output of a priority-based scheduler.

[0252] In some embodiments, when output streams of priorities other than priority 1 are scheduled according to weight, for a TLMDP with ShuttleID=0, the inter-priority scheduler can schedule the TLMDP from the TLMDP queue in the TBuff corresponding to ShuttleID=0 according to the first-in-first-out principle.

[0253] In some embodiments, the TLCMP generated by the transport layer is a message generated by the aforementioned transmission flow control management module and belongs to the link management service flow.

[0254] In some embodiments, the TLCMP generated by the transport layer includes TLCRP, and also includes at least one of other than TLCRP, such as TLCAP, TLCAP_ACK, TLCCP, or TLFCENP.

[0255] In some embodiments, when the priority scheduler schedules messages, the priorities from high to low can be:

[0256] TLCRP;

[0257] The output of the scheduler within the priority range of priority 0;

[0258] Other TLCMPs besides TLCRP (TLCAP / TLCAP_ACK / TLCCP / TLFCENP);

[0259] TLMDP;

[0260] The scheduler outputs within the priority range of 2 to 7, with the priority gradually decreasing from priority 2 to priority 7.

[0261] In other words, this application further refines the TLCMP used for link management, with TLCRP having a higher priority than priority 0. Other TLCMPs (TLCAP / TLCAP_ACK / TLCCP / TLFCENP) have a higher priority than priority 0 but a lower priority than TLMDP's priority 1. Other priorities 2 to 7 are lower than priority 1.

[0262] In this way, while ensuring low transmission latency for TLCRP in link management service flows, the transmission latency for TLDP in audio and video is also reduced.

[0263] This section uses an example to illustrate the total TLDP latency of the scheduling method described in this application for audio and video. It compares the latency of each audio / video service stream being blocked when all ordinary service streams (including audio / video service streams) are transmitted after the link management service stream and network management service stream (Technology 1), with the latency of each audio / video service stream being blocked due to the scheduling method of this application. Assume a scenario where a port at the sending end needs to transmit X (e.g., 120) flow control messages, where earlier arriving low-priority service packets (e.g., USB3 or PCIe packets) are 512 bytes long, and there are 2 audio / video service streams. The latency comparison of each audio / video service stream being blocked is shown in Table 2.

[0264] Table 2

[0265] As can be seen, if technology 1 is used, the delay of each audio / video service stream being blocked includes 512 bytes of delay from low-priority packets arriving earlier than the audio / video service stream, 512 bytes of delay from the previous audio / video service stream, and the delay of TLCMP (484 bytes for TLCRP, 484 bytes for TLCCP, 484 bytes for TLCAP, 24 bytes for TLCAP_ACK, 24 bytes for TLFECNP, and 512 bytes for network management messages), totaling 3036 bytes. However, using the scheduling method of this application, the delay of each audio / video service stream being blocked can include 512 bytes of delay from low-priority packets arriving earlier than the audio / video service stream, 484 bytes of TLCRP delay, and 512 bytes of delay from the previous audio / video service stream, totaling 1508 bytes. This scheduling method of this application can result in a lower delay for transmitting audio / video service streams on a single port.

[0266] Of course, this application does not limit the priority of TLDP (Translation and Audio Streaming Protocol) to only 0; other service flows requiring latency protection can also have their packets configured with a priority of 0. This application also does not limit the priority of TLCRP to higher than 0 during inter-priority scheduling; it can be extended to allow all latency-sensitive link management service flow packets to have a priority higher than 0. This application also does not limit the priority of TLCAP / TLCAP_ACK / TLCCP / TLFCENP packets to between 0 and 1 during inter-priority scheduling; it can be extended to allow all latency-insensitive link management service flow packets to have a priority lower than 0 and higher than 1. This application also does not limit the priority of TLMDP to only 1; other network management service flow packets can also have a priority of 1. Thus, combining the implementation methods in Figure 5 and Figure 10, the bandwidth manager performing secondary scheduling shown in Figure 11 can be extended to the schematic diagram of bandwidth manager performing secondary scheduling shown in Figure 13.

[0267] Based on the embodiment shown in Figure 5 above, this is equivalent to prioritizing the scheduling of services based on whether the service flow is latency-sensitive:

[0268] Link management service flows are differentiated by whether they are latency-sensitive and are assigned to different priorities for scheduling; latency-sensitive ordinary service flows are assigned to priority 0; and network management messages are assigned to priority 1.

[0269] This application includes a two-level scheduling mechanism: Level 1 scheduling: Intra-priority scheduler: Includes multiple priorities; except for priority 1, other priorities perform WRR scheduling internally. Level 2 scheduling: Inter-priority scheduler: Performs SP scheduling between services, with the priority order as follows: latency-sensitive link management service flow > priority 0 > latency-insensitive link management service flow > priority 1 > priority 2 > ... > priority i. Service flows requiring latency guarantees, such as audio and video, are placed in priority 0, network management service flows are placed in priority 1, and other non-latency-guaranteed service flows are placed in lower priorities.

[0270] Alternatively, this application can allocate different priorities for scheduling based on whether the link management service flow is latency-sensitive; allocate higher priority to latency-protected service flows such as audio and video than to latency-insensitive link management service flows; allocate higher priority to latency-protected service flows such as audio and video than to network management service flows; and allow different configurations to achieve different effects (allowing different weight configurations to obtain different WRR scheduling outputs).

[0271] In some embodiments, audio and video service streams (e.g., audio and video TLDP) are transmitted unidirectionally on a device port. For example, the device sends audio and video service stream 1 (outflow) on one port and receives audio and video service stream 2 (inflow) on another port.

[0272] In some embodiments, in a unified multimedia interconnection network, multiple virtual channels transmitting the same service between two adapters constitute a logical channel. When the management adapter wants to establish a logical channel between two adapters, it needs to establish all bidirectional shuttles between the two adapters (except for ShuttleID 0). When establishing a bidirectional shuttle, the management adapter provides routing information for each shuttle, as well as inbound and outbound flow information for each shuttle. The inbound and outbound flow information may include the outbound flow scheduling information in this application. The difference is that when the inbound and outbound flow information includes the "priority" field in the outbound flow scheduling information, the priority can be used not only for the outbound flow scheduling of each shuttle, but also for the inbound flow scheduling of each shuttle. That is, the same port can not only send packets of the same service flow, but also receive packets of the same service flow. For example, the bidirectional transmission service on the same port is USB3 or PCIe, etc.

[0273] It is understood that, in order to achieve the functions in the above embodiments, the communication device includes hardware structures and / or software modules corresponding to each function. Those skilled in the art should readily recognize that, based on the units and method steps described in conjunction with the embodiments disclosed in this application, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed by hardware or by computer software driving hardware depends on the specific application scenario and design constraints of the technical solution.

[0274] Figures 14 and 15 are schematic diagrams of possible communication devices provided in embodiments of this application. These communication devices can be understood as interface devices or electronic devices in this application. These communication devices can be used to implement the functions of the communication devices in the above method embodiments, and therefore can also achieve the beneficial effects of the above method embodiments. In the embodiments of this application, the communication device can be one of device 1011 or device 1021 as shown in Figure 1, or one of devices 103 to 106 as shown in Figure 1, or the device shown in Figure 2 above, or an interface module (such as a chip or chipset) applied to these devices. The related communication devices are used to implement interface data transmission, for example, to implement the unified multimedia interconnection interface function described above.

[0275] As shown in Figure 14, the communication device 140 includes a configuration module 1410 and a scheduling module 1420. The communication device 140 is used to implement the functions of the transmitting side or the receiving side in the method embodiments shown in Figures 6, 8 and 11.

[0276] When the communication device 140 is used to implement the function of the communication device as a transmitter in the method embodiments shown in Figures 5, 8, and 10: the configuration module 1410 can be used to configure a scheduling priority for each of the multiple output streams transmitted through the first output port. The multiple output streams include at least one first output stream, which includes a TLDP for audio and video. The scheduling priority of the TLDP for audio and video is a first priority, which is the highest priority among the scheduling priorities of the multiple output streams and the second output stream. The second output stream includes a TLMDP. The scheduling module 1420 is used to schedule the multiple output streams and the second output stream according to the scheduling priority configured for each of the multiple output streams.

[0277] For a more detailed description of the configuration module 1410 and the scheduling module 1420, please refer to the relevant descriptions in the method embodiments shown in Figures 5, 8 and 10.

[0278] In some embodiments, the scheduling module 1420 is further configured to: perform weighted round-robin scheduling on output streams of the same priority among the multiple output streams. The scheduling module 1420 is also configured to: perform strict priority scheduling on the multiple output streams and the second output stream based on the scheduling priorities of the multiple output streams and the second output stream, and the output of the weighted round-robin scheduling of output streams of the same priority among the multiple output streams.

[0279] In some embodiments, the scheduling priority of TLMDP is the second priority, and the scheduling priority of output streams other than the second output stream of Unified Multimedia Interconnect is a priority other than the second priority of Unified Multimedia Interconnect.

[0280] In some embodiments, the scheduling priorities of multiple output streams of Unified Multimedia Interconnect (UMI) are lower than those of UMI First Priority and UMI Second Priority.

[0281] In some embodiments, the configuration module 1410 is configured to: configure outflow scheduling information for each output virtual channel of the first output port, wherein the unified multimedia interconnect outflow scheduling information includes priority information of the output virtual channel, and the unified multimedia interconnect priority information is used to indicate the scheduling priority of the output stream corresponding to the output virtual channel.

[0282] In some embodiments, different output virtual channels of the unified multimedia interconnect first output port correspond to different output streams.

[0283] In some embodiments, TLMDP is transmitted through the first output virtual channel.

[0284] In some embodiments, the scheduling module 1420 is further configured to: perform strict priority scheduling on the Transport Layer Common Management Message (TLCMP), wherein the Unified Multimedia Interconnect (TLCMP) includes the Transport Layer Credit Reclamation Message (TLCRP); wherein, when the scheduling priority of the Unified Multimedia Interconnect (TLCRP) is the third priority and the scheduling priority of the messages in the Unified Multimedia Interconnect (TLCMP) other than the Unified Multimedia Interconnect (TLCRP) is the fourth priority, the third priority of the Unified Multimedia Interconnect is higher than the first priority of the Unified Multimedia Interconnect, the fourth priority of the Unified Multimedia Interconnect is lower than the first priority of the Unified Multimedia Interconnect, and the fourth priority of the Unified Multimedia Interconnect is higher than the second priority of the Unified Multimedia Interconnect.

[0285] In some embodiments, messages in TLCMP other than Unified Multimedia Interconnection (TLCRP) include at least one of Transport Layer Credit Allocation (TLCAP), Transport Layer Credit Allocation Reply (TLCAP_ACK), Transport Layer Credit Consumption (TLCCP), and Transport Layer Flow Control Anomaly Notification (TLFCENP).

[0286] In some embodiments, the outflow scheduling information also includes weight information. The unified multimedia interconnection weight information is used to indicate the scheduling weight when the output streams corresponding to the output virtual channel are weighted and round-robin scheduled at the same priority.

[0287] In some embodiments, the scheduling module 1420 is used to: perform weighted round-robin scheduling of output streams of the same priority in units of packets, based on the weight information of the output streams corresponding to the output virtual channels of the same priority among multiple output streams of Unified Multimedia Interconnect.

[0288] In some embodiments, the number of packets when performing weighted round-robin scheduling on the third output stream among the multiple output streams of Unified Multimedia Interconnect is proportional to the weight of the third output stream of Unified Multimedia Interconnect, where the third output stream of Unified Multimedia Interconnect is any one of the multiple output streams of Unified Multimedia Interconnect.

[0289] In some embodiments, the total number of priorities for the message configuration of the multiple output streams of Unified Multimedia Interconnect and the second output stream of Unified Multimedia Interconnect is 8.

[0290] As shown in Figure 15, the communication device 150 includes a processor 1510 and an interface circuit 1520. The processor 1510 and the interface circuit 1520 are coupled to each other. It is understood that the interface circuit 1520 can be a transceiver or an input / output interface. Optionally, the communication device 150 may also include a memory 1530 for storing instructions executed by the processor 1510, or storing input data required by the processor 1510 to execute instructions, or storing data generated after the processor 1510 executes instructions.

[0291] When the communication device 150 is used to implement the methods shown in Figures 5, 8, and 10, the processor 1510 is used to implement the functions of the configuration module 1410, for example, it can be used to implement the relevant implementation processes of steps 501, 801, and 1001. The interface circuit 1520 is used to implement the functions of the scheduling module 1420. For example, it can be used to implement the relevant implementation processes of steps 502, 802, 1002, and 1003. The interface circuit 1520 can be an interface chip or a separate IP module integrated into the interface chip.

[0292] When the aforementioned communication device 150 is an interface chip applied to the transmitting end, the interface chip on the transmitting side implements the functions of the communication device in the above method embodiment. The interface chip on the transmitting end sends messages / data to the receiving end, which can be understood as the data being first generated by other modules (such as source data components) in the transmitting end, and then sent by these modules to the interface chip on the transmitting end.

[0293] In this application, entity A sends information to entity B, either directly or indirectly through other entities. Similarly, entity B receives information from entity A, either directly or indirectly through other entities. Entities A and B can be senders or receivers, or modules within either sender or receiver. The sending and receiving of messages / data can be information exchange between senders and receivers, such as between a source device and a destination device; it can also be information exchange between different modules within a single device, such as between the interface chip of the sender and the interface chip of the receiver.

[0294] This application also provides a communication system, which includes a first communication device and a second communication device. The first communication device can be used to implement the method flow shown in FIG5, FIG8 and FIG10, and a communication connection is established between the first communication device and the second communication device.

[0295] It is understood that the processor in the embodiments of this application can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. A general-purpose processor can be a microprocessor or any conventional processor.

[0296] The method steps in the embodiments of this application can be implemented in hardware or in software instructions executable by a processor. The software instructions can consist of corresponding software modules, which can be stored in random access memory, flash memory, read-only memory, programmable read-only memory, erasable programmable read-only memory, electrically erasable programmable read-only memory, registers, hard disks, portable hard disks, CD-ROMs, or any other form of storage medium known in the art. An exemplary storage medium is coupled to a processor, enabling the processor to read information from and write information to the storage medium. The storage medium can also be a component of the processor. The processor and storage medium can reside in an ASIC. Alternatively, the ASIC can reside in a base station or terminal. The processor and storage medium can also exist as discrete components in a base station or terminal.

[0297] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer programs or instructions. When the computer program or instructions are loaded and executed on a computer, the processes or functions described in the embodiments of this application are performed entirely or partially. The computer can be a general-purpose computer, a special-purpose computer, a computer network, a network device, a user equipment, or other programmable device. The computer program or instructions can be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another. For example, the computer program or instructions can be transferred from one website, computer, server, or data center to another website, computer, server, or data center via wired or wireless means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium, such as a floppy disk, hard disk, or magnetic tape; it can also be an optical medium, such as a digital video optical disc; or it can be a semiconductor medium, such as a solid-state drive. The computer-readable storage medium may be a volatile or non-volatile storage medium, or may include both types of storage media.

[0298] In the various embodiments of this application, unless otherwise specified or in case of logical conflict, the terminology and / or descriptions of different embodiments are consistent and can be referenced by each other. The technical features of different embodiments can be combined to form new embodiments according to their inherent logical relationship.

[0299] In this application, "at least one" means one or more, and "more than one" means two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can mean: A exists alone, A and B exist simultaneously, or B exists alone, where A and B can be singular or plural. In the textual description of this application, the character " / " generally indicates that the preceding and following related objects have an "or" relationship. "Including at least one of A, B, and C" can mean: including A; including B; including C; including A and B; including A and C; including B and C; including A, B, and C.

[0300] It is understood that the various numerical designations used in the embodiments of this application are merely for descriptive convenience and are not intended to limit the scope of the embodiments of this application. The order of the process numbers described above does not imply the order of execution; the execution order of each process should be determined by its function and internal logic.

Claims

1. A scheduling method, characterized in that, The method includes: Configure a scheduling priority for each of the plurality of output streams transmitted through the first output port, the plurality of output streams including at least one first output stream, the first output stream including a Transport Layer Data Message (TLDP) for audio and video, the scheduling priority of the TLDP for audio and video being a first priority, the first priority being the highest priority among the scheduling priorities of the plurality of output streams and the second output stream, the second output stream including a Transport Layer Management Data Message (TLMDP). The plurality of output streams and the second output stream are scheduled according to the scheduling priority configured for each of the plurality of output streams.

2. The method according to claim 1, characterized in that, The method further includes: Weighted round-robin scheduling is performed on the output streams of the same priority among the multiple output streams; The step of scheduling the plurality of output streams and the second output stream according to the scheduling priority configured for each of the plurality of output streams includes: performing strict priority scheduling on the plurality of output streams and the second output stream according to the scheduling priorities of the plurality of output streams and the second output stream, and the output of the weighted round-robin scheduling of output streams with the same priority among the plurality of output streams.

3. The method according to claim 1 or 2, characterized in that, The scheduling priority of the TLMDP is the second priority, and the scheduling priority of the output streams other than the second output stream is a priority other than the second priority.

4. The method according to claim 3, characterized in that, Among the scheduling priorities of the multiple output streams, those other than the first priority and the second priority have lower priorities than the second priority.

5. The method according to any one of claims 1-4, characterized in that, The configuration of scheduling priority for each of the multiple output streams transmitted to the first output port includes: Configure outflow scheduling information for each output virtual channel of the first output port. The outflow scheduling information includes priority information of the output virtual channel, which is used to indicate the scheduling priority of the output stream corresponding to the output virtual channel.

6. The method according to claim 5, characterized in that, Different output virtual channels of the first output port correspond to different output streams.

7. The method according to claim 5 or 6, characterized in that, The TLMDP is transmitted through the first output virtual channel.

8. The method according to any one of claims 3-7, characterized in that, The method further includes: performing strict priority scheduling on Transport Layer Common Management Message (TLCMP), wherein TLCMP includes Transport Layer Credit Recovery Message (TLCRP); Wherein, when the scheduling priority of TLCRP is the third priority and the scheduling priority of messages other than TLCRP in TLCMP is the fourth priority, the third priority is higher than the first priority, the fourth priority is lower than the first priority, and the fourth priority is higher than the second priority.

9. The method according to claim 8, characterized in that, The messages in TLCMP other than TLCRP include at least one of the following: Transport Layer Credit Allocation Message (TLCAP), Transport Layer Credit Allocation Response Message (TLCAP_ACK), Transport Layer Credit Consumption Message (TLCCP), and Transport Layer Flow Control Anomaly Notification Message (TLFCENP).

10. The method according to any one of claims 5-9, characterized in that, The outflow scheduling information also includes weight information, which is used to indicate the scheduling weight when the output streams corresponding to the output virtual channels are weighted and round-robin scheduled at the same priority.

11. The method according to claim 10, characterized in that, The weighted round-robin scheduling of output streams with the same priority among the multiple output streams includes: Based on the weight information of the output streams corresponding to the same priority virtual channels among the multiple output streams, the output streams of the same priority are weighted and scheduled in round-robin fashion on a per-message basis.

12. The method according to claim 11, characterized in that, The number of packets when performing weighted round-robin scheduling on the third output stream among the plurality of output streams is proportional to the weight of the third output stream, where the third output stream is any one of the plurality of output streams.

13. The method according to any one of claims 1-12, characterized in that, The total number of priorities configured for the multiple output streams and the second output stream is 8.

14. A communication device, characterized in that, include: A configuration module is configured to configure a scheduling priority for each of a plurality of output streams transmitted through a first output port. The plurality of output streams include at least one first output stream, the first output stream including a Transport Layer Data Message (TLDP) for audio and video, the priority of the TLDP for audio and video being a first priority, the first priority being the highest priority among the scheduling priorities of the plurality of output streams and the second output stream, and the second output stream including a Transport Layer Management Data Message (TLMDP). The scheduling module is used to schedule the plurality of output streams and the second output stream according to the scheduling priority configured for each of the plurality of output streams.

15. A communication device, characterized in that, Includes a module for performing the method as described in any one of claims 1 to 13.

16. A communication device, characterized in that, It includes a processor and a memory, the processor and the memory being coupled, the processor being configured to run a computer program or instructions stored in the memory to cause the communication device to perform the method as described in any one of claims 1-13.

17. A communication system, characterized in that, It includes a first communication device and a second communication device, a communication connection is established between the first communication device and the second communication device, and the first communication device is used to perform the method as described in any one of claims 1-13.

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

19. A computer program product, characterized in that, Includes computer instructions that, when executed on a communication device, cause the communication device to perform the method as described in any one of claims 1-13.

20. A chip, characterized in that, The chip stores computer execution instructions, and when the computer execution instructions are run, the method of any one of claims 1-13 is executed.