Method, computer device, medium and program for message retransmission

By quickly detecting and processing packet loss at the sending end, and combining it with the timeout judgment mechanism at the receiving end, the problem of low packet loss efficiency in long-distance and large-traffic data transmission is solved, improving business performance and data transmission efficiency, and is suitable for high-performance applications Computing and data center environments.

CN117856985BActive Publication Date: 2024-08-23ZHUHAI XINGYUN ZHILIAN TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410265845.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-03-08
Publication Date
2024-08-23
Estimated Expiration
2044-03-08

AI Technical Summary

Technical Problem

In high-speed data transmission applications with long distances and large traffic, the packet loss detection and retransmission mechanisms in the existing technology are inefficient, resulting in overall service performance degradation and low efficiency, making it difficult to meet the needs of high-performance computing and data centers.

Method used

By implementing a rapid detection and retransmission mechanism for message loss at the sending end, using the first time period to determine repeated retransmission requests, combined with the timeout judgment mechanism at the receiving end, the algorithm complexity is reduced and adapted to the complex situations of different networks and transmission links. , reduce the burden on equipment.

Benefits of technology

It improves packet forwarding efficiency and overall business performance, reduces the negative impact of packet loss on upper-layer services, is suitable for devices with limited computing power and storage resources, and improves the reliability and efficiency of long-distance data transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117856985B
    Figure CN117856985B
Patent Text Reader

Abstract

The present application relates to the field of computer technology and provides a method, computer device, medium and program for message retransmission. The method includes: a sending end, in response to receiving a first retransmission request indicating a message sequence number of a first message, determines the loss of the first message and performs a message retransmission operation corresponding to the first message; the sending end, within a first time period after receiving the first retransmission request, if a second retransmission request indicating a message sequence number of the first message is received, determines that the second retransmission request is a repeated retransmission request relative to the first retransmission request. The first time period is determined based on at least a first network connected to the sending end for sending the first message and a first communication protocol stack used by the sending end to send the first message. In this way, bandwidth utilization and overall message forwarding efficiency are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a method, computer device, medium and program for message retransmission. Background Art

[0002] With the development of technologies such as high-performance computing, artificial computing, and data centers, packet loss has an increasingly greater impact on upper-layer services. In applications of high-speed data transmission over long distances and large traffic volumes, such as the long-distance, high-speed data transmission over multiple provinces involved in the East-West Computing project, the transmission distance is long and the transmission time is long, and there is a greater probability of packet loss during data forwarding. In the prior art, the timeout judgment mechanism of the receiving end is generally used to determine whether a message is lost. After the receiving end determines that the message is lost, it sends a message loss and retransmission request to the sending end. However, in applications of high-speed data transmission over long distances and large traffic volumes, the request sent from the receiving end takes a long time to reach the sending end, and then the sending end will retransmit the message, which results in low overall message forwarding efficiency, which is not conducive to fully utilizing bandwidth, and it is difficult to meet the development needs of technologies such as high-performance computing, artificial computing, and data centers.

[0003] To this end, the present application provides a method, computer device, medium and program for message retransmission, which are used to address the technical difficulties in the prior art. Summary of the invention

[0004] In a first aspect, the present application provides a method for message retransmission. The method comprises: a sending end, in response to receiving a first retransmission request indicating a message sequence number of a first message, determining that the first message is lost, and performing a message retransmission operation corresponding to the first message; the sending end, within a first time period after receiving the first retransmission request, if receiving a second retransmission request indicating the message sequence number of the first message, determines that the second retransmission request is a repeated retransmission request relative to the first retransmission request, wherein the first time period is determined based on at least a first network connected to the sending end for sending the first message and a first communication protocol stack used by the sending end to send the first message.

[0005] Through the first aspect of the present application, it is achieved to efficiently and reliably deal with the packet loss problem in high-speed data transmission applications with long distances and large flows, to improve the overall business performance and the overall message forwarding efficiency, and to flexibly adapt to the complex and changeable situations related to the network and transmission links between different senders and different receivers, and to adapt to the limited computing power and storage resources of the equipment or nodes themselves used to achieve long-distance message transmission by reducing the algorithm complexity and alleviating the burden.

[0006] In a possible implementation of the first aspect of the present application, a first message forwarding device is used to forward the first message, and the first message forwarding device, in response to detecting loss of the first message, sends the first retransmission request to the sending end.

[0007] In a possible implementation manner of the first aspect of the present application, the first message forwarding device detects the loss of the first message based on a cyclic redundancy check or a cache overflow check.

[0008] In a possible implementation of the first aspect of the present application, the sending end sends the first message to a first receiving end, and the first receiving end, based on a first timeout judgment mechanism, detects the loss of the first message, and then sends the second retransmission request to the sending end.

[0009] In a possible implementation manner of the first aspect of the present application, the duration of the first time period is at least longer than the waiting time indicated by the first timeout determination mechanism.

[0010] In a possible implementation of the first aspect of the present application, the first message forwarding device, in response to detecting the loss of the first message, sends a message to the first receiving end to notify the first receiving end, and the first message forwarding device sends the first retransmission request to the sending end.

[0011] In a possible implementation manner of the first aspect of the present application, the first receiving end, in response to receiving a message from the first message forwarding device, terminates detecting whether the first message is lost based on the first timeout judgment mechanism.

[0012] In a possible implementation manner of the first aspect of the present application, the sending end is connected to the first receiving end through the first network, and the first receiving end receives the message from the first network through the first communication protocol stack.

[0013] In a possible implementation manner of the first aspect of the present application, the sending end uses a first communication link of the first network to send the first message to the first receiving end, and the first communication link includes the first message forwarding device.

[0014] In a possible implementation of the first aspect of the present application, the sending end sends the first message to a first receiving end, and the first retransmission request or the second retransmission request is issued by the first receiving end, wherein, when the second retransmission request is issued by the first receiving end, the first retransmission request is issued by a message forwarding device used to forward the first message.

[0015] In a possible implementation of the first aspect of the present application, the sending end performs a message retransmission operation corresponding to the first message, including: sending a second message to a first receiving end associated with the first message, the payload of the second message being the same as the payload of the first message.

[0016] In a possible implementation manner of the first aspect of the present application, the message sequence number of the second message is different from the message sequence number of the first message.

[0017] In a possible implementation manner of the first aspect of the present application, the lifetime of the second message is different from the lifetime of the first message.

[0018] In a possible implementation of the first aspect of the present application, the method also includes: the sending end, after the first time period after receiving the first retransmission request, if receiving a third retransmission request indicating the message sequence number of the first message, determines that the third retransmission request is a valid retransmission request relative to the first retransmission request, and again performs the message retransmission operation corresponding to the first message.

[0019] In a possible implementation of the first aspect of the present application, the sending end performs a message retransmission operation corresponding to the first message, including: sending a second message to a first receiving end associated with the first message, the payload of the second message being the same as the payload of the first message, and the sending end again performs a message retransmission operation corresponding to the first message, including: sending a third message to the first receiving end, the payload of the third message being the same as the payload of the first message.

[0020] In a possible implementation of the first aspect of the present application, the message sequence number of the second message is different from the message sequence number of the first message, the message sequence number of the third message is different from the message sequence number of the first message, and the message sequence number of the third message is different from the message sequence number of the second message.

[0021] In a possible implementation of the first aspect of the present application, the lifetime of the second message is different from the lifetime of the first message, the lifetime of the third message is different from the lifetime of the first message, and the lifetime of the third message is different from the lifetime of the second message.

[0022] In a possible implementation of the first aspect of the present application, when the first network is a transmission control protocol / internet protocol network and the first communication protocol stack is a transmission control protocol stack, the length of the first time period is 10 milliseconds; when the first network is a remote direct memory access network and the first communication protocol stack is a remote direct memory access protocol stack, the length of the first time period is 8 milliseconds.

[0023] In a possible implementation of the first aspect of the present application, the messages sent by the sending end using the first communication protocol stack and through the first network are all timestamped, and the first message forwarding device is used to forward the first message, wherein when the first message forwarding device detects the loss of the first message based on the timestamp check, the first message forwarding device sends the first retransmission request to the sending end.

