Message transmission method, device and system

By carrying information and sorting information in the message, the communication device at the receiving end determines the sorting and realizes multi-path transmission of ordered messages, which solves the problem of low single-path transmission efficiency in the PCIe protocol and improves the transmission efficiency of ordered messages.

CN120639831AActive Publication Date: 2025-09-12HUAWEI TECH CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202510687427.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-01-29
Publication Date
2025-09-12
Estimated Expiration
2043-01-29

AI Technical Summary

Technical Problem

In the PCIe protocol, single-path transmission of ordered messages requires each node to perceive the message type for sorting, resulting in additional waiting delay between the sender and receiver, affecting transmission efficiency.

Method used

By carrying the first information and the sorting information in the message, the communication device at the receiving end determines the sorting of the message according to the information, realizes multi-path transmission and restores the ordered message sequence, and avoids the sender's reliance on the sorting.

Benefits of technology

It improves the transmission efficiency of ordered messages, avoids the extra waiting delay of the order-preserving scheme at the sending end, and utilizes the large bandwidth of multi-path transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120639831A_ABST
    Figure CN120639831A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a message transmission method, device and system, which are used for order preservation of a receiving end of a message. The method comprises: a first communication device receiving a message from a second communication device, the message carrying first information and sorting information, the first information being used for identifying a service connection corresponding to a service flow to which the message belongs, and the sorting information being used for indicating a sorting rule of the service flow to which the message belongs; the first communication device determines the sorting condition of the messages belonging to the same service connection according to the first information and the sorting information carried in the messages; wherein a corresponding relation exists 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 application number of the original application is 202310091575.8, and the original application date is January 29, 2023. The entire content of the original application is incorporated into this application by reference. Technical Field

[0002] The present application relates to the field of communication technology, and in particular to a message transmission method, device and system. Background Art

[0003] In the peripheral component interface express (PCIe) protocol, a single path is used to transmit messages with ordering requirements (hereinafter referred to as ordered messages), so that end-to-end ordering can be achieved through a point-to-point ordering mechanism throughout 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 ordering rule. For example, the ordering rule may be such that a strongly ordered (SO) message can only be placed after a preceding relaxed ordered (RO) message. Because each node between the sender and receiver of the ordered message follows the same ordering rule when forwarding the ordered message, the order of the ordered messages received by the receiver still satisfies the ordering rule.

[0005] However, the disadvantage of the above single-path transmission of ordered messages is that each node between the sending end and the receiving end needs to sense the type of the message in order to forward the ordered message according to the sorting rule. Summary of the Invention

[0006] The embodiments of the present application provide a message transmission method, device, and system for maintaining the order of messages at the receiving end.

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

[0008] In a first aspect, a message transmission method is provided. The device that executes the message transmission method may be a first communication device, or may be a module applied to the first communication device, such as a chip or a chip system. The following description is taken as an example where the execution subject is the first communication device. 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 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 corresponding relationship between the service connection and the service flow.

[0009] In the message transmission method provided in the embodiment of the present application, the first communication device, as the receiving end of the message, can sort the messages according to the information carried in the message. Therefore, the nodes on the message transmission path that forward the message do not need to be aware of the message type and sorting rules. In addition, the present application only relies on the receiving end to maintain the order of the message, and does not require the order in which the sending end sends the message. Therefore, it can circumvent the problem of additional waiting delay in the current sending end order maintenance scheme, thereby further improving the transmission efficiency of ordered messages.

[0010] In combination with the first aspect above, in a possible implementation, 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; wherein the context of the service connection includes at least one of the following: a correspondence between an identifier of a first service node in the first communication device and an identifier of a second service node in the second communication device, a correspondence between an identifier of a first port in the first communication device and an identifier of a second port in the second communication device, or a 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 solution, the first communication device stores the context of the service connection so as to subsequently restore the order of the messages.

[0011] In combination with the above-mentioned first aspect, in a possible implementation method, 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.

[0012] In combination with the above-mentioned first aspect, in a possible implementation method, the first communication device determines the sorting status of messages belonging to the same business connection based on the first information and the sorting information carried in the message, including: the first communication device determines the business connection corresponding to the business flow to which the message belongs based on the context of the business connection and the first information; based on the sorting information included in the messages belonging to the same business connection, the first communication device determines the sorting status of the messages belonging to the same business connection.

[0013] In combination with the above-mentioned first aspect, in a possible implementation method, 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 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. In this solution, if the identifier of the first service node is not the first identifier, the first communication device may implement the above 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, and the first identifier is used to indicate that the message is an unordered message; the first communication device determines the ordering of messages belonging to the same service connection based on the first information and the ordering information carried in the message, including: the first communication device executes the message. In this solution, when the identifier of the first service node is the first identifier, the first communication device directly executes the received message without ordering the received message.

[0016] In conjunction with the first aspect above, in one possible implementation, the first communication device has the ability to sort the messages received via multiple paths. In this solution, 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 above, in one possible implementation, 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 an 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. In this solution, the service connection establishment process may be initiated by the second communication device.

[0018] In conjunction with the first aspect above, in one possible implementation, 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 further includes: the first communication device sending a second connection establishment request to the second communication device; the second connection establishment request including an identifier of the first service node; and the first communication device receiving a second connection establishment response from the second communication device; the second connection establishment response including an identifier of the second service node. In this solution, the service connection establishment process may be initiated by the first communication device.

[0019] In conjunction with the first aspect described above, in one possible implementation, the first communication device sending the second connection establishment request to the second communication device includes: 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 operation to establish the service connection, the first communication device sending 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 established automatically by the first communication device based on transmission requirements or manually by the user.

