Message transmission methods, devices and systems

By carrying service connection and sorting information in the communication device at the receiving end to sort the messages, the problem of low efficiency of single-path transmission in the PCIe protocol is solved, and efficient and orderly message transmission of multi-path transmission is realized.

CN120639831BActive Publication Date: 2026-05-26HUAWEI TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HUAWEI TECH CO LTD
Filing Date
2023-01-29
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

In the PCIe protocol, single-path transmission of ordered messages requires each node to be aware of the message type in order to sort them, resulting in low transmission efficiency, and the sender needs to wait for feedback messages, which causes additional latency.

Method used

By carrying service connection information and ordering information in the communication device at the receiving end, the receiving end can sort the messages according to this information, avoiding the ordering requirements of the sending end and improving efficiency by utilizing multipath transmission.

Benefits of technology

It implements an order-preserving mechanism that does not require the sender to sort the packets, improving the transmission efficiency of ordered messages and avoiding additional waiting delays.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120639831B_ABST
    Figure CN120639831B_ABST
Patent Text Reader

Abstract

This application provides a message transmission method, apparatus, and system for message receiving end to perform order preservation. The method includes: a first communication device receiving a message from a second communication device, wherein the message carries first information and sorting information, the first information being used to identify the service connection corresponding to the service flow to which the message belongs, and the sorting information being used to indicate the sorting rules of the service flow to which the message belongs; the first communication device determining the sorting status of messages belonging to the same service connection based on the first information and sorting information carried in the message; wherein there is a correspondence between the service connection and the service flow.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application. The original application has the application number 202310091575.8 and the original application date is January 29, 2023. The entire contents of the original application are incorporated herein by reference. Technical Field

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

[0003] In the Peripheral Component Interface Express (PCIe) protocol, a single path is used to transmit packets with ordering requirements (hereinafter referred to as ordered packets), thereby enabling end-to-end ordering through the point-to-point ordering mechanism of the entire network path.

[0004] Specifically, during the transmission of ordered messages, the previous-hop node forwards the ordered messages to the next-hop node according to the sorting rules. These sorting rules can be, for example, that strongly ordered (SO) messages can only follow weakly ordered (RO) messages. Since every node between the sender and receiver of ordered messages follows the same sorting rules during forwarding, the order of the ordered messages received by the receiver still satisfies the sorting rules.

[0005] However, the drawback of the above single-path transmission of ordered messages is that each node between the sender and receiver needs to be aware of the message type in order to forward the ordered messages according to the sorting rules. Summary of the Invention

[0006] This application provides a message transmission method, apparatus, and system for message receiving end to perform order preservation.

[0007] To achieve the above objectives, the embodiments of this application adopt the following technical solutions:

[0008] Firstly, a message transmission method is provided. The device executing the message transmission method can be a first communication device, or a module applied in the first communication device, such as a chip or chip system. The following description uses the first communication device as the executing entity. The first communication device receives a message from a second communication device, wherein the message carries first information and sorting information. The first information is used to identify the service connection corresponding to the service flow to which the message belongs, and the sorting information is used to indicate the sorting rules of the service flow to which the message belongs. The first communication device determines the sorting of messages belonging to the same service connection based on the first information and the sorting information carried in the message; wherein there is a correspondence between the service connection and the service flow.

[0009] In the message transmission method provided in this application embodiment, the first communication device, as the message receiving end, can sort the messages according to the information carried in the messages. Therefore, each node on the message transmission path used for forwarding messages does not need to be aware of the message type and sorting rules. Furthermore, this application relies only on the receiving end to maintain message order, without requiring the sending end to send messages in the correct order. Therefore, it can avoid the additional waiting delay problem of current sending end order-maintaining schemes, thereby further improving the transmission efficiency of ordered messages.

[0010] In conjunction with the first aspect described above, in one possible implementation, the method further includes: the first communication device establishing a service connection with the second communication device; the first communication device storing the context of the service connection; wherein the context of the service connection includes at least one of the following: a correspondence between the identifier of a first service node in the first communication device and the identifier of a second service node in the second communication device, a correspondence between the identifier of a first port in the first communication device and the identifier of a second port in the second communication device, or the starting sequence number of a message belonging to the service connection; the first service node and the second service node are used to sort messages belonging to the same service connection, and the first port and the second port are used to transmit the messages. In this scheme, the first communication device stores the context of the service connection to facilitate subsequent restoration of the message order.

[0011] In conjunction with the first aspect above, in one possible implementation, the establishment of a service connection between the first communication device and the second communication device includes: the first communication device establishing the service connection between the first service node in the first communication device and the second service node in the second communication device.

[0012] In conjunction with the first aspect described above, in one possible implementation, the first communication device determines the ordering of packets belonging to the same service connection based on the first information carried in the packet and the ordering information, including: the first communication device determining the service connection corresponding to the service flow to which the packet belongs based on the context of the service connection and the first information; and determining the ordering of packets belonging to the same service connection based on the ordering information included in the packets belonging to the same service connection.

[0013] In conjunction with the first aspect described above, in one possible implementation, the first information includes the identifier of the first service node in the first communication device, and the context of the service connection includes the correspondence between the identifier of the first service node in the first communication device and the identifier of the second service node in the second communication device; the first communication device determines the service connection corresponding to the service flow to which the message belongs based on the context of the service connection and the first information, including: the first communication device determines the identifier of the second service node in the second communication device corresponding to the first information based on the context of the service connection; the first communication device determines the service connection corresponding to the service flow to which the message belongs based on the first information and the determined identifier of the second service node in the second communication device.

[0014] In conjunction with the first aspect described above, in one possible implementation, the identifier of the first service node in the first communication device included in the first information is not a first identifier, whereby the first identifier is used to indicate that the message is an out-of-order message. In this solution, when the identifier of the first service node is not the first identifier, the first communication device can execute the above-described solution.

[0015] In conjunction with the first aspect described above, in one possible implementation, the identifier of the first service node in the first communication device included in the first information is a first identifier, which indicates that the message is an unordered message. The first communication device determines the order of messages belonging to the same service connection based on the first information carried in the message and the ordering information, including: the first communication device executing the message. In this scheme, when the identifier of the first service node is the first identifier, the first communication device directly executes the received message without needing to order the received message.

[0016] In conjunction with the first aspect described above, in one possible implementation, the first communication device has the ability to sort the messages received via multiple paths. In this scheme, the transmission of ordered messages can utilize the large bandwidth of multipath transmission, thereby improving the transmission efficiency of ordered messages.

[0017] In conjunction with the first aspect described above, in one possible implementation, the establishment of a service connection between the first service node in the first communication device and the second service node in the second communication device by the first communication device includes: responding to a first connection establishment request from the second communication device, the first communication device determining an identifier of the first service node; the first connection establishment request including the identifier of the second service node; the first communication device sending a first connection establishment response to the second communication device; the first connection establishment response including the identifier of the first service node. In this scheme, the service connection establishment process can be initiated by the second communication device.

[0018] In conjunction with the first aspect described above, in one possible implementation, the establishment of the service connection between the first service node in the first communication device and the second service node in the second communication device further includes: the first communication device sending a second connection establishment request to the second communication device; the second connection establishment request including the identifier of the first service node; the first communication device receiving a second connection establishment response from the second communication device; the second connection establishment response including the identifier of the second service node. In this scheme, the service connection establishment process can be initiated by the first communication device.

[0019] In conjunction with the first aspect described above, in one possible implementation, the first communication device sends a second connection establishment request to the second communication device, including: when the first communication device needs to send a message belonging to the service connection to the second communication device, and the first communication device has not yet established the service connection with the second communication device; or, in response to a user's operation to establish the service connection, the first communication device sends the second connection establishment request to the second communication device. This solution provides a flexible triggering mechanism for establishing a service connection; the service connection can be automatically established by the first communication device according to transmission requirements, or it can be manually established by the user.

[0020] In conjunction with the first aspect above, in one possible implementation, the sorting information includes the sequence number of the message in the service flow to which it belongs, and / or the message type, which includes strong order (SO), weak order (RO), or no order (NO).

