Packet transmission method and apparatus

WO2026200138A1PCT designated stage Publication Date: 2026-10-01HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2025/146368
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2025-03-26
Filing Date
2025-12-27
Publication Date
2026-10-01

Smart Images

  • Figure CN2025146368_01102026_PF_FP_ABST
    Figure CN2025146368_01102026_PF_FP_ABST
Patent Text Reader

Abstract

Provided are a packet transmission method and apparatus, which relate to the technical field of communications. The method comprises: encapsulating, into a first control packet, service data transmitted from an upper layer to a link layer; and after the sending of a second control packet currently being sent at the link layer or a data block of a data packet that is currently being sent at the link layer is completed, sending the first control packet, wherein the upper layer is a layer above the link layer in a network model. In this way, a control packet carrying service data is inserted between data blocks of a data packet with a lower priority to preempt a sending channel for sending, thereby reducing the transmission delay of a high-priority or delay-sensitive packet.
Need to check novelty before this filing date? Find Prior Art

Description

Message transmission method and apparatus

[0001] This application claims priority to Chinese Patent Application No. 202510372245.5, filed on March 26, 2025, entitled “Message Transmission Method and Apparatus”, the entire contents of which are incorporated herein by reference. Technical Field

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

[0003] A data packet is the basic unit for transmitting actual user data in a network. A data packet contains the valid data that the user application needs to send (such as files, requests, responses, etc.), as well as the control information required to transmit this data (such as destination address, source address, checksum, etc.).

[0004] When communication devices send data packets, they do so in a scheduled order, sending only one data packet at a time. The next data packet cannot be sent until the current one is completely sent. This can cause a data packet in progress to occupy the transmission channel, preventing other higher-priority data packets from preempting the channel, resulting in data channel congestion. Therefore, when a data packet occupies the transmission channel, it increases the transmission delay of higher-priority data packets. Summary of the Invention

[0005] This application provides a message transmission method and apparatus to solve the problem that the high transmission delay of higher priority data messages is caused by lower priority data messages occupying the transmission channel.

[0006] Firstly, a message transmission method is provided. This method includes: encapsulating service data transmitted from the upper layer to the link layer into a first control message; and sending the first control message after the currently transmitted data block in a second control message or data message being transmitted at the link layer has been completed. Here, the upper layer refers to the layer above the link layer in the network model.

[0007] The message transmission method provided in the first aspect above can be executed by a communication device. The communication device can connect to a network, enabling interconnection and interoperability between networks, and facilitating data transmission between communication devices. The communication device can be various devices, modules, programs, etc., capable of performing its functions; for example, a router or switch. The communication device can be based on a layered network model architecture, including a data link layer (or link layer) and the layer above it. In the OSI architecture, the layer above the link layer can be the network layer.

[0008] Based on the message transmission method provided in this application, service data is carried by messages of the control message type. After the data block currently being transmitted in the second control message or data message currently being transmitted at the link layer is completed, the control message, having a higher transmission priority than the data message, can preempt the transmission channel and be transmitted before the data block of the next data message is sent. If service data is carried by a data message, and a lower-priority data message is being transmitted, the higher-priority data message must wait for the lower-priority data message to complete before being transmitted. In contrast, the message transmission method provided in this application allows control messages to carry higher-priority service data, inserting control messages carrying service data between data blocks of lower-priority data messages to preempt the transmission channel, thus reducing the transmission delay of high-priority or delay-sensitive messages.

[0009] As one possible implementation, the first control message includes a configuration field. The configuration field has a first value, which indicates that the privileged message is a control message.

[0010] In this way, on the one hand, the receiving end can identify that the first control message belongs to the control message category based on the configuration fields, and then proceed with the next step of message processing, such as further identifying whether the message belongs to the control message carrying service data. On the other hand, the receiving end can identify control messages carrying service data inserted between data blocks of data packets based on the configuration fields in the message header, without affecting the information verification of data blocks of adjacent data packets.

[0011] As one possible implementation, the first control message also includes a control field and a sub-control field. The control field indicates the type of control message to which the first control message belongs. The sub-control field indicates the sub-type of the control message to which the first control message belongs. The control field has a second value, and the sub-control field has a third value.

[0012] In this way, when the receiving end receives a control message with the second value in the control field and the third value in the sub-control field, it can identify the control message as a control message carrying service data and transfer the payload of the message to the upper layer of the link layer for processing.

[0013] As one possible implementation, the maximum length of the first control message is the length corresponding to n data blocks, where n is a positive number. For example, n is 1, or any value greater than 1.

[0014] For example, a data block may include a maximum of 32 flow control units, and a flow control unit may be 20 bytes in size.

[0015] In this way, limiting the maximum length of the first control message to the length corresponding to n data blocks avoids the receiving end being unable to consume the large amount of business data after receiving the first control message in a timely manner, reducing the possibility of buffer overflow at the receiving end. At the same time, it can also avoid adding excessive delay to data packets on preempted transmission channels.

[0016] Optionally, the maximum length of the first control message is the length corresponding to one data block. The first control message includes a content length field, which indicates the last tail flow control unit (flit) carrying the payload, and the size of the payload in the tail flow control unit.

[0017] In this way, the receiving end can locate the end position of the first control message based on the content length field of the first control message, thereby accurately locating the header of the data block of the next data message and avoiding the problem of incorrect delimitation between different data messages caused by misidentification of the header.

[0018] As one possible implementation, the first control message also includes a flow control field. This flow control field indicates a virtual channel, and in a letter of credit-based flow control mechanism, it prevents the message transmission rate from exceeding the receiver's processing capacity based on the credit value corresponding to the virtual channel.

[0019] Optionally, after sending the first control message, the message transmission method provided in this application further includes: deducting the credit value corresponding to the virtual channel indicated by the flow control field.

[0020] Thus, a credit-based flow control mechanism is introduced into the message processing of control messages to control the sending rate of control messages carrying business data, so as to avoid buffer overflow or server crash due to message backlog.

[0021] As one possible implementation, the interval between the transmission of the two first control messages is greater than or equal to a preset duration.

[0022] This allows the receiving end to consume the service data carried in the control message in a timely manner, thus avoiding buffer overflow at the receiving end.

[0023] As one possible implementation, in the message transmission method provided in this application, the service data transmitted from the upper layer to the link layer is encapsulated into a first control message, including: receiving the service data transmitted from the upper layer to the link layer, and when the operation corresponding to the service data is an operation with low latency requirements, encapsulating the service data into a first control message.

[0024] Optionally, the business data includes an opcode field, which indicates the operation type of the operation corresponding to the business data. The method further includes determining, based on the opcode field of the business data, that the operation corresponding to the business data is an operation with low latency requirements.

[0025] In this way, the sending end can identify service data with low latency requirements, and then send the service data by carrying the control message, thereby reducing the transmission latency of service data with low latency requirements.

[0026] As one possible implementation, in the message transmission method provided in this application, after the data block currently being transmitted in the second control message or data message currently being transmitted by the link layer has been transmitted, the first control message is transmitted. This includes: when the link layer is currently transmitting a data block, transmitting the first control message after the data block has been transmitted and before the next data block of the data message is transmitted. Alternatively, transmitting the first control message when the link layer has completed transmitting the data block currently being transmitted in the data message and before the next data block of the data message is transmitted. Alternatively, transmitting the first control message after the link layer has completed transmitting the second control message currently being transmitted.

[0027] In this way, the control message carrying the business data preempts the position of the transmission channel and divides the data message or control message into message or data block granularity, so that the control message carrying the business data obtained by the receiving end is the smallest verifiable or consumable data before and after it. The receiving end can consume the received data in a timely manner and avoid buffer overflow or blocking.

[0028] As one possible implementation, in the message transmission method provided in this application, before sending the first control message, the method further includes: determining that the number of times the transmission channel of the data message currently being transmitted by the link layer has been preempted is less than or equal to a preset threshold.

[0029] This avoids the high latency caused by the continuous preemption of the first control message during the transmission of data packets.

[0030] Secondly, a message transmission method is provided. This method includes: receiving a first control message; and forwarding the payload of the first control message to an upper layer of the link layer for processing. The upper layer refers to the layer above the link layer in the network model.

[0031] The message transmission method provided in the second aspect above can be executed by a communication device. The communication device is capable of connecting to a network, enabling interconnection and interoperability between networks, and facilitating data transmission between communication devices. The communication device can be various devices, modules, programs, etc., capable of performing its functions; for example, a router or switch. The communication device can be based on the OSI model architecture, including the data link layer (or link layer) and the layer above the link layer. In the OSI architecture, the layer above the link layer can be the network layer.

[0032] Based on the message transmission method provided in this application, service data is carried by messages of the control message type. After receiving the control message carrying service data, the link layer hands over its payload to the upper layer for processing, which enables priority processing of higher-priority service data and reduces processing latency.

[0033] As one possible implementation, the message transmission method provided in this application further includes, before forwarding the payload of the first control message to the upper layer of the link layer for processing: identifying a designated message in the data packets received by the link layer with a configuration field of a first value, a control field of a second value, and a sub-control field of a third value, and determining the designated message as the first control message.

