Data transmission method and device, electronic equipment, chip, storage medium and computer program product

Through RDMA data transmission, when the first device fails, the second device takes over the data transmission, which solves the problem of data transmission failure caused by the failure of the entire network card and achieves higher data transmission reliability and fault tolerance.

CN119341691AActive Publication Date: 2025-01-21CHINA MOBILE COMM LTD RES INST +1

Patent Information

Application Number
CN202411448673.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-16
Publication Date
2025-01-21
Estimated Expiration
2044-10-16

AI Technical Summary

Technical Problem

In RDMA data transmission, the failure of the entire network card leads to the failure of data transmission, and the existing technology is difficult to effectively solve this problem.

Method used

When the first device transmits the target data packet to the third device, if the first device fails, the second device will send the first data packet to indicate that the target data packet sending device is changed from the first device to the second device. After receiving, the third device confirms and updates the peer device of the queue pair, and continues to transmit the target data message.

Benefits of technology

This method ensures that data transmission can continue when the first device fails, improving the reliability and fault tolerance of data transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119341691A_ABST
    Figure CN119341691A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a data transmission method, a data transmission device, electronic equipment, a chip, a storage medium and a computer program product, the data transmission method is applied to first equipment, and comprises the following steps: in the process that the first equipment transmits a target data message to third equipment, when the first equipment has a fault, sending the target data message to the third equipment; sending the first data message to a third device; the first data message comprises first information, and the first information is used for indicating a target data message sending device to be changed from the first device to the second device; the first data message is a data message in the target data message; receiving an acknowledgement ACK message sent by the third device; and transmitting the target data message to the third device according to the ACK message.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of communication technology, and specifically to a data transmission method, a data transmission device, an electronic device, a chip, a storage medium, and a computer program product. Background Art

[0002] Remote Direct Memory Access (RDMA) is a network technology that allows a near-end computer to directly access the memory of a remote computer without the intervention of the remote computer's central processing unit (CPU). This network technology greatly reduces the delay of data transmission, reduces the CPU load, and improves the efficiency of network communication. In order to improve the reliability of data transmission, the reliability solution proposed in the current RDMA related specifications and standards is that different ports of the same network card serve as the primary and backup ports for each other. However, in actual application, the entire network card is likely to fail, resulting in data transmission failure. Summary of the invention

[0003] In order to solve the technical problem that data transmission fails due to failure of the entire network card, the embodiments of the present application provide a data transmission method, a data transmission device, an electronic device, a chip, a storage medium and a computer program product.

[0004] The data transmission method provided in the embodiment of the present application is applied to a second device, including:

[0005] In the process of transmitting a target data message from a first device to a third device, when the first device fails, a first data message is sent to the third device; the first data message includes first information, and the first information is used to indicate that the target data message sending device is changed from the first device to the second device; the first data message is a data message in the target data message;

[0006] Receiving an Acknowledgement (ACK) message sent by the third device;

[0007] According to the ACK message, the target data message is transmitted to the third device.

[0008] The data transmission method provided in the embodiment of the present application is applied to a third device, including:

[0009] In the process of receiving a target data message transmitted by a first device, receiving a first data message sent by a second device; the first data message includes first information, and the first information is used to indicate that the target data message sending device is changed from the first device to the second device; the first data message is a data message in the target data message;

[0010] According to the first data message, change the peer device in the queue pair (Queue Pair, QP) to the second device; send an ACK message to the second device; the ACK message includes second information, and the second information represents the packet sequence number (Packet Sequence Number, PSN) of the last data message successfully received by the third device;

[0011] Receive the target data message transmitted by the second device.

[0012] The data transmission method provided in the embodiment of the present application is applied to a fourth device, including:

[0013] In the process of transmitting the target data message from the first device to the third device, when the third device fails, an ACK message is sent to the first device; the ACK message includes fourth information and fifth information, the fourth information is used to indicate that the target data message receiving device is changed from the third device to the fourth device; the fifth information is used to indicate the PSN of the last data message successfully received;

[0014] Receive the target data message transmitted by the first device.

[0015] The data transmission method provided in the embodiment of the present application is applied to a first device, including:

[0016] In the process of transmitting the target data message to the third device, receiving the ACK message sent by the fourth device; the ACK message includes fourth information and fifth information, the fourth information is used to indicate that the target data message receiving device is changed from the third device to the fourth device; the fifth information is used to indicate the PSN of the last data message successfully received;

[0017] The target data message is transmitted to the fourth device based on the ACK message.

[0018] The data transmission device provided in the embodiment of the present application is applied to a second device, including:

[0019] A first processing unit: used for sending a first data message to the third device when the first device fails during the process of transmitting the target data message from the first device to the third device; the first data message includes first information, and the first information is used to indicate that the target data message sending device is changed from the first device to the second device; the first data message is a data message in the target data message;

[0020] The first processing unit is further configured to receive an ACK message sent by the third device;

[0021] The first processing unit is further configured to transmit the target data message to the third device according to the ACK message.

[0022] The data transmission device provided in the embodiment of the present application is applied to a third device, including:

[0023] A second processing unit: used for receiving a first data message sent by a second device during a process of receiving a target data message transmitted by a first device; the first data message includes first information, and the first information is used to indicate that the target data message sending device is changed from the first device to the second device; the first data message is a data message in the target data message;

[0024] The second processing unit is further configured to change the peer device in the QP to the second device according to the first data message; send an ACK message to the second device; the ACK message includes second information, and the second information represents the PSN of the last data message successfully received by the third device;

[0025] The second processing unit is also used to receive the target data message transmitted by the second device.

[0026] The data transmission device provided in the embodiment of the present application is applied to a fourth device, including:

[0027] The third processing unit is configured to send an ACK message to the first device when the third device fails during the process of transmitting the target data message from the first device to the third device; the ACK message includes fourth information and fifth information, the fourth information is used to indicate that the target data message receiving device is changed from the third device to the fourth device; the fifth information is used to indicate the PSN of the last data message successfully received;

[0028] The third processing unit is also used to receive the target data message transmitted by the first device.

[0029] The data transmission device provided in the embodiment of the present application is applied to a first device, including:

[0030] A fourth processing unit: configured to receive an ACK message sent by a fourth device during transmission of a target data message to a third device; the ACK message includes fourth information and fifth information, the fourth information is used to indicate that the target data message receiving device is changed from the third device to the fourth device; the fifth information is used to indicate the PSN of the last data message successfully received;

[0031] The fourth processing unit is also used to transmit the target data message to the fourth device based on the ACK message.

[0032] The electronic device provided in the embodiment of the present application includes: a processor and a memory, the memory is used to store a computer program, and the processor is used to call and run the computer program stored in the memory to execute any data transmission method provided in the embodiment of the present application.

[0033] The chip provided in the embodiment of the present application includes: a processor, which is used to call and run a computer program from a memory, so that a device equipped with the chip executes any data transmission method provided in the embodiment of the present application.

[0034] The storage medium provided in the embodiments of the present application is used to store a computer program, and the computer program enables a computer to execute any data transmission method provided in the embodiments of the present application.

[0035] The computer program product provided in the embodiments of the present application includes a computer program, and when the computer program is executed by a processor, it implements any data transmission method provided in the embodiments of the present application.

[0036] The data transmission method provided in the embodiment of the present application sets up a second device. When a whole device failure occurs during the process of the first device transmitting the target data message to the third device, the second device can continue to transmit the target data message with the assistance of the third device, thereby improving the reliability of data transmission. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0038] Figure 1 The network diagram provided in the embodiment of the present application Figure 1 ;

[0039] Figure 2 The network diagram provided in the embodiment of the present application Figure 2 ;

[0040] Figure 3 Schematic diagram of the implementation process of the data transmission method provided in the embodiment of the present application Figure 1 ;

[0041] Figure 4 A schematic diagram of the structure of the RoCEv2 protocol message provided in an embodiment of the present application;

[0042] Figure 5 A schematic diagram of the structure of a Basic Transport Header (BTH) provided in an embodiment of the present application;

[0043] Figure 6Schematic diagram of the data transmission process provided in the embodiment of the present application Figure 1 ;

[0044] Figure 7 Schematic diagram of the implementation process of the data transmission method provided in the embodiment of the present application Figure 2 ;

