Data Transmission Method, Server, and Storage Medium

By obtaining and negotiating RDMA protocol information, the data transmission abnormality caused by inconsistent agreement between the two parties is solved, ensuring the stability and normality of data transmission.

CN119025469BActive Publication Date: 2025-07-29BEIJING BITINTELLIGENCE INFORMATION TECHNOLOGY CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411060610.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-02
Publication Date
2025-07-29
Estimated Expiration
2044-08-02

AI Technical Summary

Technical Problem

The problem of inconsistent remote direct memory access protocol used by both parties in the communication leads to abnormal data transmission.

Method used

By obtaining the RDMA protocol information of the current server and the target server, using the protocol management platform or negotiation to determine the target protocol information, ensure that both parties to the communication use a consistent RDMA protocol for data transmission.

Benefits of technology

Ensure that the RDMA protocol used by both parties to the data transmission is consistent, avoid data transmission abnormalities, and improve the stability and normality of data transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119025469B_ABST
    Figure CN119025469B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of computer technology, and discloses a data transmission method, a server, and a storage medium. The method includes: obtaining first protocol information of a remote direct memory access protocol supported by a current server; determining target protocol information based on the protocol information that matches between the first protocol information and second protocol information of a remote direct memory access protocol supported by a first target server; wherein the target protocol information is determined based on the first protocol information and the second protocol information registered by the first target server in a protocol management platform; or the target protocol information is determined through negotiation between the first protocol information and the first target server; and performing data transmission with the first target server based on the remote direct memory access protocol corresponding to the target protocol information. The present invention can solve the problem of abnormal data transmission caused by inconsistent remote direct memory access protocols used by both communication parties.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a data transmission method, a server and a storage medium. Background Art

[0002] Remote Direct Memory Access (RDMA), a key network protocol, enables high-speed, remote access from one computer to the memory of another, without requiring the central processing unit (CPU) or operating system software on either computer. Due to its high speed, RDMA is widely used in data transmission.

[0003] To improve the performance and usability of the RDMA protocol, various improvements have been proposed, including packet retransmission algorithms, lossy networks, lossless networks, and congestion control protocols. However, these improvements introduce changes to the original RDMA protocol, leading to protocol compatibility issues. If the RDMA protocols used by the communicating parties are inconsistent, data transmission anomalies may occur. Summary of the invention

[0004] In view of this, the present invention provides a data transmission method, a server, and a storage medium to solve the problem of abnormal data transmission caused by inconsistent remote direct memory access protocols used by communicating parties.

[0005] In a first aspect, the present invention provides a data transmission method, the method comprising:

[0006] Obtain the first protocol information of the remote direct memory access protocol supported by the current server;

[0007] determining target protocol information based on matching protocol information in the first protocol information and second protocol information of a remote direct memory access protocol supported by the first target server; wherein the target protocol information is determined based on the first protocol information and second protocol information registered by the first target server on a protocol management platform; or, the target protocol information is determined through negotiation with the first target server based on the first protocol information;

[0008] Data is transmitted with the first target server based on the remote direct memory access protocol corresponding to the target protocol information.

[0009] In a second aspect, the present invention provides a server, comprising: a memory and a processor, which are communicatively connected to each other. The memory stores computer instructions, and the processor executes the computer instructions to perform the data transmission method according to the first aspect or any corresponding embodiment thereof.

[0010] In a third aspect, the present invention provides a computer-readable storage medium, on which computer instructions are stored. The computer instructions are used to cause a computer to perform the data transmission method according to the first aspect or any corresponding embodiment thereof.

[0011] In a fourth aspect, the present invention provides a data transmission device, the device comprising:

[0012] a local protocol acquisition module, configured to acquire first protocol information of a remote direct memory access protocol supported by a current server;

[0013] a communication protocol determination module, configured to determine target protocol information based on the protocol information that matches between the first protocol information and second protocol information of a remote direct memory access protocol supported by a first target server; wherein, the target protocol information is determined based on the first protocol information and second protocol information registered by the first target server in a protocol management platform; or, the target protocol information is determined through negotiation between the first protocol information and the first target server;

[0014] a communication data transmission module, configured to perform data transmission with the first target server based on the remote direct memory access protocol corresponding to the target protocol information.

[0015] In a fifth aspect, the present invention provides a computer program product, comprising computer instructions, which are used to cause a computer to perform the data transmission method according to the first aspect or any corresponding embodiment thereof.

[0016] Based on the first protocol information of the remote direct memory access protocol supported by the current server and the protocol information that matches between the first protocol information and second protocol information of the remote direct memory access protocol supported by the first target server, the data transmission method of the present disclosure determines the target protocol information. Then, data transmission is performed with the first target server based on the remote direct memory access protocol corresponding to the target protocol information. Therefore, it can ensure that the remote direct memory access protocols used by both parties of the data transmission are consistent, thereby ensuring normal data transmission. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the specific embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0018] Figure 1 is a flowchart of a first data transmission method according to an embodiment of the present invention;

[0019] Figure 2 is a flowchart of a second data transmission method according to an embodiment of the present invention;

[0020] Figure 3 is a schematic diagram of a first type of data transmission interaction according to an embodiment of the present invention;

[0021] Figure 4 is a flowchart of a third data transmission method according to an embodiment of the present invention;

