Message sending device and receiving device

By using the first bit map and sending information in the RDMA protocol for selective retransmission, the problem of network bandwidth waste and congestion caused by out-of-order packet loss is solved, and efficient data transmission is achieved.

CN118694490AInactive Publication Date: 2024-09-24CHENGDU JAGUAR MICROSYSTEMS CO LTD

Patent Information

Application Number
CN202410956864.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-17
Publication Date
2024-09-24
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In the RDMA protocol, out-of-order packet loss during data transmission results in the need to retransmit all messages, which wastes network bandwidth and causes network congestion.

Method used

By using the first bit image and sending information in the message sending device and receiving device, selective retransmission of the target message is achieved, and only lost or unreceived messages are retransmitted.

Benefits of technology

It reduces the consumption of network bandwidth, avoids network congestion caused by retransmitting all messages, and improves the efficiency of data transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118694490A
    Figure CN118694490A
Patent Text Reader

Abstract

The invention discloses a message sending device and a message receiving device. The message sending device comprises a first message sending module, a first on-chip cache, a first message receiving module and a first processing logic module, the first message sending module is used for sending a target message corresponding to the message task according to a preset message transmission window and recording sending information of the target message; the first message receiving module is used for receiving a response message of the target message, under the condition that the response message carries a first bitmap, the first bitmap is updated to the first on-chip cache, and the first bitmap stores an identification field used for indicating the receiving state of the target message; the first processing logic module is used for generating a retransmission request according to the first bitmap and the sending information when the message needs to be retransmitted; and the first message sending module is also used for generating a retransmission message according to the retransmission request and sending the retransmission message. According to the invention, selective retransmission of the target message is realized, and bandwidth consumption on a network can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of data transmission, and in particular to a message sending device and a message receiving device. Background Art

[0002] The Remote Direct Memory Access (RDMA) protocol is a data transmission protocol used in distributed systems. Generally speaking, the amount of data in an RDMA transmission task is very large. When transmitting data on the network, an RDMA transmission task needs to be split into multiple messages, and each message is transmitted independently from the sender to the receiver.

[0003] At present, for data transmission of RDMA protocol, usually in parallel computer systems, once out-of-order packet loss occurs, all out-of-order messages must be retransmitted. For example, if only one packet is lost during the transmission process and all other data packets are received, all messages need to be retransmitted. Based on this, discarding and retransmitting out-of-order messages will waste a lot of network bandwidth and easily cause network congestion. Summary of the invention

[0004] The present application provides a message sending device and a receiving device, which realize the selective retransmission of the target message and can reduce the bandwidth consumption on the network.

[0005] According to one aspect of the present application, a message sending device is provided, the device comprising: a first message sending module, a first on-chip buffer, a first message receiving module and a first processing logic module;

[0006] A first message sending module, used for sending a target message corresponding to a message task according to a preset message transmission window, and recording sending information of the target message;

[0007] A first message receiving module, configured to receive a response message of a target message, and update the first bitmap to a first on-chip cache when the response message carries a first bitmap, wherein the first bitmap stores an identification field for indicating a receiving status of the target message;

[0008] A first processing logic module, configured to generate a retransmission request according to the first bitmap and the sending information when a message retransmission is required;

[0009] The first message sending module is further used to generate a retransmission message according to the retransmission request and send the retransmission message.

[0010] According to another aspect of the present application, a message receiving device is provided, the device comprising: a second message sending module, a second on-chip buffer, a second message receiving module and a second processing logic module;

[0011] A second message receiving module, used for receiving a target message;

[0012] a second processing logic module, configured to generate a first bitmap according to the received target message, store the first bitmap in a second on-chip cache, and generate a response message according to the first bitmap, wherein the first bitmap stores an identification field for indicating a reception status of the target message;

[0013] The second message sending module is used to feed back the response message to the message sending device.

[0014] According to another aspect of the present application, an electronic device is provided, the electronic device comprising:

[0015] at least one processor; and

[0016] a memory communicatively connected to at least one processor; wherein,

[0017] The memory stores a computer program that can be executed by at least one processor, and the computer program is executed by at least one processor so that the at least one processor can execute the method flow involved in any embodiment of the present application.

[0018] According to another aspect of the present application, a computer-readable storage medium is provided, which stores computer instructions, and the computer instructions are used to implement the method flow involved in any embodiment of the present application when executed by a processor.