[0021] Secondly, a message transmission method is provided. The device executing this message transmission method can be a second communication device, or a module applied in the second communication device, such as a chip or chip system. The following description uses the second communication device as the executing entity. The second communication device sends a message to a first communication device, wherein the message carries first information and sorting information. The first information is used to identify the service connection corresponding to the service flow to which the message belongs, and the sorting information is used to indicate the sorting rules of the service flow to which the message belongs. There is a correspondence between the service connection and the service flow.

[0022] In the message transmission method provided in this application embodiment, there is no requirement for the order in which the second communication device sends messages. Therefore, the problem of additional waiting delay in the current sending end order-preserving scheme can be avoided, thereby improving the transmission efficiency of ordered messages.

[0023] In conjunction with the second aspect described above, in one possible implementation, the method further includes: the second communication device establishing a service connection with the first communication device; the first communication device storing the context of the service connection; wherein the context of the service connection includes at least one of the following: a correspondence between the identifier of a first service node in the first communication device and the identifier of a second service node in the second communication device, a correspondence between the identifier of a first port in the first communication device and the identifier of a second port in the second communication device, or the starting sequence number of a message belonging to the service connection; the first service node and the second service node are used to sort messages belonging to the same service connection, and the first port and the second port are used to transmit the message. In this scheme, the second communication device stores the context of the service connection so as to subsequently generate the first information carried in the message.

[0024] In conjunction with the second aspect above, in one possible implementation, the second communication device establishes a service connection with the first communication device, including: the second communication device establishing the service connection between the first service node in the first communication device and the second service node in the second communication device.

[0025] In conjunction with the second aspect described above, in one possible implementation, the establishment of the service connection between the first service node in the first communication device and the second service node in the second communication device by the second communication device includes: the second communication device sending a first connection establishment request to the first communication device; the first connection establishment request including the identifier of the second service node; the second communication device receiving a first connection establishment response from the first communication device; the first connection establishment response including the identifier of the first service node. In this scheme, the service connection establishment process can be initiated by the second communication device.

[0026] In conjunction with the second aspect described above, in one possible implementation, the second communication device sends a first connection establishment request to the first communication device, including: when the second communication device needs to send a message belonging to the service connection to the first communication device, and the second communication device has not yet established the service connection with the first communication device; or, in response to a user's operation to establish the service connection, the second communication device sends the first connection establishment request to the first communication device. This solution provides a flexible triggering mechanism for establishing a service connection; the service connection can be automatically established by the second communication device according to transmission requirements, or it can be manually established by the user.

[0027] In conjunction with the second aspect described above, in one possible implementation, the establishment of a service connection between the first service node in the first communication device and the second service node in the second communication device by the second communication device includes: responding to a second connection establishment request from the first communication device, the second communication device determining an identifier of the second service node; the second connection establishment request including the identifier of the first service node; the second communication device sending a second connection establishment response to the first communication device; the second connection establishment response including the identifier of the second service node. In this scheme, the service connection establishment process can be initiated by the first communication device.

[0028] In conjunction with the second aspect above, in one possible implementation, the sorting information includes the sequence number of the message in the service flow to which it belongs, and / or the message type, which includes strong order (SO), weak order (RO), or no order (NO).

[0029] In conjunction with the second aspect described above, in one possible implementation, after the second communication device sends a message to the first communication device, the method further includes: if the second communication device does not receive a first message from the first communication device, the second communication device retransmits the message; the first message is used by the first communication device to acknowledge receipt of the message. In this scheme, messages not received by the first communication device are discarded and retransmitted by the second communication device, and message transmission continues on the transmission path without being blocked. On the first communication device side, abnormal message transmission will not affect the reception of messages on other paths.

[0030] Thirdly, a first communication device is provided for implementing the above-described method. This first communication device includes modules, units, or means corresponding to the implementation of the above-described method. These modules, units, or means can be implemented in hardware, software, or by hardware executing corresponding software. The hardware or software includes one or more modules or units corresponding to the above-described functions.

[0031] In conjunction with the third aspect above, in one possible implementation, the first communication device includes: a transceiver module and a processing module; the transceiver module is configured to receive a message from the second communication device, wherein the message carries first information and sorting information, the first information being used to identify the service connection corresponding to the service flow to which the message belongs, and the sorting information being used to indicate the sorting rules of the service flow to which the message belongs; the processing module is configured to determine the sorting status of messages belonging to the same service connection based on the first information and the sorting information carried in the message; wherein there is a correspondence between the service connection and the service flow.

[0032] In conjunction with the third aspect described above, in one possible implementation, the first communication device further includes: a storage module; the transceiver module is further configured to establish a service connection with the second communication device; the storage module is configured to store the context of the service connection; wherein the context of the service connection includes at least one of the following: a correspondence between the identifier of the first service node in the first communication device and the identifier of the second service node in the second communication device, a correspondence between the identifier of the first port in the first communication device and the identifier of the second port in the second communication device, or the starting sequence number of a message belonging to the service connection; the first service node and the second service node are configured to sort messages belonging to the same service connection, and the first port and the second port are configured to transmit the message.

[0033] In conjunction with the third aspect above, in one possible implementation, the transceiver module is further configured to establish a service connection with the second communication device, including: establishing the service connection between the first service node in the first communication device and the second service node in the second communication device.

[0034] In conjunction with the third aspect above, in one possible implementation, the processing module is used to determine the order of packets belonging to the same service connection based on the first information and the ordering information carried in the packet, including: determining the service connection corresponding to the service flow to which the packet belongs based on the context of the service connection and the first information; and determining the order of packets belonging to the same service connection based on the ordering information included in the packets belonging to the same service connection.

[0035] In conjunction with the third aspect above, in one possible implementation, the first information includes the identifier of the first service node in the first communication device, and the context of the service connection includes the correspondence between the identifier of the first service node in the first communication device and the identifier of the second service node in the second communication device; the processing module is configured to determine the service connection corresponding to the service flow to which the message belongs based on the context of the service connection and the first information, including: determining the identifier of the second service node in the second communication device corresponding to the first information based on the context of the service connection; and determining the service connection corresponding to the service flow to which the message belongs based on the first information and the determined identifier of the second service node in the second communication device.

[0036] In conjunction with the third aspect above, in one possible implementation, the identifier of the first service node in the first communication device included in the first information is not the first identifier, and the first identifier is used to indicate that the message is an out-of-order message.

[0037] In conjunction with the third aspect above, in one possible implementation, the identifier of the first service node in the first communication device included in the first information is a first identifier, which is used to indicate that the message is an unordered message; the processing module is used to determine the order of messages belonging to the same service connection based on the first information carried in the message and the ordering information, including: executing the message.

[0038] In conjunction with the third aspect above, in one possible implementation, the first communication device has the ability to sort the messages received from multiple paths.

[0039] In conjunction with the third aspect above, in one possible implementation, the transceiver module is configured to establish a service connection between the first service node in the first communication device and the second service node in the second communication device, comprising: responding to a first connection establishment request from the second communication device, configuring the processing module to determine the identifier of the first service node; the first connection establishment request including the identifier of the second service node; and configuring the transceiver module to send a first connection establishment response to the second communication device; the first connection establishment response including the identifier of the first service node.

[0040] In conjunction with the third aspect above, in one possible implementation, the transceiver module, used to establish the service connection between the first service node in the first communication device and the second service node in the second communication device, further includes: sending a second connection establishment request to the second communication device; the second connection establishment request including the identifier of the first service node; and receiving a second connection establishment response from the second communication device; the second connection establishment response including the identifier of the second service node.

[0041] In conjunction with the third aspect above, in one possible implementation, the transceiver module is configured to send a second connection establishment request to the second communication device, including: sending the second connection establishment request to the second communication device when the first communication device needs to send a message belonging to the service connection to the second communication device and the first communication device has not established the service connection with the second communication device, or in response to a user's operation to establish the service connection.

[0042] In conjunction with the third aspect mentioned above, in one possible implementation, the sorting information includes the sequence number of the message in the service flow to which it belongs, and / or the message type, which includes strong order (SO), weak order (RO), or no order (NO).

