Data transmission method and device, computer equipment and readable storage medium

By dynamically configuring memory by detecting RDMA startup status and using a dynamic memory management module to configure and monitor unaccessed memory clocks in parallel, the high power consumption problem of RDMA is solved, achieving stability and reliability while reducing power consumption.

CN121996148APending Publication Date: 2026-05-08沐曦集成电路(南京)有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
沐曦集成电路(南京)有限公司
Filing Date
2024-11-07
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

The high efficiency of RDMA leads to a significant increase in power consumption of the network interface card and memory subsystem. Existing technologies that reduce power consumption through dynamic voltage and frequency scaling (DVFS) may affect stability and reliability.

Method used

By detecting the RDMA startup status, the first type of memory in the target device corresponding to the current working mode is dynamically configured to avoid frequent voltage and frequency adjustments. The second type of memory is configured in parallel using a dynamic memory management module, and the clock of memory that has not been accessed for a long time is monitored and turned off.

Benefits of technology

It reduces RDMA power consumption, minimizes unnecessary memory accesses, optimizes data transfer processes, improves cache hit rate, ensures system stability and reliability, and reduces overall energy consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121996148A_ABST
    Figure CN121996148A_ABST
Patent Text Reader

Abstract

The invention relates to a data transmission method and device, computer equipment and a readable storage medium, the data transmission method and device are applied to terminal equipment configured with a dynamic memory management module, and target equipment comprises near-end equipment or far-end equipment in communication connection with the terminal equipment; the method comprises the steps of determining a current working mode of remote direct memory access (RDMA) when it is detected that the RDMA corresponding to target equipment is started, and configuring a first type memory corresponding to the current working mode in the target equipment for the RDMA to perform data transmission. By adopting the method, the power consumption of the RDMA can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a data transmission method, apparatus, computer device, and readable storage medium. Background Technology

[0002] Remote Direct Memory Access (RDMA) is a network communication technology that allows data to be transferred directly between the memory of the sender and receiver without going through the receiver's central processing unit (CPU), significantly improving the efficiency and speed of data transmission.

[0003] However, the high efficiency of RDMA is often accompanied by high energy consumption, especially in large-scale parallel computing and distributed storage systems, where a large number of RDMA operations are frequently triggered, leading to a significant increase in the energy consumption of the Network Interface Card (NIC) and memory subsystem.

[0004] Currently, related technologies reduce the power consumption of RDMA through Dynamic Voltage and Frequency Scaling (DVFS). However, excessive voltage and frequency scaling may affect the stability and reliability of RDMA. Therefore, how to reduce the power consumption of RDMA has become an urgent technical problem to be solved. Summary of the Invention

[0005] Therefore, it is necessary to provide a data transmission method, apparatus, computer device, and readable storage medium that can reduce the power consumption of RDMA in order to address the above-mentioned technical problems.

[0006] In a first aspect, this application provides a data transmission method applied to a terminal device configured with a dynamic memory management module, the method comprising:

[0007] Upon detecting the initiation of Remote Direct Memory Access (RDMA) for the target device, determine the current operating mode of the RDMA; the target device includes a near-end device or a remote device that is communicatively connected to the terminal device.

[0008] Configure the first type of memory in the target device corresponding to the current operating mode for RDMA data transfer.

[0009] In one embodiment, the method further includes:

[0010] Upon detecting that RDMA is powered on, configure the second type of memory in the target device to initiate RDMA.

[0011] In one embodiment, configuring a second type of memory in the target device includes:

[0012] Erase the value of the second type of memory;

[0013] Write the value of the second type of memory to the first preset value.

[0014] In one embodiment, the dynamic memory management module includes multiple sub-modules, each sub-module corresponding one-to-one with the memory in the target device; configuring the second type of memory in the target device includes:

[0015] Configure the second type of memory in the target device in parallel.

[0016] In one embodiment, the method further includes:

[0017] Monitor the first type of memory and / or the third type of memory in the target device; the third type of memory is the memory configured by RDMA during data transmission.

[0018] If the target memory is detected, the clock of the target memory is turned off; the target memory is the memory in the first type of memory and / or the third type of memory that has not received an operation instruction within a preset time period; the operation instructions include write instructions and read instructions.

[0019] In one embodiment, determining the current operating mode of the RDMA includes:

[0020] When RDMA is detected to be powered on, the operating mode of RDMA is periodically acquired until the current operating mode is determined.

[0021] In one embodiment, configuring the first type of memory corresponding to the current operating mode in the target device includes:

[0022] Erase the value of the first type of memory;

[0023] Write the value of the first type of memory to the second preset value.

[0024] Secondly, this application also provides a data transmission method applied to a target device, the target device including a near-end device or a far-end device communicatively connected to a terminal device, the terminal device being configured with a dynamic memory management module; the method includes:

[0025] The terminal device receives a configuration instruction, which is used to configure the first type of memory corresponding to the current working mode in the target device so that the RDMA corresponding to the target device can perform data transmission. The current working mode is the RDMA working mode determined by the terminal device when it detects that RDMA has started.

[0026] Thirdly, this application also provides a data transmission apparatus for use in a terminal device equipped with a dynamic memory management module, the apparatus comprising:

[0027] The determination module is used to determine the current operating mode of RDMA when the Remote Direct Memory Access (RDMA) corresponding to the target device is detected to be started; the target device includes a near-end device or a remote device that is communicatively connected to the terminal device.

[0028] The first configuration module is used to configure the first type of memory corresponding to the current working mode in the target device for RDMA data transmission.

[0029] Fourthly, this application also provides a data transmission apparatus applied to a target device, the target device including a near-end device or a far-end device communicatively connected to a terminal device, the terminal device being configured with a dynamic memory management module; the data transmission apparatus includes:

[0030] The receiving module is used to receive configuration instructions sent by the terminal device. The configuration instructions are used to configure the first type of memory corresponding to the current working mode in the target device so that the RDMA corresponding to the target device can perform data transmission. The current working mode is the RDMA working mode determined by the terminal device when it detects that RDMA has started.

[0031] Fifthly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of any of the above methods.

[0032] Sixthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the above methods.

[0033] In a seventh aspect, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of any of the above methods.

[0034] The aforementioned data transmission method, apparatus, computer equipment, and readable storage medium, where the target device includes a near-end device or a far-end device communicatively connected to the terminal device, can determine the current operating mode of RDMA upon detecting the initiation of Remote Direct Memory Access (RDMA) corresponding to the target device. Therefore, the terminal device can configure the first type of memory corresponding to the current operating mode in the target device to achieve subsequent data transmission via RDMA, without needing to configure all memory in the target device as in related technologies. On one hand, dynamically configuring the first type of memory according to the RDMA operating mode ensures that the configured memory space adapts to the RDMA operating mode, and without requiring configuration of all memory in the target device, reduces the amount of memory configured in the terminal device, thereby reducing RDMA power consumption. On the other hand, it eliminates the need for frequent adjustments to the RDMA voltage and frequency, thus not affecting the stability and reliability of RDMA. Attached Figure Description

[0035] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0036] Figure 1 This is an application environment diagram of a data transmission method in one embodiment;

[0037] Figure 2 This is a flowchart illustrating a data transmission method in one embodiment;

[0038] Figure 3 This is a flowchart illustrating the configuration of a second type of memory in one embodiment;

[0039] Figure 4 This is a schematic diagram of the process for turning off the clock in one embodiment;

[0040] Figure 5 This is a flowchart illustrating the configuration of the first type of memory in one embodiment;

[0041] Figure 6 This is a schematic diagram of a data transmission method in one embodiment;

[0042] Figure 7 This is a structural block diagram of a data transmission device in one embodiment;

[0043] Figure 8 This is a structural block diagram of another data transmission device in one embodiment;

[0044] Figure 9 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0045] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0046] Figure 1 This is an application environment diagram of a data transmission method in one embodiment. The data transmission method provided in this application embodiment can be applied to, for example... Figure 1 In the application environment shown, the target device 101 includes a near-end device 101a or a far-end device 101b. The near-end device 101a and the far-end device 101b are connected through a network 102, which includes an RDMA 103a. The RDMA 103a can be set on the network interface cards of the near-end device 101a and the far-end device 101b respectively.

[0047] ①② indicate that RDMA 103a reads data from the memory space of near-end device 101a and writes it to the memory space of far-end device 101b. ③④ indicate that RDMA 103a receives data from the memory space of far-end device 101b and writes it to the memory space of near-end device 101a.

[0048] Terminal device 103 is equipped with a dynamic memory management module 103a, and can communicate with target device 102 and RDMA 102a respectively. Thus, when terminal device 102 detects that RDMA 103a corresponding to target device 101 has started, it can determine the current operating mode of RDMA 103a and configure the first type of memory corresponding to the current operating mode in target device 101 for subsequent data transmission by RDMA 103a.

[0049] The target device 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, smart in-vehicle devices, projection devices, etc. Portable wearable devices can include smartwatches, smart bracelets, head-mounted displays, etc. Head-mounted displays can be virtual reality (VR) devices, augmented reality (AR) devices, smart glasses, etc. The terminal device 103 can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services; this embodiment is not limited to these limitations.

[0050] Please continue to refer to this. Figure 1 It is understood that the following will take the control of the near-end device 101a by the terminal device 103 as an example. The process of the terminal device 103 controlling the remote device 101b is the same and will not be repeated below.