[0034] In this way, when the receiving end receives a control message with the second value in the control field and the third value in the sub-control field, it can identify the control message as a control message carrying service data and transfer the payload of the message to the upper layer of the link layer for processing.

[0035] As one possible implementation, the message transmission method provided in this application further includes, after receiving the first control message, caching the data messages already received by the link layer; and receiving the remaining part of the data messages after forwarding the payload of the first control message to the upper layer of the link layer for processing.

[0036] In this way, after the link layer of the receiving end receives the control message carrying the service data, it processes the control message carrying the service data first, and then receives the remaining part of the data message, which reduces the processing delay of the control message carrying the service data.

[0037] As one possible implementation, the message transmission method provided in this application further includes: after consuming the first control message at the upper layer, returning the credit value of the virtual channel indicated by the flow control field of the first control message to the sender of the first control message.

[0038] Thus, a credit-based flow control mechanism is introduced into the message processing of control messages to control the sending rate of control messages carrying business data, so as to avoid buffer overflow or server crash due to message backlog.

[0039] Thirdly, a message transmission apparatus is provided, including a transceiver module and a processing module. The processing module is used to encapsulate service data transmitted from the upper layer to the link layer into a first control message, where the upper layer is the layer above the link layer in the network model. The transceiver module is used to send the first control message after the data block currently being sent in the second control message or data message currently being sent by the link layer has been completed.

[0040] As one possible implementation, the first control message includes a configuration field with a first value, which indicates that the privileged message is a control message.

[0041] As one possible implementation, the first control message also includes a control field and a sub-control field. The control field indicates the type of control message to which the first control message belongs, and the sub-control field indicates the sub-type of the control message to which the first control message belongs. The control field has a second value, and the sub-control field has a third value.

[0042] As one possible implementation, the maximum length of the first control message is the length corresponding to n data blocks, where n is a positive number.

[0043] As one possible implementation, the maximum length of the first control message is the length corresponding to one data block. The first control message includes a content length field, which is used to indicate the last tail flow control unit carrying the payload, and the size of the payload in the tail flow control unit.

[0044] As one possible implementation, a data block may include a maximum of 32 flow control units.

[0045] As one possible implementation, a flow control unit is 20 bytes in size.

[0046] As one possible implementation, the first control message also includes a flow control field, which is used to indicate the virtual channel. In a letter of credit-based flow control mechanism, the message transmission rate is prevented from exceeding the processing capacity of the receiving end based on the credit value corresponding to the virtual channel.

[0047] As one possible implementation, the processing module is also used to: deduct the credit value corresponding to the virtual channel indicated by the flow control field.

[0048] As one possible implementation, the interval between the transmission of the two first control messages is greater than or equal to a preset duration.

[0049] As one possible implementation, the transceiver module is also used to: receive service data transmitted from the upper layer to the link layer. The processing module is also used to: when the operation corresponding to the service data is an operation with low latency requirements, encapsulate the service data into a first control message.

[0050] As one possible implementation, the business data includes an opcode field, which indicates the operation type corresponding to the business data. The processing module is also used to: determine whether the operation corresponding to the business data has low-latency requirements based on the opcode field.

[0051] As one possible implementation, the transceiver module is specifically used for: sending a first control message after the link layer has finished sending a data block and before sending the next data block of the data packet; sending a first control message after the link layer has finished sending the data block currently being sent in the data packet and before sending the next data block of the data packet; and sending a first control message after the link layer has finished sending the second control message currently being sent.

[0052] For the beneficial effects of any possible implementation of the third aspect of this application, please refer to the description of the beneficial effects of any possible implementation of the first aspect above, which will not be repeated here.

[0053] Fourthly, a message transmission apparatus is provided, including a transceiver module and a processing module. The transceiver module is used to receive a first control message. The processing module is used to forward the payload of the first control message to the upper layer of the link layer for processing, where the upper layer is the layer above the link layer in the network model.

[0054] As one possible implementation, the processing module is also used to: identify a specified message in the data packets received at the link layer where the configuration field has a first value, the control field has a second value, and the sub-control field has a third value, and determine the specified message as the first control message.

[0055] As one possible implementation, the transceiver module is also used to: buffer data packets already received by the link layer; and receive the remaining part of the data packets after forwarding the payload of the first control message to the upper layer of the link layer for processing.

[0056] As one possible implementation, the transceiver module is also used to: after consuming the first control message at the upper layer, return the credit value of the virtual channel indicated by the flow control field of the first control message to the sender of the first control message.

[0057] For the beneficial effects of any possible implementation of the fourth aspect of this application, please refer to the description of the beneficial effects of any possible implementation of the second aspect above, which will not be repeated here.

[0058] Fifthly, a chip is provided, including a processing circuit and an interface circuit, the interface circuit being used for transmitting and receiving data, and the processing circuit being used for performing a message transmission method as described in the first aspect or any possible implementation thereof, or a message transmission method as described in the second aspect or any possible implementation thereof.

[0059] A sixth aspect provides a communication device, the communication device including a processor and a memory; the processor is configured to execute instructions stored in the memory to cause the communication device to perform a message transmission method as described in the first aspect or any possible implementation of the first aspect, or a message transmission method as described in the second aspect or any possible implementation of the second aspect.

[0060] A seventh aspect provides a network system including at least one communication device, the at least one communication device being configured to perform a message transmission method as described in the first aspect or any possible implementation thereof, or a message transmission method as described in the second aspect or any possible implementation thereof.

[0061] Eighthly, a computer program product is provided, including instructions that, when executed on a processor, implement the message transmission method as described in the first aspect or any possible implementation thereof, or the message transmission method as described in the second aspect or any possible implementation thereof.

[0062] A ninth aspect provides a computer-readable storage medium including computer program instructions that, when executed by a communication device, enable the communication device to perform a message transmission method as described in the first aspect or any possible implementation thereof, or a message transmission method as described in the second aspect or any possible implementation thereof.

[0063] Based on the implementation methods provided in the above aspects, this application can be further combined to provide more implementation methods.

[0064] The following description includes more specific details about the implementation methods provided for the above aspects. Attached Figure Description

[0065] Figure 1 is a schematic diagram of the structure of a data packet provided in an embodiment of this application;

[0066] Figure 2 is a schematic diagram of the structure of a network system provided in an embodiment of this application;

[0067] Figure 3a is a schematic diagram of the structure of a network system provided in an embodiment of this application;

[0068] Figure 3b is a schematic diagram of the structure of a network system provided in an embodiment of this application;

[0069] Figure 4 is an interactive schematic diagram of a communication device provided in an embodiment of this application;

[0070] Figure 5 is a flowchart illustrating a message transmission method provided in an embodiment of this application;

[0071] Figure 6 is a schematic diagram of a transmission channel preemption method provided in an embodiment of this application;

[0072] Figure 7 is a schematic diagram of a preemption method for a transmission channel provided in an embodiment of this application;

[0073] Figure 8 is a schematic diagram of a transmission channel preemption method provided in an embodiment of this application;

[0074] Figure 9 is a schematic flowchart of a message transmission method provided in an embodiment of this application;

[0075] Figure 10 is a schematic diagram illustrating the benefits of a message transmission method provided in an embodiment of this application;

[0076] Figure 11 is a schematic diagram of a communication device provided in an embodiment of this application;

[0077] Figure 12 is a schematic diagram of the structure of a communication device provided in an embodiment of this application;

[0078] Figure 13 is a schematic diagram of the structure of a communication device provided in an embodiment of this application;

[0079] Figure 14 is a schematic diagram of the structure of a communication system provided in an embodiment of this application. Detailed Implementation

[0080] The technical solutions involved in this application may be applied not only to current communication technologies or communication devices, but also to future communication technologies or communication devices, or to communication systems and network systems that include communication devices. The terminology used in the embodiments section of this application is only for explaining specific embodiments of this application and is not intended to limit this application. A brief introduction to some concepts that may be involved in this application is given below.

[0081] The network model involved in this application is used to divide the network communication process into several relatively independent and functionally defined layers. The network model can be the Open Systems Interconnection (OSI) model, the Transmission Control Protocol / Internet Protocol (TCP / IP) model, etc.

[0082] The OSI model consists of the Physical Layer, Data Link Layer (also known as the Link Layer), Network Layer, Transport Layer, Session Layer, Presentation Layer, and Application Layer. Each layer builds upon the layer below it, providing services to the layer above it. This embodiment mainly involves the Link Layer and the layer above it. The Link Layer is responsible for establishing, maintaining, and releasing data links between two adjacent nodes, as well as performing error control and flow control. The Data Link Layer uses Media Access Control (MAC) addresses to enable addressing and communication between nodes. The layer above the Link Layer is the Network Layer, which is responsible for providing communication services to different hosts on a packet-switched network, enabling network interconnection. The Network Layer uses Internet Protocol (IP) addresses for addressing and routing, ensuring that data packets arrive at their destination correctly. In addition, the Network Layer provides functions such as congestion control and packet forwarding.