[0043] The technical effects of any possible implementation of the third aspect can be found in the technical effects of different implementations of the first aspect mentioned above, and will not be repeated here.

[0044] Fourthly, a second communication device is provided for implementing the above-described method. This second communication device includes modules, units, or means corresponding to the implementation of the above-described method. These modules, units, or means can be implemented in hardware, software, or by hardware executing corresponding software. The hardware or software includes one or more modules or units corresponding to the above-described functions.

[0045] In conjunction with the fourth aspect above, in one possible implementation, the second communication device includes: a transceiver module; the transceiver module is used to send a message to the first communication device, wherein the message carries first information and sorting information, the first information is used to identify the service connection corresponding to the service flow to which the message belongs, the sorting information is used to indicate the sorting rules of the service flow to which the message belongs, and there is a correspondence between the service connection and the service flow.

[0046] In conjunction with the fourth aspect above, in one possible implementation, the second communication device further includes: a storage module; the transceiver module is further configured to establish a service connection with the first communication device; the storage module is configured to store the context of the service connection; wherein the context of the service connection includes at least one of the following: a correspondence between the identifier of the first service node in the first communication device and the identifier of the second service node in the second communication device, a correspondence between the identifier of the first port in the first communication device and the identifier of the second port in the second communication device, or the starting sequence number of a message belonging to the service connection; the first service node and the second service node are used to sort messages belonging to the same service connection, and the first port and the second port are used to transmit the message.

[0047] In conjunction with the fourth aspect above, in one possible implementation, the transceiver module is further configured to establish a service connection with the first communication device, including: establishing the service connection between the first service node in the first communication device and the second service node in the second communication device.

[0048] In conjunction with the fourth aspect above, in one possible implementation, the transceiver module is configured to establish a service connection between the first service node in the first communication device and the second service node in the second communication device, comprising: sending a first connection establishment request to the first communication device; the first connection establishment request including the identifier of the second service node; and receiving a first connection establishment response from the first communication device; the first connection establishment response including the identifier of the first service node.

[0049] In conjunction with the fourth aspect above, in one possible implementation, the transceiver module is configured to send a first connection establishment request to the first communication device, including: sending the first connection establishment request to the first communication device when the second communication device needs to send a message belonging to the service connection to the first communication device and the second communication device has not established the service connection with the first communication device, or in response to a user's operation to establish the service connection.

[0050] In conjunction with the fourth aspect above, in one possible implementation, the second communication device further includes: a processing module; the transceiver module is configured to establish the service connection between the first service node in the first communication device and the second service node in the second communication device, including: responding to a second connection establishment request from the first communication device, configuring the processing module to determine the identifier of the second service node; the second connection establishment request includes the identifier of the first service node; configuring the transceiver module to send a second connection establishment response to the first communication device; the second connection establishment response includes the identifier of the second service node.

[0051] In conjunction with the fourth aspect above, in one possible implementation, the sorting information includes the sequence number of the message in the service flow to which it belongs, and / or the message type, which includes strong order (SO), weak order (RO), or no order (NO).

[0052] In conjunction with the fourth aspect above, in one possible implementation, the transceiver module is further configured to retransmit the message if the second communication device does not receive the first message from the first communication device; the first message is used by the first communication device to confirm receipt of the message.

[0053] The technical effects of any possible implementation of the fourth aspect can be found in the technical effects of different implementations of the second aspect mentioned above, and will not be repeated here.

[0054] Fifthly, a communication system is provided, including a first communication device that performs the method described in the first aspect, and a second communication device that performs the method described in the second aspect.

[0055] A sixth aspect provides a communication device comprising: a processor; the processor being coupled to a memory and, after reading computer instructions stored in the memory, executing the method described in the first or second aspect above according to the instructions.

[0056] In conjunction with the sixth aspect above, in one possible implementation, the communication device further includes a memory for storing computer instructions.

[0057] In conjunction with the sixth aspect above, in one possible implementation, the communication device further includes a communication interface; this communication interface is used for the communication device to communicate with other devices. For example, the communication interface may be a transceiver, an input / output interface, an interface circuit, an output circuit, an input circuit, a pin, or related circuitry, etc.

[0058] In conjunction with the sixth aspect above, in one possible implementation, the communication device can be a chip or a chip system. When the communication device is a chip system, it can be composed of chips or may include chips and other discrete components.

[0059] In conjunction with the sixth aspect above, in one possible implementation, when the communication device is a chip or chip system, the aforementioned communication interface can be an input / output interface, interface circuit, output circuit, input circuit, pin, or related circuit on the chip or chip system. The aforementioned processor can also be embodied as a processing circuit or logic circuit.

[0060] In a seventh aspect, a computer-readable storage medium is provided that stores instructions which, when executed on a computer, enable the computer to perform the methods described in the first or second aspect.

[0061] The technical effects of any possible implementation of aspects five through seven can be found in the technical effects of different implementations of aspects one or two above, and will not be repeated here. Attached Figure Description

[0062] Figure 1 This is a schematic diagram of the network topologies currently included in the PCIe protocol.

[0063] Figure 2 A schematic diagram illustrating the specific network topology that conforms to the current PCIe protocol;

[0064] Figure 3This is a schematic diagram of the current network structure of the UB system;

[0065] Figure 4 This application provides a schematic diagram of the architecture of a communication system.

[0066] Figure 5 Schematic diagram of the communication device provided in the embodiments of this application Figure 1 ;

[0067] Figure 6 A flowchart illustrating a message transmission method provided in this application embodiment;

[0068] Figure 7 A schematic diagram illustrating service communication between three communication devices provided in an embodiment of this application;

[0069] Figure 8 This is a schematic diagram illustrating the establishment of a TA connection in the UB system provided in this application embodiment;

[0070] Figure 9 This is a schematic diagram of the TA connection establishment process initiated by the second communication device in an embodiment of this application;

[0071] Figure 10 This is a schematic diagram illustrating the process of establishing a business connection as provided in an embodiment of this application.

[0072] Figure 11 A schematic diagram illustrating message transmission based on a service connection, provided for an embodiment of this application;

[0073] Figure 12 Schematic diagram of the communication device provided in the embodiments of this application Figure 2 . Detailed Implementation

[0074] To facilitate understanding of the technical solutions of the embodiments of this application, a brief introduction to the relevant technologies or terms of this application is given below.

[0075] First, the PCIe protocol.

[0076] Figure 1 This diagram illustrates the network topologies included in the PCIe protocol. Among them, Figure 1 The network shown includes a PCIe root complex (RC), a switch, and two PCIe endpoints (EPs). Figure 1 The diagram only schematically illustrates a network comprising two PCIe EPs; in reality, a network may include one or more PCIe EPs. Figure 1The network shown has a tree structure. Only single-path communication is supported between two devices; multi-path communication is not supported. As described in the background section, in the PCIe protocol, end-to-end order preservation can be achieved through a point-to-point order preservation mechanism along the entire network path.

[0077] Combination Figure 1 Taking PCIe RC as the producer and PCIe EP as the consumer as an example, Figure 2 A schematic diagram illustrating a specific network topology conforming to the PCIe protocol is shown. Among them, Figure 2 The network shown includes producers, status, switches, consumers, flags, and a data buffer. Producers can be used to generate and send ordered messages; switches can be used to forward ordered messages from producers; consumers can be used to receive ordered messages; status and flags can be, for example, registers used to store flag bits during the transmission of ordered messages; and the data buffer can be used to cache the data contained in the ordered messages.

[0078] exist Figure 2 In this process, the producer generates and sends ordered messages, including: the producer generates message 1, message 2, and message 3, and sends message 1, message 2, and message 3 to the switch in sequence. Message 1 and message 2 are of type RO, and message 3 is of type SO. When forwarding ordered messages, the switch follows the ordering rule that SO type messages can only be placed after preceding RO type messages. Therefore, the consumer can receive message 2, message 1, and message 3 from the switch in sequence. In other words, although the order of the ordered messages received by the receiver has changed, the ordering rule is still satisfied, and no out-of-order delivery has occurred.