[0020] In combination with the first aspect above, in a 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, and the message type includes strong sequence SO, weak sequence RO or no sequence NO.

[0021] In a second aspect, a message transmission method is provided. A device executing the message transmission method may be a second communication device, or may be a module implemented in the second communication device, such as a chip or chip system. The following description uses the second communication device as an example. The second communication device sends a message to the first communication device, where the message carries first information and sorting information. The first information is used to identify a service connection corresponding to a service flow to which the message belongs, and the sorting information is used to indicate a sorting rule for the service flow to which the message belongs. A corresponding relationship exists between the service connection and the service flow.

[0022] In the message transmission method provided in the embodiment of the present application, 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 sequence preservation scheme can be avoided to improve the transmission efficiency of ordered messages.

[0023] In combination with the above-mentioned second aspect, in a possible implementation, the method further includes: the second communication device establishes a service connection with the first communication device; the first communication device stores 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 a 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 solution, the second communication device stores the context of the service connection to subsequently generate the first information carried in the message.

[0024] In combination with the above-mentioned second aspect, in a possible implementation method, 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.

[0025] In conjunction with the above-mentioned second aspect, in one possible implementation, 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 an identifier of the second service node; and 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. In this solution, the service connection establishment process may be initiated by the second communication device.

[0026] In conjunction with the second aspect described above, in one possible implementation, the second communication device sending the first connection establishment request to the first communication device includes: 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 operation to establish the service connection, the second communication device sending 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 established automatically by the second communication device based on transmission requirements or manually by the user.

[0027] In conjunction with the above-mentioned second aspect, in one possible implementation, 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. In this solution, the service connection establishment process can be initiated by the first communication device.

[0028] In combination with the above second aspect, in a 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, and the message type includes strong sequence SO, weak sequence RO or no sequence 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 the first message from the first communication device, the second communication device resends the message; the first message is used by the first communication device to confirm receipt of the message. In this solution, messages not received by the first communication device are discarded and resent by the second communication device. Messages are still being transmitted on the transmission path and are not blocked. On the first communication device side, abnormal message transmission will not affect the reception of messages on other paths.

[0030] In a third aspect, a first communication device is provided for implementing the above method. The first communication device includes modules, units, or means corresponding to implementing the above method. The modules, units, or means may be implemented in hardware, software, or by hardware executing corresponding software implementations. The hardware or software includes one or more modules or units corresponding to the above functions.

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

[0032] In combination with the above-mentioned third aspect, in a possible implementation method, the first communication device also includes: a storage module; the transceiver module is also used to establish a service connection with the second communication device; the storage module is used to store the context of the service connection; wherein, 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 message.

[0033] In combination with the above-mentioned third aspect, in a possible implementation method, the transceiver module is also used to establish a service connection with the second communication device, including: 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.

[0034] In combination with the above-mentioned third aspect, in a possible implementation method, the processing module is used to determine the sorting status of messages belonging to the same business connection based on the first information and the sorting information carried in the message, including: determining the business connection corresponding to the business flow to which the message belongs based on the context of the business connection and the first information; determining the sorting status of messages belonging to the same business connection based on the sorting information included in the messages belonging to the same business connection.

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

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

[0037] In combination with the above-mentioned third aspect, in a possible implementation method, the identifier of the first service node in the first communication device included in the first information is a first identifier, and the first identifier is used to indicate that the message is an unordered message; the processing module is used 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, including: used to execute the message.

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

[0039] In combination with the above-mentioned third aspect, in one possible implementation, the transceiver module is 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, including: responding to a first connection establishment request from the second communication device, determining the identifier of the first service node through the processing module; the first connection establishment request includes the identifier of the second service node; and sending a first connection establishment response to the second communication device; the first connection establishment response includes the identifier of the first service node.

[0040] In combination with the above-mentioned third aspect, in one possible implementation, the transceiver module is 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, and also includes: sending a second connection establishment request to the second communication device; the second connection establishment request includes the identifier of the first service node; receiving a second connection establishment response from the second communication device; the second connection establishment response includes the identifier of the second service node.

[0041] In combination with the above-mentioned third aspect, in one possible implementation method, the transceiver module is used to send 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, sending the second connection establishment request to the second communication device.

[0042] In combination with the third aspect above, in a 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, and the message type includes strong sequence SO, weak sequence RO or no sequence NO.

[0043] Among them, the technical effects brought about by any possible implementation method of the third aspect can be referred to the technical effects brought about by the different implementation methods of the above-mentioned first aspect, and will not be repeated here.

[0044] In a fourth aspect, a second communication device is provided for implementing the above method. The second communication device includes modules, units, or means corresponding to the above method. The modules, units, or means can be implemented in hardware, software, or by hardware executing corresponding software implementations. The hardware or software includes one or more modules or units corresponding to the above functions.

[0045] In combination with the above-mentioned fourth aspect, in a possible implementation method, 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 business connection corresponding to the business flow to which the message belongs, and the sorting information is used to indicate the sorting rules of the business flow to which the message belongs, and there is a corresponding relationship between the business connection and the business flow.

[0046] In combination with the above-mentioned fourth aspect, in a possible implementation method, the second communication device also includes: a storage module; the transceiver module is also used to establish a service connection with the first communication device; the storage module is used to store the context of the service connection; wherein, 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 message.

[0047] In combination with the above-mentioned fourth aspect, in a possible implementation method, the transceiver module is also used to establish a service connection with the first communication device, including: 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.