[0083] The TCP / IP model simplifies network communication into four layers: the network interface layer (equivalent to the OSI physical and data link layers), the network layer, the transport layer, and the application layer. This embodiment mainly involves the network interface layer and the layers above it. The network interface layer corresponds to the OSI physical and data link layers, and is responsible for data frame transmission and physical media management. The network layer is responsible for packet routing and logical addressing.

[0084] A data packet is the basic data unit transmitted in a network, containing a payload and a header. Data packets have different forms (such as frames, packets, and segments) at different network layers. The main functions of a data packet include: carrying the data that the user actually needs to transmit (such as files, audio, and video); and implementing routing, verification, and sequence control mechanisms through the header.

[0085] Business data is the actual content generated or processed by the application, typically encapsulated in the payload of a data message. Business data is usually used to convey user requests, carry service results, etc.

[0086] Control messages are used for management, negotiation, or status maintenance between network devices. They do not directly transmit user data but rather ensure the reliability of communication. The main functions of control messages include: establishing / disconnecting connections (such as a three-way handshake), error reporting, and exchanging routing information.

[0087] The differences between data messages and control messages will be explained next.

[0088] Data packets carry upper-layer protocol or application service data, while control packets are generated by the sending end and consumed by the corresponding layer at the receiving end. Control packets are used for link management and control, and typically have a higher priority than data packets when sent. Control packets are directly consumed by the corresponding layer at the other end, so they do not need to be temporarily stored in a buffer (e.g.) before consumption, nor do they require flow control. Data packets, on the other hand, need to be consumed by upper layers, and flow control is required when sending data packets to prevent buffer overflow at the receiving end.

[0089] Data packets can be transmitted in fragments, for example, by dividing a data packet into several data blocks. A data block is a data unit oriented towards the storage or application layer, typically referring to a fixed-size or variable-length data block, used for batch transmission or storage management. A flow control unit, also known as a flow management unit, is usually presented in the form of flits. A flow control unit is a logical unit oriented towards the lower layer of network transmission, dividing larger data packets or blocks into smaller data units to improve network resource utilization and flow control efficiency.

[0090] Please refer to Figure 1, which is a schematic diagram of a data packet structure provided in an embodiment of this application. As shown in Figure 1, exemplarily, a data packet is divided into a maximum of 16 data blocks (e.g., data block 0 to data block 15), and each data block contains a maximum of 32 flow control units (e.g., flow control unit 0 to flow control unit 31). The last data block may not be able to fill all 32 flow control units due to insufficient data. The size of one flow control unit is fixed at 20 bytes (B). A data packet composed of data blocks and flow control units can support a maximum of 20 * 16 * 32 = 10240 bytes.

[0091] Because control messages require the transmission of link information and sending strategies, they typically have a higher sending priority than data messages. During data message transmission, another data message is not allowed to preempt the sending order of the currently being transmitted data message. Therefore, data messages are sent in scheduled order, and only one data message can be sent at a time; the next data message cannot be sent until the previous one is completed. This can cause the currently transmitting data message to occupy the transmission channel, preventing other higher-priority data messages from preempting the transmission channel, resulting in head-of-line congestion. For example, a low-priority, long data message being transmitted can severely block a high-priority, short data message, causing important and urgent high-priority short data messages to wait a long time before being sent, increasing transmission latency.

[0092] To address the aforementioned problems, this application provides a message transmission method applied to a communication device for implementing network communication. In this method, the communication device encapsulates service data transmitted from the upper layer to the link layer into a first control message to preempt the transmission channel of data packets. The first control message is sent after the currently transmitted second control message or the currently transmitted data block in a data packet has been completed. In this way, the control message carries higher-priority service data, and the control message carrying the service data is inserted between data blocks of lower-priority data packets to preempt the transmission channel, reducing the transmission delay of high-priority or delay-sensitive messages.

[0093] To make the objectives, technical solutions, and advantages of this application clearer, the application will now be described in further detail with reference to the accompanying drawings.

[0094] In the following description, the terms "first," "second," etc., 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. Therefore, a feature defined with "first," "second," etc., may explicitly or implicitly include one or more of that feature. In the description of this application, unless otherwise stated, "a plurality of" means two or more.

[0095] Furthermore, in this application, directional terms are defined relative to the orientation of the components schematically placed in the accompanying drawings. It should be understood that these directional terms are relative concepts, used for relative description and clarification, and can change accordingly depending on the orientation of the components in the accompanying drawings.

[0096] The application scenarios of the embodiments of this application will be described below with reference to the accompanying drawings.

[0097] Figure 2 is a schematic diagram of a network system provided in an embodiment of this application. The network system can be a peripheral component interconnect express (PCIe) interconnect system architecture. PCIe interconnect system architecture is a high-performance, low-latency, high-speed communication standard widely used for connecting various components inside a computer. The PCIe architecture is mainly used to connect external devices and internal components such as the central processing unit (CPU), memory, storage devices, graphics cards, and network cards on the motherboard.

[0098] As shown in Figure 2, the network system 200 may include a processor 201, a root complex (RC) 202, switches 203 to 206, and endpoint devices 207 to 212.

[0099] The processor 201 is communicatively connected to the root multiplexer 202. The root multiplexer 202 is communicatively connected to switches 203 and 205. Switch 203 is also communicatively connected to switch 204 and endpoint device 207. Switch 204 is also communicatively connected to endpoint devices 208 and 209. Switch 205 is also communicatively connected to switch 206 and endpoint device 210. Switch 206 is also communicatively connected to endpoint devices 211 and 212. The communication connections between these nodes can be implemented through lanes.

[0100] The processor 201 is used to manage and control data transfer in the PCIe interconnect system architecture, as well as to perform memory management, bandwidth scheduling, and traffic management on the PCIe interconnect system architecture.

[0101] The root multiplexer 202, as the main controller of the system, is located between the processor 201 and the PCIe devices, and is responsible for coordinating and managing the communication between the CPU and the PCIe devices.

[0102] Switches 203 through 206, also known as PCIe devices or PCIe switches, are used to establish connections between multiple PCIe devices and support point-to-point communication between them. Switches 203 through 206 act as data forwarders, transferring data from one device to another as needed.

[0103] Endpoint devices 207 to 212 are actual hardware devices connected to the PCIe bus, such as graphics cards, network interface cards, and storage controllers; they can also be referred to as PCIe devices. Endpoint devices 207 to 212 exchange data with root multiplexer 202 or switches 203 to 206 via the PCIe interface.

[0104] It should be understood that Figure 2 is a simplified schematic diagram for ease of understanding only. The network system 200 may also include other network devices, servers, and / or other devices, and the connection relationships between nodes may also vary, which are not shown in Figure 2.

[0105] Figure 3a is a schematic diagram of the structure of a network system provided in an embodiment of this application. The network system can be any one or more layers of network architecture.

[0106] As shown in Figure 3a, the network system 300 may include router 301, switches 302 to 305, and terminal devices 306 to 308.

[0107] Router 301 is communicatively connected to Internet 309, and also to switch 302. Switch 302 is communicatively connected to switches 303, 304, and 305. Switch 303 is also communicatively connected to terminal device 306, switch 304 is also communicatively connected to terminal device 307, and switch 305 is also communicatively connected to terminal device 308. Internet 309 can be the Internet, etc.

[0108] Router 301 can be a home router, enterprise router, core router, edge router, backbone router, access router, or any other type of router. The router 301 can be selected according to the applicable scenarios of the embodiments of this application.

[0109] Switches 302 to 305 are core switches used to manage specific network segments. They can be switches for internal / external switching segments, storage segments, or management segments, such as Layer 2, Layer 3, and Layer 4 switches classified by their operating level. Switches 302 to 305 can be Ethernet switches, fiber optic switches, or PoE (Power Over Ethernet) switches, etc. In this embodiment, switches 302 to 305 can be selected according to the applicable scenarios of this embodiment, such as access switches, aggregation switches, and core switches.

[0110] Terminal devices 306 to 308 can also be referred to as terminals, terminal nodes, user equipment (UE), mobile stations (MS), mobile terminals (MT), etc. Terminal devices can be wired terminals such as mobile phones, tablets, computers with wireless transceiver capabilities, virtual reality (VR) terminal devices, augmented reality (AR) terminal devices, wireless terminals in self-driving vehicles, wireless terminals in smart grids, wireless terminals in smart cities, wireless terminals in smart homes, etc. The embodiments of this application do not limit the specific technologies or device forms used in the terminal devices.

[0111] It should be understood that Figure 3a is a simplified schematic diagram for ease of understanding only. The network system 300 may also include other network devices, servers, and / or other devices, and the connection relationships between nodes may also vary, which are not shown in Figure 3a.

[0112] Figure 3b is a schematic diagram of a network system provided in an embodiment of this application. The network system can be a high-speed interconnect system architecture with device resource pooling or a high-speed interconnect system architecture with non-pooled resources.

[0113] As shown in Figure 3b, the network system 300 may include a global domain and a clan domain.