[0079] As described in the background section, the disadvantage of using single-path transmission of ordered packets in the PCIe protocol is that it cannot utilize the large bandwidth of multi-path transmission, thus affecting the transmission efficiency of ordered packets. In addition, the switch needs to be aware of the packet type in order to forward ordered packets according to the sorting rules.

[0080] Second, the unified bus (UB) system.

[0081] In the UB system, each device supports multiple ports by default. Therefore, when two devices communicate, messages can utilize the multiple ports of the sending and receiving ends, as well as the multiple paths of the transmission network, to improve communication bandwidth. In this embodiment, the "sender" can also be referred to as the "source," and the "receiver" can also be referred to as the "destination."

[0082] For example, Figure 3A network structure diagram of the UB system is shown. UB EP0 includes a UB controller (UBC) 0 and four ports: port 0, port 1, port 2, and port 3. UB EP1 includes UBC 1 and four ports: port 0', port 1', port 2', and port 3'. In this embodiment, "UB EP" can also be referred to as a "UB device" or a "node." The transmission network used for forwarding packets between UB EP0 and UB EP1 includes switches 1, 2, 3, and 4. In the UB system, the default transmission network is out-of-order and multipath.

[0083] In the UB system, there are business scenarios where messages are ordered, and there are also business scenarios where messages are not ordered. In business scenarios where messages are ordered, ordered messages are transmitted; in business scenarios where messages are ordered, messages without order requirements are transmitted (hereinafter referred to as unordered messages). In the UB system, the current schemes for transmitting ordered messages mainly include single-path transmission schemes and sender-preserved order schemes.

[0084] In single-path transmission schemes, similar to those in the PCIe protocol, a fixed path is used to transmit ordered messages. Although multipathing exists in UB systems, it is only used for transmitting unordered messages, not ordered messages. Single-path transmission cannot utilize the high bandwidth of multipath transmission, which affects the transmission efficiency of ordered messages.

[0085] In a sender-preserving ordering scheme, the sender temporarily refrains from sending messages that are ordered dependencies on preceding messages until the preceding messages have been transmitted and executed. For example, suppose message 5 is required to be ordered after message 2. Then, after sending message 2, the sender temporarily refrains from sending message 5 until it receives a feedback message from the receiver confirming that message 2 has been executed. This ensures that the receiver receives and executes message 2 first, followed by message 5. However, when sending messages that are ordered dependencies on preceding messages, the sender needs to wait for the transmission of the preceding messages and the feedback message. This additional waiting delay affects the transmission efficiency of ordered messages.

[0086] To improve the transmission efficiency of ordered messages, in this embodiment of the application, multipath transmission is still used for ordered messages, and this embodiment of the application provides a multipath order preservation scheme at the receiving end to restore the order of ordered messages at the receiving end.

[0087] The technical solutions of the embodiments of this application will be described below with reference to the accompanying drawings. In the description of this application, unless otherwise stated, " / " indicates that the objects before and after are in an "or" relationship. For example, A / B can represent A or B. "And / or" in this application is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, and B alone, where A and B can be singular or plural. Furthermore, in the description of this application, unless otherwise stated, "multiple" refers to two or more. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple. Furthermore, to facilitate a clear description of the technical solutions in the embodiments of this application, the terms "first" and "second" are used in the embodiments of this application to distinguish identical or similar items with substantially the same function and effect. Those skilled in the art will understand that the terms "first" and "second" do not limit the quantity or execution order, and that "first" and "second" are not necessarily different. Meanwhile, in the embodiments of this application, the terms "exemplary" or "for example" are used to indicate that something is being used as an example, illustration, or description. Any embodiment or design scheme described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design schemes. Specifically, the use of terms such as "exemplary" or "for example" is intended to present related concepts in a concrete manner for ease of understanding.

[0088] Figure 4 This application illustrates a communication system 40 provided in an embodiment. The communication system 40 includes a first communication device 401 and a second communication device 402. The second communication device 402 is used to send a message to the first communication device 401. The message carries first information and sorting information. The first information identifies the service connection corresponding to the service flow to which the message belongs, and the sorting information indicates the sorting rules of the service flow to which the message belongs. A correspondence exists between service connections and service flows. The first communication device 401 is used to receive messages from the second communication device 402. The first communication device 401 is also used to determine the sorting of messages belonging to the same service connection based on the first information and sorting information carried in the message. The specific implementation and technical effects of this solution will be described in detail in subsequent method embodiments and will not be repeated here.

[0089] Optionally, the relevant functions of the first or second communication device in the embodiments of this application can be implemented by one device, multiple devices, or one or more functional modules within a single device. This application does not specifically limit these functions. It is understood that the aforementioned functions can be network elements in hardware devices, software functions running on dedicated hardware, a combination of hardware and software, or virtualization functions instantiated on a platform (e.g., a cloud platform).

[0090] For example, the relevant functions of the first or second communication device in the embodiments of this application can be achieved through... Figure 5 This is achieved through the communication device 500.

[0091] Figure 5 The diagram shown is a schematic representation of the communication device 500 provided in an embodiment of this application. The communication device 500 includes one or more processors 501, a communication line 502, and at least one communication interface 504 (the following description uses one communication interface 504 and one processor 501 as an example to illustrate each module). Optionally, it may also include a memory 503.

[0092] Processor 501 may be a CPU, a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits used to control the execution of programs according to the present application.

[0093] The communication line 502 may include a path for connecting different components.

[0094] The communication interface 504 can be a transceiver module used to communicate with other devices or communication networks, such as Ethernet, RAN, WLAN, etc. For example, the transceiver module can be a transceiver or a similar device. Optionally, the communication interface 504 can also be a transceiver circuit located within the processor 501, used to implement the processor's signal input and signal output. Figure 5 The diagram only shows communication device 500 including communication interface 504 and communication interface 508. In this embodiment, the number of communication interfaces included in communication device 500 may be one, or the number of communication interfaces included in communication device 500 may be greater than two.

[0095] Memory 503 can be a device with storage function. For example, it can be read-only memory (ROM) or other types of static storage devices capable of storing static information and instructions; random access memory (RAM) or other types of dynamic storage devices capable of storing information and instructions; electrically erasable programmable read-only memory (EEPROM); compact disc read-only memory (CD-ROM) or other optical disc storage; optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.); magnetic disk storage media or other magnetic storage devices; or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but not limited to these. Memory can exist independently and be connected to the processor via communication line 502. Memory can also be integrated with the processor.

[0096] The memory 503 stores computer execution instructions for implementing the scheme of this application, and its execution is controlled by the processor 501. The processor 501 executes the computer execution instructions stored in the memory 503, thereby implementing the message transmission method provided in the embodiments of this application.

[0097] Alternatively, in this embodiment, the processor 501 may execute the processing-related functions in the message transmission method provided in the following embodiments of this application, and the communication interface 504 may be responsible for communicating with other devices or communication networks. This embodiment does not specifically limit this.

[0098] The computer execution instructions in the embodiments of this application may also be referred to as application code, and the embodiments of this application do not specifically limit this.

[0099] In a specific implementation, as one example, the processor 501 may include one or more CPUs, for example... Figure 5 CPU0 and CPU1 in the CPU.

[0100] In a specific implementation, as one example, the communication device 500 may include multiple processors, such as... Figure 5 Processors 501 and 507 are shown in the diagram. Each of these processors can be a single-core (single-CPU) processor or a multi-core (multi-CPU) processor. A processor here can refer to one or more devices, circuits, and / or processing cores used to process data (such as computer program instructions).

[0101] In a specific implementation, as one embodiment, the communication device 500 may further include an output device 505 and an input device 506. The output device 505 communicates with the processor 501 and can display information in various ways.

[0102] The aforementioned communication device 500 can be a general-purpose device or a special-purpose device. For example, the communication device 500 can be a desktop computer, a portable computer, a network server, a handheld digital assistant (PDA), a mobile phone, a tablet computer, a wireless terminal device, a vehicle-mounted terminal device, an embedded device, or something else with... Figure 5 Devices with similar structures. This application does not limit the type of communication device 500 to any particular embodiment.

[0103] The following will combine Figures 1 to 5 The message transmission method provided in the embodiments of this application will be described in detail.