[0024] In a possible implementation manner of the first aspect of the present application, the first network is a hybrid network including old devices and new devices.

[0025] In a second aspect, an embodiment of the present application further provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements a method according to any one of the implementation modes of any of the above aspects when executing the computer program.

[0026] In a third aspect, an embodiment of the present application further provides a computer-readable storage medium, which stores computer instructions. When the computer instructions are executed on a computer device, the computer device executes a method according to any one of the implementation methods of any of the above aspects.

[0027] In a fourth aspect, an embodiment of the present application further provides a computer program product, which includes instructions stored on a computer-readable storage medium, and when the instructions are executed on a computer device, the computer device executes a method according to any one of the implementation methods of any of the above aspects. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0029] Figure 1 A schematic diagram of an application scenario of high-speed data transmission with a long distance and a large flow rate;

[0030] Figure 2 A flowchart of a method for message retransmission provided in an embodiment of the present application;

[0031] Figure 3 A schematic diagram of message retransmission according to the first implementation mode provided in the embodiment of the present application;

[0032] Figure 4 A schematic diagram of message retransmission according to the second implementation mode provided in the embodiment of the present application;

[0033] Figure 5 A schematic diagram of the structure of a computing device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0034] The embodiments of the present application will be further described in detail below in conjunction with the accompanying drawings.

[0035] It should be understood that, in the description of this application, "at least one" means one or more, and "a plurality of" means two or more. In addition, unless otherwise specified, the words "first", "second", etc. are only used for the purpose of distinguishing descriptions, and cannot be understood as indicating or implying relative importance, nor can they be understood as indicating or implying an order.

[0036] Figure 1 Schematic diagram of an application scenario of high-speed data transmission with long distance and large flow. Figure 1As shown, the transmitting end A110 sends data to the receiving end A120 through the first network A102. The first network A102 can be Ethernet or other types of networks. The transmission distance between the transmitting end A110 and the receiving end A120 is long, so the transmission time is long. Sending data from the transmitting end A110 to the receiving end A120 via the first network A102 belongs to a long-distance, high-speed data transmission application with large traffic. With the development of technologies such as high-performance computing, artificial computing, and data centers, sometimes it is necessary to collect a large amount of data in one place and then transmit the data to another place for processing, such as for training large neural network models or using trained neural network models for reasoning. For example, the East-West Computing Project needs to transmit the original data from the eastern coastal provinces to the data center in the western provinces for processing, so it involves long-distance, high-speed data transmission with large traffic across multiple provincial administrative regions. In addition, sometimes it is also necessary to coordinate computing clusters deployed in different places to collaborate to complete large projects, such as sharing privacy data between different subjects to complete collaborative privacy computing tasks. These computing clusters may also need to frequently send and receive large traffic data and involve longer transmission distances. As the data traffic scale increases, the data transmission rate increases, and the transmission distance increases, it is more susceptible to various interferences and emergencies, such as equipment failures, network congestion, etc., so there is a higher probability of packet loss. For computing tasks such as high-performance computing and artificial intelligence computing, the occurrence of packet loss will affect the business performance and overall efficiency of upper-layer services. For example, the data carried by the packet loss may be the intermediate results that subsequent processes or other processes rely on. This means that after the packet loss occurs, the affected processes and processes may need to be suspended, thereby affecting the overall business performance and overall efficiency. Therefore, with the development of technologies such as high-performance computing, artificial computing, and data centers, as well as the growth of various application requirements such as the training and reasoning requirements of generative artificial intelligence large models, it is necessary to minimize the negative impact of packet loss on upper-layer services, and to overcome the problem of higher packet loss probability caused by longer transmission distances and longer transmission times in long-distance, high-speed data transmission applications with large traffic.

[0037] Continue reading Figure 1, sending data from the sending end A110 to the receiving end A120 via the first network A102 belongs to a high-speed data transmission application with long distance and large flow. Here, the first network A102 includes multiple devices or multiple nodes for realizing long-distance message transmission. These devices or nodes can be such as message forwarding devices, routers, servers, security nodes, etc. The message sent from the sending end A110 passes through the devices or nodes in the first network A102 and finally reaches the receiving end A120. The receiving end A120 determines whether a message is lost through a timeout judgment mechanism. That is to say, if the receiving end A120 does not receive a specific message before the end of the specified time period, it can be inferred that the specific message has been lost during the message transmission process. After determining that packet loss has occurred, the receiving end A120 sends a notification of message loss and a request for retransmission of the message to the sending end A110. However, before receiving the retransmitted message, the receiving end A120 may need to suspend the affected processes and procedures (for example, the data carried by the message with packet loss may be the intermediate result relied on by the subsequent process or other process), which is not conducive to improving the overall business performance and overall efficiency. In addition, because the receiving end A120 may need to suspend the affected processes and procedures, it is difficult to fully utilize the bandwidth, which is not conducive to improving the overall message forwarding efficiency. In order to solve the problem of overall business performance degradation and overall inefficiency caused by packet loss, it is necessary to consider the complex and changeable situations faced in high-speed data transmission applications with long distances and large traffic. For example, the sending end A110 may need to send messages to multiple receiving ends including the receiving end A120. These different receiving ends may realize long-distance message transmission through the first network A102, or may realize long-distance message transmission through other networks different from the first network A102. For other receiving ends that realize long-distance message transmission through the first network A102, the same transmission link as the receiving end A120 may be used, that is, the same device or node may be passed through, or different transmission links may be used. For a certain device or node in the transmission link from the sending end A110 to the receiving end A120 in the first network A102, the device or node may also be used to forward messages sent from other sending ends to the receiving end A120, or, at the same time, used to forward messages from the sending end A110 to other receiving ends. Therefore, in high-speed data transmission applications with long distances and large traffic, in some cases a sending end needs to send messages to multiple receiving ends, and in some cases a receiving end needs to receive messages from multiple sending ends, and different sending ends or different receiving ends may transmit messages through different networks. In addition, messages sent from the same sending end to the same receiving end may use different transmission links at different times. For example, due to network congestion or network status, the node that the next message passes through may be different from the node that the previous message passed through. In some cases, it may also be necessary to switch to a different network, such as Figure 1 The first network A102 shown cannot be accessed for some reason, so that the sender A110 sends data to the receiver A120 via other networks. Therefore, in order to efficiently and reliably solve the problem of overall service performance degradation and overall inefficiency caused by packet loss in high-speed data transmission applications with long distances and large traffic, it is necessary to consider the complex and changeable situations related to the network and transmission links between different senders and different receivers, and the limited computing power resources and storage resources of the equipment or nodes used to achieve long-distance message transmission. The following is a detailed description of a method, computer equipment, medium and program for message retransmission provided by the embodiment of the present application, how to achieve efficient and reliable response to the packet loss problem in high-speed data transmission applications with long distances and large traffic, and achieve the improvement of overall service performance and overall message forwarding efficiency, and can flexibly adapt to the complex and changeable situations related to the network and transmission links between different senders and different receivers, and by reducing the complexity of the algorithm and reducing the burden, it can adapt to the limited computing power resources and storage resources of the equipment or nodes used to achieve long-distance message transmission.

[0038] Figure 2 A flow chart of a method for message retransmission provided in an embodiment of the present application. Figure 2 As shown, the method includes the following steps.

[0039] Step S210: The sending end, in response to receiving a first retransmission request indicating a message sequence number of a first message, determines that the first message is lost, and performs a message retransmission operation corresponding to the first message.

[0040] Step S220: The sending end, within a first time period after receiving the first retransmission request, if receiving a second retransmission request indicating the message sequence number of the first message, determines that the second retransmission request is a repeated retransmission request relative to the first retransmission request, wherein the first time period is determined at least based on a first network to which the sending end is connected for sending the first message and a first communication protocol stack used by the sending end to send the first message.

