RDMA (Remote Direct Memory Access) data operation method, system and equipment

By encapsulating the native RDMA programming API, a simplified data operation interface is provided, which solves the problem of high RDMA operation complexity, improves development efficiency and system stability, and promotes the widespread application of RDMA technology.

CN121349930APending Publication Date: 2026-01-16XIAN AVIATION COMPUTING TECH RES INST OF AVIATION IND CORP OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511408141.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-29
Publication Date
2026-01-16

AI Technical Summary

Technical Problem

Existing RDMA operations are highly complex, making it difficult for developers to effectively utilize their advantages and posing a risk of system instability.

Method used

An encapsulation layer is established by encapsulating the native RDMA programming API, defining simplified data interfaces, including RDMA operation context, remote host attributes, protection domain handles, queue pair handles, and memory region handles. It provides a simple API interface similar to file operations, and the encapsulation layer has built-in thread safety and exception management mechanisms.

Benefits of technology

It lowers the barrier to entry for developers to learn and use RDMA, improves development efficiency, enhances system stability and security, and promotes the popularization of RDMA technology.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121349930A_ABST
    Figure CN121349930A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of computers, and discloses an RDMA (Remote Direct Memory Access) data operation method, system and equipment, the method comprises the following steps: establishing a packaging layer by packaging an RDMA native programming API (Application Program Interface); defining a data interface of the established encapsulation layer; according to the method, the operation is executed in sequence according to the defined data interface of the encapsulation layer, the design of the encapsulation layer considers security factors, such as effective management of resources and processing of abnormal conditions, so that the potential security risk and the risk of data leakage are reduced, and the security of the application is enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, specifically to an RDMA data operation method, system, and device. Background Technology

[0002] With the rapid advancement of information technology, cloud computing and data centers are expanding in scale, becoming crucial infrastructure supporting modern enterprise operations and the development of social informatization. Against this backdrop, the demand for high-speed network communication has also surged. Traditional network communication methods often struggle to meet the real-time requirements of massive data volumes and complex business processing within data centers.

[0003] To address this challenge, RDMA technology emerged. RDMA is a high-performance network communication technology that allows data to be transferred directly from the source host's memory to the destination host's memory within the network, bypassing the intervention of the CPU and kernel protocol stack. This significantly reduces data transmission latency and improves bandwidth utilization. The advent of this technology has brought revolutionary changes to fields such as big data processing and distributed computing.

[0004] While RDMA offers superior performance, its operational complexity remains a bottleneck for current applications. Existing RDMA operations typically rely on low-level programming interfaces (such as RDMA Verbs), which often involve complex network configuration operations, synchronization mechanisms, and error handling strategies. This means that upper-layer application developers must have a deep understanding of the relevant programming interfaces and communication details to effectively use RDMA.

[0005] This specialized requirement has led to significant difficulties for many potential users when using RDMA. Many developers may lack the necessary knowledge to fully utilize RDMA's advantages, or they may avoid it altogether for fear of system instability due to incorrect configuration. Therefore, simplifying the RDMA communication process to make it more user-friendly and easier to learn is crucial for driving technological innovation and widespread application. Summary of the Invention

[0006] The purpose of this invention is to provide a solution that overcomes the shortcomings of the prior art.

[0007] In a first aspect, the present invention provides an RDMA data operation method, comprising: An encapsulation layer is established by encapsulating the native RDMA programming API; Define the data interface of the encapsulation layer; The operations are executed sequentially according to the data interface of the defined encapsulation layer.

[0008] Preferably, the data interface is a data structure for recording RDMA communication operation data, and the data structure comprises an RDMA operation context, a remote host attribute, a protection domain handle, a completion queue handle, a queue pair handle, and a memory region handle.

[0009] Preferably, the fields of the data interface structure body comprise an RDMA operation context, a remote host attribute, a completion queue handle, a queue pair handle, and a memory region handle.

[0010] Preferably, the data interface according to the defined encapsulation layer successively performs operations, and the operations comprise an opening operation, a reading operation, a writing operation, and a closing operation. The opening operation creates and initializes an RDMA connection, including underlying operations such as device query and selection, protection domain allocation, memory region registration, queue pair creation, and initialization. The reading operation obtains data from a remote node, initiates a read request by specifying the address of the target node and the data buffer, and the encapsulation layer processes network protocol conversion, data transmission, and state feedback. The writing operation sends data to a remote node, packages the data into a form suitable for network transmission, and directly copies from a source memory region to a destination memory region using RDMA. The closing operation destroys the RDMA connection, releases associated system resources, and is used to ensure resource recycling and system stability.