[0104] like Figure 6 The image shows a message transmission method provided in an embodiment of this application. The message transmission method includes the following steps:

[0105] Step S601: The second communication device sends a message to the first communication device, and correspondingly, the first communication device receives the message from the second communication device.

[0106] The message carries first information and sorting information. The first information is used to identify the service connection corresponding to the service flow to which the message belongs, and the sorting information is used to indicate the sorting rules of the service flow to which the message belongs. There is a correspondence between the service connection and the service flow.

[0107] Optionally, the sorting information includes the sequence number of the message in its respective service flow and / or the message type, which includes SO, RO, or non-ordered.

[0108] For example, the business connection in this application embodiment can be a transaction layer (TA) connection.

[0109] In the embodiments of this application, one service connection may correspond to one service flow, or one service connection may correspond to multiple service flows. When one service connection corresponds to one service flow, the message transmission method provided in the embodiments of this application can eliminate the mutual influence between different service flows. When one service connection corresponds to one service flow, the message transmission method provided in the embodiments of this application can save resource overhead.

[0110] The service flow in this embodiment can be the service flow between two processes of two communication devices. Figure 7 This diagram illustrates service communication between three communication devices. Each of communication devices 0, 1, and 2 comprises two processes. Service communication can occur between any two processes; that is, service flows can exist between any two processes.

[0111] Taking process 0 of communication device 0 as an example, the service flow can exist between process 0 of communication device 0 and process 0' of communication device 1; or, the service flow can exist between process 0 of communication device 0 and process 1' of communication device 1; or, the service flow can exist between process 0 of communication device 0 and process 0" of communication device 2; or, the service flow can exist between process 0 of communication device 0 and process 1" of communication device 2.

[0112] Optionally, after step S601, the message transmission method provided in this application embodiment further includes: if the second communication device does not receive the first message from the first communication device, the second communication device retransmits the message; the first message is used by the first communication device to confirm receipt of the message. In this scheme, the message not received by the first communication device is discarded and retransmitted by the second communication device, and message transmission still occurs on the transmission path without being blocked. On the first communication device side, abnormal message transmission will not affect the reception of messages on other paths.

[0113] Once the abnormal cause that prevented the first communication device from receiving messages is resolved, the first communication device can promptly receive messages from the second communication device.

[0114] When the data buffer resources of the first communication device are insufficient or a page fault occurs in the data buffer, the first communication device will not send the first message to the second communication device; or, the first communication device will send a message to the second communication device indicating that message reception has failed. In this case, the message can be discarded directly. Correspondingly, if the second communication device still does not receive the first message from the first communication device after the timer expires; or if the second communication device receives a message from the first communication device indicating that message reception has failed, the second communication device will retransmit the message. The timer can be started when the second communication device sends a message to the first communication device.

[0115] Optionally, the message transmission method provided in this application embodiment further includes: establishing a service connection between a first communication device and a second communication device; the first communication device and the second communication device respectively storing the context of the service connection. The context of the service connection includes at least one of the following: a correspondence between the identifier of a first service node in the first communication device and the identifier of a second service node in the second communication device; a correspondence between the identifier of a first port in the first communication device and the identifier of a second port in the second communication device; or the starting sequence number of a message belonging to the service connection; the first service node and the second service node are used to sort messages belonging to the same service connection, and the first port and the second port are used to transmit messages. In this scheme, the first communication device stores the context of the service connection to restore the order of messages later. The second communication device stores the context of the service connection to generate the first information carried in the message later.

[0116] For example, the first information may include the identifier of the service connection corresponding to the service flow to which the message belongs, and / or the identifier of the first service node. The identifier of the first service node may, for example, be the destination connection identifier (destination_connection identity, dst_connectionID).

[0117] For example, the context of a service connection can be a TA connection context. For a service flow from the second communication device to the first communication device, the identifier of the second service node in the second communication device can be the source connection identifier (source_connection identity, src_connectionID), and the identifier of the first service node in the first communication device can be dst_connectionID. Correspondingly, the identifier of the second port in the second communication device can be the source network address (source_network address, src_NA), and the identifier of the first port in the first communication device can be the destination network address (destination_network address, dst_NA). The network address can be an Internet Protocol (IP) address.

[0118] Similarly, for a service flow from the first communication device to the second communication device, the identifier of the first service node in the first communication device can be src_connectionID, and the identifier of the second service node in the second communication device can be dst_connectionID. Correspondingly, the identifier of the first port in the first communication device can be src_NA, and the identifier of the second port in the second communication device can be dst_NA.

[0119] In this embodiment, the first port and the second port are used to transmit messages, meaning that the first port and the second port are path-reachable. Furthermore, the first port and the second port can be ports corresponding to service connections. That is, different combinations of the first port and the second port can be configured for different service connections. For example, service connection 1 can correspond to a combination of the first port being port 0 and the second port being port 4, and service connection 2 can correspond to a combination of the first port being port 1 and the second port being port 2.

[0120] In this embodiment of the application, the context of the service connection may further include indication information for indicating whether multi-port ordering of the receiving end is supported, such as the order type.

[0121] In this embodiment, the context of the service connection may also include information for maintaining the ordering relationship between packets belonging to the same service connection, such as the starting sequence number of the packets in the service flow corresponding to the service connection, which can be represented by the packet sequence number (PSN).

[0122] In one possible implementation, on the second communication device side, the service flow may carry the identifier of the second node, or hilt information corresponding to the identifier of the second node. The second communication device can find the context of the corresponding service connection based on the identifier of the second node. If the indication information in the service connection context indicates that multi-port ordering at the receiving end is not supported, that is, only single-port ordering at the receiving end is supported, then the second communication device can send each message belonging to the service flow along the same path. If the indication information in the service connection context indicates that multi-port ordering at the receiving end is supported, then the second communication device can send each message belonging to the service flow from the first port included in the service connection context.

[0123] Optionally, establishing a service connection between the first communication device and the second communication device includes: establishing a service connection between a first service node in the first communication device and a second service node in the second communication device.

[0124] Taking the second communication device as the message sender, the first communication device as the message receiver, and the service connection as a TA connection as an example, Figure 8A schematic diagram illustrating the establishment of a TA connection in a UB system is shown. Both the first and second communication devices support multiple ports, and communication between them can be achieved through a multipath constructed from multiple switches. The second service node in the second communication device can add first information and sorting information to the original packets in the user queue (UQ). The processed original packets then travel through the transport layer (TP) to the various second ports of the second communication device. The packets are then transmitted from the various second ports through a multipath constructed from multiple switches to the various first ports of the first communication device, and finally through the TP to the first service node in the first communication device. A TA connection can be established between the second service node and the first service node. Specifically, a TA connection can be established for one service flow or for multiple service flows; this embodiment does not impose any limitations on this. The first service node can be used to sort received packets belonging to the same TA connection. The sorted packets belonging to the same TA connection can be executed in the same process to achieve the corresponding functions.

[0125] exist Figure 8 In this context, a multipath consisting of a TP (Transfer Provider), multiple first ports, multiple second ports, and multiple switches can be shared by multiple service connections.

[0126] In this embodiment, the establishment of a service connection can be initiated by either a second communication device or a first communication device. The process of establishing a service connection initiated by the second communication device may include: the second communication device sending a first connection establishment request to the first communication device, the first connection establishment request including the identifier of the second service node. Accordingly, in response to the first connection establishment request from the second communication device, the first communication device determines the identifier of the first service node. The first communication device sends a first connection establishment response to the second communication device, the first connection establishment response including the identifier of the first service node. Accordingly, the second communication device receives the first connection establishment response from the first communication device.

[0127] Similarly, the process of establishing a service connection initiated by the first communication device may include: the first communication device sending a second connection establishment request to the second communication device, the second connection establishment request including the identifier of the first service node. Accordingly, in response to the second connection establishment request from the first communication device, the second communication device determines the identifier of the second service node. The second communication device sends a second connection establishment response to the first communication device, the second connection establishment response including the identifier of the second service node. Accordingly, the first communication device receives the second connection establishment response from the second communication device.

[0128] For example, a connection request can be a create TA connection request.