[0045] Figure 8 Schematic diagram of the data transmission process provided in the embodiment of the present application Figure 2 ;

[0046] Fig. 9 Schematic diagram of the implementation process of the data transmission method provided in the embodiment of the present application Figure 3 ;

[0047] Fig.10 Schematic diagram of the implementation process of the data transmission method provided in the embodiment of the present application Figure 4 ;

[0048] Fig.11 Schematic diagram of the data transmission process provided in the embodiment of the present application Figure 3 ;

[0049] Fig.12 A schematic diagram of the structure of a data transmission device 1200 provided in an embodiment of the present application;

[0050] Fig.13 A schematic diagram of the structure of a data transmission device 1300 provided in an embodiment of the present application;

[0051] Fig.14 A schematic diagram of the structure of a data transmission device 1400 provided in an embodiment of the present application;

[0052] Fig.15 A schematic diagram of the structure of a data transmission device 1500 provided in an embodiment of the present application;

[0053] Fig.16 A schematic structural diagram of an electronic device provided in an embodiment of the present application;

[0054] Fig.17 This is a schematic structural diagram of a chip according to an embodiment of the present application. DETAILED DESCRIPTION

[0055] The following will describe the technical solutions in the embodiments of the present application in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are 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 are within the scope of protection of this application.

[0056] It should be noted that in the embodiments of the present application, the term "and / or" is only a description of the association relationship of the associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the embodiments of the present application, the character " / " generally indicates that the associated objects before and after are in an "or" relationship.

[0057] In the description of the embodiments of the present application, the term "corresponding" may indicate a direct or indirect correspondence between the two, or an association relationship between the two, or a relationship between indication and being indicated, data transmission and data being transmitted, etc.

[0058] To facilitate understanding of the technical solutions of the embodiments of the present application, the relevant technologies of the embodiments of the present application are described below. The following related technologies can be arbitrarily combined with the technical solutions of the embodiments of the present application as optional solutions, and they all belong to the protection scope of the embodiments of the present application.

[0059] The second-generation RDMA protocol based on converged Ethernet (RDMA over Converged Ethernet version 2, RoCEv2) is a protocol designed specifically for low-latency, high-throughput data transmission in Ethernet environments. The RoCEv2 protocol reduces CPU involvement and reduces communication latency. The RoCEv2 protocol provides strong support for scenarios that require high-speed and efficient data transmission, such as high-performance computing (HPC) environments, data centers, and cloud computing architectures.

[0060] The RoCEv2 protocol is gradually moving out of the data center, and more and more research is focusing on using RDMA technology in wide area networks to achieve reliable high-throughput data transmission. By transforming the RoCEv2 protocol into a wide area network, the effective throughput can be greatly improved and the transmission efficiency can be improved. Taking the wide area network data transmission between data centers as an example, a common networking method is as follows Figure 1 As shown, Figure 1 The network diagram provided in the embodiment of the present application Figure 1 The data express gateway provides wide-area reliable high-throughput services for the data center. Data is transmitted from the data source of data center 1 to the data express gateway in the form of ordinary Ethernet messages. The RoCEv2 protocol runs between the data express gateways of data center 1 and data center 2. The data express gateway of data center 2 then sends the data to the data source of data center 2 in the form of ordinary Ethernet messages.

[0061] In order to provide data express services, the data express gateway needs to have a certain degree of reliability. The reliability proposed in the current RDMA-related specifications and standards is mainly the mutual primary and backup between different ports of the same network card. For example, InfiniBand (IB) and RoCEv2 support fast switching between different ports of a network card to deal with port failures. However, in actual networks, it is very likely that the entire machine or the entire network card will fail, so the reliability between different devices of the data express gateway is also very important.

[0062] There are two transmission modes for data express traffic. The first is that data is copied from the data source to the data express gateway in advance and stored. The data express gateway is responsible for transmitting the data in the local hard disk to the remote end in the form of RDMA. In this mode, the data is stored in the local storage of the data express gateway. Once the whole machine fails, even if it switches to the backup device, the transmission task cannot be completed. The second is that data is sent from the data source to the data gateway device, and the data gateway device converts it into RDMA format in real time and transmits it to the remote end. This application mainly targets the reliability problem of whole machine failure in the second mode.

[0063] refer to Figure 2 , Figure 2 The network diagram provided in the embodiment of the present application Figure 2 ,like Figure 2 As shown, two data express gateways are set in the requester data center 1, one is the main data express gateway G1, and the other is the backup data express gateway G1'. Two data express gateways are set in the responder data center 2, one is the main data express gateway G2, and the other is the backup data express gateway G2'. When the main data express gateway fails, the backup data express gateway will complete the data transmission service.

[0064] Figure 3 Schematic diagram of the implementation process of the data transmission method provided in the embodiment of the present application Figure 1 ,like Figure 3 As shown, the data transmission method provided in the embodiment of the present application is applied to the second device, comprising the following steps:

[0065] Step 301: During the process of transmitting a target data message from a first device to a third device, when the first device fails, a first data message is sent to the third device; the first data message includes first information, and the first information is used to indicate that the target data message sending device is changed from the first device to the second device; the first data message is a data message in the target data message.

[0066] In the embodiment of the present application, the first device, the second device and the third device are RDMA devices. The RDMA devices may be network cards, switches, routers, etc., or other devices, which are not limited in the embodiment of the present application.

[0067] The data transmission method provided in the embodiment of the present application can be applied to the write request write in the reliable connection mode of the RoCEv2 protocol. In actual application, it can also be applied to other scenarios, and the embodiment of the present application does not limit this.

[0068] In an embodiment of the present application, the first device and the second device are proximal devices, and the proximal device is a device that initiates an RDMA operation, wherein the first device is a proximal master device and the second device is a proximal backup device. When the first device does not fail, the first device executes the data transmission service; when the first device sends a fault, the second device executes the data transmission service.

[0069] In the embodiment of the present application, the third device is a remote device, the remote device is a device that receives the RDMA operation, and the third device is a remote master device.

[0070] Based on this, in an optional implementation of the present application, the first device interacts with the third device via the RoCEv2 protocol; the second device interacts with the third device via the RoCEv2 protocol; the first device is a proximal master device, the second device is a proximal backup device, and the third device is a remote master device.

[0071] In an embodiment of the present application, heartbeat detection can be performed between the first device and the second device, and when N consecutive heartbeats are not received, it is determined that the other party is faulty; or an independent management plane device can uniformly manage the first device and the second device. When the management plane finds that the first device has failed, the second device is notified to replace the first device to transmit data packets. In actual application, other methods can also be used. The embodiment of the present application does not limit the status perception method between the first device and the second device.

[0072] In an embodiment of the present application, the target data message includes one or more data messages, and the first data message is one of the target data messages. Preferably, the first data message may be a data message that should be sent in the sending window of the second device. This is because the sending windows of the first device and the second device are synchronized, and the data message that should be sent in the sending window of the second device is the same as the data message that should be sent before the failure of the first device. The data message may also be a data message that the receiving window of the third device expects to receive, thereby improving the efficiency of data transmission.

[0073] Based on this, in an optional implementation manner of the present application, the first data message is a data message that should be sent in the current sending window of the second device.

[0074] In an embodiment of the present application, the first information is represented by a reserved field 7 in the RoCEv2 protocol message.

[0075] refer to Figure 4 , Figure 4 A schematic diagram of the structure of the RoCEv2 protocol message provided in the embodiment of the present application, such as Figure 4 As shown, the RoCEv2 protocol message includes: Ethernet layer 2 header Eth L2 Header; data type field EtherType; IP header (Internet Protocol Header, IP Header); protocol field Proto# after the IP header; UDP header (User Datagram Protocol Header, UDP); protocol field Proto# after the UDP header; InfiniBand Base Transport Header + L4 Header (IB BTH + (L4Hdr); InfiniBand Payload (IB Payload); InfiniBand Cyclic Redundancy Check (ICRC); Frame Check Sequence (FCS).