[0011] Further, the encapsulation process of the opening operation is as follows: S1, automatically processes device selection, protection domain allocation, memory region registration, queue pair creation, and initialization, and records the data created or updated during the process to the rdma_connection_t structure body. S2, performs operations in the rdma_connection_t structure body through a single interface function.

[0012] Further, the encapsulation process of the reading operation is as follows: L1, receives the rdma_connection_t structure body, data read buffer, and read data length as parameters. L2, updates the queue pair state. L3, sets the work request of the receiving party. L4, waits for a completion event. L5, retrieves data from the receiving queue and copies it to the user-specified read buffer. L6, encapsulates thread safety, error handling, and exception management mechanisms.

[0013] Further, the encapsulation process of the writing operation is as follows: Z1, receives the rdma_connection_t structure, data to be sent and data length as parameters; Z2, packs user data into a format suitable for network transmission; Z3, directly copies data from the source memory area to the memory area of the remote node using the RDMA technology.

[0014] Further, the encapsulation process of the closing operation is as follows: K1, releases the RDMA resources recorded in the rdma_connection_t structure, including the protection domain, the completion queue, the queue pair, and the memory area; K2, terminates the communication connection with the remote node.

[0015] The encapsulation layer design in this embodiment fully considers these factors. In the opening operation (rdma_open), the device selection and protection domain allocation are automatically processed, and relevant data is properly recorded after the operation is completed, ensuring reasonable allocation and effective management of resources. The closing operation (rdma_close) releases the protection domain, completion queue, queue pair, and memory area in sequence, preventing resource leakage. In the read (rdma_read) and write (rdma_write) operations, the encapsulation layer also has built-in thread safety, error handling, and exception management mechanisms. When abnormal situations such as network fluctuations and memory access errors occur, they can be captured and properly handled in a timely manner. For example, in a multi-node communication scenario in a data center, if a node suddenly experiences a network failure during a write operation, the exception management mechanism of the rdma_write interface can interrupt the operation in time, avoid data loss, and feedback error information to the developer, ensuring the integrity of the data and the safety of the application, and reducing the risk of system operation.

[0016] By encapsulating the native RDMA programming API to create a wrapper layer and carefully defining data interfaces, the complex RDMA operation process is highly abstracted, constructing a simple API interface similar to file operations. Previously, developers using RDMA technology needed to deeply understand its underlying implementation details, such as device lookup, protection domain allocation, and memory region registration—a series of tedious operations with extremely high learning costs. With this method, developers only need to call simple interface functions such as `rdma_open`, `rdma_read`, `rdma_write`, and `rdma_close` to easily complete the entire RDMA communication process. Taking distributed storage system development as an example, developers no longer need to spend a lot of time and energy studying the underlying RDMA interfaces and data structures; they can directly use the encapsulated interfaces to quickly achieve efficient data transmission between nodes, greatly shortening the development cycle, accelerating the development process of RDMA applications, enabling more developers to engage in innovation in related fields, and promoting the rapid popularization of RDMA technology in various industries.

[0017] Secondly, the present invention also provides an RDMA data operating system, comprising: The encapsulation layer creation module is used to create an encapsulation layer by encapsulating the native RDMA programming API. The interface definition module is used to define the data interface of the encapsulation layer. The operation execution module is used to execute operations sequentially according to the data interface of the defined encapsulation layer.

[0018] Thirdly, the present invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor performs the steps of the RDMA data operation method described above.

[0019] Compared with the prior art, the present invention has the following beneficial technical effects: This invention provides an RDMA data operation method. By encapsulating the native RDMA programming API into an encapsulation layer, and defining the data interface within this layer to form a file-like API, it significantly lowers the barrier to entry for developers learning and using RDMA, promotes the development and porting of RDMA applications, and facilitates the widespread adoption of RDMA. The encapsulated RDMA interface reduces the amount of low-level code developers need to write, allowing them to focus more time and effort on implementing business logic, thereby improving the overall development efficiency and performance of the application. The encapsulation layer design considers security factors, such as effective resource management and exception handling, thereby reducing potential security risks and the risk of data leakage, and enhancing application security. Attached Figure Description

[0020] Figure 1 RDMA data operation method flowchart in the embodiment of the present application.

