A message transmission method and device
Patent Information
- Application Number
- CN202180099252.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-28
- Publication Date
- 2026-11-03
- Estimated Expiration
- 2041-12-28
AI Technical Summary
在超算集群场景下,现有多路径TCP协议中,每个TCP子流需要维护一套状态,导致发送端和接收端的软硬件资源开销较大,且每个TCP子流绑定单独的物理接口导致传输效率低。
By enabling multiple interfaces on the sending and receiving ends to work together, the sending and receiving interfaces can be flexibly selected, breaking the constraint of a single connection being bound to a physical interface, and realizing collaborative transmission and reception of multiple interfaces, thereby improving bandwidth.
It increases the communication bandwidth between the sending and receiving ends, reduces resource overhead, and improves transmission efficiency.
Smart Images

Figure CN117461289B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of chip technology, and in particular to a message transmission method and apparatus. Background Technology
[0002] As computing power demands increase, network bandwidth in computing clusters becomes particularly sensitive. In existing supercomputing cluster scenarios, a major cause of transaction processing latency is insufficient network bandwidth. Currently, to improve the processing performance of network devices, a common approach is to provide multiple physical interfaces and combine them with multipathing technology to increase communication bandwidth.
[0003] For example, the traditional Transmission Control Protocol (TCP) is based on binding with the Internet Protocol (IP) for connection. As the number of hosts with multiple network interface cards (NICs) increases, there are often multiple links to choose from when data is transmitted from one host to another. In this case, it becomes meaningful to utilize these multiple links for parallel transmission or to use them as backups. Currently, Multiple Path (MP) TCP adds a layer to the original TCP protocol: MultiPath TCP. The TCP stream output from a single user-layer interface (socket) can be split into multiple TCP sub-streams for communication. Each TCP sub-stream is transmitted through a separate path, similar to an independent TCP connection. Moreover, MPTCP is still essentially TCP; the receiving end needs to reassemble the received TCP sub-streams before processing.
[0004] However, for each TCP sub-stream, both the sending and receiving ends need to maintain a set of states for each sub-stream. For example, the sending and receiving ends need to perform a three-way handshake and a four-way handshake for each TCP sub-stream, which incurs significant hardware and software resource overhead for both the sending and receiving ends. Moreover, each TCP sub-stream needs to be bound to a separate physical interface for communication, and the bandwidth on the single path of each physical interface is still limited, resulting in low transmission efficiency. Summary of the Invention
[0005] This application provides a message transmission method and apparatus that can improve the bandwidth requirements of communication between the sending and receiving ends and increase transmission efficiency by enabling multiple interfaces at the sending end and the receiving end to work together collaboratively.
[0006] To achieve the above objectives, the embodiments of this application adopt the following technical solutions:
[0007] In a first aspect, a message transmission method is provided, comprising: when a sending end determines to send a first message, determining a first sending interface for sending the first message based on the load of multiple sending interfaces of the sending end, and determining a first receiving interface for receiving the first message based on the congestion information of multiple receiving interfaces of the receiving end; the sending end sends the first message through the first sending interface, the first message including an identifier of the first sending interface and an identifier of the first receiving interface.
[0008] In this application, the sending and receiving interfaces can be understood as the network ports of a device. The load on multiple sending interfaces can be, for example, the resource utilization rate of the sending interface or the packet loss rate. Congestion information on multiple receiving interfaces can be, for example, the resource utilization rate of the receiving interface or the packet loss rate.
[0009] In this application, the resource utilization rate of each sending interface is, for example, the queue length of the message processing of the sending interface. The queue length of the message processing of the sending interface can be understood as the number of messages currently being processed in the sending queue of the sending interface, which is the queue of messages to be sent;
[0010] The resource utilization rate of each receiving interface is, for example, the length of the message processing queue of the receiving interface. The message processing queue length of the receiving interface can be understood as the number of messages currently being processed in the receiving queue of the receiving interface, which is the queue of received messages to be processed.
[0011] Therefore, in this application, the sending end does not need to bind the same stream or connection to an interface, including not binding the same stream or connection to a specific sending interface of the sending end, nor binding the same stream or connection to a specific receiving interface of the receiving end. In this application, during multiple message transmissions of a stream or a single connection, the sending interface used by the sending end to send messages may be different each time, and the receiving interface used by the receiving end to receive messages may also be different each time. Which sending interface and which receiving interface a specific message in a stream or a single connection is sent and received through depends on the load status of multiple sending interfaces and the congestion information of multiple receiving interfaces. Thus, for both the sending and receiving ends, the message rate at which the sending end sends messages can be understood as the sum of the message rates of multiple sending interfaces, and the message rate at which the receiving end receives messages can be understood as the sum of the message rates of multiple receiving interfaces. For the sending end, this application can give the sending end the ability to flexibly select the sending and receiving interfaces for messages, fully utilizing the multi-interface collaboration between the sending and receiving ends to improve bandwidth.
[0012] In one possible design, the method further includes: the sending end receiving congestion information from multiple receiving interfaces sent by the receiving end, wherein the multiple receiving interfaces include a first receiving interface. That is, the sending end can determine the receiving interface through which the receiving end receives each packet when it is sent to the receiving end. In other words, the receiving interface is flexibly determined by the sending end based on the congestion information of multiple receiving interfaces, enabling multi-interface collaboration at the receiving end and improving the receiving end's bandwidth.
[0013] In one possible design, the method further includes: when the sending end determines that sending the first message has failed, determining the second receiving interface for the receiving end to receive the first retransmission message based on the congestion information of multiple receiving interfaces, wherein the first retransmission message is a duplicate of the first message; the sending end sends the first retransmission message through the first sending interface, wherein the first retransmission message includes the identifier of the first sending interface, the identifier of the second receiving interface, and a duplicate message marker.
[0014] In other words, when the sender transmits the original message and the retransmission message of the same packet, the receiving interface for receiving the original message and the receiving interface for receiving the retransmission message may be different, depending on the congestion information of the receiving interface. Similarly, the sending interface for the sender to transmit the original message and the sending interface for the retransmission message of the same packet may also be different.
[0015] In one possible design, when the first retransmission message arrives at the receiving end later than the first message, the method further includes: the sending end receiving a first response message of the first message through a second sending interface, the first response message including the identifier of the first sending interface; when the second sending interface is different from the first sending interface, the sending end controls the second sending interface to send the first response message to the first sending interface; the sending end controls the first sending interface to send a first notification message to the first receiving interface, the first notification message being used to instruct the first receiving interface to release the context information of the first message.
[0016] In other words, for the sending end, if the sending interface that sends the first message and the sending interface that receives the first response message are different, the sending interface that receives the first response message also needs to forward the first response message to the sending interface that sends the first message, i.e., the first sending interface, so that the first sending interface can instruct the first receiving interface to release the context information of the first message.
[0017] In one possible design, when the first message arrives at the receiving end later than the first retransmission message, the method further includes: the sending end receiving a first retransmission response message of the first retransmission message through a third sending interface, the first retransmission response message including the identifier of the first sending interface; when the third sending interface is different from the first sending interface, the sending end controls the third sending interface to send the first retransmission response message to the first sending interface; the sending end controls the first sending interface to send a second notification message to the second receiving interface, the second notification message being used to instruct the second receiving interface to release the context information of the first retransmission message.
[0018] In other words, for the sending end, if the sending interface that sends the first retransmission message and the sending interface that receives the first retransmission response message are different, the sending interface that receives the first retransmission response message also needs to forward the first retransmission response message to the sending interface that sends the first retransmission message, i.e., the first sending interface, so that the first sending interface can instruct the second receiving interface to release the context information of the first retransmission message.
[0019] Secondly, a message transmission method is provided, the method comprising: a receiving end sending congestion information of multiple receiving interfaces to a sending end, the congestion information of multiple receiving interfaces being used by the sending end to determine the first receiving interface through which the receiving end receives the first message; the receiving end receiving the first message through the first receiving interface, the first message including an identifier of the first sending interface through which the sending end sends the first message and an identifier of the first receiving interface.
[0020] Therefore, in this application, for the receiving end, during multiple message transmissions, the receiving interface for each message reception may be different. The sending end can determine which receiving interface should receive the message based on the congestion information of multiple receiving interfaces. In this way, the multiple receiving interfaces of the receiving end can work together, and the message rate of the receiving end can be understood as the sum of the message rates of multiple receiving interfaces, thereby improving the efficiency of the receiving end's bandwidth in receiving messages.
[0021] In one possible design, the method further includes: when the receiving end determines that it has received the first message from the first receiving interface, determining whether other receiving interfaces besides the first receiving interface have received duplicate messages of the first message; when the receiving end determines that none of the other receiving interfaces have received duplicate messages of the first message, the receiving end controls the first receiving interface to process the first message; when the receiving end determines that at least one of the other receiving interfaces has received duplicate messages of the first message, the receiving end controls the first receiving interface to discard the first message.
[0022] This is because multiple receiving interfaces at the receiving end can potentially receive both the original and retransmitted packets of the same message. When multiple different receiving interfaces receive duplicate packets of the same message, to prevent the same message from being processed repeatedly on different receiving interfaces, when a first receiving interface receives the first message, it must first determine whether other receiving interfaces have already received duplicate packets of the first message. If none of the other receiving interfaces have received it, the first receiving interface can process the first message. However, if any of the other receiving interfaces has already received a duplicate packet of the first message, meaning it has already registered the first message, the first receiving interface cannot process the first message to avoid duplicate processing.
[0023] In one possible design, when the first message is the original message:
[0024] Determining whether multiple receiving interfaces other than the first receiving interface have received a duplicate message of the first packet includes: the receiving end determining whether the first receiving interface has received a first registration request from another receiving interface, the first registration request being used to request processing of the first retransmitted message, the first retransmitted message being a retransmission of the first packet; the receiving end determining that none of the other receiving interfaces have received a duplicate message of the first packet includes: the receiving end determining that the first receiving interface has not received a first registration request sent by another receiving interface; the receiving end determining that at least one of the other receiving interfaces has received a duplicate message of the first packet includes: the receiving end determining that the first receiving interface has received a first registration request sent by at least one of the other receiving interfaces. Similar to the previous possible design, if a first receiving interface needs to process the first packet, which is the original packet, the first receiving interface needs to determine whether to receive a first registration request for the first retransmitted message. If a first registration request has been received, the first packet arrived later than the first retransmitted message; if no first registration request has been received, the first packet is considered to have arrived first, and the first receiving interface can process the first packet.
[0025] In one possible design, the method further includes: when the receiving end determines that after the first receiving interface receives the first message, it receives a first registration request from the second receiving interface among other receiving interfaces, the receiving end controls the first receiving interface to send a first registration response to the second receiving interface. The first registration response is used to indicate that the second receiving interface's registration has failed. That is, if the first receiving interface is processing the first message and receives a first registration request from the second receiving interface for the first retransmitted message, in order to prevent the message from being processed repeatedly, the first receiving interface needs to indicate that the second receiving interface's registration has failed, thus avoiding the same message being processed repeatedly.
[0026] In one possible design, when the first message is a retransmission message: determining whether multiple receiving interfaces other than the first receiving interface have received the retransmission message of the first message includes: the receiving end controlling the first receiving interface to send a first registration request to each of the other receiving interfaces, the first registration request being used to request processing of the first message; the receiving end determining that the other receiving interfaces have not received the retransmission message of the first message includes: the receiving end determining that the first receiving interface has received multiple registration responses sent by the other receiving interfaces, the multiple registration responses all indicating that the first receiving interface has registered successfully; the receiving end determining that at least one of the other receiving interfaces has received the retransmission message of the first message includes: the receiving end determining that the first receiving interface has received a registration response sent by one of the other receiving interfaces indicating that the first receiving interface's registration has failed.
[0027] In other words, if the first message is a retransmitted message, the first receiving interface is unsure whether it is a duplicate message that arrived later than the original message. The first receiving interface needs to request permission from other receiving interfaces to process the first message. If each registration response indicates that the first receiving interface can process the first message, then the first receiving interface will process the first message. If a registration response indicates that the first receiving interface failed to register, it means that the first message received by the first receiving interface arrived later than the original message, and the first receiving interface cannot process that first message.
[0028] In one possible design, the method further includes: after the receiving end determines that a second receiving interface among other receiving interfaces has received a first registration request, and then receives the original message of the first packet, the receiving end controls the second receiving interface to discard the original message of the first packet. That is, if the second receiving interface has already received a first registration request requesting processing of the same message as the first packet, it indicates that another receiving interface has already received the same message before the second receiving interface. When the second receiving interface receives the original message of the first packet again, the second receiving interface no longer has the authority to process the original message of the first packet, thus avoiding the duplicate processing of the same message on different receiving interfaces.
[0029] In one possible design, when the first message is a retransmission message: After the receiving end determines that the first receiving interface has received the first message, it also receives a first registration request from the second receiving interface. This first registration request requests processing of duplicate messages of the first message. If the number of the first receiving interface is less than the number of the second receiving interface, the receiving end controls the first receiving interface to reject the first registration request. This possible design needs to be implemented simultaneously with the next possible design, as detailed in the description of the following possible design.
[0030] In one possible design, when the first message is a retransmission message: After the receiving end determines that the first receiving interface receives the first message, if the number of the first receiving interface is not the smallest number among all the receiving interfaces of the receiving end, the receiving end controls the first receiving interface to collect multiple registration responses from all other receiving interfaces regarding the first message; the receiving end controls the first receiving interface to send the first registration response from the multiple registration responses to the receiving interface with a number smaller than the number of the first receiving interface, and the first registration response is used to indicate that the second receiving interface has successfully registered the duplicate message of the first message.
[0031] When implemented in conjunction with the previous possible design, in other words, when multiple receiving interfaces receive multiple duplicate packets of the same message, if one receiving interface has already received a retransmission packet, the receiving interface with the smaller ID can directly reject the registration request of the receiving interface with the larger ID for the same retransmission packet. Simultaneously, if one receiving interface has already received a retransmission packet, the receiving interface with the larger ID needs to determine the registration status of all other receiving interfaces for that retransmission packet. Furthermore, the receiving interface with the larger ID needs to record the received valid registration results, such as one receiving interface registering successfully, some receiving interfaces registering successfully but not receiving the duplicate packet, and some receiving interfaces failing to register. This allows the receiving interface with the smaller ID to determine the receiving interface that should handle the duplicate packet, thus avoiding the situation where multiple receiving interfaces process the same message repeatedly when receiving multiple duplicate packets.
[0032] Thirdly, a communication device is provided, comprising: a processor, configured to determine, when sending a first message, a first sending interface for sending the first message based on the load of multiple sending interfaces of a sending end, and a first receiving interface for receiving the first message based on congestion information of multiple receiving interfaces of a receiving end; and a transceiver, including a first sending interface for sending the first message, the first message including an identifier of the first sending interface and an identifier of the first receiving interface.
[0033] In one possible design, the transceiver is also used to: receive congestion information from multiple receiving interfaces sent by the receiving end, the multiple receiving interfaces including a first receiving interface.
[0034] In one possible design, the processor is further configured to: when it is determined that sending the first message has failed, determine the second receiving interface for receiving the first retransmission message based on the congestion information of multiple receiving interfaces, wherein the first retransmission message is a duplicate of the first message; and the first sending interface is further configured to send the first retransmission message, wherein the first retransmission message includes the identifier of the first sending interface, the identifier of the second receiving interface, and a duplicate message marker.
[0035] In one possible design, when the first retransmission message arrives at the receiving end later than the first message, the transceiver also includes a second transmitting interface. The second transmitting interface is also used to receive a first response message of the first message, the first response message including the identifier of the first transmitting interface. When the second transmitting interface is different from the first transmitting interface, the second transmitting interface is also used to send a first response message to the first transmitting interface. The first transmitting interface is also used to send a first notification message to the first receiving interface, the first notification message being used to instruct the first receiving interface to release the context information of the first message.
[0036] In one possible design, when the first message arrives at the receiving end later than the first retransmission message, the transceiver also includes a third transmitting interface. The third transmitting interface is used to receive the first retransmission response message of the first retransmission message, and the first retransmission response message includes the identifier of the first transmitting interface. If the third transmitting interface is different from the first transmitting interface, the third transmitting interface is also used to send the first retransmission response message to the first transmitting interface. The first transmitting interface is also used to send a second notification message to the second receiving interface, and the second notification message is used to instruct the second receiving interface to release the context information of the first retransmission message.
[0037] Fourthly, a communication device is provided, comprising: a transceiver, configured to send congestion information of multiple receiving interfaces to a sending end, wherein the congestion information of multiple receiving interfaces is used by the sending end to determine the first receiving interface of the receiving end to receive a first message; the transceiver includes a first receiving interface, the first receiving interface being configured to receive a first message, the first message including an identifier of the first sending interface of the sending end sending the first message and an identifier of the first receiving interface.
[0038] In one possible design, a processor is also included, configured to: determine whether, when a first message is received from a first receiving interface, other receiving interfaces besides the first receiving interface have received duplicate messages of the first message; control the first receiving interface to process the first message when it is determined that none of the other receiving interfaces have received duplicate messages of the first message; and control the first receiving interface to discard the first message when it is determined that at least one of the other receiving interfaces has received duplicate messages of the first message.
[0039] In one possible design, when the first message is the original message: the first receiving interface is used to determine whether it has received a first registration request from another receiving interface, the first registration request being used to request processing of the first retransmitted message, the first retransmitted message being a retransmission of the first message; if it is determined that the first receiving interface has not received a first registration request from another receiving interface, the first receiving interface is used to process the first message; or, if it is determined that the first receiving interface has received a first registration request from at least one of the other receiving interfaces, the first receiving interface is used to discard the first message.
[0040] In one possible design, after receiving the first message, when the first receiving interface receives a first registration request from the second receiving interface among other receiving interfaces, the first receiving interface is also used to send a first registration response to the second receiving interface, which is used to indicate that the second receiving interface has failed to register.
[0041] In one possible design, when the first message is a retransmission message: the first receiving interface is used to send a first registration request to each of the other receiving interfaces, the first registration request being used to request processing of the first message; determine that the first receiving interface has received multiple registration responses sent by the other receiving interfaces, all of which indicate that the first receiving interface has successfully registered, and process the first message; determine that the first receiving interface has received a registration response sent by one of the other receiving interfaces indicating that the first receiving interface has failed to register, and control the first receiving interface to discard the first message.
[0042] In one possible design, after the second receiving interface of the other receiving interfaces has received a first registration request, it also receives the original message of the first message. The second receiving interface is used to discard the original message of the first message.
[0043] In one possible design, when the first message is a retransmission message: after receiving the first message, the first receiving interface also receives a first registration request sent by the second receiving interface. The first registration request is used to request processing of the retransmission of the first message. If the number of the first receiving interface is less than the number of the second receiving interface, the first receiving interface is used to reject the first registration request.
[0044] In one possible design, when the first message is a retransmission message: after receiving the first message, if the number of the first receiving interface is not the smallest number among all the receiving interfaces of the receiving end, the first receiving interface is used to collect multiple registration responses from all other receiving interfaces regarding the first message; the first receiving interface is also used to send the first registration response from the multiple registration responses to the receiving interfaces whose numbers are smaller than the number of the first receiving interface, and the first registration response is used to indicate that the second receiving interface has successfully registered the retransmission of the first message.
[0045] Fifthly, a communication device is provided, comprising at least one processor, a plurality of transmitting interfaces and a plurality of receiving interfaces, wherein the at least one processor is connected to a memory, the plurality of transmitting interfaces and the plurality of receiving interfaces via a system bus, and the at least one processor is configured to read and execute a program stored in the memory, the program being operable on the plurality of transmitting interfaces and the plurality of receiving interfaces to cause the device to perform the method as described in the first aspect or any of the first aspects above.
[0046] In a sixth aspect, a chip coupled to a memory is provided, the chip including a plurality of pins coupled to a transmitting interface and a plurality of receiving interfaces, the chip being used to read and execute program instructions stored in the memory to implement the method as described in the first aspect or any of the first aspects above.
[0047] A seventh aspect provides an electronic device including a plurality of transmitting interfaces, a plurality of receiving interfaces, one or more processors, and one or more memories. The one or more memories are coupled to the one or more processors, and the one or more memories are used to store computer program code, including computer instructions, which, when executed by the one or more processors, cause the electronic device to perform the message transmission method of any of the above aspects and any possible implementations.
[0048] Eighthly, embodiments of this application provide a computer-readable storage medium including computer instructions that, when executed on an electronic device, cause the electronic device to perform the message transmission method in any of the above aspects and any possible implementations.
[0049] Ninthly, embodiments of this application provide a computer program product that, when run on a computer or processor, causes the computer or processor to execute the message transmission method in any of the above aspects and any possible implementations.
[0050] Tenthly, embodiments of this application provide a system that may include a sender and a receiver as described in any of the possible implementations of any of the foregoing aspects. The sender and receiver may execute the message transmission method described in any of the foregoing aspects and any of the possible implementations.
[0051] It is understood that any of the transmitters, receivers, chip systems, computer-readable storage media, or computer program products provided above can be applied to the corresponding methods provided above. Therefore, the beneficial effects they can achieve can be referred to the beneficial effects in the corresponding methods, and will not be repeated here.
[0052] These or other aspects of this application will become more readily apparent in the following description. Attached Figure Description
[0053] Figure 1 This application provides a schematic diagram of a TCP sub-stream processing architecture in MPTCP technology.
[0054] Figure 2 This is a schematic diagram of a bandwidth aggregation architecture in RDMA bonding provided in an embodiment of this application;
[0055] Figure 3This is a schematic diagram of a multipath transmission technology architecture provided in an embodiment of this application;
[0056] Figure 4 A schematic diagram of a multi-interface collaborative architecture in a multi-path transmission technology provided in this application embodiment;
[0057] Figure 5 This application provides a schematic diagram of a network hardware interface structure in a network device.
[0058] Figure 6 A schematic diagram of an architecture for sending end to perform message splitting and interface scheduling, provided for an embodiment of this application;
[0059] Figure 7 A schematic diagram of an architecture for receiving end to perform message splitting and interface scheduling, provided for an embodiment of this application;
[0060] Figure 8 This is a schematic flowchart of a message transmission method provided in an embodiment of this application;
[0061] Figure 9 This is a schematic flowchart of a message transmission method provided in an embodiment of this application;
[0062] Figure 10 This is a schematic diagram of signal interaction in a message transmission method provided in an embodiment of this application;
[0063] Figure 11 This is a schematic diagram of signal interaction in a message transmission method provided in an embodiment of this application;
[0064] Figure 12 This is a schematic diagram of signal interaction in a message transmission method provided in an embodiment of this application;
[0065] Figure 13 This is a schematic diagram of signal interaction in a message transmission method provided in an embodiment of this application;
[0066] Figure 14 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application;
[0067] Figure 15 This is a schematic diagram of the structure of a communication device provided in an embodiment of this application;
[0068] Figure 16 This is a schematic diagram of the structure of a communication device provided in an embodiment of this application. Detailed Implementation
[0069] For ease of understanding, the examples provide explanations of some concepts related to the embodiments of this application for reference. As shown below:
[0070] MPTCP: When establishing a TCP connection, it has always been possible to bind to only one IP address. However, as the number of hosts with multiple network cards increases, data often has multiple links to reach from one host to another. The purpose is to allow TCP connections to use multiple paths to maximize the use of channel resources.
[0071] Remote Direct Memory Access (RDMA) was developed to address the latency issues in server-side data processing during network transmissions. RDMA directly transfers data over the network to the computer's memory, quickly moving data from one system to a remote system's memory without affecting the operating system. This requires minimal computer processing power and eliminates the overhead of external memory copying and context switching, thus freeing up memory bandwidth and Central Processing Unit (CPU) cycles to improve application performance.
[0072] Queue Pair (QP): A virtual interface between hardware and software. A QP is a queue structure that stores tasks issued by the software to the hardware in sequence. Each task contains the source and length of the data to be retrieved, as well as the destination of the data to be sent.
[0073] Host Channel Adapter (HCA): Applicable to enterprise data centers, high-performance computing, and embedded environments, providing a high-bandwidth, low-latency solution for server / storage cluster applications. In clustered databases, parallel applications, processing services, and high-performance embedded input / output (I / O) applications, this HCA card maximizes application performance, shortens operation cycles, and reduces resource consumption.
[0074] InfiniBand (IB): A computer network communication standard used for high-performance computing. It features extremely high throughput and extremely low latency, and is used for data interconnection between computers. InfiniBand is also used for direct or switched interconnection between servers and storage systems, as well as interconnection between storage systems.
[0075] The technical solutions of the embodiments of this application will be described below with reference to the accompanying drawings. In the description of the embodiments of this application, unless otherwise stated, " / " means "or," for example, A / B can mean A or B; "and / or" in this text is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Furthermore, in the description of the embodiments of this application, "multiple" refers to two or more than two.
[0076] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this embodiment, unless otherwise stated, "a plurality of" means two or more.
[0077] Currently, a common approach to improving the processing performance of network devices is to provide multiple physical interfaces and combine them with multipath transmission technology to increase communication bandwidth.
[0078] In MPTCP, a multipathing technology, such as Figure 1 As shown in (a), the original TCP protocol includes the Internet Protocol (IP) layer, the TCP layer, and the application layer. After adding an MPTCP layer, the TCP protocol can be... Figure 1 As shown in (b), the TCP stream of a single socket at the user layer can be split into multiple TCP subflows at the MPTCP layer. Each TCP subflow is transmitted through a separate path, and each TCP subflow corresponds to a TCP connection. At the receiving end, the received multiple TCP subflows need to be reassembled before processing.
[0079] However, both the sending and receiving ends need to maintain a set of states for each TCP sub-stream. That is, each TCP sub-stream must go through a three-way handshake and a four-way handshake between the sending and receiving ends before it is transmitted. For the sending and receiving ends, the hardware and software resource overhead is relatively large.
[0080] Specifically, TCP resides at the transport layer and its role is to provide reliable byte stream service. To ensure accurate data delivery to its destination, the TCP protocol employs a three-way handshake strategy. The three-way handshake strategy includes: 1) The sending end first sends a data packet with the synchronize (SYN) flag to the receiving end. 2) After receiving the data, the receiving end sends back a data packet with the SYN / acknowledgement (ACK) flag to the sending end, acknowledging that the data packet has been received. 3) The sending end then sends back a data packet with the ACK flag to the receiving end, indicating that the sending end has received the acknowledgment, and the three-way handshake ends.
[0081] Because TCP connections are full-duplex, each direction must be closed separately. The principle is that once one side has completed its data transmission task, it can send a FIN (FinNet) to terminate the connection in that direction. However, receiving a FIN only means that there is no more data flow in that direction; a TCP connection can still send data after receiving a FIN. The side that initiates the close (the active side) performs an active close, while the other side (the passive side) performs a passive close. When the passive side receives a FIN packet from the active side, it only indicates that the active side has no more data to send to the passive side. This process can be called a four-way handshake, specifically including: 1) The active side sends a FIN to the passive side to indicate that it wants to close data transmission from the active side to the passive side. 2) The passive side receives the FIN and sends an ACK to the active side. 3) The passive side closes the connection with the active side and sends a FIN to the active side. 4) After receiving the FIN in 3), the active side sends an ACK back to the passive side, indicating that it has received the FIN in 3).
[0082] Therefore, maintaining a connection-level state for each TCP sub-stream, including states for the three-way handshake and four-way handshake, incurs significant resource overhead. Furthermore, during transmission, both the sending and receiving ends must bind a physical interface to each TCP sub-stream. This interface binding can easily lead to traffic congestion and limit the processing bandwidth of the device.
[0083] In another multipath technique, RDMA bonding, the RDMA resources in a single transmitter or receiver can be aggregated into a single logical resource, achieving bandwidth aggregation. For example... Figure 2 As shown, in the sending or receiving end, when the user's application layer needs to transmit data, RDMA HAL (hardware abstraction layer) and services can provide the application with APIs to call HCA. Figure 2 The diagram shows InfiniBand (IB) HCA and RDMA over Converged Ethernet (RoCE) HCA. RDMA bonding can pool multiple RDMA resources by binding one of these two HCAs to mask the hardware differences between them, allowing users to be unaware of the RDMA device differences. RDMA HAL and services can allocate the QP (Queries) that an application needs to process to a specific HCA according to certain rules. Specifically, the binding HAC driver can drive the RDMA HAL and services to process the HAC assigned to the QP.
[0084] It's understandable that RDMA bonding allows for the selection of HCAs based on QPs to establish communication connections. However, this also introduces additional hardware and software overhead related to scheduling and hardware shielding, similar to the interface binding technique in MPTCP. Furthermore, it also presents the problem of traffic congestion at a particular HCA, limiting the device's processing bandwidth.
[0085] Therefore, it can be seen that current multipath transmission technology is essentially still a method of data transmission by binding a single connection to a physical interface. For example... Figure 3 As shown, for the sending end, if it is determined that connection 1 transmits data through physical interface 0, the sending end can only send data through physical interface 1. Similarly, data for connection 2 can only be sent through physical interface 1. The multiple physical interfaces of the sending end do not work in coordination. For the receiving end, it is also bound to a fixed physical port to receive data from a single connection.
[0086] In response, this application provides a message transmission method, whereby the message can be understood as the data mentioned above. This method breaks the current constraint that a connection must be bound to a single physical interface, allowing multiple physical interfaces on the device to simultaneously transmit data for a single connection, thus improving message processing efficiency.
[0087] Specifically, in the multipath transmission of this application, a sending mechanism for the same communication stream (one connection) is proposed, in which message sending is not bound to the physical interface of the sending end, and a receiving mechanism for the same communication stream is proposed, in which message receiving is not bound to the physical interface of the receiving end.
[0088] like Figure 4As shown, for example, in a single connection at the sending end, each of the multiple messages to be sent in that connection may be sent through different physical interfaces. For instance, message 1 in that connection might be sent through physical interface 0, and message 2 through physical interface 1. Assuming the sending end has three physical interfaces, a single connection can send data through all three physical interfaces, reaching a maximum message rate equal to the sum of all interfaces. Similarly, at the receiving end, the interface for receiving each message may also be different.
[0089] This multi-interface collaborative multipath transmission method can be applied to various scenarios, such as multiple nodes in a data center. In this case, the sending end can be a compute node, and the receiving end can be a storage node, or vice versa. It can also be applied to multiple compute nodes in a high-performance computing (HPC) cluster. Of course, it can be applied to other scenarios as well, and this application does not limit its application.
[0090] This application can be applied to network devices, which can be either transmitters or receivers, and both can be used in the scenarios described above. Data transmission between the transmitter and receiver can be multipath transmission. Since the network device can act as both a transmitter and a receiver, therefore, as... Figure 4 As shown, the network device includes multiple sending interfaces and multiple receiving interfaces. This is equivalent to the sending end having multiple sending interfaces and multiple receiving interfaces, and the receiving end also having multiple receiving interfaces and multiple sending interfaces. During the process of the sending end sending a message to the receiving end, the sending interfaces of the sending end can be used to send the message, and the multiple receiving interfaces can be used to receive the message response. Similarly, the receiving interfaces of the receiving end can be used to receive the message, and the sending interfaces of the receiving end can be used to send the message response.
[0091] In some embodiments, the sending interface and receiving interface of this application can be understood as the network hardware interface of a network device.
[0092] Specifically, a network device may include an Application-Specific Integrated Circuit (ASIC) and memory. The memory can be used to store data. The ASIC may include a processor, other components, and a network hardware interface. All components within the ASIC can transfer data via a system bus. The processor can be used to run an operating system and software protocol stack, etc. Other components can be used to cooperate with the processor to complete various functions. This application can improve the network hardware interface in the ASIC.
[0093] like Figure 5As shown, the network hardware interface includes a transport layer controller and multiple transmit interfaces (such as...). Figure 5 The diagram shows transmit interface 1, transmit interface 2, and transmit interface 3) and multiple receive interfaces (such as...). Figure 5 The diagram shows receiving interfaces 1, 2, and 3. The sending interfaces can send messages to other external devices via the switch, and the receiving interfaces can receive messages from other external devices via the switch. The transport layer controller includes a congestion control module, a reliable transmission module, and a task scheduling module.
[0094] The reliable transmission module, when the network device acts as the sender, determines whether the sender needs to retransmit the message based on the message response received by the receiving interface. Furthermore, since the multiple receiving interfaces in this application can work collaboratively, when the network device acts as the receiver, the reliable transmission module also cooperates with the multiple receiving interfaces to perform message deduplication, ensuring that the same message can only be processed no more than once, as will be described in detail later.
[0095] When the network device acts as the sender:
[0096] The congestion control module works in conjunction with the task scheduling module to enable flexible selection of sending and receiving interfaces in multipath transmission.
[0097] The task scheduling module is used to edit the messages to be sent and select the sending and receiving interfaces based on the sending interface determined by the congestion control module.
[0098] The sending interface is used to send messages according to the instructions of the task scheduling module.
[0099] When the network device acts as the receiving end:
[0100] The receiving interface is used to receive messages. A multi-interface message registration mechanism can be used to enable collaborative processing across multiple interfaces, ensuring that the same message is not processed repeatedly. In other words, this message registration mechanism is used to prevent messages from being processed duplicately.
[0101] In some embodiments, in the multi-interface coordination mechanism at the sending end, the task scheduling module can communicate with all sending interfaces, and the sending interfaces are all decoupled, with each sending interface maintaining its own sending-side context. This sending-side context may include message sequence numbers and connection states, etc. The sending interface can also feed back its own interface congestion information, received congestion information from the receiving end, the load status (packet reception status) of the sending interface, and fault information of the sending interface to the task scheduling module.
[0102] The task scheduling module is used to schedule the splitting of messages and determine the sending interface for messages based on the load status of multiple sending interfaces. For example... Figure 6 As shown, if the message in this application is considered as a message 1, the transport layer at the sending end can split message 1 into sub-message 1, sub-message 2, and sub-message 3, while message 2 is not split. When the task scheduling module receives these three sub-messages and message 2 from the transport layer, assuming there are three sending interfaces at the multiple sending ends, the task scheduling module can schedule sub-message 1 to sending interface 1, sub-message 2 and sub-message 3 to sending interface 2, and message 2 to sending interface 3, based on the load status of the three sending interfaces. Accordingly, sending interface 1 can store the context of sub-message 1, sending interface 2 can store the context of sub-message 2 and sub-message 3, and sending interface 3 can store the context of message 2.
[0103] In this application, a message can be understood as a sub-message or a message that has not been split. For retransmitted messages, the sending interface also needs to add a retransmission flag to the message so that the receiving end can identify the retransmitted message.
[0104] In some embodiments, in the multi-interface coordination mechanism at the receiving end, considering packet drop and retransmission caused by network congestion, in a reliable transmission scenario, packets can enter from any receiving interface at the receiving end. When a packet is retransmitted multiple times, it is necessary to ensure that the same packet is processed at most once at the receiving end. In this application, when duplicate packets are identified, a registration mechanism for retransmitted packets is introduced, and receiving interfaces can access each other, thus preventing packets from being processed repeatedly on different receiving interfaces.
[0105] Specifically, when a receiving interface receives a retransmitted message, it needs to query and register the retransmitted message processing permissions with all other receiving interfaces on the receiving end. If at least one receiving interface has processed either the original or the retransmitted message, it can be determined that the retransmitted message received by that interface is a duplicate. The receiving interface that initiated the query can only process the message, such as discarding it, after all other receiving interfaces have completed their confirmation.
[0106] For non-duplicate messages, each receiving interface processes them independently, and the execution order of transactions can be controlled by the transaction execution order management module. Here, a transaction can be understood as a message, and the aforementioned transport layer controller may include the transaction execution order management module. For example... Figure 7 As shown, when receiving interface 1 in the receiving end receives sub-message 1 of message 1, receiving interface 2 receives sub-messages 2 and 3 of message 1, and receiving interface 3 receives message 2, receiving interface 1 can establish the context of sub-message 1, receiving interface 2 can establish the context of sub-messages 2 and 3, and receiving interface 3 can establish the context of message 2. When the transaction execution sequence management module receives multiple sub-messages transmitted from each receiving interface, it can further process the multiple sub-messages according to their message sequence numbers.
[0107] Based on the above description of the sending and receiving ends of this application, the following section further describes the implementation methods of message transmission in the sending and receiving ends of this application.
[0108] Before introducing some implementation methods of this application, it should be noted that in this application, the sending interface of the sending end can not only be used to send messages, but also to receive response messages from the peer end. The resources for the sending interface of the sending end to receive response messages are different from the resources for the receiving interface of the sending end to receive messages directly sent from the peer end. In other words, although the network cable for the sending interface of the sending end to receive response messages and the network cable for the receiving interface of the sending end to receive messages directly sent from the peer end are physically the same, the virtual channel for the sending interface of the sending end to receive response messages and the virtual channel for the receiving interface of the sending end to receive messages directly sent from the peer end are independent of each other and do not affect each other.
[0109] Similarly, the receiving interface of the receiving end can not only be used to receive messages, but also to send response messages to the other end. The resources for sending response messages on the receiving interface of the receiving end are different from the resources for sending messages directly on the receiving interface of the receiving end. In other words, although the network cable for sending response messages on the receiving interface of the receiving end and the network cable for sending messages directly on the receiving interface of the receiving end are physically the same, the virtual channel for sending response messages on the receiving interface of the receiving end and the virtual channel for sending messages directly to the other end on the receiving interface of the receiving end are independent of each other and do not affect each other.
[0110] Example 1
[0111] For the sending end, this application provides a message transmission method, such as... Figure 8 As shown, the method includes the following processing flow.
[0112] 801. When the sending end determines to send the first message, it determines the first sending interface for sending the first message based on the load of the multiple sending interfaces of the sending end, and determines the first sending interface for receiving the first message based on the congestion information of the multiple receiving interfaces of the receiving end.
[0113] The first message can be either the message or a sub-message mentioned above.
[0114] In some embodiments, the sending end receives congestion information from multiple receiving interfaces sent by the receiving end, the multiple receiving interfaces including a first receiving interface. For example, the congestion information may be an indication of the packet loss rate of the receiving interface, or an indication of the message queue length, etc., which is not limited in this application.
[0115] In this way, the sending end can determine the first sending interface for sending the first message based on the load status of the multiple sending interfaces of the sending end, and can also determine the first receiving interface for receiving the first message based on the congestion information of the multiple receiving interfaces.
[0116] In some embodiments, the congestion control module in the sending end can determine the first receiving interface from multiple receiving interfaces according to a preset algorithm. This application does not limit the implementation of the algorithm. Each sending interface in the sending end can send its own load status to the task scheduling module, which can determine the first sending interface from multiple sending interfaces based on the load status. The method of determining the first sending interface based on the load status is also not limited; for example, the load status can be an indication of the current packet queue length of each sending interface, or an indication of the packet loss rate, etc. This application does not impose any limitations. The task scheduling module then specifies the first sending interface to send the first packet.
[0117] 802. The sending end sends a first message through the first sending interface. The first message includes the identifier of the first sending interface and the identifier of the first receiving interface.
[0118] When the sending end sends the first message through the first sending interface, it can add a field to the first message to record the identifiers of the first sending interface and the first receiving interface.
[0119] Therefore, this application can give the sending end the ability to flexibly select the sending interface and receiving interface of the message, and can make full use of the sending end and receiving end to carry out multi-interface collaboration and improve bandwidth.
[0120] Example 2
[0121] For the receiving end, this application provides a message transmission method, such as... Figure 9 As shown, the method includes the following processing flow.
[0122] 901. The receiving end sends congestion information of multiple receiving interfaces to the sending end. The congestion information of multiple receiving interfaces is used by the sending end to determine the first receiving interface for the receiving end to receive the first message.
[0123] For congestion information, please refer to the description in step 801.
[0124] Once the sending end determines the first receiving interface for sending the first message, in reliable transmission, the sending end can send indication information of the first receiving interface for receiving the first message to the receiving end through control plane messages, so that the receiving end can receive the first message on the first receiving interface.
[0125] 902. The receiving end receives the first message through the first receiving interface. The first message includes the identifier of the first sending interface and the identifier of the first receiving interface of the sending end.
[0126] For the receiving end, the first message can be received through the first receiving interface. Similarly, when the sending end determines that the receiving interface for receiving the second message is the second receiving interface, the receiving end can receive the second message through the second receiving interface.
[0127] In this way, the receiving end can also flexibly select the receiving interface for receiving messages, making full use of the collaboration of multiple interfaces at the receiving end to improve bandwidth.
[0128] Example 3
[0129] Because the sending end in this application can flexibly select the sending interface and receiving interface when sending each message, and considering that message transmission may fail, when sending a retransmission message of the original message, the sending end can continue sending the retransmission message on the same sending interface as the original message, or it can re-determine the sending interface for sending the retransmission message based on the current load status of multiple sending interfaces. Similarly, the sending end can also determine the receiving interface for receiving the retransmission message before sending the retransmission message. The receiving interface for receiving the retransmission message may be the same as or different from the receiving interface for receiving the original message.
[0130] Normally, if the sender does not receive an ACK packet for a message within the specified time period, it considers the message transmission to have failed and continues to send a retransmission packet. However, the original message may not have been lost; the sender may simply have failed to receive the ACK packet within the specified time period. In this case, the receiver may receive the original message on one receiving interface first, or it may receive the retransmission packet of the same message on another receiving interface first. Based on the principle that a message can only be processed once at the receiving end, if the original message arrives at the receiving end before the retransmission packet, the receiver only processes the original message; if a retransmission packet arrives at the receiving end before the original message, the receiver only processes that one retransmission packet, to avoid the same message being processed repeatedly on multiple receiving interfaces.
[0131] Therefore, this application provides a message transmission method, assuming that the original message and the retransmission message of the same message are sent through the same interface, such as... Figure 10 As shown, the method includes the following steps.
[0132] 101. The sending end sends the first message through the first sending interface T1.
[0133] The first message includes the identifier of the first transmitting interface T1 of the sending end and the identifier of the first receiving interface R1 of the receiving end.
[0134] This embodiment uses the first message as the original message as an example for explanation.
[0135] 102. When the sending end determines that sending the first message has failed, it determines the second receiving interface R2 for the receiving end to receive the first retransmission message based on the congestion information of multiple receiving interfaces. The first retransmission message is a duplicate of the first message.
[0136] If the sending end does not receive the ACK packet for the first message within the specified time, the sending end determines that sending the first message has failed. Before sending the duplicate packet of the first message, i.e., the first retransmission packet, the sending end determines the second receiving interface R2 to receive the first retransmission packet based on the congestion information of multiple receiving interfaces. The second receiving interface R2 may be the same as or different from the first receiving interface R1. In this embodiment, R2 and R1 are different.
[0137] 103. The sending end sends a first retransmission message through the first sending interface T1. The first retransmission message includes the identifier of the first sending interface T1, the identifier of the second receiving interface R2, and a mark indicating that the message is repeated.
[0138] The duplicate message marker is used to indicate that the first retransmission message is a retransmission message. Usually, the first retransmission message also carries the original message, that is, the sequence number M of the first message, where M is an integer greater than or equal to 0. In this way, the receiver can determine that the first retransmission message is a retransmission of the first message with sequence number M.
[0139] Then, if the first retransmission message arrives at the receiving end later than the first message, step 104 is executed; or, if the first message arrives at the receiving end later than the first retransmission message, step 107 is executed.
[0140] 104. The receiving end sends back the first response message of the first message, which includes the identifier of the first sending interface T1.
[0141] Accordingly, the sending end receives the first response message of the first message through the second sending interface T2. The second sending interface T2 may be the same as or different from the first sending interface T1. In this embodiment, T2 and T1 are different.
[0142] Before sending the first response message, the receiving end can send the identifier of the second sending interface T2 to the sending end via control plane signaling, so that the sending end can receive the first response message through the second sending interface T2.
[0143] 105. When the second sending interface T2 is different from the first sending interface T1, the sending end controls the second sending interface T2 to send the first response message to the first sending interface T1.
[0144] In other words, if the second sending interface T2 that sends the first retransmission message is different from the first sending interface T1 that sends the original message, i.e. the first message, the sending end needs to send the first response message to the first sending interface T1 through the second sending interface T2.
[0145] 106. The sending end controls the first sending interface T1 to send a first notification message to the first receiving interface R1. The first notification message is used to instruct the first receiving interface R1 to release the context information of the first message.
[0146] Since the first receiving interface R1 stores the context information of the first message when receiving the first message, if the first sending interface T1 determines that the first message was successfully sent when it receives the first response message, the sending end can control the first sending interface T1 to notify the first receiving interface R1 to release the context information of the first message.
[0147] 107. The receiving end sends back a first retransmission response message for the first retransmission message. The first retransmission response message includes the identifier of the first sending interface T1.
[0148] Accordingly, the sending end receives the first retransmission response message through the third sending interface T0. The third sending interface T0 may be the same as or different from the first sending interface T1. In this embodiment, T0 and T1 are different.
[0149] Before sending the first retransmission response message, the receiving end can send the identifier of the third transmission interface T0 to the sending end via control plane signaling, so that the sending end can receive the first retransmission response message through the third transmission interface T0.
[0150] 108. When the third sending interface T0 is different from the first sending interface and T1, the sending end controls the third sending interface T0 to send the first retransmission response message to the first sending interface T1.
[0151] In other words, if the third sending interface T0 that sends the first retransmission message is different from the first sending interface T1 that sends the original message, i.e. the first message, the sending end needs to send the first retransmission response message to the first sending interface T1 through the third sending interface T0.
[0152] 109. The sending end controls the first sending interface T1 to send a second notification message to the second receiving interface R2. The second notification message is used to instruct the second receiving interface R2 to release the context information of the first retransmission message.
[0153] Since the first receiving interface R1 stores the context information of the first retransmission message when it receives the first retransmission message, if the sending end determines that the first retransmission message was successfully sent when the first sending interface T1 receives the first response message, the sending end can control the first sending interface T1 to notify the second receiving interface R2 to release the context information of the first retransmission message.
[0154] Therefore, for both the sending and receiving ends, a multi-interface coordination mechanism can be adopted when sending and receiving messages, allowing all sending interfaces of the sending end and all receiving interfaces of the receiving end to simultaneously serve a single message, thereby fully utilizing the device's bandwidth.
[0155] Example 4
[0156] As explained above, regardless of whether the message sent by the sender is the original message or a retransmission message, under the requirement of reliable transmission, the same message can only be processed at most once. In a scenario where multiple interfaces collaborate at the receiving end, a retransmission message may be received from any of the receiving interfaces. When the receiving end determines that it has received the first message from the first receiving interface, it determines whether other receiving interfaces besides the first receiving interface have received a duplicate of the first message. Here, the first message may be the original message or a retransmission message. If the receiving end determines that none of the other receiving interfaces have received a duplicate of the first message, the receiving end controls the first receiving interface to process the first message; if the receiving end determines that at least one of the other receiving interfaces has received a duplicate of the first message, the receiving end controls the first receiving interface to discard the first message. In other words, each time a receiving interface receives a message, it needs to determine whether it can process the message to avoid the message being processed repeatedly.
[0157] To address this, the receiving end provides a registration mechanism for retransmitted messages. When a receiving interface receives a retransmitted message, it requests registration from other receiving interfaces. If it determines that a message with a specific sequence number has already been registered, the receiving interface cannot process the retransmitted message. Alternatively, when a receiving interface receives an original message, if it determines that a retransmitted message with the same content as the original message has already been registered, the original message will also be treated as a duplicate message and will not be processed.
[0158] The following examples illustrate the processing flow for various scenarios: retransmitted messages arriving at the receiving end later than the original message, retransmitted messages arriving at the receiving end earlier than the original message, and multiple retransmitted messages with the same content arriving at the receiving end.
[0159] Scenario 1
[0160] First, the handling procedure for cases where the retransmitted message arrives at the receiving end later than the original message will be explained. For example... Figure 11 As shown, the process can be described as follows.
[0161] 111. The sending end sends the first message through the first sending interface T1. If the first sending interface T1 does not receive the response message of the first message within the specified time, it is determined that the first message needs to be retransmitted.
[0162] In Case 1, the first message is the original message.
[0163] For example, if the first sending interface T1 does not receive the ACK message for the first message within the specified time, it is determined that the first message has failed to be sent.
[0164] 112. The receiving end's first receiving interface R1 receives the first message. The receiving end determines whether the first receiving interface R1 has received a first registration request from another receiving interface. The first registration request is used to request processing of the first retransmission message. If it is determined that the first receiving interface R1 has not received a first registration request from another receiving interface, the receiving end processes the first message on the first receiving interface R1.
[0165] The first retransmission message is a retransmission of the first message.
[0166] Although the sending end determines in step 111 that the first message transmission failed, it is possible that the first message simply did not arrive at the receiving end on time, but arrived late. If the sending end retransmits the first message, the receiving end may process the message repeatedly on different receiving interfaces. Therefore, when the first receiving interface R1 receives an original message, i.e., the first message here, it needs to determine whether there are other receiving interfaces that have already received the first retransmitted message. This is determined by checking whether the first receiving interface R1 has received the first registration request from other receiving interfaces.
[0167] It should be understood that if it is determined that the first receiving interface R1 has received the first registration request sent by at least one of the other receiving interfaces, it means that the first message arrived at the receiving end later than the retransmission message of the first message, which will be described in detail in case two.
[0168] 113. When the second receiving interface R2 of the receiving end receives the first retransmission message, it controls the second receiving interface R2 to send the first registration request to other receiving interfaces (R1 and R0) to determine whether the second receiving interface R2 can process the first retransmission message.
[0169] Assume there are three receiving interfaces at the receiving end: the first receiving interface R1, the second receiving interface R2, and the third receiving interface R0. When the second receiving interface R2 receives the first retransmission message, the second receiving interface R2 needs to send a first registration request to the first receiving interface R1 and the third receiving interface R0 to determine whether the second receiving interface R2 can process the first retransmission message.
[0170] 114. When the receiving end determines that the third receiving interface R0 has not processed the first message, it controls the third receiving interface R0 to send a registration success response to the second receiving interface R2 and records the registration status. This registration status indicates that the second receiving interface R2 can process the first retransmission message.
[0171] Since the third receiving interface did not receive the first message, it sent a registration success response to the second receiving interface R2. The registration status recorded by the third receiving interface R0 is equivalent to granting the second receiving interface R2 the permission to process the first retransmission message.
[0172] 115. The receiving end determines that the first receiving interface R1 is processing the first message, and controls the first receiving interface R0 to send a registration failure response to the second receiving interface R2.
[0173] In other words, when the receiving end determines that after the first receiving interface R1 receives the first message, it receives the first registration request sent by the second receiving interface R2 among the other receiving interfaces, the receiving end controls the first receiving interface R1 to send the first registration response to the second receiving interface R2. The first registration response is used to indicate that the registration of the second receiving interface R2 has failed.
[0174] This means that the first receiving interface R1 did not grant the second receiving interface R2 the authority to process the first retransmission message.
[0175] 116. Based on the registration responses from the first receiving interface R1 and the third receiving interface, the second receiving interface R2 of the receiving end determines that the second receiving interface R2 does not need to process the first retransmission message, and controls the second receiving interface R2 to send a registration clearing request to the third receiving interface R0.
[0176] In other words, as long as the second receiving interface R2 receives a registration failure response from any other receiving interface, the second receiving interface R2 can recognize that the first retransmission message does not need to be processed on this receiving interface.
[0177] Since the third receiving interface R0 had previously sent a registration success response to the second receiving interface R2, when the second receiving interface R2 determines that it does not need to process the first retransmission message, the second receiving interface R2 also needs to send a registration clearing request to the third receiving interface R0 so that the third receiving interface R0 can delete the registration status of the record.
[0178] 117. After successfully receiving the first message, the first receiving interface R1 of the receiving end sends a second message to the third sending interface T0 of the sending end. The second message is used to indicate that the first message has been received.
[0179] Through communication between the receiving interfaces, it can be seen that when the first message arrives at the first receiving interface R1 of the receiving end, the first receiving interface R1 is ultimately the only interface processing the first message. After the first receiving interface R1 successfully receives the first message, it determines that it needs to return the result of successful reception of the first message, which is the second message in this case. Before returning the second message, similar to the sending end, the receiving end can also determine the receiving interface for receiving the second message based on the load status of the multiple receiving interfaces of the sending end. Assuming that the interface for receiving the second message is determined to be the third sending interface T0, the second message can carry the identifier of the first sending interface that the sending end used to send the first message.
[0180] 118. The third sending interface T0 of the sending end sends an indication that the first message has been successfully received to the first sending interface T1. The sending end controls the first sending interface T1 to send a message to the first receiving interface R1 to release processing resources.
[0181] The first receiving interface R1 stores the context information of processing the first message. When the first receiving interface R1 receives a message to release processing resources, the first receiving interface R1 can clear the context information of the first message.
[0182] Therefore, when the retransmission message of the first message arrives at the receiving end later than the original message, the registration mechanism provided in this application can effectively identify the retransmission message as a duplicate message. The duplicate message will not be processed at the receiving port, so as to avoid the same message being processed repeatedly on different receiving interfaces.
[0183] Scenario 2
[0184] The procedure for handling cases where a retransmitted message arrives at the receiving end before the original message is explained. For example... Figure 12 As shown, the process can be described as follows.
[0185] 121. The sending end sends a first message through the first sending interface T1. The first message carries the identifier of the first sending interface T1 and the identifier of the second receiving interface R2 of the receiving end.
[0186] Before sending the first message, the sending end can send an event to the receiving end via control plane signaling to the receiving end for the second receiving interface R2 to receive the first message.
[0187] 122. If the sending end determines that it has not received the ACK message of the first message within the specified time, the sending end sends the first retransmission message through the first sending port T1. The first retransmission message is a retransmission message of the first message.
[0188] The first retransmission message includes the message sequence number of the first message, as well as the identifier of the first transmitting interface T1 and the identifier of the first receiving interface R1.
[0189] When the sending end determines through congestion information that the receiving interface for receiving the first message is the second receiving interface R2, and the receiving interface for receiving the first retransmission message is the first receiving interface R1, continue to execute step 123.
[0190] 123. The receiving end receives the first retransmission message at the first receiving interface R1.
[0191] That is, the first retransmission message arrives at the receiving end earlier than the first message.
[0192] 124. The receiving end controls the first receiving interface R1 to send the first registration request to the second receiving interface R2 and the third receiving interface R0 respectively. The first registration request is used to request the processing of the first retransmission message.
[0193] To avoid the same message being processed repeatedly on different receiving interfaces, when the first receiving interface R1 receives the first retransmission message, the receiving end controls the first receiving interface R1 to send a first registration request to each of the other receiving interfaces (R0 and R3). The first registration request is used to request processing of the first retransmission message.
[0194] 125. The receiving end determines that the second receiving interface R2 has not processed the duplicate message of the first retransmission message, and controls the second receiving interface R2 to send a registration success response to the first receiving interface R1; the controlling end determines that the third receiving interface R0 has also not processed the duplicate message of the first retransmission message, and controls the third receiving interface R0 to send a registration success response to the first receiving interface R1.
[0195] Essentially, the first receiving interface R1 receives successful registration responses from all other receiving interfaces on the receiving end, thus gaining the authority to process the first retransmission message. As for the second and third receiving interfaces R2 and R0, their authority to process the first retransmission message has already been registered; therefore, they no longer have the authority to process the first retransmission message or any duplicates of it. Both interfaces R2 and R0 record the first retransmission message as already registered.
[0196] 126. When the receiving end determines that the second receiving interface R2 has received the first message, it controls the second receiving interface R2 to discard the first message.
[0197] In other words, although the sending end determines that the first message failed to be sent in step 122, the first message actually only arrived at the receiving end later than the first retransmission message.
[0198] If the receiving end determines that its second receiving interface R2 has received a first registration request, it is equivalent to the second receiving interface R2 granting the first receiving interface R1 permission to process the first retransmission message. When the second receiving interface R2 receives the first message again, the receiving end controls the second receiving interface R2 to discard the first message.
[0199] 127. When the receiving end determines that the first receiving interface R1 has finished processing the first retransmission message, it sends a second message back to the first sending interface T1 of the sending end. The second message indicates that the first receiving interface R1 has received the first retransmission message.
[0200] 128. When the first sending interface T1 of the sending end determines that the first retransmission message has been successfully received, the sending end controls the first sending interface T1 to send an instruction to the first receiving interface R1 to release processing resources.
[0201] When the first receiving interface R1 processes the first retransmission message, it saves the context of the first retransmission message. When the first receiving interface R1 receives an instruction to release processing resources, it can delete the context of the first retransmission message saved by the first receiving interface R1.
[0202] 129. The receiving end controls the first receiving interface R1 to send a registration clear message to the second receiving interface R2 and the third receiving interface R0, instructing the second receiving interface R2 and the third receiving interface R0 to clear the registration status of the first retransmission message.
[0203] This is equivalent to the second receiving interface R2 and the third receiving interface R0 deleting the registration status recorded in step 125.
[0204] Therefore, in this application, when a retransmission message of the same message arrives at the receiving end before the original message, the receiving end can only process one retransmission message, and the original message that arrives later is regarded as a duplicate message and is not processed, thus avoiding the same message being processed repeatedly.
[0205] Scenario 3
[0206] The process for handling multiple retransmissions of the same message sent by the sender that arrive at the receiver is explained.
[0207] In this application, if multiple retransmissions of the same message arrive at multiple receiving interfaces of the receiving end, in order to prevent conflicts between the multiple retransmissions at multiple receiving interfaces, this application provides a mechanism to avoid conflicts between multiple retransmissions of the same message. This mechanism satisfies all of the following conditions:
[0208] 1) If a receiving interface has already obtained a retransmission message, the receiving interface with the smaller number can directly refuse the receiving interface with the larger number from registering the retransmission message.
[0209] 2) Once a receiving interface has received a retransmission message, the receiving interface with the larger number must collect the registration responses from all other receiving interfaces before it can send a registration response to the receiving interface with the smaller number.
[0210] 3) The receiving interface with the larger number should return the final valid registration result (including the registration success response) to the receiving interface with the smaller number.
[0211] Based on the above mechanism, such as Figure 13 As shown, the process can be described as follows.
[0212] 131. When the sending end determines that the first message has failed to be sent, it sends a first retransmission message to the receiving end through the first sending interface R1. The first retransmission message includes the identifier of the first sending interface R1 and the identifier of the third receiving interface R0.
[0213] The first retransmission message is a retransmission of the first message.
[0214] This embodiment is based on the premise that the original message, i.e., the first message, failed to be sent and did not reach the receiving end.
[0215] When the first message fails to be sent, the sending end can determine that the receiving interface for receiving the first retransmission message is the third receiving interface R0 by using the congestion information of the receiving interface of the receiving end. In this case, the sending end will carry the identifier of the first sending interface R1 and the identifier of the third receiving interface R0 in the first retransmission message.
[0216] 132. When the sending end determines that the first retransmission message has failed to be sent, it sends a second retransmission message to the receiving end through the first sending interface R1. The second retransmission message includes the identifier of the first sending interface R1 and the identifier of the first receiving interface R1.
[0217] If the sending end does not receive the ACK packet for the first retransmission packet within the specified time, it determines that the first retransmission packet transmission has failed. The sending end then decides to continue sending the second retransmission packet via the first sending interface R1. The second retransmission packet can be understood as the second retransmission packet of the first packet. When the sending end determines that the receiving interface for receiving the second retransmission packet is the first receiving interface R1 based on the congestion information of the receiving interface, it carries the identifiers of the first sending interface R1 and the first receiving interface R1 in the second retransmission packet.
[0218] 133. The receiving end controls the third receiving interface R0 to request the registration of the first retransmission message from the first receiving interface R1 and the second receiving interface R2.
[0219] Assuming the receiving end has three receiving interfaces, including R0, R1 and R2 in this application, when the third receiving interface R0 receives the first retransmission message, in order to avoid the same message being processed repeatedly, the third receiving interface R0 needs to request the registration of the first retransmission message from the first receiving interface R1 and the second receiving interface R2, that is, request the permission to process the first retransmission message.
[0220] 134. The receiving end controls the first receiving interface R1 to request the registration of the second retransmission message from the third receiving interface R0 and the second receiving interface R2.
[0221] Similar to step 133, when the first receiving interface R1 receives the second retransmission message, in order to avoid the same message being processed repeatedly, the first receiving interface R1 needs to request the registration of the second retransmission message from the second receiving interface R2 and the third receiving interface R0, that is, request permission to process the second retransmission message.
[0222] 135. When the receiving end determines that the second receiving interface R2 receives the registration request from the first receiving interface R1 first, if the second receiving interface R2 does not receive the retransmission message of the first message, it controls the second receiving interface R2 to return a registration success response to the first receiving interface R1.
[0223] In terms of timing, assuming that the second receiving interface R2 receives the registration request from the first receiving interface R1 first, if the second receiving interface R2 does not receive the retransmission message of the first message, the second receiving interface can return the permission to process the second retransmission message to the first receiving interface and record the registration status that the second retransmission message has been registered by the first receiving interface R1.
[0224] 136. When the receiving end determines that the second receiving interface R2 has received the registration request from the third receiving interface R0, it controls the second receiving interface R2 to return a registration failure response to the third receiving interface R0.
[0225] Since the second receiving interface R2 received the registration request from the first receiving interface R1 first and granted it the authority to process the second retransmission message, it's equivalent to the first receiving interface R1 having completed its registration. When the second receiving interface R2 itself has not received a retransmission message of the first message, and receives a registration request from the third receiving interface R0 for the same message (i.e., the first retransmission message), the second receiving interface R2 returns a registration failure response to the third receiving interface R0. This registration failure response indicates that the second receiving interface R2 has not received a duplicate message of the first message, and the first receiving interface R1 has completed the registration for the second retransmission message; the third receiving interface R0 has not obtained the authority to process the first retransmission message.
[0226] 137. When the receiving end determines that the third receiving interface R0 receives the registration request from the first receiving interface R1, it controls the third receiving interface R0 to return a registration failure response to the first receiving interface R1.
[0227] For the third receiving interface R0, when the third receiving interface R0 receives the first retransmission message, when the third receiving interface R1 receives the registration request for the second retransmission message of the first message, the third receiving interface R0 can control the third receiving interface R0 to return a registration failure response to the first receiving interface R1.
[0228] The processing in step 137 can be understood as following a mechanism to prevent conflicts between multiple retransmitted messages (1).
[0229] That is, the third receiving interface R0 has received the first retransmission message, and the third receiving interface R0 has also received a registration request from the first receiving interface R1 whose number is greater than that of the third receiving interface R0 (0 in number R0 is less than 1 in number R1). According to the description in processing mechanism 1), the third receiving interface R0 should reject the registration request of the first receiving interface R1, and therefore returns a registration failure response to the first receiving interface R1.
[0230] Similarly, suppose the receiving end determines that after the first receiving interface R1 receives the first message, the first receiving interface R1 also receives a first registration request sent by the second receiving interface R2. The first registration request is used to request the processing of duplicate messages of the first message. If the number of the first receiving interface R1 is less than the number of the second receiving interface R2 (1 in number R1 is less than 2 in number R2), the receiving end controls the first receiving interface R2 to reject the first registration request.
[0231] 138. After the receiving end determines that the first receiving interface R1 has received registration responses from all other receiving interfaces of the receiving end, it determines that the first receiving interface R1 needs to discard the second retransmission message, and records that the first message has been registered in the first receiving interface R1. It then controls the first receiving interface R1 to return the registration response received by the first receiving interface R1 and the registration response received from the second receiving interface R2 to the third receiving interface R0. Figure 13 A valid registration response.
[0232] Through steps 135 and 137, the first receiving interface R1 receives responses from all other receiving interfaces R0 and R2 of the receiving end, including a registration failure response returned by R0 and a registration success response returned by R2 indicating that the second receiving interface has not received the retransmitted message. As soon as the first receiving interface R1 receives a registration failure response from any of the other receiving interfaces, the first receiving interface R1 determines that the locally received second retransmitted message cannot be processed because the same message has already been registered on another receiving interface. Simultaneously, the first receiving interface R1 also needs to record the registration status locally that the second retransmitted message has been registered.
[0233] This is equivalent to the first receiving interface R1 following mechanism 2) above to avoid multiple duplicate message conflicts. That is, if the first receiving interface R1 receives the second retransmission message (the retransmission message of the first message), and if the number of the first receiving interface R1 is not the smallest number among all the receiving interfaces of the receiving end, the receiving end controls the first receiving interface R1 to collect multiple registration responses of the first message from all other receiving interfaces (R0 and R2) except the first receiving interface.
[0234] Referring to 3) of the mechanism for avoiding multiple duplicate message conflicts mentioned above, after the first receiving interface R1 collects the registration responses from R0 and R2, it also needs to return the registration success response returned by the second receiving interface R2 and the registration failure message determined by the first receiving interface R1 to the third receiving interface R0.
[0235] This includes the first receiving interface R1 sending the first registration response out of a plurality of registration responses to the receiving interface R0, whose number is less than that of the first receiving interface. The first registration response is used to indicate that the second receiving interface R2 has not received the retransmission message and that the duplicate message of the first message of the first receiving interface R1 has been successfully registered.
[0236] 139. After receiving the registration responses from the first receiving interface R1 and the second receiving interface R2, the receiving end determines that the third receiving interface R0 processes the received first retransmission message and returns the processing result to the first sending interface R1.
[0237] When the third receiving interface R0, with the smallest ID, collects registration responses from all other receiving interfaces, it knows that the second receiving interface R2 has not received the retransmission message and has granted the processing authority for the retransmission message to the first receiving interface R1. However, the third receiving interface R0 also receives a registration failure message from the first receiving interface R1. Therefore, the third receiving interface R0 knows that the other receiving interfaces (R1 and R2) do not have the authority to process the retransmission message of the first message. Consequently, the third receiving interface R0 gains the authority to process the received first retransmission message and returns the processing result to the first sending interface R1 that sent the first retransmission message.
[0238] 140. The sending end controls the first sending interface R1 to send a resource release message to the third receiving interface R0.
[0239] Once the first sending interface R1 determines that a retransmission of the first message has been successfully processed, the first sending interface R1 returns a resource release message to the third receiving interface R0 so that the third receiving interface R0 can delete the local context associated with the first retransmission message.
[0240] 141. The receiving end controls the third receiving interface R0 to instruct the first receiving interface R1 and the second receiving interface R2 to release the registration status for the first message.
[0241] Since the first receiving interface R1 records the registration responses of the second receiving interface R2 and the third receiving interface R0, when the first receiving interface R1 receives a message to release the registration status, the first receiving interface R1 can delete the locally saved registration responses. The second receiving interface R2 also records the registration status of the first receiving interface R1 when registration is successful, and the registration status of the third receiving interface R0 when registration fails. When the second receiving interface R2 receives a message to release the registration status, the second receiving interface R2 can delete the locally stored registration status.
[0242] Therefore, when multiple receiving interfaces of the receiving end work together, if multiple retransmission messages of the same message are received on multiple receiving interfaces and need to be processed, this application can follow the processing mechanism for multiple duplicate messages. This mechanism is a message registration mechanism, such as mechanisms 1), 2), and 3) above. Of course, other processing mechanisms can also be used to avoid the same message being processed repeatedly on multiple receiving interfaces.
[0243] It is understood that, in order to achieve the above functions, the electronic device includes hardware and / or software modules that perform the respective functions. This electronic device can be the transmitting end or the receiving end in this application. Based on the algorithm steps of the various examples described in conjunction with the embodiments disclosed herein, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in a hardware or computer software-driven hardware manner depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application in conjunction with the embodiments, but such implementation should not be considered beyond the scope of this application.
[0244] This embodiment can divide the electronic device into functional modules according to the above method example. For example, each function can be divided into its own functional modules, or two or more functions can be integrated into one processing module. The integrated modules can be implemented in hardware. It should be noted that the module division in this embodiment is illustrative and only represents one logical functional division. In actual implementation, there may be other division methods.
[0245] When dividing each function into modules according to its corresponding function. Figure 14 A schematic diagram of a possible configuration of electronic device 140 is shown. Electronic device 140 can be a transmitting end or a receiving end in this application. Figure 14 As shown, the electronic device 140 may include a processing unit 1401, a transmitting unit 1402, and a receiving unit 1403. It is understood that the transmitting end has both transmitting and receiving functions, and the receiving end also has both transmitting and receiving functions.
[0246] Therefore, the processing unit 1401 can be used to support the electronic device 1100 in performing the above-described steps 801, 102, 504, 108, 112, 113, 114, 115, 116, 124, 125, 126, 128, 133, 134, 135, 136, 137, 138, 139, 141, etc., and / or other processes used in the technology described herein.
[0247] The transmitting unit 1402 can be used to support the electronic device 1100 in performing the above steps 802, 901, 101, 103, 104, 105, 106, 107, 109, 111, 117, 118, 121, 122, 127, 129, 131, 132, 140, etc., and / or other processes used in the technology described herein.
[0248] The receiving unit 1403 can be used to support the electronic device 1100 in performing the above steps 902, 123, etc., and / or other processes used in the technology described herein.
[0249] It should be noted that the transmitting unit 1402 is equivalent to multiple transmitting interfaces in this application, and the receiving unit 1403 is equivalent to multiple receiving interfaces in this application.
[0250] It should be noted that all relevant content of each step involved in the above method embodiments can be referenced from the functional description of the corresponding functional module, and will not be repeated here.
[0251] The electronic device 140 provided in this embodiment is used to execute the above-described message transmission method, and thus can achieve the same effect as the above-described implementation method.
[0252] When using integrated units, the electronic device 140 may include a processing module, a storage module, and a communication module. The processing module can be used to control and manage the operation of the electronic device 140, for example, to support the electronic device 140 in executing the steps performed by the determining unit 1401. The storage module can be used to support the electronic device 140 in storing program code and data. The communication module can be used to support communication between the electronic device 140 and other devices, such as communication with a receiving end or a transmitting end. In this application, the communication module is used to execute the steps performed by the transmitting unit 1402 and the receiving unit 1403.
[0253] The processing module can be a processor or a controller. It can implement or execute various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. The processor can also be a combination that implements computing functions, such as a combination of one or more microprocessors, digital signal processing (DSP), and microprocessors. The storage module can be a memory. The communication module can specifically be a radio frequency circuit, a Bluetooth chip, a Wi-Fi chip, or other devices that interact with other electronic devices.
[0254] In one embodiment, when the processing module is a processor, the storage module is a memory, and the communication module consists of multiple transmitting interfaces and multiple receiving interfaces, the communication methods between transmitting interfaces and between receiving interfaces can depend on the number of receiving interfaces and transmitting interfaces, as well as the chip layout structure.
[0255] In some embodiments, for devices with a large number of interfaces, or devices where the interfaces are physically distributed, communication between transmitting interfaces can be accomplished through a system bus, and data exchange between receiving interfaces can also be accomplished through a system bus. In this case, the electronic device involved in this embodiment can be a device with… Figure 15 The communication device 150 with the structure shown includes a receiving interface. Figure 15 The receiving interface is 1, receiving interface 2 and receiving interface 3.
[0256] In some embodiments, for devices with a small number of interfaces, and when the interfaces are physically close together, data communication between the transmitting and receiving interfaces can be achieved through direct physical connection. In this case, the electronic device involved in this embodiment can be one with... Figure 16 The communication device 160 with the structure shown includes a receiving interface. Figure 16 The receiving interface is 1, receiving interface 2 and receiving interface 3.
[0257] This application also provides an electronic device, including one or more processors and one or more memories, multiple transmitting interfaces and multiple receiving interfaces. The one or more memories are coupled to the one or more processors, and the one or more memories are used to store computer program code, including computer instructions. When the one or more processors execute the computer instructions, the electronic device performs the aforementioned method steps to implement the message transmission method in the above embodiments.
[0258] Embodiments of this application also provide a computer storage medium storing computer instructions. When the computer instructions are executed on an electronic device, the electronic device performs the aforementioned method steps to implement the message transmission method in the above embodiments.
[0259] Embodiments of this application also provide a computer program product that, when run on a computer, causes the computer to perform the aforementioned related steps to implement the message transmission method executed by the electronic device in the above embodiments.
[0260] In addition, embodiments of this application also provide an apparatus, which may specifically be a chip, component or module. The apparatus may include a connected processor and a memory; wherein the memory is used to store computer execution instructions, and when the apparatus is running, the processor may execute the computer execution instructions stored in the memory to cause the chip to execute the message transmission method executed by the electronic device in the above method embodiments.
[0261] In this embodiment, the electronic device, computer storage medium, computer program product or chip are all used to execute the corresponding method provided above. Therefore, the beneficial effects that can be achieved can be referred to the beneficial effects of the corresponding method provided above, and will not be repeated here.
[0262] Another embodiment of this application provides a system that may include the above-described sending end and receiving end, and can be used to implement the above-described message transmission method.
[0263] Through the above description of the embodiments, those skilled in the art will understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0264] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0265] The units described as separate components may or may not be physically separate. A component shown as a unit can be one or more physical units; that is, it can be located in one place or distributed in multiple different locations. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0266] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0267] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, essentially or in other words, the parts that contribute to the prior art, or all or part of the technical solutions, can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0268] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A message transmission method, characterized in that, include: When the sending end determines to send the first message, it determines the first sending interface for sending the first message based on the load of the multiple sending interfaces of the sending end, and determines the first receiving interface for receiving the first message based on the congestion information of the multiple receiving interfaces of the receiving end. The sending end sends a first message through the first sending interface, and the first message includes the identifier of the first sending interface and the identifier of the first receiving interface.
2. The method according to claim 1, characterized in that, The method further includes: The sending end receives congestion information of the plurality of receiving interfaces sent by the receiving end, the plurality of receiving interfaces including the first receiving interface.
3. The method according to claim 1 or 2, characterized in that, The method further includes: When the sending end determines that sending the first message has failed, it determines the second receiving interface for receiving the first retransmission message based on the congestion information of the multiple receiving interfaces. The first retransmission message is a duplicate of the first message. The sending end sends the first retransmission message through the first sending interface. The first retransmission message includes the identifier of the first sending interface, the identifier of the second receiving interface, and a marker for duplicate messages.
4. The method according to claim 3, characterized in that, When the first retransmission message arrives at the receiving end later than the first message, the method further includes: The sending end receives a first response message of the first message through the second sending interface, and the first response message includes the identifier of the first sending interface; When the second sending interface is different from the first sending interface, the sending end controls the second sending interface to send the first response message to the first sending interface; The sending end controls the first sending interface to send a first notification message to the first receiving interface. The first notification message is used to instruct the first receiving interface to release the context information of the first message.
5. The method according to claim 3, characterized in that, When the first message arrives at the receiving end later than the first retransmission message, the method further includes: The sending end receives the first retransmission response message of the first retransmission message through the third sending interface. The first retransmission response message includes the identifier of the first sending interface. When the third sending interface is different from the first sending interface, the sending end controls the third sending interface to send the first retransmission response message to the first sending interface; The sending end controls the first sending interface to send a second notification message to the second receiving interface. The second notification message is used to instruct the second receiving interface to release the context information of the first retransmission message.
6. A message transmission method, characterized in that, The method includes: The receiving end sends congestion information of multiple receiving interfaces to the sending end. The congestion information of the multiple receiving interfaces is used by the sending end to determine the first receiving interface through which the receiving end receives the first message. The receiving end receives the first message through the first receiving interface. The first message includes the identifier of the first sending interface through which the sending end sends the first message and the identifier of the first receiving interface.
7. The method according to claim 6, characterized in that, The method further includes: When the receiving end determines that it has received the first message from the first receiving interface, it determines whether the other receiving interfaces besides the first receiving interface have received a duplicate message of the first message. When the receiving end determines that none of the other receiving interfaces have received a duplicate message of the first message, the receiving end controls the first receiving interface to process the first message; When the receiving end determines that at least one of the other receiving interfaces has received a duplicate message of the first message, the receiving end controls the first receiving interface to discard the first message.
8. The method according to claim 7, characterized in that, When the first message is a raw message: The step of determining whether the multiple receiving interfaces other than the first receiving interface have received a duplicate message of the first message includes: the receiving end determining whether the first receiving interface has received a first registration request from the other receiving interfaces, the first registration request being used to request processing of the first retransmission message, the first retransmission message being a retransmission message of the first message; The determination by the receiving end that the other receiving interfaces have not received duplicate messages of the first message includes: the receiving end determining that the first receiving interface has not received the first registration request sent by the other receiving interfaces; The receiving end determines that at least one of the other receiving interfaces has received a duplicate message of the first message, including: the receiving end determines that the first receiving interface has received the first registration request sent by at least one of the other receiving interfaces.
9. The method according to claim 8, characterized in that, The method further includes: When the receiving end determines that after the first receiving interface receives the first message, it receives the first registration request sent by the second receiving interface among the other receiving interfaces, the receiving end controls the first receiving interface to send a first registration response to the second receiving interface. The first registration response is used to indicate that the registration of the second receiving interface has failed.
10. The method according to claim 7, characterized in that, When the first message is a retransmission message: The step of determining whether the other receiving interfaces besides the first receiving interface have received a duplicate message of the first message includes: the receiving end controls the first receiving interface to send a first registration request to each of the other receiving interfaces, the first registration request being used to request processing of the first message; The determination by the receiving end that the other receiving interfaces have not received duplicate messages of the first message includes: the receiving end determining that the first receiving interface has received multiple registration responses sent by the other receiving interfaces, and the multiple registration responses all indicate that the first receiving interface has successfully registered; The receiving end determines that at least one of the other receiving interfaces has received a duplicate message of the first message, including: the receiving end determines that the first receiving interface has received a registration response sent by one of the other receiving interfaces, indicating that the registration of the first receiving interface has failed.
11. The method according to claim 10, characterized in that, The method further includes: After the receiving end determines that the second receiving interface among the other receiving interfaces has received the first registration request, it also receives the original message of the first message. The receiving end then controls the second receiving interface to discard the original message of the first message.
12. The method according to any one of claims 6-11, characterized in that, When the first message is a retransmission message: The receiving end determines that after the first receiving interface receives the first message, the first receiving interface also receives a first registration request sent by the second receiving interface. The first registration request is used to request the processing of duplicate messages of the first message. If the number of the first receiving interface is less than the number of the second receiving interface, the receiving end controls the first receiving interface to reject the first registration request.
13. The method according to claim 12, characterized in that, When the first message is a retransmission message: The receiving end determines that after the first receiving interface receives the first message, if the number of the first receiving interface is not the smallest number among all the receiving interfaces of the receiving end, the receiving end controls the first receiving interface to collect multiple registration responses from all other receiving interfaces other than the first receiving interface regarding the first message. The receiving end controls the first receiving interface to send the first registration response among the plurality of registration responses to a receiving interface with a number less than that of the first receiving interface. The first registration response is used to indicate that the second receiving interface has successfully registered the duplicate message of the first message.
14. A communication device, characterized in that, include: The processor is configured to determine the first sending interface for sending the first message based on the load of multiple sending interfaces of the sending end when determining to send the first message, and to determine the first receiving interface for receiving the first message based on the congestion information of multiple receiving interfaces of the receiving end. The transceiver includes the first transmitting interface, which is used to transmit a first message, the first message including an identifier of the first transmitting interface and an identifier of the first receiving interface.
15. The communication device according to claim 14, characterized in that, The transceiver is also used for: The receiver receives congestion information from the plurality of receiving interfaces, including the first receiving interface.
16. The communication device according to claim 14 or 15, characterized in that, The processor is also used for: When it is determined that sending the first message fails, the second receiving interface for receiving the first retransmission message is determined based on the congestion information of the multiple receiving interfaces, wherein the first retransmission message is a duplicate of the first message. The first sending interface is also used to send the first retransmission message, which includes the identifier of the first sending interface, the identifier of the second receiving interface, and a marker for duplicate messages.
17. The communication device according to claim 16, characterized in that, When the first retransmission message arrives at the receiving end later than the first message, the transceiver further includes a second transmission interface, which is also used to receive a first response message of the first message, and the first response message includes an identifier of the first transmission interface. When the second sending interface is different from the first sending interface, the second sending interface is further configured to send the first response message to the first sending interface; the first sending interface is further configured to send a first notification message to the first receiving interface, the first notification message being used to instruct the first receiving interface to release the context information of the first message.
18. The communication device according to claim 16, characterized in that, When the first message arrives at the receiving end later than the first retransmission message, the transceiver further includes a third transmitting interface, which is used to receive a first retransmission response message of the first retransmission message, and the first retransmission response message includes the identifier of the first transmitting interface. When the third sending interface is different from the first sending interface, the third sending interface is also used to send the first retransmission response message to the first sending interface; the first sending interface is also used to send a second notification message to the second receiving interface, the second notification message being used to instruct the second receiving interface to release the context information of the first retransmission message.
19. A communication device, characterized in that, include: A transceiver is used to send congestion information of multiple receiving interfaces to a sending end. The congestion information of the multiple receiving interfaces is used by the sending end to determine the first receiving interface for the receiving end to receive the first message. The transceiver includes the first receiving interface, which is used to receive the first message. The first message includes the identifier of the first sending interface of the sending end that sends the first message and the identifier of the first receiving interface.
20. The communication device according to claim 19, characterized in that, It also includes a processor for: When it is determined that the first message is received from the first receiving interface, it is determined whether the other receiving interfaces besides the first receiving interface have received a duplicate message of the first message; When it is determined that none of the other receiving interfaces have received a duplicate message of the first message, the first receiving interface is controlled to process the first message; When it is determined that at least one of the other receiving interfaces has received a duplicate of the first message, the first receiving interface is controlled to discard the first message.
21. The communication device according to claim 20, characterized in that, When the first message is a raw message: The first receiving interface is used to determine whether a first registration request has been received from the other receiving interface. The first registration request is used to request processing of the first retransmission message, which is a retransmission message of the first message. If it is determined that the first receiving interface has not received the first registration request sent by the other receiving interfaces, the first receiving interface is used to process the first message; or, The first receiving interface determines that it has received the first registration request sent by at least one of the other receiving interfaces, and the first receiving interface is used to discard the first message.
22. The communication device according to claim 21, characterized in that, Upon receiving the first message, when the first receiving interface receives the first registration request sent by the second receiving interface among the other receiving interfaces, the first receiving interface is further configured to send a first registration response to the second receiving interface, the first registration response being used to indicate that the registration of the second receiving interface has failed.
23. The communication device according to claim 20, characterized in that, When the first message is a retransmission message: The first receiving interface is configured to send a first registration request to each of the other receiving interfaces, wherein the first registration request is configured to request processing of the first message; The first receiving interface receives multiple registration responses sent by the other receiving interfaces, all of which indicate that the first receiving interface has successfully registered. The first message is then processed. If it is determined that the first receiving interface has received a registration response indicating that the first receiving interface has failed to register, one of the other receiving interfaces will send a response indicating that the first receiving interface has failed to register. If so, the first receiving interface will be controlled to discard the first message.
24. The communication device according to claim 23, characterized in that, After receiving the first registration request, the second receiving interface of the other receiving interfaces also receives the original message of the first message. The second receiving interface is used to discard the original message of the first message.
25. The communication device according to any one of claims 19-24, characterized in that, When the first message is a retransmission message: After receiving the first message, the first receiving interface also receives a first registration request sent by the second receiving interface. The first registration request is used to request the processing of duplicate messages of the first message. If the number of the first receiving interface is less than the number of the second receiving interface, the first receiving interface is used to reject the first registration request.
26. The communication device according to claim 25, characterized in that, When the first message is a retransmission message: After receiving the first message, if the number of the first receiving interface is not the smallest number among all the receiving interfaces of the receiving end, the first receiving interface is used to collect multiple registration responses from all other receiving interfaces other than the first receiving interface regarding the first message. The first receiving interface is further configured to send a first registration response among the plurality of registration responses to a receiving interface with a number less than that of the first receiving interface. The first registration response is used to indicate that the second receiving interface has successfully registered the duplicate message of the first message.
27. A computer-readable storage medium, characterized in that, Includes computer instructions that, when executed on an electronic device, cause the electronic device to perform the method described in any one of claims 1-13.
Citation Information
Patent Citations
Method and device for determining transmission path
CN108243111A