[0041] See also Figure 2In step S210, the transmitting end, in response to receiving the first retransmission request indicating the message sequence number of the first message, determines the loss of the first message and performs the message retransmission operation corresponding to the first message. In this way, the transmitting end determines the loss of the first message and performs the message retransmission operation corresponding to the first message based on the first retransmission request indicating the message sequence number of the first message. It should be understood that step S210 defines how the transmitting end responds to receiving the first retransmission request indicating the message sequence number of the first message. The transmitting end can determine whether the first retransmission request indicating the message sequence number of the first message is received by any suitable detection mechanism, which is not specifically limited here. Starting from the time point when the transmitting end receives the first retransmission request, within the first time period after receiving the first retransmission request, the transmitting end performs the operation defined in step S220, that is: the transmitting end, within the first time period after receiving the first retransmission request, if the second retransmission request indicating the message sequence number of the first message is received, determines that the second retransmission request is a repeated retransmission request relative to the first retransmission request. In this way, a message retransmission mechanism for packet loss is provided around the sending end, and the message retransmission mechanism is triggered by the event that the sending end receives a first retransmission request indicating the message sequence number of the first message, and the first time period after the sending end receives the first retransmission request is used as the key time point, and for the second retransmission request indicating the message sequence number of the first message received by the sending end within the first time period after receiving the first retransmission request, it is determined that the second retransmission request is a repeated retransmission request relative to the first retransmission request. Therefore, in the message retransmission mechanism for packet loss provided around the sending end, the sending end bears these burdens: detecting whether the first retransmission request indicating the message sequence number of the first message is received, recording the time point when the sending end receives the first retransmission request indicating the message sequence number of the first message, and detecting whether the second retransmission request indicating the message sequence number of the first message is received within the first time period after the sending end receives the first retransmission request. In this way, by arranging the sending end to bear the above-mentioned burden, including the sending end determining whether to trigger the message retransmission mechanism for packet loss (the sending end detects the occurrence of the event that the sending end receives the first retransmission request indicating the message sequence number of the first message), and the sending end determining whether to receive a repeated retransmission request relative to the first retransmission request (the sending end detects the occurrence of the event that the second retransmission request indicating the message sequence number of the first message is received within a first time period after the sending end receives the first retransmission request), and the sending end takes corresponding operations, which means that the burden on devices or nodes other than the sending end is reduced, for example, the burden on devices or nodes used to implement long-distance message transmission is reduced. Therefore, Figure 2The method for message retransmission shown can well adapt to the limited computing power resources and storage resources of the equipment or nodes themselves used to achieve long-distance message transmission.

[0042] Continue reading Figure 2 The sending end triggers the message retransmission mechanism for packet loss by detecting the occurrence of the event that the sending end receives the first retransmission request indicating the message sequence number of the first message, and determines that the second retransmission request is a repeated retransmission request relative to the first retransmission request by detecting the occurrence of the event that the sending end receives the second retransmission request indicating the message sequence number of the first message within the first time period after the sending end receives the first retransmission request. It can be seen that Figure 2The method for message retransmission shown does not rely on the sender to distinguish which object the retransmission request (first retransmission request or second retransmission request) is issued by. As described above, considering the complex and changeable situations related to the network and transmission link between different senders and different receivers, the retransmission request may be issued by the receiver or a device or node used to implement long-distance message transmission. For example, the receiver may not receive a specific message within a specified time period set by the timeout judgment mechanism, so it determines that the message is lost and sends a message loss notification and a request to retransmit the message to the sender. For another example, a message transfer device or a message forwarding device between the sender and the receiver may detect the loss of a specific message and send a message loss notification and a request to retransmit the message to the sender. Depending on factors such as transmission distance, network congestion, and network status, the transmission time required for the request to retransmit the message sent to the sender to reach the sender may vary. In addition, the specific transmission link adopted by the message forwarding device or the receiver to send the request to retransmit the message to the sender may also vary. Generally speaking, if a message forwarding device finds that a message is lost, it means that the lost message cannot be further forwarded to the receiving end through the message forwarding device, so the receiving end must not be able to detect the lost message, which means that the receiving end may determine that the message is lost based on the timeout judgment mechanism and send a notification of message loss and a request to retransmit the message to the sending end. Therefore, from the perspective of the sending end, it is possible to receive two requests for retransmission from the message forwarding device and the receiving end respectively. In order to improve the overall service performance and improve the overall message forwarding efficiency, the sending end detects the occurrence of the event that the second retransmission request indicating the message sequence number of the first message is received within the first time period after the sending end receives the first retransmission request, thereby determining that the second retransmission request is a repeated retransmission request relative to the first retransmission request. Therefore, the sending end does not distinguish which object the retransmission request is issued by, nor does it distinguish whether the retransmission request is from the receiving end or the message forwarding device, so that it can flexibly adapt to changes in transmission time, as well as flexibly adapt to the influence of factors such as transmission distance, network congestion, and network status in actual applications. The sending end triggers the message retransmission mechanism for packet loss by detecting the occurrence of the event that the sending end receives the first retransmission request indicating the message sequence number of the first message, and then, taking the first time period after the sending end receives the first retransmission request as the key time point, for the second retransmission request indicating the message sequence number of the first message received by the sending end within the first time period after receiving the first retransmission request, it is determined that the second retransmission request is a repeated retransmission request relative to the first retransmission request. In this way, Figure 2 The method for message retransmission shown can flexibly adapt to complex and changing situations related to networks and transmission links between different sending ends and different receiving ends.

[0043] Continue reading Figure 2 , the first time period is pre-set, and, Figure 2 The method for message retransmission shown defines that the first time period is determined at least based on the first network connected to the sender for sending the first message and the first communication protocol stack used by the sender to send the first message. For example, when the first network is a Transmission Control Protocol / Internet Protocol (TCP / IP) network and the first communication protocol stack is a Transmission Control Protocol (TCP) stack, the duration of the first time period is 10 milliseconds. For another example, when the first network is a Remote Direct Memory Access (RDMA) network and the first communication protocol stack is a Remote Direct Memory Access protocol stack, the duration of the first time period is 8 milliseconds. Here, the first communication protocol stack generally corresponds to a specific communication protocol and the first network also follows the specific communication protocol. For example, when the first communication protocol stack is a Remote Direct Memory Access protocol stack, the Remote Direct Memory Access protocol stack follows a specific Remote Direct Memory Access communication protocol, and the first network is a Remote Direct Memory Access network and also follows the specific Remote Direct Memory Access communication protocol, so that data access and data storage based on Remote Direct Memory Access technology can be achieved between two remote hosts. Different protocol stacks each have a certain hierarchical structure and may therefore have different delays. The transmission control protocol stack, or TCP protocol stack, includes a four-layer hierarchical structure, namely the application layer, the socket layer, the transmission protocol driver layer, and the network card driver layer. Therefore, the message sent using the transmission control protocol stack needs to go through such a four-layer hierarchical structure from the software application to the network card hardware, and the application layer, the socket layer, and the transmission protocol driver layer each have their own cache, which involves the copying and delay of messages between these caches, corresponding to the first time period of 10 milliseconds. In contrast, the remote direct memory access protocol stack includes a two-layer hierarchical structure, namely the application layer and the network card driver layer. Therefore, the message sent using the remote direct memory access protocol stack needs to go through such a two-layer hierarchical structure from the software application to the network card hardware, and can be directly copied from the cache of the application layer to the network card hardware, corresponding to the first time period of 8 milliseconds. In this way, there are differences in delay when sending messages through different communication protocols and corresponding communication protocol stacks. In addition, in the long-distance message transmission application, the more devices the message passes through, the greater the delay. Generally speaking, passing through a switch will cause a delay of 1 to 2 microseconds. Figure 2The method for message retransmission shown in the figure, by limiting the first time period to be determined at least based on the first network connected to the sender for sending the first message and the first communication protocol stack used by the sender to send the first message, thereby taking into account the delay differences under the action of different networks and different communication protocol stacks. In some embodiments, the first time period is at least based on the hierarchical structure of the first communication protocol stack, for example, the transmission control protocol stack includes a four-layer hierarchical structure of the application layer, the socket layer, the transmission protocol driver layer and the network card driver layer, and the remote direct memory access protocol stack includes a two-layer hierarchical structure of the application layer and the network card driver layer. In some embodiments, the first time period is at least based on the number of switches in the first network, for example, one switch will cause a delay of 1 microsecond to 2 microseconds. In this way, by presetting a first time period (the first time period is at least determined based on the first network to which the sender is connected for sending the first message and the first communication protocol stack used by the sender to send the first message), the sender can build a detection mechanism for repeated retransmission requests by combining the network and communication protocol stack used by the sender to send the message detected to be lost (i.e., the first message) without distinguishing which object the retransmission request is issued by, and utilizing the first time period, which is conducive to efficiently and reliably determining repeated retransmission requests, thereby avoiding repeated operations and helping to improve overall business performance and overall message forwarding efficiency.