[0076] refer to Figure 5 , Figure 5 A schematic diagram of the structure of the BTH message header provided in the embodiment of the present application is shown in FIG. Figure 5 As shown in the figure, the BTH message header includes: an operation code OpCode, which is used to indicate the specific operation to be performed on the data packet, such as sending, receiving, atomic operation, etc.; a send error flag (Send Error, SE), if this bit is set, it indicates that an error occurred during the sending of the previous data packet; More (More, M), which is used to mark whether there are more data packets to be sent with the current data packet. If the M bit is set, there are more data packets after the current data packet; Pad, which is used to fill in to meet specific byte alignment requirements; Transport Version (Transport Version, TVer), which is used to indicate the transport protocol version used; Partition Key, which is used to identify different traffic flows or resource groups in the network; F / Reserved Field 1 (Flag / Reserved1, F / Res1 a ), used to identify some flag bits and as a reserved field for future expansion; B / Reserved Field 1 (Bit / Reserved1, B / Res1 a ), used to identify some flag bits and as a reserved field for future expansion; reserved field 6Reserved6 a, for future expansion; Destination QP, used to indicate the destination QP number, identifying the receive queue pair to which the data packet should be sent; Confirmation A is used to characterize whether the data packet is a confirmation message. If this bit is set, it indicates that the data packet is a confirmation message; Reserved field 7Reserved7 is for future expansion; Packet Sequence Number PSN-Packet Sequence Number is used to track the order of data packets to ensure that they are received in order.

[0077] In the embodiment of the present application, two bits in Reserved7 are used to characterize the first information. For example, if the two bits are 11, it indicates that the master-slave switch has occurred, and the target data message sending device is changed from the first device to the second device; if the two bits are 00, it is the default situation and normal arithmetic. For example, the first bit of the two bits indicates whether the master-slave switch has occurred, and the second bit indicates whether the data transmission device is the master device or the backup device, wherein, when the first bit is 1, it indicates that the master-slave switch has occurred, and when the first bit is 0, it indicates that the master-slave switch has not occurred; when the second bit is 0, it indicates that the data transmission device is the master device, and when the second bit is 1, it indicates that the data transmission device is the backup device.

[0078] Step 302: Receive an ACK message sent by the third device.

[0079] In an optional implementation manner of the present application, the ACK message includes second information, where the second information represents a message sequence number PSN of the last data message successfully received by the third device.

[0080] The RoCEv2 protocol specifies that the responder can use a single confirmation datagram to confirm multiple completed request datagrams, that is, those requests whose PSN is earlier than the PSN contained in the response datagram BTH, which is called confirmation merging. For RDMA WRITE operations, this means positive confirmation of all PSNs earlier than the PSN in the response datagram BTH, that is, in the responder, all request datagrams whose PSN is earlier than the PSN in the response datagram BTH have been received.

[0081] In an optional implementation manner of the present application, the ACK message further includes third information; the third information indicates that the opposite end device in the queue pair QP of the third device is changed to the second device.

[0082] The second device and the third device need to continue to complete the transmission of the target data message. If the third device wants to interact with the second device, it is necessary to change the counterpart device in the QP of the third device to the second device and inform the second device of the successful change to ensure that the information of the second device and the third device are aligned.

[0083] In an embodiment of the present application, the third information can be represented by two bit pairs in Reserved7. For example, if the two bits are 01, it indicates that the third device has received the master-slave switching notification of the proximal device, and the third device has changed the opposite device in QP to the second device.

[0084] Based on this, in an optional implementation manner of the present application, the first information and / or the third information is represented by a reserved field 7 in a RoCEv2 protocol message.

[0085] In the embodiment of the present application, preferably, the first two bits of reserved7 can be used to represent the first information and / or the third information.

[0086] In the connection-oriented mode of RoCEv2, the Queue Pair Context (QPC) used by the RDMA device to maintain the connection information will store the ID and QPN of the peer device in the connection, as well as the relevant parameters of the connection negotiation. This information represents a connection between this end and the peer end. In the embodiment of the present application, in the master-slave mode, the backup connection information of the peer device can be added to the QPC of the RDMA device, wherein the ID and QPN of the backup device of the peer device need to be added, and other parameters can reuse the master device connection, and the device information of the peer backup device is configured in the RDMA device in advance. When the peer master device fails, the device information of the peer backup device can be directly used locally to improve data transmission efficiency. In the embodiment of the present application, the master-slave mode refers to the proximal device including two devices, one of which is the proximal master device and the other is the proximal backup device, and the remote device includes two devices, one of which is the remote master device and the other is the remote backup device.

[0087] Exemplarily, in an embodiment of the present application, the first device is a proximal master device, the second device is a proximal backup device, and the third device is a remote device; the third device adds the ID and QPN of the second device in the QPC, which may be specifically: DGID_B, representing the address information of the peer backup device, which is the interface IP address of the peer backup device; QPN_B, representing the QP number of the peer backup device, which is the QPN in the peer backup device.

[0088] Based on this, in an optional implementation manner of the present application, the queue pair context QPC of the third device includes device information of the second device; the device information includes device address information and a QP number.

[0089] Step 303: Transmit the target data message to the third device according to the ACK message.

[0090] In an embodiment of the present application, the ACK message carries the PSN of the last data message successfully received by the third device. For example, if the PSN is m, indicating that the third device has successfully received all data messages with a PSN less than or equal to m, the second device continues to transmit data messages with a PSN of m+1 to the third device.

[0091] Based on this, in an optional implementation manner of the present application, transmitting the target data message to the third device according to the ACK message includes:

[0092] According to the ACK message, a second data message is sent to the third device; the second data message is a next data message of the last data message successfully received by the third device.

[0093] In an embodiment of the present application, in order to maintain the master-slave relationship of the RDMA device, a backup mapping Back-up Mapping table can be added to the master device and the backup device, and the Back-up Mapping table records the address information and QPN of the two devices that are master and backup devices to each other. Exemplarily, the Back-up Mapping table is created by the management plane, and the master-slave relationship of the two devices can be specified during the initial configuration, or it can be automatically negotiated by the two devices. Exemplarily, the proximal device includes two devices, and the master-slave relationship of the two devices can be specified by the management plane or negotiated by the two devices. The QP master-slave relationship can also be specified in advance by the management plane, or automatically allocated during operation.

[0094] In the embodiment of the present application, in order to ensure the continuity of data flow between the master and backup devices, the master and backup devices need to associate the application of connection parameters and synchronize them in real time. Specifically, RoCEv2 uses partitions to isolate ports, QPs, etc. The partition key P_Key is configured by the management plane. Each partition corresponds to a P_Key. The QPs, ports, etc. of the two devices in the master-backup relationship need to use the same partition and have the same P_Key. Exemplarily, the first device and the second device have the same partition and the same P_Key.

[0095] In the embodiment of the present application, L_Key and R_Key are memory keys obtained when the application applies for memory and used to access the memory, corresponding to the physical address of the memory. The application uses L_Key to access the memory locally, and sends R_Key to the peer device to authorize the peer device to read and write the memory. After the device supports the master-slave capability, the master device applies for the memory key and should synchronize it to the standby device. The standby device specifies the memory key to apply for memory locally to ensure that the memory keys of the master and standby devices are the same.

[0096] In the embodiment of the present application, the management plane software issues transmission tasks to the primary and backup gateways at the same time, including memory application, WQE issuance on the QP of the primary and backup devices, etc. The management plane software may be centralized control software or a distributed program running on the RDMA device.

[0097] In an embodiment of the present application, during the process of the first device transmitting the target data message, it is also necessary to dynamically synchronize data transmission-related information to the second device, such as the completion queue event CQE, ACK message, and the master-slave switching information of the remote device, so that the second device can complete the information synchronization with the first device and improve the transmission efficiency.

[0098] Based on this, in an optional implementation manner of the present application, the transmission tasks of the first device and the second device are the same;

[0099] The partitions of the first device and the second device are the same;

[0100] The data transmitted in the first device and the second device has a standby mapping table; the standby mapping table includes device information of the first device and the second device; the device information includes address information and a QP number; the method further includes:

[0101] Receive first synchronization information sent by the first device, and update data transmission information of the second device based on the first synchronization information; wherein the first synchronization information includes one or more of the following information: completion queue event CQE, and master-slave switching information of the remote device.

[0102] In the embodiment of the present application, the synchronous message interaction method between the master and standby devices can be based on TCP / IP sockets or dedicated RDMA messages, or other customized message forms, which is not limited by the embodiment of the present application.