[0051] Figure 2 This is a flowchart illustrating a data transmission method in one embodiment. In an exemplary embodiment, such as... Figure 2 As shown, a data transmission method is provided, which is applied to... Figure 1 The following explanation will be based on the terminal device in the example, including the following steps S201 to S203.

[0052] S201, upon detecting the activation of Remote Direct Memory Access (RDMA) corresponding to the target device, determine the current operating mode of RDMA; the target device includes a near-end device or a remote device that is communicatively connected to the terminal device.

[0053] In this embodiment, the terminal device can detect whether the RDMA corresponding to the target device is started. Optionally, the terminal device can determine whether the RDMA is started by obtaining the RDMA status bit. For example, when the RDMA status bit is 1, it means that the RDMA has been started, and when the RDMA status bit is 0, it means that the RDMA has not been started. This embodiment is not limited to this.

[0054] Furthermore, upon detecting the initiation of RDMA corresponding to the target device, the terminal device can determine the current operating mode of the RDMA. The current operating mode of the RDMA refers to the current operating mode of the RDMA. The RDMA operating mode can include any one of User Datagram Send (UD Send) mode, Reliable Connection Send (RC Send) mode, or Reliable Connection Write (RCWrite) mode.

[0055] Optionally, if the RDMA corresponding to the target device is detected to be started, the RDMA can send its current operating mode to the terminal device so that the terminal device can determine the current operating mode of the RDMA.

[0056] In one exemplary embodiment, optionally, the terminal device may also periodically acquire the operating mode of the RDMA when it detects that the RDMA is powered on, until the current operating mode is determined.

[0057] Taking a near-end device as an example, please refer to... Figure 1The terminal device can detect whether the RDMA corresponding to the near-end device is powered on, and periodically acquire the RDMA's operating mode when power-on is detected. Understandably, before the RDMA is configured and started, it is in an idle state, and its operating mode is not yet determined; therefore, the terminal device will not acquire the RDMA's operating mode at this time. After the RDMA is configured and started, its operating mode is determined, and it will not change until power is off. Therefore, the terminal device can acquire the current operating mode of the RDMA at this point. Because the RDMA's operating mode can be periodically acquired upon power-on detection until the current operating mode is determined, the current operating mode can be accurately determined, and only one determination is needed after power-on detection.

[0058] Alternatively, the terminal device can determine the current operating mode of the RDMA by reading the registers corresponding to the RDMA. Continuing the example above, when the terminal device detects that the RDMA is powered on, it will periodically read the registers corresponding to the RDMA. When the RDMA is not yet started, the value of the registers corresponding to the RDMA indicates that the RDMA is in an idle state. When the RDMA is started, the value of the registers corresponding to the RDMA indicates the current operating mode of the RDMA. At this time, the terminal device obtains the current operating mode of the RDMA.

[0059] S202, Configure the first type of memory corresponding to the current operating mode in the target device for RDMA data transfer.

[0060] In this embodiment, the terminal device can determine the first type of memory corresponding to the current operating mode in the target device. The first type of memory is the memory that needs to be written to when RDMA is in a certain operating mode.

[0061] Optionally, the terminal device can store the correspondence between different RDMA operating modes and memory spaces in the target device. In this way, based on the current RDMA operating mode and the above correspondence, the first type of memory corresponding to the current operating mode in the target device can be determined.

[0062] For example, please refer to Figure 1 Assuming the memory space of the near-end device includes 50 memory blocks, denoted as memory 1, memory 2, ..., memory 50, if the current working mode of the RDMA corresponding to the near-end device is UD Send mode, and UD Send mode corresponds to memory 10 to memory 20 in the near-end device 101a, then the terminal device can determine that memory 10 to memory 20 in the near-end device are first type memory.

[0063] Optionally, the primary memory type can differ depending on the current operating mode. For example, UD Send and RCSend modes require the same primary memory type, while RC Write mode requires additional secondary memory type on top of either UD Send or RC Send modes.

[0064] Furthermore, the terminal device configures the first type of memory corresponding to the current operating mode in the target device. Optionally, the terminal device can send a configuration command to the target device, which is used to configure the first type of memory in the target device. Configuring the first type of memory may include, but is not limited to, updating the value of the first type of memory, mapping a preset file to the first type of memory, or performing memory protection on the first type of memory, etc., and this embodiment is not limited thereto.

[0065] After configuring the first type of memory, RDMA can function normally for data transfer. Taking a near-end device as an example, RDMA can read data from the near-end device's memory space and write it to the far-end device's memory space, and it can also receive data from the far-end device's memory space and write it to the near-end device's memory space, thus realizing the data transfer process.