[0044] In conclusion, Figure 2The method for message retransmission shown in the figure arranges the sending end to bear the main burden, including the sending end determining whether to trigger the message retransmission mechanism for packet loss (the sending end detects the occurrence of the event that the sending end receives a first retransmission request indicating the message sequence number of the first message), and the sending end determining whether to receive a repeated retransmission request relative to the first retransmission request (the sending end detects the occurrence of the event that the second retransmission request indicating the message sequence number of the first message is received within a first time period after the sending end receives the first retransmission request), and the sending end takes corresponding operations, thereby reducing the burden on devices or nodes other than the sending end, for example, reducing the burden on devices or nodes used to achieve long-distance message transmission, and can well adapt to the limited computing power resources and storage resources of the devices or nodes used to achieve long-distance message transmission; the sending end does not distinguish which object sends the retransmission request, nor does it distinguish whether the retransmission request comes from The receiving end is also a message forwarding device, so it can flexibly adapt to changes in transmission time, as well as the influence of factors such as transmission distance, network congestion, and network status in actual applications, and can flexibly adapt to the complex and changeable situations related to the network and transmission links between different sending ends and different receiving ends; by pre-setting a first time period (the first time period is at least determined based on the first network connected to the sending end for sending the first message and the first communication protocol stack used by the sending end to send the first message), the sending end can combine the network and communication protocol stack used by the sending end to send the message (that is, the first message) that is detected to be lost without distinguishing which object the retransmission request is from, and use the first time period to build a detection mechanism for repeated retransmission requests, which is conducive to efficiently and reliably judging repeated retransmission requests, thus avoiding repeated operations and helping to improve overall business performance and overall message forwarding efficiency. In addition, Figure 2 The method for message retransmission shown does not require actual coordination between the sender and the receiver, but by presetting a first time period (the first time period is at least determined based on a first network connected to the sender for sending the first message and a first communication protocol stack used by the sender to send the first message), so the same sender can flexibly adapt to various different receivers and connect through various different networks. In this way, Figure 2 The method for message retransmission shown achieves the improvement of overall business performance and overall message forwarding efficiency, and can flexibly adapt to complex and changeable situations related to networks and transmission links between different senders and different receivers, as well as adapt to the limited computing power and storage resources of the equipment or nodes used to achieve long-distance message transmission by reducing algorithm complexity and alleviating burden.

[0045] See also Figure 2 In the method for message retransmission shown, the first message forwarding device is used to forward the first message, and the first message forwarding device, in response to detecting the loss of the first message, sends the first retransmission request to the sending end. As mentioned above, Figure 2The method for message retransmission shown in the figure arranges the sending end to bear the main burden, including the sending end judging whether to trigger the message retransmission mechanism for packet loss (the sending end detects the occurrence of the event that the sending end receives the first retransmission request indicating the message sequence number of the first message), and the sending end judging whether to receive a repeated retransmission request relative to the first retransmission request (the sending end detects the occurrence of the event that the sending end receives the second retransmission request indicating the message sequence number of the first message within the first time period after the sending end receives the first retransmission request), and the sending end takes corresponding operations, so that the burden on devices or nodes other than the sending end is reduced, for example, the burden on devices or nodes used to achieve long-distance message transmission is reduced, and the limited computing power resources and storage resources of the devices or nodes used to achieve long-distance message transmission can be well adapted to. Here, the first message forwarding device is a device or node used to forward the first message, and the first message forwarding device has a detection function that can detect the loss of the first message. The first message forwarding device, in response to detecting the loss of the first message, sends the first retransmission request to the sending end. It should be understood that the first message forwarding device can detect the loss of the first message through any suitable detection function, which is not specifically limited here. As mentioned above, the first network is the network to which the sender is connected for sending the first message, so the first message forwarding device for forwarding the first message also belongs to the first network. The retransmission request may be issued by the receiving end or a device or node used to achieve long-distance message transmission. For example, the receiving end may not receive a specific message within a specified time period set by the timeout judgment mechanism, so it judges that the message is lost and sends a notification of message loss and a request for retransmission of the message to the sending end. Therefore, by enabling the first message forwarding device to have a message loss detection function and in response to detecting the loss of the first message, sending the first retransmission request to the sending end, there is no need to wait until the receiving end finds that the message is lost, and the first message forwarding device can send the first retransmission request to the sending end, thereby triggering the message retransmission mechanism for packet loss at the sending end. If we only rely on the timeout judgment mechanism of the receiving end or other message loss detection mechanisms to judge message loss and send retransmission requests, in high-speed data transmission applications with long distances and large traffic, the request sent by the receiving end takes a long time to reach the sending end, and then the sending end will retransmit the message, which leads to low efficiency and is not conducive to full utilization of bandwidth.Therefore, by relying on the first message forwarding device's own message loss detection function, an additional message loss detection mechanism of the first message forwarding device can be provided on the basis of the message loss detection mechanism provided by the timeout judgment mechanism of the receiving end, so that after the first message forwarding device finds packet loss, it can notify the sending end to retransmit the message, thereby shortening the time from message loss to message retransmission, helping to reduce the negative impact of packet loss on upper-layer services, and efficiently and reliably solving the problem of overall service performance degradation and overall inefficiency caused by packet loss in high-speed data transmission applications with long distances and large traffic. Considering that current network communication protocols such as TCP protocol and RoCE protocol rely on packet loss interaction between the sending end and the receiving end, the intermediate network devices are generally considered to be transparent. Therefore, with more and more high-traffic dedicated lines (for example, greater than or equal to 10 megabits per second), long-distance forwarding (for example, from Dongguan to Beijing, from Beijing to Wuxi), etc., by allowing the intermediate network devices to participate, for example, by enabling the first message forwarding device to have a message loss detection function and sending the first retransmission request to the sending end in response to detecting the loss of the first message, this achieves advance notification of the sending end to retransmit, which can greatly improve forwarding efficiency and improve dedicated line bandwidth utilization.