[0103] refer to Figure 6 , Figure 6 The data transmission process provided in the embodiment of the present application is shown in FIG. Figure 1 ,like Figure 6As shown, this embodiment is a normal data transmission process, S1 is the request end switch, S2 is the response end switch, G1 is the near-end master device, G1' is the near-end backup device, G2 is the remote master device, and G2' is the remote backup device. Under normal circumstances, the data source is copied by the internal switch and sent to G1 and G1' at the same time. G1 normally forwards data, G1' only receives data without forwarding, and G2 normally feeds back ACK after receiving the data, and synchronizes ACK to G2'. G2' updates the receiving window and other information according to the ACK content. After receiving ACK, G1 synchronizes to G1', and G1' updates the receiving window and clears the memory data according to the ACK content. When G1 completes a transmission task, it will synchronously send the completion queue event CQE to G1' to notify the corresponding WQE that the transmission task has been completed, and G1 updates the local task information.

[0104] refer to Figure 7 , Figure 7 Schematic diagram of the implementation process of the data transmission method provided in the embodiment of the present application Figure 2 ,like Figure 7 As shown, the data transmission method provided in the embodiment of the present application is applied to a third device and includes the following steps:

[0105] Step 701: During the process of receiving a target data packet transmitted by a first device, a first data packet sent by a second device is received; the first data packet includes first information, and the first information is used to indicate that the target data packet sending device is changed from the first device to the second device; the first data packet is a data packet in the target data packet.

[0106] In the embodiment of the present application, the first device, the second device and the third device are RDMA devices. The RDMA devices may be network cards, switches, routers, etc., or other devices, which are not limited in the embodiment of the present application.

[0107] The data transmission method provided in the embodiment of the present application can be applied to the write request (write) in the reliable connection mode of the RoCEv2 protocol. In actual application, it can also be applied to other scenarios, and the embodiment of the present application does not limit this.

[0108] In an embodiment of the present application, the first device and the second device are proximal devices, and the proximal device is a device that initiates an RDMA operation, wherein the first device is a proximal master device and the second device is a proximal backup device. When the first device does not fail, the first device executes the data transmission service; when the first device sends a fault, the second device executes the data transmission service.

[0109] In the embodiment of the present application, the third device is a remote device, the remote device is a device that receives the RDMA operation, and the third device is a remote master device.

[0110] Based on this, in an optional implementation of the present application, the first device interacts with the third device via the RoCEv2 protocol; the second device interacts with the third device via the RoCEv2 protocol; the first device is a proximal master device, the second device is a proximal backup device, and the third device is a remote master device.

[0111] In an embodiment of the present application, two bits in the reserved field 7 of the RoCEv2 protocol message are used to represent the first information. For example, if the two bits are 11, it represents that a master-slave switching occurs, and the target data message sending device is changed from the first device to the second device; if the two bits are 00, it is the default situation and normal arithmetic is performed.

[0112] Step 702: According to the first data message, change the opposite device in the QP to the second device; send an ACK message to the second device; the ACK message includes second information, and the second information represents the PSN of the last data message successfully received by the third device.

[0113] After receiving the first data message, the third device changes the opposite end device in the QP to the second device according to the first information, so as to perform data transmission with the second device.

[0114] In the connection-oriented mode of RoCEv2, the queue context QPC used by the RDMA device to maintain the connection information will store the ID and QPN of the other device in the connection, as well as the relevant parameters of the connection negotiation. This information represents a connection between this end and the other end. In the embodiment of the present application, in the master-slave mode, the backup connection information of the other device can be added to the QPC of the RDMA device, wherein the ID and QPN of the backup device of the other device need to be added, and other parameters can reuse the main connection, and the device information of the backup device of the other end is configured in the RDMA device in advance. When the master device of the other end fails, the device information of the backup device of the other end can be directly used locally to improve data transmission efficiency. In the embodiment of the present application, the master-slave mode refers to the proximal device including two devices, one of which is the proximal master device and the other is the proximal backup device, and the remote device includes two devices, one of which is the remote master device and the other is the remote backup device.

[0115] Exemplarily, in an embodiment of the present application, the first device is a proximal master device, the second device is a proximal backup device, and the third device is a remote device; the third device adds the ID and QPN of the second device in the QPC, which may be specifically: DGID_B, representing the address information of the peer backup device, which is the interface IP address of the peer backup device; QPN_B, representing the QP number of the peer backup device, which is the QPN in the peer backup device.

[0116] Based on this, in an optional implementation manner of the present application, the QPC of the third device contains device information of the second device; the device information includes address information and a QP number.

[0117] In an optional implementation manner of the present application, the ACK message further carries third information; the third information indicates that the opposite end device in the QP of the third device is changed to the second device.

[0118] In an embodiment of the present application, the third information can be represented by two bit pairs in Reserved7. For example, if the two bits are 01, it indicates that the third device has received the master-slave switching notification of the proximal device, and the third device has changed the opposite device in QP to the second device.

[0119] Based on this, in an optional implementation manner of the present application, the first information and / or the third information is represented by a reserved field 7 in a RoCEv2 protocol message.

[0120] In the embodiment of the present application, preferably, the first two bits of reserved7 can be used to represent the first information and / or the third information.

[0121] In the embodiment of the present application, after receiving the first data message, the third device compares the PSN of the first data message with the receiving window. If the first data message is a data message that the receiving window of the third device expects to receive, the third device normally replies with an acknowledgment message of the first data message. If the first data message is not a data message that the receiving window of the third device expects to receive, the third device resends the last ACK message that has been sent.

[0122] Based on this, in an optional implementation manner of the present application, sending an ACK message to the second device includes:

[0123] If the PSN of the first data message is the PSN that the third device expects to receive, sending an ACK message of the first data message to the second device;

[0124] If the PSN of the first data message is not the PSN that the third device expects to receive, resend the last ACK message that has been sent to the second device.

[0125] Step 703: Receive the target data message transmitted by the second device.

[0126] The third device and the second device continue to complete the transmission of the target data message.

[0127] In an embodiment of the present application, the remote device also includes a fourth device, and the fourth device is a remote backup device. The third device and the fourth device are in a master-backup relationship with each other. In an embodiment of the present application, in order to maintain the master-backup relationship of the RDMA device, a Back-up Mapping table can be added to the master device and the backup device, and the address information and QPN of the two devices that are master-backup devices are recorded in the Back-up Mapping table. Exemplarily, the Back-up Mapping table is created by the management plane, and the master-backup relationship of the two devices can be specified during the initial configuration, or it can be automatically negotiated by the two devices. Exemplarily, the proximal device includes two devices, and the master-backup relationship of the two devices can be specified by the management plane, or it can be negotiated by the two devices. The QP master-backup relationship can also be specified in advance by the management plane, or automatically allocated during operation.

[0128] In an embodiment of the present application, in order to ensure the continuity of data flow between the master and backup devices, the master and backup devices need to associate the application for connection parameters and synchronize them in real time. Specifically, partitions are used in RoCEv2 to isolate ports, QPs, etc. The partition key P_Key is configured by the management plane, and each partition corresponds to a P_Key. The QPs, ports, etc. of two devices in a master-backup relationship need to use the same partition and have the same P_Key.

[0129] In the embodiment of the present application, L_Key and R_Key are memory keys obtained when the application applies for memory and used to access the memory, corresponding to the physical address of the memory. The application uses L_Key to access the memory locally, and sends R_Key to the peer device to authorize the peer device to read and write the memory. After the device supports the master-slave capability, the master device applies for the memory key and should synchronize it to the standby device. The standby device specifies the memory key to apply for memory locally to ensure that the memory keys of the master and standby devices are the same.

[0130] In the embodiment of the present application, the management plane software issues transmission tasks to the primary and backup gateways at the same time, including memory application, WQE issuance on the QP of the primary and backup devices, etc. The management plane software may be centralized control software or a distributed program running on the RDMA device.

[0131] In an embodiment of the present application, during the process of the third device transmitting the target data packet, it is also necessary to dynamically synchronize data transmission related information to the fourth device, such as the completion queue event CQE, ACK packet, and the master-slave switching information of the remote device, so that the fourth device and the third device can complete information synchronization and improve transmission efficiency.

[0132] Based on this, in an optional implementation of the present application, the method also includes: sending second synchronization information to a fourth device; the fourth device is a remote backup device; the second synchronization information includes one or more of the following information: CQE, ACK message and master-slave switching information of the proximal device.