[0066] In the aforementioned data transmission method, the target device includes a near-end device or a far-end device that communicates with the terminal device. Since the current operating mode of RDMA can be determined upon detecting the activation of Remote Direct Memory Access (RDMA) corresponding to the target device, the terminal device can configure the first type of memory corresponding to the current operating mode in the target device to achieve subsequent data transmission via RDMA. This eliminates the need to configure all memory in the target device as in related technologies. On one hand, dynamically configuring the first type of memory according to the RDMA operating mode ensures that the configured memory space adapts to the RDMA operating mode, and it reduces the amount of memory configured in the terminal device, thereby reducing RDMA power consumption. On the other hand, it eliminates the need for frequent adjustments to the RDMA voltage and frequency, thus preserving the stability and reliability of RDMA.

[0067] In one exemplary embodiment, optionally, the above data transmission method further includes the following steps:

[0068] Upon detecting that RDMA is powered on, configure the second type of memory in the target device to initiate RDMA.

[0069] In this embodiment, the second type of memory is the memory that must be configured to start RDMA. Optionally, the amount of the first type of memory is less than the total amount of memory in the target device. Continuing the example above, assuming that the memory space of the near-end device includes memory 1 to memory 50, then the second type of memory can be memory 1 to memory 5 in the near-end device.

[0070] The terminal device is aware of the second type of memory in the target device. Therefore, when the terminal device detects that the RDMA corresponding to the target device is powered on, it can directly configure the second type of memory in the target device. The process of configuring the second type of memory is similar to that of configuring the first type of memory, and will not be repeated here.

[0071] In the above embodiments, since only the second type of memory in the target device is configured when the RDMA is detected to be powered on, it is not necessary to configure all the memory in the target device. Only a portion of the second type of memory needs to be configured to start the RDMA. On the one hand, this can reduce the power consumption of the RDMA. On the other hand, configuring the second type of memory after the RDMA is powered on can also prevent X-mode propagation.

[0072] Figure 3 This is a flowchart illustrating the configuration of a second type of memory in one embodiment. In an exemplary embodiment, such as... Figure 3 As shown, the above-mentioned "configure the second type of memory in the target device" includes S301 to S302.

[0073] S301, erase the value of type 2 memory.

[0074] S302, write the value of the second type of memory to the first preset value.

[0075] In this embodiment, when configuring the second type of memory of the target device, the terminal device first erases the value of the second type of memory. Then, the terminal device writes the value of the second type of memory to a first preset value. That is, after erasing the value of the second type of memory, the terminal device updates the value of the second type of memory to the first preset value. The first preset value can be set according to requirements, for example, it can be 0.

[0076] Continuing with the example above, assuming the second type of memory is memory 1 to memory 5 in the near-end device, the terminal device erases the values ​​of memory 1 to memory 5 in the near-end device and writes the value "0" to memory 1 to memory 5 respectively to complete the configuration of the second type of memory.

[0077] In the above embodiments, since the value of the second type of memory can be erased and the value of the second type of memory can be written to the first preset value, the second type of memory in the target device can be configured.

[0078] In one exemplary embodiment, optionally, the dynamic memory management module includes multiple sub-modules, each sub-module corresponding one-to-one with the memory in the target device. That is, each sub-module is communicatively connected to its corresponding memory.

[0079] For example, the dynamic memory management module may include n sub-modules, denoted as sub-module 1 to sub-module n, and the memory space of the target device includes n memory blocks, denoted as memory 1 to memory n. Then, sub-module 1 corresponds to memory 1, sub-module 2 corresponds to memory 2, ..., sub-module n corresponds to memory n, and so on.

[0080] Therefore, the aforementioned "configuring the second type of memory in the target device" can be achieved in the following way:

[0081] Configure the second type of memory in the target device in parallel.

[0082] In this embodiment, the terminal device configures the second type of memory in the target device in parallel. Optionally, the terminal device can control the corresponding second type of memory in parallel through sub-modules. For example, assuming the first type of memory is memory 1 to memory 5 in the near-end device, the terminal device can control memory 1 to memory 5 through sub-modules 1 to 5 respectively to configure memory 1 to memory 5 in the near-end device in parallel.

[0083] In the above embodiments, the efficiency of configuring the second type of memory in the target device is improved because the second type of memory can be configured in parallel.

[0084] Figure 4 This is a schematic diagram of the process of turning off the clock in one embodiment. In an exemplary embodiment, such as... Figure 4 As shown, the above data transmission method also includes S401 to S402.

[0085] S401, monitor the first type of memory and / or the third type of memory in the target device; the third type of memory is the memory configured by RDMA during data transmission by RDMA.