[0019] The technical solution of the embodiment of the present application realizes the sending and processing of the message through the first message sending module, the first on-chip buffer, the first message receiving module and the first logic processing module in the message sending device. Among them, the first message sending module is used to send the target message corresponding to the message task according to the preset message transmission window, and record the sending information of the target message, so as to realize the sending of the target message, and the sending information can facilitate the subsequent judgment of the retransmission message. The first message receiving module is used to receive the response message of the target message, and in the case of the first bitmap carried in the response message, the first bitmap is updated to the first on-chip buffer, and the receiving status of the target message can be accurately known through the first bitmap, so as to determine whether the message needs to be retransmitted. The first processing logic module is used to generate a retransmission request according to the first bitmap and the sending information when the message needs to be retransmitted, so that the first message sending module generates a retransmission message according to the retransmission request and sends the retransmission message. It solves the problem that when data is transmitted through the RDMA protocol in the prior art, all messages after the disorder need to be retransmitted, thereby wasting a lot of network bandwidth and causing network congestion. The first bitmap and the sending information can clearly identify the message that needs to be retransmitted, so that only the retransmitted message needs to be retransmitted, thereby realizing selective retransmission of the message and reducing bandwidth consumption on the network.

[0020] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present application, nor is it intended to limit the scope of the present application. Other features of the present application will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the technical solutions in 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 only 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.

[0022] Figure 1 It is a structural diagram of a message sending device provided in an embodiment of the present application;

[0023] Figure 2 is a structural example diagram of the first bitmap provided in an embodiment of the present application;

[0024] Figure 3 is a structural example diagram of a message sending device provided in an embodiment of the present application;

[0025] Figure 4 is a structural example diagram of a second bitmap provided in an embodiment of the present application;

[0026] Figure 5It is a structural schematic diagram of a message receiving device provided in an embodiment of the present application;

[0027] Figure 6 It is a schematic diagram of the structure of an electronic device implementing an embodiment of the present application. DETAILED DESCRIPTION

[0028] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.

[0029] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0030] Embodiment 1

[0031] Figure 1 1 is a schematic diagram of the structure of a message sending device provided in the first embodiment of the present application. This embodiment is applicable to the case of selective retransmission of messages when data is transmitted via the RDMA protocol. The message sending device can be implemented in the form of hardware and / or software, and the message sending device can be configured in an electronic device such as a computer or a server. Figure 1 As shown, the method includes:

[0032] like Figure 1 As shown, the message sending device includes: a first message sending module 110 , a first on-chip cache 120 , a first message receiving module 130 and a first processing logic module 140 .

[0033] The first message sending module 110 is used to send a target message corresponding to a message task according to a preset message transmission window, and record sending information of the target message.

[0034] Among them, the message transmission window is a communication window pre-set for transmitting messages. The message task can be understood as an operation or task performed in the process of network communication to achieve data transmission. The message task can be a task of sending multiple target messages. The target message can be understood as the message data corresponding to the current data transmission request. The target message can contain the complete data information to be sent. The sending information can include information such as the packet sequence number, message sequence number, and message internal sequence number corresponding to the target message.

[0035] Specifically, when it is determined that data transmission is required, the target message corresponding to the message task is sent by the first message sending module according to the pre-set message transmission window, and the sending information of the data table in the target message is recorded at the same time. Based on this, it is convenient to compare the recorded sending information with the subsequent first bitmap to confirm the sending status of the target message. That is, data support is provided for the subsequent determination of the sending status of the target message.

[0036] Optionally, the device may further include: a doorbell notification module, which is used to generate a doorbell notification corresponding to the data transmission request in response to the data transmission request, and transmit the write pointer in the doorbell notification to the first message sending module, so that the first message sending module confirms whether the message task has an enabled timer when receiving the write pointer of the doorbell notification. The timer is used to time the message task sent by the first message sending module.

[0037] Among them, the data transmission request is a request for notifying the first message sending module to transmit data. The doorbell notification is used to remind the first message sending module to confirm whether the message task has an enabled timer. The write pointer in the doorbell notification is used to indicate the next target message to be written in the message transmission window. The timing time of the timer is set according to actual needs and is suitable for the message task. The purpose of enabling the timer is that if no response message is received within the timing time corresponding to the timer, it is considered that the message task has timed out. At this time, the target message needs to be retransmitted.

[0038] Specifically, the doorbell notification module generates a doorbell notification corresponding to the data transmission request by responding to the data transmission request. The write pointer corresponding to the doorbell notification is transmitted to the first message sending module, so that when the first message sending module receives the write pointer, it determines whether the current message task has an enabled timer. Based on this, it is convenient to judge whether the message needs to be retransmitted according to the timing time corresponding to the timer, so that the timing of retransmitting the message is more accurate.