[0022] Figure 5 is a schematic diagram of interaction of a second type of data transmission according to an embodiment of the present invention;

[0023] Figure 6 is a structural block diagram of a data transmission device according to an embodiment of the present invention;

[0024] Figure 7 is a structural block diagram of a server according to an embodiment of the present invention. DETAILED DESCRIPTION

[0025] To make the purpose, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making creative efforts shall fall within the scope of protection of the present invention.

[0026] Remote Direct Memory Access (RDMA), a key network protocol, enables high-speed, remote access from one computer to the memory of another, without requiring the central processing unit (CPU) or operating system software on either computer. Due to its high speed, RDMA is widely used in data transmission.

[0027] To improve the performance and usability of the RDMA protocol, various improvements have been proposed, including packet retransmission algorithms, lossy networks, lossless networks, and congestion control protocols. However, these improvements introduce changes to the original RDMA protocol, leading to protocol compatibility issues. If the RDMA protocols used by both ends of a communication are inconsistent, data transmission anomalies can occur. For example, data transmission may not proceed normally, data transmission performance may not meet expectations, or difficult-to-troubleshoot errors may occur.

[0028] According to an embodiment of the present invention, an embodiment of a data transmission method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0029] In this embodiment, a data transmission method is provided, which can be used for a server. Figure 1 is a flow chart of a data transmission method according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:

[0030] Step S101: Acquire first protocol information of a remote direct memory access protocol supported by the current server.

[0031] Specifically, the first protocol information includes the protocol information of the Remote Direct Memory Access protocol (hereinafter referred to as RDMA) supported by each network card of the current server. The first protocol information includes the packet retransmission algorithm, whether lossless (also known as lossless) network support is required, and the network congestion algorithm. Packet retransmission algorithms include the Go-Back-N algorithm and the Select_Repeat algorithm. Network congestion algorithms include Data Center Quantized Congestion Notification (DCQCN), Round Trip Time-based Congestion Control (Timely), and High Precision Congestion Control (HPCC).

[0032] Step S102, determining the target protocol information based on the first protocol information and the matching protocol information in the second protocol information of the remote direct memory access protocol supported by the first target server; wherein the target protocol information is determined based on the first protocol information and the second protocol information registered by the first target server on the protocol management platform; or, the target protocol information is determined by negotiation with the first target server based on the first protocol information.

[0033] It should be noted that the matching protocol information refers to the RDMA protocol information that is compatible between the two communication parties. The matching protocol information can be the same or different. For example, if the network congestion algorithm V2 supported by the first target server is compatible with both network congestion algorithm V1 and network congestion algorithm V2, and the current server supports network congestion algorithm V1, then network congestion algorithm V1 can be selected for communication between the current server and the first target server.

[0034] Specifically, a centralized protocol management platform can be introduced to store the protocol information of the RDMA protocols supported by the RDMA network cards of each server. Each server can query the protocol information of the RDMA protocol supported by the first target server to be communicated through the protocol management platform, so as to determine the target protocol information based on the protocol information of the RDMA protocol of the first target server and the protocol information of the RDMA protocol of the current server. Alternatively, when the server establishes an RDMA connection through the Communication Management Protocol, the protocol information of the corresponding RDMA protocol is written in the message for establishing the RDMA connection, so that the target protocol information is negotiated and determined between the current server and the first target server.

[0035] Step S103, perform data transmission with the first target server based on the remote direct memory access protocol corresponding to the target protocol information.

[0036] Specifically, the current server establishes a connection with the first target server based on the remote direct memory access protocol corresponding to the target protocol information, and performs data transmission according to the remote direct memory access protocol.

[0037] The data transmission method provided in this embodiment determines the target protocol information based on the matching protocol information in the first protocol information of the remote direct memory access protocol supported by the current server and the second protocol information of the remote direct memory access protocol supported by the first target server. Then, data transmission is performed with the first target server based on the remote direct memory access protocol corresponding to the target protocol information. Therefore, it can ensure that the remote direct memory access protocols used by both parties in data transmission are consistent, thus ensuring normal data transmission.

[0038] In this embodiment, a data transmission method is provided, which can be used for a server. Figure 2 It is a schematic flowchart of the second data transmission method according to an embodiment of the present invention. As Figure 2 shown, the process includes the following steps:

[0039] Step S201, obtain the first protocol information of the remote direct memory access protocol supported by the current server. For details, refer to the above step S101, and details will not be elaborated here.

[0040] Step S202: Determine the target protocol information based on the matching protocol information in the first protocol information and the second protocol information of the remote direct memory access (RDMA) protocol supported by the first target server. The target protocol information is determined based on the first protocol information and the second protocol information registered by the first target server in the protocol management platform.

[0041] Specifically, the above step S202 includes:

[0042] Step S2021: Obtain the target identification information of the first target server. The target identification information includes at least one of the name of the first target server and the network address of the first target network card in the first target server.

[0043] Specifically, each server can register the protocol information of the RDMA protocol it supports with the protocol management platform through the corresponding server name and the network address of the RDMA network card of the server. The current server can query the second protocol information of the first target server from the protocol management platform according to the server name and / or the network address of the RDMA network card of the first target server. Of course, in addition to the server name and the network address of the RDMA network card, the target identification information may also include other information related to the RDMA protocol of the first target server. The specific target identification information needs to be determined according to the information registered when registering the RDMA protocol required by the protocol management platform.