[0086] In this embodiment, the target device's memory space also includes a third type of memory. This third type of memory is memory configured by RDMA during data transmission. In other words, the third type of memory does not require active configuration by the terminal device; instead, it is configured by RDMA when necessary during data transmission.

[0087] Then, the terminal device monitors the first type of memory and / or the third type of memory in the target device to determine whether the target memory exists in the first type of memory and / or the third type of memory. The target memory is memory that has not received any operation instructions within a preset time period, including write and read instructions. In other words, the terminal device monitors the first type of memory and / or the third type of memory to determine whether the target memory has not been written to or read from within the preset time period.

[0088] The terminal device can periodically detect the first type of memory and / or the third type of memory. The preset duration can be set according to requirements.

[0089] S402, if the existence of target memory is detected, the clock of the target memory is turned off; the target memory is the memory of the first type of memory and / or the third type of memory that has not received an operation instruction within a preset time period; the operation instruction includes a write instruction and a read instruction.

[0090] Furthermore, if the terminal device detects the presence of the target memory in the first type of memory and / or the third type of memory, it indicates that the target memory has not been written to or read from for a long time. In this case, the terminal device will turn off the clock of the target memory so that the target memory enters a low-power sleep state.

[0091] Continuing with the example above, taking the first type of memory as memory 10 to memory 20 in the near-end device and the second type of memory as memory 1 to memory 5 in the near-end device as examples, the terminal device can monitor memory 1 to memory 5 and memory 10 to memory 20. If the terminal device detects that memory 1 in the near-end device has not received write and read instructions within a preset time, the terminal device will turn off the clock of memory 1.

[0092] Understandably, after turning off the target memory's clock, if a write or read instruction is detected for the target memory, the target memory's clock can be turned on to quickly wake up the target memory, reduce startup latency, and thus not affect the target memory's response speed.

[0093] In the above embodiments, the third type of memory is the memory configured by RDMA during the data transmission process of RDMA, and the target memory is the memory in the first type of memory and / or the third type of memory that has not received an operation instruction within a preset time period. The operation instructions include write instructions and read instructions. Since the first type of memory and / or the third type of memory in the target device can be monitored, and the clock of the target memory is turned off when the target memory is detected, the power consumption waste caused by the memory not being accessed for a long time can be reduced.

[0094] Figure 5 This is a flowchart illustrating the configuration of a first type of memory in one embodiment. In an exemplary embodiment, such as... Figure 5 As shown, the "configure the first type of memory corresponding to the current working mode in the target device" in S202 above includes S501 to S502.

[0095] S501, erases the value of type 1 memory.

[0096] S502, write the value of the first type of memory to the second preset value.

[0097] In this embodiment, when configuring the first type of memory of the target device, the terminal device first erases the value of the first type of memory. Then, the terminal device writes the value of the first type of memory to a second preset value. That is, after erasing the value of the first type of memory, the terminal device updates the value of the first type of memory to the second preset value. The second preset value is also set according to requirements; for example, it can be 0.

[0098] Continuing with the example above, assuming the first type of memory is memory 10 to memory 20 in the near-end device, the terminal device erases the values ​​of memory 10 to memory 20 in the near-end device's memory space and writes the value "0" to memory 10 to memory 20 respectively to complete the configuration of the first type of memory.

[0099] In the above embodiments, since the value of the first type of memory can be erased and the value of the first type of memory can be written to a second preset value, the first type of memory can be configured efficiently.

[0100] The above description illustrates the application of this data transmission method to a terminal device; the following describes the process of applying this data transmission method to a target device. In an exemplary embodiment, a data transmission method is provided, which is applied to... Figure 1 Taking the target device as an example, the explanation includes the following steps:

[0101] The terminal device receives a configuration instruction, which is used to configure the first type of memory corresponding to the current working mode in the target device so that the RDMA corresponding to the target device can perform data transmission. The current working mode is the RDMA working mode determined by the terminal device when it detects that RDMA has started.

[0102] In this embodiment, the terminal device detects whether the target device's RDMA is enabled, and if RDMA is enabled, determines the current operating mode of the RDMA. Then, the terminal device configures the first type of memory corresponding to the current operating mode in the target device according to the current RDMA operating mode. Specifically, the terminal device can send a configuration command to the target device to configure the first type of memory. Upon receiving the configuration command, the target device configures the first type of memory.

