Memory access method, apparatus, device, and storage medium
Patent Information
- Application Number
- CN202611164891.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-03
- Publication Date
- 2026-10-30
AI Technical Summary
[0004]然而,传统技术中,固定的聚合度阈值无法满足多变的网络环境,当网络拥堵时,高聚合度阈值会导致发送端无法及时获取确认报文,进而影响数据传输的时效性
[0053]上述内存访问方法、装置、计算机设备、计算机可读存储介质和计算机程序产品,接收发送端发送的数据包;所述数据包是基于所述接收端的内存访问请求生成的;所述数据包中包括所述数据包的发送时间戳;根据所述发送时间戳,确定所述数据包的单向延迟时间,并基于所述单向延迟时间,更新所述接收端和所述发送端之间的网络状态指标值;根据更新后的网络状态指标值调整聚合度阈值,得到调整后的所述聚合度阈值;若所述聚合度满足调整后的所述聚合度阈值,生成确认报文,并将所述确认报文返回给所述发送端。采用本方法,通过在数据包中添加发送时间戳,能够计算每一数据包的单向延迟时间,从而根据单向延迟时间,确定能够表征当前网络状态的网络状态指标值。然后,通过更新后的网络状态指标值调整聚合度阈值,实现了自适应调整聚合度阈值,进而基于调整后的聚合度阈值控制确认报文的发送,实现了基于网络状态控制确认报文的发送,使得接收端能够按需进行确认报文的发送,避免了网络资源的浪费,提高了数据传输效率,进而提高了内存访问效率。
Smart Images