[0039] Optionally, the sending information includes at least the packet sequence number, message sequence number and message internal sequence number of the first target message sent at that time.

[0040] Among them, the packet sequence number (PSN) is an identifier used to identify the target message, and the packet sequence number corresponding to each target message is unique. Optionally, the packet sequence number can be counted in a global incremental counting manner, and it will start from 0 after counting to 2 to the 24th power. For example, if the packet sequence number corresponding to the target message of the message task is 3, then the packet sequence number corresponding to the next target message in the message task is 4. The message sequence number (MSN) is an identifier used to identify the message task, and the message sequence number corresponding to each message task is unique. The internal sequence number of the message (IPSN) is an identifier used to identify the number of target messages in the current message task. Optionally, the message sequence number is counted from 0. For example, for the current message task, the number of target messages corresponding to the current message task is counted from 0. The next message task clears the internal sequence number of the message, and counts the number of target messages corresponding to the next message task from 0 again.

[0041] Specifically, the first message sending module can record the packet sequence number, message sequence number and message internal sequence number of the first target message sent at the time while sending the target message corresponding to the message task, so as to facilitate the subsequent determination of the start identification field in the first bitmap when the first bitmap is received. Optionally, the packet sequence number, message sequence number and message internal sequence number corresponding to each target message can be recorded. In order to save memory and improve the speed of subsequent determination of retransmitted messages, the sending information at least includes the packet sequence number, message sequence number and message internal sequence number of the first target message sent in the current message task.

[0042] The first message receiving module 130 is used to receive a response message of the target message, and update the first bitmap to the first on-chip cache 120 when the response message carries the first bitmap, wherein the first bitmap stores an identification field for indicating the reception status of the target message.

[0043] The response message may be a message sent by the message receiving device to the message sending device as a response after receiving the target message. The response message includes feedback information corresponding to the target message. The identification field stored in the first bitmap is used to indicate whether the target message is received. For example, see Figure 2 , Figure 2 This is an example of the structure of the first bitmap. Figure 2In a small grid, a valid identification field is stored. Optionally, the identification field can be a number. For example, the identification field 0 or 1 can be used to represent the receiving status of the target message, that is, 0 represents that the target message has not been received, and 1 represents that the target message has been received. The identification field in the first bitmap corresponds to the packet sequence number of the target message. For example, if the identification field is 0 at a certain position in the first bitmap, the packet sequence number of the target message corresponding to the current position can be determined. The first on-chip cache can be a cache module for storing the first bitmap. Optionally, the sending information of the target message can also be stored in the first on-chip cache.

[0044] Specifically, the response message corresponding to the target message is received by the first message receiving module. When the response message carries the first bitmap, the first bitmap is updated to the first on-chip cache to facilitate the subsequent direct acquisition of the first bitmap from the first on-chip cache, thereby determining the reception status of the target message. The reception of the response message and the update operation of the first bitmap are realized based on the first message receiving module, providing data support for the subsequent determination of the reception status of the target message.

[0045] For example, Figure 3 As shown, when the first message receiving module receives the response message and determines that the response message carries the first bitmap, the first bitmap is stored in the first on-chip cache, so that the first processing logic module can obtain the first bitmap from the first on-chip cache and analyze and process the first bitmap.

[0046] Optionally, the size of the first bitmap is greater than or equal to the size of the message transmission window, and the packet sequence numbers of multiple target messages corresponding to the identification fields stored in the first bitmap are continuous.

[0047] Among them, the size of the first bitmap can be greater than or equal to the size of the message transmission window, which can be understood as the number of target messages corresponding to the identification field stored in the first bitmap is greater than the number of target messages that can be transmitted by the message transmission window. For example, the identification fields stored in the first bitmap are "0101110100" in sequence, and the packet sequence numbers corresponding to multiple target messages can be "1, 2, 3, 4, 5, 6, 7, 8, 9, 10" in sequence. Based on this, the packet sequence numbers corresponding to the target messages that need to be retransmitted again through the message transmission window are "1, 3, 7, 9, 10". Based on the above, the number of target messages corresponding to the first bitmap is 10, and the number of target messages that can be transmitted by the message transmission window is often less than or equal to the number of target messages corresponding to the first bitmap, that is, the size of the first bitmap is greater than or equal to the size of the message transmission window. Based on this, it is convenient to accurately determine the packet sequence number of the target message according to the identification field in the first bitmap to avoid the omission of the target message.

[0048] Optionally, the first on-chip cache stores a second bitmap, and the second bitmap is used to store the sending status of the message task.