[0133] In the embodiment of the present application, the synchronous message interaction method between the master and standby devices can be based on TCP / IP sockets or dedicated RDMA messages, or other customized message forms, which is not limited by the embodiment of the present application.

[0134] refer to Figure 8 , Figure 8 The data transmission process provided in the embodiment of the present application is shown in FIG. Figure 2 ,like Figure 8 As shown, this embodiment is a data transmission process when the proximal master device fails, S1 is a request end switch, S2 is a response end switch, G1 is a proximal master device, G1' is a proximal standby device, G2 is a remote master device, G2' is a remote standby device, G1 sends a target data message to G2, when G1 fails, G1' is promoted to a master device, G1' continues to send a first data message to G2 according to the local sending window state, assuming that the PSN of the first data message is n, and carries a master-slave switching flag; G2 receives the first data message, determines that a master-slave switching occurs in the opposite device, updates the local QP, updates the DGID to G1', updates DGID_B to empty, updates QPN to QPN_B, QPN_B is updated to empty, and notifies G2' that a proximal device has a master-slave conversion. According to the local receiving window situation, G2 compares the PSN of the received first data message with the local receiving window to check whether the PSN of the first data message is the PSN number of the data message expected to be received. If so, it replies with an ACK message normally; if not, it resends the last ACK message that has been sent. Assuming that the PSN of the last ACK message that has been sent is m and carries the third information, after receiving the ACK, G1' starts from the data message with PSN=m+1 and sends the target data message to G2.

[0135] refer to Fig. 9 , Fig. 9 Schematic diagram of the implementation process of the data transmission method provided in the embodiment of the present application Figure 3 ,like Fig. 9 As shown, the data transmission method provided in the embodiment of the present application is applied to the fourth device, comprising the following steps:

[0136] Step 901: When a first device fails to transmit a target data message to a third device, the third device sends an ACK message to the first device; the ACK message includes fourth information and fifth information, the fourth information is used to indicate that the target data message receiving device is changed from the third device to the fourth device; the fifth information is used to indicate the PSN of the last data message successfully received.

[0137] In the embodiment of the present application, the first device, the third device and the fourth device are RDMA devices. The RDMA devices may be network cards, switches, routers, etc., or other devices, which are not limited in the embodiment of the present application.

[0138] The data transmission method provided in the embodiment of the present application can be applied to the write request write in the reliable connection mode of the RoCEv2 protocol. In actual application, it can also be applied to other scenarios, and the embodiment of the present application does not limit this.

[0139] In the embodiment of the present application, the first device is a proximal device, and the proximal device is a device that initiates an RDMA operation, wherein the first device is a proximal master device.

[0140] In an embodiment of the present application, the third device and the fourth device are remote devices, the remote device is a device that receives RDMA operations, the third device is a remote master device, and the fourth device is a remote backup device. When the third device does not fail, the third device executes the data transmission service; when the third device sends a failure, the fourth device executes the data transmission service.

[0141] Based on this, in an optional implementation of the present application, the first device interacts with the third device via the RoCEv2 protocol; the second device interacts with the third device via the RoCEv2 protocol; the first device is a proximal master device, the second device is a proximal backup device, and the third device is a remote master device.

[0142] In an embodiment of the present application, heartbeat detection can be performed between the third device and the fourth device, and when N consecutive heartbeats are not received, it is determined that the other party is faulty; or the third device and the fourth device are uniformly managed by an independent management plane device. When the management plane finds that the third device has failed, the fourth device is notified to replace the third device to transmit data packets. In actual application, other methods can also be used. The embodiment of the present application does not limit the status perception method between the third device and the fourth device.

[0143] In the embodiment of the present application, two bits in Reserved7 are used to represent the fourth information. For example, if the two bits are 01, it represents that a master-slave switching occurs, and the target data message receiving device is changed from the third device to the fourth device.

[0144] In the embodiment of the present application, preferably, the first two bits of reserved7 can be used to represent the fourth information.

[0145] When the third device fails, the fourth device repeatedly sends the last ACK message to the first device according to the receiving window situation, that is, the ACK message last sent by the remote device.

[0146] In an embodiment of the present application, in order to maintain the master-slave relationship of the RDMA device, a Back-up Mapping table may be added to the master device and the backup device, and the address information and QPN of the two devices that are master and backup devices to each other are recorded in the Back-up Mapping table. Exemplarily, the Back-up Mapping table is created by the management plane, and the master-slave relationship of the two devices may be specified during the initial configuration, or may be automatically negotiated by the two devices. Exemplarily, the proximal device includes two devices, and the master-slave relationship of the two devices may be specified by the management plane, or may be negotiated by the two devices. The QP master-slave relationship may also be specified in advance by the management plane, or may be automatically allocated during operation.

[0147] In the embodiment of the present application, in order to ensure the continuity of data flow between the master and backup devices, the master and backup devices need to associate the application of connection parameters and synchronize them in real time. Specifically, RoCEv2 uses partitions to isolate ports, QPs, etc. The partition key P_Key is configured by the management plane. Each partition corresponds to a P_Key. The QPs, ports, etc. of the two devices in the master-backup relationship need to use the same partition and have the same P_Key. Exemplarily, the third device and the fourth device have the same partition and the same P_Key.

[0148] In the embodiment of the present application, L_Key and R_Key are memory keys obtained when the application applies for memory and used to access the memory, corresponding to the physical address of the memory. The application uses L_Key to access the memory locally, and sends R_Key to the peer device to authorize the peer device to read and write the memory. After the device supports the master-slave capability, the master device applies for the memory key and should synchronize it to the standby device. The standby device specifies the memory key to apply for memory locally to ensure that the memory keys of the master and standby devices are the same.

[0149] In the embodiment of the present application, the management plane software issues transmission tasks to the primary and backup gateways at the same time, including memory application, WQE issuance on the QP of the primary and backup devices, etc. The management plane software may be centralized control software or a distributed program running on the RDMA device.

[0150] In an embodiment of the present application, during the process of the third device transmitting the target data message, it is also necessary to dynamically synchronize data transmission related information to the fourth device, such as the completion queue event CQE, ACK message, and the master-slave switching information of the remote device, so that the second device and the first device can complete the information synchronization and improve the transmission efficiency.

[0151] Based on this, in an optional implementation manner of the present application, the method further includes:

[0152] Receive second synchronization information sent by a third device, and update data transmission information according to the second synchronization information; the second synchronization information includes one or more of the following information: CQE, ACK message, and proximal device master-slave switching information.

[0153] In the embodiment of the present application, the synchronous message interaction method between the master and standby devices can be based on TCP / IP sockets or dedicated RDMA messages, or other customized message forms, which is not limited by the embodiment of the present application.

[0154] Step 902: Receive the target data message transmitted by the first device.

[0155] The first device and the fourth device continue to complete the transmission of the target data message.

[0156] refer to Fig.10 , Fig.10 Schematic diagram of the implementation process of the data transmission method provided in the embodiment of the present application Figure 4 ,like Fig.10 As shown, the data transmission method provided in the embodiment of the present application is applied to a first device and includes the following steps:

[0157] Step 1001: During transmission of a target data message to a third device, an ACK message is received from a fourth device; the ACK message includes fourth information and fifth information, the fourth information is used to indicate that the target data message receiving device is changed from the third device to the fourth device; the fifth information is used to indicate the PSN of the last data message successfully received.

[0158] In the embodiment of the present application, the first device, the third device and the fourth device are RDMA devices. The RDMA devices may be network cards, switches, routers, etc., or other devices, which are not limited in the embodiment of the present application.

[0159] The data transmission method provided in the embodiment of the present application can be applied to the write request (write) in the reliable connection mode of the RoCEv2 protocol. In actual application, it can also be applied to other scenarios, and the embodiment of the present application does not limit this.

[0160] In the embodiment of the present application, the first device is a proximal device, and the proximal device is a device that initiates an RDMA operation, wherein the first device is a proximal master device.

[0161] In an embodiment of the present application, the third device and the fourth device are remote devices, the remote device is a device that receives RDMA operations, the third device is a remote master device, and the fourth device is a remote backup device. When the third device does not fail, the third device executes the data transmission service; when the third device sends a failure, the fourth device executes the data transmission service.