[0044] Step S2022: Send a query request to the protocol management platform based on the target identification information. The protocol information of multiple servers and the corresponding identification information are registered in the protocol management platform. The protocol management platform is used to respond to the query request and query the second protocol information supported by the first target server from the protocol information of multiple servers based on the target identification information.

[0045] Specifically, the protocol management platform can provide query services for the servers that have registered the protocol information of the RDMA protocol on this platform. Each server can use this query service to query the protocol information of the RDMA protocol supported by the RDMA network cards of other servers.

[0046] Specifically, each server can register the protocol information of the RDMA protocol it supports with the protocol management platform through the corresponding identification information. At the same time, the protocol management platform stores the identification information of the registered servers correspondingly. Therefore, when data transmission with the first target server is required, the protocol information of the RDMA protocol supported by the first target server is queried from the protocol management platform by obtaining the target identification information of the first target server.

[0047] Step S2023: Receive the feedback information from the protocol management platform.

[0048] Specifically, in response to a query request, the protocol management platform parses the query request to obtain target identification information. The protocol management platform queries the second protocol information corresponding to the target identification information in the protocol information corresponding to multiple registered servers. If the protocol management platform queries the second protocol information, it feeds back the second protocol information to the current server as feedback information. If the protocol management platform fails to query the second protocol information, it generates feedback information indicating that the second protocol information has not been queried. Then, the protocol management platform feeds back the feedback information to the current server.

[0049] In step S2024, if the feedback information of the protocol management platform carries the second protocol information, query the protocol information that matches the second protocol information in the first protocol information to determine the target protocol information.

[0050] Specifically, the current server can obtain the second protocol information from the feedback information, and then determine the protocol information that matches in the first protocol information and the second protocol information. If the number of pieces of matching protocol information is greater than 1, select a suitable piece of protocol information from the matching protocol information as the target protocol information. Specifically, the current server can determine the target protocol information from the matching protocol information according to a pre-determined protocol selection strategy. For example, randomly select or select according to a pre-defined order.

[0051] It should be noted that if the matching protocol information includes sub-protocol information of multiple categories, select one target sub-protocol information from the sub-protocol information of each category, and use all the selected target sub-protocol information as the target protocol information. For example, taking the categories including packet retransmission algorithm, whether lossless network support is required, and network congestion algorithm as an example, if the packet retransmission algorithm includes Go-Back-N and Select_repeat, whether lossless network support is required includes requiring lossless network support and not requiring lossless network support, and the network congestion algorithm includes DCQCN, Timely, and HPCC. Then, one target sub-protocol information can be selected from each category. For example, select Go-Back-N as the target sub-protocol information for the packet retransmission algorithm, select requiring lossless network support as the target sub-protocol information for whether lossless network support is required, and DCQCN as the target sub-protocol information for the network congestion algorithm to obtain the target protocol information as Go-Back-N, requiring lossless network support, DCQCN. Thus, the current server performs data transmission with the first target server according to Go-Back-N, requiring lossless network support, and DCQCN.

[0052] Furthermore, the above step S202 further includes:

[0053] Step S2025: If the feedback information from the protocol management platform does not carry the second protocol information, the preset protocol information is determined as the target protocol information.

[0054] Understandably, if the feedback information from the protocol management platform does not include the second protocol information, it indicates that the first target server has not registered the protocol information of the RDMA protocol it supports with the protocol management platform. Therefore, the current server can use the preset protocol information (i.e., the protocol information of the default RDMA protocol) as the target protocol information and perform data transmission with the first target server using the RDMA protocol corresponding to the preset protocol information.

[0055] Step S203: Data is transmitted with the first target server based on the remote direct memory access protocol corresponding to the target protocol information. For details, refer to the above step S103, which will not be described in detail here.

[0056] In some optional implementations, if the target protocol information is determined based on the first protocol information and the second protocol information registered by the first target server on the protocol management platform, the data transmission method of the present disclosure further includes:

[0057] Step a1, obtaining current identification information of the current server; wherein the current identification information includes at least one of the name of the current server and the network address of the second target network card in the current server, and the second target network card supports the remote direct memory access protocol.

[0058] It should be noted that before the current server obtains the target identification information of the first target server and sends a query request to the protocol management platform based on the target identification information, the current server needs to register the protocol information of the RDMA protocol it supports with the protocol management platform based on the current identification information of the current server.

[0059] Specifically, each server may register protocol information of the RDMA protocol supported by its RDMA network card with the protocol management platform through an application programming interface (API) for registering with the protocol management platform.

[0060] Step a2, based on the current identification information and the first protocol information, sends a registration request to the protocol management platform; wherein, the protocol management platform is used to register the current identification information and the first protocol information in response to the registration request, so that other servers can query the first protocol information supported by the current server based on the protocol management platform.