[0046] Furthermore, by enabling the first message forwarding device to have a message loss detection function and in response to detecting the loss of the first message, sending the first retransmission request to the sending end, a mechanism is constructed for the network device to detect packet loss and notify the sending end to retransmit, which can be combined with the detection mechanism of repeated retransmission requests constructed by the sending end using the first time period. On the one hand, fast retransmission is initiated after the packet is lost, which reduces the impact of packet loss on upper-layer services in large-volume data transmission, and is also conducive to overcoming the problem of increased packet loss probability in long-distance message transmission; on the other hand, the sending end can efficiently and reliably determine the repeated retransmission request, avoiding repeated operations, which helps to improve the overall business performance and improve the overall message forwarding efficiency. It should be understood that the first message forwarding device is used to forward the first message, and therefore, the first message forwarding device is used to realize message transmission from the sending end to the receiving end, and there may be other message forwarding devices used to realize message transmission from the sending end to the receiving end. For example, Figure 1The first network A102 shown includes multiple devices or multiple nodes for realizing long-distance message transmission, and these devices or nodes can be message forwarding devices, routers, servers, security nodes, etc. In some embodiments, the first network is a network connected to the sender for sending the first message, and the multiple message forwarding devices in the first network for realizing message transmission from the sender to the receiver all have a message loss detection function and can send a message retransmission request to the sender in response to the detection of message loss. For example, assuming that it is necessary to pass through two or three or more message forwarding devices including the first message forwarding device from the sender to the receiver via the first network, then these message forwarding devices all have a message loss detection function, so when any of the message forwarding devices detects message loss, it can send a message retransmission request to the sender. Because only the message forwarding device is required to have the message loss detection function and the function of sending a message retransmission request to the sender, the burden on the message forwarding device is less, and it can well adapt to the limited computing resources and storage resources of the device or node itself used to realize long-distance message transmission. In some other embodiments, the first network is a network to which the sender is connected for sending the first message, and a part of the message forwarding devices in the first network for implementing message transmission from the sender to the receiver have a message loss detection function and can send a message retransmission request to the sender in response to detecting the message loss. For example, assuming that two or three or more message forwarding devices including the first message forwarding device are required to pass from the sender to the receiver via the first network, then a part of the message forwarding devices (including the first message forwarding device) in these message forwarding devices have a message loss detection function and a message retransmission request function to the sender, and another part of the message forwarding devices do not have a message retransmission request function to the sender; this means that only a part of the message forwarding devices need to be selected for modification so that the part of the message forwarding devices have a message loss detection function and a message retransmission request function to the sender, and the other part of the message forwarding devices can adopt existing devices or nodes, thereby reducing the design complexity and facilitating promotion and application to existing networks. In some examples, simulation tests can be used to determine devices or nodes in the first network that may have a high risk of packet loss, or network links with a high probability of packet loss. Then, targeted deployments are made on key nodes with functions of detecting packet loss and sending packet retransmission requests to the sender. Alternatively, only key packet forwarding devices are modified and upgraded so that these key packet forwarding devices have functions of detecting packet loss and sending packet retransmission requests to the sender. This can effectively improve overall business performance and overall packet forwarding efficiency while controlling overall costs.

[0047] In a possible implementation, the first message forwarding device detects the loss of the first message based on a cyclic redundancy check (CRC) or a buffer overflow check. In this way, through the cyclic redundancy check, a cyclic redundancy check error can be identified, such as when the first message forwarding device finds that a bit error occurs on the line from the upstream device, thereby providing a basis for judging the detection of message loss. In addition, through the buffer overflow check, for example, when the first message forwarding device finds that the message needs to be discarded because the buffer is insufficient, it also provides a basis for judging the detection of message loss. It should be understood that the first message forwarding device can detect the loss of the first message through any suitable detection function, such as combining the cyclic redundancy check and the buffer overflow check with other verification mechanisms. In addition, assuming that multiple message forwarding devices including the first message forwarding device are required to pass from the sending end to the receiving end via the first network, these multiple message forwarding devices can each have a message loss detection function, and each can use the same or different verification mechanisms to implement the message loss detection function. In this way, the overall service performance and the overall message forwarding efficiency are improved, and the complex and changeable situations related to the network and transmission links between different sending ends and different receiving ends can be flexibly adapted, and the characteristics of the message forwarding device can also be flexibly adapted. Further, by arranging the sending end to bear the main burden, including the sending end judging whether to trigger the message retransmission mechanism for packet loss (the sending end detects the occurrence of the event that the sending end receives the first retransmission request indicating the message sequence number of the first message), and the sending end judging whether to receive a repeated retransmission request relative to the first retransmission request (the sending end detects the occurrence of the event that the sending end receives the second retransmission request indicating the message sequence number of the first message within the first time period after the sending end receives the first retransmission request), and the sending end takes corresponding operations, so that the burden on devices or nodes other than the sending end is reduced, which means that the first message forwarding device or other intermediate network devices with the function of detecting message loss do not need to store the historical status of the message or forward the message status, which is conducive to realizing high-speed message forwarding and adapting to the limited computing power resources and storage resources of the device or node itself used to realize long-distance message transmission.

[0048] In a possible implementation, the transmitting end sends the first message to the first receiving end, and the first receiving end, based on the first timeout judgment mechanism, detects the loss of the first message, and then sends the second retransmission request to the transmitting end. In this way, by combining the message loss detection function of the first message forwarding device itself and the message loss detection mechanism provided by the first timeout judgment mechanism of the first receiving end, a double guarantee of detecting message loss and sending a retransmission request to the transmitting end is provided, which is conducive to shortening the time from message loss to message retransmission, helping to reduce the negative impact of packet loss on upper-layer services, and efficiently and reliably solving the problem of overall service performance degradation and overall inefficiency caused by packet loss in high-speed data transmission applications with long distances and large traffic; and, by efficiently and reliably judging repeated retransmission requests through the transmitting end, repeated operations are avoided, which helps to improve overall service performance and overall message forwarding efficiency. In some embodiments, the duration of the first time period is at least longer than the waiting time indicated by the first timeout judgment mechanism. The receiving end determines whether the message is lost according to the waiting time indicated by the first timeout judgment mechanism, that is, if the receiving end has not received the first message after the waiting time indicated by the first timeout judgment mechanism expires, the first message is determined to be lost. Therefore, by setting the length of the first time period to be at least longer than the waiting time indicated by the first timeout judgment mechanism, it is conducive to realizing the efficient and reliable judgment of repeated retransmission requests by the sending end, avoiding repeated operations, and helping to improve the overall service performance and the overall message forwarding efficiency.

[0049] In some embodiments, the first message forwarding device, in response to detecting the loss of the first message, sends a message to the first receiving end to notify the first receiving end, and the first message forwarding device sends the first retransmission request to the sending end. In some examples, the first receiving end, in response to receiving the message from the first message forwarding device, terminates the detection of whether the first message is lost based on the first timeout judgment mechanism. In this way, combined with the message loss detection function of the first message forwarding device itself and the message loss detection mechanism provided by the first timeout judgment mechanism of the first receiving end, a dual guarantee of detecting message loss and sending a retransmission request to the sending end is provided, which is conducive to shortening the time from message loss to message retransmission, helping to reduce the negative impact of packet loss on upper-layer services, and efficiently and reliably solving the problem of overall service performance degradation and overall inefficiency caused by packet loss in high-speed data transmission applications with long distances and large traffic; and it is conducive to realizing efficient and reliable judgment of repeated retransmission requests through the sending end, avoiding repeated operations, and helping to improve overall service performance and overall message forwarding efficiency.

[0050] In some embodiments, the transmitting end is connected to the first receiving end through the first network, and the first receiving end receives the message from the first network through the first communication protocol stack. In this way, the time delay difference under the action of different networks and different communication protocol stacks is taken into account, and the network and communication protocol stack used by the transmitting end to send the message (that is, the first message) that is detected to be lost are combined, and the detection mechanism of repeated retransmission requests is constructed using the first time period, which is conducive to efficiently and reliably judging repeated retransmission requests, thus avoiding repeated operations and helping to improve overall business performance and overall message forwarding efficiency.

[0051] In some embodiments, the sender uses the first communication link of the first network to send the first message to the first receiver, and the first communication link includes the first message forwarding device. In this way, flexible adaptation to complex and changing situations related to networks and transmission links between different senders and different receivers is achieved.

[0052] In a possible implementation, the transmitting end transmits the first message to the first receiving end, and the first retransmission request or the second retransmission request is issued by the first receiving end, wherein when the second retransmission request is issued by the first receiving end, the first retransmission request is issued by the message forwarding device used to forward the first message. In this way, the overall service performance and the overall message forwarding efficiency are improved, and the complex and changeable situations related to the network and transmission links between different transmitting ends and different receiving ends can be flexibly adapted, and the limited computing power resources and storage resources of the equipment or nodes used to achieve long-distance message transmission can be adapted by reducing the algorithm complexity and reducing the burden.