[0162] In the embodiment of the present application, two bits in Reserved7 are used to represent the fourth information. For example, if the two bits are 01, it represents that a master-slave switching occurs, and the target data message receiving device is changed from the third device to the fourth device.

[0163] In the embodiment of the present application, preferably, the first two bits of reserved7 can be used to represent the fourth information.

[0164] In an embodiment of the present application, in order to maintain the master-slave relationship of the RDMA device, a Back-up Mapping table may be added to the master device and the backup device, and the address information and QPN of the two devices that are master and backup devices to each other are recorded in the Back-up Mapping table. Exemplarily, the Back-up Mapping table is created by the management plane, and the master-slave relationship of the two devices may be specified during the initial configuration, or may be automatically negotiated by the two devices. Exemplarily, the proximal device includes two devices, and the master-slave relationship of the two devices may be specified by the management plane, or may be negotiated by the two devices. The QP master-slave relationship may also be specified in advance by the management plane, or may be automatically allocated during operation.

[0165] In the embodiment of the present application, in order to ensure the continuity of data flow between the master and standby devices, the master and standby devices need to associate the application of connection parameters and synchronize them in real time. Specifically, RoCEv2 uses partitions Partition to isolate ports, QPs, etc. The partition key P_Key is configured by the management plane. Each partition corresponds to a P_Key. The QPs, ports, etc. of the two devices in the master-standby relationship need to use the same partition and have the same P_Key. Exemplarily, the proximal device also includes a second device, which is a proximal standby device. The first device and the second device have the same partition and the same P_Key.

[0166] In the embodiment of the present application, L_Key and R_Key are memory keys obtained when the application applies for memory and used to access the memory, corresponding to the physical address of the memory. The application uses L_Key to access the memory locally, and sends R_Key to the peer device to authorize the peer device to read and write the memory. After the device supports the master-slave capability, the master device applies for the memory key and should synchronize it to the standby device. The standby device specifies the memory key to apply for memory locally to ensure that the memory keys of the master and standby devices are the same.

[0167] In the embodiment of the present application, the management plane software issues transmission tasks to the primary and backup gateways at the same time, including memory application, WQE issuance on the QP of the primary and backup devices, etc. The management plane software may be centralized control software or a distributed program running on the RDMA device.

[0168] In an embodiment of the present application, during the process of the first device transmitting the target data message, it is also necessary to dynamically synchronize data transmission-related information to the second device, such as the completion queue event CQE, ACK message, and the master-slave switching information of the remote device, so that the second device can complete the information synchronization with the first device and improve the transmission efficiency.

[0169] Based on this, in an optional implementation manner of the present application, the first device interacts with the third device through the RoCEv2 protocol; the first device interacts with the fourth device through the RoCEv2 protocol; the first device is a proximal master device, the third device is a remote master device, and the fourth device is a remote standby device; the method further includes:

[0170] Sending first synchronization information to a second device; the second device is a near-end standby device; wherein the first synchronization information includes one or more of the following information: CQE, ACK message, and master-slave switching information of a remote device.

[0171] In the embodiment of the present application, the synchronous message interaction method between the master and standby devices can be based on TCP / IP sockets or dedicated RDMA messages, or other customized message forms, which is not limited by the embodiment of the present application.

[0172] Step 1002: Based on the ACK message, transmit the target data message to the fourth device.

[0173] Exemplarily, if the PSN of the ACK message is m, the first device continues to transmit the target data message to the fourth device starting from the data message with a PSN of m+1.

[0174] refer to Fig.11 , Fig.11 The data transmission process provided in the embodiment of the present application is shown in FIG. Figure 3 ,like Fig.11As shown, this embodiment is a data transmission process when the remote master device fails, S1 is a requesting end switch, S2 is a responding end switch, G1 is a near-end master device, G1' is a near-end standby device, G2 is a remote master device, G2' is a remote standby device, G1 sends a target data message to G2, when G2 fails, G2' is promoted to a master device, G2' repeats the last ACK message to the requester according to the current receiving window situation, the PSN of the last ACK message is n, the PSN of the ACK message repeatedly sent by G2' is n, and carries a master-standby switching flag; after receiving the ACK message sent by G2', G1 determines that the master-standby switching occurs in the opposite device, updates the local QP, updates the DGID to G2', updates DGID_B to empty, updates QPN to the QPN of G2', QPN_B is updated to empty, and notifies G1' that the remote device has a master-standby conversion. After receiving the ACK, G1 sends the target data message to G2' starting from the PSN=n+1 data message.

[0175] The present application also provides a data transmission device 1200, referring to Fig.12 The data transmission device 1200 in this embodiment is applied to a second device and includes:

[0176] A first processing unit: used for sending a first data message to the third device when the first device fails during the process of transmitting the target data message from the first device to the third device; the first data message includes first information, and the first information is used to indicate that the target data message sending device is changed from the first device to the second device; the first data message is a data message in the target data message;

[0177] The first processing unit is also used to receive an ACK message sent by the third device;

[0178] The first processing unit is also used to transmit the target data message to the third device according to the ACK message.

[0179] In an embodiment of the present application, the first device interacts with the third device via the RoCEv2 protocol; the second device interacts with the third device via the RoCEv2 protocol; the first device is a proximal master device, the second device is a proximal backup device, and the third device is a remote master device.

[0180] In the embodiment of the present application, the first data message is a data message that should be sent in the current sending window of the second device.

[0181] In an embodiment of the present application, the ACK message includes second information, wherein the second information represents the message sequence number PSN of the last data message successfully received by the third device; the first processing unit is used to send a second data message to the third device according to the ACK message; the second data message is the next data message of the last data message successfully received by the third device.

[0182] In the embodiment of the present application, the ACK message further includes third information; the third information indicates that the opposite end device in the queue pair QP of the third device is changed to the second device.

[0183] In an embodiment of the present application, the first information and / or the third information is represented by a reserved field 7 in the RoCEv2 protocol message.

[0184] In an embodiment of the present application, the data transmission in the first device and the second device has a Back-up Mapping table; the Back-up Mapping table includes device information of the first device and the second device; the device information includes address information and QP number; the first processing unit: is used to receive the first synchronization information sent by the first device, and update the data transmission information of the second device based on the first synchronization information; wherein the first synchronization information includes one or more of the following information: completion queue event CQE, ACK message and master-slave switching information of the remote device.

[0185] In the embodiment of the present application, the queue pair context QPC of the third device includes device information of the second device; the device information includes device address information and a QP number.

[0186] Those skilled in the art should understand that Fig.12 The implementation functions of each unit in the data transmission device 1200 shown can be understood by referring to the relevant description of the aforementioned method. Fig.12 The functions of each unit in the data transmission device 1200 shown may be implemented by a program running on a processor, or may be implemented by a specific logic circuit.

[0187] The present application also provides a data transmission device 1300, referring to Fig.13 The data transmission device 1300 in this embodiment is applied to a third device and includes:

[0188] A second processing unit: used for receiving a first data message sent by a second device during a process of receiving a target data message transmitted by a first device; the first data message includes first information, and the first information is used to indicate that the target data message sending device is changed from the first device to the second device; the first data message is a data message in the target data message;

[0189] The second processing unit is further configured to change the peer device in the QP to the second device according to the first data message; send an ACK message to the second device; the ACK message includes second information, and the second information represents the PSN of the last data message successfully received by the third device;

[0190] The second processing unit is also used to receive the target data message transmitted by the second device.

[0191] In an embodiment of the present application, the first device interacts with the third device via the RoCEv2 protocol; the second device interacts with the third device via the RoCEv2 protocol; the first device is a proximal master device, the second device is a proximal backup device, and the third device is a remote master device.

[0192] In an embodiment of the present application, the second processing unit is used to send an ACK message of the first data message to the second device if the PSN of the first data message is the PSN that the third device expects to receive; if the PSN of the first data message is not the PSN that the third device expects to receive, resend the last ACK message that has been sent to the second device.

[0193] In the embodiment of the present application, the ACK message further includes third information; the third information indicates that the opposite end device in the QP of the third device is changed to the second device.

[0194] In an embodiment of the present application, the first information and / or the third information is represented by a reserve field in a RoCEv2 protocol message.