[0061] Specifically, the current server can send a registration request to the protocol management platform according to the current identification information (such as the server name of the current server and the network address of the RDMA network card) and the first protocol information (such as the protocol information of the RDMA protocols supported by each RDMA network card). In response to the registration request, the protocol management platform parses the registration request to obtain the current identification information and the corresponding first protocol information. The protocol management platform registers the current identification information and the corresponding first protocol information to enable other servers to query the first protocol information supported by the current server from the protocol management platform. In addition, the protocol management platform needs to return a response of registration success or registration failure to the registration request of the current server.

[0062] Exemplarily, as Figure 3 shown, taking the current server as server A and the first target server as server B as an example, server B can call the API through the network card NIC1 to register its identification information and protocol information with the protocol management platform. Then, server A can send a query request to the protocol management platform through the network card NIC0 and the identification information of server B, so that the protocol management platform can query the protocol information of server B from the protocol information of the RDMA protocols supported by the registered servers. Server A determines the target protocol information according to the protocol information of itself and the matching protocol information in the queried protocol information of server B.

[0063] It should be noted that based on the protocol management platform for RDMA protocol negotiation, there is no need to modify the RDMA protocol.

[0064] In this embodiment, a third data transmission method is provided, which can be used for a server. Figure 4 is a flowchart of the third data transmission method according to the embodiment of the present invention. As Figure 4 shown, the process includes the following steps:

[0065] Step S401, obtain the first protocol information of the remote direct memory access protocol supported by the current server. For details, please refer to the above step S101, and will not be elaborated here.

[0066] Step S402, determine the target protocol information based on the protocol information that matches between the first protocol information and the second protocol information of the remote direct memory access protocol supported by the first target server; wherein, the target protocol information is negotiated based on the first protocol information and the first target server.

[0067] Specifically, the above step S402 includes:

[0068] Step S4021, generate a first target connection request based on the first protocol information.

[0069] Specifically, the above step S4021 includes: generating an initial connection request; writing the first protocol information into a preset message area of the initial connection request to obtain a first target connection request.

[0070] It should be noted that the RDMA protocol stipulates that the RDMA connection is established through the communication management protocol. Figure 5 As shown, when server A establishes an RDMA connection with server B, it needs to transmit three connection establishment messages. Specifically, server A initiates a connection request (also known as REQ) to server B. The connection request may include the RDMA function and the network address of the network card in server A, etc. Server B replies to server A with feedback information (also known as REP) based on the connection request. The feedback information may include the RDMA connection attributes, such as Local Communication ID and Service ID, etc. Server A replies with a confirmation message (also known as RTU) to server B to confirm that the connection has been established. It should be noted that the RDMA connection attributes referred to above are used to inform the other party to communicate using the RDMA protocol. The RDMA connection attributes mentioned here are different from the protocol information of the RDMA protocol referred to in this disclosure. The RDMA connection attributes do not include the protocol information of the RDMA protocol involved in the present invention.

[0071] It can be understood that the RDMA protocol can be understood as a large protocol family. The RDMA protocol contains multiple sub-protocols and specific algorithms (such as packet retransmission algorithm, whether lossless network support is required, network congestion algorithm). The sub-protocols and / or algorithms in the RDMA protocol supported by different servers may be different. If the other party is informed to communicate using the RDMA protocol only through the communication management protocol, the RDMA protocols used by the communicating parties may be incompatible, that is, the sub-protocols and / or algorithms used in the RDMA protocol are incompatible, resulting in communication abnormalities. Therefore, the data transmission method disclosed in the present invention aims to allow the communicating parties to negotiate the various possible contents that may exist in the RDMA protocol to ensure that the RDMA protocols used by the communicating parties are compatible at the sub-protocol level, thereby ensuring normal data transmission.

[0072] Based on this, the data transmission method disclosed in the present invention hopes to write the protocol information of the RDMA protocol into the message for establishing a connection, so that both communicating parties can negotiate the specific information of the RDMA protocol to be used.

[0073] Specifically, at the end of the REQ, REP and RTU information, there is a private data storage area (also called PrivateData field) for storing private data (also called PrivateData) for establishing a connection.

[0074] Specifically, the preset message area is a private data storage area in the initial connection request for placing private data. The server can carry the negotiation information of the RDMA protocol through this preset message area.

[0075] Exemplarily, at the tail of the preset message area of the initial connection request, an rdma_negotiation_req message can be added to represent the protocol information. Then, the data format of the first target connection request can be obtained as follows:

[0076] struct rdma_negotiation_req

[0077] {

[0078] u64 retrans_algo;

[0079] u64 lossless_flag;

[0080] u64 cc_algo;

[0081] };

[0082] In this data format, u64 represents an unsigned 64-bit integer, retrans_algo represents the packet retransmission algorithm, lossless_flag represents whether lossless network support is required, and cc_algo represents the network congestion algorithm.

[0083] Exemplarily, assuming that the packet retransmission algorithms include Go-Back-N and Select_repeat, whether lossless network support is required includes requiring lossless network support and not requiring lossless network support, and the network congestion algorithms include DCQCN, Timely, and HPCC, then the negotiated protocol information between the two parties of data transmission can be defined according to the following content. For example:

[0084] 1. Definition of packet retransmission algorithm:

[0085] #define RETRANS_GO_BACK_N 0x01

[0086] #define RETRANS_SELECT_REPEAT 0x02

[0087] That is, the value of Go-Back-N (GO_BACK_N) for the defined packet retransmission algorithm (RETRANS) is 0x01, and the value of Select_repeat (SELECT_REPEAT) is 0x02.