[0053] In a possible implementation, the transmitting end performs a message retransmission operation corresponding to the first message, including: sending a second message to the first receiving end associated with the first message, and the payload of the second message is the same as the payload of the first message. The data carried by the message with packet loss may be an intermediate result relied on by subsequent processes or other processes. By resending the payload of the message with packet loss, it is helpful to reduce the impact of packet loss on the overall service performance and overall efficiency. In this way, by sending the second message to the first receiving end associated with the first message by the transmitting end, the payload of the second message is the same as the payload of the first message, which reduces the burden of the device or node used to achieve long-distance message transmission, improves the overall service performance and improves the overall message forwarding efficiency. In some embodiments, the message sequence number of the second message is different from the message sequence number of the first message. It should be understood that the transmitting end performs a message retransmission operation corresponding to the first message, including: sending the second message to the first receiving end associated with the first message. Here, the message sequence number of the second message is different from the message sequence number of the first message. This is because the second message is the corresponding operation made after the sending end determines to trigger the message retransmission mechanism for packet loss. Therefore, the sending end can integrate the message retransmission operation corresponding to the first message into the packet sending process, packet sending queue or packet sending service of the sending end, thereby sending the second message to the first receiving end associated with the first message without recovering the first message that is judged to be lost. This reduces the complexity of the algorithm and saves the resources required to recover the message. Therefore, the message sequence number of the second message is different from the message sequence number of the first message, which means that the second message is not the first message recovered by the recovery operation. In some embodiments, the time to live (TTL) of the second message is different from the time to live of the first message. In this way, the sending end can integrate the message retransmission operation corresponding to the first message into the packet sending process, packet sending queue or packet sending service of the sending end, thereby sending the second message to the first receiving end associated with the first message without recovering the first message that is judged to be lost. In this way, the lifetime of the second message is different from the lifetime of the first message, which means that the second message can adopt a completely new lifetime, such as the time for the new data packet to circulate, which reduces the complexity of the algorithm and saves the resources required to recover the message.

[0054] In a possible implementation, the method further includes: the transmitting end, after the first time period after receiving the first retransmission request, if receiving a third retransmission request indicating the message sequence number of the first message, determines that the third retransmission request is a valid retransmission request relative to the first retransmission request, and performs the message retransmission operation corresponding to the first message again. As described above, Figure 2The method for message retransmission shown in the figure, by limiting the first time period to be determined at least based on the first network connected to the sender for sending the first message and the first communication protocol stack used by the sender for sending the first message, thus taking into account the delay difference under the action of different networks and different communication protocol stacks. From the sender's point of view, it is possible to receive two requests for retransmission respectively from the message forwarding device and the receiving end. In order to improve the overall service performance and improve the overall message forwarding efficiency, the sender detects the occurrence of the event that the second retransmission request indicating the message sequence number of the first message is received within the first time period after the sender receives the first retransmission request, thereby determining that the second retransmission request is a repeated retransmission request relative to the first retransmission request. The sender does not distinguish which object the retransmission request is issued by, nor does it distinguish whether the retransmission request is from the receiving end or the message forwarding device, so that it can flexibly adapt to the changes in transmission time, as well as the influence of factors such as transmission distance, network congestion, and network status in actual applications. The sending end triggers the message retransmission mechanism for packet loss by detecting the occurrence of the event that the sending end receives the first retransmission request indicating the message sequence number of the first message, and then, taking the first time period after the sending end receives the first retransmission request as the key time point, for the second retransmission request indicating the message sequence number of the first message received by the sending end within the first time period after receiving the first retransmission request, the sending end determines that the second retransmission request is a repeated retransmission request relative to the first retransmission request. Therefore, if the sending end receives the third retransmission request indicating the message sequence number of the first message after the first time period after receiving the first retransmission request, the sending end determines that the third retransmission request is a valid retransmission request relative to the first retransmission request, and performs the message retransmission operation corresponding to the first message again. In this way, using the first time period to build a detection mechanism for repeated retransmission requests is conducive to efficiently and reliably determining repeated retransmission requests, thus avoiding repeated operations, and helping to improve overall business performance and overall message forwarding efficiency; and using the first time period to build a detection mechanism for identifying valid retransmission requests is conducive to efficiently and reliably determining valid retransmission requests and executing corresponding message retransmission operations, further improving overall business performance and overall message forwarding efficiency.

[0055] In some embodiments, the transmitting end performs a message retransmission operation corresponding to the first message, including: sending a second message to the first receiving end associated with the first message, the payload of the second message is the same as the payload of the first message, and the transmitting end again performs a message retransmission operation corresponding to the first message, including: sending a third message to the first receiving end, the payload of the third message is the same as the payload of the first message. The data carried by the message with packet loss may be an intermediate result relied on by subsequent processes or other processes. By resending the payload of the message with packet loss, it helps to reduce the impact of packet loss on the overall business performance and overall efficiency. In this way, by sending the second message to the first receiving end associated with the first message, the payload of the second message is the same as the payload of the first message, so as to reduce the burden on the equipment or nodes used to implement long-distance message transmission, improve the overall business performance and improve the overall message forwarding efficiency. Furthermore, by sending a third message to the first receiving end, the payload of the third message is the same as the payload of the first message. Therefore, based on determining a valid retransmission request, the message retransmission operation corresponding to the first message is performed again, thereby reducing the burden on the equipment or nodes used to implement long-distance message transmission, improving the overall business performance and improving the overall message forwarding efficiency.

[0056] In some examples, the message sequence number of the second message is different from the message sequence number of the first message, the message sequence number of the third message is different from the message sequence number of the first message, and the message sequence number of the third message is different from the message sequence number of the second message. In this way, there is no need to recover the first message that is judged to be lost, but the message retransmission operations corresponding to the second message and the third message can be integrated into the packet sending process, packet sending queue or packet sending service of the sending end, that is, the second message and the third message each have a new message sequence number, which reduces the algorithm complexity and saves the resources required for recovering the message.

[0057] In some examples, the survival time of the second message is different from the survival time of the first message, the survival time of the third message is different from the survival time of the first message, and the survival time of the third message is different from the survival time of the second message. In this way, there is no need to recover the first message that is judged to be lost, but the message retransmission operations corresponding to the second message and the third message can be integrated into the packet sending process, packet sending queue or packet sending service of the sender, that is, the second message and the third message each have a new survival time, such as the time for the new data packet to circulate, which reduces the complexity of the algorithm and saves the resources required for recovering the message.

[0058] In a possible implementation, when the first network is a transmission control protocol / internet protocol network and the first communication protocol stack is a transmission control protocol stack, the length of the first time period is 10 milliseconds, and when the first network is a remote direct memory access network and the first communication protocol stack is a remote direct memory access protocol stack, the length of the first time period is 8 milliseconds. Figure 2 The method for message retransmission shown takes into account the delay differences under the influence of different networks and different communication protocol stacks by limiting the first time period to be determined at least based on the first network to which the sender is connected for sending the first message and the first communication protocol stack used by the sender to send the first message.

[0059] In a possible implementation manner, the messages sent by the sender using the first communication protocol stack and through the first network are all timestamped, and the first message forwarding device is used to forward the first message, wherein when the first message forwarding device detects the loss of the first message based on the timestamp check, the first message forwarding device sends the first retransmission request to the sender. In this way, by making the messages all timestamped, after the sender receives the message loss and retransmission request, the retransmitted message has a new timestamp, so that the timestamp can be used to better judge the message loss and distinguish between repeated retransmission requests and valid retransmission requests. The messages sent by the sender are all timestamped, and if the message forwarding device finds that the timestamp of a message exceeds a threshold, it is considered to be a packet loss. For example, among multiple messages in the same stream, there is a first packet and a tail packet, the first packet has a timestamp to indicate the start of transmission, and the tail packet has a timestamp to indicate the end of transmission. In this way, by requiring timestamp synchronization, the timestamps of the messages received by multiple message forwarding devices can be more finely judged in the application of long-distance message transmission.

[0060] In a possible implementation manner, the first network is a hybrid network including old devices and new devices. Figure 2The method for message retransmission shown, for intermediate devices or nodes, such as message forwarding devices, intermediate network devices, etc., only requires the first message forwarding device to have a detection function that can detect the loss of the first message, and requires the first message forwarding device to send the first retransmission request to the sending end in response to detecting the loss of the first message. Therefore, the burden on devices or nodes other than the sending end is reduced, for example, the burden on devices or nodes used to achieve long-distance message transmission is reduced, and it can well adapt to the limited computing power resources and storage resources of the devices or nodes used to achieve long-distance message transmission. In this way, it can be suitable for situations where network links are unstable, such as application scenarios where links are frequently switched. Such a specific network can be, for example, a mixed network of old and new devices, or a similar network where intermediate nodes are frequently changed.