[0195] In the embodiment of the present application, the QPC of the third device contains the device information of the second device; the device information includes address information and a QP number.

[0196] In an embodiment of the present application, the second processing unit is used to send second synchronization information to a fourth device; the fourth device is a remote standby device; the second synchronization information includes one or more of the following information: CQE, ACK message, and master-slave switching information of the proximal device.

[0197] Those skilled in the art should understand that Fig.13 The implementation functions of each unit in the data transmission device 1300 shown can be understood by referring to the relevant description of the aforementioned method. Fig.13 The functions of each unit in the data transmission device 1300 shown may be implemented by a program running on a processor, or may be implemented by a specific logic circuit.

[0198] The present application also provides a data transmission device 1400, referring to Fig.14 The data transmission device 1400 in this embodiment is applied to a fourth device and includes:

[0199] The third processing unit is configured to send an ACK message to the first device when the third device fails during the process of transmitting the target data message from the first device to the third device; the ACK message includes fourth information and fifth information, the fourth information is used to indicate that the target data message receiving device is changed from the third device to the fourth device; the fifth information is used to indicate the PSN of the last data message successfully received;

[0200] The third processing unit is also used to receive the target data message transmitted by the first device.

[0201] In an embodiment of the present application, the first device interacts with the third device via the RoCEv2 protocol; the first device interacts with the fourth device via the RoCEv2 protocol; the first device is a proximal master device, the third device is a remote master device, and the fourth device is a remote standby device; the third processing unit is used to receive second synchronization information sent by the third device, and update data transmission information according to the second synchronization information; the second synchronization information includes one or more of the following information: CQE, ACK message, and proximal device master-slave switching information.

[0202] Those skilled in the art should understand that Fig.14 The implementation functions of each unit in the data transmission device 1400 shown can be understood by referring to the relevant description of the aforementioned method. Fig.14 The functions of each unit in the data transmission device 1400 shown may be implemented by a program running on a processor, or may be implemented by a specific logic circuit.

[0203] The present application also provides a data transmission device 1500, referring to Fig.15 The data transmission device 1500 in this embodiment is applied to a first device and includes:

[0204] A fourth processing unit: configured to receive an ACK message sent by a fourth device during transmission of a target data message to a third device; the ACK message includes fourth information and fifth information, the fourth information is used to indicate that the target data message receiving device is changed from the third device to the fourth device; the fifth information is used to indicate the PSN of the last data message successfully received;

[0205] The fourth processing unit is also used to transmit the target data message to the fourth device based on the ACK message.

[0206] In an embodiment of the present application, the first device interacts with the third device via the RoCEv2 protocol; the first device interacts with the fourth device via the RoCEv2 protocol; the first device is a proximal master device, the third device is a remote master device, and the fourth device is a remote backup device; the fourth processing unit is used to send first synchronization information to the second device; the second device is a proximal backup device; wherein the first synchronization information includes one or more of the following information: CQE, ACK message, and master-slave switching information of the remote device.

[0207] Those skilled in the art should understand that Fig.15 The implementation functions of each unit in the data transmission device 1500 shown can be understood by referring to the relevant description of the aforementioned method. Fig.15 The functions of each unit in the data transmission device 1500 shown may be implemented by a program running on a processor, or may be implemented by a specific logic circuit.

[0208] Fig.16 It is a schematic structural diagram of an electronic device 1600 provided in an embodiment of the present application. Fig.16 The electronic device 1600 shown includes a processor 1610, which can call and run a computer program from a memory to implement the method in the embodiment of the present application.

[0209] Alternatively, if Fig.16 As shown, the electronic device 1600 may further include a memory 1620. The processor 1610 may call and run a computer program from the memory 1620 to implement the method in the embodiment of the present application.

[0210] The memory 1620 may be a separate device independent of the processor 1610 , or may be integrated into the processor 1610 .

[0211] Alternatively, if Fig.16 As shown, the electronic device 1600 may further include a transceiver 1630, and the processor 1610 may control the transceiver 1630 to communicate with other devices, specifically, may send information or data to other devices, or receive information or data sent by other devices.

[0212] The transceiver 1630 may include a transmitter and a receiver. The transceiver 1630 may further include an antenna, and the number of antennas may be one or more.

[0213] The electronic device 1600 may specifically be the data transmission device 1200 / data transmission device 1300 / data transmission device 1400 / data transmission device 1500 of the embodiment of the present application, and the electronic device 1600 may implement the corresponding processes implemented by the data transmission device 1200 / data transmission device 1300 / data transmission device 1400 / data transmission device 1500 in the various methods of the embodiment of the present application, which will not be described herein for the sake of brevity.

[0214] Illustratively, an embodiment of the present application further provides a computer program product, including a computer program, which can be executed by the processor 1610 of the electronic device 1600 to complete the steps of any of the aforementioned methods.

[0215] Fig.17 It is a schematic structural diagram of the chip of an embodiment of the present application. Fig.17 The chip 1700 shown includes a processor 1710, which can call and run a computer program from a memory to implement the method in the embodiment of the present application.

[0216] Alternatively, if Fig.17 As shown, the chip 1700 may further include a memory 1720. The processor 1710 may call and run a computer program from the memory 1720 to implement the method in the embodiment of the present application.

[0217] The memory 1720 may be a separate device independent of the processor 1710 , or may be integrated into the processor 1710 .

[0218] Optionally, the chip 1700 may further include an input / output interface 1730. The processor 1710 may control the input / output interface 1730 to communicate with other devices or chips, and specifically, may obtain information or data sent by other devices or chips.

[0219] Optionally, the chip 1700 may further include an output interface 1740. The processor 1710 may control the output interface 1740 to communicate with other devices or chips, and specifically, may output information or data to other devices or chips.

[0220] The chip can be applied to the electronic device 1600 in the embodiment of the present application, and the chip can implement the corresponding processes implemented by the electronic device 1600 in the various methods of the embodiment of the present application, which will not be described in detail here for the sake of brevity.

[0221] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.

[0222] It should be understood that the processor of the embodiment of the present application may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method embodiment can be completed by the hardware integrated logic circuit or software instructions in the processor. The above processor can be a general processor, a digital signal processor (Digital Signal Processor, DSP), an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware decoding processor to perform, or the hardware and software modules in the decoding processor are combined and performed. The software module can be located in a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, and other mature storage media in the art. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.

[0223] It can be understood that the memory in the embodiments of the present application can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct RAM bus random access memory (DR RAM). It should be noted that the memory of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0224] It should be understood that the above-mentioned memory is exemplary but not restrictive. For example, the memory in the embodiments of the present application may also be static random access memory (static RAM, SRAM), dynamic random access memory (dynamic RAM, DRAM), synchronous dynamic random access memory (synchronous DRAM, SDRAM), double data rate synchronous dynamic random access memory (double data rate SDRAM, DDR SDRAM), enhanced synchronous dynamic random access memory (enhanced SDRAM, ESDRAM), synchronous link dynamic random access memory (synch link DRAM, SLDRAM) and direct memory bus random access memory (Direct Rambus RAM, DR RAM), etc. That is to say, the memory in the embodiments of the present application is intended to include but not limited to these and any other suitable types of memory.

[0225] The present application also provides a storage medium for storing a computer program. The storage medium can be applied to the electronic device 1600 in the present application, and the computer program enables the computer to execute the corresponding process implemented by the electronic device 1600 in each method of the present application, which will not be described in detail for the sake of brevity.

[0226] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0227] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0228] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical network element division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some output interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0229] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0230] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0231] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or an electronic device 1600, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0232] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A data transmission method, characterized in that: Applied to the second device, comprising: In the process of transmitting a target data message from a first device to a third device, when the first device fails, a first data message is sent to the third device; the first data message includes first information, and the first information is used to indicate that the target data message sending device is changed from the first device to the second device; the first data message is a data message in the target data message; Receiving an ACK message sent by the third device; According to the ACK message, the target data message is transmitted to the third device.

2. The method according to claim 1, characterized in that: The first device interacts with the third device via the RoCEv2 protocol; the second device interacts with the third device via the RoCEv2 protocol; the first device is a proximal master device, the second device is a proximal backup device, and the third device is a remote master device.

3. The method according to claim 2, characterized in that The first data message is a data message that should be sent in the current sending window of the second device.