[0049] The second bitmap is used to represent the sending status of the message task. Optionally, the message sequence numbers of multiple message tasks corresponding to the identification fields stored in the second bitmap are continuous. For example, the number 0 or 1 can be used to represent the sending status of the message task. That is, 0 represents that the current message task has not been sent, and 1 represents that the current message task has been sent. The sending status of the current message task can be clearly identified through the second bitmap to avoid repeated retransmission of messages after the message task is completed.

[0050] For example, see Figure 4 , the second bitmap can be Figure 4 The identification field of the second bitmap corresponds to the message sequence number of the message task, so as to confirm whether the current message task is completed according to the identification field. Figure 4 When eop (end of packet) is 1 in a small grid, it means that the message task is completed.

[0051] The first processing logic module 140 is configured to generate a retransmission request according to the first bitmap and the sending information when message retransmission is required.

[0052] The retransmission request may be a request for notifying the first message sending module of the packet sequence number corresponding to the target message that needs to be retransmitted.

[0053] Specifically, the situation where message retransmission is required may be the situation where the message task times out, or it may be the situation where it is determined based on the first bitmap that there is a target message that has not been received. The first situation can be understood as when the message task enables the timer and the value of the timer indicates that the message task has timed out, the first bitmap in the first on-chip cache is obtained, and the packet sequence number of the target message that needs to be retransmitted in the first bitmap is determined based on the packet sequence number of the first target message in the sent information, so as to generate a retransmission request based on the packet sequence number. The second situation may be that the target task does not enable the timer, then the first bitmap and the sending information are obtained from the first on-chip cache, the number of target messages that need to be retransmitted and the packet sequence number of the target message that needs to be retransmitted are determined, so as to generate a retransmission request based on the packet sequence number. The generation of the message retransmission request is realized through the first processing logic module, which is convenient for the subsequent selective retransmission of the target message according to the retransmission request.

[0054] For example, in conjunction with the above examples, see Figure 3When the doorbell notification module generates a doorbell notification, the write pointer in the doorbell notification is transmitted to the first message sending module so that the first message sending module determines whether the timer is enabled in the message task. If the timer is enabled in the first message sending module, then when the timer times out, the packet sequence number of the first target message that needs to be retransmitted in the first bitmap is determined by the first processing logic module to implement the message retransmission operation. If the timer is not enabled in the first message sending module, the first bitmap in the first on-chip cache and the packet sequence number, message sequence number and message internal sequence number of the target message are obtained through the first processing logic module to determine the number of target messages that need to be retransmitted to implement the retransmission operation. In addition, a read-write pointer can be set to indicate the identification field of the first bitmap based on the read-write pointer to determine the target message that needs to be retransmitted.

[0055] Optionally, the first processing logic module 140 is specifically used to determine the packet sequence number to be retransmitted according to the first identification field in the first bitmap and the relative position information of the target field, and to generate a retransmission request according to the packet sequence number to be retransmitted and the message transmission window, when the target field is included in the first bitmap, wherein the target field is used to represent the identification field of the target message that has not been received.

[0056] Among them, the target field can be an identification field used to indicate that the target message has not been received. For example, the identification field is 0 or 1 for explanation, 0 indicates that the identification field of the target message has not been received, and 1 indicates that the identification field of the target message has been received. If the first bitmap contains the identification field 0, it means that there is an identification field of the target message that has not been received in the first bitmap. The relative position information can be understood as the position of the target field in the first bitmap. For example, the first bitmap is described as a one-dimensional bitmap, and the identification fields stored in the first bitmap are "1101" in sequence. The relative position information of the target field can be that the target field is the third position in the first bitmap. This is only an example, and the specific structure of the first bitmap and the specific relative position information are not limited. The packet sequence number to be retransmitted can be the packet sequence number of the target message corresponding to the target field. Taking the above example as an example, the starting packet sequence number is 3 for explanation, and the packet sequence number to be retransmitted is 5.

[0057] Specifically, when the first processing logic module detects that the first bitmap contains a target field, it determines the relative position information of each target field and the first identification field in turn according to the first identification field in the first bitmap. The first identification field in the first bitmap corresponds to the target message corresponding to the minimum packet sequence number sent at that time. According to the pre-recorded sending information of the first target message, the packet sequence number corresponding to the first target message is determined. The packet sequence number to be retransmitted is determined by the packet sequence number and relative position information of the first target message. A retransmission request is generated according to the packet sequence number to be retransmitted and the size of the message transmission window, so as to perform message retransmission processing based on the retransmission request. Based on this, the accurate packet sequence number to be retransmitted is determined, which facilitates the subsequent retransmission processing of the target message corresponding to the packet sequence number to be retransmitted, and realizes the selective retransmission of the target message to reduce the bandwidth consumption on the network.