[0061] Figure 3 The schematic diagram of the message retransmission of the first implementation mode provided in the embodiment of the present application. Figure 3 As shown, the sender B310, in response to receiving a first retransmission request indicating a message sequence number of a first message, determines that the first message is lost and performs a message retransmission operation corresponding to the first message. The sender B310, within a first time period after receiving the first retransmission request, if receiving a second retransmission request indicating a message sequence number of the first message, determines that the second retransmission request is a repeated retransmission request relative to the first retransmission request. The first time period is determined based on at least a first network B302 connected to the sender B310 for sending the first message and a first communication protocol stack used by the sender B310 to send the first message.

[0062] See also Figure 3 In a possible implementation, the first network B302 includes a first message forwarding device (not shown), which is used to forward the first message, and the first message forwarding device, in response to detecting the loss of the first message, sends the first retransmission request to the sending end B310. Figure 3 It is exemplarily shown that at time T1: the sender B310 receives a first retransmission request indicating a message sequence number of a first message, determines the loss of the first message, and performs a message retransmission operation corresponding to the first message. In some embodiments, the sender B310 is connected to the first receiver B320 through the first network B302, and the first receiver B320 receives messages from the first network B302 through the first communication protocol stack. In some embodiments, the sender B310 uses a first communication link of the first network B302 to send the first message to the first receiver B320, and the first communication link includes the first message forwarding device. Figure 3 exemplarily shows that within the first time period B304 after time T1, at time T2: the sender B310 receives a second retransmission request indicating the message sequence number of the first message, and determines that the second retransmission request is a repeated retransmission request relative to the first retransmission request. Therefore, because time T2 is within the first time period B304 after time T1, the sender B310 determines that the second retransmission request is a repeated retransmission request relative to the first retransmission request. In this way, by pre-setting a first time period (the first time period is at least determined based on the first network B302 to which the sender B310 is connected for sending the first message and the first communication protocol stack used by the sender B310 to send the first message), the sender B310 can build a detection mechanism for repeated retransmission requests by combining the network and communication protocol stack used by the sender B310 to send the detected lost message (that is, the first message) without distinguishing which object the retransmission request is issued by, and utilizing the first time period, which is conducive to efficiently and reliably determining repeated retransmission requests, thereby avoiding repeated operations and helping to improve overall business performance and overall message forwarding efficiency.

[0063] Figure 4 Schematic diagram of message retransmission according to the second implementation mode provided in the embodiment of the present application. Figure 4 As shown, the sender C410, in response to receiving a first retransmission request indicating a message sequence number of a first message, determines that the first message is lost, and performs a message retransmission operation corresponding to the first message. The sender C410, within a first time period after receiving the first retransmission request, if receiving a second retransmission request indicating the message sequence number of the first message, determines that the second retransmission request is a repeated retransmission request relative to the first retransmission request. Wherein, the first time period is determined based on at least a first network C402 connected to the sender C410 for sending the first message and a first communication protocol stack used by the sender C410 to send the first message. The sender C410, after the first time period after receiving the first retransmission request, if receiving a third retransmission request indicating the message sequence number of the first message, determines that the third retransmission request is a valid retransmission request relative to the first retransmission request, and performs the message retransmission operation corresponding to the first message again. Figure 4 exemplarily shown in FIG. 1 , at time T3: the sender C410 receives a first retransmission request indicating a message sequence number of a first message, determines that the first message is lost, and performs a message retransmission operation corresponding to the first message. Figure 4It is also exemplified in that after the first time period C404 after time T3, at time T4: the sender C410 receives a third retransmission request indicating the message sequence number of the first message, determines that the third retransmission request is a valid retransmission request relative to the first retransmission request, and performs the message retransmission operation corresponding to the first message again. Here, because time T4 is after the first time period C404 after time T3, the sender C410 determines that the third retransmission request is a valid retransmission request relative to the first retransmission request, and performs the message retransmission operation corresponding to the first message again. In this way, using the first time period to build a detection mechanism for repeated retransmission requests is conducive to efficiently and reliably judging repeated retransmission requests, thus avoiding repeated operations, and helping to improve overall service performance and overall message forwarding efficiency; and using the first time period to build a detection mechanism for identifying valid retransmission requests is conducive to efficiently and reliably judging valid retransmission requests and performing corresponding message retransmission operations, further improving overall service performance and overall message forwarding efficiency.

[0064] See also Figure 4 In a possible implementation, the transmitting end C410 performs a message retransmission operation corresponding to the first message, including: sending a second message to the first receiving end C420 associated with the first message, the payload of the second message being the same as the payload of the first message, and the transmitting end C410 performs a message retransmission operation corresponding to the first message again, including: sending a third message to the first receiving end C420, the payload of the third message being the same as the payload of the first message. In some embodiments, the message sequence number of the second message is different from the message sequence number of the first message, the message sequence number of the third message is different from the message sequence number of the first message, and the message sequence number of the third message is different from the message sequence number of the second message. In some embodiments, the survival time of the second message is different from the survival time of the first message, the survival time of the third message is different from the survival time of the first message, and the survival time of the third message is different from the survival time of the second message.

[0065] Figure 5: is a structural diagram of a computing device provided in an embodiment of the present application, and the computing device 500 includes: one or more processors 510, a communication interface 520 and a memory 530. The processor 510, the communication interface 520 and the memory 530 are interconnected via a bus 540. Optionally, the computing device 500 may also include an input / output interface 550, and the input / output interface 550 is connected to an input / output device for receiving parameters set by a user, etc. The computing device 500 can be used to implement some or all of the functions of the device embodiment or system embodiment in the above-mentioned embodiment of the present application; the processor 510 can also be used to implement some or all of the operating steps of the method embodiment in the above-mentioned embodiment of the present application. For example, the specific implementation of the computing device 500 performing various operations can refer to the specific details in the above-mentioned embodiments, such as the processor 510 is used to perform some or all of the steps in the above-mentioned method embodiment or some or all of the operations in the above-mentioned method embodiment. For another example, in an embodiment of the present application, the computing device 500 may be used to implement part or all of the functions of one or more components in the above-mentioned device embodiment. In addition, the communication interface 520 may be specifically used to perform the communication functions necessary to implement the functions of these devices and components, and the processor 510 may be specifically used to perform the processing functions necessary to implement the functions of these devices and components.

[0066] It should be understood that Figure 5 The computing device 500 may include one or more processors 510, and the multiple processors 510 may provide processing capabilities in a parallel connection mode, a serial connection mode, a serial-parallel connection mode, or any connection mode, or the multiple processors 510 may form a processor sequence or a processor array, or the multiple processors 510 may be divided into a main processor and an auxiliary processor, or the multiple processors 510 may have different architectures such as a heterogeneous computing architecture. In addition, Figure 5 The computing device 500 shown in the figure, and the related structural description and functional description are exemplary and non-limiting. In some exemplary embodiments, the computing device 500 may include Figure 5 More or fewer components may be shown, or some components may be combined or separated, or may have a different arrangement of components.

[0067] The processor 510 may have a variety of specific implementation forms. For example, the processor 510 may include a central processing unit (CPU), a graphic processing unit (GPU), a neural-network processing unit (NPU), a tensor processing unit (TPU) or a data processing unit (DPU), etc., and the embodiment of the present application does not specifically limit it. The processor 510 may also be a single-core processor or a multi-core processor. The processor 510 may be a combination of a CPU and a hardware chip. The above-mentioned hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD) or a combination thereof. The above-mentioned PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL) or any combination thereof. The processor 510 may also be implemented using a logic device with built-in processing logic alone, such as an FPGA or a digital signal processor (DSP). The communication interface 520 may be a wired interface or a wireless interface for communicating with other modules or devices. The wired interface may be an Ethernet interface, a local interconnect network (LIN), etc., and the wireless interface may be a cellular network interface or a wireless local area network interface, etc.