[0048] In combination with the above-mentioned fourth aspect, in one possible implementation, the transceiver module is 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, including: sending a first connection establishment request to the first communication device; the first connection establishment request includes the identifier of the second service node; receiving a first connection establishment response from the first communication device; the first connection establishment response includes the identifier of the first service node.

[0049] In combination with the above-mentioned fourth aspect, in one possible implementation method, the transceiver module is used to send 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, sending the first connection establishment request to the first communication device.

[0050] In combination with the above-mentioned fourth aspect, in a possible implementation method, the second communication device also includes: a processing module; 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, including: responding to a second connection establishment request from the first communication device, used to determine the identifier of the second service node through the processing module; the second connection establishment request includes the identifier of the first service node; used 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 combination with the fourth aspect above, in a 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, and the message type includes strong sequence SO, weak sequence RO or no sequence NO.

[0052] In combination with the above-mentioned fourth aspect, in a possible implementation method, the transceiver module is also used to resend the message when the second communication device has not received 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] Among them, the technical effects brought about by any possible implementation method of the fourth aspect can be referred to the technical effects brought about by the different implementation methods of the above-mentioned second aspect, and will not be repeated here.

[0054] In a fifth aspect, a communication system is provided, comprising a first communication device that executes the method described in the first aspect, and a second communication device that executes the method described in the second aspect.

[0055] In a sixth aspect, a communication device is provided, comprising: a processor; the processor is configured to be coupled to a memory, and after reading computer instructions stored in the memory, execute the method described in the first or second aspect above according to the instructions.

[0056] In combination with the sixth aspect above, in a possible implementation, the communication device further includes a memory; the memory is used to store computer instructions.

[0057] In conjunction with the sixth aspect, in one possible implementation, the communication device further includes a communication interface; the communication interface is used for the communication device to communicate with other devices. Exemplarily, the communication interface can be a transceiver, an input / output interface, an interface circuit, an output circuit, an input circuit, a pin, or related circuits.

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

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

[0060] In a seventh aspect, a computer-readable storage medium is provided, in which instructions are stored. When the computer-readable storage medium is run on a computer, the computer can execute the method described in the first or second aspect above.

[0061] Among them, the technical effects brought about by any possible implementation method of the fifth to seventh aspects can be referred to the technical effects brought about by the different implementation methods of the above-mentioned first or second aspects, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0062] Figure 1 This is a schematic diagram of the networking configuration included in the current PCIe protocol;

[0063] Figure 2 This is a diagram of the specific networking form that complies with the current PCIe protocol;

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

[0065] Figure 4 A schematic diagram of the architecture of a communication system provided in an embodiment of the present application;

[0066] Figure 5 Schematic diagram of the structure of the communication device provided in the embodiment of the present application Figure 1 ;

[0067] Figure 6 A flowchart of a message transmission method provided in an embodiment of the present application;

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

[0069] Figure 8 A schematic diagram of establishing a TA connection in a UB system provided in an embodiment of the present application;

[0070] Figure 9 A schematic diagram of the process of establishing a TA connection initiated by a second communication device according to an embodiment of the present application;

[0071] Figure 10 A schematic diagram of the process of establishing a service connection provided in an embodiment of the present application;

[0072] Figure 11 A schematic diagram of message transmission based on a service connection provided in an embodiment of the present application;

[0073] Figure 12 Schematic diagram of the structure of the communication device provided in the embodiment of the present application Figure 2 . DETAILED DESCRIPTION

[0074] In order to facilitate understanding of the technical solutions of the embodiments of the present application, a brief introduction to the relevant technologies or terms of the present application is first given as follows.

[0075] First, the PCIe protocol.

[0076] Figure 1 The figure shows the network configuration diagram included in the PCIe protocol. Figure 1 The network shown includes a PCIe root complex (RC), a switch, and two PCIe end points (EP). Figure 1 FIG3 schematically shows a network including two PCIe EPs. In practice, the network may include one or more PCIe EPs. Figure 1The network structure shown is a tree. Only a single path is supported between two devices, not multiple paths. As described in the background, the PCIe protocol can achieve end-to-end order preservation through a point-to-point order-preserving mechanism across the entire network path.

[0077] Combine Figure 1 , taking PCIe RC as the producer and PCIe EP as the consumer as an example, Figure 2 The following figure shows a schematic diagram of a specific network configuration that complies with the PCIe protocol. Figure 2 The network shown includes producers, states, switches, consumers, flags, and data buffers. 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; states and flags can be, for example, registers for storing flag bits during the transmission of ordered messages; and data buffers can be used to cache data contained in ordered messages.

[0078] exist Figure 2 In this example, the producer generates and sends ordered messages, including: Message 1, Message 2, and Message 3, and sends them to the switch in that order. Messages 1 and 2 are of the RO type, and Message 3 is of the SO type. When forwarding ordered messages, the switch follows the ordering rule that SO-type messages can only come after the preceding RO-type message. As a result, the consumer can receive Message 2, Message 1, and Message 3 from the switch in order. In other words, although the order of the ordered messages received by the receiver has changed, it still meets the ordering rule and is not out of order.

[0079] As described in the background technology, in the PCIe protocol, the disadvantage of using a single path to transmit ordered messages is that the large bandwidth of multi-path transmission cannot be utilized, which affects the transmission efficiency of ordered messages. In addition, the switch needs to sense the type of message in order to forward the ordered messages 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 be sent through multiple ports on the sender and receiver, as well as multiple paths on the transmission network, increasing communication bandwidth. In the embodiments of this application, the "sender" may also be referred to as the "source," and the "receiver" may also be referred to as the "destination."