[0058] Exemplarily, the identification field stored in the first bitmap is: "1101101100" for illustration. If the pre-recorded packet sequence number corresponding to the first target message sent this time is 3, then the packet sequence number of the target message corresponding to the first identification field "1" is 3, and the first target message has been received. The relative position information of the target field in the first bitmap is determined according to the position of the first identification field, so as to determine the packet sequence numbers to be retransmitted as "5, 8, 11, 12" through the relative position information. A retransmission request is generated according to the number of target messages corresponding to the packet sequence numbers to be retransmitted and the message transmission window. If the number of messages that can be retransmitted in the message transmission window is 3, the packet sequence numbers corresponding to the target messages to be retransmitted this time are determined to be "5, 8, 11". The target message with sequence number "12" can be retransmitted based on the next message transmission window. Correspondingly, if the number of messages that can be retransmitted in the message transmission window is 5, then while retransmitting each target message corresponding to the packet sequence number to be retransmitted, a target message required to be transmitted by a new message task can be obtained and transmitted together.

[0059] Optionally, the first processing logic module 140 is further configured to determine a receiving status of a last target message of the message task according to the first bitmap, and update the second bitmap according to the receiving status of the last target message.

[0060] The receiving status of the last target message can be used to indicate whether the current message task has been received.

[0061] Specifically, the receiving status of the last target message in the message task is determined according to the first bitmap. If the receiving status corresponding to the last target message is received, and the receiving status of all target messages before the last target message is received, it is determined that the message task has been completed, and the identification field corresponding to the current message task in the second bitmap can be updated. By determining the receiving status of the last target message, it can be clear whether the target message corresponding to the current message task has been fully received. After the update, the second bitmap can not only accurately know whether the current message task is completed, but also determine the completion status of other message tasks.

[0062] For example, if the identification fields in the first bitmap are: "11111111111", based on the above, it can be known that the identification field corresponding to the last target message of the current message task is 1, that is, the last target message has been received. At this time, according to the reception status of the last target message, the identification field of the current message task corresponding to the second bitmap can be set to 1 to indicate that the current message task has been received.

[0063] Optionally, the message sending device further includes: an event reporting module; a first processing logic module 140, further used to generate an event completion notification corresponding to the message task according to the second bitmap, and send the event completion notification to the event reporting module.

[0064] The event completion notification can be understood as a notification for informing the event reporting module that the current message task reception is completed. The event reporting module can be used to report the completion status of the current message task of other hardware or software modules.

[0065] Specifically, since the identification field in the second bitmap corresponds to the message sequence number of the message task, it is possible to determine whether the message task corresponding to the message sequence number is completed based on the identification field, thereby determining the message task that has been received and completed. An event completion notification is generated based on the message task that has been received and completed, and the event completion notification is sent to the event reporting module, so that the event reporting module reports the completion status of the message task, which facilitates the target software or module to further process the data information corresponding to the current message task in a timely manner, so as to improve data processing efficiency.

[0066] For example, if the identification fields corresponding to the second bitmap are "01001" in sequence, and the identification field is "1" indicating that the message task is completed, then the message sequence number corresponding to the position where the identification field is "1" in the second bitmap is confirmed. For example, the message sequence number can be "2, 5". An event completion notification can be generated based on the message sequence number of the message task, for example, the message tasks with message sequence numbers 2 and 5 are completed. In combination with the above example, Figure 3The event reporting module in reports the event completion notification to inform the target software of the completion status of the current message task.

[0067] Optionally, the first processing logic module 140 is specifically used to determine the packet sequence number to be retransmitted according to the first bitmap and the sending information when message retransmission is required, determine the unfinished message sending tasks according to the second bitmap when the number of target messages to be retransmitted is less than the message transmission window, obtain the newly added packet sequence number to be transmitted according to the unfinished message sending tasks, and generate a retransmission request according to the packet sequence number to be retransmitted and the newly added packet sequence number to be transmitted.

[0068] The newly added packet sequence number to be transmitted may be a packet sequence number corresponding to a target message that has not yet been sent in the unfinished message task.