[0114] A clan domain is a tightly coupled domain where devices are interconnected in a close manner, resulting in relatively low transmission latency and high data packet transmission efficiency.

[0115] A global domain is a loosely coupled domain composed of multiple tightly coupled domains (such as clan domains). The connections between devices in different tightly coupled domains of the global domain are relatively loose, supporting long-distance connections, but with relatively high transmission latency and low data packet transmission efficiency. A global domain includes one or more network devices, which communicate with network devices in each clan domain to construct the global domain.

[0116] Among them, network devices can be switching devices, such as switches, or any network device or apparatus that has functions such as routing, forwarding, and congestion control.

[0117] A clan domain may include one or more network devices, one or more function entities, one or more physical devices, and / or a domain interconnection manager.

[0118] Among them, the functional entity is the most basic unit of bus communication and resource management. A physical device can contain one or more functional entities.

[0119] Physical devices are entities that perform tasks such as computing and storage, such as graphics processing units (GPUs), memory, and solid-state disks (SSDs).

[0120] The domain interconnection manager is responsible for interconnection control and resource management.

[0121] This application does not limit the specific composition of the clan domain; the clan domain can be composed of any number of the above-mentioned one or more devices.

[0122] For example, as shown in the clan domain on the left side of Figure 3b, a clan domain can include two interconnected network devices. One network device is connected to two functional entities and four physical devices. If any two of the two functional entities and four physical devices are interconnected, then this network device is directly or indirectly connected to those two functional entities and four physical devices. The other network device is connected to six physical devices and the domain interconnect manager. If any two of the six physical devices are interconnected, then this other network device is directly or indirectly connected to all six physical devices.

[0123] For example, as shown in the clan domain on the right side of Figure 3b, a clan domain can include a network device. This network device is connected to six physical devices and the domain interconnect manager. If every two of the six physical devices are interconnected, then the network device is directly or indirectly connected to all six physical devices.

[0124] It should be understood that Figure 3b is a simplified schematic diagram for ease of understanding only. The network system 300 may also include other network devices, servers, and / or other devices, and the connection relationships between nodes may also vary, which are not shown in Figure 3b.

[0125] Based on the network system scenario examples shown in Figures 2, 3a, or 3b above, when the message transmission method provided in this application embodiment is applied to the scenarios shown in Figures 2, 3a, or 3b above, it can be implemented by two or more communication devices that are connected in communication within network system 200 or network system 300.

[0126] Figure 4 is an interactive schematic diagram of a communication device provided in an embodiment of this application. As shown in Figure 4, communication device 401 and communication device 402 can be any two devices in network system 200. For example, communication device 401 can be processor 201 and communication device 402 can be root multiplexer 202, or communication device 401 can be root multiplexer 202 and communication device 402 can be switch 203 or switch 205, or communication device 401 can be switch 203 and communication device 402 can be switch 204 or endpoint device 207, etc. Communication device 401 and communication device 402 can be any two devices in network system 300. For example, communication device 401 can be router 301 and communication device 402 can be switch 302, or communication device 401 can be switch 302 and communication device 402 can be switch 303, switch 304 or switch 305, or communication device 401 can be switch 303 and communication device 402 can be terminal device 306, etc.

[0127] The communication devices 401 and 402 are based on network model architectures such as the OSI model or the TCP / IP model. The communication devices 401 and 402 include a link layer (or network interface layer) and an upper layer above the link layer (e.g., the network layer). The network layer is used to send service data to the link layer.

[0128] Communication devices 401 and 402 are communicatively connected. One of the communication devices 401 and 402 includes a transmit buffer, and the other includes a receive buffer; alternatively, both communication devices 401 and 402 include both transmit and receive buffers. In this embodiment, communication device 401 including a transmit buffer and communication device 402 including a receive buffer are used as an example for illustration.

[0129] Transmit and receive buffers can be implemented using dynamic random access memory (DRAM), static random access memory (SRAM), or similar buffer devices. For example, transmit and receive buffers are typically embedded in the hardware of routers or switches, either as part of the network interface card or directly integrated onto the processing chip. Alternatively, routers and switches use dedicated network chips such as application-specific integrated circuits (ASICs) to accelerate packet processing and buffering, with built-in SRAM or DRAM in the transmit and receive buffers. Finally, routers and switches may have dedicated memory modules on their motherboards for buffer storage.

[0130] The specific steps of the message transmission method provided in this application will be described in detail below with reference to the communication devices 401 and 402 shown in Figure 4.

[0131] Figure 5 is a schematic flowchart of a message transmission method provided in an embodiment of this application. As shown in Figure 5, the message transmission method can be systematically implemented by communication between communication device 401 and communication device 402, and the method may include the following steps S501 to S504.

[0132] S501, the communication device 401 encapsulates the service data transmitted from the upper layer to the link layer into a first control message.

[0133] The link layer of communication device 401 encapsulates the service data transmitted from the upper layer to the link layer into a first control message.

[0134] As one possible implementation, the communication device 401 calls the link layer interface when the service data arrives at the link layer from the upper layer to encapsulate the service data into a first control message.

[0135] In this context, service data can be the payload of data packets received by upper layers such as the network layer. The network layer parses the data packet payload to obtain the service data and transmits it to the link layer. Correspondingly, the link layer receives the service data.

[0136] As one possible implementation, the link layer of communication device 401 can be the link layer of a communication device that has a network layer and a link layer. In this case, communication device 401 receives data packets through the network layer and parses the service data from the data packets to transmit the data to the link layer.

[0137] As another possible implementation, the communication device 401 is a link layer network device (e.g., a switch), and the network layer network device (e.g., a router) receives data packets and parses the service data from the data packets to transmit the data to the communication device 401.

[0138] The message format of the first control message will be explained in detail below.

[0139] The first control message can be obtained by extending the control message and is used to carry business data. This business data can be high-priority and short in length. Examples include memory operations, file operations, database operations, remote procedure calls (RPC), or any other operations that can be indicated by business data.

[0140] The specific message format of the first control message can be shown in Tables 1-3. Next, the functional description of the fields contained in the first control message will be given in conjunction with Tables 1-3.

[0141] Table 1

[0142] Table 2

[0143] Table 3

[0144] Taking the first control message, which is called the Priority Packet, as an example, the meaning of each field in the first control message will be explained.

[0145] Tables 1-3 are three independent sub-tables, each representing a flow control unit, and each flow control unit includes one or more payloads.

[0146] For example, the flow control unit shown in Table 1 includes the header and payload of the first control message, and the flow control units shown in Tables 2 and 3 include the payload of the first control message. The meaning of each field in the header of the first control message will be explained below with reference to Table 1.

[0147] The first control message includes a configuration (config, CFG) field. The configuration field indicates whether the message type is a control message or a data message. For example, a configuration field value of CFG=0 indicates that the message type is a control message.

[0148] The first control message also includes a control (CTRL) field and a sub-control (SUB_CTRL) field. The control field indicates the type of control message to which the message belongs, and the sub-control field indicates the sub-type of the control message to which the message belongs. For example, if the value of the control field is the second value (CTRL = 0110) and the value of the sub-control field is the third value (SUB_CTRL = 0000), both indicate that the message is a control message used to carry service data.

[0149] The combination of the aforementioned CFG, CTRL, and SUB_CTRL fields determines whether the message type is a control message used to carry service data. This application does not limit the specified values ​​of the aforementioned CFG, CTRL, and SUB_CTRL fields for control messages carrying service data. For example, the SUB_CTRL field can also be a value corresponding to flow control, initialization, or idle padding in relevant message transmission protocols.

[0150] As one possible implementation, the maximum length of the first control message is the length corresponding to n data blocks, where n is a positive number. Taking the maximum length of the first control message as the length corresponding to one data block as an example, the first control message includes a first content length field and a second content length field.

[0151] The first content length field, such as the CLENGTH[9:5] field, is used to indicate how many flow control units the first control message includes. For example, the CLENGTH[9:5] field has a value of 0 to 31, which respectively indicate that the first control message includes 1 to 32 flow control units.

[0152] The second content length field, such as the CLENGTH[4:0] field, is used to indicate the last tail flow control unit that carries the payload, and the size of the payload in the tail flow control unit.

[0153] For example, when CLENGTH[4:0] is 0-15, it indicates that the payload (PLD) terminates at the last flow control unit position within the data block, and the payload size of this flow control unit is (CLENGTH[4:0]+1) bytes. When CLENGTH[4:0] is 16-19, it indicates that the payload terminates at the second-to-last flow control unit position within the data block, and the payload size of this flow control unit is (CLENGTH[4:0]+1) bytes. When CLENGTH[4:0] is 20-27, it indicates that the payload terminates at the second-to-last flow control unit position within the data block, and the payload size of this flow control unit is (CLENGTH[4:0]-11) bytes. When CLENGTH[4:0] is 28-30, it indicates that the payload terminates at the last flow control unit position within the data block, and the payload size of this flow control unit is (CLENGTH[4:0]-11) bytes. CLENGTH[4:0] = 31, reserved.