[0082] For example, Figure 3The following diagram shows a network structure diagram of a UB system. UB EP0 includes 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'. "UB EP" in the embodiments of this application may also be referred to as a "UB device" or "node." The transmission network used to forward messages between UB EP0 and UB EP1 includes switch 1, switch 2, switch 3, and switch 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 have an ordering relationship between them, and there are also business scenarios where messages have no ordering relationship between them. In business scenarios where messages have an ordering relationship between them, ordered messages are transmitted. In business scenarios where messages have an ordering relationship between them, messages with no ordering requirements (hereinafter referred to as unordered messages) are transmitted. In the UB system, the current solutions for transmitting ordered messages mainly include single-path transmission solutions and sender-side order-preserving solutions.

[0084] In a single-path transmission scheme, similar to that used in the PCIe protocol, a fixed path is used to transmit ordered packets. Although multiple paths exist in the UB system, they are only used for the transmission of out-of-order packets, not for the transmission of ordered packets. Single-path transmission cannot utilize the high bandwidth of multipath transmission, which affects the transmission efficiency of ordered packets.

[0085] In the scheme of preserving order at the sending end, the sending end temporarily does not send messages that are ordered dependent on the previous message until the previous message is transmitted and executed. The sending end then sends the ordered dependent message. Suppose that message 5 is required to be sorted after message 2. Then, after the sending end sends message 2, message 5 is temporarily not sent until the sending end receives the feedback message of the executed message 2 from the receiving end, and then sends message 5, thereby ensuring that the receiving end receives and executes message 2 first, and then receives and executes message 5. However, when the sending end sends a message that is ordered dependent on the previous message, it needs to wait for the delay of transmitting the previous message and the feedback message. The additional waiting delay will affect the transmission efficiency of the ordered messages.

[0086] In order to improve the transmission efficiency of ordered messages, in an embodiment of the present application, ordered messages are still transmitted using multiple paths, and an embodiment of the present application provides a multi-path order preservation solution at the receiving end to restore the order of ordered messages at the receiving end.

[0087] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application. Among them, in the description of the present application, unless otherwise specified, " / " indicates that the objects associated before and after are in an "or" relationship. For example, A / B can represent A or B; "and / or" in the present application is only a description of the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. In addition, in the description of the present application, unless otherwise specified, "multiple" refers to two or more than two. "At least one of the following" or similar expressions refers 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, c can be single or multiple. In addition, in order to facilitate the clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, words such as "first" and "second" are used to distinguish between identical or similar items with substantially the same functions and effects. Those skilled in the art will understand that words such as "first" and "second" do not limit the quantity and execution order, and words such as "first" and "second" do not necessarily limit differences. At the same time, in the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or design schemes. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a concrete way for easy understanding.

[0088] Figure 4 A communication system 40 provided in an embodiment of the present application is shown. 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, 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, and there is a corresponding relationship between the service connection and the service flow. The first communication device 401 is used to receive a message from the second communication device 402. The first communication device 401 is also used to determine the sorting status 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 the subsequent method embodiments and will not be repeated here.

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

[0090] For example, the relevant functions of the first communication device or the second communication device in the embodiment of the present application can be Figure 5 It is implemented by the communication device 500 in FIG.

[0091] Figure 5 The figure shows a schematic diagram of the structure of a communication device 500 provided in an embodiment of the present application. The communication device 500 includes one or more processors 501, a communication circuit 502, and at least one communication interface 504 (the following description of each module is based on an example including one communication interface 504 and one processor 501), and optionally may also include a memory 503.

[0092] The processor 501 may be a CPU, a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of the program of the present application.

[0093] Communication line 502 may include pathways for connecting different components.

[0094] Communication interface 504 can be a transceiver module for communicating with other devices or communication networks, such as Ethernet, RAN, WLAN, etc. For example, the transceiver module can be a device such as a transceiver or a transceiver. Alternatively, communication interface 504 can be a transceiver circuit located within processor 501, used to implement signal input and output to the processor. Figure 5 It is shown that the communication device 500 includes only the communication interface 504 and the communication interface 508. In the embodiment of the present application, the number of the communication interface included in the communication device 500 may also be one, or the number of the communication interface included in the communication device 500 may also be greater than two.