[0129] Optionally, the triggering condition for the second communication device to initiate the service connection establishment process can be: the second communication device needs to send a message belonging to the service connection to the first communication device, and the second communication device has not established a service connection with the first communication device, or the user performs the operation of establishing a service connection.

[0130] Optionally, the triggering condition for the first communication device to initiate the service connection establishment process can be: the first communication device needs to send a message belonging to the service connection to the second communication device, and the first communication device has not established a service connection with the second communication device, or the user performs the operation of establishing a service connection.

[0131] The above scheme provides a flexible triggering mechanism for establishing service connections. Service connections can be automatically established by the communication device according to transmission requirements, or they can be established manually by the user.

[0132] In one possible implementation, the administrator of the communication devices can pre-configure the strategy for initiating the service connection establishment process. That is, the fabric manager (FM) automatically establishes service connections between any two communication devices within the network based on resource scheduling results. In another possible implementation, the FM does not participate in the establishment of service connections. Instead, in a distributed programming scenario, users initiate the service connection establishment process on demand through out-of-band or in-band channels. In other words, when a service connection needs to be established, the user can initiate the service connection establishment process by calling the program interface.

[0133] For example, Figure 9 The diagram illustrates the process of establishing a TA connection initiated by a second communication device. The second communication device includes a host and a virtual machine, while the host of the first communication device includes UBC firmware. The establishment process may include the following steps:

[0134] Step S901: The virtual machine's application (APP) can delegate tasks that need to send messages to the first communication device to the virtual machine's UB stack. Correspondingly, the virtual machine's UB stack can receive tasks from the virtual machine's application.

[0135] Step S902: If the virtual machine's UB stack determines that a TA connection has not been established with the second communication device, the virtual machine's UB stack can send a TA connection establishment request to the host's UB stack through the control channel. Correspondingly, the host's UB stack can receive the TA connection establishment request from the virtual machine's UB stack through the control channel.

[0136] In this embodiment of the application, the function of the UB stack can be specifically implemented by the connection maintenance and management module in the UB stack, which will be explained uniformly here and will not be repeated below.

[0137] For example, if the identifier of the first service node of the first communication device is not included in the context of the TA connection stored in the second communication device, the virtual machine's UB stack can determine that no TA connection has been established with the first communication device.

[0138] Optionally, if the virtual machine's UB stack determines that a TA connection has been established with the first communication device, step S909 can be executed directly. If the virtual machine's UB stack determines that a TA connection has not been established with the first communication device, steps S903 to S909 can be executed directly.

[0139] Step S903: The host's UB stack can obtain the combination of the first and second ports that can be reached by the path through FM.

[0140] The input to FM can be the endpoint identifier (EID) of the first communication device, such as the destination EID (dstination EID, dst EID). The output of FM can be a combination of the identifier of the first port reachable by the path and the identifier of the second port, such as a combination of one or more pairs of src_NA and dst_NA.

[0141] In step S904, the host's UB stack can select one of the combinations of one or more first ports and second ports obtained in step S903 to establish a TA connection. The host's UB stack can call the host's UB driver to realize subsequent information interaction with the first communication device.

[0142] In step S905, the host's UB driver is invoked, causing the second communication device to send a TA connection establishment request to the first communication device. Correspondingly, the first communication device receives the TA connection establishment request from the second communication device.

[0143] Optionally, a TA connection request can be established using either in-band or out-of-band transmission. In-band transmission can utilize the underlying physical link of the UB system, while out-of-band transmission can be implemented using sockets.

[0144] The TA connection establishment request may include the identifier of the second service node in the second communication device, such as src_connectionID. The TA connection establishment request may also include the mapping between the identifiers of the first and second ports reachable by the path, such as a {src_NA, dst_NA} pair. The TA connection establishment request may also include indication information on whether multi-port ordering at the receiving end is supported, as well as the PSN of the packets in the service flow corresponding to the service connection.

[0145] When establishing a TA connection request using in-band transmission, the TA connection request may also include a combination of the identifiers of a first port and a second port selected by the host's UB stack in step S904 for establishing the TA connection, such as a pair {src_NA, dst_NA}.

[0146] Step S906: The first communication device determines the identifier of the first service node and sends a TA connection establishment response to the UB driver of the host of the second communication device via the UBC firmware. Correspondingly, the UB driver of the host of the second communication device receives the TA connection establishment response from the first communication device.

[0147] The TA connection establishment response may include the identifier of the first service node in the first communication device, such as dst_connectionID.

[0148] Optionally, after the first communication device determines the identifier of the first service node, the first communication device stores the context of the TA connection, including the EID of the second communication device, such as dst_EID. The TA connection context also includes the mapping between the identifiers of the first and second service nodes, such as {src_connectionID, dst_connectionID} pairs. The TA connection context also includes the mapping between the identifiers of the first and second ports reachable by the path, such as {src_NA, dst_NA} pairs. The TA connection context may also contain indication information indicating whether multi-port ordering at the receiving end is supported, and the PSN of the packets in the service flow corresponding to the service connection.

[0149] Step S907: The host's UB driver sends the information from the TA connection establishment response to the host's UB stack. Correspondingly, the host's UB stack receives the information from the TA connection establishment response from the host's UB driver.

[0150] Optionally, after the second communication device receives the TA connection establishment response, it also needs to store the TA connection context. The TA connection context includes the EID of the first communication device, such as dst_EID. The TA connection context also includes the mapping between the identifiers of the first and second service nodes, such as the {src_connectionID, dst_connectionID} pair. The TA connection context also includes the mapping between the identifiers of the first and second ports that are reachable by the path, such as the {src_NA, dst_NA} pair. The TA connection context may also contain indication information indicating whether both the first and second ports are single ports, and the PSN of the packets in the service flow corresponding to the service connection.

[0151] Step S908: The host's UB stack sends the TA connection context to the virtual machine's UB stack. Correspondingly, the virtual machine's UB stack receives the TA connection context from the host's UB stack, so that the host's UB stack can subsequently determine whether a TA connection has been established with the first communication device.

[0152] Step S909: The host's UB stack sends the TA connection context to the host's UB driver. Accordingly, the host's UB driver receives the TA connection context from the host's UB stack to facilitate subsequent service communication between the second communication device and the first communication device.

[0153] Combination Figure 9 , Figure 10 A schematic diagram of the business connection establishment process is shown. This process may include the following steps:

[0154] Step S1001: Start the application on the requesting end of the business connection.

[0155] In this embodiment of the application, the requesting end for establishing a service connection can be a first communication device, and the responding end for establishing a service connection can be a second communication device; or, the requesting end for establishing a service connection can be a second communication device, and the responding end for establishing a service connection can be a first communication device.

[0156] Step S1002: The requesting end of establishing a business connection triggers the establishment of a business connection.

[0157] The conditions for triggering the establishment of a business connection can be found in the aforementioned embodiments, and will not be repeated here.

[0158] Step S1003: The requesting end and the responding end that establish the business connection exchange information including the identifier of the business node.

[0159] Furthermore, the requesting and responding ends that establish a service connection can exchange information including the identifier of the service node by sending and receiving out-of-order messages. A detailed description of step S1003 can be found in the relevant descriptions of steps S905 and S906, and will not be repeated here.

[0160] Step S1004: The requesting and responding ends of the established business connection each store the context of the business connection.

[0161] The specific details of the service connection context can be found in the relevant descriptions in steps S905 and S906, and will not be repeated here. Afterwards, the requesting and responding ends can communicate via the established service connection.

[0162] Step S602: The first communication device determines the order of messages belonging to the same service connection based on the first information and ordering information carried in the message.

[0163] In the message transmission method provided in this application embodiment, the first communication device, as the message receiving end, can sort the messages according to the information carried in the messages. Therefore, each node on the message transmission path used for forwarding messages does not need to be aware of the message type and sorting rules. Furthermore, this application relies only on the receiving end to maintain message order, without requiring the sending end to send messages in the correct order. Therefore, it can avoid the additional waiting delay problem of current sending end order-maintaining schemes, thereby further improving the transmission efficiency of ordered messages.