[0069] Specifically, in the case where message retransmission is required, the packet sequence number corresponding to the position where the identification field is the target field is determined according to the identification field in the first bitmap and the packet sequence number in the sending information, that is, the packet sequence number to be retransmitted is determined. If the number of target messages corresponding to the packet sequence number to be retransmitted is less than the message transmission window, the target messages in other unfinished message tasks can be obtained and sent together. That is, the unfinished message task is determined according to the message sequence number corresponding to the identification field in the second bitmap. The packet sequence number of the target message to be transmitted is determined according to the unfinished message task. A retransmission request is generated according to the packet sequence number to be retransmitted and the packet sequence number to be transmitted, so that the message transmission window performs message transmission processing. Based on the above, while completing the sending of the current message task, the unfinished message task can be processed synchronously, thereby improving the completion efficiency of the message task.

[0070] Exemplarily, the first bitmap is taken as a one-dimensional bitmap for illustration. If the identification fields in the first bitmap are "0111010110" in sequence, and the packet sequence number corresponding to the first target message in the transmitted information is 1, then based on the above, it can be known that the packet sequence numbers to be retransmitted are "1, 5, 7, 10" in sequence, and the number of target messages to be retransmitted is 4. If the number of messages that can be transmitted at one time in the message transmission window is 5. Then the message sequence number MSN corresponding to the position where the next identification field is 0 after the current message task can be determined from the second bitmap, and the message task corresponding to the message sequence number is the message task that has not been completed. The newly added packet sequence number to be transmitted from the message task that has not been completed is "11". A retransmission request is generated according to the packet sequence numbers "1, 5, 7, 10, 11" to realize the transmission processing of the target messages corresponding to the above packet sequence numbers.

[0071] The first message sending module 110 is further configured to generate a retransmission message according to the retransmission request, and send the retransmission message.

[0072] The retransmission message may be a target message that needs to be transmitted and is determined according to a packet sequence number in the retransmission request.

[0073] Specifically, when receiving the retransmission request, the first message sending module determines the target message to be retransmitted according to the packet sequence number in the retransmission request, that is, generates a retransmission message. By sending the retransmission message, the selective retransmission operation of the target message is realized.

[0074] The technical solution of this embodiment implements the sending and processing of the message through the first message sending module, the first on-chip buffer, the first message receiving module and the first logic processing module in the message sending device. Among them, the first message sending module is used to send the target message corresponding to the message task according to the preset message transmission window, and record the sending information of the target message, so as to realize the sending of the target message. The sending information can facilitate the subsequent judgment of the retransmission message. The first message receiving module is used to receive the response message of the target message. In the case of the first bitmap carried in the response message, the first bitmap is updated to the first on-chip buffer. The receiving status of the target message can be accurately known through the first bitmap, so as to determine whether the message needs to be retransmitted. The first processing logic module is used to generate a retransmission request according to the first bitmap and the sending information when the message needs to be retransmitted, so that the first message sending module generates a retransmission message according to the retransmission request and sends the retransmission message. It solves the problem that when data is transmitted through the RDMA protocol in the prior art, all messages after the disorder need to be retransmitted, thereby wasting a lot of network bandwidth and causing network congestion. The first bitmap and the sending information can clearly identify the message that needs to be retransmitted, so that only the retransmitted message needs to be retransmitted, thereby realizing selective retransmission of the message and reducing bandwidth consumption on the network.

[0075] Embodiment 2

[0076] Figure 5 This is a structural diagram of a message receiving device provided in Example 2 of the present application. In the process of determining to send a retransmitted message based on the message sending end, the message receiving end will perform an interactive operation with the message sending end. The specific implementation method can refer to the technical solution of this embodiment. Among them, the technical terms that are the same as or corresponding to the above embodiments are not repeated here.

[0077] like Figure 5 As shown, the message receiving device includes: a second message sending module 210 , a second on-chip cache 220 , a second message receiving module 230 and a second processing logic module 240 .

[0078] The second message receiving module 210 is used to receive a target message.

[0079] Specifically, the target message is received by the second message receiving module to facilitate subsequent determination of the reception status of the target message.

[0080] The second processing logic module 220 is used to generate a first bitmap according to the received target message, store the first bitmap in the second on-chip cache 230, and generate a response message according to the first bitmap, wherein the first bitmap stores an identification field for indicating the reception status of the target message.

[0081] The second on-chip cache is a cache module for storing the first bitmap.

[0082] Specifically, the packet sequence number of the target message is determined according to the received target message, and a first bitmap is generated based on the packet sequence number. Among them, the identification field corresponding to the packet sequence number of the received target message is set in the first bitmap. For example, the identification field corresponding to the packet sequence number of the received target message can be set to 1, and the identification field corresponding to the packet sequence number of the unreceived target message can be set to 0. Through the above, the first bitmap can clearly indicate the receiving status of each target message in the current transmission. The first bitmap is saved in the second on-chip cache for recording and processing. A response message is generated according to the packet sequence number corresponding to the identification field in the first bitmap, which can inform the message sender of the receiving status of the target message.