[0021] Figure 2 Interface declaration schematic diagram in the embodiment of the present application.

[0022] Figure 3 RDMA interface creation and initialization schematic diagram in the embodiment of the present application.

[0023] Figure 4 RDMA connection interface closing in the embodiment of the present application.

[0024] Figure 5 RDMA data operation system principle schematic diagram in the embodiment of the present application.

[0025] In the figure, 1, encapsulation layer establishment module; 2, interface definition module; 3, operation execution module. DETAILED DESCRIPTION

[0026] In the following, only certain exemplary embodiments are simply described. As those skilled in the art can recognize, the described embodiments can be modified in various different ways without departing from the spirit or scope of the present application. Therefore, the drawings and the description are considered to be essentially exemplary rather than limiting.

[0027] In the description of the present application, it is to be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "upper", "lower", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", "clockwise", "counterclockwise", "axial", "radial", "circumferential" and the like indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present application and simplifying the description, and therefore cannot be understood as indicating or implying that the indicated device or element must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as limiting the present application.

[0028] In addition, the terms "first", "second" are only for the purpose of description, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined with "first", "second" can explicitly or implicitly include one or more of the features. In the description of the present application, the meaning of "a plurality of" is two or more, unless otherwise specifically limited.

[0029] In the present application, unless specifically defined otherwise and limited in the specification, the terms "mount", "connected", "connection", "fixed", and the like, should be construed broadly and do not necessarily require a direct connection or attachment between two elements. These terms can include indirect connections between two elements in the form of an indirect connection through one or more intermediate elements. In addition, a connection between two elements can be a mechanical connection, an electrical connection, or a communication connection. It will be apparent to those skilled in the art that these terms can have the same meaning as the corresponding terms used in the art.

[0030] In the present application, unless specifically defined otherwise and limited in the specification, "on" or "under" of a first feature to a second feature can include direct contact between the first and second features, or indirect contact between the first and second features through another feature between them. Moreover, "on", "above" and "over" of a first feature to a second feature includes the first feature directly above and obliquely above the second feature, or only indicates that the first feature is higher in horizontal height than the second feature. "Under", "below" and "underneath" of a first feature to a second feature includes the first feature directly above and obliquely above the second feature, or only indicates that the first feature is lower in horizontal height than the second feature.

[0031] It should be understood that the terms "comprise" and "include" as used in the specification and the appended claims indicate the presence of the described features, integers, steps, operations, elements, and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.

[0032] It should also be understood that the terms used in the present application specification are only for the purpose of describing specific embodiments and are not intended to limit the present application. As used in the present application specification and the appended claims, the singular forms "a", "an" and "the" are intended to include the plural forms unless the context clearly indicates otherwise.

[0033] It should be further understood that the term "and / or" as used in the present application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations thereof.

[0034] Various structural diagrams according to the disclosed embodiments of the present application are shown in the drawings. These drawings are not drawn to scale, in which certain details are exaggerated for the purpose of clear expression, and certain details can be omitted. The shapes of various regions, layers and their relative size and positional relationship shown in the drawings are only exemplary, and in actuality there can be deviations due to manufacturing tolerances or technical limitations, and a person skilled in the art can additionally design regions / layers with different shapes, sizes, relative positions according to actual needs.

[0035] Embodiment 1 According to Figure 1 As shown in the embodiment 1 provides a method for RDMA data operation, comprising: Step 1, by encapsulating RDMA native programming API to establish an encapsulation layer; Step 2, define the data interface of the established encapsulation layer; Specifically, the data interface is a data structure for recording RDMA communication operation data, and the data structure includes RDMA operation context, remote host attribute, protection domain handle, completion queue handle, queue pair handle and memory region handle.

[0036] Among them, the structure of the data interface includes RDMA operation context, remote host attribute, completion queue handle, queue pair handle and memory region handle.

[0037] Step 3, according to the defined data interface of the encapsulation layer in turn to execute operation.

[0038] Specifically, according to the defined data interface of the encapsulation layer in turn to execute operation, the operation includes opening operation, reading operation, writing operation and closing operation; Among them, the opening operation creates and initializes the RDMA connection, including device query and selection, protection domain allocation, memory region registration, queue pair creation and initialization and other underlying operations; The reading operation obtains data from the remote node, initiates a read request by specifying the address of the target node and the data buffer, and the encapsulation layer handles network protocol conversion, data transmission and state feedback; The writing operation sends data to the remote node, packs the data into a form suitable for network transmission, and uses RDMA to copy from the source memory region to the destination memory region directly; The closing operation destroys the RDMA connection and releases the system resources associated with it, which is used to ensure resource recycling and system stability.