[0164] Optionally, step S602 includes: the first communication device determining the service connection corresponding to the service flow to which the message belongs based on the context of the service connection and the first information; and determining the sorting order of messages belonging to the same service connection based on the sorting information included in the messages belonging to the same service connection. In this scheme, after the service connection is established, the first communication device stores the context of the service connection. When the first communication device receives a message, it can first determine the service connection to which the message belongs by combining the context of the service connection and the first information included in the message, and then sort the messages belonging to the same service connection according to the sorting information included in the message.

[0165] Further, the first information includes the identifier of the first service node in the first communication device, and the context of the service connection includes the correspondence between the identifier of the first service node in the first communication device and the identifier of the second service node in the second communication device; the first communication device determines the service connection corresponding to the service flow to which the message belongs based on the context of the service connection and the first information, including: the first communication device determines the identifier of the second service node in the second communication device corresponding to the first information based on the context of the service connection; the first communication device determines the service connection corresponding to the service flow to which the message belongs based on the first information and the determined identifier of the second service node in the second communication device.

[0166] Optionally, the identifier of the first service node in the first communication device included in the first information is a first identifier, which is used to indicate that the message is an unordered message; step S602 can be replaced by: the first communication device executes the message.

[0167] Optionally, when the identifier of the first service node is the first identifier, the identifier of the second service node can also be the first identifier. In this case, the service connection between the first service node and the second service node is established by default, and the above steps are not required. Figure 9 or Figure 10 The establishment process is shown. Furthermore, the messages transmitted through the service connection are out-of-order messages.

[0168] For example, the first identifier can be 0, and the identifier of the first service node can be dst_connectionID. When the value of dst_connectionID is 0, the second communication device can perform load balancing on all second ports, and the first communication device can directly execute after receiving the message without sorting the message.

[0169] Optionally, the identifier of the first service node in the first communication device included in the first information is not the first identifier, and the first identifier is used to indicate that the message is an out-of-order message.

[0170] For example, when the value of dst_connectionID is not 0, steps S601 and S602 can be executed.

[0171] Furthermore, if the identifier of the first service node in the first communication device included in the first information is not the first identifier, and if the indication information in the service connection context indicates that multi-port ordering is not supported at the receiving end, that is, the receiving end only supports single-port ordering, then step S602 can be executed directly after step S601. If the indication information in the service connection context stored in the first communication device indicates that multi-port ordering is supported at the receiving end, then after step S601 and before step S602, the first communication device can aggregate the messages received from multiple first ports.

[0172] Optionally, the first communication device has the ability to sort messages received via multiple paths. In this scheme, the transmission of ordered messages can utilize the large bandwidth of multipath transmission, thereby improving the transmission efficiency of ordered messages.

[0173] The capability register of the communication device in this embodiment can store information related to sorting capabilities, including whether the receiver supports order preservation, whether the receiver supports multi-port order preservation, or the maximum number of service connections supported.

[0174] Combination Figure 3 The network structure of the UB system shown is as follows: Figure 11 This diagram illustrates message transmission based on a service connection. Messages 1-5 belong to the same service flow; messages 1-4 are of type RO, and message 5 is of type SO. The message ordering rule is that an SO type message can only follow a preceding RO type message. In UB EP0, the five messages carrying first information and ordering information can be sent through different ports. For example, message 1 can be sent through port 0, messages 2 and 5 through port 1, message 3 through port 2, and message 4 through port 3. The five messages can be sent out of order or sequentially, arriving at different ports of UB EP1 via different paths. Due to the different latency of different paths, even if UB EP0 sends the five messages sequentially, the receiving order may be disrupted when they arrive at UB EP1 via multiple paths. For example, messages 2 and 5 may arrive at UB EP1 before message 1. After receiving five packets belonging to the same service flow, UB EP1 can restore the order of the five packets according to the sorting information carried in the packets, such as the sequence number of the packets in the service flow and the packet type.

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

[0176] Figure 12 The diagram illustrates the possible communication devices provided in the embodiments of this application. These communication devices can be used to implement the functions of the first or second communication device in the above method embodiments, and thus can also achieve the beneficial effects of the above method embodiments.

[0177] like Figure 12 As shown, the communication device 12 includes a transceiver module 121. Optionally, the communication device 12 further includes a processing module 122 and a storage module 123. The communication device 12 is used to implement the above-described... Figure 6 The method embodiments shown depict the functions of the first or second communication device.

[0178] When the communication device 12 is used to implement Figure 6 In the method embodiment shown, the function of the second communication device is: transceiver module 121, used to send messages to the first communication device.

[0179] When the communication device 12 is used to implement Figure 6 In the method embodiment shown, the first communication device functions as follows: a transceiver module 121 is used to receive messages from the second communication device; and a processing module 122 is used to determine the order of messages belonging to the same service connection based on the first information and ordering information carried in the message.

[0180] For a more detailed description of the transceiver module 121, processing module 122, and storage module 123 mentioned above, please refer to [link / reference]. Figure 6 The relevant descriptions in the method embodiments shown.

[0181] In this embodiment, the communication device 12 is presented in an integrated manner, divided into various functional modules. Here, "module" can refer to a specific ASIC, circuit, processor and memory executing one or more software or firmware programs, integrated logic circuit, and / or other devices that can provide the above-mentioned functions.

[0182] When the communication device 12 is the first or second communication device in the above method embodiments, in a simple embodiment, those skilled in the art will realize that the communication device 12 can adopt... Figure 5The communication device 500 shown is in the form of [example device].

[0183] for example, Figure 5 The processor 501 or 507 in the communication device 500 shown can execute the message transmission method in the above-described method embodiment by calling computer execution instructions stored in the memory 503. Specifically, Figure 12 The function / implementation process of the processing module 122 can be achieved through... Figure 5 The processor 501 or 507 in the communication device 500 shown calls computer execution instructions stored in memory 503 to implement the function. Figure 12 The function / implementation process of the transceiver module 121 can be achieved through... Figure 5 The communication module connected to the communication interface 504 in the middle is used to achieve this. Figure 12 The function / implementation process of storage module 123 can be obtained through Figure 5 It is implemented using memory 503.

[0184] It should be noted that one or more of the above modules or units can be implemented by software, hardware, or a combination of both. When any of the above modules or units are implemented by software, the software exists as computer program instructions and is stored in memory. The processor can be used to execute the program instructions and implement the above method flow. The processor can be built into a SoC (System-on-a-Chip) or ASIC, or it can be a separate semiconductor chip. In addition to the core that executes software instructions for computation or processing, the processor may further include necessary hardware accelerators, such as field-programmable gate arrays (FPGAs), PLDs (Programmable Logic Devices), or logic circuits that implement dedicated logic operations.

[0185] When the above modules or units are implemented in hardware, the hardware can be any one or any combination of a CPU, microprocessor, digital signal processing (DSP) chip, microcontroller unit (MCU), artificial intelligence processor, ASIC, SoC, FPGA, PLD, application-specific digital circuit, hardware accelerator, or non-integrated discrete device, which can run the necessary software or perform the above method flow independently of software.

[0186] Optionally, embodiments of this application also provide a chip system, including: at least one processor and an interface, wherein the at least one processor is coupled to a memory via the interface, and when the at least one processor executes a computer program or instructions in the memory, the method in any of the above method embodiments is executed. In one possible implementation, the communication device further includes a memory. Optionally, the chip system may be composed of chips, or may include chips and other discrete devices; embodiments of this application do not specifically limit this.

[0187] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented using software programs, implementation can be, in whole or in part, in the form of a computer program product. This computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer or a data storage device containing one or more servers, data centers, etc., that can be integrated with the medium. The available media can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state disks, SSDs), etc.

[0188] Although this application has been described herein in conjunction with various embodiments, those skilled in the art, by reviewing the accompanying drawings, disclosure, and appended claims, will understand and implement other variations of the disclosed embodiments in carrying out the claimed application. In the claims, the word "comprising" does not exclude other components or steps, and "a" or "an" does not exclude a plurality. A single processor or other unit can implement several functions listed in the claims. While different dependent claims may recite certain measures, this does not mean that these measures cannot be combined to produce good results.