Figure CN123019975A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data transmission technology, and in particular to a memory access method, apparatus, device, and storage medium. Background Technology
[0002] Remote direct memory access is a direct memory access technology that transfers data directly from the memory of one computer (receiving end) to another computer (receiving end) without the intervention of the operating systems of both parties.
[0003] In traditional technology, the receiving end receives data packets sent by the sending end and determines whether the received data packets meet a preset, fixed aggregation threshold. If the received data packets meet the aggregation threshold, the receiving end generates an acknowledgment message and sends it back to the sending end. The sending end then proceeds with the next round of data packet transmission based on the acknowledgment message.
[0004] However, in traditional technologies, a fixed aggregation threshold cannot meet the demands of varying network environments. When the network is congested, a high aggregation threshold can prevent the sender from receiving acknowledgment messages in a timely manner, thus affecting the timeliness of data transmission. Conversely, when the network is idle, a low aggregation threshold can cause the receiver to continuously send acknowledgment messages, resulting in a waste of network resources. Summary of the Invention
[0005] Therefore, it is necessary to provide a memory access method, apparatus, computer device, computer-readable storage medium, and computer program product to address the aforementioned technical problems.
[0006] In a first aspect, this application provides a memory access method, which is applied at a receiving end, and the method includes:
[0007] Receive data packets sent by the sending end; the data packets are generated based on the memory access requests of the receiving end; the data packets include the sending timestamp of the data packets;
[0008] Based on the sending timestamp, the one-way delay time of the data packet is determined, and the network status indicator value between the receiving end and the sending end is updated based on the one-way delay time.
[0009] The aggregation threshold is adjusted based on the updated network status index value to obtain the adjusted aggregation threshold.
[0010] If the aggregation degree meets the adjusted aggregation degree threshold, an acknowledgment message is generated and returned to the sending end.
[0011] In one embodiment, determining the one-way delay time of the data packet based on the sending timestamp includes:
[0012] Record the timestamp of the received data packet, and calculate the one-way delay time of the data packet based on the timestamp of the received data packet and the timestamp of the sent data packet.
[0013] In one embodiment, updating the network status indicator value between the receiver and the sender based on the one-way delay time includes:
[0014] The one-way delay time is smoothed according to a preset smoothing algorithm to obtain the smoothed one-way delay time.
[0015] The smoothed one-way delay time is determined as the updated network state index value between the sender and the receiver.
[0016] In one embodiment, adjusting the aggregation threshold based on the updated network state index value to obtain the adjusted aggregation threshold includes:
[0017] Determine whether the updated network status indicator value is within the preset network status indicator range;
[0018] If the updated network status index value is within the network status index range, then the aggregation degree threshold is maintained, and the adjusted aggregation degree threshold is obtained.
[0019] If the updated network status index value is less than the minimum value of the network status index range, then the aggregation degree threshold is adjusted upwards to obtain the adjusted value.
[0020] If the updated network status index value is greater than the maximum value of the network status index range, then the aggregation degree threshold is adjusted downwards to obtain the adjusted aggregation degree threshold.
[0021] In one embodiment, generating an acknowledgment message if the aggregation degree meets the adjusted aggregation degree threshold includes:
[0022] If the aggregation degree meets the adjusted aggregation degree threshold, the target confirmation mechanism is determined according to the sequence number in each data packet in the current transmission round, and the transmission result is determined according to the sequence number and the order of arrangement; the target confirmation mechanism is used to instruct the receiving end to generate a target type confirmation message;
[0023] Based on the target confirmation mechanism and the transmission result, a confirmation message is generated.
[0024] In one embodiment, the mechanism for determining the target confirmation based on the sequence number of each data packet in the current transmission round includes:
[0025] If the sequence numbers in each data packet in the current transmission round are out of order, then the target confirmation mechanism is determined to be a selective confirmation mechanism.
[0026] If the sequence numbers in each data packet in the current transmission round are not out of order, then the target confirmation mechanism is determined to be a cumulative confirmation mechanism.
[0027] In one embodiment, determining the transmission result based on the sequence number and arrangement order includes:
[0028] If the sequence numbers are not in random order, then the largest consecutive sequence number is determined among the sequence numbers according to the arrangement order, and the largest consecutive sequence number is determined as the transmission result;
[0029] If the sequence numbers are out of order, then each sequence number will be determined as the transmission result.
[0030] In one embodiment, generating an acknowledgment message based on the target acknowledgment mechanism and the transmission result includes:
[0031] If the target confirmation mechanism is a cumulative confirmation mechanism and the transmission result is the maximum consecutive sequence number, then an confirmation message is generated based on the maximum consecutive sequence number.
[0032] If the target confirmation mechanism is a selective confirmation mechanism and the transmission result is each of the sequence numbers, then an confirmation message is generated according to each of the sequence numbers.
[0033] Secondly, this application also provides a memory access device, which is applied at a receiving end, and the device includes:
[0034] A receiving module is used to receive data packets sent by a sending end; the data packets are generated based on the memory access requests of the receiving end; the data packets include a sending timestamp of the data packets;
[0035] The determination module is used to determine the one-way delay time of the data packet based on the sending timestamp, and update the network status indicator value between the receiving end and the sending end based on the one-way delay time.
[0036] An adjustment module is used to adjust the aggregation threshold based on the updated network status index value to obtain the adjusted aggregation threshold.
[0037] The generation module is used to generate an acknowledgment message and return the acknowledgment message to the sending end if the aggregation degree meets the adjusted aggregation degree threshold.
[0038] Thirdly, 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 perform the following steps:
[0039] Receive data packets sent by the sending end; the data packets are generated based on the memory access requests of the receiving end; the data packets include the sending timestamp of the data packets;
[0040] Based on the sending timestamp, the one-way delay time of the data packet is determined, and the network status indicator value between the receiving end and the sending end is updated based on the one-way delay time.
[0041] The aggregation threshold is adjusted based on the updated network status index value to obtain the adjusted aggregation threshold.
[0042] If the aggregation degree meets the adjusted aggregation degree threshold, an acknowledgment message is generated and returned to the sending end.
[0043] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the following steps:
[0044] Receive data packets sent by the sending end; the data packets are generated based on the memory access requests of the receiving end; the data packets include the sending timestamp of the data packets;
[0045] Based on the sending timestamp, the one-way delay time of the data packet is determined, and the network status indicator value between the receiving end and the sending end is updated based on the one-way delay time.
[0046] The aggregation threshold is adjusted based on the updated network status index value to obtain the adjusted aggregation threshold.
[0047] If the aggregation degree meets the adjusted aggregation degree threshold, an acknowledgment message is generated and returned to the sending end.
[0048] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, performs the following steps:
[0049] Receive data packets sent by the sending end; the data packets are generated based on the memory access requests of the receiving end; the data packets include the sending timestamp of the data packets;
[0050] Based on the sending timestamp, the one-way delay time of the data packet is determined, and the network status indicator value between the receiving end and the sending end is updated based on the one-way delay time.
[0051] The aggregation threshold is adjusted based on the updated network status index value to obtain the adjusted aggregation threshold.
[0052] If the aggregation degree meets the adjusted aggregation degree threshold, an acknowledgment message is generated and returned to the sending end.
[0053] The aforementioned memory access method, apparatus, computer device, computer-readable storage medium, and computer program product receive data packets sent by a sending end; the data packets are generated based on memory access requests from the receiving end; the data packets include a sending timestamp of the data packets; based on the sending timestamp, the one-way delay time of the data packets is determined, and based on the one-way delay time, the network status indicator value between the receiving end and the sending end is updated; the aggregation degree threshold is adjusted according to the updated network status indicator value to obtain the adjusted aggregation degree threshold; if the aggregation degree meets the adjusted aggregation degree threshold, an acknowledgment message is generated and the acknowledgment message is returned to the sending end. Using this method, by adding a sending timestamp to the data packets, the one-way delay time of each data packet can be calculated, thereby determining a network status indicator value that characterizes the current network state based on the one-way delay time. Then, by adjusting the aggregation degree threshold through the updated network status index value, adaptive adjustment of the aggregation degree threshold is achieved. Subsequently, the sending of acknowledgment messages is controlled based on the adjusted aggregation degree threshold, realizing network status-based control of acknowledgment message sending. This enables the receiving end to send acknowledgment messages as needed, avoiding waste of network resources, improving data transmission efficiency, and thus improving memory access efficiency. Attached Figure Description
[0054] 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.
[0055] Figure 1 This is a diagram illustrating the application environment of a memory access method in one embodiment.
[0056] Figure 2 This is a flowchart illustrating a memory access method in one embodiment;
[0057] Figure 3 This is a schematic diagram of the system initialization state in an exemplary embodiment;
[0058] Figure 4 This is a flowchart illustrating the process of determining updated network status indicator values in one embodiment.
[0059] Figure 5 This is a schematic diagram of the measurement phase in an exemplary embodiment;
[0060] Figure 6 This is a flowchart illustrating the process of adjusting the aggregation degree threshold in one embodiment;
[0061] Figure 7 This is a schematic diagram of link idle status confirmation information in one embodiment;
[0062] Figure 8 This is a schematic diagram of link congestion status confirmation information in one embodiment;
[0063] Figure 9 This is a flowchart illustrating the process of generating an acknowledgment message in one embodiment;
[0064] Figure 10 This is a flowchart illustrating the target confirmation mechanism in one embodiment;
[0065] Figure 11 This is a flowchart illustrating the process of determining the transmission result in one embodiment;
[0066] Figure 12 This is a flowchart illustrating the process of generating an acknowledgment message in another embodiment;
[0067] Figure 13 This is a schematic diagram illustrating selective acknowledgment triggered by packet loss in one embodiment;
[0068] Figure 14 This is a schematic diagram illustrating selective confirmation triggering retransmission in one embodiment;
[0069] Figure 15 This is a structural block diagram of a memory access device in one embodiment;
[0070] Figure 16 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0071] 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.
[0072] It should be noted that the terms "first," "second," etc., used in this application can be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from the second element. The terms "comprising" and "having," and any variations thereof, used in this application, are intended to cover non-exclusive inclusion. The term "multiple" used in this application refers to two or more. The term "and / or" used in this application refers to one of the embodiments, or any combination of multiple embodiments.
[0073] The memory access method provided in this application can be applied to, for example, Figure 1 The memory access system 100 shown includes a sender 110 and a receiver 120. The receiver 120 accesses the memory of the sender 110 via remote direct memory access technology to obtain data from the sender 110's memory. The receiver 120 initiates a memory access request to the sender 110. In response to the memory access request from the sender 110, the receiver 120 sends a data packet to the sender 110 to display the data in the sender 110's memory and to transfer the data in memory. Both the sender 110 and the receiver 120 are computer devices, and they transmit data over a network.
[0074] Remote Direct Memory Access (RDMA) is a direct memory access technology that transfers data directly from the memory of one computer (receiving end) to the memory of another computer (receiving end) without the intervention of the operating systems of either computer. Due to its significant characteristics of low latency and high throughput, RDMA technology is widely used in cutting-edge fields such as high-performance computing, distributed storage, and cloud computing.
[0075] In traditional technology, the receiving end receives data packets sent by the sending end and determines whether the received data packets meet a preset, fixed aggregation threshold. If the received data packets meet the aggregation threshold, the receiving end generates an acknowledgment message and sends it back to the sending end. The sending end then proceeds with the next round of data packet transmission based on the acknowledgment message.
[0076] Specifically, in RDMA data transmission, reliable data transmission relies primarily on acknowledgment messages. The receiving end constructs an acknowledgment message and sends it to the sending end, informing the sending end of the details of the received data. To reduce the number of acknowledgment messages and lower network overhead, aggregated acknowledgment is often used. When the aggregation degree of received data packets exceeds a preset fixed aggregation degree threshold, the receiving end generates an aggregated acknowledgment message and sends it to the sending end. The purpose of this aggregation method is to reduce the additional network load caused by frequently sending individual acknowledgment messages through batch acknowledgment, thereby improving the utilization efficiency of network resources to a certain extent.
[0077] However, this traditional acknowledgment mechanism using a fixed aggregation degree threshold has many limitations and is difficult to adapt to complex and dynamic network environments. In congested network scenarios, a fixed high aggregation degree acknowledgment mechanism leads to a significant increase in acknowledgment latency. Because it requires waiting for more data packets to meet the aggregation conditions before sending an acknowledgment message, the sender cannot obtain timely feedback from the receiver and cannot respond quickly to network congestion. When network congestion and packet loss occur, the excessively high aggregation degree acknowledgment mechanism cannot promptly feed back packet loss information to the sender, preventing the sender from quickly initiating a fast retransmission mechanism, thus severely affecting the timeliness and reliability of data transmission. Furthermore, high aggregation degree acknowledgment information can cause significant errors in round-trip time (RTT) measurement, leading to false retransmissions. The sender makes decisions based on inaccurate RTTs, mistakenly believing data packets are lost and retransmitting them, further exacerbating network congestion. In idle network conditions, a fixed low aggregation degree acknowledgment mechanism also has drawbacks. The receiver frequently sends a large number of acknowledgment messages; these redundant messages consume additional network bandwidth resources, causing unnecessary network overhead and reducing the effective utilization of network bandwidth.
[0078] In traditional RDMA protocols, the sending end has the ability to calculate the Round-Trip Time (RTT) in real time and dynamically adjust the packet transmission rate based on the calculated RTT to adapt to changes in network conditions. However, the receiving end lacks effective means of sensing link status and the ability to effectively monitor and analyze the real-time network status. Therefore, it cannot dynamically adjust the aggregation degree of received acknowledgment information according to the actual link status, i.e., it cannot flexibly control the transmission frequency of acknowledgment information. This results in a lack of effective adaptability between the receiving end's acknowledgment mechanism and the network status throughout the data transmission process, affecting the overall efficiency and reliability of RDMA transmission.
[0079] This application provides a memory access method that calculates the one-way delay time of each data packet by adding a sending timestamp. Based on this one-way delay time, a network state indicator value representing the current network state is determined. Then, the aggregation degree threshold is adjusted using the updated network state indicator value, achieving adaptive adjustment of the aggregation degree threshold. This adjusted aggregation degree threshold is then used to control the sending of acknowledgment messages, enabling network state-based control of acknowledgment message sending. This allows the receiving end to send acknowledgment messages as needed, avoiding waste of network resources, improving data transmission efficiency, and ultimately improving memory access efficiency.
[0080] Before introducing specific embodiments of the present invention, the technical terms involved in the present invention will be explained:
[0081] RDMA: Remote Direct Memory Access. A technology that allows data transfer directly between computer memory, enabling one computer system (local node) to directly access the memory of another computer system (remote node) without the need for multiple data copies and complex buffering processes by the operating system kernel, as is the case in traditional network communication.
[0082] QP (queue pair): A pair of receive and send queues, consisting of a receive queue (RQ) and a send queue (SQ), used by software to submit receive buffers and send requests to the hardware. The QP is numbered QPN.
[0083] SACK (Selective Acknowledgment): Selective acknowledgment is used to acknowledge only received data segments during data transmission, rather than the traditional cumulative acknowledgment mechanism.
[0084] ACK (Acknowledgment): Cumulative acknowledgment, used to notify the sender that data has been successfully received.
[0085] RTT (Round-Trip Time): The time it takes for data to travel from the sender to the receiver and back to the sender.
[0086] One-Way Delay (OWD): refers only to the one-way propagation time of data from the sender to the receiver (excluding the return).
[0087] PSN (Packet Sequence Number): In RDMA data transmission, it is used to identify the order of each data packet. The sender assigns a unique PSN to each sent data packet, and the receiver uses the PSN to determine whether the data packets arrived in order and to detect packet loss, out-of-order delivery, etc.
[0088] In one exemplary embodiment, such as Figure 2 As shown, a memory access method is provided, which is applied to... Figure 1 Taking the receiver 120 (hereinafter referred to as the receiver) as an example, the explanation includes the following steps 202 to 208. Wherein:
[0089] Step 202: Receive the data packet sent by the sending end.
[0090] The data packets are generated based on the memory access requests from the receiving end; the data packets include the timestamp of the data packet's transmission.
[0091] In implementation, when the receiving end needs to access the sending end's memory data, it sends a memory access request to the sending end. Based on the memory access request, the sending end determines multiple data packets to be sent. Then, the sending end adds a sending timestamp to the header of each data packet, obtaining a data packet. The sending end sends the data packet to the receiving end according to the sending timestamp. The receiving end receives the data packet. The header of this data packet includes the sending timestamp, which indicates when the sending end sent the data packet.
[0092] Specifically, when the receiving end needs to obtain or access the sending end's memory data, the receiving end constructs a memory access request for the sending end based on the sending end's address and sends the memory access request to the sending end. Based on the memory access request, the sending end determines the data to be transmitted in its memory and segments the data into multiple data packets. The sending end embeds a precise transmission timestamp in the header of each data packet. The sending end sends the data packets carrying the transmission timestamps to the receiving end according to a preset transmission protocol and scheduling strategy. The receiving end receives the data packets through the network and determines the transmission timestamp in the packet header.
[0093] In an optional embodiment, when the memory access system starts and establishes an RDMA connection, the sending and receiving ends perform initialization operations on the OWD measurement module and the dynamic aggregation degree calculation model, respectively. Specifically, the receiving end sets an initial aggregation degree threshold. This initial aggregation degree threshold serves as the confirmation trigger condition for the initial stage of data transmission and can be set to a default value according to the actual application scenario requirements. Figure 3 This is a schematic diagram of the system initialization state in an exemplary embodiment. For example... Figure 3 As shown, the initial aggregation threshold is set to 3 data packets, meaning an acknowledgment operation is triggered every 3 data packets received. Specifically, in... Figure 3 In this context, PSN is the sequence number of the data packet, and ACK is the acknowledgment message under the cumulative acknowledgment mechanism. Simultaneously, the receiving end sets an average delay time baseline (OWD baseline value). This baseline value serves as a reference for subsequent judgments of network status changes, and its value is typically determined based on historical statistical data or empirical values of the network environment (not necessarily equal to...). Figure 4 (OWD measured in the middle). In addition, the sending and receiving ends will initialize relevant storage units to record data information such as timestamps and aggregation thresholds, and start relevant timing and monitoring threads to ensure that each module can operate normally and prepare for subsequent data transmission and dynamic adjustment processes.
[0094] After initializing both the sending and receiving ends, memory access and data transfer can begin. The receiving end generates a memory access request based on the data to be acquired. The sending end receives the memory access request and locates the data to be transferred in memory based on it. Then, the sending end segments the data to be transferred into individual data packets and adds a sending timestamp to the header of each data packet. The sending end sends data packets to the receiving end according to a preset transmission protocol, scheduling strategy, and sending timestamp. The receiving end receives the data packets sent by the sending end and determines the sending timestamp in the packet header.
[0095] Step 204: Determine the one-way delay time of the data packet based on the sending timestamp, and update the network status indicator value between the receiver and the sender based on the one-way delay time.
[0096] In implementation, while receiving data packets, the receiving end records the reception timestamp of the data packets and calculates the one-way delay time of the data packets based on the reception and transmission timestamps. Then, based on the one-way delay time, the receiving end updates the network state indicator value between the receiving and sending ends, obtaining the updated network state indicator value. The updated network state indicator value characterizes the stability and congestion level of the network state between the receiving and sending ends.
[0097] Specifically, when the receiving end receives a data packet, it records the timestamp of the received data packet and performs difference processing on the received timestamp and the sent timestamp to obtain the one-way delay time of the data packet. This one-way delay time is the time taken to transmit the data packet. Then, the receiving end smooths the one-way delay time according to a preset smoothing algorithm to obtain the smoothed one-way delay time, and uses the smoothed one-way delay time to determine the updated network status index value between the sending end and the receiving end.
[0098] Step 206: Adjust the aggregation degree threshold according to the updated network status index value to obtain the adjusted aggregation degree threshold.
[0099] The aggregation threshold is either a data packet number threshold, a byte size threshold, or a transmission round time threshold.
[0100] In implementation, the receiving end pre-sets network status indicator ranges. Based on the relationship between the updated network status indicator values and the network status indicator ranges, the receiving end adjusts the aggregation degree threshold to obtain the aggregation degree threshold. Then, the receiving end calculates the aggregation degree of each data packet in the current round and determines whether the aggregation degree meets the adjusted aggregation degree threshold.
[0101] Specifically, the receiving end pre-sets a network status indicator range. If the updated network status indicator value is within the range, the receiving end maintains the aggregation degree threshold. If the updated network status indicator value is less than the minimum value of the range, the receiving end adjusts upwards to obtain the adjusted aggregation degree threshold. If the updated network status indicator value is greater than the maximum value, the receiving end adjusts downwards to obtain the adjusted aggregation degree threshold. The receiving end determines each data packet in the current transmission round. Each data packet in the current transmission round refers to the data packets received by the receiving end since the most recent acknowledgment message. Then, the receiving end calculates the aggregation degree of each data packet and determines whether the aggregation degree meets the adjusted aggregation degree threshold.
[0102] In an optional embodiment, if the degree of aggregation does not meet the adjusted degree of aggregation threshold, the receiving end performs step 202 as described above. The processing procedure of step 202 has been described in detail in the above embodiments, and will not be repeated here.
[0103] Step 208: If the aggregation degree meets the adjusted aggregation degree threshold, generate an acknowledgment message and return the acknowledgment message to the sender.
[0104] In implementation, if the aggregation degree threshold meets the adjusted aggregation degree threshold, the receiving end generates an acknowledgment message based on each data packet in the current transmission round. Then, the receiving end sends the acknowledgment message to the sending end. The sending end then performs data transmission for the next transmission round based on the acknowledgment message. Simultaneously, the receiving end updates the transmission round.
[0105] Specifically, if the aggregation degree meets the adjusted aggregation degree threshold, the receiving end determines the target acknowledgment mechanism based on the sequence number of each data packet in the current transmission round, and determines the transmission result based on the sequence number and its order. Then, the receiving end generates an acknowledgment message based on the target acknowledgment mechanism and the transmission result. The receiving end sends the acknowledgment message to the sending end. The sending end performs data transmission for the next transmission round based on the acknowledgment message. At the same time, the receiving end updates the transmission round.
[0106] In the aforementioned memory access method, by adding a sending timestamp to the data packet, the one-way delay time of each data packet can be calculated. Based on this one-way delay time, a network state indicator value representing the current network state can be determined. Then, the aggregation degree threshold is adjusted using the updated network state indicator value, achieving adaptive adjustment of the aggregation degree threshold. This adjusted aggregation degree threshold then controls the sending of acknowledgment messages, enabling network state-based control of acknowledgment message sending. This allows the receiving end to send acknowledgment messages as needed, avoiding waste of network resources, improving data transmission efficiency, and ultimately improving memory access efficiency.
[0107] In an exemplary embodiment, determining the one-way delay time of the data packet based on the sending timestamp in step 204 includes:
[0108] Record the timestamp of the received data packet, and calculate the one-way delay time of the data packet based on the timestamp of the received packet and the timestamp of the sent packet.
[0109] In implementation, while receiving a data packet, the receiving end records the timestamp of the received data packet, thus obtaining the reception timestamp. Then, the receiving end performs difference processing on the reception timestamp and the transmission timestamp to obtain the one-way delay time of the data packet. The one-way delay time is the time it takes for the data packet to travel along the network link between the sending and receiving ends. It is also the one-way propagation time of the data packet from the sending end to the receiving end.
[0110] In this embodiment, the one-way delay time is determined by the sending and receiving timestamps of the data packets, which clarifies the current network status and facilitates the subsequent determination of network status indicator values based on the one-way delay time.
[0111] In one exemplary embodiment, such as Figure 4 As shown, the specific processing procedure for updating the network status indicator value between the receiving end and the sending end based on the one-way delay time in step 204 includes steps 402 to 404. Wherein:
[0112] Step 402: According to the preset smoothing algorithm, the one-way delay time is smoothed to obtain the smoothed one-way delay time.
[0113] In practice, a smoothing algorithm is pre-configured in the receiver. The receiver uses this algorithm to smooth the one-way delay time, resulting in a smoothed one-way delay time.
[0114] Specifically, the smoothing algorithm is shown in the following formula (1):
[0115] SOWT=(a*OWT)(1-a*SOWT)(1)
[0116] In formula (1) above, the first SOWT from left to right is the smoothed one-way delay time. 0WT is the one-way delay time. The second SOWT from left to right is the smoothed one-way delay time corresponding to the previous data packet. If the data packet is the first data packet, then the second SOWT from left to right is the baseline one-way delay time. 'a' represents the remaining weights.
[0117] Starting from the first received data packet, the receiving end calculates the one-way delay time for each received data packet. Based on the one-way delay time and a preset smoothing algorithm, the receiving end updates the smoothed one-way delay time corresponding to the previous data packet to obtain the smoothed one-way delay time corresponding to the current data packet. If the data packet is the first received data packet, the receiving end updates the baseline one-way delay time based on the one-way delay time and the preset smoothing algorithm to obtain the smoothed one-way delay time corresponding to the current data packet.
[0118] Step 404: Determine the smoothed one-way delay time as the updated network status index value between the sender and receiver.
[0119] In implementation, the network state index value between the sender and receiver is a smoothed network state index value. In step 402 above, the receiver has already updated the smoothed one-way delay time corresponding to the previous data packet based on the one-way delay time, thus obtaining the smoothed one-way delay time corresponding to the current data packet. Therefore, the receiver can directly determine the updated network state index value based on the smoothed one-way delay time corresponding to the current data packet. This network state index value characterizes the stability and congestion level of the network state. The higher the network state index value, the worse the network state stability and the higher the congestion level between the sender and receiver; the lower the network state index value, the better the network state stability and the lower the congestion level between the sender and receiver.
[0120] In one exemplary embodiment, Figure 5 This is a schematic diagram of the measurement phase in an exemplary embodiment. Figure 5 As shown, the sending end sequentially sends data packets (data packets) carrying the sending timestamp (timestamp1) to the receiving end according to a predetermined transmission protocol and scheduling strategy. Upon receiving a data packet, the receiving end immediately records the current receiving timestamp (timestamp2). The receiving end calculates the OWD value of the corresponding data packet by comparing the receiving timestamp with the sending timestamp. To more accurately reflect the changing trends of the network state, the receiving end uses a moving average algorithm to process the OWD values of multiple consecutive data packets, calculating and updating the moving average of the OWD (i.e., the smoothed one-way delay time). This moving average will serve as a key data indicator for subsequent judgment of network state and adjustment of the aggregation degree threshold, enabling subsequent dynamic adjustment operations of the aggregation degree threshold.
[0121] In this embodiment, by smoothing the one-way delay time, an updated network status index value is obtained. This value represents the network status and link connectivity, facilitating the dynamic adjustment of the aggregation threshold based on the network status index value. This enables the dynamic sending of acknowledgment messages, avoiding frequent adjustments to the aggregation degree due to slight fluctuations in network status, and ensuring the stability and reliability of data transmission and memory access processes.
[0122] In one exemplary embodiment, the aggregation threshold is a data packet number threshold, a byte size threshold, or a transmission round time threshold.
[0123] In implementation, if the aggregation degree threshold is a data packet count threshold, the receiving end adjusts the data packet count threshold based on the updated network status index value to obtain the adjusted data packet count threshold. Then, the receiving end calculates the number of data packets in the current transmission round and determines whether to send an acknowledgment message based on the data packet count and the data packet count threshold. If the aggregation degree threshold is a byte count threshold, the receiving end adjusts the byte count threshold based on the updated network status index value to obtain the adjusted byte count threshold. Then, the receiving end counts the total byte count of data packets in the current transmission round and determines whether to send an acknowledgment message based on the total byte count and the byte count threshold. If the aggregation degree threshold is a transmission round time threshold, the receiving end adjusts the transmission round time threshold based on the updated network status index value to obtain the adjusted transmission round time threshold. Then, the receiving end counts the start time of receiving the first data packet and the reception time of the current data packet in the current transmission round to determine the current transmission round time and determines whether to send an acknowledgment message based on the current transmission round time and the transmission round time threshold.
[0124] Specifically, if the aggregation degree threshold is the same as the data packet number threshold, the receiving end adjusts the data packet number threshold based on the updated network status index value to obtain the adjusted data packet number threshold. Then, the receiving end calculates the number of data packets in the current transmission round and determines whether the number of data packets reaches the adjusted data packet number threshold. If the number of data packets reaches the adjusted data packet number threshold, the receiving end determines that the aggregation degree meets the adjusted data packet number threshold. If the number of data packets does not reach the adjusted data packet number threshold, the receiving end determines that the aggregation degree does not meet the adjusted data packet number threshold.
[0125] If the aggregation degree threshold is a byte size threshold, the receiver adjusts the byte size threshold based on the updated network status index value to obtain the adjusted byte size threshold. Then, the receiver counts the total byte size of the data packets in the current transmission round and determines whether the total byte size reaches the adjusted byte size threshold. If the total byte size reaches the adjusted byte size threshold, the receiver determines that the aggregation degree meets the adjusted data packet size threshold. If the total byte size does not reach the adjusted byte size threshold, the receiver determines that the aggregation degree does not meet the adjusted data packet size threshold.
[0126] If the aggregation degree threshold is the same as the transmission round time threshold, the receiver adjusts the transmission round time threshold based on the updated network status index value to obtain the adjusted transmission round time threshold. Then, the receiver calculates the start time of the first received data packet and the reception time of the current data packet in the current transmission round to determine the current transmission round time and checks whether the current transmission round time meets the adjusted transmission round time threshold. If the current transmission round time meets the adjusted transmission round time threshold, the receiver determines that the aggregation degree meets the adjusted data packet number threshold. If the current transmission round time does not meet the adjusted transmission round time threshold, the receiver determines that the aggregation degree does not meet the adjusted data packet number threshold.
[0127] In this embodiment, by setting aggregation degree thresholds with different meanings, the memory access method of this application can set aggregation degree thresholds with different meanings according to the needs of different scenarios, thereby expanding the scope of application of the memory access method.
[0128] In one exemplary embodiment, such as Figure 6 As shown, the specific processing procedure of step 206 includes steps 602 to 608. Wherein:
[0129] Step 602: Determine whether the updated network status index value is within the preset network status index range.
[0130] In implementation, a network status indicator range is pre-set at the receiving end. This range indicates that the network status between the sending and receiving ends is stable, and the link is neither congested nor idle. Therefore, the receiving end determines whether the updated network status indicator value falls within the pre-set range. This range includes a maximum value and a minimum value.
[0131] Specifically, the network status indicator range includes a maximum value and a minimum value. The receiving end determines whether the updated network status indicator value is less than the minimum value and whether the updated network status indicator value is greater than the maximum value. Alternatively, the network status indicator range includes a first network status indicator threshold (minimum value) and a second network status indicator threshold (maximum value). The receiving end determines whether the updated network status indicator value is less than the first network status indicator threshold and whether the updated network status indicator value is greater than the second network status indicator threshold.
[0132] Step 604: If the updated network status index value is within the network status index range, then maintain the aggregation degree threshold and obtain the adjusted aggregation degree threshold.
[0133] In implementation, if the updated network status index value falls within the network status range, the receiving end determines that the network is in a normal state, indicating that the network status between the sending and receiving ends is stable, and the link is neither congested nor idle. The receiving end maintains the aggregation degree threshold and obtains the adjusted aggregation degree threshold. That is, the receiving end does not adjust the data packet number threshold, the byte size threshold, or the transmission round time threshold.
[0134] In an optional embodiment, if the updated network status index value is within the network status index range, the receiving end will also use a smoothing adjustment algorithm to fine-tune the aggregation degree threshold according to the changing trend of the network status index value, so as to avoid frequent adjustments of the aggregation degree due to slight fluctuations in the network status and ensure the stability and reliability of the data transmission process.
[0135] Step 606: If the updated network status index value is less than the minimum value of the network status index range, then adjust it upwards to obtain the adjusted aggregation degree threshold.
[0136] In implementation, if the updated network status index value is less than the minimum value of the network status index range, the receiver determines that the network between the receiver and the sender is in an idle state with sufficient link bandwidth resources. The receiver then adjusts the aggregation degree threshold upwards to obtain the adjusted aggregation degree threshold.
[0137] Specifically, the receiving end pre-sets a first aggregation degree extreme value and a second aggregation degree extreme value. The first aggregation degree extreme value is the maximum aggregation degree threshold. The second aggregation degree extreme value is the minimum aggregation degree threshold. The receiving end determines the first aggregation degree extreme value as the new aggregation degree threshold.
[0138] In one exemplary embodiment, Figure 7The receiving end dynamically adjusts the aggregation degree threshold based on the currently acquired OWD moving average (updated network state indicator value) and pre-set threshold conditions. Specifically, the receiving end pre-sets two key thresholds: threshold T1 (first network state indicator threshold) and threshold T2 (second network state indicator threshold). Threshold T1 < threshold T2. If the updated network state indicator value is less than the first network state indicator threshold, the receiving end determines the first aggregation degree extreme value as the new aggregation degree threshold. Figure 7 This is a schematic diagram illustrating link idle status confirmation information in one embodiment. For example... Figure 7 As shown, taking the aggregation degree threshold as the data packet number threshold as an example, the data packet number threshold is 3. The first aggregation degree extreme value is 5. Therefore, the receiver determines that the adjusted aggregation degree threshold is 5. Instead of triggering an acknowledgment every 3 data packets received, it is adjusted to trigger an acknowledgment every 5 data packets received, thereby reducing the acknowledgment frequency, reducing the number of acknowledgment messages generated, and thus effectively reducing network overhead.
[0139] In an optional embodiment, the receiver has a preset adjustment step size. The receiver adjusts the aggregation degree threshold upwards according to the preset adjustment step size until the aggregation degree threshold reaches a first aggregation degree extreme value. Then the receiver stops adjusting the aggregation degree threshold.
[0140] Step 608: If the updated network status index value is greater than the maximum value of the network status index range, then adjust it downward to obtain the adjusted aggregation degree threshold.
[0141] In this embodiment, if the updated network status index value is greater than the maximum value of the network status index range, the receiver determines that the network between the receiver and the sender is congested and has limited link bandwidth resources. The receiver then adjusts the aggregation degree threshold downwards to obtain the adjusted aggregation degree threshold.
[0142] Specifically, the receiving end pre-sets a first aggregation degree extreme value and a second aggregation degree extreme value. The first aggregation degree extreme value is the maximum aggregation degree threshold. The second aggregation degree extreme value is the minimum aggregation degree threshold. The receiving end determines the second aggregation degree extreme value as the new aggregation degree threshold.
[0143] In one exemplary embodiment, the receiving end dynamically adjusts the aggregation degree threshold based on the currently acquired OWD moving average (updated network state indicator value) and a pre-set threshold condition. Specifically, the receiving end pre-sets two key thresholds: threshold T1 (first network state indicator threshold) and threshold T2 (second network state indicator threshold). Threshold T1 < threshold T2. If the updated network state indicator value is greater than the second network state indicator threshold, the receiving end determines the second aggregation degree extreme value as the new aggregation degree threshold. Figure 8This is a schematic diagram illustrating link congestion status confirmation information in one embodiment. For example... Figure 8 As shown, taking the aggregation degree threshold as the data packet number threshold as an example, the data packet number threshold is 3. The second aggregation degree extreme value is 1. Therefore, the receiver determines that the adjusted aggregation degree threshold is 1. Instead of triggering an acknowledgment every 3 data packets received, it is adjusted to trigger an acknowledgment every 1 data packet received. This ensures that the receiver can promptly transmit information such as packet loss to the sender, reducing acknowledgment delay and helping the sender respond quickly to network congestion and promptly initiate the retransmission mechanism.
[0144] In one exemplary embodiment, the receiving end adjusts the acknowledgment aggregation threshold in real time based on the updated network status indicator value and using preset dynamic calculation rules. Specifically, a correspondence between network status indicator intervals and aggregation adjustment strategies is pre-defined at the receiving end, dividing the network status indicator into multiple different intervals, each corresponding to a different aggregation adjustment strategy. When the updated network status indicator value calculated by the receiving end is within a smaller interval, it indicates that the current network is idle and link bandwidth resources are sufficient. At this time, the receiving end increases the aggregation threshold according to the preset strategy, i.e., reduces the acknowledgment frequency, for example, adjusting the acknowledgment trigger from once every 5 data packets received to once every 10 data packets received, thereby reducing the number of acknowledgment messages and reducing network overhead. Conversely, when the updated network status indicator value is within a larger interval, it means that the network is congested. At this time, the receiving end decreases the aggregation threshold and increases the acknowledgment frequency according to the preset strategy, such as adjusting the acknowledgment frequency from once every 10 data packets to once every 5 data packets, ensuring that the receiving end can promptly feed back information such as packet loss to the sending end, reducing acknowledgment delay and helping the sending end quickly initiate the retransmission mechanism. In addition, the receiving end will smoothly adjust the aggregation degree threshold according to the changing trend of the OWD value, so as to avoid frequent changes in the aggregation degree due to minor fluctuations in the network status and ensure the stability of data transmission.
[0145] In an optional embodiment, the receiver has a preset adjustment step size. The receiver adjusts the aggregation degree threshold downwards according to the preset adjustment step size until the aggregation degree threshold reaches the second aggregation degree extreme value. Then the receiver stops adjusting the aggregation degree threshold.
[0146] In this embodiment, by measuring the one-way delay time in real time and dynamically adjusting the acknowledgment aggregation degree, the generation and transmission of acknowledgment messages can be precisely controlled. When the network is idle, increasing the aggregation degree threshold reduces the acknowledgment frequency, avoiding a large number of redundant acknowledgment messages occupying network bandwidth; when the network is congested, decreasing the aggregation degree threshold accelerates acknowledgment feedback, enabling the sender to quickly adjust its transmission strategy. This method effectively reduces unnecessary acknowledgment messages, lowers network overhead, and thus significantly improves RDMA data transmission efficiency. Through real-time monitoring and analysis of OWD, this application can keenly perceive changes in network status. When different conditions such as network congestion or idleness occur, the acknowledgment strategy is adjusted in a timely manner, dynamically changing the aggregation degree threshold. In congested conditions, accelerating the acknowledgment speed helps the sender to quickly retransmit; in idle conditions, reducing the acknowledgment frequency saves resources, enabling data transmission to adapt to complex and ever-changing network environments and maintain good transmission performance at all times. The dynamic aggregation degree threshold mechanism set in this application ensures that the receiver can provide timely and accurate feedback on data reception based on network status, allowing the sender to accurately grasp the data transmission status. Meanwhile, when faced with abnormal situations such as not receiving acknowledgment messages or timeouts, the error handling mechanism flexibly adjusts the retransmission strategy based on the dynamic aggregation degree threshold, effectively reducing the risk of data loss, lowering retransmission latency, and comprehensively ensuring the reliability of data transmission, providing a solid and stable guarantee for RDMA data transmission.
[0147] In one exemplary embodiment, such as Figure 9 As shown, the specific processing steps for generating an acknowledgment message in step 208, where the aggregation degree meets the adjusted aggregation degree threshold, include steps 902 to 904. Wherein:
[0148] Step 902: If the aggregation degree meets the adjusted aggregation degree threshold, determine the target confirmation mechanism based on the sequence number of each data packet in the current transmission round, and determine the transmission result based on each sequence number and the order of arrangement.
[0149] The target acknowledgment mechanism is used to instruct the receiving end to generate an acknowledgment message of the target type.
[0150] In implementation, if the aggregation degree meets the adjusted aggregation degree threshold, the receiving end determines each data packet in the current transmission round and determines the target confirmation mechanism based on the sequence number of each data packet. Then, the receiving end determines the transmission result of each current transmission round based on the sequence number and the order of arrangement.
[0151] Specifically, if the aggregation degree meets the adjusted aggregation degree threshold, the receiver starts by sending the most recent acknowledgment message and determines each data packet in the current round. Based on the sequence number in each data packet, the receiver determines the target acknowledgment mechanism and checks the reception status of each data packet according to its sequence number and order to obtain the transmission result.
[0152] Step 904: Generate an acknowledgment message based on the target confirmation mechanism and transmission results.
[0153] In implementation, if the target acknowledgment mechanism is a selective acknowledgment mechanism and the transmission result is a maximum consecutive sequence number, the receiving end generates an acknowledgment message based on the maximum consecutive sequence number. If the target acknowledgment mechanism is a cumulative acknowledgment mechanism and the transmission result is each of the aforementioned sequence numbers, the receiving end generates an acknowledgment message according to each of the aforementioned sequence numbers.
[0154] In this embodiment, by determining the target acknowledgment mechanism and transmission results, and based on the target acknowledgment mechanism and acknowledgment message, an acknowledgment message is sent to the sender to inform the sender of the reception status of the retransmitted data. The sender further adjusts the retransmission strategy based on the feedback from the receiver, such as adjusting parameters like the retransmission count limit and retransmission interval, until all lost data packets are correctly received. This ensures the integrity and reliability of data transmission, achieves efficient and stable RDMA data transmission, and improves the accuracy of memory access.
[0155] In one exemplary embodiment, such as Figure 10 As shown, the specific processing procedure for determining the target confirmation mechanism based on the sequence number of each data packet in the current transmission round in step 902 includes steps 1002 to 1004. Wherein:
[0156] Step 1002: If the sequence numbers in each data packet in the current transmission round are out of order, then the target confirmation mechanism is determined to be a selective confirmation mechanism.
[0157] In practice, if the sequence numbers of data packets in the current transmission round are out of order, the receiving end determines that the target confirmation mechanism is a selective confirmation mechanism.
[0158] Step 1004: If the sequence number of each data packet in the current transmission round is not out of order, then the target confirmation mechanism is determined to be the cumulative confirmation mechanism.
[0159] In practice, if the sequence numbers of each data packet in the current transmission round are not out of order, the receiving end determines that the target confirmation mechanism is a cumulative confirmation mechanism.
[0160] In this embodiment, different target acknowledgment mechanisms are determined by the sequence number in the data packet, so that the acknowledgment message can be adaptively adjusted according to the received data packet.
[0161] In one exemplary embodiment, such as Figure 11 As shown, step 902, which involves determining the transmission result based on the sequence number and arrangement order, includes steps 1102 to 1104. Wherein:
[0162] Step 1102: If the sequence numbers are not out of order, determine the largest consecutive sequence number among the sequence numbers according to the arrangement order, and determine the largest consecutive sequence number as the transmission result.
[0163] In practice, if the sequence numbers are not out of order, the receiving end sorts the sequence numbers and determines the largest consecutive sequence number from smallest to largest. Then, the receiving end uses the largest consecutive sequence number to determine the transmission result.
[0164] In an exemplary embodiment, taking the sequence numbers 1, 2, 3, 4, 7, 8, and 9 as an example, the receiving end determines the largest consecutive sequence number 4 among the sequence numbers and determines the largest consecutive sequence number 4 as the transmission result.
[0165] Step 1104: If the sequence numbers are out of order, then each sequence number is determined as the transmission result.
[0166] In practice, if the sequence numbers are consecutive, the receiving end will directly determine each sequence number as the transmission result.
[0167] In this embodiment, by determining the transmission result, the information of the confirmation message that needs to be transmitted is clarified, providing a data foundation for the subsequent generation of confirmation messages.
[0168] In one exemplary embodiment, such as Figure 12 As shown, the specific processing procedure of step 904 includes steps 1202 to 1204. Wherein:
[0169] Step 1202: If the target acknowledgment mechanism is a cumulative acknowledgment mechanism and the transmission result is the maximum consecutive sequence number, then an acknowledgment message is generated based on the maximum consecutive sequence number.
[0170] In practice, if the target acknowledgment mechanism is a cumulative acknowledgment mechanism and the transmission result is the maximum consecutive sequence number, the receiving end will encapsulate the maximum consecutive sequence number into the acknowledgment message.
[0171] In one exemplary embodiment, if the received PSNs are not out of order, the receiving end uses a cumulative acknowledgment (ACK) mechanism to send an acknowledgment number to the sending end. This acknowledgment number is the maximum consecutive sequence number, representing the maximum sequence number of data packets that the receiving end has successfully received with consecutive sequence numbers, informing the sending end which data has been received consecutively and correctly.
[0172] Step 1204: If the target confirmation mechanism is a selective confirmation mechanism and the transmission result is a sequence number, then generate an confirmation message based on the sequence number.
[0173] In practice, if the target acknowledgment mechanism is a cumulative acknowledgment mechanism and the transmission result is a sequence number, the receiving end will encapsulate each sequence number into an acknowledgment message.
[0174] In one exemplary embodiment, the receiving end encapsulates the sequence number range of successfully received data packets in a SACK message using a bitmap and sends it to the sending end, enabling the sending end to accurately locate lost data packets and retransmit them in a targeted manner.
[0175] In one exemplary embodiment, the receiving end triggers a selective acknowledgment (SACK) or cumulative acknowledgment (ACK) mechanism based on a dynamically adjusted aggregation threshold, generating and sending an acknowledgment message. When the number of data packets received by the receiving end reaches or exceeds the current aggregation threshold, the receiving end begins processing the received data packets. During processing, the receiving end checks the reception status of the data packets and records information such as the sequence number and reception status of each data packet.
[0176] Figure 13 This is a schematic diagram illustrating selective acknowledgment triggered by packet loss in one embodiment. For example... Figure 13 As shown, if the PSN of the received message is out of order, the Selective Acknowledgment (SACK) mechanism is adopted. The receiving end will encapsulate the sequence number range of the successfully received data packets in the SACK message using a bitmap and send it to the sending end, so that the sending end can accurately locate the lost data packets and retransmit them in a targeted manner.
[0177] If there is no out-of-order delivery of PSN data, the receiver uses a cumulative acknowledgment (ACK) mechanism to send an acknowledgment number to the sender. This number represents the largest sequence number of consecutively received data packets, informing the sender which data has been received consecutively and correctly. After generating the acknowledgment message, the receiver selects an appropriate time and method to send the acknowledgment message based on the current network status and system resources, ensuring that the acknowledgment information is delivered to the sender in a timely and accurate manner, achieving efficient and reliable data transmission.
[0178] In this embodiment, based on the target acknowledgment mechanism and acknowledgment messages, acknowledgment messages are sent to the sender to inform the sender of the reception status of retransmitted data. The sender further adjusts the retransmission strategy based on the feedback from the receiver, such as adjusting parameters like the retransmission count limit and retransmission interval, until all lost data packets are correctly received. This ensures the integrity and reliability of data transmission, achieves efficient and stable RDMA data transmission, and improves the accuracy of memory access.
[0179] In one exemplary embodiment, during data transmission, if the sender determines that data packets have been lost based on the acknowledgment message returned by the receiver, it will enter the retransmission phase. The sender will retrieve the data packets that need to be retransmitted from its data buffer queue and retransmit them according to the retransmission strategy. During the retransmission process, the sender will also embed a timestamp in the header of the retransmitted data packets so that the receiver can measure OWD and perform subsequent acknowledgment processing. After receiving the retransmitted data packets, the receiver will process them according to the above data transmission and acknowledgment process, generate a corresponding acknowledgment message and send it back to the sender to inform the sender of the reception status of the retransmitted data. Based on the feedback information from the receiver, the sender will further adjust the retransmission strategy, such as adjusting parameters like the retransmission count limit and retransmission interval, until all lost data packets are correctly received, ensuring the integrity and reliability of data transmission and achieving efficient and stable RDMA data transmission. Figure 14 This is a schematic diagram illustrating selective acknowledgment-triggered retransmission in one embodiment. For example... Figure 14 As shown, after the packet with sequence number (PSN) 2 is lost in the first round of transmission, the sender will retransmit the packet with sequence number 2 in the second round of transmission to ensure that all lost packets are received correctly.
[0180] 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 in other steps. It is understood that the steps in different embodiments can be freely combined as needed, and all non-contradictory solutions formed by such combinations are within the scope of protection of this application.
[0181] Based on the same inventive concept, this application also provides a memory access apparatus for implementing the memory access method described above. The solution provided by this apparatus is similar to the implementation described in the above method; therefore, the specific limitations in one or more memory access apparatus embodiments provided below can be found in the limitations of the memory access method described above, and will not be repeated here.
[0182] In one exemplary embodiment, such as Figure 15As shown, a memory access device 1500 is provided, including: a receiving module 1501, a determining module 1502, an adjusting module 1503, and a generating module 1504, wherein:
[0183] The receiving module 1501 is used to receive data packets sent by the sending end; the data packets are generated based on the memory access requests of the receiving end; the data packets include the sending timestamp of the data packets.
[0184] The determination module 1502 is used to determine the one-way delay time of the data packet based on the sending timestamp, and update the network status indicator value between the receiving end and the sending end based on the one-way delay time.
[0185] The adjustment module 1503 is used to adjust the aggregation degree threshold according to the updated network status index value to obtain the adjusted aggregation degree threshold.
[0186] The generation module 1504 is used to generate an acknowledgment message and return the acknowledgment message to the sender if the aggregation degree meets the adjusted aggregation degree threshold.
[0187] In one exemplary embodiment, the determining module 1502 includes a first determining submodule and a first updating submodule. Specifically, the first determining submodule is used to: record the receiving timestamp of the received data packet, and calculate the one-way delay time of the data packet based on the receiving timestamp and the sending timestamp.
[0188] In an exemplary embodiment, the determining module 1502 includes a first determining submodule and a first updating submodule. Specifically, the first updating submodule is used to: smooth the one-way delay time according to a preset smoothing algorithm to obtain a smoothed one-way delay time; and determine the smoothed one-way delay time as an updated network status indicator value between the sending end and the receiving end.
[0189] In one exemplary embodiment, the aggregation degree threshold is a data packet number threshold, a byte size threshold, or a transmission round time threshold.
[0190] In an exemplary embodiment, the adjustment module 1503 is specifically configured to: determine whether the updated network status index value is within a preset network status index range; if the updated network status index value is within the network status index range, maintain the aggregation degree threshold and obtain the adjusted aggregation degree threshold; if the updated network status index value is less than the minimum value of the network status index range, adjust upward to obtain the adjusted aggregation degree threshold; if the updated network status index value is greater than the maximum value of the network status index range, adjust downward to obtain the adjusted aggregation degree threshold.
[0191] In one exemplary embodiment, the generation module 1504 includes a first generation submodule and a first transmission submodule. The first generation submodule includes:
[0192] The second determining submodule is used to determine the target confirmation mechanism based on the sequence number of each data packet in the current transmission round if the aggregation degree meets the adjusted aggregation degree threshold, and to determine the transmission result based on the sequence number and the order of arrangement; the target confirmation mechanism is used to instruct the receiving end to generate an acknowledgment message of the target type.
[0193] The second generation submodule is used to generate an acknowledgment message based on the target acknowledgment mechanism and the transmission result.
[0194] In an exemplary embodiment, the second determining submodule includes a third determining submodule and a fourth determining submodule. Specifically, the third determining submodule is used to: determine the target acknowledgment mechanism as a selective acknowledgment mechanism if the sequence numbers in each data packet in the current transmission round are out of order; and determine the target acknowledgment mechanism as a cumulative acknowledgment mechanism if the sequence numbers in each data packet in the current transmission round are not out of order.
[0195] In an exemplary embodiment, the second determining submodule includes a third determining submodule and a fourth determining submodule. Specifically, the fourth determining submodule is used to: if the sequence numbers are not out of order, determine the largest consecutive sequence number among the sequence numbers according to the arrangement order, and determine the largest consecutive sequence number as the transmission result; if the sequence numbers are out of order, determine each sequence number as the transmission result.
[0196] In an exemplary embodiment, the second generation submodule is specifically used to: if the target acknowledgment mechanism is a cumulative acknowledgment mechanism and the transmission result is the maximum consecutive sequence number, then generate an acknowledgment message based on the maximum consecutive sequence number; if the target acknowledgment mechanism is a selective acknowledgment mechanism and the transmission result is each sequence number, then generate an acknowledgment message according to each sequence number.
[0197] Each module in the aforementioned memory access 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 invoke and execute the operations corresponding to each module.
[0198] In one exemplary embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 16As shown, the computer device includes a processor, memory, input / output interfaces, a communication interface, a display unit, and an input device. The processor, memory, and input / output interfaces are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interfaces. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The input / output interfaces are used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, Near Field Communication (NFC), or other technologies. When the computer program is executed by the processor, it implements a memory access method. The display unit is used to form a visually visible image and can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.
[0199] Those skilled in the art will understand that Figure 16 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.
[0200] In one embodiment, a computer device is also 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 method embodiments.
[0201] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps in the above method embodiments.
[0202] 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.
[0203] 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.
[0204] 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.
[0205] 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 patent 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 memory access method, characterized in that, The method is applied at the receiving end, and the method includes: Receive data packets sent by the sending end; the data packets are generated based on the memory access requests of the receiving end; the data packets include the sending timestamp of the data packets; Based on the sending timestamp, the one-way delay time of the data packet is determined, and the network status indicator value between the receiving end and the sending end is updated based on the one-way delay time. The aggregation threshold is adjusted based on the updated network status index value to obtain the adjusted aggregation threshold. If the aggregation degree meets the adjusted aggregation degree threshold, an acknowledgment message is generated and returned to the sending end.
2. The method according to claim 1, characterized in that, Determining the one-way delay time of the data packet based on the sending timestamp includes: Record the timestamp of the received data packet, and calculate the one-way delay time of the data packet based on the timestamp of the received data packet and the timestamp of the sent data packet.
3. The method according to claim 1, characterized in that, The step of updating the network status indicator value between the receiver and the sender based on the one-way delay time includes: The one-way delay time is smoothed according to a preset smoothing algorithm to obtain the smoothed one-way delay time. The smoothed one-way delay time is determined as the updated network status index value between the sending end and the receiving end.
4. The method according to claim 1, characterized in that, The aggregation threshold is a data packet number threshold, a byte size threshold, or a transmission round time threshold.
5. The method according to claim 1, characterized in that, The step of adjusting the aggregation threshold based on the updated network state index value to obtain the adjusted aggregation threshold includes: Determine whether the updated network status indicator value is within the preset network status indicator range; If the updated network status index value is within the network status index range, then the aggregation degree threshold is maintained, and the adjusted aggregation degree threshold is obtained. If the updated network status index value is less than the minimum value of the network status index range, then the aggregation degree threshold is adjusted upwards to obtain the adjusted value. If the updated network status index value is greater than the maximum value of the network status index range, then the aggregation degree threshold is adjusted downwards to obtain the adjusted aggregation degree threshold.
6. The method according to claim 1, characterized in that, If the aggregation degree meets the adjusted aggregation degree threshold, an acknowledgment message is generated, including: If the aggregation degree meets the adjusted aggregation degree threshold, the target confirmation mechanism is determined according to the sequence number in each data packet in the current transmission round, and the transmission result is determined according to the sequence number and the order of arrangement; the target confirmation mechanism is used to instruct the receiving end to generate a target type confirmation message; Based on the target confirmation mechanism and the transmission result, a confirmation message is generated.
7. The method according to claim 6, characterized in that, The target confirmation mechanism, which determines the sequence number of each data packet in the current transmission round, includes: If the sequence numbers in each data packet in the current transmission round are out of order, then the target confirmation mechanism is determined to be a selective confirmation mechanism. If the sequence numbers in each data packet in the current transmission round are not out of order, then the target confirmation mechanism is determined to be a cumulative confirmation mechanism.
8. The method according to claim 6, characterized in that, Determining the transmission result based on the sequence number and arrangement order includes: If the sequence numbers are not in random order, then the largest consecutive sequence number is determined among the sequence numbers according to the arrangement order, and the largest consecutive sequence number is determined as the transmission result; If the sequence numbers are out of order, then each sequence number will be determined as the transmission result.
9. The method according to claim 6, characterized in that, The step of generating an acknowledgment message based on the target acknowledgment mechanism and the transmission result includes: If the target confirmation mechanism is a cumulative confirmation mechanism and the transmission result is the maximum consecutive sequence number, then an confirmation message is generated based on the maximum consecutive sequence number. If the target confirmation mechanism is a selective confirmation mechanism and the transmission result is each of the sequence numbers, then an confirmation message is generated according to each of the sequence numbers.
10. A memory access device, characterized in that, The device is used at a receiving end, and the device includes: A receiving module is used to receive data packets sent by a sending end; the data packets are generated based on the memory access requests of the receiving end; the data packets include a sending timestamp of the data packets; The determination module is used to determine the one-way delay time of the data packet based on the sending timestamp, and update the network status indicator value between the receiving end and the sending end based on the one-way delay time. An adjustment module is used to adjust the aggregation threshold based on the updated network status index value to obtain the adjusted aggregation threshold. The generation module is used to generate an acknowledgment message and return the acknowledgment message to the sending end if the aggregation degree meets the adjusted aggregation degree threshold.
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 9.
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 9.