[0039] Among them, the encapsulation process of the opening operation is as follows: S1, automatically handle device selection, protection domain allocation, memory region registration, queue pair creation and initialization, record the data created or updated in the process to the rdma_connection_t structure; S2, operate in the rdma_connection_t structure through a single interface function.

[0040] Among them, the encapsulation process of the reading operation is as follows: L1, receive rdma_connection_t structure, data read buffer and read data length as parameters; L2, update the queue pair state; L3, set the worker request for the receiver; L4, wait for the completion event; L5, retrieve data from the receive queue and copy to the user-specified read buffer; L6, encapsulate thread safety, error handling, and exception management mechanisms.

[0041] The encapsulation process of the write operation is as follows: Z1, receive the rdma_connection_t structure, data to be sent, and data length as parameters; Z2, package user data into a format suitable for network transmission; Z3, use RDMA technology to directly copy data from the source memory area to the memory area of the remote node.

[0042] The encapsulation process of the close operation is as follows: K1, release the RDMA resources recorded in the rdma_connection_t structure, including the protection domain, completion queue, queue pair, and memory region; K2, terminate the communication connection with the remote node.

[0043] In this embodiment, the open operation (rdma_open): This step is the basis for establishing RDMA communication. Through the encapsulated interface, developers only need to call a simple function to start the creation process of the RDMA connection. In this process, the encapsulation layer automatically handles the initialization tasks of the underlying layer, such as device selection, allocation of protection domain (PD), registration of memory region (MR), creation of queue pair (QP), and initialization. In this way, developers do not need to deeply understand the specific implementation details of RDMA, and can quickly establish an efficient point-to-point communication channel.

[0044] Read operation (rdma_read): When data needs to be obtained from the remote node, the encapsulated interface allows developers to operate in a manner similar to "reading a file". This means that developers can specify the address of the target node and the data buffer, and then initiate a read request through the function provided by the encapsulation layer. The encapsulation layer will handle all network protocol conversions, data transmission, and status feedback internally, ensuring correct data reception while keeping the application code simple and easy to understand.

[0045] Write operation (rdma_write): When sending data to a remote node, the encapsulated interface provides a "write file" mode. Developers only need to prepare the data to be sent and pass it to the specified destination through the send function provided by the encapsulation layer. The encapsulation layer will be responsible for packaging the data into a form suitable for network transmission and taking advantage of RDMA to copy directly from the source memory area to the destination memory area without the mediation of the CPU, thus achieving high-speed data transmission.

[0046] Close operation (rdma_close): Similar to closing a file, when RDMA communication is no longer needed, the encapsulated interface provides an explicit command to destroy the RDMA connection. This includes terminating all active network transmissions and releasing all associated system resources such as queue pairs, protection domains, etc. This process ensures system stability and effective resource recovery, avoiding potential memory leaks and security risks.

[0047] In this embodiment, four groups of interface functions are designed, which are: rdma_open(): Create and initialize RDMA connection; rdma_read(): Perform RDMA read operation; rdma_write(): Perform RDMA write operation; rdma_close(): Close RDMA connection and release resources.

[0048] As shown in Figure 2 , a simplified declaration of the entire interface is shown (assuming it is an RDMA encapsulation for C language, and its file is named rdma_api.h).

[0049] Within this framework, a structure named rdma_connection_t is defined as a data interface declaration. This structure contains the context of RDMA operations, the properties of remote connections, protection domain (PD) handles, completion queue (CQ) handles, queue pair (QP) handles, memory region (MR) handles, and other necessary RDMA-related resources. These data are necessary for creating RDMA connections and performing communication. Once the structure is initialized through the rdma_open() function, the communication connection establishment information is recorded, and subsequent other interface functions can use this structure as a file handle to complete various RDMA operations.

[0050] Subsequently, four interface functions are declared, corresponding to the opening, reading, writing, and closing operations of RDMA.