[0103] In the aforementioned data transmission method, the current operating mode is the RDMA operating mode determined when the terminal device detects the start of RDMA. Since the terminal device can receive configuration commands sent by the terminal device, which are used to configure the first type of memory corresponding to the current operating mode in the target device for data transmission via the RDMA, the terminal device only needs to configure the first type of memory corresponding to the current operating mode in the target device to achieve subsequent RDMA data transmission. This eliminates the need to configure all memory in the target device as in related technologies. On one hand, dynamically configuring the first type of memory according to the RDMA operating mode ensures that the configured memory space adapts to the RDMA operating mode, and it reduces the amount of memory configured by the terminal device, thereby reducing RDMA power consumption. On the other hand, it eliminates the need for frequent adjustments to the RDMA voltage and frequency, thus preserving the stability and reliability of the RDMA.

[0104] It is understandable that the process of applying this data transmission method to the target device can refer to the process of applying it to the terminal device described above, and will not be repeated here.

[0105] To more clearly illustrate the data transmission method of this application, this paper combines... Figure 6 Please provide an explanation. Figure 6 This is a schematic diagram of a data transmission method in one embodiment. The target device and the terminal device can execute the data transmission method according to the following process.

[0106] S601, when the terminal device detects that the RDMA of the target device is powered on, it erases the value of the second type of memory in the target device in parallel and writes the value of the second type of memory into a first preset value to configure the second type of memory in the target device in parallel.

[0107] S602, when the RDMA of the target device is detected to be powered on, periodically acquires the operating mode of the RDMA until the RDMA corresponding to the target device is started, and determines the current operating mode of the RDMA.

[0108] S603, erase the value of the first type of memory and write the value of the first type of memory to a second preset value to configure the first type of memory corresponding to the current working mode in the target device.

[0109] S604, monitors the first type of memory and / or the third type of memory in the target device.

[0110] S605: If the target memory is detected, the clock of the target memory is turned off.

[0111] The processes S601 to S605 can be referred to in the above embodiments, and will not be repeated here.

[0112] The following examples illustrate three application scenarios. In one scenario, the target device's RDMA is first initialized upon power-on reset. At this point, the RDMA is not started and is in an idle state. Next, the dynamic memory management module initializes the second type of memory that must be written to and configured to start the RDMA. This configures the second type of memory to prevent X-state propagation caused by reading without writing to it later. The dynamic memory management module configures the second type of memory in parallel. This initialization of only a portion of the target device's memory reduces power consumption, and the parallel approach also reduces initialization time.

[0113] Compared with the initialization of all memory of the target device in the same application scenario and related technologies, the power consumption is reduced from 1100 milliwatts (mW) to 600mW, a reduction of 45%, and the memory initialization time is reduced from 900 nanoseconds (ns) to 520 ns, a reduction of 42%.

[0114] In another application scenario, the RDMA corresponding to the target device undergoes a power-on reset and initialization. At this time, the RDMA is not started and is in an idle state. Next, the dynamic memory management module initializes the second type of memory that must be written to the configuration to start the RDMA. After that, the upper-layer system configures the registers corresponding to the RDMA, the RDMA prepares for operation, the dynamic memory management module obtains the RDMA's operating mode, and configures the first type of memory corresponding to the current operating mode to save power.

[0115] In one application scenario, the RDMA corresponding to the target device undergoes a power-on reset and initialization. At this time, the RDMA is not started and is in an idle state. Next, the dynamic memory management module initializes the second type of memory, which is necessary to start the RDMA. Afterwards, the upper-layer system configures the corresponding RDMA registers, and the RDMA prepares for operation. Assuming the RDMA is configured to operate in RCWrite mode, its function is to read data from the memory space of the near-end device and move it to the memory space of the far-end device, while simultaneously writing data read back from the far-end device into the memory space of the near-end device. In this case, the dynamic memory management module will configure the first type of memory corresponding to RCWrite mode, and then the RDMA will begin operation.

[0116] Furthermore, during data read / write operations in RDMA, some memory locations are frequently accessed, while others may remain unaccessed. The dynamic memory management module monitors the Type I and / or Type III memory in these target devices. When it detects that a target memory block has not been written to or read from for an extended period, it shuts down the target memory's clock to reduce power consumption and automatically enters a low-power sleep state. When a read / write access request for the target memory is detected, it quickly wakes up, reducing startup latency and ensuring that response speed is not affected.

[0117] As can be seen, the target device's memory space is divided into n memory blocks, each with a corresponding identifier and memory attributes. These attributes can be read-only (RO) or read-write (RW). Based on its functional relationship with RDMA, this application divides the target device's memory into three types: Type 1 memory, Type 2 memory, and Type 3 memory. Different memory initialization strategies can be adopted for different types of memory to ensure both functionality and reduced power consumption. Through an adaptive cache management mechanism, since the required memory space varies depending on the RDMA communication mode and data flow characteristics, dynamic adjustments are made to ensure that the allocated memory space adapts to the RDMA operating mode. Furthermore, memory spaces that have not been accessed for a long time automatically enter a low-power sleep state; when a read / write access request is detected, it is quickly woken up to reduce startup latency and ensure that response speed is not affected.