[0088] 2. Definition of whether lossless network support is required:

[0089] #define LOSSLESS_FLAG_LOSSLESS 0x01

[0090] #define LOSSLESS_FLAG_LOSSY 0x02

[0091] That is, define that the value for requiring lossless network support (LOSSLESS) in the definition of whether lossless network support is required (LOSSLESS_FLAG) is 0x01, and the value for not requiring lossless network support (LOSSY) is 0x02.

[0092] 3. Definition of network congestion algorithm:

[0093] #define CC_ALGO_DCQCN 0x01

[0094] #define CC_ALGO_TIMELY 0x02

[0095] #define CC_ALGO_HPCC0x04

[0096] That is, define that the value of DCQCN for the network congestion algorithm is 0x01, the value of Timely (TIMELY) is 0x02, and the value of HPCC is 0x04.

[0097] Then, when the current server initiates a first target connection request to the first target server, write the following information in the preset message area:

[0098] {

[0099] u64 retrans_algo = RETRANS_GO_BACK_N|RETRANS_SELECT_REP EAT;

[0100] u64 lossless_flag = LOSSLESS_FLAG_LOSSLESS|LOSSLESS_FLAG_LOSSY;

[0101] u64 cc_algo = CC_ALGO_DCQCN|CC_ALGO_TIMELY|CC_ALGO_HPCC;

[0102] };

[0103] That is, it means that the current server supports Go-Back-N and Select_repeat in the packet retransmission algorithm, whether it requires lossless network support including requiring lossless network support and not requiring lossless network support, and DCQCN, Timely, and HPCC in the network congestion algorithm.

[0104] It should be noted that the protocol information definition used in the above RDMA protocol negotiation process is only an example. In addition to using the above data structure to define the protocol information, other data structures can also be used to define the protocol information in the negotiation process. It is only necessary to enable both parties of data transmission to clearly understand the protocol information carried in the negotiation information.

[0105] Step S4022: Send the first target connection request to the first target server; wherein the first target server is configured to determine third protocol information in response to the first target connection request based on the first protocol information and the matching protocol information in the supported second protocol information.

[0106] Specifically, the first target server responds to the first target connection request by parsing the first target connection request to obtain the first protocol information. The first target server then obtains the protocol information of the RDMA protocol supported by its RDMA network card (i.e., the second protocol information), and determines the third protocol information based on the first protocol information and the protocol information that matches the second protocol information.

[0107] Specifically, if the number of matching protocol information in the first protocol information and the second protocol information is greater than 1, the third protocol information may be selected from the matching protocol information according to certain criteria, such as predefined protocol information priority or user-specified protocol information priority.

[0108] It should be noted that if the matching protocol information includes multiple categories of sub-protocol information, the first target server selects one sub-protocol information from each category of sub-protocol information, and uses all selected sub-protocol information as the third protocol information. For example, taking the categories including packet retransmission algorithm, whether lossless network support is required, and network congestion algorithm as an example, if the packet retransmission algorithm includes Go-Back-N and Select_repeat, whether lossless network support is required includes lossless network support required and lossless network support not required, and the network congestion algorithms include DCQCN, Timely, and HPCC. Then, one sub-protocol information can be selected from each category, for example, Go-Back-N can be selected as the sub-protocol information of the packet retransmission algorithm, lossless network support required can be selected as the sub-protocol information of whether the network congestion algorithm is required, and HPCC can be selected as the sub-protocol information of the network congestion algorithm, so as to obtain the third protocol information of Go-Back-N, lossless network support required, and HPCC.

[0109] Furthermore, at the end of the preset message area of the feedback information of the first target server, an rdma_negotiation_req message can be added to represent the protocol information. Then, the data format of the feedback information of the first target server can be obtained as follows:

[0110] struct rdma_negotiation_req

[0111] {

[0112] u64 retrans_algo;

[0113] u64 lossless_flag;

[0114] u64 cc_algo;

[0115] };

[0116] In this data format, u64 represents an unsigned 64-bit integer, retrans_algo represents the packet retransmission algorithm, lossless_flag represents whether lossless network support is required, and cc_algo represents the network congestion algorithm.

[0117] Furthermore, when the first target server feeds back the third protocol information to the current server, the following information is written in the preset message area of the feedback information:

[0118] struct rdma_negotiation_req

[0119] {

[0120] u64 retrans_algo=RETRANS_GO_BACK_N;

[0121] u64 lossless_flag=LOSSLESS_FLAG_LOSSLESS;

[0122] u64 cc_algo = CC_ALGO_HPCC;

[0123] };

[0124] That is, it indicates that the first target server supports Go-Back-N in the packet retransmission algorithm, requires lossless network support in whether lossless network support is required, and HPCC in the network congestion algorithm.

[0125] Step S4023: Receive feedback information from the first target server.

[0126] Specifically, the first target server parses the first target connection request to obtain the first protocol information, and then determines the third protocol information based on the protocol information that matches between the second protocol information supported by the first target server and the first protocol information. If there is matching protocol information between the first protocol information and the second protocol information, the first target server generates feedback information according to the third protocol information. If there is no matching protocol information between the first protocol information and the second protocol information, the first target server generates feedback information indicating that there is no matching protocol information.