[0154] In this embodiment, the data block can include up to 32 flow control units, and the size of each flow control unit can be 20 bytes. In other possible embodiments, the specific size of the data block and flow control unit can be flexibly set according to requirements or protocols, which will not be elaborated here.

[0155] The first control message also includes flow control fields, such as the virtual lane (VL) field shown in Table 1. This field indicates the virtual lane for flow management and control. Specifically, in a credit-based flow control mechanism, the credit value corresponding to the virtual lane prevents the message transmission rate from exceeding the receiver's processing capacity. The VL field in this mechanism classifies and isolates different data streams, avoiding interference between them and ensuring the rational allocation of network resources.

[0156] As one possible implementation, after the link layer of the communication device 401 receives the service data transmitted from the upper layer to the link layer, if the operation corresponding to the service data is an operation with low latency requirements, the service data is encapsulated into a first control message.

[0157] Optionally, the communication device 401 can determine whether the operation corresponding to the service data has low latency requirements based on the opcode field of the service data. Which opcode field value corresponds to the operation with low latency requirements can be preset, for example, based on a mapping table pre-stored in the communication device 401, so that when the communication device 401 receives an opcode field value existing in the mapping table, it determines that the service data to which the opcode field value belongs has low latency requirements. Correspondingly, the first control message may also include an opcode field.

[0158] In this embodiment of the application, the priority of the first control message during message transmission is defined as follows: the priority of other control messages is greater than the priority of the first control message (the control message used to carry business data), and the priority of the first control message is greater than that of the data message.

[0159] Other control messages are those defined by the protocol, with the specific type determined by the protocol type, such as credit flow control control messages. Data packets can also have a higher priority than null packets. Null packets, as a type of control message, are defined in some industry protocols to fill idle links; their priority is typically the lowest.

[0160] Thus, if the communication device 401 is currently sending a data packet, and the link layer receives two control packets, such as a first control packet and a credit flow control packet, since the credit flow control packet has a higher priority than the first control packet, the credit flow control packet will preempt the data packet sending channel first. After the credit flow control packet is sent, the first control packet will preempt the data packet sending channel.

[0161] Tables 1-3 provided in this application embodiment are merely one possible example of the first control message and do not limit the message structure of the first control message. For example, the last flow control unit also includes a cyclic redundancy check (CRC) field, which is used to record the message's verification information. The length of the CRC is defined according to the actual design; in this application embodiment, the CRC length is 4 bytes. If other modes or designs are used in the protocol, it can be replaced with PLD or other fields.

[0162] S502, after the data block currently being transmitted in the second control message or data message currently being transmitted at the link layer is completed, the communication device 401 sends the first control message.

[0163] As one possible implementation, when the link layer of communication device 401 is currently sending a data block, a first control message is sent after the data block is sent and before the next data block of the data packet is sent.

[0164] For example, as shown in FIG6, the link layer of communication device 401 is currently transmitting a low-priority data packet 1 containing an 8-kilobyte (KB) payload. The data packet consisting of 8KB of service data may include 14 data blocks, such as data block 0 to data block 13, with a total length of 8960 bytes. When the link layer of communication device 401 is currently transmitting any data block of the data packet, such as data block 0, after transmitting data block 0 and before transmitting the next data block, such as data block 1, a first control message preempts the transmission channel and transmits the first control message through the link layer.

[0165] As one possible implementation, the first control message is sent after the link layer has finished sending the data block currently being sent in the data packet and before sending the next data block of the data packet.

[0166] For example, based on the data message 1 shown in FIG6 above, as shown in FIG7, when the data block currently being sent by the link layer of the communication device 401, such as data block 0, is completed, before sending the next data block, such as data block 1, the first control message preempts the transmission channel and sends the first control message through the link layer.

[0167] In a possible implementation of this application embodiment, for a data packet currently being transmitted at the link layer, the communication device 401 determines that the number of times the transmission channel for the currently transmitted data packet has been preempted is less than or equal to a preset threshold before transmitting the first control message through the link layer. Thus, when the number of times the transmission channel for the currently transmitted data packet has been preempted exceeds the preset threshold, the data packet is transmitted preferentially to prevent excessive transmission delay. The preset threshold can be flexibly adjusted according to the transmission delay requirements of the data packet.

[0168] As one possible implementation, the first control message is sent after the second control message currently being sent by the link layer has been completed.

[0169] For example, as shown in FIG8, when the second control message, such as control message 1, that the link layer of communication device 401 is currently sending is completed, before sending the next data message, such as data message 1, the first control message preempts the transmission channel and sends the first control message through the link layer.

[0170] In this embodiment, a first control message is inserted between data blocks of a data packet because the header field of each data block identifies the message type, and the tail field of each data block carries CRC check information. The receiving end, such as the communication device 402, can identify the first control message inserted between data blocks of the data packet through the header field of the received message, without affecting the information verification of data blocks before and after the first control message.

[0171] S503, Communication device 402 receives the first control message.

[0172] Communication device 402 receives several messages sent by communication device 401. These messages include a first control message and may also include any number of data messages and other control messages. The other control messages are control messages used to carry control data. In this embodiment, the first control message is a control message used to carry service data. Unrestricted control messages can be understood as control messages used to carry control data.

[0173] In this embodiment of the application, the processing of the first control message by the communication device 402 can be implemented by the link layer in the communication device 402, or it can be implemented by the communication device 402 belonging to the link layer. Please refer to the relevant description of the communication device 401 for the difference, which will not be repeated here.

[0174] S504, the communication device 402 forwards the payload of the first control message to the upper layer of the link layer for processing.

[0175] The communication device 402 identifies the first control message from the received messages and forwards the payload of the first control message to the upper layer of the link layer for processing.

[0176] As one possible implementation, the communication device 402 parses the message header of the received message and identifies the message with the configuration field as the first value, the control field as the second value, and the sub-control field as the third value as the designated message, which belongs to the first control message.

[0177] For example, the communication device 402 filters out a specified message from the received messages whose configuration field value is 0, control field value is 0110, and sub-control field value is 0000. This specified message belongs to the first control message.

[0178] As one possible implementation, after the communication device 402 identifies the first control message, if the information verification (e.g., information verification based on CRC) of the first control message is correct, it will strip the header and trailer of the first control message to obtain the payload, and provide the payload to the upper layer of the link layer (e.g., the network layer) for processing.

[0179] As one possible implementation, the communication device 402 buffers the received data packets, excluding the first control message, from the received messages.

[0180] Optionally, after the communication device 402 provides the payload of the first control message to the upper layer of the link layer, it continues to receive data packets from the preempted transmission channel. After receiving all data blocks of the data packet, the communication device 402 determines whether the data packet has been received completely based on the length of the data packet header, and then consumes the data packet.

[0181] Based on the message transmission method provided in this application, service data is carried by messages of the control message type. After the data block currently being transmitted in the second control message or data message currently being transmitted at the link layer is completed, the control message, having a higher transmission priority than the data message, can preempt the transmission channel and be transmitted before the data block of the next data message is sent. If service data is carried by a data message, and a lower-priority data message is being transmitted, the higher-priority data message must wait for the lower-priority data message to complete before being transmitted. In contrast, the message transmission method provided in this application allows control messages to carry higher-priority service data, inserting control messages carrying service data between data blocks of lower-priority data messages to preempt the transmission channel, thus reducing the transmission delay of high-priority or delay-sensitive messages.

[0182] The message transmission method provided in this application has been described in detail above with reference to Figures 5 to 8. Conventional control messages in this field typically lack flow control mechanisms because they do not transmit service data and have a small data volume. However, the first control message in the message transmission method provided in this application is used to carry service data, and it is necessary to consider the rate at which the sender transmits the first control message to the receiver and the receiver's consumption of the first control message to determine whether it will cause the receiver's receive buffer to overflow. Therefore, the message transmission method in this application can also perform flow control during the transmission process of the first control message. The flow control mechanism in the message transmission method provided in this application will be described in detail below with reference to Figure 9.

[0183] Figure 9 is a schematic flowchart of a message transmission method provided in this application. As shown in Figure 9, the message transmission method can be systematically implemented by communication between communication device 401 and communication device 402, and the method may include the following steps S901 to S906.

[0184] S901, the communication device 401 encapsulates the service data transmitted from the upper layer to the link layer into a first control message.

[0185] As one possible implementation, please refer to S501 shown in Figure 5 for the specific implementation method of S901, which will not be repeated here.

[0186] S902, after the data block currently being transmitted in the second control message or data message currently being transmitted at the link layer is completed, the communication device 401 sends the first control message.

[0187] As one possible implementation, please refer to S502 shown in Figure 5 for the specific implementation method of S902, which will not be repeated here.

[0188] S903, Communication device 401 deducts the credit value corresponding to the first control message.

[0189] The credit value corresponding to the first control message can be the credit value corresponding to the virtual channel indicated by the flow control field as shown in Table 1.

[0190] If the credit value corresponding to the virtual channel is less than a preset threshold, then when the communication device 401 receives a subsequent first control message indicating the same virtual channel in the flow control field, it will not send the subsequently received first control message to the communication device 402.