[0083] For example, if the packet sequence numbers corresponding to the currently received target message are "1, 2, 4, 6, 7, 8, 9" in sequence, and the target expects to receive the packet sequence numbers of the target message from 1 to 10, then the first bitmap can be generated according to the received packet sequence numbers, and the identification field corresponding to the packet sequence number of the received target message in the first bitmap is set to 1, and the identification field not received is set to 0, and the first bitmap can be shown in Table 1 below.

[0084] Table 1

[0085] 1 1 0 1 0 1 1 1 1 0

[0086] After obtaining the above-mentioned first bitmap, the first bitmap can be stored in the second on-chip cache. A response message is generated according to the identification field contained in the first bitmap, so that the message sending device can clearly know that the target message with the packet sequence number "3, 5, 10" has not been received. It should be noted that if the packet sequence number corresponding to the currently received target message is consistent with the packet sequence number corresponding to the currently expected target message, it means that all target messages sent at that time have been received. Correspondingly, all identification fields in the generated first bitmap are 1.

[0087] The second message sending module 240 is used to feed back the response message to the message sending device.

[0088] Specifically, after the response message is generated based on the second processing logic module, the response message can be fed back to the message sending device through the second message sending module, so that the message sending device can clearly identify the target message that has not been received.

[0089] Optionally, the target message is sent with a preset message transmission window; the second processing logic module 220 is also used to update the first bitmap according to the packet sequence number and message transmission window corresponding to the first identification field in the first bitmap that is used to represent that the target message has not been received after the response message is fed back to the message sending device.

[0090] The identification field used to indicate that the target message has not been received is the target field mentioned above.

[0091] Specifically, after determining the response message, the response message is fed back to the message sending device through the second message sending module. The packet sequence number corresponding to the first identification field used to characterize the target message that has not been received is determined from the first bitmap, that is, the packet sequence number of the first target field is determined. The first bitmap is updated according to the packet sequence number of the first target field and the message transmission window, and the updated first bitmap is stored in the second on-chip cache. Based on this, it is convenient to clarify the reception status of the target message according to the first bitmap, and the out-of-order reception of the target message is realized.

[0092] Exemplarily, in combination with the above example, the packet sequence number of the target message is determined according to the number of target messages that can be transmitted at one time in the message transmission window, so as to update the first bitmap based on the packet sequence number. For example, the number of target messages that can be transmitted at one time in the message transmission window is 5, and the first bitmap fed back to the message sending device is shown in Table 1. Determine the packet sequence number corresponding to the position where the target field is 0. If the packet sequence number corresponding to the position where the first identification field is 0 is 3, then the packet sequence number of the target message that can be transmitted next time in the message transmission window is "3, 5, 10, 11, 12". The updated first bitmap can be shown in Table 2 below.

[0093] Table 2

[0094] 0 1 0 1 1 1 1 0 0 0

[0095] It should be noted that the updated first bitmap may be a bitmap regenerated based on the first bitmap, or may be a bitmap obtained by modifying the first bitmap.

[0096] The technical solution of this embodiment realizes the reception and response of the target message through the second message sending module, the second on-chip cache, the second message receiving module and the second processing logic module of the message receiving device. Among them, the second message receiving model is used to receive the target message. The second processing logic module is used to generate a first bitmap according to the received target message, and store the first bitmap in the second on-chip cache. Based on this, it is convenient to clarify the reception status of the target message according to the first bitmap, and realize the out-of-order reception of the target message. Further, a response message is generated according to the first bitmap, and the response message is fed back to the message sending device through the second message sending module, so as to facilitate the subsequent selective retransmission operation of the target message according to the response message corresponding to the first bitmap. This application generates the first bitmap and feeds back the response message corresponding to the first bitmap to the message sending device, so as to facilitate the subsequent clarification of the retransmission message and realize the selective retransmission operation of the target message, so as to reduce the bandwidth consumption on the network.

[0097] Embodiment 3

[0098] Those skilled in the art can understand that all or part of the processes involved in implementing the above embodiments can be completed by electronic devices. Figure 6 It is a structural diagram of an electronic device provided in Example 3 of the present application. The electronic device 10 is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present application described and / or required herein.

[0099] like Figure 6 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0100] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0101] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The processor 11 executes the various methods and processes described above, such as the method flows involved in the above embodiments.