[0127] Step S4024: If the feedback information of the first target server carries the third protocol information, determine the third protocol information as the target protocol information.

[0128] It can be understood that if the feedback information of the first target server carries the third protocol information, it indicates that both the current server and the first target server support the third protocol information, and the third protocol information can be used for data transmission, so as to ensure that the RDMA protocols used by both parties in data transmission are consistent.

[0129] Furthermore, the above step S402 further includes:

[0130] Step S4025: If the feedback information of the first target server does not carry the third protocol information, determine the preset protocol information as the target protocol information.

[0131] It should be noted that if the feedback information of the first target server does not carry the third protocol information, it indicates that the first target server does not support RDMA protocol negotiation. In this case, the current server can use the preset protocol information (i.e., the protocol information of the default RDMA protocol) as the target protocol information.

[0132] Optionally, the preset protocol information includes at least one of Go-Back-N, requires lossless network support, and DCQCN.

[0133] Exemplarily, assume that there is no rdma_negotiation_req in the preset message area of the feedback information replied by the first target server, which indicates that the first target server does not support RDMA protocol negotiation. The current server and the first target server select the RDMA protocol corresponding to the preset protocol information to transmit data, for example, transmit data with the first target server through Go-Back-N, requires lossless network support, and DCQCN.

[0134] Step S403: Perform data transmission with the first target server based on the remote direct memory access protocol corresponding to the target protocol information. For details, refer to the above step S103, and no further elaboration will be provided here.

[0135] In some optional implementations, if the target protocol information is determined through negotiation with the first target server based on the first protocol information, the data transmission method of the present disclosure further includes:

[0136] Step b1: In response to the second target connection request sent by the second target server, the second target connection request is parsed to obtain fourth protocol information.

[0137] Specifically, the second target server sends a second target connection request to the current server based on the fourth protocol information of the RDMA protocol supported by the second target server. The current server parses the second target connection request to obtain the fourth protocol information of the RDMA protocol supported by the second target server.

[0138] Step b2: Search the first protocol information for protocol information that matches the fourth protocol information to determine the fifth protocol information.

[0139] Specifically, if the first protocol information and the fourth protocol information have matching protocol information, the current server determines the fifth protocol information in the matching protocol information according to predefined protocol information priorities and the like.

[0140] Step b3: Feedback the fifth protocol information to the second target server, so that the second target server performs data transmission with the current server based on the remote direct memory access protocol corresponding to the fifth protocol information.

[0141] Furthermore, if there is no matching protocol information between the first protocol information and the fourth protocol information, a feedback message indicating that RDMA protocol negotiation is not supported is fed back to the second target server, so that the second target server transmits data with the current server based on the RDMA protocol corresponding to the preset protocol information.

[0142] In some optional implementations, the data transmission method of the present disclosure further includes: after determining the target protocol information based on the feedback information of the first target server, replying confirmation information to the first target server to complete the communication connection with the first target server.

[0143] It can be understood that in the data transmission method disclosed in the present invention, two methods are provided for negotiating the RDMA protocol between servers, thereby ensuring that both parties of the data transmission use the same RDMA protocol to transmit data, thereby ensuring the normal progress of data transmission and improving the stability of data transmission.

[0144] In this embodiment, a data transmission device is further provided. This device is used to implement the above embodiments and preferred implementation manners, and those that have been described will not be repeated. As used hereinafter, the term "module" can be a combination of software and / or hardware that can achieve a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware is also possible and contemplated.

[0145] This embodiment provides a data transmission device, as Figure 6 shown, including:

[0146] A local protocol acquisition module 601, configured to acquire first protocol information of a remote direct memory access protocol supported by the current server;

[0147] A communication protocol determination module 602, configured to determine target protocol information based on the protocol information that matches between the first protocol information and second protocol information of a remote direct memory access protocol supported by a first target server; wherein, the target protocol information is determined based on the first protocol information and second protocol information registered by the first target server in a protocol management platform; or, the target protocol information is determined through negotiation between the first protocol information and the first target server;

[0148] A communication data transmission module 603, configured to perform data transmission with the first target server based on the remote direct memory access protocol corresponding to the target protocol information.

[0149] In some optional implementation manners, if the target protocol information is determined based on the first protocol information and second protocol information registered by the first target server in a protocol management platform, the communication protocol determination module 602 includes a first protocol negotiation unit; wherein, the first protocol negotiation unit includes:

[0150] A first information acquisition subunit, configured to acquire target identification information of the first target server; wherein, the target identification information includes at least one of the name of the first target server and the network address of a first target network card in the first target server;

[0151] A query request sending subunit, configured to send a query request to the protocol management platform based on the target identification information; wherein, protocol information and corresponding identification information of multiple servers are registered in the protocol management platform; the protocol management platform is configured to, in response to the query request, query second protocol information supported by the first target server from the protocol information of multiple servers based on the target identification information;

[0152] A first feedback receiving subunit, configured to receive feedback information from the protocol management platform;

[0153] The first protocol determination subunit is configured to search the first protocol information for protocol information matching the second protocol information to determine target protocol information if the feedback information from the protocol management platform carries the second protocol information.

[0154] In some optional implementations, the first protocol negotiation unit further includes:

[0155] The first candidate subunit is configured to determine the preset protocol information as the target protocol information if the feedback information from the protocol management platform does not carry the second protocol information.

[0156] In some optional implementations, if the target protocol information is determined based on the first protocol information and the second protocol information registered by the first target server on the protocol management platform, the data transmission device further includes:

[0157] A local information acquisition module, configured to acquire current identification information of the current server; wherein the current identification information includes at least one of the name of the current server and the network address of the second target network card in the current server;

[0158] A local protocol registration module is used to send a registration request to a protocol management platform based on current identification information and first protocol information; wherein, the protocol management platform is used to register the current identification information and first protocol information in response to the registration request, so that other servers can query the first protocol information supported by the current server based on the protocol management platform.

[0159] In some optional implementations, if the target protocol information is determined by negotiation with the first target server based on the first protocol information, the communication protocol determination module 602 further includes a second protocol negotiation unit; wherein the second protocol negotiation unit includes:

[0160] a connection request generating subunit, configured to generate a first target connection request based on the first protocol information;

[0161] a connection request sending subunit, configured to send the first target connection request to the first target server; wherein the first target server is configured to determine, in response to the first target connection request, third protocol information based on the first protocol information and the protocol information that matches the supported second protocol information;

[0162] A second feedback receiving subunit, configured to receive feedback information from the first target server;

[0163] The second protocol determining subunit is configured to determine the third protocol information as the target protocol information if the feedback information from the first target server carries the third protocol information.

[0164] In some alternative embodiments, the connection request generation subunit is specifically configured to: generate an initial connection request; write first protocol information in a preset message area of the initial connection request to obtain a first target connection request.

[0165] In some alternative embodiments, the second protocol negotiation unit further includes:

[0166] A second alternative subunit, configured to determine preset protocol information as target protocol information if the feedback information of the first target server does not carry third protocol information.

[0167] In some alternative embodiments, if the target protocol information is negotiated and determined based on the first protocol information and the first target server, the data transmission device further includes:

[0168] A connection request response module, configured to parse a second target connection request in response to the second target connection request sent by the second target server to obtain fourth protocol information;

[0169] A same protocol query module, configured to query for protocol information matching the fourth protocol information in the first protocol information to determine fifth protocol information;

[0170] A same protocol feedback module, configured to feedback the fifth protocol information to the second target server, so that the second target server performs data transmission with the current server based on the remote direct memory access protocol corresponding to the fifth protocol information.

[0171] The further function descriptions of the above-mentioned various modules and units are the same as those in the corresponding above embodiments, and will not be elaborated here.

[0172] The data transmission device in this embodiment is presented in the form of functional units. Here, the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and a memory that execute one or more software or fixed programs, and / or other devices that can provide the above functions.

[0173] The embodiment of the present invention further provides a server having the above Figure 6 shown data transmission device.

[0174] Please refer to Figure 7 , Figure 7 which is a structural block diagram of a server provided by an alternative embodiment of the present invention. As shown in Figure 7As shown, the server includes: one or more processors 701, a memory 702, and interfaces for connecting the various components, including a high-speed interface and a low-speed interface. The various components communicate with each other using different buses and can be mounted on a common motherboard or otherwise mounted as required. The processor can process instructions executed within the server, including instructions stored in the memory or on the memory to display graphical information of a GUI on an external input / output device (such as a display device coupled to the interface). In some alternative embodiments, if needed, multiple processors and / or multiple buses can be used with multiple memories and multiple memories. Similarly, multiple servers can be connected, and each device provides some necessary operations (such as a server array, a set of blade servers, or a multi-processor system). Figure 7 In [example], a processor 701 is taken as an example.

[0175] The processor 701 can be a central processing unit, a network processor, or a combination thereof. Among them, the processor 701 can further include a hardware chip. The above-mentioned hardware chip can be an application-specific integrated circuit, a programmable logic device, or a combination thereof. The above-mentioned programmable logic device can be a complex programmable logic device, a field-programmable gate array, a generic array logic, or any combination thereof.

[0176] Among them, the memory 702 stores instructions executable by at least one processor 701, so that at least one processor 701 executes the method shown in the above embodiments.

[0177] The memory 702 can include a program storage area and a data storage area. Among them, the program storage area can store an operating system and application programs required for at least one function; the data storage area can store data created according to the use of the server, etc. In addition, the memory 702 can include a high-speed random access memory, and can also include a non-transitory memory, such as at least one disk storage device, a flash memory device, or other non-transitory solid-state storage devices. In some alternative embodiments, the memory 702 can optionally include a memory remotely set relative to the processor 701, and these remote memories can be connected to the server through a network. Examples of the above-mentioned network include but are not limited to the Internet, an enterprise intranet, a local area network, a mobile communication network, and combinations thereof.

[0178] The memory 702 can include volatile memory, such as random access memory; the memory can also include non-volatile memory, such as flash memory, a hard disk, or a solid-state drive; the memory 702 can also include a combination of the above types of memory.

[0179] The server further includes a communication interface 703 for the server to communicate with other devices or communication networks.