[0189] Although this application has been described in conjunction with specific features and embodiments, it is obvious that various modifications and combinations can be made thereto without departing from the spirit and scope of this application. Accordingly, this specification and drawings are merely exemplary illustrations of this application as defined by the appended claims, and are considered to cover any and all modifications, variations, combinations, or equivalents within the scope of this application. Clearly, those skilled in the art can make various alterations and modifications to this application without departing from the spirit and scope of this application. Thus, if such modifications and modifications of this application fall within the scope of the claims of this application and their equivalents, this application is also intended to include such modifications and modifications.

Claims

1. A message transmission method, characterized in that, The method includes: A first communication device receives a message from a second communication device, wherein the message carries first information and sorting information. The first information is used to indicate the service connection corresponding to the service flow to which the message belongs, and the sorting information is used to indicate the sorting rule of the service flow to which the message belongs. The sorting information includes strong order SO, weak order RO, or no order NO. The first communication device determines the order of multiple messages belonging to the same service connection based on the first information carried in the message and the ordering information.

2. The method according to claim 1, characterized in that, The method further includes: The first communication device establishes a service connection with the second communication device; The first communication device stores the context of the service connection; The context of the service connection includes at least one of the following: the correspondence between the identifier of the first service node in the first communication device and the identifier of the second service node in the second communication device, the correspondence between the identifier of the first port in the first communication device and the identifier of the second port in the second communication device, or the starting sequence number of the message belonging to the service connection; the first service node and the second service node are used to sort the messages belonging to the same service connection, and the first port and the second port are used to transmit the messages.

3. The method according to claim 1, characterized in that, The first communication device establishes a service connection with the second communication device, including: The first communication device establishes the service connection between the first service node in the first communication device and the second service node in the second communication device.

4. The method according to claim 2 or 3, characterized in that, The first communication device determines the ordering of multiple packets belonging to the same service connection based on the first information carried in the packet and the ordering information, including: The first communication device determines the service connection corresponding to the service flow to which the message belongs based on the context of the service connection and the first information; Based on the sorting information included in the messages belonging to the same service connection, the first communication device determines the sorting of multiple messages belonging to the same service connection.

5. The method according to claim 4, characterized in that, The first information includes the identifier of the first service node in the first communication device, and the context of the service connection includes the correspondence between the identifier of the first service node in the first communication device and the identifier of the second service node in the second communication device. The first communication device determines the service connection corresponding to the service flow to which the message belongs based on the context of the service connection and the first information, including: The first communication device determines the identifier of the second service node in the second communication device corresponding to the first information based on the context of the service connection; The first communication device determines the service connection corresponding to the service flow to which the message belongs based on the first information and the identifier of the second service node in the second communication device.

6. The method according to any one of claims 2, 3, and 5, characterized in that, The identifier of the first service node in the first communication device included in the first information is not the first identifier, which is used to indicate that the message is an out-of-order message.

7. The method according to any one of claims 2, 3, and 5, characterized in that, The identifier of the first service node in the first communication device included in the first information is a first identifier, which is used to indicate that the message is an unordered message; The first communication device determines the ordering of multiple packets belonging to the same service connection based on the first information carried in the packet and the ordering information, including: The first communication device executes the message.

8. The method according to any one of claims 1-3 and 5, characterized in that, The first communication device has the ability to sort the messages received from multiple paths.

9. The method according to claim 3, characterized in that, The first communication device establishes the service connection between the first service node in the first communication device and the second service node in the second communication device, including: In response to a first connection establishment request from the second communication device, the first communication device determines the identifier of the first service node; the first connection establishment request includes the identifier of the second service node; The first communication device sends a first connection establishment response to the second communication device; the first connection establishment response includes the identifier of the first service node.

10. The method according to claim 3, characterized in that, The first communication device establishes the service connection between the first service node in the first communication device and the second service node in the second communication device, and further includes: The first communication device sends a second connection establishment request to the second communication device; the second connection establishment request includes the identifier of the first service node; The first communication device receives a second connection establishment response from the second communication device; the second connection establishment response includes the identifier of the second service node.

11. The method according to claim 10, characterized in that, The first communication device sends a second connection establishment request to the second communication device, including: When the first communication device needs to send a message belonging to the service connection to the second communication device, and the first communication device has not established the service connection with the second communication device, or in response to the user's operation to establish the service connection, the first communication device sends the second connection establishment request to the second communication device.

12. A message transmission method, characterized in that, The method includes: The second communication device sends a message to the first communication device, wherein the message carries first information and sorting information. The first information is used to identify the service connection corresponding to the service flow to which the message belongs, and the sorting information is used to indicate the sorting rule of the service flow to which the message belongs. The sorting information includes strong order SO, weak order RO, or no order NO.

13. The method according to claim 12, characterized in that, The method further includes: The second communication device establishes a service connection with the first communication device; The second communication device stores the context of the service connection; The context of the service connection includes at least one of the following: the correspondence between the identifier of the first service node in the first communication device and the identifier of the second service node in the second communication device, the correspondence between the identifier of the first port in the first communication device and the identifier of the second port in the second communication device, or the starting sequence number of the message belonging to the service connection; the first service node and the second service node are used to sort the messages belonging to the same service connection, and the first port and the second port are used to transmit the messages.

14. The method according to claim 13, characterized in that, The second communication device establishes a service connection with the first communication device, including: The second communication device establishes the service connection between the first service node in the first communication device and the second service node in the second communication device.

15. The method according to claim 14, characterized in that, The second communication device establishes the service connection between the first service node in the first communication device and the second service node in the second communication device, including: The second communication device sends a first connection establishment request to the first communication device; the first connection establishment request includes the identifier of the second service node; The second communication device receives a first connection establishment response from the first communication device; the first connection establishment response includes the identifier of the first service node.

16. The method according to claim 15, characterized in that, The second communication device sends a first connection establishment request to the first communication device, including: When the second communication device needs to send a message belonging to the service connection to the first communication device, and the second communication device has not established the service connection with the first communication device, or in response to the user's operation to establish the service connection, the second communication device sends the first connection establishment request to the first communication device.

17. The method according to claim 14, characterized in that, The second communication device establishes the service connection between the first service node in the first communication device and the second service node in the second communication device, including: In response to a second connection establishment request from the first communication device, the second communication device determines the identifier of the second service node; the second connection establishment request includes the identifier of the first service node; The second communication device sends a second connection establishment response to the first communication device; the second connection establishment response includes the identifier of the second service node.

18. The method according to any one of claims 12-17, characterized in that, After the second communication device sends a message to the first communication device, the method further includes: If the second communication device does not receive the first message from the first communication device, the second communication device retransmits the message; the first message is used by the first communication device to confirm that it has received the message.

19. A first communication device, characterized in that, The first communication device includes: a transceiver module and a processing module; The transceiver module is used to receive messages from the second communication device, wherein the messages carry first information and sorting information, the first information is used to identify the service connection corresponding to the service flow to which the message belongs, and the sorting information is used to indicate the sorting rules of the service flow to which the message belongs; the sorting information includes strong order SO, weak order RO or no order NO. The processing module is used to determine the order of multiple packets belonging to the same service connection based on the first information carried in the packet and the ordering information.

20. A second communication device, characterized in that, The second communication device includes: a transceiver module; The transceiver module is used to send a message to the first communication device, wherein the message carries first information and sorting information. The first information is used to identify the service connection corresponding to the service flow to which the message belongs, and the sorting information is used to indicate the sorting rule of the service flow to which the message belongs. The sorting information includes strong order SO, weak order RO, or no order NO.

21. A communication system, characterized in that, The communication system includes a first communication device for performing the method as described in any one of claims 1-11, and a second communication device for performing the method as described in any one of claims 12-18.

22. A communication device, characterized in that, include: A memory and a processor coupled to the memory, the memory being used to store a program, and the processor being used to execute the program stored in the memory; when the communication device is running, the processor runs the program, causing the communication device to perform the message transmission method according to any one of claims 1-11, or causing the communication device to perform the message transmission method according to any one of claims 12-18.

23. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program or instructions that, when executed, implement the message transmission method as described in any one of claims 1 to 11, or implement the message transmission method as described in any one of claims 12 to 18.