[0102] In some embodiments, the method flow involved in the above embodiments may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, the method flow involved in the above embodiments may be executed. Alternatively, in other embodiments, the processor 11 may be configured to execute the method flow involved in the above embodiments in any other appropriate manner (e.g., by means of firmware).

[0103] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0104] The computer program for implementing the processing flow of the message sending and receiving of the present application can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general-purpose computer, a special-purpose computer or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program can be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

[0105] Embodiment 4

[0106] A person skilled in the art can understand that all or part of the method flow involved in the above embodiments can be implemented by instructing the relevant hardware through a computer program. Embodiment 4 of the present application also provides a computer-readable storage medium, which stores computer instructions, and the computer instructions are used to enable the processor to execute the method flow involved in the above embodiments.

[0107] In the context of the present application, a computer readable storage medium may be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, device or equipment. A computer readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer readable storage medium may be a machine readable signal medium. A more specific example of a machine readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0108] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0109] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0110] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0111] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this application can be executed in parallel, sequentially or in different orders, as long as the expected results of the technical solution of this application can be achieved, and this document is not limited here.

[0112] The above specific implementations do not constitute a limitation on the protection scope of this application. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of this application should be included in the protection scope of this application.

Claims

1. A message sending device, characterized in that: include: A first message sending module, a first on-chip buffer, a first message receiving module and a first processing logic module; The first message sending module is used to send a target message corresponding to a message task according to a preset message transmission window, and record sending information of the target message; The first message receiving module is used to receive a response message of the target message, and when the response message carries a first bitmap, update the first bitmap to the first on-chip cache, wherein the first bitmap stores an identification field for indicating a reception status of the target message; The first processing logic module is used to generate a retransmission request according to the first bitmap and the sending information when a message retransmission is required; The first message sending module is further used to generate a retransmission message according to the retransmission request, and send the retransmission message.

2. The device according to claim 1, characterized in that The size of the first bitmap is greater than or equal to the size of the message transmission window, and the packet sequence numbers of the plurality of target messages corresponding to the identification fields stored in the first bitmap are continuous.

3. The device according to claim 1, characterized in that The sending information at least includes the packet sequence number, message sequence number and message internal sequence number of the first target message sent at that time.

4. The device according to claim 3, characterized in that The first processing logic module is specifically used to determine the packet sequence number to be retransmitted according to the first identification field in the first bitmap and the relative position information of the target field when the first bitmap includes a target field, and to generate a retransmission request according to the packet sequence number to be retransmitted and the message transmission window, wherein the target field is used to represent the identification field of the target message that has not been received.

5. The device according to claim 1, characterized in that The first on-chip cache stores a second bitmap, and the second bitmap is used to store the sending status of the message task.

6. The device according to claim 5, characterized in that The first processing logic module is further used to determine the receiving status of the last target message of the message task according to the first bitmap, and update the second bitmap according to the receiving status of the last target message.

7. The message sending device according to claim 4, characterized in that: Also includes: Event reporting module; The first processing logic module is further configured to generate an event completion notification corresponding to the message task according to the second bitmap, and send the event completion notification to the event reporting module.

8. The device according to claim 5, characterized in that The first processing logic module is specifically used to determine the packet sequence number to be retransmitted according to the first bitmap and the sending information when message retransmission is required, determine the message task that has not been completed according to the second bitmap when the number of the target messages to be retransmitted is less than the message transmission window, obtain the newly added packet sequence number to be transmitted according to the unfinished message task, and generate a retransmission request according to the packet sequence number to be retransmitted and the newly added packet sequence number to be transmitted.

9. A message receiving device, characterized in that: include: A second message sending module, a second on-chip cache, a second message receiving module, and a second processing logic module; The second message receiving module is used to receive a target message; The second processing logic module is used to generate a first bitmap according to the received target message, store the first bitmap in the second on-chip cache, and generate a response message according to the first bitmap, wherein the first bitmap stores an identification field for indicating a reception status of the target message; The second message sending module is used to feed back the response message to the message sending device.

10. The message receiving device according to claim 9, characterized in that: The target message is sent with a preset message transmission window; the second processing logic module is also used to update the first bitmap according to the packet sequence number corresponding to the first identification field in the first bitmap that is used to represent that the target message has not been received and the message transmission window after the response message is fed back to the message sending device.

Citation Information

Patent Citations

  • Data transmission method and first device

    CN111512603A

  • Message retransmission method and device

    CN116114199A

Cited By

  • Packet sending apparatus and receiving apparatus

    WO2026017104A1