[0051] The `rdma_open` interface corresponds to the RDMA open operation, encapsulating the RDMA resource allocation, initialization, and communication connection establishment process. When conventionally using the Verbs interface for communication initialization and connection establishment, the required steps are quite cumbersome, such as... Figure 4 As shown, the process typically includes device query and selection, PD allocation, data buffer allocation, memory buffer registration, QP generation, QP status update, and connection establishment via Socket or RDMA_CM. This involves the initialization and updating of numerous Verbs interface data structures. Upper-layer application developers need a detailed understanding of the entire process and the interface functions and data interfaces for each step. This invention encapsulates the above operations, implementing the entire process through a single interface function `rdma_open()`. All related data initialization and updates are implemented within the interface, significantly reducing application development difficulty for users. The specific encapsulation process includes: First, the system retrieves a list of available RDMA devices using the `ibv_get_device_list()` interface. Then, it calls `ibv_open_device()` to specify the target device and obtain the `ibv_context` object. This context object serves as the core handle for device operations. The `ibv_query_device()` function allows querying device characteristic parameters (including maximum number of QPs, memory registration limits, etc.) to verify whether the device meets the application-layer functional requirements. This sequence of operations completes the initialization of the RDMA device and context acquisition.

[0052] With the equipment ready, basic communication resources need to be constructed. A protection domain is created using `ibv_alloc_pd()` to define the boundaries of memory protection, restricting access permissions for resources such as QP and MR, ensuring that RDMA operations only occur within the specified memory area. Then, `ibv_reg_mr()` is called to register the application memory buffer, mapping user-space memory to an RDMA-accessible area and generating an MR object containing the memory key (MR Key). Based on this, a QP is created using `ibv_create_qp()`. This core communication unit includes a transmit queue (SQ) and a receive queue (RQ), serving as the control and scheduling center for data transmission.

[0053] During the connection establishment phase, state synchronization between the two ends is required. The communicating parties exchange key metadata via a control channel (such as TCP / IP), including parameters such as QP address, local / remote address, queue depth, and QP type. Finally, ibv_modify_qp() is used to transition the QP state to the RTS (Ready to Send) state, completing the final confirmation of the communication link.

[0054] The above packaging process realizes a complete process from physical device initialization to logical communication channel establishment, and lays a foundation for subsequent RDMA data transmission.

[0055] The rdma_read interface corresponds to an RDMA read operation, and realizes reading of communication data of a remote node. The interface includes three parameters, which are respectively an rdma_connection_t structure, a data read buffer, and a read data length. The interface encapsulates processes including updating a QP state, setting a sender's work request (WR), waiting for a complete event (CE), and the like, to complete retrieving data from a receiving queue of a receiver and copying the data to the data read buffer. In the entire process, operations including thread safety, error, and exception management are encapsulated.

[0056] The rdma_write interface corresponds to an RDMA write operation, and realizes sending of communication data. The interface includes three parameters, which are respectively an rdma_connection_t structure, data to be sent, and a data length. The interface obtains required communication information such as a remote host attribute and a QP from the structure, and encapsulates a complete data sending process including updating a QP state, sending data, setting a sender's WR, waiting for a CE, and reading an ACK to ensure that the data is successfully sent to a remote node.

[0057] The rdma_close interface corresponds to an RDMA close operation, and realizes destruction of an RDMA connection and release of resources. The interface includes only one parameter of the rdma_connection_t structure, and the interface obtains communication connection and related resource information from the structure, and encapsulates operation processes including destroying a QP, destroying a CQ, releasing an MR, releasing a PD, closing a device, and releasing a device list, to realize closing of the RDMA communication connection and release of the resources.

[0058] In summary, the embodiment provides an RDMA data operation method, establishes an encapsulation layer by encapsulating an RDMA native programming API, defines a data interface in the encapsulation layer, forms an API interface similar to a file operation, greatly reduces a threshold for developers to learn and use RDMA, promotes development and transplantation of RDMA application, promotes popularization of RDMA application, and reduces an amount of underlying code that needs to be written by the developers after the RDMA interface is packaged, so that the developers can invest more time and energy into implementation of business logic, thereby improving development efficiency and performance of the entire application program. The design of the encapsulation layer takes into account safety factors such as effective management of resources and processing of abnormal situations, thereby reducing potential safety risks and risks of data leakage, and enhancing safety of the application.

[0059] Embodiment 2 The embodiment 2 also provides an RDMA data operation system, comprising: The encapsulation layer establishing module 1 is configured to establish an encapsulation layer by encapsulating an RDMA native programming API. The interface defining module 2 is configured to define a data interface of the established encapsulation layer. The operation executing module 3 is configured to sequentially execute operations according to the defined data interface of the encapsulation layer.

