Data exchange methods and systems, electronic device and storage medium
By establishing independent sequence number spaces for data requesters and data responders in RDMA technology and using message sequence numbers to establish associations, the problem of out-of-order data packets caused by discontinuous sequence numbers between data requesters and data responders is solved, thereby improving the accuracy and efficiency of data transmission.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- BEIJING BITINTELLIGENCE INFORMATION TECHNOLOGY CO LTD
- Filing Date
- 2025-05-09
- Publication Date
- 2026-05-21
AI Technical Summary
In existing RDMA technologies, the sequence numbers of the data requester and the data responder are not continuous, making it more complex and difficult for the RDMA protocol to handle packet loss and out-of-order data arrival.
An independent sequence number space is established between the data requester and the data responder. The correct correspondence of data packets is ensured by assigning a first sequence number and a second sequence number in the data packet and establishing an association using the message sequence number in the extended header.
This ensures the continuity of sequence numbers between the data requester and the data responder, avoiding the problem of data packets not being able to be associated, and improving the accuracy and efficiency of data transmission.
Smart Images

Figure CN2025093939_21052026_PF_FP_ABST
Abstract
Description
Data interaction methods and systems, electronic devices and storage media
[0001] This application claims priority to Chinese patent application filed on November 13, 2024, with application number "202411614076.3" and entitled "Data Interaction Method and System, Electronic Device and Storage Medium", the entire contents of which are incorporated herein by reference. Technical Field
[0002] This application relates to the field of data transmission technology, and more specifically, to a data interaction method and system, an electronic device, and a storage medium. Background Technology
[0003] RDMA (Remote Direct Memory Access) technology is widely used for data transfer between dedicated chips in GPUs (Graphics Processing Units) or AI (Artificial Intelligence). However, in existing RDMA technologies, the sequence number of the response data packet for an RDMA READ (Remote Direct Memory Access Read) is assigned by the data requester. This results in discontinuous sequence numbers on both the data requester and the data responder. When data packets are lost on either the data requester or the data responder, handling packet loss and out-of-order arrival in the RDMA protocol becomes more complex and difficult.
[0004] Application content
[0005] This application aims to address at least one of the technical problems existing in the prior art or related technologies.
[0006] Therefore, the first aspect of this application proposes a data interaction method.
[0007] The second aspect of this application proposes a data interaction method.
[0008] The third aspect of this application proposes a data interaction system.
[0009] The fourth aspect of this application proposes a data interaction system.
[0010] The fifth aspect of this application proposes an electronic device.
[0011] The sixth aspect of this application proposes a storage medium.
[0012] In view of this, according to the first aspect of this application, a data interaction method is proposed for a data requester, comprising: determining a first sequence number in a first sequence number space; allocating the first sequence number to a data packet to obtain a request data packet; sending the request data packet to a data responder; receiving a response data packet sent by the data responder; parsing the response data packet to determine a message sequence number in the extended header of the response data packet; and determining that the response data packet is a data packet corresponding to the request data packet based on the message sequence number being the same as or corresponding to the first sequence number.
[0013] The data interaction method provided in this application is mainly used by the data requester and includes: establishing an RDMARC (Remote Direct Memory Access Reliable Connection) connection between the data requester and the data responder, which is typically referred to as a QP (Queue Pair) on both sides. The data requester can use the QP to initiate RDMA operations including SEND, WRITE, and READ, and the responder will then react to these operations and send corresponding responses. After the connection is established between the data requester and the data responder, the data requester determines the data packets to be sent to the data responder. These data packets can be of types such as SEND, WRITE, and READ. SEND and WRITE requests require the responder to respond with an ACK (Acknowledge character), while READ requests require the responder to send the requested response data. The data requester then determines a first sequence number in a first sequence number space, where the first sequence number refers to the PSN (packet sequence number) in RDMA technology. The obtained first sequence number is then assigned to a data packet to obtain a request data packet. When there are multiple data packets, there are also multiple determined first sequence numbers, which are assigned sequentially to each data packet. Different types of data packets use the same first sequence number space. After obtaining the request data packet, it is sent to the data responder. Then, the response data packets sent by the data responder are received. There can be one or more response data packets, and each response data packet includes a second sequence number from a second sequence number space. That is, the first and second sequence numbers come from two independent sequence number spaces. After obtaining the response data packet, it is parsed to determine the message sequence number (MSN) in the extended header (AETH, Acknowledge Extended Transport Header). Then, when the message sequence number is the same as the first sequence number or has a one-to-one correspondence with the first sequence number, where, in this application, the meaning of "same as the first sequence number" refers to "same as the first sequence number" or "has a one-to-one correspondence with the first sequence number", it means that the response data packet is the data packet returned by the data responder in response to the request data packet, that is, the response data packet with the same message sequence number as the first sequence number corresponds to the request data packet.In other words, the data responder uses the first sequence number of the request data packet as the message sequence number in the extended header of the response data packet, enabling the data requester to accurately locate the corresponding data packet in the data returned by the data responder. Furthermore, when the data responder returns multiple response data packets, the data requester can parse them sequentially. When the data requester finds the first data packet, whose message sequence number is the same as or corresponds one-to-one with the first sequence number of the request data packet, and simultaneously finds the second data packet, whose message sequence number is the same as or corresponds one-to-one with the first sequence number of the request data packet, it indicates that all response data packets between the first and second data packets correspond to the request data packet. In this application, by setting the data requester and data responder to use independent sequence number spaces, the sequence numbers of the data requester and data responder become continuous. Simultaneously, this application sets the data requester to determine the response data packet corresponding to the request data packet through the message sequence number, thereby establishing an association between the request data packet and the response data packet, avoiding the problem of the request data packet and response data packet being unable to be associated due to the use of separate sequence number spaces by the data requester and data responder. Therefore, this application solves the problem caused by the discontinuous sequence numbers of the data requester and the data responder.
[0014] The data interaction method described above in this application may also have the following technical features:
[0015] In some technical solutions, optionally, before the step of parsing the response data packet and determining the message sequence number in the extended header of the response data packet, the steps include: obtaining a second sequence number of the response data packet; generating an acknowledgment message based on the second sequence number; and sending the acknowledgment message to the data responder.
[0016] In this technical solution, before parsing the response data packet and determining the message sequence number in the extended header of the response data packet, the process includes: firstly, obtaining the second sequence number of the response data packet, where the second sequence number is allocated by the data responder according to the second sequence number space. Then, generating an acknowledgment message based on the second sequence number, where the acknowledgment message refers to an ACK (Acknowledge character) message. Finally, sending the acknowledgment message to the data responder, by generating the acknowledgment message based on the second sequence number and sending it to the data responder, allows the data responder to know that the data requester has received the response data packet sent by the data responder.
[0017] In some technical solutions, optionally, the step of generating an acknowledgment message based on the second sequence number includes: using the second sequence number as the sequence number of the acknowledgment message; determining the value of the selective acknowledgment option in the acknowledgment message based on the second sequence number; and generating the acknowledgment message based on the value of the selective acknowledgment option and the sequence number.
[0018] In this technical solution, the steps for generating an acknowledgment message based on the second sequence number include: First, using the second sequence number as the sequence number of the acknowledgment message. It's understood that the data requester needs to add a sequence number to the data packet when sending it. Therefore, to distinguish the acknowledgment message from the regular request data packet, the sequence number of the acknowledgment message cannot be obtained from the first sequence number space; instead, the second sequence number in the response data packet is directly used as the sequence number of the acknowledgment message. Then, the value of the Selective Acknowledgment (SACK) option in the acknowledgment message is determined based on the second sequence number. The SACK option includes the sequence number range of successfully received data packets. For example, if the data responseer sends 100 data packets to the data requester, with each data packet having a second sequence number from 1 to 100, but the data requester did not receive data packets with second sequence numbers 4 and 78, then the values in the SACK option would be [1:3], [5:77], and [79:100]. Finally, an acknowledgment message is generated based on the value of the selective acknowledgment option and the sequence number. By adding a selective acknowledgment mechanism to the acknowledgment message, the accuracy of the existing acknowledgment mechanism is improved.
[0019] According to a second aspect of this application, a data interaction method is proposed, mainly for a data responder, comprising: receiving a request data packet sent by a data requester; parsing the request data packet to determine a first sequence number in the request data packet; determining a data packet based on the request data packet; determining a second sequence number in a second sequence number space; allocating the second sequence number to the data packet to obtain a response data packet; using the first sequence number or a number corresponding to the first sequence number as the message sequence number in the extended header of the response data packet; and sending the response data packet to the data requester.
[0020] The data interaction method provided in this application is mainly used by the data responder. The method primarily includes: firstly, establishing an RDMARC (Remote Direct Memory Access Reliable Connection) connection between the data requester and the data responder, typically referred to as a QP (Queue Pair). The data requester can use the QP to initiate RDMA operations including SEND, WRITE, and READ. The responder then reacts to these operations and sends corresponding responses. After the connection is established, the data responder first receives request data packets sent by the data requester. These request data packets can be of types such as SEND, WRITE, and READ. SEND and WRITE requests require the responder to respond with an ACK (Acknowledge character), while READ requests require the responder to send the requested response data. The request data packets are then parsed to determine their first sequence number and content. The data packet to be sent to the data requester is then determined based on the specific content of the request data packet. A second sequence number is then determined in the second sequence number space, which is independent of the first sequence number space. The second sequence number refers to the PSN (packet sequence number) in RDMA technology. When there are multiple data packets, the data responder sequentially determines the second sequence number for the same data in the second sequence number space. After obtaining the second sequence number, it is assigned to the data packet to obtain the response data packet. Then, to associate the response data packet with the request data packet, the first sequence number in the request data packet, or a number that has a one-to-one correspondence with the first sequence number, is used as the message sequence number (MSN) in the extended transport header (AETH) of the response data packet. Finally, the response data packet is sent to the data requester. In this application, by setting the data requester and data responder to use independent sequence number spaces, the sequence numbers of the data requester and data responder become consecutive. Meanwhile, this application establishes an association between the request data packet and the response data packet by using the first sequence number in the request data packet as the message sequence number in the response data packet, thus avoiding the problem that the request data packet and the response data packet cannot be associated because the data requester and the data responseer use independent sequence number spaces.Therefore, this application solves the problem caused by the independent serial numbers between the data requester and the data responder.
[0021] In some technical solutions, optionally, before the step of determining the data packet based on the request data packet, the steps include: generating an acknowledgment message based on the first sequence number; and sending the acknowledgment message to the data requester.
[0022] In this technical solution, before determining the response data packet based on the request data packet, the process includes: firstly, generating an acknowledgment message based on a first sequence number, where the acknowledgment message refers to an ACK (Acknowledge character) message. Then, sending the acknowledgment message to the data requester ensures that the data responseer has received the request data packet sent by the data requester.
[0023] In some technical solutions, optionally, the step of generating an acknowledgment message based on the first sequence number includes: using the first sequence number as the sequence number of the acknowledgment message; determining the value of the selective acknowledgment option in the acknowledgment message based on the first sequence number; and generating the acknowledgment message based on the value of the selective acknowledgment option and the sequence number.
[0024] In this technical solution, the steps for generating an acknowledgment message based on the first sequence number include: First, using the first sequence number as the sequence number of the acknowledgment message. It's understood that the data responder needs to add a sequence number to the data packet when sending it. Therefore, to distinguish the acknowledgment message from the regular response data packet, the sequence number of the acknowledgment message cannot be obtained from the second sequence number space; instead, the first sequence number in the request data packet is directly used as the sequence number of the acknowledgment message. Then, the value of the Selective Acknowledgment (SACK) option in the acknowledgment message is determined based on the first sequence number. The SACK option includes the sequence number range of successfully received data packets. For example, if the data requester sends 50 data packets to the data responder, with each data packet having a first sequence number from 1 to 50, but the data responder did not receive the data packet with a first sequence number of 3, then the value in the SACK option would be [1:2] or [4:50]. Finally, the acknowledgment message is generated based on the value of the selective acknowledgment option and the sequence number. By adding a selective acknowledgment mechanism to the acknowledgment message, the accuracy of the existing acknowledgment mechanism is improved.
[0025] According to a third aspect of this application, a data interaction system is proposed, mainly for a data requester. The data interaction system includes: a first determining module for determining a first sequence number in a first sequence number space; a first allocation module for allocating the first sequence number to a data packet to obtain a request data packet; a first sending module for sending the request data packet to a data responder; a first receiving module for receiving a response data packet sent by the data responder; a first parsing module for parsing the response data packet and determining the message sequence number in the extended header of the response data packet; and a second determining module for determining that the response data packet corresponds to the request data packet based on whether the message sequence number is the same as or corresponds to the first sequence number.
[0026] The data interaction system provided in this application is mainly used by the data requester and includes: a first determining module, a first allocating module, a first sending module, a first receiving module, a first parsing module, and a second determining module. After a connection is established between the data requester and the data responder, the first determining module determines a first sequence number in a first sequence number space. This first sequence number refers to the PSN (packet sequence number) in RDMA technology. Then, the first allocating module allocates the obtained first sequence number to a data packet to obtain a request data packet. When there are multiple data packets, there are also multiple determined first sequence numbers, which are allocated sequentially to each data packet. Different types of data packets use the same first sequence number space. After obtaining the request data packet, the first sending module sends the request data packet to the data responder. Then, the first receiving module receives the response data packet sent by the data responder. The number of response data packets can be one or more, and each response data packet includes a second sequence number from a second sequence number space. That is, the first sequence number and the second sequence number come from two independent sequence number spaces. After receiving the response data packet, the first parsing module parses the response data packet to determine the message sequence number (MSN) in the extended transport header (AETH). Then, the second determining module determines the response data packet as the data packet returned by the data response provider in response to the request data packet. Specifically, the response data packet with the same message sequence number as the first sequence number (in this application, "same as the first sequence number" means either identical to the first sequence number or has a one-to-one correspondence with it) corresponds to the request data packet. In other words, the data response provider uses the first sequence number of the request data packet as the message sequence number in the extended transport header of the response data packet, enabling the data requester to accurately find the corresponding data packet in the data returned by the data response provider. Furthermore, when the data responder returns multiple response data packets, the data requester can parse the response data packets sequentially. When the data requester finds the first data packet, where the message sequence number of the first data packet is the same as or has a one-to-one correspondence with the first sequence number of the request data packet, and at the same time, the data requester also finds the second data packet, where the message sequence number of the second data packet is the same as or has a one-to-one correspondence with the first sequence number of the request data packet, it means that all response data packets between the first and second data packets are data packets corresponding to the request data packets.This application establishes a sequential relationship between data requesters and data responders by setting up separate sequence number spaces for each. Furthermore, the data requester uses the message sequence number to identify the corresponding response data packet, thus establishing an association between the request and response data packets. This avoids the problem of the request and response data packets being unable to be associated due to separate sequence number spaces. Therefore, this application solves the problem caused by the discontinuous sequence numbers of the data requester and data responder.
[0027] According to a fourth aspect of this application, a data interaction system is proposed, mainly for use by a data responder. The data interaction system includes: a second receiving module for receiving a request data packet sent by a data requester; a second parsing module for parsing the request data packet and determining a first sequence number in the request data packet; a third determining module for determining a data packet based on the request data packet; a fourth determining module for determining a second sequence number in a second sequence number space; a second allocation module for allocating the second sequence number to a data packet to obtain a response data packet; a first processing module for using the first sequence number or a number corresponding to the first sequence number as a message sequence number in the extended header of the response data packet; and a second sending module for sending the response data packet to the data requester.
[0028] The data interaction system provided in this application is mainly used by the data responder and includes: a second receiving module, a second parsing module, a third determining module, a fourth determining module, a second allocation module, a first processing module, and a second sending module. After a connection is established between the data requester and the data responder, the second receiving module receives request data packets sent by the data requester. These request data packets can be of types such as SEND, WRITE, and READ. SEND and WRITE requests require the responder to respond with an ACK (Acknowledge character), while READ requests require the responder to send the requested response data. The second parsing module then parses the request data packets to determine the first sequence number and the specific content of the request data packets. The third determining module then determines the data packets to be sent to the data requester based on the specific content of the request data packets. Finally, the fourth determining module determines a second sequence number in a second sequence number space. The second sequence number space is independent of the first sequence number space, and the second sequence number refers to the PSN (packet sequence number) in RDMA technology. When there are multiple data packets, the data responder sequentially determines the second sequence number of the same data in the second sequence number space. After obtaining the second sequence number, the second allocation module assigns the second sequence number to the data packet, thereby obtaining the response data packet. Then, in order to associate the response data packet with the request data packet, the first processing module uses the first sequence number in the request data packet, or a number that has a one-to-one correspondence with the first sequence number, as the message sequence number (MSN) in the extended header (AETH, Acknowledge Extended Transport Header) of the response data packet. Finally, the second sending module sends the response data packet to the data requester. In this application, by setting the data requester and data responder to use independent sequence number spaces, the sequence numbers of the data requester and data responder become consecutive. At the same time, by using the first sequence number in the request data packet as the message sequence number in the response data packet, the association between the request data packet and the response data packet is established, avoiding the problem that the request data packet and the response data packet cannot be associated because the data requester and data responder use independent sequence number spaces. Therefore, this application solves the problem caused by the independent sequence numbers between the data requester and data responder.
[0029] According to a fifth aspect of this application, an electronic device is proposed, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the data interaction method as described above.
[0030] The electronic device provided in this application, when its processor executes a computer program, implements the steps of the above-mentioned data interaction method, and can achieve the technical effects of any of the above technical solutions, which will not be elaborated here.
[0031] According to a sixth aspect of this application, a storage medium is provided on which a computer program is stored, wherein the computer program, when executed by a processor, implements the steps of the data interaction method as described above.
[0032] The storage medium provided in this application, when the computer program is executed by the processor, implements the steps of the above-described data interaction method, and can achieve the technical effects of any of the above technical solutions, which will not be elaborated here.
[0033] Additional aspects and advantages of this application will become apparent in the following description or may be learned by practice of this application. Attached Figure Description
[0034] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the description of the embodiments taken in conjunction with the following drawings, in which:
[0035] Figure 1 shows one of the flowcharts of a data interaction method according to an embodiment of this application;
[0036] Figure 2 shows a flowchart of a data interaction method according to an embodiment of this application before the step of parsing the response data packet and determining the message sequence number in the extended header of the response data packet;
[0037] Figure 3 shows a flowchart illustrating the step of generating an acknowledgment message based on a second sequence number in a data interaction method according to an embodiment of this application;
[0038] Figure 4 shows a second schematic flowchart of a data interaction method according to an embodiment of this application;
[0039] Figure 5 shows a flowchart of a data interaction method according to an embodiment of this application before the step of determining the data packet based on the request data packet;
[0040] Figure 6 shows a flowchart illustrating the step of generating an acknowledgment message based on a first sequence number in a data interaction method according to an embodiment of this application;
[0041] Figure 7 shows one of the schematic diagrams of RDMA technology in related technologies;
[0042] Figure 8 shows the second schematic diagram of the principle of RDMA technology in related technologies;
[0043] Figure 9 shows the third schematic diagram of the principle of RDMA technology in related technologies;
[0044] Figure 10 shows one of the schematic diagrams of RDMA technology according to an embodiment of this application;
[0045] Figure 11 shows a second schematic diagram of the RDMA technology according to an embodiment of this application;
[0046] Figure 12 shows a schematic diagram of the RDMA technology of one embodiment of this application;
[0047] Figure 13 shows the fourth schematic diagram of the principle of RDMA technology in related technologies;
[0048] Figure 14 shows the fifth schematic diagram of the principle of RDMA technology in related technologies;
[0049] Figure 15 shows a fourth schematic diagram of the RDMA technology of one embodiment of this application;
[0050] Figure 16 shows a fifth schematic diagram of the RDMA technology of one embodiment of this application;
[0051] Figure 17 shows a schematic diagram of the RDMA technology of one embodiment of this application;
[0052] Figure 18 shows a schematic diagram of the RDMA technology of one embodiment of this application;
[0053] Figure 19 shows one of the schematic block diagrams of a data interaction system according to an embodiment of this application;
[0054] Figure 20 shows a second schematic block diagram of a data interaction system according to an embodiment of this application;
[0055] Figure 21 shows a schematic block diagram of an electronic device according to an embodiment of this application. Detailed Implementation
[0056] To better understand the above-mentioned objectives, features, and advantages of this application, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be noted that, unless otherwise specified, the embodiments and features described in these embodiments can be combined with each other.
[0057] Many specific details are set forth in the following description in order to provide a full understanding of this application. However, this application may also be implemented in other ways different from those described herein. Therefore, the scope of protection of this application is not limited to the specific embodiments disclosed below.
[0058] Figure 1 shows a flowchart of a data interaction method according to an embodiment of this application. The data interaction method is mainly used by the data requester and includes:
[0059] Step 102: Determine the first sequence number in the first sequence number space;
[0060] Step 104: Assign the first sequence number to the data packet to obtain the request data packet;
[0061] Step 106: Send the request data packet to the data responder;
[0062] Step 108: Receive the response data packet sent by the data responder;
[0063] Step 110: Parse the response data packet to determine the message sequence number in the extended header of the response data packet;
[0064] Step 112: If the message sequence number is the same as the first sequence number or the message sequence number corresponds to the first sequence number, then determine that the response data packet is the data packet corresponding to the request data packet.
[0065] The data interaction method provided in this application is mainly used by the data requester and includes: establishing an RDMARC (Remote Direct Memory Access Reliable Connection) connection between the data requester and the data responder, which is typically referred to as a QP (Queue Pair) on both sides. The data requester can use the QP to initiate RDMA operations including SEND, WRITE, and READ, and the responder will then react to these operations and send corresponding responses. After the connection is established between the data requester and the data responder, the data requester determines the data packets to be sent to the data responder. These data packets can be of types such as SEND, WRITE, and READ. SEND and WRITE requests require the responder to respond with an ACK (Acknowledge character), while READ requests require the responder to send the requested response data. The data requester then determines a first sequence number in a first sequence number space, where the first sequence number refers to the PSN (packet sequence number) in RDMA technology. The obtained first sequence number is then assigned to a data packet to obtain a request data packet. When there are multiple data packets, there are also multiple determined first sequence numbers, which are assigned sequentially to each data packet. Different types of data packets use the same first sequence number space. After obtaining the request data packet, it is sent to the data responder. Then, the response data packets sent by the data responder are received. There can be one or more response data packets, and each response data packet includes a second sequence number from a second sequence number space. That is, the first and second sequence numbers come from two independent sequence number spaces. After obtaining the response data packet, it is parsed to determine the message sequence number (MSN) in the extended header (AETH, Acknowledge Extended Transport Header). Then, when the message sequence number is the same as the first sequence number or has a one-to-one correspondence with the first sequence number, where, in this application, the meaning of "same as the first sequence number" refers to "same as the first sequence number" or "has a one-to-one correspondence with the first sequence number", it means that the response data packet is the data packet returned by the data responder in response to the request data packet, that is, the response data packet with the same message sequence number as the first sequence number corresponds to the request data packet.In other words, the data responder uses the first sequence number of the request data packet as the message sequence number in the extended header of the response data packet, enabling the data requester to accurately locate the corresponding data packet in the data returned by the data responder. Furthermore, when the data responder returns multiple response data packets, the data requester can parse them sequentially. When the data requester finds the first data packet, whose message sequence number is the same as or corresponds one-to-one with the first sequence number of the request data packet, and simultaneously finds the second data packet, whose message sequence number is the same as or corresponds one-to-one with the first sequence number of the request data packet, it indicates that all response data packets between the first and second data packets correspond to the request data packet. In this application, by setting the data requester and data responder to use independent sequence number spaces, the sequence numbers of the data requester and data responder become continuous. Simultaneously, this application sets the data requester to determine the response data packet corresponding to the request data packet through the message sequence number, thereby establishing an association between the request data packet and the response data packet, avoiding the problem of the request data packet and response data packet being unable to be associated due to the use of separate sequence number spaces by the data requester and data responder. Therefore, this application solves the problem caused by the discontinuous sequence numbers of the data requester and the data responder.
[0066] Figure 2 illustrates a flowchart of a data interaction method according to an embodiment of this application, prior to the step of parsing the response data packet and determining the message sequence number in the extended header of the response data packet; wherein, prior to the step of parsing the response data packet and determining the message sequence number in the extended header of the response data packet, the method includes:
[0067] Step 202: Obtain the second sequence number of the response data packet;
[0068] Step 204: Generate an acknowledgment message based on the second sequence number;
[0069] Step 206: Send an acknowledgment message to the data responder.
[0070] In this embodiment, before parsing the response data packet and determining the message sequence number in the extended header of the response data packet, the method includes: firstly, obtaining the second sequence number of the response data packet, wherein the second sequence number is allocated by the data responder according to the second sequence number space of the response data packet. Then, generating an acknowledgment message based on the second sequence number, wherein the acknowledgment message refers to an ACK (Acknowledge character) message. Finally, sending the acknowledgment message to the data responder, by generating the acknowledgment message based on the second sequence number and sending the acknowledgment message to the data responder, enables the data responder to know that the data requester has received the response data packet sent by the data responder.
[0071] Figure 3 illustrates a flowchart of the step of generating an acknowledgment message based on a second sequence number in a data interaction method according to an embodiment of this application; wherein, the step of generating an acknowledgment message based on the second sequence number includes:
[0072] Step 302: Use the second sequence number as the sequence number of the acknowledgment message;
[0073] Step 304: Determine the value of the selective acknowledgment option in the acknowledgment message based on the second sequence number;
[0074] Step 306: Generate an acknowledgment message based on the value and sequence number of the selective acknowledgment option.
[0075] In this embodiment, the step of generating an acknowledgment message based on the second sequence number includes: First, using the second sequence number as the sequence number of the acknowledgment message. It is understood that the data requester needs to add a sequence number to the data packet when sending it. Therefore, to distinguish the acknowledgment message from the regular request data packet, the sequence number of the acknowledgment message cannot be obtained from the first sequence number space; instead, the second sequence number in the response data packet is directly used as the sequence number of the acknowledgment message. Then, the value of the Selective Acknowledgment (SACK) option in the acknowledgment message is determined based on the second sequence number. The SACK option includes the sequence number range of successfully received data packets. For example, if the data responseer sends 100 data packets to the data requester, with each data packet having a second sequence number from 1 to 100, but the data requester did not receive data packets with second sequence numbers 4 and 78, then the values in the SACK option would be [1:3], [5:77], and [79:100]. Finally, an acknowledgment message is generated based on the value of the selective acknowledgment option and the sequence number. By adding a selective acknowledgment mechanism to the acknowledgment message, the accuracy of the existing acknowledgment mechanism is improved.
[0076] Figure 4 shows a second schematic flowchart of a data interaction method according to an embodiment of this application; wherein, the data interaction method is mainly used by the data responder, and the method includes:
[0077] Step 402: Receive the request data packet sent by the data requester;
[0078] Step 404: Parse the request data packet to determine the first sequence number in the request data packet;
[0079] Step 406: Determine the data packet based on the request data packet;
[0080] Step 408: Determine the second serial number in the second serial number space;
[0081] Step 410: Assign the second sequence number to the data packet to obtain the response data packet;
[0082] Step 412: Use the first sequence number or the number corresponding to the first sequence number as the message sequence number in the extended header of the response data packet;
[0083] Step 414: Send the response data packet to the data requester.
[0084] In this embodiment, the data interaction method is primarily used by the data responder. This method mainly includes: firstly, establishing an RDMARC (Remote Direct Memory Access Reliable Connection) connection between the data requester and the data responder, typically referred to as a QP (Queue Pair). The data requester can use the QP to initiate RDMA operations including SEND, WRITE, and READ. The responder then reacts to these operations and sends corresponding responses. After the connection is established between the data requester and the data responder, the data responder first receives request data packets sent by the data requester. These request data packets can be SEND, WRITE, or READ. SEND and WRITE requests require the responder to respond with an ACK (Acknowledge character), while READ requests require the responder to send the requested response data. The request data packets are then parsed to determine the first sequence number and the specific content of the request data packets. The data packet to be sent to the data requester is then determined based on the specific content of the request data packet. A second sequence number is then determined in the second sequence number space, which is independent of the first sequence number space. The second sequence number refers to the PSN (packet sequence number) in RDMA technology. When there are multiple data packets, the data responder sequentially determines the second sequence number for the same data in the second sequence number space. After obtaining the second sequence number, it is assigned to the data packet to obtain the response data packet. Then, to associate the response data packet with the request data packet, the first sequence number in the request data packet, or a number that has a one-to-one correspondence with the first sequence number, is used as the message sequence number (MSN) in the extended transport header (AETH) of the response data packet. Finally, the response data packet is sent to the data requester. In this application, by setting the data requester and data responder to use independent sequence number spaces, the sequence numbers of the data requester and data responder become consecutive. Meanwhile, this application establishes an association between the request data packet and the response data packet by using the first sequence number in the request data packet as the message sequence number in the response data packet, thus avoiding the problem that the request data packet and the response data packet cannot be associated because the data requester and the data responseer use independent sequence number spaces.Therefore, this application solves the problem caused by the independent serial numbers between the data requester and the data responder.
[0085] Figure 5 illustrates a flowchart of a data interaction method according to an embodiment of this application, prior to the step of determining a data packet based on a request data packet; wherein, prior to the step of determining a response data packet based on a request data packet, the method includes:
[0086] Step 502: Generate an acknowledgment message based on the first sequence number;
[0087] Step 504: Send an acknowledgment message to the data requester.
[0088] In this embodiment, before determining the data packet based on the request data packet, the method includes: firstly, generating an acknowledgment message based on a first sequence number, wherein the acknowledgment message refers to an ACK (Acknowledge character) message. Then, sending the acknowledgment message to the data requester ensures that the data responseer has received the request data packet sent by the data requester.
[0089] Figure 6 shows a flowchart illustrating the step of generating an acknowledgment message based on a first sequence number in a data interaction method according to an embodiment of this application; wherein, the step of generating an acknowledgment message based on the first sequence number includes:
[0090] Step 602: Use the first sequence number as the sequence number of the acknowledgment message;
[0091] Step 604: Determine the value of the selective acknowledgment option in the acknowledgment message based on the first sequence number;
[0092] Step 606: Generate an acknowledgment message based on the value and sequence number of the selective acknowledgment option.
[0093] In this embodiment, the step of generating an acknowledgment message based on the first sequence number includes: First, using the first sequence number as the sequence number of the acknowledgment message. It is understood that the data responder needs to add a sequence number to the data packet when sending it. Therefore, to distinguish the acknowledgment message from the regular response data packet, the sequence number of the acknowledgment message cannot be obtained from the second sequence number space; instead, the first sequence number in the request data packet is directly used as the sequence number of the acknowledgment message. Then, the value of the Selective Acknowledgment (SACK) option in the acknowledgment message is determined based on the first sequence number. The SACK option includes the sequence number range of successfully received data packets. For example, if the data requester sends 50 data packets to the data responder, with each data packet having a first sequence number from 1 to 50, but the data responder did not receive the data packet with a first sequence number of 3, then the value in the SACK option would be [1:2] or [4:50]. By adding a selective acknowledgment mechanism to the acknowledgment message, the accuracy of the existing acknowledgment mechanism is improved.
[0094] The data interaction method provided in this application mainly targets RDMA (Remote Direct Memory Access) technology. In related technologies, firstly, an RDMARC (Remote Direct Memory Access Reliable Connection) connection is established between the data requester and the data responder, typically referred to as a QP (Queue Pair) in each direction. The requester can use the QP to initiate RDMA operations including SEND, WRITE, and READ. The responder then reacts to these operations and sends corresponding responses. Figure 7 illustrates one of the schematic diagrams of RDMA technology in related technologies, showing the requester sending a WRITE message followed by a SEND message to the responder. The WRITE message consists of four data packets: one Write first (the first data written), two Write middle (data written in the middle), and one Write last (data written last). The SEND message consists of three data packets: one Send first (the first data sent), one Send middle (data written in the middle), and one Send last (data sent last). After receiving data from the data requester, the data responder returns an ACK (Acknowledgement) to confirm that certain data packets have been received. An ACK with PSN=2 indicates that the data responder has received all data packets with a PSN (Packet Sequence Number) not greater than 2. Similarly, an ACK with PSN=4 indicates that the data responder has received all data packets with a PSN not greater than 4, and an ACK with PSN=7 indicates that the data responder has received all data packets with a PSN not greater than 7. As shown in Figure 7, an ACK with PSN=4 indicates that the entire WRITE message has been received, and an ACK with PSN=7 indicates that the entire SEND message has been received. In this way, by using the packet sequence number (PSN) and ACK, the RDMA protocol can confirm whether each packet has been successfully delivered to the data responder.
[0095] As shown in Figure 8, the requester sends a READ Request message followed by a SEND message. The READ Request requests a READ Response message consisting of four data packets from the responder. After sending the READ Request, the requester sends a SEND message containing three data packets to the responder. Figure 8 shows that the sequence number (PSN) of the READ Response data packet is assigned by the requester. The requester reserves these PSNs based on the number of READ Response data packets. This leaves a "gap" on the requester's end. It's noteworthy that the PSN of the subsequent SEND Request data packet starts at 5 (equal to the READ Request's PSN plus the number of READ Response data packets), not 2. The advantage of the requester reserving the sequence number for the READ Response is that it allows the requester to easily associate the Response data packet with the original READ Request, since the sequence number is assigned by the requester. However, this presents a problem: firstly, the Response data packet is sent from the responder to the requester. However, the data requester does not send any ACK confirmation to the data responder, so the data responder cannot know whether these Response packets have been received by the data requester. Secondly, since the READ Response packets are assigned sequence numbers by the data requester, this results in discontinuous sequence number spaces for both the data requester and the data responder. This discontinuous sequence number space presents a challenge for the RDMA protocol. As shown in Figure 9, at the data responder's location, READ Response packets and WRITE packets reside in different PSN spaces. Therefore, when packet loss occurs in both spaces, it becomes difficult to merge the packet loss information from the two independent spaces and apply it to a simple, consistent retransmission algorithm. For example, in Figure 9, when packets with PSNs 4, 101, 102, and 103 are lost, should the data responder first retransmit the packet with PSN 4 or the packet with PSN 101? On one hand, the packet with PSN 101 should be retransmitted first because the duplicate ACK is for the WRITE sequence number space. But on the other hand, all these packets belong to the same QP, so the packet with PSN 4 should be retransmitted first. This demonstrates that the challenges posed by the discontinuous sequence number space make designing a reliable RDMA protocol more complex and difficult.
[0096] Therefore, this application introduces a Unified PSN mechanism to overcome the difficulties caused by the separation of different PSN spaces in the original RDMA specification. Specifically, in a QP, all RDMA operations use a single PSN space. The data requester and data responder of a connection each maintain their own independent PSN space. The Unified PSN space can be applied to the scenario shown in Figure 8. The sequence numbers of the data packets are shown in Figure 10. On the data requester side, the sequence numbers of the READ request and the subsequent SEND data packets become consecutive, without gaps. On the data responder side, the READ Response data packet is assigned a sequence number from the data responder's sequence number space. Therefore, the sequence number of the READ Response data packet is independent of the data requester's sequence number space. In this application, all RDMA operations of the same data requester or data responder share the same sequence number space, regardless of what type of RDMA operation they are.
[0097] Furthermore, in the original RDMA specification, the data requester could easily associate READ Response packets with READ Request packets because the READ Response packets carried a sequence number (PSN) assigned by the data requester. As shown in Figure 8, when the data requester receives READ Response packets with sequence numbers 1 to 4, it knows that these READ Response packets are responses to the READ Request with sequence number 1. However, in Figure 10, the READ Response packets have sequence numbers 100 to 103, assigned by the data responseer rather than the data requester. Therefore, the data requester lacks sufficient knowledge to associate the READ Response packets with the original READ Request.
[0098] Therefore, this application uses a Message Sequence Number (MSN) to establish the association between READ Response packets and READ Requests. Specifically, in the original RDMA specification, the first and last packets in the READ Response carry an AETH (Acknowledgment Extension Header) containing a Message Sequence Number (MSN). The data requester uses this MSN to map ACK packets (in the original RDMA specification, the first and last READ Response packets are considered ACK packets) to the corresponding request. In this application, as shown in Figure 11, the MSN carries the READ Request's sequence number (PSN). In Figure 11, MSN = 1, where 1 is the READ Request's sequence number. When the data requester receives a READ Response packet with MSN = 1, it can determine which READ Request this READ Response belongs to.
[0099] Furthermore, this application adds ACK messages to READ Request and READ Response packets. As shown in Figure 12, since the PSN of a READ Request is 1, the PSN of a READ Request ACK (read request acknowledgment message) is also 1, indicating that the data responder has received the READ Request. Because READ Response packets are treated as packets rather than ACK messages, an additional READ Request ACK is needed to acknowledge the READ Request. Figure 12 shows four READ Response ACKs (read response acknowledgment messages), which are used to acknowledge four corresponding READ Response packets. The frequency of READ Response ACK generation can be configured, allowing one READ Response ACK to acknowledge multiple READ Response packets.
[0100] Figures 13 and 14 show the ACK message format defined in the original RDMA specification. As can be seen from Figures 13 and 14, an ACK consists of a BTH (Base Transport Header) and an AETH (Acknowledge Extended Transport Header). The newly added READ Request ACK message also follows the format of a regular ACK message, where the PSN contained in the READ Request ACK message is the PSN of the READ Request packet. The newly added READResponse ACK message also follows the format of a regular ACK message. The PSN contained in the READResponse ACK message is the PSN of the READ Response packet. This demonstrates that by adopting a unified PSN, the previously mentioned challenge of designing a reliable RDMA protocol due to the discontinuous sequence number space is resolved.
[0101] Furthermore, in network environments where packet loss occurs, the Go-Back-N mechanism defined in RDMA is not efficient in terms of bandwidth utilization. Therefore, a Selective Acknowledgement (SACK) mechanism can be introduced to enhance the existing ACK mechanism.
[0102] Specifically, the format of the SACK_1 packet is the same as that of the ACK message. SACK_1 reuses the reserved value of Syndrome in AETH, as shown in Figure 15. The reserved Syndrome value in the RDMA specification of related technologies is 010xxxxx. Therefore, 01000000 can be used to identify SACK_1. Of course, we can also choose other values within the reserved range.
[0103] Figure 16 illustrates how SACK_1 works. As shown in Figure 16, packets with PSNs of 2 and 3 are discarded. Therefore, for each subsequently received packet, the data responder generates a SACK_1 packet, where the PSN of ACK is 1, and the PSN of SACK corresponds to the PSN of the currently received packet.
[0104] Furthermore, the SACK mechanism can be extended to use the SACK_n packet format to acknowledge multiple received packets at once. As shown in Figure 17, the SACK_n message format is based on AETH and SACKETH (Selective Acknowledgement Extended Transport Header), meaning the SACK_n message format uses AETH and a newly introduced SACKETH extension header. The Syndrome value 01000001 can be optionally used to represent SACK_n. The MSN field is reinterpreted as the number of SACKETH entries. Each SACKETH describes a received PSN range using the format [start, end] . All packets contained within the [start, end] range have been received by the data receiver.
[0105] Specifically, as shown in Figure 18, the WRITE message consists of 128 packets, where packets with PSNs of 2 and 100 are lost. A single SACK_n packet can describe this situation, containing two SACKETH fields: one SACKETH indicates that packets within the PSN range [3:99] have been received; the other SACKETH indicates that packets within the PSN range [101:128] have been received. The generation of the SACK packet depends on the specific implementation. It can be configured to trigger the SACK packet immediately upon receiving out-of-order packets for fast retransmission, or only when the number of out-of-order packets reaches a predetermined threshold, or a predefined timeout occurs, or a predefined number of packets are received.
[0106] Figure 19 shows a schematic block diagram of a data interaction system according to an embodiment of this application; wherein, the data interaction system 190 is mainly used by the data requester, and the data interaction system 190 includes:
[0107] The first determining module 1902 is used to determine the first serial number in the first serial number space;
[0108] The first allocation module 1904 is used to allocate the first sequence number into the data packet to obtain the request data packet;
[0109] The first sending module 1906 is used to send the request data packet to the data responder;
[0110] The first receiving module 1908 is used to receive response data packets sent by the data responder;
[0111] The first parsing module 1910 is used to parse the response data packet and determine the message sequence number in the extended header of the response data packet;
[0112] The second determining module 1912 is used to determine that the response data packet is the data packet corresponding to the request data packet if the message sequence number is the same as or corresponds to the first sequence number.
[0113] The data interaction system 190 provided in this application is mainly used by the data requester and includes: a first determining module 1902, a first allocating module 1904, a first sending module 1906, a first receiving module 1908, a first parsing module 1910, and a second determining module 1912. After a connection is established between the data requester and the data responder, the first determining module 1902 determines a first sequence number in a first sequence number space, where the first sequence number refers to the PSN (packet sequence number) in RDMA technology. Then, the first allocating module 1904 allocates the obtained first sequence number to a data packet to obtain a request data packet. When there are multiple data packets, there are also multiple determined first sequence numbers, and these multiple first sequence numbers are allocated sequentially to each data packet. Different types of data packets use the same first sequence number space. After obtaining the request data packet, the first sending module 1906 sends the request data packet to the data responder. Then, the first receiving module 1908 receives the response data packet sent by the data responder. The number of response data packets can be one or more, and each response data packet includes a second sequence number. The second sequence number comes from a second sequence number space, meaning the first and second sequence numbers come from two independent sequence number spaces. After receiving the response data packet, the first parsing module 1910 parses the response data packet to determine the message sequence number (MSN) in the extended header (AETH, Acknowledge Extended Transport Header) of the response data packet. Then, the second determining module 1912 determines the response data packet when the message sequence number is the same as or has a one-to-one correspondence with the first sequence number. Hereinafter, "the same as the first sequence number" in this application refers to either the same as or having a one-to-one correspondence with the first sequence number. The response data packet is the data packet returned by the data responder in response to the request data packet; that is, the response data packet with the same message sequence number as the first sequence number corresponds to the request data packet. In other words, the data responder uses the first sequence number of the request data packet as the message sequence number in the extended header of the response data packet, enabling the data requester to accurately find the corresponding data packet in the data returned by the data responder.Furthermore, when the data responder returns multiple response data packets, the data requester can parse the response data packets sequentially. When the data requester finds the first data packet, where the message sequence number of the first data packet is the same as or has a one-to-one correspondence with the first sequence number of the request data packet, and simultaneously finds the second data packet, where the message sequence number of the second data packet is the same as or has a one-to-one correspondence with the first sequence number of the request data packet, it indicates that all response data packets between the first and second data packets are data packets corresponding to the request data packet. In this application, by setting the data requester and data responder to use independent sequence number spaces, the sequence numbers between the data requester and data responder become continuous. Simultaneously, this application sets the data requester to determine the response data packet corresponding to the request data packet through the message sequence number, thereby establishing the association between the request data packet and the response data packet, avoiding the problem that the request data packet and response data packet cannot be associated due to the data requester and data responder using independent sequence number spaces. Therefore, this application solves the problem caused by the discontinuous sequence numbers of the data requester and data responder.
[0114] Figure 20 shows a second schematic block diagram of a data interaction system according to an embodiment of this application; wherein, the data interaction system 200 is mainly used by the data responder, and the data interaction system 200 includes:
[0115] The second receiving module 2002 is used to receive the request data packet sent by the data requester;
[0116] The second parsing module 2004 is used to parse the request data packet and determine the first sequence number in the request data packet;
[0117] The third determining module 2006 is used to determine the data packet based on the request data packet;
[0118] The fourth determining module 2008 is used to determine the second serial number in the second serial number space;
[0119] The second allocation module 2010 is used to allocate the second sequence number to the data packet to obtain the response data packet;
[0120] The first processing module 2012 is used to use the first sequence number or the number corresponding to the first sequence number as the message sequence number in the extended header of the response data packet;
[0121] The second sending module 2014 is used to send the response data packet to the data requester.
[0122] The data interaction system 200 provided in this application is mainly used by the data responder and mainly includes: a second receiving module 2002, a second parsing module 2004, a third determining module 2006, a fourth determining module 2008, a second allocation module 2010, a first processing module 2012, and a second sending module 2014. After a connection is established between the data requester and the data responder, the second receiving module 2002 can receive request data packets sent by the data requester. These request data packets can be of types such as SEND, WRITE, and READ. SEND and WRITE requests require the responder to respond with an ACK (Acknowledge character), while READ requests require the responder to send the requested response data. The second parsing module 2004 then parses the request data packets to determine the first sequence number and the specific content of the request data packets. Subsequently, the third determining module 2006 determines the data packet to be sent to the data requester based on the specific content of the request data packets. Then, the fourth determining module 2008 determines the second sequence number in the second sequence number space, where the second sequence number space is independent of the first sequence number space. The second sequence number refers to the PSN (packet sequence number) in RDMA technology. When there are multiple packets, the data responder determines the second sequence number of the same data in the second sequence number space sequentially. After obtaining the second sequence number, the second allocation module 2010 allocates the second sequence number to the packets, thus obtaining the response packet. Then, in order to associate the response packet with the request packet, the first processing module 2012 uses the first sequence number in the request packet, or a number that has a one-to-one correspondence with the first sequence number, as the message sequence number (MSN) in the extended header (AETH, Acknowledge Extended Transport Header) of the response packet. Finally, the second sending module 2014 sends the response packet to the data requester. In this application, by setting the data requester and data responder to use independent sequence number spaces, the sequence numbers between the data requester and data responder become continuous. Furthermore, this application establishes an association between the request data packet and the response data packet by using the first sequence number in the request data packet as the message sequence number in the response data packet. This avoids the problem that the request data packet and the response data packet cannot be associated because the data requester and the data responseer use independent sequence number spaces. Therefore, this application solves the problem caused by the independent sequence numbers between the data requester and the data responseer.
[0123] Figure 21 shows a schematic block diagram of an electronic device according to an embodiment of the present application; wherein, the electronic device 210 includes a memory 2102, a processor 2104, and a computer program stored in the memory 2102 and executable on the processor 2104, wherein the processor 2104 executes the computer program to implement the steps of the data interaction method as described above.
[0124] The electronic device 210 provided in this application, when the processor 2104 executes a computer program to implement the steps of the above-described data interaction method, can achieve the technical effects of any of the above embodiments, and will not be described again.
[0125] One embodiment of this application proposes a storage medium on which a computer program is stored, which, when executed by a processor, implements the steps of the data interaction method as described above.
[0126] The storage medium provided in this application, when the computer program is executed by the processor, implements the steps of the above data interaction method, and can achieve the technical effects of any of the above embodiments, which will not be repeated here.
[0127] In the description of this specification, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance, unless otherwise expressly specified and limited. The terms "connection," "installation," and "fixing," etc., should be interpreted broadly. For example, "connection" can be a fixed connection, a detachable connection, or an integral connection; it can be a direct connection or an indirect connection through an intermediate medium. Those skilled in the art can understand the specific meaning of the above terms in this application according to the specific circumstances.
[0128] In the description of this specification, the terms "one embodiment," "some embodiments," "specific embodiment," etc., refer to a specific feature, structure, material, or characteristic described in connection with that embodiment or example, which is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0129] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A data interaction method for a data requester, wherein, include: Determine the first sequence number in the first sequence number space; The first sequence number is assigned to the data packet to obtain the request data packet; Send the request data packet to the data responder; Receive the response data packet sent by the data responder; The response data packet is parsed to determine the message sequence number in the extended header of the response data packet; If the message sequence number is the same as or corresponds to the first sequence number, then the response data packet is determined to be a data packet corresponding to the request data packet.
2. The data interaction method of claim 1, wherein, Before the step of parsing the response data packet and determining the message sequence number in the extended header of the response data packet, the data interaction method further includes: Obtain the second sequence number of the response data packet; Generate an acknowledgment message based on the second sequence number; The confirmation message is sent to the data responder.
3. The data interaction method of claim 2, wherein, The step of generating an acknowledgment message based on the second sequence number includes: Use the second sequence number as the sequence number of the acknowledgment message; The value of the selective acknowledgment option in the acknowledgment message is determined based on the second sequence number; The confirmation message is generated based on the value of the selective confirmation option and the sequence number.
4. A data interaction method for a data responder, wherein, include: Receive request data packets sent by the data requester; The request data packet is parsed to determine the first sequence number in the request data packet; Determine the data packet based on the request data packet; Determine the second sequence number in the second sequence number space; The second sequence number is assigned to the data packet to obtain a response data packet; Use the first sequence number or the number corresponding to the first sequence number as the message sequence number in the extended header of the response data packet; The response data packet is sent to the data requester.
5. The data interaction method of claim 4, wherein, Prior to the step of determining the data packet based on the request data packet, the data interaction method further includes: Generate an acknowledgment message based on the first sequence number; The confirmation message is sent to the data requester.
6. The data interaction method of claim 5, wherein, The step of generating an acknowledgment message based on the first sequence number includes: Use the first sequence number as the sequence number of the acknowledgment message; The value of the selective acknowledgment option in the acknowledgment message is determined based on the first sequence number; The confirmation message is generated based on the value of the selective confirmation option and the sequence number.
7. A data interaction system for a data requestor, wherein, include: A first determining module is configured to determine a first serial number in a first serial number space; The first allocation module is used to allocate the first sequence number into the data packet to obtain the request data packet; A first sending module is configured to send the request data packet to the data responder; The first receiving module is used to receive the response data packet sent by the data responder; The first parsing module is used to parse the response data packet and determine the message sequence number in the extended header of the response data packet; The second determining module is used to determine that the response data packet is a data packet corresponding to the request data packet based on the fact that the message sequence number is the same as the first sequence number or the message sequence number corresponds to the first sequence number.
8. A data interaction system for a data responder, wherein, include: The second receiving module is used to receive request data packets sent by the data requester; The second parsing module is used to parse the request data packet and determine the first sequence number in the request data packet; The third determining module is used to determine the data packet based on the request data packet; The fourth determining module is used to determine the second serial number in the second serial number space; The second allocation module is used to allocate the second sequence number to the data packet to obtain a response data packet; A first processing module is configured to use the first sequence number or the number corresponding to the first sequence number as the message sequence number in the extended header of the response data packet. The second sending module is used to send the response data packet to the data requester.
9. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein, When the processor executes the computer program, it implements the steps of the data interaction method as described in any one of claims 1 to 3, and / or the steps of the data interaction method as described in any one of claims 4 to 6.
10. A storage medium having stored thereon a computer program, wherein, When the computer program is executed by the processor, it implements the steps of the data interaction method as described in any one of claims 1 to 3, and / or the steps of the data interaction method as described in any one of claims 4 to 6.