[0118] Thus, firstly, it effectively reduces unnecessary memory accesses, optimizes data transmission processes, and improves cache hit rate, thereby lowering overall energy consumption and contributing to the construction of a greener, more environmentally friendly information technology infrastructure. Secondly, it boasts good versatility, ease of integration and expansion, and full consideration of compatibility with existing RDMA communication environments. It can be seamlessly integrated into existing data centers, cloud computing platforms, and high-performance computing clusters without large-scale hardware modifications. Simultaneously, its modular architecture facilitates subsequent functional expansion and performance optimization, offering excellent maintainability and upgrade potential. Thirdly, it possesses high adaptability and intelligence. By monitoring system status in real time and dynamically adjusting various parameters, it ensures that the system can flexibly adjust according to actual load and communication needs, achieving the optimal performance-to-energy ratio. Fourthly, intelligent dynamic memory management ensures that energy consumption is reduced without sacrificing the efficiency and reliability of RDMA communication, focusing not only on energy saving but also on system performance and stability. Through adaptive cache management mechanisms and different memory initialization strategies, resource allocation is optimized, resource bottlenecks are avoided, and the overall operating efficiency of the system is improved.

[0119] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0120] Based on the same inventive concept, this application also provides a data transmission apparatus for implementing the data transmission method described above. The solution provided by this apparatus is similar to the implementation described in the above method; therefore, specific limitations in one or more data transmission apparatus embodiments provided below can be found in the limitations of the data transmission method described above, and will not be repeated here.

[0121] Figure 7 This is a structural block diagram of a data transmission device in one embodiment. In an exemplary embodiment, such as... Figure 7 As shown, a data transmission device 700 is provided, applied to a terminal device configured with a dynamic memory management module. The data transmission device 700 includes: a determination module 701 and a first configuration module 702, wherein:

[0122] The determination module 701 is used to determine the current operating mode of RDMA when the remote direct memory access (RDMA) corresponding to the target device is detected to be started; the target device includes a near-end device or a remote device that is communicatively connected to the terminal device.

[0123] The first configuration module 702 is used to configure the first type of memory corresponding to the current working mode in the target device for RDMA data transmission.

[0124] In the aforementioned data transmission device, the target device includes a near-end device or a far-end device that communicates with the terminal device. Since the current operating mode of RDMA can be determined upon detecting the activation of Remote Direct Memory Access (RDMA) corresponding to the target device, the terminal device can configure the first type of memory corresponding to the current operating mode in the target device to achieve subsequent data transmission via RDMA. This eliminates the need to configure all memory in the target device as in related technologies. On one hand, dynamically configuring the first type of memory according to the RDMA operating mode ensures that the configured memory space adapts to the RDMA operating mode, and it reduces the amount of memory configured in the terminal device, thereby reducing RDMA power consumption. On the other hand, it eliminates the need for frequent adjustments to the RDMA voltage and frequency, thus preserving the stability and reliability of RDMA.

[0125] Optionally, the data transmission device 700 further includes:

[0126] The second configuration module is used to configure the second type of memory in the target device to start RDMA when RDMA is detected to be powered on.

[0127] Optionally, a second configuration module is used to erase the value of the second type of memory and write the value of the second type of memory to a first preset value.

[0128] Optionally, the dynamic memory management module includes multiple sub-modules, each corresponding one-to-one with the memory in the target device; the second configuration module is used to configure the second type of memory in the target device in parallel.

[0129] Optionally, the data transmission device 700 further includes:

[0130] The monitoring module is used to monitor the first type of memory and / or the third type of memory in the target device; the third type of memory is the memory configured by RDMA during data transmission.

[0131] The shutdown module is used to shut down the clock of the target memory if the target memory is detected; the target memory is the memory of the first type of memory and / or the third type of memory that has not received an operation instruction within a preset time period; the operation instructions include write instructions and read instructions.

[0132] Optionally, the determination module 701 is used to periodically acquire the operating mode of the RDMA when the RDMA is detected to be powered on, until the current operating mode is determined.

[0133] Optionally, the first configuration module 702 is used to erase the value of the first type of memory and write the value of the first type of memory to a second preset value.

[0134] Figure 8 This is a structural block diagram of another data transmission device in one embodiment. In an exemplary embodiment, such as... Figure 8 As shown, a data transmission device 800 is provided for use in a target device. The data transmission device 800 includes a receiving module 801, wherein:

[0135] The receiving module 801 is used to receive configuration instructions sent by the terminal device. The configuration instructions are used to configure the first type of memory corresponding to the current working mode in the target device so that the RDMA corresponding to the target device can perform data transmission. The current working mode is the RDMA working mode determined by the terminal device when it detects that RDMA has started.