[0060] Embodiment 3 The embodiment of the present application provides a computer device, which comprises a memory, a processor and a computer program stored in the memory and capable of running on the processor, and the processor implements the steps of the RDMA data operation method when executing the computer program. The memory can include a memory, such as a high-speed random memory, and can also include a non-volatile memory, such as at least one disk memory. The processor, the network interface and the memory are connected to each other through an internal bus, which can be an industry standard architecture bus, a peripheral component interconnect standard bus, an extended industry standard architecture bus, etc. The bus can be divided into an address bus, a data bus and a control bus. The memory is used to store programs, and specifically, the programs can include program codes, and the program codes include computer operation instructions. The memory can include a memory and a non-volatile memory, and provides instructions and data for the processor.

[0061] The basic principles, main features and advantages of the present application are shown and described above. It should be understood by those skilled in the art that the present application is not limited by the above-mentioned embodiments, and the above-mentioned embodiments and descriptions in the specification are only preferred examples of the present application and are not intended to limit the present application. Without departing from the spirit and scope of the present application, various changes and improvements can be made to the present application, and these changes and improvements all fall within the scope of the present application. The scope of protection of the present application is defined by the appended claims and their equivalents.

Claims

1. A method of RDMA data operation, the method comprising: The application relates to a method for encapsulating RDMA native programming API. An encapsulation layer is established by encapsulating RDMA native programming API; A data interface of the established encapsulation layer is defined; Operations are sequentially executed according to the defined data interface of the encapsulation layer.

2. The method of claim 1, wherein, The data interface is a data structure for recording RDMA communication operation data, and the data structure comprises an RDMA operation context, remote host attributes, a protection domain handle, a completion queue handle, a queue pair handle and a memory region handle.

3. The method of claim 1, wherein, The fields of the structure of the data interface comprise an RDMA operation context environment, remote host attributes, a completion queue handle, a queue pair handle and a memory region handle.

4. The method of claim 1, wherein, The operations comprise opening operation, reading operation, writing operation and closing operation; In the opening operation, an RDMA connection is created and initialized, and comprises underlying operations such as device query and selection, protection domain allocation, memory region registration, queue pair creation and initialization; In the reading operation, data is obtained from a remote node, a reading request is initiated by specifying the address of the target node and a data buffer, and the encapsulation layer processes network protocol conversion, data transmission and state feedback; In the writing operation, data is sent to a remote node, the data is packaged into a form suitable for network transmission, and the data is directly copied from a source memory region to a destination memory region by using RDMA; In the closing operation, the RDMA connection is destroyed, and system resources associated with the RDMA connection are released, so as to ensure resource recycling and system stability.

5. The method of claim 4, wherein, The encapsulation process of the opening operation is as follows: S1, automatically processing device selection, protection domain allocation, memory region registration, queue pair creation and initialization, and recording data created or updated in the rdma_connection_t structure; S2, performing operations in the rdma_connection_t structure through a single interface function.

6. The method of claim 4, wherein, The encapsulation process of the reading operation is as follows: L1, receiving the rdma_connection_t structure, a data reading buffer and a reading data length as parameters; L2, updating a queue pair state; L3, setting a work request of a receiving party; L4, waiting for a completion event; L5, retrieving data from a receiving queue and copying the data to a user-specified reading buffer; L6, encapsulating a thread safety, error processing and exception management mechanism.

7. The method of claim 4, wherein, The encapsulation process of the writing operation is as follows: Z1, receiving the rdma_connection_t structure, to-be-sent data and a data length as parameters; Z2, packaging user data into a form suitable for network transmission; Z3, directly copying data from a source memory region to a memory region of a remote node by using RDMA technology.

8. The method of claim 4, wherein, The encapsulation process of the closing operation is as follows: K1, releasing RDMA resources recorded in the rdma_connection_t structure, including a protection domain, a completion queue, a queue pair and a memory region; K2, terminating a communication connection with a remote node.

9. An RDMA data operation system, comprising: The application further relates to a device for encapsulating RDMA native programming API. An encapsulation layer is established by encapsulating RDMA native programming API; A data interface of the established encapsulation layer is defined; Operations are sequentially executed according to the defined data interface of the encapsulation layer. An operation execution module is configured to sequentially execute operations according to the data interfaces of the defined encapsulation layers.

10. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, The processor performs the steps of the RDMA data operation method of any one of claims 1-8.