[0180] The embodiment of the present invention also provides a computer-readable storage medium. The above-mentioned method according to the embodiment of the present invention can be implemented in hardware, firmware, or implemented as a computer code that can be recorded in a storage medium, or implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and downloaded through a network and will be stored in a local storage medium, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state drive, etc.; further, the storage medium can also include a combination of the above-mentioned types of memory. It can be understood that a computer, a processor, a microprocessor controller or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor or hardware, the method shown in the above embodiment is implemented.

[0181] A portion of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the form in which the computer program instruction exists in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc. Accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium that can be accessed by the computer.

[0182] Although the embodiments of the present invention have been described with reference to the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention. Such modifications and variations are all within the scope defined by the appended claims.

Claims

1. A data transmission method, characterized in that, The method includes: Obtaining first protocol information of a remote direct memory access protocol supported by a current server; wherein, the first protocol information includes at least one of a packet retransmission algorithm, whether lossless network support is required, and a network congestion algorithm; Determining target protocol information based on the protocol information that matches between the first protocol information and second protocol information of a remote direct memory access protocol supported by a first target server; wherein, the target protocol information is determined based on the first protocol information and the second protocol information registered by the first target server in a protocol management platform; or, the target protocol information is determined through negotiation between the first protocol information and the first target server; if the matching protocol information includes sub-protocol information of multiple categories, target sub-protocol information is selected from the sub-protocol information of each category, and all the selected target sub-protocol information is used as the target protocol information; Performing data transmission with the first target server based on the remote direct memory access protocol corresponding to the target protocol information.

2. The method according to claim 1, characterized in that, If the target protocol information is determined based on the first protocol information and the second protocol information registered by the first target server in the protocol management platform, then determining the target protocol information based on the protocol information that matches between the first protocol information and second protocol information of a remote direct memory access protocol supported by the first target server includes: Obtaining target identification information of the first target server; wherein, the target identification information includes at least one of the name of the first target server and the network address of a first target network card in the first target server; Sending a query request to the protocol management platform based on the target identification information; wherein, protocol information and corresponding identification information of multiple servers are registered in the protocol management platform; the protocol management platform is configured to, in response to the query request, query the second protocol information supported by the first target server in the protocol information of the multiple servers based on the target identification information; Receiving feedback information from the protocol management platform; If the feedback information from the protocol management platform carries the second protocol information, querying for the protocol information that matches the second protocol information in the first protocol information to determine the target protocol information.

3. The method according to claim 2, characterized in that, Determining the target protocol information based on the protocol information that matches between the first protocol information and second protocol information of a remote direct memory access protocol supported by the first target server further includes: If the feedback information from the protocol management platform does not carry the second protocol information, determining preset protocol information as the target protocol information.

4. The method according to claim 1, wherein If the target protocol information is determined based on the first protocol information and the second protocol information registered by the first target server in the protocol management platform, then the method further includes: Obtaining current identification information of the current server; wherein, the current identification information includes at least one of the name of the current server and the network address of a second target network card in the current server; Send a registration request to the protocol management platform based on the current identification information and the first protocol information; wherein, the protocol management platform is used to respond to the registration request and register the current identification information and the first protocol information, so that other servers can query the first protocol information supported by the current server based on the protocol management platform.

5. The method according to claim 1, wherein If the target protocol information is determined through negotiation between the first protocol information and the first target server, then determining the target protocol information based on the protocol information that matches between the first protocol information and the second protocol information of the remote direct memory access protocol supported by the first target server includes: Generate a first target connection request based on the first protocol information; Send the first target connection request to the first target server; wherein, the first target server is used to respond to the first target connection request and determine the third protocol information based on the protocol information that matches between the first protocol information and the supported second protocol information; Receive the feedback information from the first target server; If the feedback information from the first target server carries the third protocol information, then determine the third protocol information as the target protocol information.

6. The method according to claim 5, characterized in that, The generating a first target connection request based on the first protocol information includes: Generate an initial connection request; Write the first protocol information in a preset message area of the initial connection request to obtain the first target connection request.

7. The method according to claim 5, characterized in that, The determining the target protocol information based on the protocol information that matches between the first protocol information and the second protocol information of the remote direct memory access protocol supported by the first target server further includes: If the feedback information from the first target server does not carry the third protocol information, then determine the preset protocol information as the target protocol information.

8. The method according to claim 1, wherein If the target protocol information is determined through negotiation between the first protocol information and the first target server, then the method further includes: In response to a second target connection request sent by a second target server, parse the second target connection request to obtain the fourth protocol information; Query the protocol information that matches the fourth protocol information in the first protocol information to determine the fifth protocol information; Feed back the fifth protocol information to the second target server, so that the second target server can perform data transmission with the current server based on the remote direct memory access protocol corresponding to the fifth protocol information.

9. A server, characterized in that, Includes: A memory and a processor, which are communicatively connected to each other. The memory stores computer instructions, and the processor executes the computer instructions to execute the data transmission method according to any one of claims [1-8].

10. A computer-readable storage medium, characterized in that, Computer instructions are stored on the computer-readable storage medium, and the computer instructions are used to cause a computer to execute the data transmission method according to any one of claims [1-8].

Citation Information

Patent Citations

  • Network data transmission method, client, server and system

    CN114885042A

  • Message transmission method and device, electronic equipment and storage medium

    CN117596288A

  • Data transmission protocol self-adaption method, system, equipment and medium

    CN117857660A