[0136] In the aforementioned data transmission device, the current operating mode is the RDMA operating mode determined when the terminal device detects the start of RDMA. Since it can receive configuration commands sent by the terminal device, which configure the first type of memory corresponding to the current operating mode in the target device for data transmission via the target device's RDMA, the terminal device only needs to configure the first type of memory corresponding to the current operating mode in the target device to achieve subsequent RDMA data transmission. This eliminates the need to configure all memory in the target device as in related technologies. On one hand, dynamically configuring the first type of memory according to the RDMA operating mode ensures that the configured memory space adapts to the RDMA operating mode, and it eliminates the need to configure all memory in the target device, reducing the amount of memory configured by the terminal device and thus lowering RDMA power consumption. On the other hand, it avoids frequent adjustments to the RDMA voltage and frequency, ensuring that the stability and reliability of RDMA are not affected.

[0137] Each module in the aforementioned data transmission device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the operations corresponding to each module.

[0138] Figure 9 This is an internal structure diagram of a computer device in one embodiment. In an exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as shown below. Figure 9As shown, this computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores relevant data. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network connection. When the computer program is executed by the processor, it implements a data transmission method.

[0139] Those skilled in the art will understand that Figure 9 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0140] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.

[0141] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps in the above method embodiments.

[0142] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.

[0143] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.

[0144] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0145] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A data transmission method, characterized in that, The method, applied to a terminal device configured with a dynamic memory management module, includes: Upon detecting the initiation of Remote Direct Memory Access (RDMA) corresponding to the target device, the current operating mode of the RDMA is determined; the target device includes a near-end device or a far-end device that is communicatively connected to the terminal device. Configure the first type of memory in the target device corresponding to the current working mode for data transmission by the RDMA.

2. The method according to claim 1, characterized in that, The method further includes: Upon detecting that the RDMA is powered on, the second type of memory in the target device is configured to initiate the RDMA.

3. The method according to claim 2, characterized in that, The configuration of the second type of memory in the target device includes: Erase the value of the second type of memory; Write the value of the second type of memory to the first preset value.

4. The method according to claim 2 or 3, characterized in that, The dynamic memory management module includes multiple sub-modules, each sub-module corresponding one-to-one with the memory in the target device; configuring the second type of memory in the target device includes: The second type of memory in the target device is configured in parallel.

5. The method according to any one of claims 1-3, characterized in that, The method further includes: Monitor the first type of memory and / or the third type of memory in the target device; the third type of memory is the memory configured by the RDMA during data transmission by the RDMA; If a target memory is detected, the clock of the target memory is turned off; the target memory is the memory that has not received an operation instruction within a preset time period in the first type of memory and / or the third type of memory; the operation instruction includes a write instruction and a read instruction.

6. The method according to any one of claims 1-3, characterized in that, Determining the current operating mode of the RDMA includes: When the RDMA is detected to be powered on, the operating mode of the RDMA is periodically acquired until the current operating mode is determined.

7. The method according to any one of claims 1-3, characterized in that, The configuration of the first type of memory corresponding to the current working mode in the target device includes: Erase the value of the first type of memory; Write the value of the first type of memory to the second preset value.

8. A data transmission method, characterized in that, The method is applied to a target device, which includes a near-end device or a far-end device that is communicatively connected to a terminal device, wherein the terminal device is configured with a dynamic memory management module; the method includes: The terminal device receives a configuration instruction, which is used to configure a first type of memory corresponding to the current working mode in the target device, so that the RDMA corresponding to the target device can perform data transmission; the current working mode is the working mode of the RDMA determined by the terminal device when it detects that the RDMA has started.

9. A data transmission device, characterized in that, An apparatus for use in terminal devices equipped with a dynamic memory management module, the apparatus comprising: The determination module is used to determine the current operating mode of the RDMA when the Remote Direct Memory Access (RDMA) corresponding to the target device is detected to be started; the target device includes a near-end device or a far-end device that is communicatively connected to the terminal device. The first configuration module is used to configure the first type of memory corresponding to the current working mode in the target device for data transmission by the RDMA.

10. A data transmission device, characterized in that, Applied to a target device, the target device including a near-end device or a far-end device that is communicatively connected to a terminal device, the terminal device being configured with a dynamic memory management module; The data transmission device includes: The receiving module is configured to receive a configuration instruction sent by the terminal device. The configuration instruction is configured to configure a first type of memory corresponding to the current working mode in the target device for data transmission via the RDMA corresponding to the target device. The current working mode is the RDMA working mode determined by the terminal device when it detects that the RDMA has been started.

11. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 8.

12. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 8.

13. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 8.