[0191] If the credit value corresponding to the virtual channel is greater than or equal to a preset threshold, then when the communication device 401 receives a subsequent first control message indicating the same virtual channel in the flow control field, it sends the subsequently received first control message to the communication device 402.

[0192] S904, Communication device 402 receives the first control message.

[0193] As one possible implementation, please refer to S503 shown in Figure 5 for the specific implementation of S904, which will not be repeated here.

[0194] S905, the communication device 402 forwards the payload of the first control message to the upper layer of the link layer for processing.

[0195] As one possible implementation, please refer to S504 shown in Figure 5 for the specific implementation of S905, which will not be repeated here.

[0196] S906. After consuming the first control message at the upper layer, the communication device 402 returns the credit value corresponding to the first control message to the communication device 401.

[0197] The credit value corresponding to the first control message can be the credit value corresponding to the virtual channel indicated by the flow control field as shown in Table 1.

[0198] Based on S901 to S906 above, a letter of credit-based flow control mechanism is introduced into the message processing of control messages to control the sending rate of control messages carrying business data, thereby avoiding buffer overflow or server crashes due to message backlog. For specific technical details of the flow control process provided in this application embodiment, please refer to the technical specifications or protocols for letter of credit-based flow control, which will not be repeated here. Furthermore, the introduction of a letter of credit-based flow control mechanism in this application embodiment is merely one possible example and does not limit the flow control mechanisms that can be used in the message transmission method of this application. For example, this application embodiment can also use window-based flow control, rate-based flow control, token bucket-based flow control, and other flow control mechanisms to implement flow control of the first control message. For example, when the communication device 401 sends two adjacent first control messages, there is a minimum sending interval between each pair of adjacent first control messages, that is, the sending interval between the two first control messages is greater than or equal to a preset time, so that the receiving end, such as the communication device 402, can consume the service data carried by the first control message in a timely manner, so as to ensure that the receiving buffer of the receiving end will not overflow.

[0199] As shown in Figure 10, the message transmission method based on the above embodiments of this application, taking a low-priority data packet carrying an 8KB payload as an example, comprises approximately 14 data blocks with a total length of 8960 bytes. Assuming a corresponding transmission rate of 128 gigabytes per second (GB / s), completing the transmission of the entire data packet takes 70 ns. Therefore, the next data packet must wait at most 70 ns before transmission can begin. However, the message transmission method based on the above embodiments of this application allows for the insertion of a first control message between data block 0 and data block 1. The maximum waiting time is the length of one data block (640 bytes), and the time required to send one data block is 5 ns, significantly reducing the latency of delay-sensitive message transmission.

[0200] The message transmission method and its implementation provided by the embodiments of this application have been described in detail above with reference to Figures 1 to 10. The communication device provided by this application will now be described with reference to Figure 11. These communication devices can be used to implement any communication device proposed in the above method embodiments (e.g., communication device 401, communication device 402, etc.), and to perform the functions of the aforementioned communication device. As shown in Figure 11, the communication device 1100 includes a transceiver module 1110 and a processing module 1120.

[0201] In possible embodiments of this application, the communication device 1100 is used as the sender of the first control message, such as the communication device 401 in the message transmission method shown in FIG. 5 or FIG. 9, which can be referred to as a message transmission device. The processing module 1120 is used to encapsulate the service data transmitted from the upper layer to the link layer into the first control message; the upper layer is the layer above the link layer in the network model. The transceiver module 1110 is used to send the first control message after the data block currently being sent in the second control message or data message currently being sent in the link layer has been sent.

[0202] As one possible implementation, the first control message includes a configuration field with a first value, which indicates that the privileged message is a control message.

[0203] As one possible implementation, the first control message also includes a control field and a sub-control field. The control field indicates the type of control message to which the first control message belongs, and the sub-control field indicates the sub-type of the control message to which the first control message belongs. The control field has a second value, and the sub-control field has a third value.

[0204] As one possible implementation, the maximum length of the first control message is the length corresponding to n data blocks, where n is a positive number.

[0205] As one possible implementation, the maximum length of the first control message is the length corresponding to one data block. The first control message includes a content length field, which is used to indicate the last tail flow control unit carrying the payload, and the size of the payload in the tail flow control unit.

[0206] As one possible implementation, a data block may include a maximum of 32 flow control units.

[0207] As one possible implementation, a flow control unit is 20 bytes in size.

[0208] As one possible implementation, the first control message also includes a flow control field, which is used to indicate the virtual channel. In a letter of credit-based flow control mechanism, the message transmission rate is prevented from exceeding the processing capacity of the receiving end based on the credit value corresponding to the virtual channel.

[0209] As one possible implementation, the processing module 1120 is also used to: deduct the credit value corresponding to the virtual channel indicated by the flow control field.

[0210] As one possible implementation, the interval between the transmission of the two first control messages is greater than or equal to a preset duration.

[0211] As one possible implementation, the transceiver module 1110 is also used to: receive service data transmitted from the upper layer to the link layer. The processing module is also used to: when the operation corresponding to the service data is an operation with low latency requirements, encapsulate the service data into a first control message.

[0212] As one possible implementation, the business data includes an opcode field, which indicates the operation type of the operation corresponding to the business data. The processing module 1120 is further configured to: determine, based on the opcode field of the business data, whether the operation corresponding to the business data is an operation with low latency requirements.

[0213] As one possible implementation, the transceiver module 1110 is specifically used for: sending a first control message after the link layer has finished sending a data block and before sending the next data block of the data packet; sending a first control message after the link layer has finished sending the data block currently being sent in the data packet and before sending the next data block of the data packet; and sending a first control message after the link layer has finished sending the second control message currently being sent.

[0214] In possible embodiments of this application, the communication device 1100 serves as the receiver of the first control message, such as the communication device 402 in the message transmission method shown in FIG. 5 or FIG. 9, which can be referred to as a message transmission device. The transceiver module 1110 is used to receive the first control message. The processing module 1120 is used to forward the payload of the first control message to the upper layer of the link layer for processing, where the upper layer is the layer above the link layer in the network model.

[0215] As one possible implementation, the processing module 1120 is also used to: identify a specified message in the data packets received at the link layer where the configuration field has a first value, the control field has a second value, and the sub-control field has a third value, and determine the specified message as the first control message.

[0216] As one possible implementation, the transceiver module 1110 is also used to: buffer data packets already received by the link layer; and receive the remaining part of the data packets after forwarding the payload of the first control message to the upper layer of the link layer for processing.

[0217] As one possible implementation, the transceiver module 1110 is also used to: after consuming the first control message at the upper layer, return the credit value of the virtual channel indicated by the flow control field of the first control message to the sender of the first control message.

[0218] For more detailed information on the functions performed by the aforementioned communication device, please refer to the descriptions of the message transmission methods and their implementations provided in Figures 5-10.

[0219] All of the above modules can be implemented in software, hardware, or a combination of both. For example, the implementation methods of the transceiver module 1110 and the processing module 1120 will be described below.

[0220] As an example of a software functional unit, the transceiver module 1110 or processing module 1120 may include code running on a device instance. The device instance may be at least one of a physical device (e.g., a switch, router, server, etc.) or a virtualized device (e.g., a virtual machine, etc.). Furthermore, the aforementioned device instance may be one or more. For example, the transceiver module 1110 or processing module 1120 may include code running on multiple physical / virtualized devices.

[0221] As an example of a hardware functional unit, the transceiver module 1110 or the processing module 1120 may include at least one hardware device. For example, the transceiver module 1110 may include a network interface card, a transceiver, etc., and the processing module 1110 may include any one or more processors such as a central processing unit (CPU), a digital signal processor (DSP), a network processor (NP), a neural network processing unit (NPU), a data processing unit (DPU), or a microprocessor (MP). Alternatively, the processing module 1120 may be a device or device implemented using an application-specific integrated circuit (ASIC) or a programmable logic device (PLD).

[0222] This application also provides a communication device 1200 as an example of a hardware device for communication. The communication device 1200 provided in this application can be any communication device proposed in this application (e.g., communication device 401, communication device 402, etc.) or any device with communication and processing capabilities (e.g., switch, router, etc.).

[0223] As shown in Figure 12, the communication device 1200 includes a bus 1202, a communication interface 1204, a processor 1206, and a memory 1208. The communication interface 1204, processor 1206, and memory 1208 communicate via the bus 1202. It should be understood that this application does not limit the number of processors and memories in the communication device 1200. Optionally, the processor 1206 of the communication device 1200 can be connected to a display or input device (not shown in Figure 12) via the communication interface 1204.

[0224] Bus 1202 can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one line is used to represent it in Figure 12, but this does not mean that there is only one bus or one type of bus. Bus 1202 may include a path for transmitting information between various components of communication device 1200 (e.g., communication interface 1204, processor 1206, memory 1208).