[0095] The memory 503 may be a device having a storage function. For example, it may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, an optical disc storage (including a compact disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory may exist independently and be connected to the processor via a communication line 502. The memory may also be integrated with the processor.

[0096] The memory 503 is used to store computer-executable instructions for executing the solution of the present application, and the execution is controlled by the processor 501. The processor 501 is used to execute the computer-executable instructions stored in the memory 503, thereby implementing the message transmission method provided in the embodiment of the present application.

[0097] Alternatively, in an embodiment of the present application, the processor 501 may also perform processing-related functions in the message transmission method provided in the following embodiments of the present application, and the communication interface 504 is responsible for communicating with other devices or communication networks. The embodiments of the present application do not specifically limit this.

[0098] The computer-executable instructions in the embodiments of the present application may also be referred to as application code, which is not specifically limited in the embodiments of the present application.

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

[0100] In a specific implementation, as an embodiment, the communication device 500 may include multiple processors, such as Figure 5 1 and 507. Each of these processors may be a single-CPU processor or a multi-CPU processor. A processor herein may refer to one or more devices, circuits, and / or processing cores for processing data (e.g., computer program instructions).

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

[0102] The communication device 500 can be a general purpose device or a dedicated device. For example, the communication device 500 can be a desktop computer, a portable computer, a network server, a personal digital assistant (PDA), a mobile phone, a tablet computer, a wireless terminal device, a vehicle terminal device, an embedded device, or a computer with Figure 5 The embodiment of the present application does not limit the type of the communication device 500.

[0103] The following will be combined Figures 1 to 5 The message transmission method provided in the embodiment of the present application is described in detail.

[0104] like Figure 6 As shown, a message transmission method provided in an embodiment of the present application includes the following steps:

[0105] Step S601: The second communication device sends a message to the first communication device. 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. The sorting information is used to indicate the sorting rule of the service flow to which the message belongs. There is a corresponding relationship between the service connection and the service flow.

[0107] Optionally, the sequencing information includes the sequence number of the message in the service flow to which it belongs, and / or the message type, where the message type includes SO, RO or non-ordered.

[0108] Exemplarily, the service connection in the embodiment of the present application may be a transaction layer (TA) connection.

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

[0110] The business flow in the embodiment of the present application may be a business flow between two processes of two communication devices. Figure 7 A schematic diagram illustrating service communication between three communication devices is shown. Each of communication devices 0, 1, and 2 includes two processes. Service communication can be performed between any two processes, meaning a service flow can exist between any two processes.

[0111] Taking process 0 of communication device 0 as an example, the business flow may exist between process 0 of communication device 0 and process 0' of communication device 1; or, the business flow may exist between process 0 of communication device 0 and process 1' of communication device 1; or, the business flow may exist between process 0 of communication device 0 and process 0" of communication device 2; or, the business flow may 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 an embodiment of the present application further includes: if the second communication device does not receive the first message from the first communication device, the second communication device resends the message; the first message is used by the first communication device to confirm receipt of the message. In this solution, the message not received by the first communication device is discarded and resent by the second communication device, and there is still message transmission on the transmission path and it will not be blocked. On the side of the first communication device, the abnormal transmission of the message will not affect the reception of messages on other paths.

[0113] After the abnormal cause that caused the first communication device to be unable to normally receive the message is recovered, the first communication device can receive the message from the second communication device in a timely manner.

[0114] When the data buffer resources of the first communication device are insufficient or a page fault occurs in the data cache, the first communication device will not send the first message to the second communication device; or the first communication device sends a message to the second communication device indicating that an abnormality has occurred in the message reception. In this case, the message can be directly discarded. Accordingly, if the second communication device still has not received 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 an abnormality has occurred in the message reception, the second communication device resends 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 the embodiment of the present application also includes: establishing a service connection between the first communication device and the second communication device; the first communication device and the second communication device respectively store 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 message. In this solution, the first communication device stores the context of the service connection so as to subsequently restore the order of the messages. The second communication device stores the context of the service connection so as to subsequently generate the first information carried in the message.

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

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

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

[0119] In the embodiment of the present application, the first port and the second port are used to transmit messages, that is, 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. In other words, 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 the embodiment of the present application, the context of the service connection may further include indication information for indicating whether multi-port order preservation at the receiving end is supported. The indication information may be, for example, an order type.

[0121] In an embodiment of the present application, the context of the service connection may also include information for maintaining the ordering relationship between messages belonging to the same service connection, for example, the starting sequence number of the message in the service flow corresponding to the service connection, which may be represented by a 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 hint information corresponding to the identifier of the second node. The second communication device may find the context of the corresponding service connection based on the identifier of the second node. If the indication information in the context of the service connection is used to indicate that multi-port sequence preservation at the receiving end is not supported, that is, only single-port sequence preservation at the receiving end is supported, then the second communication device may send each message belonging to the service flow along the same path. If the indication information in the context of the service connection is used to indicate that multi-port sequence preservation at the receiving end is supported, then the second communication device may send each message belonging to the service flow from the first port included in the context of the service connection.

[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] Take the second communication device as the sender of the message, the first communication device as the receiver of the message, and the service connection as the TA connection as an example. Figure 8A schematic diagram of establishing a TA connection in a UB system is shown. In particular, both the first communication device and the second communication device support multiple ports, and the first and second communication devices can communicate via a multipath consisting of multiple switches. The second service node in the second communication device can be used to add first information and sorting information to the original message in the user queue (UQ). The processed original message then reaches each second port of the second communication device via the transport layer (TP). The message is transmitted from each second port to each first port of the first communication device via a multipath consisting of multiple switches, and then reaches the first service node in the first communication device via the TP. 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, which is not limited in this embodiment of the present application. The first service node can be used to sort received messages belonging to the same TA connection. The sorted messages belonging to the same TA connection can be executed in the same process to implement the corresponding functions.

[0125] exist Figure 8 In the embodiment, the multipath formed by the TP, the multiple first ports, the multiple second ports, and the multiple switches can be shared by multiple service connections.

[0126] In an embodiment of the present application, the establishment of a service connection may be initiated by the second communication device or by the first communication device. The process of establishing a service connection initiated by the second communication device may include: the second communication device sends 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 service connection establishment process initiated by the first communications device may include: the first communications device sending a second connection establishment request to the second communications 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 communications device, the second communications device determines the identifier of the second service node. The second communications device sends a second connection establishment response to the first communications device, the second connection establishment response including the identifier of the second service node. Accordingly, the first communications device receives the second connection establishment response from the second communications device.

[0128] Exemplarily, the connection establishment request may be a create TA connection request (create TA connection request).

[0129] Optionally, the triggering condition for the second communication device to initiate the service connection establishment process may 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 an operation to establish a service connection.

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

[0131] In the above solution, a flexible triggering mechanism for establishing a service connection is provided. The service connection can be automatically established by the communication device according to the transmission demand, or can be manually established by the user.

[0132] In one possible implementation, a communication device administrator can preconfigure a policy for initiating the service connection establishment process. This means that the fabric manager (FM) automatically establishes a service connection between any two of the multiple communication devices in the network based on resource scheduling results. In another possible implementation, the FM does not participate in establishing service connections. Instead, in a distributed programming scenario, users can initiate the service connection establishment process on demand through out-of-band or in-band channels. In other words, when a service connection is needed, users can initiate the service connection establishment process by calling a program interface.

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

[0134] In step S901, an application (APP) of a virtual machine may send a task of sending a message to a first communication device to the UB stack of the virtual machine. Accordingly, the UB stack of the virtual machine may receive the task from the application of the virtual machine.

[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 may send a TA connection establishment request to the host's UB stack via the control channel. Correspondingly, the host's UB stack may receive the TA connection establishment request from the virtual machine's UB stack via the control channel.

[0136] The functions of the UB stack in the embodiment of the present application can be specifically implemented by the connection maintenance management module in the UB stack, which is uniformly described here and will not be repeated below.

[0137] Exemplarily, when the context of the TA connection stored in the second communication device does not include the identifier of the first service node of the first communication device, the UB stack of the virtual machine may determine that the TA connection is not established with the first communication device.

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

[0139] Step S903: The UB stack of the host may obtain a combination of a first port and a second port that is reachable by a path through FM.

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

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

[0142] Step S905: The UB driver of the host is called, so that the second communication device sends 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, the TA connection request may be established using in-band transmission or out-of-band transmission, wherein in-band transmission may utilize the physical link of the bottom layer of the UB system, and out-of-band transmission may be implemented using a socket.

[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 a correspondence between the identifier of the first port and the identifier of the second port reachable by the path, such as a {src_NA, dst_NA} pair. The TA connection establishment request may also include information indicating whether multi-port order preservation on the receiving end is supported, as well as the PSN of the packets in the service flow corresponding to the service connection.

[0145] When in-band transmission is used to establish a TA connection request, the TA connection request may further include a combination of a pair of first port identifiers and a second port identifier selected by the host's UB stack in step S904 for establishing the TA connection, such as a pair of {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 UBC driver of the host of the second communication device via the UBC firmware. Correspondingly, the UBC 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 an 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 context of the TA connection also includes the correspondence between the identifier of the first service node and the identifier of the second service node, such as the pair {src_connectionID, dst_connectionID}. The context of the TA connection also includes the correspondence between the identifier of the first port reachable by the path and the identifier of the second port, such as the pair {src_NA, dst_NA}. The context of the TA connection can also be used to indicate whether the receiving end supports multi-port order preservation, as well as the PSN of the message in the service flow corresponding to the service connection.

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

[0150] Optionally, after the second communication device receives the response to establish a TA connection, it is also necessary to store the context of the TA connection. The context of the TA connection includes the EID of the first communication device, such as dst_EID. The context of the TA connection also includes the correspondence between the identifier of the first service node and the identifier of the second service node, such as the pair {src_connectionID, dst_connectionID}. The context of the TA connection also includes the correspondence between the identifier of the first port reachable by the path and the identifier of the second port, such as the pair {src_NA, dst_NA}. The context of the TA connection can also be used to indicate whether the first port and the second port are both single ports, as well as the PSN of the message 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. Accordingly, 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 UB stack of the host sends the TA connection context to the UB driver of the host. Accordingly, the UB driver of the host receives the TA connection context from the UB stack of the host to facilitate subsequent service communication between the second communication device and the first communication device.

[0153] Combine Figure 9 , Figure 10 The following is a schematic diagram of the process of establishing a service connection. The process may include the following steps:

[0154] Step S1001: The application on the requesting side of establishing a service connection is started.

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

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

[0157] The conditions for triggering the establishment of a service connection can be found in the aforementioned embodiment and will not be described in detail here.

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

[0159] Furthermore, the requesting end and the responding end establishing the service connection can exchange information including the identification of the service node by sending and receiving unordered messages. The detailed description of step S1003 can be found in the relevant descriptions of step S905 and step S906, which will not be repeated here.

[0160] Step S1004: The requesting end and the responding end that establish the business connection each store a context of the business connection.

[0161] The specific content of the context of the business connection can be found in the relevant descriptions of step S905 and step S906, which will not be repeated here. Afterwards, the requesting end and the responding end that have established the business connection can perform business communication through the established business connection.

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

[0163] In the message transmission method provided in the embodiment of the present application, the first communication device, as the receiving end of the message, can sort the messages according to the information carried in the message. Therefore, the nodes on the message transmission path that forward the message do not need to be aware of the message type and sorting rules. In addition, the present application only relies on the receiving end to maintain the order of the message, and does not require the order in which the sending end sends the message. Therefore, it can circumvent the problem of additional waiting delay in the current sending end order maintenance scheme, thereby further improving the transmission efficiency of ordered messages.

[0164] Optionally, step S602 includes: the first communication device determining, based on the service connection context and the first information, the service connection corresponding to the service flow to which the message belongs; and determining, based on the sorting information included in the messages belonging to the same service connection, the sorting status of the messages belonging to the same service connection. In this solution, after the service connection is established, the first communication device stores the service connection context. When the first communication device receives a message, it can first determine the service connection to which the message belongs based on the service connection context 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 messages.

[0165] Furthermore, the first information includes an identifier of a first service node in the first communication device, and the context of the service connection includes 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; 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 the first identifier, and the first identifier is used to indicate that the message is an out-of-order 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 may 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, without the need to perform the above Figure 9 or Figure 10 Furthermore, the messages transmitted through the service connection are out-of-order messages.

[0168] For example, the first identifier may be 0, and the identifier of the first service node may be dst_connectionID. When the value of dst_connectionID is 0, the second communication device may perform load balancing on all second ports, and the first communication device may directly execute the received 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] Exemplarily, when the value of dst_connectionID is not 0, the above steps S601 and S602 may 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, if the indication information in the service connection context is used to indicate that multi-port sequence preservation on the receiving end is not supported, that is, the receiving end only supports single-port sequence preservation, then, after step S601, step S602 can be directly executed. If the indication information in the service connection context stored in the first communication device is used to indicate that multi-port sequence preservation on the receiving end is supported, then, after step S601 and before step S602, the first communication device may aggregate the messages received by multiple first ports.

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

[0173] The capability register of the communication device in the embodiment of the present application can store information related to the sorting capability, and the sorting capability includes whether the receiving end supports order preservation, whether the receiving end supports multi-port order preservation, or the maximum number of service connections supported.

[0174] Combine Figure 3 The network structure of the UB system shown in the figure is as follows: Figure 11 The diagram shows a schematic diagram of message transmission based on a service connection. Messages 1-5 belong to the same service flow, messages 1-4 are all of type RO, and message 5 is of type SO. The message ordering rule is that a SO-type message can only be sent after a preceding RO-type message. At UB EP0, the five messages carrying the first information and ordering information can be sent through different ports. For example, message 1 can be sent through port 0, message 2 and message 5 can be sent through port 1, message 3 can be sent through port 2, and message 4 can be sent through port 3. The five messages can be sent out of order or in sequence, arriving at different ports of UB EP1 via different paths. Due to the varying latency of different paths, even if UB EP0 sends the five messages in sequence, the order of receipt is likely to be disrupted when they reach UB EP1 via multiple paths. For example, messages 2 and 5 could arrive at UB EP1 before message 1. After receiving five messages belonging to the same service flow, UB EP1 can restore the order of the five messages according to the ordering information carried in the messages, such as the sequence number of the message in the service flow and the message type.

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

[0176] Figure 12 The following is a schematic diagram of the structure of possible communication devices provided by the embodiments of the present application. These communication devices can be used to implement the functions of the first communication device or the second communication device in the above method embodiments, and thus can also achieve the beneficial effects possessed by the above method embodiments.

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

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

[0179] When the communication device 12 is used to implement Figure 6 The functions of the first communication device in the method embodiment shown are: a transceiver module 121 for receiving a message from a second communication device; a processing module 122 for determining the sorting status of messages belonging to the same service connection based on the first information and sorting information carried in the message.

[0180] For more detailed description of the transceiver module 121, the processing module 122 and the storage module 123, please refer to Figure 6 The method embodiment shown is described in detail.

[0181] In this embodiment, the communication device 12 is presented in the form of various functional modules divided in an integrated manner. The "module" here 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 functions.

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

[0183] for example, Figure 5 The processor 501 or 507 in the communication device 500 shown can call the computer-executable instructions stored in the memory 503 to enable the communication device 500 to execute the message transmission method in the above method embodiment. Specifically, Figure 12 The function / implementation process of the processing module 122 can be achieved by Figure 5 The processor 501 or 507 in the communication device 500 is implemented by calling the computer execution instructions stored in the memory 503 . Figure 12 The function / implementation process of the transceiver module 121 can be achieved by Figure 5 This is achieved by connecting the communication module to the communication interface 504 in the embodiment. Figure 12 The function / implementation process of the storage module 123 can be achieved by Figure 5 It is implemented by the memory 503 in.

[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 the two. When any of the above modules or units is implemented by software, the software exists in the form of computer program instructions and is stored in a memory, and a processor can be used to execute the program instructions and implement the above method flow. The processor can be built into an SoC (system on chip) or an ASIC, or it can be an independent semiconductor chip. In addition to the core used to execute software instructions to perform calculations or processing within the processor, it can further include necessary hardware accelerators, such as a field programmable gate array (FPGA), a PLD (programmable logic device), or a logic circuit that implements 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, a microprocessor, a digital signal processing (DSP) chip, a microcontroller unit (MCU), an artificial intelligence processor, an ASIC, a SoC, an FPGA, a PLD, a dedicated digital circuit, a hardware accelerator or a non-integrated discrete device, which can run the necessary software or not rely on the software to execute the above method flow.

[0186] Optionally, an embodiment of the present application further provides a chip system, comprising: 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 instruction in the memory, the method in any of the above method embodiments is executed. In one possible implementation, the communication device also includes a memory. Optionally, the chip system can be composed of a chip, or can include a chip and other discrete devices, which is not specifically limited in the embodiment of the present application.

[0187] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware, or any combination thereof. When implemented using a software program, all or part of the embodiments may be implemented in the form of a computer program product. The 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 the present application are generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more media integrated therein. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a DVD), or a semiconductor medium (eg, a solid state disk (SSD)).

[0188] Although the present application is described herein in conjunction with various embodiments, in the process of implementing the claimed application, those skilled in the art can understand and implement other changes to the disclosed embodiments by reviewing the drawings, the disclosure, and the appended claims. In the claims, the word "comprising" does not exclude other components or steps, and "a" or "an" does not exclude multiple situations. A single processor or other unit can implement several functions listed in the claims. Certain measures are recorded in different dependent claims, but this does not mean that these measures cannot be combined to produce good results.

[0189] Although the present application has been described with reference to specific features and embodiments thereof, it is apparent that various modifications and combinations may be made thereto without departing from the spirit and scope of the present application. Accordingly, this specification and the drawings are merely illustrative of the present application as defined by the appended claims and are deemed to cover any and all modifications, variations, combinations or equivalents within the scope of the present application. Obviously, those skilled in the art may make various modifications and variations to the present application without departing from the spirit and scope of the present application. Thus, the present application is intended to include such modifications and variations as fall within the scope of the claims of the present application and their equivalents.

Claims

1. A message transmission method, characterized in that: The method comprises: The first communication device receives a message from the second communication device, wherein the message carries first information and sorting information, the first information being used to indicate a service connection corresponding to a service flow to which the message belongs, and the sorting information being used to indicate a sorting rule for the service flow to which the message belongs; The first communication device determines the ordering of multiple messages belonging to the same service connection according to the first information and the ordering information carried in the message.

2. The method according to claim 1, characterized in that The method further comprises: 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: a correspondence between an identifier of a first service node in the first communication device and an identifier of a second service node in the second communication device, a correspondence between an identifier of a first port in the first communication device and an identifier of a second port in the second communication device, or a 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.

3. The method according to claim 2, characterized in that The first communication device establishing a service connection with the second communication device includes: 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, according to the first information and the sorting information carried in the message, sorting conditions among multiple messages belonging to the same service connection, including: The first communication device determines, according to the context of the service connection and the first information, a service connection corresponding to the service flow to which the message belongs; Based on the sorting information included in the messages belonging to the same service connection, the first communication device determines the sorting status between the multiple messages belonging to the same service connection.

5. The method according to claim 4, characterized in that The first information includes an identifier of the first service node in the first communication device, and the context of the service connection includes 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; The first communication device determines, according to the context of the service connection and the first information, a service connection corresponding to the service flow to which the message belongs, including: determining, by the first communication device, an identifier of the second service node in the second communication device corresponding to the first information according to 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.

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

7. The method according to any one of claims 2 to 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, and the first identifier is used to indicate that the message is an out-of-order message; The first communication device determines, according to the first information and the sorting information carried in the message, sorting conditions among multiple messages belonging to the same service connection, including: The first communication device executes the message.

8. The method according to any one of claims 1 to 7, characterized in that The first communication device has the ability to sort the messages received via multiple paths.

9. The method according to claim 3, characterized in that 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 includes: In response to a first connection establishment request from the second communication device, the first communication device determines an 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 an 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, further comprising: The first communication device sends a second connection establishment request to the second communication device; the second connection establishment request includes an 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 an identifier of the second service node.

11. The method according to claim 10, characterized in that The first communication device sending a second connection establishment request to the second communication device includes: 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 of establishing the service connection, the first communication device sends the second connection establishment request to the second communication device.

12. The method according to any one of claims 1 to 11, characterized in that The sequencing information includes the sequence number of the message in the service flow to which it belongs, and / or the message type, and the message type includes strong sequence SO, weak sequence RO or no sequence NO.

13. A message transmission method, characterized in that: The method comprises: 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 rules of the service flow to which the message belongs.

14. The method according to claim 13, characterized in that The method further comprises: The second communication device establishes a service connection with the first 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: a correspondence between an identifier of a first service node in the first communication device and an identifier of a second service node in the second communication device, a correspondence between an identifier of a first port in the first communication device and an identifier of a second port in the second communication device, or a 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.

15. The method according to claim 14, characterized in that The second communication device establishing a service connection with the first communication device includes: 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.

16. The method according to claim 15, characterized in that 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 includes: The second communication device sends a first connection establishment request to the first communication device; the first connection establishment request includes an 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 an identifier of the first service node.

17. The method according to claim 16, characterized in that The second communication device sending a first connection establishment request to the first communication device includes: 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 of establishing the service connection, the second communication device sends the first connection establishment request to the first communication device.

18. The method according to claim 15, characterized in that 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 includes: In response to a second connection establishment request from the first communication device, the second communication device determines an 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 an identifier of the second service node.

19. The method according to any one of claims 13 to 18, characterized in that: The sequencing information includes the sequence number of the message in the service flow to which it belongs, and / or the message type, and the message type includes strong sequence SO, weak sequence RO or no sequence NO.

20. The method according to any one of claims 13 to 19, characterized in that: After the second communication device sends the message to the first communication device, the method further includes: In the case that the second communication device does not receive the first message from the first communication device, the second communication device resends the message; the first message is used by the first communication device to confirm receipt of the message.

21. A first communication device, characterized in that: The first communication device includes: a transceiver module and a processing module; The transceiver module is configured to receive a message from a second communication device, wherein the message carries first information and sorting information, the first information being used to identify a service connection corresponding to a service flow to which the message belongs, and the sorting information being used to indicate a sorting rule for the service flow to which the message belongs; The processing module is configured to determine, based on the first information and the sorting information carried in the message, a sorting condition among multiple messages belonging to the same service connection.

22. 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 rules of the service flow to which the message belongs.

23. A communication system, characterized in that: The communication system includes a first communication device for executing the method according to any one of claims 1 to 12, and a second communication device for executing the method according to any one of claims 13 to 20.

24. 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, so that the communication device executes the message transmission method described in any one of claims 1 to 12 above, or the communication device executes the message transmission method described in any one of claims 13 to 20 above.

25. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program or instruction. When the computer program or instruction is executed, the message transmission method according to any one of claims 1 to 12 is implemented, or the message transmission method according to any one of claims 13 to 20 is implemented.

Citation Information

Patent Citations

  • Message order-preserving processing method, order-preserving coprocessor and network equipment

    CN102204183A

  • Packet ordering method used in multi-core processor system

    CN102801635A

  • Service function chaining congestion tracking

    CN111801911A

  • Method, switch, and sites for data transmission

    CN112449751A

  • Data transmission method and device

    CN114189474A