4. The method according to claim 2, characterized in that: The ACK message includes second information, where the second information represents a message sequence number PSN of the last data message successfully received by the third device; The transmitting the target data message to the third device according to the ACK message includes: Sending a second data message to the third device according to the ACK message; The second data packet is a next data packet of the last data packet successfully received by the third device.

5. The method according to claim 4, characterized in that The ACK message further includes third information; the third information indicates that the opposite end device in the queue pair QP of the third device is changed to the second device.

6. The method according to claim 5, characterized in that The first information and / or the third information is represented by a reserved field 7 in the RoCEv2 protocol message.

7. The method according to any one of claims 2 to 6, characterized in that The transmission tasks of the first device and the second device are the same; The partitions of the first device and the second device are the same; A backup mapping table is provided for data transmission between the first device and the second device; the backup mapping table includes device information of the first device and the second device; The device information includes address information and QP number; The method further comprises: Receive first synchronization information sent by the first device, and update the data transmission information of the second device based on the first synchronization information; wherein the first synchronization information includes one or more of the following information: completion queue event CQE, ACK message, and master-slave switching information of the remote device.

8. The method according to any one of claims 1 to 6, characterized in that The queue pair context QPC of the third device includes the device information of the second device; the device information includes device address information and a QP number.

9. A data transmission method, characterized in that: Applicable to third-party devices, including: In the process of receiving a target data message transmitted by a first device, receiving a first data message sent by a second device; the first data message includes first information, and the first information is used to indicate that the target data message sending device is changed from the first device to the second device; the first data message is a data message in the target data message; According to the first data message, the peer device in the QP is changed to the second device; an ACK message is sent to the second device; the ACK message includes second information, and the second information represents the PSN of the last data message successfully received by the third device; Receive the target data message transmitted by the second device.

10. The method according to claim 9, characterized in that The first device interacts with the third device via the RoCEv2 protocol; the second device interacts with the third device via the RoCEv2 protocol; the first device is a proximal master device, the second device is a proximal backup device, and the third device is a remote master device.

11. The method according to claim 10, characterized in that The sending an ACK message to the second device includes: If the PSN of the first data message is the PSN that the third device expects to receive, sending an ACK message of the first data message to the second device; If the PSN of the first data message is not the PSN that the third device expects to receive, resend the last ACK message that has been sent to the second device.

12. The method according to claim 10, characterized in that The ACK message further includes third information; the third information indicates that the opposite end device in the QP of the third device is changed to the second device.

13. The method according to claim 12, characterized in that The first information and / or the third information is represented by a reserved field 7 in the RoCEv2 protocol message.

14. The method according to any one of claims 9 to 14, characterized in that The QPC of the third device contains the device information of the second device; the device information includes address information and a QP number.

15. The method according to any one of claims 9 to 14, characterized in that Also includes: Sending second synchronization information to a fourth device; the fourth device is a remote standby device; the second synchronization information includes one or more of the following information: CQE, ACK message and master-slave switching information of the local device.

16. A data transmission method, characterized in that: Applicable to the fourth device, comprising: In the process of transmitting the target data message from the first device to the third device, when the third device fails, an ACK message is sent to the first device; the ACK message includes fourth information and fifth information, the fourth information is used to indicate that the target data message receiving device is changed from the third device to the fourth device; the fifth information is used to indicate the PSN of the last data message successfully received; Receive the target data message transmitted by the first device.

17. The method according to claim 16, characterized in that The first device interacts with the third device via the RoCEv2 protocol; the first device interacts with the fourth device via the RoCEv2 protocol; the first device is a proximal master device, the third device is a remote master device, and the fourth device is a remote standby device; the method further includes: Receive second synchronization information sent by a third device, and update data transmission information according to the second synchronization information; the second synchronization information includes one or more of the following information: CQE, ACK message, and proximal device master-slave switching information.

18. A data transmission method, characterized in that: Applied to a first device, comprising: In the process of transmitting the target data message to the third device, receiving the ACK message sent by the fourth device; the ACK message includes fourth information and fifth information, the fourth information is used to indicate that the target data message receiving device is changed from the third device to the fourth device; the fifth information is used to indicate the PSN of the last data message successfully received; The target data message is transmitted to the fourth device based on the ACK message.

19. The method according to claim 18, characterized in that The first device interacts with the third device via the RoCEv2 protocol; the first device interacts with the fourth device via the RoCEv2 protocol; the first device is a proximal master device, the third device is a remote master device, and the fourth device is a remote standby device; the method further includes: Sending first synchronization information to a second device; the second device is a near-end standby device; wherein the first synchronization information includes one or more of the following information: CQE, ACK message, and master-slave switching information of a remote device.

20. A data transmission device, applied to a second device, characterized in that: include: A first processing unit: configured to send a first data message to a third device when a failure occurs in the first device during the process of transmitting a target data message from the first device to the third device; The first data message includes first information, and the first information is used to indicate that the target data message sending device is changed from the first device to the second device; the first data message is a data message in the target data message; The first processing unit is further configured to receive an ACK message sent by the third device; The first processing unit is further configured to transmit the target data message to the third device according to the ACK message.

21. A data transmission device, applied to a third device, characterized in that: include: A second processing unit: configured to receive a first data message sent by a second device during a process of receiving a target data message transmitted by the first device; The first data message includes first information, and the first information is used to indicate that the target data message sending device is changed from the first device to the second device; the first data message is a data message in the target data message; The second processing unit is further configured to change the peer device in the QP to the second device according to the first data message; Sending an ACK message to the second device; the ACK message includes second information, where the second information represents the PSN of the last data message successfully received by the third device; The second processing unit is also used to receive the target data message transmitted by the second device.

22. A data transmission device, applied to a fourth device, characterized in that: include: The third processing unit is configured to send an ACK message to the first device when the third device fails during the process of transmitting the target data message from the first device to the third device; the ACK message includes fourth information and fifth information, the fourth information is used to indicate that the target data message receiving device is changed from the third device to the fourth device; the fifth information is used to indicate the PSN of the last data message successfully received; The third processing unit is also used to receive the target data message transmitted by the first device.

23. A data transmission device, applied to a first device, characterized in that: include: The fourth processing unit is configured to receive an ACK message sent by the fourth device during the process of transmitting the target data message to the third device; The ACK message includes fourth information and fifth information, wherein the fourth information is used to indicate that the target data message receiving device is changed from the third device to the fourth device; and the fifth information is used to indicate the PSN of the last data message successfully received; The fourth processing unit is also used to transmit the target data message to the fourth device based on the ACK message.

24. An electronic device, characterized in that: include: A processor and a memory, the memory being used to store a computer program, the processor being used to call and run the computer program stored in the memory to execute the data transmission method according to any one of claims 1 to 8, or the data transmission method according to any one of claims 9 to 15, or the data transmission method according to any one of claims 16 to 17, or the data transmission method according to any one of claims 18 to 19.

25. A chip, characterized in that: include: A processor, used to call and run a computer program from a memory so that a device equipped with the chip executes the data transmission method described in any one of claims 1 to 8, or the data transmission method described in any one of claims 9 to 15, or the data transmission method described in any one of claims 16 to 17, or the data transmission method described in any one of claims 18 to 19.

26. A storage medium, characterized in that Used to store a computer program, wherein the computer program enables a computer to execute the data transmission method according to any one of claims 1 to 8, or the data transmission method according to any one of claims 9 to 15, or the data transmission method according to any one of claims 16 to 17, or the data transmission method according to any one of claims 18 to 19.

27. A computer program product comprising a computer program, characterized in that When executed by a processor, the computer program implements the data transmission method according to any one of claims 1 to 8, or the data transmission method according to any one of claims 9 to 15, or the data transmission method according to any one of claims 16 to 17, or the data transmission method according to any one of claims 18 to 19.

Citation Information

Patent Citations

  • Data transmission method and device

    CN110636544A

  • Data transmission method, system and network equipment

    CN111865704A

  • Communication method and communication equipment

    CN113660161A

  • Flow control method and device, electronic equipment and storage medium

    CN116032853A

  • Data communication security management method and device, electronic equipment and storage medium

    CN118741492A

Cited By

  • Vehicle data processing method, roadside equipment, edge server and central cloud platform

    CN121527998A