[0225] Communication interface 1204 uses transceiver modules such as, but not limited to, network interface cards and transceivers to enable communication between communication device 1200 and devices or communication networks. Communication interface 1204 may include wired communication interfaces and wireless communication interfaces. Specifically, communication interface 1204 may be an Ethernet interface, a Fast Ethernet (FE) interface, a Gigabit Ethernet (GE) interface, an Asynchronous Transfer Mode (ATM) interface, a wireless local area network (WLAN) interface, a cellular network communication interface, or a combination thereof. The Ethernet interface may be an optical interface, an electrical interface, or a combination thereof.

[0226] The display may include various display devices capable of display functions, such as plasma displays and liquid crystal displays. The communication device 1200 can realize display functions through the display. Input devices may include various input devices capable of information / signal input, such as keyboards, mice, and touch screens.

[0227] Processor 1206 may include a CPU, DSP, NP, NPU, DPU, MP, or one or more integrated circuits for implementing the solutions of this application. For example, processor 1206 includes an ASIC, PLD, or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. A PLD may be, for example, a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof. It can implement or execute various logic blocks, modules, and circuits described in conjunction with the disclosure of the embodiments of this invention. A processor may also be a combination that implements computational functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc. In the embodiments of this application, processor 1206 can be used to execute the steps or operations in the message transmission method proposed in FIG5 or FIG9 of the embodiments of this application.

[0228] Memory 1208 may include volatile memory, such as random access memory (RAM). Memory 1208 may also include non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid state drive (SSD). Alternatively, memory 1208 may be any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer.

[0229] The memory 1208 may store program code for executing the solution of this application, and the processor 1206 may execute the program code stored in the memory 1208. That is, the communication device 1200 may implement the steps or operations in the message transmission method proposed in FIG5 or FIG9 of the embodiments of this application through the processor 1206 and the program code in the memory 1208. The program code may include one or more software modules. Optionally, the processor 1206 itself may also store program code or instructions for executing the solution of this application.

[0230] In a specific embodiment, the communication device 1200 may correspond to any of the aforementioned communication devices (e.g., communication device 401, communication device 402, etc.). The processor 1206 reads the instructions in the memory 1208, enabling the communication device 1200 to execute the operations performed by any of the communication devices.

[0231] In a specific embodiment, the memory 1208 stores executable program code for implementing the functions of the aforementioned transceiver module 1110 and processing module 1120. The processor 1206 executes the executable program code to implement the functions of the aforementioned transceiver module 1110 and processing module 1120 respectively.

[0232] This application also provides a communication device 1300. The communication device 1300 is another example of a hardware device. The communication device 1300 provided in this application can be used as a network device (e.g., a switch, router, etc.) in this application. Any communication device proposed in this application (e.g., communication device 401, communication device 402, etc.) can be implemented on the communication device 1300.

[0233] As shown in Figure 13, the communication device 1300 includes a main control board 1310 and an interface board 1330.

[0234] The main control board 1310, also known as the main processing unit (MPU) or route processor card, is used to control and manage the various components in the communication device 1300, including routing calculation, device management, device maintenance, and protocol processing functions. The main control board 1310 includes a central processing unit 1311 and a memory 1312.

[0235] Interface board 1330 is also known as a line processing unit (LPU), linecard, or service board. Interface board 1330 provides various service interfaces and implements packet forwarding. Service interfaces include, but are not limited to, Ethernet interfaces, POS (packet over SONET / SDH) interfaces, etc., with Ethernet interfaces including, for example, flexible Ethernet clients (FlexE Clients). Interface board 1330 includes: a central processing unit 1331, a network processor 1332, a forwarding table entry memory 1334, and a physical interface card (PIC) 1333.

[0236] The central processing unit 1331 on the interface board 1330 is used to control and manage the interface board 1330 and communicate with the central processing unit 1311 on the main control board 1310.

[0237] Network processor 1332 is used to implement packet forwarding processing. Network processor 1332 can be in the form of a forwarding chip. Specifically, network processor 1332 forwards received packets based on the forwarding table stored in forwarding table entry memory 1334. If the destination address of the packet is the address of communication device 1300, the packet is sent to the CPU (such as central processing unit 1311) for processing; if the destination address of the packet is not the address of communication device 1300, the next hop and outgoing interface corresponding to the destination address are looked up in the forwarding table according to the destination address, and the packet is forwarded to the outgoing interface corresponding to the destination address. Uplink packet processing includes: packet ingress interface processing, forwarding table lookup; downlink packet processing includes forwarding table lookup, etc.

[0238] The physical interface card 1333 is used to implement physical layer interfacing functions. Raw traffic enters the interface board 1330 through this card, and processed packets are sent out from the physical interface card 1333. The physical interface card 1333, also known as a daughter card, can be installed on the interface board 1330. It is responsible for converting photoelectric signals into packets, performing validity checks on the packets, and forwarding them to the network processor 1332 for processing. In some embodiments, the central processing unit can also perform the functions of the network processor 1332, such as implementing software forwarding based on a general-purpose CPU, thus eliminating the need for the network processor 1332 in the physical interface card 1333.

[0239] Optionally, the communication device 1300 includes multiple interface boards. For example, the communication device 1300 also includes an interface board 1340, which includes a central processing unit 1341, a network processor 1342, a forwarding table entry memory 1344, and a physical interface card 1343.

[0240] Optionally, the communication device 1300 also includes a switching fabric board 1320. The switching fabric board 1320 can also be referred to as a switch fabric unit (SFU). In cases where the communication device has multiple interface boards 1330, the switching fabric board 1320 is used to complete data exchange between the interface boards. For example, interface boards 1330 and 1340 can communicate via the switching fabric board 1320.

[0241] The main control board 1310 and the interface board 1330 are coupled. For example, the main control board 1310, interface board 1330, interface board 1340, and switching network board 1320 communicate with each other via a system bus connected to the system backplane. In one possible implementation, an inter-process communication (IPC) channel is established between the main control board 1310 and the interface board 1330, and the main control board 1310 and the interface board 1330 communicate with each other through the IPC channel.

[0242] Logically, the communication device 1300 includes a control plane and a forwarding plane. The control plane includes a main control board 1310 and a central processing unit 1331, while the forwarding plane includes various components that perform forwarding, such as a forwarding table entry memory 1334, a physical interface card 1333, and a network processor 1332. The control plane performs functions such as router operation, generating forwarding tables, processing signaling and protocol messages, and configuring and maintaining the device's status. The control plane distributes the generated forwarding table to the forwarding plane. In the forwarding plane, the network processor 1332 looks up and forwards messages received by the physical interface card 1333 based on the forwarding table distributed by the control plane. The forwarding table distributed by the control plane can be stored in the forwarding table entry memory 1334. In some embodiments, the control plane and the forwarding plane can be completely separated and not on the same device.

[0243] In this embodiment, the operation on interface board 1340 is the same as that on interface board 1330, and will not be described again for simplicity. The communication device 1300 in this embodiment can correspond to the communication device in the above-described method embodiments. The main control board 1310, interface board 1330 and / or 1340 in the communication device 1300 can realize the functions and / or various steps implemented by the communication device in the above-described method embodiments, and will not be described again for simplicity.

[0244] It's worth noting that a communication device may have one or more main control boards, including a primary and a backup main control board. It may also have one or more interface boards; the stronger the data processing capability of the communication device, the more interface boards it provides. Each interface board may also have one or more physical interface cards. A switching network board may or may not exist; multiple boards can share the load and provide redundancy. In a centralized forwarding architecture, the communication device may not need a switching network board, as the interface boards handle the entire system's business data processing. In a distributed forwarding architecture, the communication device can have at least one switching network board, which enables data exchange between multiple interface boards, providing high-capacity data exchange and processing capabilities. Therefore, the data access and processing capabilities of a distributed architecture communication device are greater than those of a centralized architecture device. Alternatively, the communication device can also consist of a single board, without a switching network board. The functions of the interface board and the main control board are integrated on this single board. In this case, the central processing unit (CPU) on the interface board and the CPU on the main control board can be combined into a single CPU to execute the combined functions. This type of device has lower data exchange and processing capabilities (e.g., low-end switches or routers). The specific architecture adopted depends on the specific network deployment scenario, and no restrictions are imposed here.

[0245] In a specific embodiment, any of the aforementioned communication devices can be implemented on the communication device 1300. The memory 1312 of the main control board 1310 can store instructions for implementing the functions performed by the aforementioned communication devices (for example, instructions for implementing the functions of the aforementioned transceiver module 1110 and processing module 1120). The central processing unit 1311 of the main control board 1310 executes the instructions in the memory 1312 and can perform the functions performed by the aforementioned communication devices together with other components such as the interface board 1330 and the switching network board 1320.

[0246] In some possible implementations, any communication device proposed in the embodiments of this application can be a virtualization device. As an example, a virtualization device can be a virtual machine (VM), which is deployed on a hardware device (e.g., a physical host). A virtual machine refers to a complete computer system simulated by software, possessing full hardware system functionality and running in a completely isolated environment. Virtual machines can be configured as the communication devices involved in the embodiments of this application. For example, the various communication devices can be implemented based on a general-purpose physical host combined with network functions virtualization (NFV) technology. The communication device can be a virtual host, a virtual router, or a virtual switch. Those skilled in the art can, by reading this application, virtualize the various communication devices with the functions described in the embodiments of this application on a general-purpose physical host using NFV technology.