[0068] The memory 530 may be a non-volatile memory, such as a read-only memory (ROM), a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The memory 530 may also be a volatile memory, which may be a random access memory (RAM) used as an external cache. By way of example but not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), and direct rambus RAM (DR RAM). The memory 530 may also be used to store program codes and data, so that the processor 510 calls the program codes stored in the memory 530 to execute some or all of the operation steps in the above method embodiments, or to execute the corresponding functions in the above device embodiments. Figure 5 Show more or fewer components, or have different component configurations.

[0069] The bus 540 may be a peripheral component interconnect express (PCIe) bus, an extended industry standard architecture (EISA) bus, a unified bus (Ubus or UB), a compute express link (CXL), a cache coherent interconnect for accelerators (CCIX), etc. The bus 540 may be divided into an address bus, a data bus, a control bus, etc. In addition to the data bus, the bus 540 may also include a power bus, a control bus, and a status signal bus, etc. However, for the sake of clarity, Figure 5 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0070] The method and device provided in the embodiments of the present application are based on the same inventive concept. Since the principles of solving the problems in the methods and devices are similar, the embodiments, implementation methods, examples or implementation methods of the methods and devices can refer to each other, and the repeated parts will not be repeated. The embodiments of the present application also provide a system, which includes multiple computing devices, and the structure of each computing device can refer to the structure of the computing device described above. The functions or operations that can be implemented by the system can refer to the specific implementation steps in the above method embodiments and / or the specific functions described in the above device embodiments, which will not be repeated here.

[0071] The present application also provides a computer-readable storage medium, in which computer instructions are stored. When the computer instructions are executed on a computer device (such as one or more processors), the method steps in the above method embodiment can be implemented. The specific implementation of the processor of the computer-readable storage medium in executing the above method steps can refer to the specific operations described in the above method embodiment and / or the specific functions described in the above device embodiment, which will not be repeated here.

[0072] It should be understood by those skilled in the art that the embodiments of the present application may be provided as methods, systems, or computer program products. The present application may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. The embodiments of the present application may be implemented in whole or in part by software, hardware, firmware, or any other combination. When implemented using software, the above embodiments may be implemented in whole or in part in the form of a computer program product. The present application may take the form of a computer program product implemented on one or more computer-usable storage media containing computer-usable program codes. The computer program product includes one or more computer instructions. When the computer program instructions are loaded or executed on a computer, the process or function described in the embodiments of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. Computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. Computer-readable storage media can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that contains one or more available media. Available media can be magnetic media (such as floppy disks, hard disks, tapes), optical media, or semiconductor media. Semiconductor media can be solid-state hard disks, random access memory, flash memory, read-only memory, erasable programmable read-only memory, electrically erasable programmable read-only memory, registers, or any other form of suitable storage media.

[0073] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. Each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing device to work in a specific way, so that the instructions stored in the computer-readable memory produce a product including an instruction device, which implements the functions specified in the process. Figure 1A process or multiple processes and / or boxes Figure 1 These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide for implementing the process in the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0074] In the above embodiments, the descriptions of each embodiment have their own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments. Obviously, those skilled in the art can make various changes and modifications to the embodiments of the present application without departing from the spirit and scope of the embodiments of the present application. The steps in the method of the embodiment of the present application can be adjusted in order, merged or deleted according to actual needs; the modules in the system of the embodiment of the present application can be divided, merged or deleted according to actual needs. If these modifications and variations of the embodiments of the present application fall within the scope of the claims of the present application and their equivalent technologies, the present application is also intended to include these modifications and variations.

Claims

1. A method for message retransmission, characterized in that: The method comprises: The transmitting end, in response to receiving a first retransmission request indicating a message sequence number of a first message, determines that the first message is lost, and performs a message retransmission operation corresponding to the first message; The sending end, within a first time period after receiving the first retransmission request, if receiving a second retransmission request indicating a message sequence number of the first message, determines that the second retransmission request is a repeated retransmission request relative to the first retransmission request, wherein the first time period is determined based on at least a first network connected to the sending end for sending the first message and a first communication protocol stack used by the sending end to send the first message, and the first time period is based on at least a hierarchical structure of the first communication protocol stack and the number of switches in the first network, The first message forwarding device is used to forward the first message, and the first message forwarding device, in response to detecting the loss of the first message, sends the first retransmission request to the sending end, The method further includes: the transmitting end, after the first time period after receiving the first retransmission request, if receiving a third retransmission request indicating the message sequence number of the first message, determining that the third retransmission request is a valid retransmission request relative to the first retransmission request, and performing a message retransmission operation corresponding to the first message again, The sending end sends the first message to the first receiving end, and the first receiving end detects the loss of the first message based on a first timeout judgment mechanism, and then sends the second retransmission request to the sending end. The first message forwarding device, in response to detecting the loss of the first message, sends a message to the first receiving end to notify the first receiving end, and the first message forwarding device sends the first retransmission request to the sending end, The first receiving end, in response to receiving a message from the first message forwarding device, stops detecting whether the first message is lost based on the first timeout judgment mechanism.

2. The method according to claim 1, characterized in that The first message forwarding device detects the loss of the first message based on a cyclic redundancy check or a cache overflow check.

3. The method according to claim 1, characterized in that The duration of the first time period is at least longer than the waiting time indicated by the first timeout determination mechanism.

4. The method according to claim 1, characterized in that: The sending end is connected to the first receiving end through the first network, and the first receiving end receives messages from the first network through the first communication protocol stack.

5. The method according to claim 1, characterized in that The sending end uses a first communication link of the first network to send the first message to the first receiving end, and the first communication link includes the first message forwarding device.

6. The method according to claim 1, characterized in that The sending end sends the first message to a first receiving end, and the second retransmission request is issued by the first receiving end.

7. The method according to claim 1, characterized in that The sending end performs a message retransmission operation corresponding to the first message, including: sending a second message to a first receiving end associated with the first message, wherein a payload of the second message is the same as a payload of the first message.

8. The method according to claim 7, characterized in that The message sequence number of the second message is different from the message sequence number of the first message.

9. The method according to claim 8, characterized in that The lifetime of the second message is different from the lifetime of the first message.

10. The method according to claim 1, characterized in that The sending end performs a message retransmission operation corresponding to the first message, including: sending a second message to a first receiving end associated with the first message, wherein a payload of the second message is the same as a payload of the first message, The sending end again performs a message retransmission operation corresponding to the first message, including: sending a third message to the first receiving end, wherein a payload of the third message is the same as a payload of the first message.

11. The method according to claim 10, characterized in that The message sequence number of the second message is different from the message sequence number of the first message, the message sequence number of the third message is different from the message sequence number of the first message, and the message sequence number of the third message is different from the message sequence number of the second message.

12. The method according to claim 10, characterized in that The lifetime of the second message is different from the lifetime of the first message, the lifetime of the third message is different from the lifetime of the first message, and the lifetime of the third message is different from the lifetime of the second message.

13. The method according to claim 1, characterized in that When the first network is a transmission control protocol / internet protocol network and the first communication protocol stack is a transmission control protocol stack, the length of the first time period is 10 milliseconds; when the first network is a remote direct memory access network and the first communication protocol stack is a remote direct memory access protocol stack, the length of the first time period is 8 milliseconds.

14. The method according to claim 1, characterized in that The messages sent by the sending end using the first communication protocol stack and through the first network are all timestamped, and the first message forwarding device is used to forward the first message, wherein when the first message forwarding device detects the loss of the first message based on the timestamp check, the first message forwarding device sends the first retransmission request to the sending end.

15. The method according to claim 1, characterized in that The first network is a mixed network including old devices and new devices.

16. A computer device, characterized in that: The computer device comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method according to any one of claims 1 to 15 when executing the computer program.

17. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, which, when executed on a computer device, cause the computer device to perform the method according to any one of claims 1 to 15.