[0247] In some possible implementations, any communication device proposed in the embodiments of this application can be a processor or a chip. The chip may include a processor and a power supply circuit, the power supply circuit being used to supply power to the processor. In specific embodiments, the processor or chip may correspond to any of the aforementioned communication devices, and the processor or chip is capable of performing the operations performed by any of the communication devices.

[0248] This application also provides a communication system 1400 (or network system), as shown in FIG14. The communication system includes one or more communication devices. These communication devices can be any combination of one or more of the communication devices 1100. The combination of one or more communication devices can jointly perform the steps or operations in the message transmission method proposed in FIG5 or FIG9 of this application.

[0249] The memories of one or more communication devices in the communication system 1400 may contain the same instructions for executing the message transmission method proposed in FIG. 5 or FIG. 9 of the embodiments of this application. Alternatively, the memories of one or more communication devices in the communication system 1400 may each contain partial instructions for executing the message transmission method proposed in FIG. 5 or FIG. 9 of the embodiments of this application. In other words, a combination of one or more communication devices can jointly execute the instructions for implementing the message transmission method proposed in FIG. 5 or FIG. 9 of the embodiments of this application.

[0250] In a specific embodiment, the memories in different communication devices within the communication system 1400 can store different instructions. That is, the instructions stored in the memories of the communication devices can implement the functions of the aforementioned transceiver module 1110 and processing module 1120.

[0251] In some possible implementations, one or more communication devices in the communication system 1400 can be connected via a network. This network can be a wide area network (WAN) or a local area network (LAN), etc.

[0252] This application also provides another communication system (or network system), which includes one or more processors and one or more memories. The one or more memories store instructions for implementing the message transmission method proposed in Figure 5 or Figure 9 of this application. The one or more processors can execute the message transmission method proposed in Figure 5 or Figure 9 of this application by executing the instructions in the one or more memories. For more detailed descriptions of the implementation of the processor and memory, please refer to the preceding descriptions of the processor and memory.

[0253] This application also provides a chip, including a processing circuit and an interface circuit. The interface circuit is used for sending and receiving data, and the processing circuit is used for executing the above-described message transmission method.

[0254] As one possible implementation, the chip also includes a storage circuit. The storage circuit, interface circuit, and processing circuit are connected via internal interconnection paths. The processing circuit is used to execute the code in the storage circuit. When the code is executed, the processing circuit is used to perform the aforementioned message transmission method.

[0255] This application also provides a computer program product. The computer program product may be software or a program product containing instructions capable of running on a communication device or processor (e.g., running on one or more processors of the aforementioned communication device 1100, communication device 1200, communication device 1300, or communication system 1400) or stored on any available medium. The instructions contained in the computer program product may include instructions for performing the steps or operations of the message transmission method proposed in FIG. 5 or FIG. 9 of this application embodiment. When the computer program product runs on a communication device or processor (e.g., running on one or more processors of the aforementioned communication device 1100, communication device 1200, communication device 1300, or communication system 1400), it implements the steps or operations of the message transmission method proposed in FIG. 5 or FIG. 9 of this application embodiment.

[0256] This application also provides a computer-readable storage medium. The computer-readable storage medium can be any available medium that a computing device can store, or a data storage device such as a data center containing one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state drive). The computer-readable storage medium includes instructions that instruct a communication device or processor to perform the steps or operations of the message transmission method proposed in Figure 5 or Figure 9 of this application.

[0257] 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 disc (DVD); or it can be a semiconductor medium, such as a solid-state drive (SSD). The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

[0258] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the protection scope of the technical solutions of the embodiments of this application.

[0259] The terms "first," "second," "third," etc., in the specification, claims, and drawings of this application are used to distinguish different objects, not to limit a specific order.

[0260] In the embodiments of this application, the words "exemplarily" or "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design described as "exemplarily" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design solutions. Specifically, the use of the words "exemplarily" or "for example" is intended to present the relevant concepts in a specific manner.

Claims

1. A message transmission method, characterized in that, include: Encapsulate the service data transmitted from the upper layer to the link layer into a first control message; The upper layer is the layer above the link layer in the network model; After the data block currently being transmitted in the second control message or data message currently being transmitted at the link layer is completed, the first control message is transmitted.

2. The method according to claim 1, characterized in that, The first control message includes a configuration field, the configuration field having a first value, the first value being used to indicate that the privileged message is a control message.

3. The method according to claim 2, characterized in that, The first control message also includes a control field and a sub-control field; The control field is used to indicate the type of control message to which the first control message belongs, and the sub-control field is used to indicate the sub-type of control message to which the first control message belongs. The control field is a second value, and the sub-control field is a third value.

4. The method according to any one of claims 1-3, characterized in that, The maximum length of the first control message is the length of n data blocks, where n is a positive number.

5. The method according to claim 4, characterized in that, The maximum length of the first control message is the length corresponding to one data block. The first control message includes a content length field, which is used to indicate the last tail flow control unit that carries the payload, and the size of the payload in the tail flow control unit.

6. The method according to any one of claims 1-5, characterized in that, The first control message also includes a flow control field, which is used to indicate a virtual channel. In a letter of credit-based flow control mechanism, the message transmission rate is prevented from exceeding the processing capacity of the receiving end based on the credit value corresponding to the virtual channel.

7. The method according to claim 6, characterized in that, After sending the first control message, the method further includes: The credit value corresponding to the virtual channel indicated by the flow control field is deducted.

8. The method according to any one of claims 1-7, characterized in that, The process of encapsulating the service data transmitted from the upper layer to the link layer into a first control message includes: Receive the service data transmitted from the upper layer to the link layer; When the operation corresponding to the business data is an operation with low latency requirements, the business data is encapsulated into the first control message.

9. The method according to claim 8, characterized in that, The business data includes an operation code field, which indicates the operation type of the operation corresponding to the business data. The method further includes: Based on the opcode field of the business data, it is determined that the operation corresponding to the business data is an operation with low latency requirements.

10. The method according to any one of claims 1-9, characterized in that, After the data block currently being transmitted in the second control message or data message currently being transmitted at the link layer is transmitted, the first control message is transmitted, including: When the link layer is currently sending a data block, after sending the data block and before sending the next data block of the data packet, the first control message is sent; Before the link layer finishes sending the data block currently being sent in the data packet and before sending the next data block of the data packet, the first control message is sent. After the link layer finishes sending the second control message it is currently sending, it sends the first control message.

11. The method according to any one of claims 1-10, characterized in that, Before sending the first control message, the method further includes: The number of times the transmission channel of the data packet currently being transmitted by the link layer has been preempted is less than or equal to a preset threshold.

12. A message transmission method, characterized in that, include: Receive the first control message; The payload of the first control message is forwarded to the upper layer of the link layer for processing. The upper layer is the layer above the link layer in the network model.

13. The method according to claim 12, characterized in that, Before forwarding the payload of the first control message to the upper layer of the link layer for processing, the method further includes: In the data packets received at the link layer, a specified packet with a configuration field of a first value, a control field of a second value, and a sub-control field of a third value is identified, and the specified packet is determined to be the first control packet.

14. The method according to claim 13, characterized in that, After receiving the first control message, the method further includes: Cache the data packets already received by the link layer; After forwarding the payload of the first control message to the upper layer of the link layer for processing, the remaining part of the data message is received.

15. The method according to any one of claims 12-14, characterized in that, The method further includes: After consuming the first control message at the upper layer, the credit value of the virtual channel indicated by the flow control field of the first control message is returned to the sender of the first control message.

16. A message transmission device, characterized in that, include: The processing module is used to encapsulate the service data transmitted from the upper layer to the link layer into a first control message; The upper layer is the layer above the link layer in the network model; The transceiver module is used to send the first control message after the data block currently being sent in the second control message or data message currently being sent in the link layer has been sent.

17. A message transmission device, characterized in that, include: The transceiver module is used to receive the first control message; The processing module is used to forward the payload of the first control message to the upper layer of the link layer for processing; The upper layer is the layer above the link layer in the network model.

18. A chip, characterized in that, It includes a processing circuit and an interface circuit, wherein the interface circuit is used to send and receive data, and the processing circuit is used to perform the method as described in any one of claims 1-15.

19. A communication device, characterized in that, The communication device includes a processor and a memory; The processor is configured to execute instructions stored in the memory to cause the communication device to perform the method as described in any one of claims 1-15.

20. A network system, characterized in that, The network system includes at least one communication device, which is used to perform the method as described in any one of claims 1-15.

21. A computer program product containing instructions, characterized in that, When the instruction is executed by the communication device, the communication device performs the method as described in any one of claims 1-15.

22. A computer-readable storage medium, characterized in that, It includes computer program instructions, which, when executed by a communication device, perform the method as described in any one of claims 1-15.