QUIC-based ACK frame processing method, apparatus and device, and medium

The method optimizes QUIC ACK frame processing by batch reading and merging ACK frames, reducing CPU overhead and enhancing throughput through dynamic frequency adjustment, addressing the inefficiencies of existing QUIC protocols.

CN119071242AActive Publication Date: 2024-12-03SHANDONG UNIV +1

Patent Information

Application Number
CN202410925514.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2024-06-21
Filing Date
2024-07-11
Publication Date
2024-12-03
Estimated Expiration
2044-07-11

AI Technical Summary

Technical Problem

The QUIC protocol's ACK frame processing incurs high CPU overhead due to frequent system calls and traversing sent queues, especially in weak network environments, which affects network throughput.

Method used

An efficient ACK frame processing method that involves batch reading of QUIC data packets, merging ACK frames, and dynamically adjusting the client's ACK frame sending frequency based on historical data to optimize CPU resource utilization.

Benefits of technology

Reduces CPU overhead and improves network throughput by minimizing system calls and adapting ACK frame frequency to network conditions, ensuring efficient data processing even under limited resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119071242A_ABST
    Figure CN119071242A_ABST
Patent Text Reader

Abstract

The invention relates to the field of computer networks, and discloses an ACK frame processing method and device based on QUIC, equipment and a medium. According to the method disclosed by the invention, the ACK frame merging method of the server side is designed, and meanwhile, the frequency of sending the ACK frames by the client side is dynamically adjusted according to the number of the ACK frames read in a historical period of time, so that the problem that the ACK frame processing overhead of a QUIC protocol is too high is solved, and the throughput when CPU resources are limited is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of computer networks, and in particular relates to an ACK frame processing method based on QUIC. Background Art

[0002] The QUIC protocol is the underlying transport protocol of HTTP3. Its core advantage lies in the more flexible control of the transmission strategy in the user state by utilizing the fast transmission characteristics of UDP packets. Compared with TCP, the QUIC protocol reduces problems such as head-of-line blocking through optimization, and shows significant transmission efficiency, especially in weak network environments. In addition, the QUIC protocol introduces new features such as 0-RTT mode, which further improves the client experience. However, since the QUIC protocol uses UDP as the transport layer protocol, there is a significant difference in the CPU overhead of ACK processing compared with TCP. In the TCP protocol, ACK processing is mainly completed by the kernel space, while the ACK frame in the QUIC protocol is carried by UDP data packets. Each time an ACK frame is processed, the data packet needs to be read from the kernel space to the user space and the ACK frame needs to be parsed. This frequent system call and switching between user state and kernel state leads to high CPU overhead.

[0003] On the other hand, since QUIC packets are usually small, the client sends ACK frames relatively frequently. When the server processes each ACK frame, it needs to traverse the sent queue and remove the packets that have been confirmed to be received. This process of traversing the sent queue multiple times also brings a large CPU overhead. Therefore, optimizing the ACK processing method of the QUIC protocol to reduce CPU overhead and improve network throughput under limited CPU resources has become an urgent problem to be solved. Summary of the invention

[0004] In order to solve the above technical problems, the present invention provides an efficient ACK frame processing method based on the QUIC protocol, so that the server can read data packets in batches to obtain ACK frames, and process the ACK frames after merging multiple ACK frames. At the same time, the frequency of the client sending ACK frames is dynamically updated according to the average number of ACK frames obtained each time the data packet is read over a period of time in history, so as to ensure that the throughput will not be affected.

[0005] To achieve the above objectives, the first aspect of the present invention proposes an efficient ACK frame processing method based on the QUIC protocol, which is applied to the server, including:

[0006] S1. Batch read QUIC data packets from the client, where the QUIC data packets carry ACK frames;

[0007] S2. Merge the ACK frames carried by the QUIC data packets in S1, perform normal ACK frame processing on the merged ACK frames, and calculate the total number of ACK frames carried in the read QUIC data packets. cnt ;

[0008] S3. Divide the time window according to the round-trip time of the QUIC data packet, and when the new time window is reached, calculate the average number of ACK frames obtained each time the QUIC data packet is read in the previous time window. avg ;

[0009] S4, notify the client to update the frequency of sending ACK frames, according to ACK avg Calculate the updated ACK frame frequency value T new , create an ACK_FREQUENCY frame and send it to the client.

[0010] Furthermore, in S1, batch reading of QUIC data packets includes:

[0011] The UDP data packets from the client are read in batches from the socket using the recvmmsg() system call; and the QUIC data packets are parsed from the UDP data packets.

[0012] Furthermore, the merging of ACK frames carried by QUIC data packets in S1 in S2 includes: merging ACK frames carried by QUIC data packets of the same QUIC connection and the same packet number space.

[0013] Furthermore, the method for determining QUIC data packets in the same QUIC connection and the same packet number space includes:

[0014] Parse the header information of the QUIC data packet;

[0015] Determine whether the QUIC connections are the same and determine the data packet type according to the packet header information;

[0016] Whether the packet number space is the same is determined according to the packet type of the QUIC packet.

[0017] Furthermore, the ACK frame carried by the QUIC data packet in S1 merged in S2 includes:

[0018] Get the ACK frame carried by the QUIC data packet of the same QUIC connection and the same packet number space;

[0019] Calculate the maximum acknowledgment packet number in the combined ACK frame;

[0020] Calculate the confirmation interval in the combined ACK frame.

[0021] Furthermore, the value of the largest acknowledgment packet number in the merged ACK frame is the maximum value of the largest acknowledgment packet number of the ACK frame carried by the QUIC data packets in the same QUIC connection and the same packet number space. The specific calculation method is: Largest Δ =max 1≤i≤n Largest i , where Largest Δ is the maximum acknowledgment packet number of the merged ACK frame, n is the number of ACK frames carried by QUIC data packets in the same QUIC connection and the same packet number space, Largest i is the maximum confirmation packet number of the i-th ACK frame.

[0022] Furthermore, the confirmation interval in the merged ACK frame is calculated by taking the intersection of all confirmation intervals of ACK frames carried by all QUIC data packets of the same QUIC connection and the same packet number space, wherein each ACK frame includes at least one confirmation interval.

[0023] Furthermore, the total number of ACK frames carried in the QUIC data packets read this time is calculated in S2. cnt is the total number of ACK frames carried by QUIC data packets in all QUIC connections and packet number spaces. Further, the method of dividing the time window in S3 is:

[0024] When a new time window is reached, the total amount of data S transmitted at this time is recorded;

[0025] When sending a data packet, record the total amount of data P transmitted when sending the data packet;

[0026] When receiving the confirmation of the data packet, obtain the total amount of data P transmitted when the data packet is sent. If P ≥ S, enter a new time window.

[0027] Furthermore, the ACK in S3 avg The calculation method is as follows:

[0028]

[0029] Where m is the number of times data packets are read in the previous time window. The number of ACK frames carried by the k-th QUIC packet read.

[0030] Furthermore, in S4, T new The calculation method is as follows:

[0031]

[0032] Where, T oldis the frequency at which the client sends ACK frames before updating, T new The updated frequency means that the client is notified every time T new After each packet, an ACK frame is sent.

[0033] Further, the creating an ACK_FREQUENCY frame and sending it to the client includes:

[0034] Set the ACK frequency threshold T of the ACK_FREQUENCY frame new ;

[0035] Add the ACK_FREQUENCY frame to the server's send queue.

[0036] Furthermore, the step of creating an ACK_FREQUENCY frame and sending it to the client further includes setting a sequence number of the ACK_FREQUENCY frame, which is calculated as follows:

[0037] SN i =SN i-1 +1

[0038] Where, SN i Is the sequence number of the currently created ACK_FREQUENCY frame, SN i It is the sequence number of the previous ACK_FREQUENCY frame. When the sequence number of the ACK_FREQUENCY frame received by the client is less than the maximum value of the received sequence number, the ACK_FREQUENCY frame is ignored.

[0039] The second aspect of the present invention proposes an efficient ACK frame processing device based on the QUIC protocol, which is applied to the server, and the device includes:

[0040] A data receiving module, configured to receive in batches QUIC data packets carrying ACK frames from a client, wherein the QUIC data packets carry ACK frames;

[0041] A data processing module, used to merge the ACK frames in the QUIC data packets received by the data receiving module, perform normal ACK frame processing on the merged ACK frames, and calculate the total number of ACK frames carried in the read QUIC data packets;

[0042] A calculation module is used to divide the time window according to the round-trip time of the QUIC data packet, and when a new time window is reached, calculate the average number of ACK frames obtained by each reading of the QUIC data packet in the previous time window;

[0043] The notification module is used to notify the client to update the frequency of sending ACK frames, and create an ACK_FREQUENCY frame based on the value of the updated ACK frame frequency calculated and sent to the client.

[0044] A computer device comprises at least one processor and a computer-readable medium storing a computer program, wherein when the computer program is read and executed by the processor, the steps of the method described in the first aspect are implemented.

[0045] A computer-readable medium stores a computer program, and when the computer program is read and executed by a processor, the steps of the method described in the first aspect are implemented.

[0046] Compared with the prior art, the present invention has the following beneficial effects:

[0047] (1) The present invention avoids switching between user mode and kernel mode caused by frequent system calls by batch reading UDP data packets carrying ACK frames, thereby significantly reducing CPU overhead.

[0048] (2) The present invention obtains an ACK frame by merging and reading. Compared with the existing QUIC protocol which requires processing each ACK frame, the present invention only needs to process the merged ACK frame once, thereby reducing the CPU overhead of ACK frame processing and improving throughput when CPU resources are insufficient.

[0049] (3) The present invention dynamically adjusts the frequency at which the client sends ACK frames based on the average value of the number of ACK frames obtained each time the QUIC data packet is read over a period of history. Compared with some existing methods that directly reduce the frequency at which the client sends ACK frames, the present invention can increase the frequency when the network conditions are poor, thereby ensuring that the throughput will not be affected in a weak network environment. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art are briefly introduced below.

[0051] Figure 1 A flowchart of an efficient ACK frame processing method based on the QUIC protocol disclosed in an embodiment of the present invention.

[0052] Figure 2 A comparison diagram of an efficient ACK frame processing method based on the QUIC protocol disclosed in an embodiment of the present invention, in which the server reads data packets in batches and merges ACK frames, and an existing method.

[0053] Figure 3 This is a diagram of the fields of the QUIC protocol ACK frame.

[0054] Figure 4 A schematic diagram of a specific example of a QUIC protocol ACK frame.

[0055] Figure 5 A schematic diagram of an example of a server merging ACK frames in an efficient ACK frame processing method based on the QUIC protocol disclosed in an embodiment of the present invention.

[0056] Figure 6 This is a throughput comparison chart of the optimized QUIC implementation (LiteQUIC) of the present invention and various current QUIC implementations. DETAILED DESCRIPTION

[0057] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings in the embodiments of the present invention.

[0058] The present invention provides an efficient ACK frame processing method based on the QUIC protocol, such as Figure 1 As shown, the following steps are included:

[0059] S1. Batch read QUIC packets from the client, which carry ACK frames. recvmsg() is a system call for receiving a single packet. It receives data from the socket and puts the data into a specified buffer. It is part of the traditional UNIX socket API and is commonly used for protocols such as TCP and UDP.

[0060] recvmmsg() is a Linux-specific system call that allows multiple packets to be received from a socket at once. This is very useful in scenarios where high performance is required, such as for network servers that handle a large number of packets. By receiving multiple packets with one system call, recvmmsg() not only reduces the overhead of context switching and improves performance, but also reduces the need for multiple recvmsg() calls in the application, thereby simplifying the code.

[0061] The existing QUIC protocol server uses the recvmsg() system call data packet, so only one data packet can be read each time. The server of this application uses recvmmsg() to read data packets in batches. By receiving multiple data packets in one system call, batch reading can be achieved, which can avoid frequent use of system calls to read data packets, resulting in switching between user mode and kernel mode, effectively reducing the number of system calls, reducing CPU overhead, and improving data processing efficiency. Especially in a high-load environment, it can also improve the performance and throughput of the server.

[0062] In S1, batch reading of QUIC data packets includes:

[0063] The UDP data packets from the client are read in batches from the socket using the recvmmsg() system call; and the QUIC data packets are parsed from the UDP data packets.

[0064] In actual scenarios, the server may accumulate a large number of UDP packets from the client, including QUIC packets. The existing method uses recvmsg() to read each UDP packet in turn, which will cause frequent switching between user state and kernel state, resulting in relatively high CPU overhead. The server of the embodiment uses recvmmsg() to read multiple UDP packets from the socket at one time, reducing the number of switching between user state and kernel state, thereby reducing CPU overhead and improving server performance.

[0065] S2. Merge the ACK frames carried by the QUIC data packets in S1, perform normal ACK frame processing on the merged ACK frames, and calculate the total number of ACK frames carried in the read QUIC data packets. cnt By merging ACK frames, multiple ACK frames can be merged into one. Only one ACK frame needs to be processed, which reduces the number of ACK frame processing times. This not only reduces the CPU overhead of processing ACK frames, but also improves data processing efficiency. cnt It is used to calculate the updated frequency of the client sending ACK frames later, so that the client can dynamically adjust the frequency of sending ACK frames, optimize CPU resource utilization, and improve the throughput of the system under various network conditions.

[0066] Figure 2 A comparison diagram of the method for merging ACK frames on the server side of the present invention and the method for processing ACK frames on the existing QUIC protocol is shown. The left figure is the method for processing ACK frames on the existing QUIC protocol. The server side needs to first use the recvmsg() system call to read the data packet from the kernel space to the user space. Each system call can only read one data packet, and then parse the ACK frame from the data packet and process the ACK frame in turn. Since the QUIC data packet is relatively fragmented, there will be a lot of ACK frames during the actual data transmission process. This frequent system call and processing of ACK frames will result in excessive CPU overhead. The right figure is the method for merging ACK frames on the server side of the present invention. The server side can use recvmmsg() to batch read multiple data packets through a single system call, parse the ACK frame from the data packet and merge them into one ACK frame. The server side only needs to process this one ACK frame, thereby reducing the switching frequency between the user state and the kernel state, thereby reducing the CPU overhead.

[0067] The merging of ACK frames carried by the QUIC data packets in S1 in S2 includes: merging ACK frames carried by QUIC data packets of the same QUIC connection and the same packet number space.

[0068] Among them, because the server can handle multiple client connections at the same time, there are three packet number spaces in each connection, and the ACK frames of each connection and packet number space are independent of each other. The server can only merge ACK frames of the same connection and the same packet number space.

[0069] The method for determining QUIC data packets in the same QUIC connection and the same packet number space includes:

[0070] Parse the header information of the QUIC data packet;

[0071] Determine whether the QUIC connections are the same and determine the data packet type according to the packet header information;

[0072] Whether the packet number space is the same is determined according to the packet type of the QUIC packet.

[0073] Among them, the QUIC header information contains a SCID field. SCID represents the client connection ID of the QUIC connection to which it belongs. The same SCID field in the data packet represents the same QUIC connection. The data packet type is determined by the highest bit of the first byte of the packet header. If it is 0, it is a 1-RTT data packet. When the highest bit of the first byte of the packet header is 1, it is determined according to the Long Packet Type field in the header information. When this field is 0x0, the data packet is an Initial data packet, 0x1 is a 0-RTT data packet, and 0x2 is a Handshake data packet. Among them, the Initial data packet is the first packet number space, the Handshake data packet is the second packet number space, and the 0-RTT data packet and the 1-RTT data packet are the third packet number space. The ACK frames carried by data packets of different QUIC connections or different packet number spaces are independent of each other. QUIC data packets that obtain the same QUIC connection and the same packet number space can merge the ACK frames they carry.

[0074] The ACK frame carried by the QUIC data packet in S1 in S2 includes:

[0075] Get the ACK frame carried by the QUIC data packet of the same QUIC connection and the same packet number space;

[0076] Calculate the maximum acknowledgment packet number in the combined ACK frame;

[0077] Calculate the confirmation interval in the combined ACK frame.

[0078] Among them, the confirmation interval of the ACK frame is the number interval of the data packets that the client notifies the server of the data packets that have been received. The client notifies the server of which data packets have been confirmed to have been received in this way. Each ACK frame contains a maximum confirmation packet number and several confirmation intervals. When the server processes each confirmation interval, it must traverse the sending queue once. The number of intervals can be reduced by merging intervals. The maximum confirmation packet number is the maximum number of the data packet to be confirmed. The confirmation interval of the ACK frame is obtained by the starting position, the current interval length, and the interval to the next interval. The server starts from the maximum confirmation packet number and obtains each confirmation interval in descending order according to the current interval length and the interval to the next interval. For example, if the maximum confirmation packet number is 10, the current interval length is 3, and the interval to the next interval is 2, then the current interval is [10,8], and the next interval starts from 5. Each confirmation interval is obtained according to the length and interval of each subsequent interval.

[0079] The value of the maximum acknowledgment packet number in the merged ACK frame is the maximum value of the maximum acknowledgment packet number of the ACK frame carried by the QUIC data packets in the same QUIC connection and the same packet number space. The specific calculation method is:

[0080] Largest Δ =max 1≤i≤n Largest i , where Largest Δ is the maximum acknowledgment packet number of the merged ACK frame, n is the number of ACK frames carried by QUIC data packets in the same QUIC connection and the same packet number space, Largest i is the maximum confirmation packet number of the i-th ACK frame.

[0081] Among them, after merging the ACK frames, the server only needs to process one merged ACK frame. The maximum confirmation packet number of the merged ACK frame represents the maximum number of data packets to be confirmed by the ACK frame, and is also the maximum number of data packets to be confirmed by all ACK frames to be merged.

[0082] Furthermore, the confirmation interval in the merged ACK frame is calculated by taking the intersection of all confirmation intervals of ACK frames carried by all QUIC data packets of the same QUIC connection and the same packet number space, wherein each ACK frame includes at least one confirmation interval.

[0083] Each ACK frame contains several confirmation intervals, some of which have intersections. The intersections are merged to reduce the number of confirmation intervals and thus reduce the CPU overhead of the server when processing ACK frames.

[0084] Figure 3This is a field diagram of the QUIC protocol ACK frame, where the main fields are as follows: Type: indicates that the frame is an ACK frame; Maximum ACK: the maximum data packet number to be confirmed; ACK delay: the client's processing delay; Number of intervals: the number of remaining confirmation intervals; First interval: represents the length of the first interval of the data packet to be confirmed (confirmed from large to small); ACK interval: a list of confirmation intervals, where the interval represents the interval with the next interval, and the interval length represents the length of the interval to be confirmed; ECN mark: ECK feedback in the network.

[0085] Figure 4 The following is a diagram of a specific example of the QUIC protocol ACK frame. The data packets to be confirmed in this ACK frame are numbered starting from 10. The length of the first confirmation interval is 2, that is, the interval [10,9]. There are three confirmation intervals after that. The interval between the first confirmation interval and the next interval is 1, that is, starting from 7, the length is one, that is, the first confirmation interval is [7]. Similarly, the next two confirmation intervals are [5,4], [1]. Finally, the ACK frame represents the client with the received data packets numbered [[10,9], [7], [5,4], [1]]. An ACK frame may contain multiple confirmation intervals, and the existing QUIC protocol will traverse the send queue when processing each interval. Therefore, in order to reduce the overhead of ACK frame processing, when using recvmmsg() to read multiple data packets to obtain multiple ACK frames, their confirmation intervals are merged to obtain a merged frame, and the server only processes this merged frame.

[0086] Figure 5 A schematic diagram of an example of a server merging ACK frames in an efficient ACK frame processing method based on the QUIC protocol disclosed in an embodiment of the present invention. In this example, the server obtains 3 ACK frames at the same time, and their confirmation intervals are [20,19], [18,17], and [13,12] respectively. After merging the ACK frames, a merged frame containing two confirmation intervals is obtained, and its confirmation intervals are [20,17] and [13,12]. The server only needs to process one merged ACK frame, and its confirmation interval is [[20,17], [13,12]].

[0087] The total number of ACK frames carried in the QUIC data packet read this time is calculated in S2 cnt The total number of ACK frames carried by QUIC packets for all QUIC connections and packet number spaces.

[0088] In order to determine whether the server CPU is sufficient, the number of ACK frames carried by the data packet is calculated each time the data packet is read.

[0089] S3. Divide the time window according to the round-trip time of the QUIC data packet, and when the new time window is reached, calculate the average number of ACK frames obtained each time the QUIC data packet is read in the previous time window. avg . The number of ACK frames obtained each time a QUIC data packet is read in the previous time window is used to determine whether the server's CPU resources are sufficient. If the server's CPU resources are sufficient, the server can process the arriving ACK frames in time, so the number of ACK frames obtained each time a data packet is read will be relatively small. If the CPU resources are insufficient, the server processes ACK frames at a speed lower than the speed at which ACK frames arrive, and ACK frames will accumulate on the server. The number of ACK frames obtained each time a data packet is read will be relatively large. At this time, the client should be notified to reduce the frequency of sending ACK frames.

[0090] The method for dividing the time window in S3 is:

[0091] When a new time window is reached, the total amount of data S transmitted at this time is recorded;

[0092] When sending a data packet, record the total amount of data P transmitted when sending the data packet;

[0093] When receiving the confirmation of the data packet, obtain the total amount of data P transmitted when the data packet is sent. If, enter a new time window.

[0094] The time window is divided based on the actual round-trip time. The above P≥S means that the data packet is sent within the current time window. From the data packet transmission to the client to the receipt of the client's confirmation, it takes one round trip in the network link, which represents the actual round-trip time. Compared with directly setting a fixed time window, this can dynamically adapt to network changes.

[0095] The S3 ACK avg The calculation method is as follows:

[0096]

[0097] Where m is the number of times data packets are read in the previous time window. The number of ACK frames carried by the k-th QUIC packet read.

[0098] The total number of ACK frames obtained when reading data packets in the last time window is divided by the number of times the data packets are read, and the average number of ACK frames carried by each data packet read in the last time window can be obtained. avg , judging whether the server's CPU resources are sufficient based on the average number of ACK frames read over a period of time can avoid errors.

[0099] S4, notify the client to update the frequency of sending ACK frames, according to ACK avg Calculate the updated ACK frame frequency value T new , according to T new Create an ACK_FREQUENCY frame and send it to the client. Compared with the existing method of directly reducing the frequency of the client sending ACK frames, the present invention can dynamically adjust the frequency of sending ACK frames through historical information, reduce the frequency of the client sending ACK frames when CPU resources are insufficient, and increase the frequency when CPU resources are sufficient, so as to avoid a decrease in throughput due to too low ACK frame frequency when CPU resources are sufficient.

[0100] The S4 in T new The calculation method is as follows:

[0101]

[0102] Where, T old is the frequency at which the client sends ACK frames before updating, T new The updated frequency means that the client is notified every time T new After each packet, an ACK frame is sent.

[0103] Among them, when ACK avg When it is greater than or equal to 2, it means that the server CPU resources are insufficient and cannot process the ACK frames from the client in time. ACK frames are accumulated on the server, and multiple ACK frames can be obtained when reading data packets. avg Reduce the number of ACK frames sent by the client, and change the original number of ACK frames received per T old Send an ACK frame for each packet received T old ×ACK avg The goal is to get only one ACK frame for each data packet read. avg When it is less than 2, the CPU resources are sufficient. At this time, you can tentatively increase the frequency of the client sending ACK frames to avoid a decrease in throughput due to a too low ACK frame frequency.

[0104] Further, the creating an ACK_FREQUENCY frame and sending it to the client includes:

[0105] Set the ACK frequency threshold T of the ACK_FREQUENCY frame new ;

[0106] Add the ACK_FREQUENCY frame to the server's send queue.

[0107] The ACK_FREQUENCY frame contains the Ack-Eliciting Threshold field. By setting the Ack-Eliciting Threshold field to the T calculated above, new Notify the client to change the frequency of sending ACK frames.

[0108] Furthermore, the creating of the ACK_FREQUENCY frame and sending it to the client further includes setting a sequence number of the ACK_FREQUENCY frame, wherein the sequence number of the ACK_FREQUENCY frame is a monotonically increasing number used to make the client ignore expired ACK_FREQUENCY frames, and the calculation method thereof is as follows:

[0109] SN i =SN i-1 +1

[0110] Where, SN i Is the sequence number of the currently created ACK_FREQUENCY frame, SN i It is the sequence number of the previous ACK_FREQUENCY frame. When the sequence number of the ACK_FREQUENCY frame received by the client is less than the maximum value of the received sequence number, the ACK_FREQUENCY frame is ignored.

[0111] The sequence number of the ACK_FREQUENCY frame sent by the server is increased by 1 each time. If the sequence number of the ACK_FREQUENCY frame received by the client is less than the maximum value of the sequence number received, the ACK_FREQUENCY frame will be ignored. This can avoid processing expired ACK_FREQUENCY frames that were previously sent by the server but were delayed due to network delays and other reasons.

[0112] Figure 6 The throughput comparison between the optimized QUIC protocol of the present invention and the current multiple QUIC implementations is shown. Here, comparison method 1 is the QUIC protocol before optimization; comparison method 2 is the QUIC protocol optimized using GSO technology; comparison method 3 is the QUIC protocol using the PicoTLS encryption library; comparison method 4 is a lightweight QUIC protocol implementation picoquic that is currently widely used; comparison method 5 is Alibaba's QUIC protocol implementation; comparison method 6 is Microsoft's QUIC protocol implementation; comparison method 7 is Facebook's QUIC protocol implementation. In the experiment, the server and the client are connected through a network link with a bandwidth of 10Gbps. The data transmission throughput is limited by CPU resources. It can be seen that the throughput of this method is higher than that of the current multiple QUIC implementation methods.

[0113] An efficient ACK frame processing device based on the QUIC protocol, characterized by comprising:

[0114] A data receiving module, configured to receive in batches QUIC data packets carrying ACK frames from a client, wherein the QUIC data packets carry ACK frames;

[0115] A data processing module, used to merge the ACK frames in the QUIC data packets received by the data receiving module, perform normal ACK frame processing on the merged ACK frames, and calculate the total number of ACK frames carried in the read QUIC data packets;

[0116] A calculation module is used to divide the time window according to the round-trip time of the QUIC data packet, and when a new time window is reached, calculate the average number of ACK frames obtained by each reading of the QUIC data packet in the previous time window;

[0117] The notification module is used to notify the client to update the frequency of sending ACK frames, and create an ACK_FREQUENCY frame based on the value of the updated ACK frame frequency calculated and sent to the client.

[0118] A computer device, characterized in that it includes at least one processor and a computer-readable medium storing a computer program, wherein when the computer program is read and executed by the processor, the method described in the present application is implemented.

[0119] A computer-readable medium, characterized in that the computer-readable medium stores a computer program, and when the computer program is read and executed by a processor, the method described in the present application is implemented.

[0120] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus dynamic random access memory (Rambus DRAM, referred to as RDRAM), and interface dynamic random access memory (DRDRAM).

[0121] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A QUIC-based ACK frame processing method, It is characterized in that The following steps are involved: S1. Batch read QUIC data packets from the client, where the QUIC data packets carry ACK frames; S2. Merge the ACK frames carried by the QUIC data packets in S1, perform normal ACK frame processing on the merged ACK frames, and calculate the total number of ACK frames carried by the read QUIC data packets. cn t; S3. Divide the time window according to the round-trip time of the QUIC data packet, and when a new time window is reached, calculate the average value ACK of the number of ACK frames obtained by reading the QUIC data packet each time in the previous time window. avg ; S4, notifying the client to update the frequency of sending the ACK frame, according to the ACK avg Calculate the updated ACK frame frequency value T new , create an ACK_FREQUENCY frame and send it to the client.

2. The QUIC-based ACK frame processing method according to claim 1, It is characterized in that In S1, batch reading of the QUIC data packets includes: Use the recvmmsg() system call to read UDP packets from the socket in batches from the client; The QUIC data packet is parsed from the UDP data packet.

3. The QUIC-based ACK frame processing method according to claim 1, It is characterized in that The merging of ACK frames carried by the QUIC data packets in S1 in S2 includes: merging ACK frames carried by QUIC data packets of the same QUIC connection and the same packet number space.

4. The QUIC-based ACK frame processing method according to claim 3, It is characterized in that The method for determining QUIC data packets in the same QUIC connection and the same packet number space includes: Parse the header information of the QUIC data packet; Determine whether the QUIC connections are the same and determine the data packet type according to the packet header information; Whether the packet number space is the same is determined according to the packet type of the QUIC packet.

5. The QUIC-based ACK frame processing method according to claim 1, It is characterized in that The ACK frame carried by the QUIC data packet in S1 in S2 includes: Get the ACK frame carried by the QUIC data packet of the same QUIC connection and the same packet number space; Calculate the maximum acknowledgment packet number in the combined ACK frame; Calculate the confirmation interval in the combined ACK frame.

6. The QUIC-based ACK frame processing method according to claim 5, It is characterized in that The value of the maximum acknowledgment packet number in the merged ACK frame is the maximum value of the maximum acknowledgment packet number of the ACK frame carried by the QUIC data packets in the same QUIC connection and the same packet number space. The specific calculation method is: In the formula, Largest Δ is the maximum acknowledgment packet number of the merged ACK frame, n is the number of ACK frames carried by QUIC data packets in the same QUIC connection and the same packet number space, Largest i is the maximum confirmation packet number of the i-th ACK frame.

7. The QUIC-based ACK frame processing method according to claim 5, It is characterized in that The confirmation interval in the merged ACK frame is calculated by taking the intersection of all confirmation intervals of the ACK frames carried by all QUIC data packets of the same QUIC connection and the same packet number space, wherein each ACK frame includes at least one confirmation interval.

8. The QUIC-based ACK frame processing method according to claim 1, It is characterized in that The total number of ACK frames carried in the QUIC data packet read this time is calculated in S2 cnt The total number of ACK frames carried by QUIC packets for all QUIC connections and packet number spaces.

9. The QUIC-based ACK frame processing method according to claim 1, It is characterized in that The method for dividing the time window in S3 is: When a new time window is reached, the total amount of data S transmitted at this time is recorded; When sending a data packet, record the total amount of data P transmitted when sending the data packet; When receiving the confirmation of the data packet, obtain the total amount of data P transmitted when the data packet is sent. If P ≥ S, enter a new time window.

10. The QUIC-based ACK frame processing method according to claim 1, It is characterized in that The S3 ACK avg The calculation method is as follows: Where m is the number of times data packets are read in the previous time window. The number of ACK frames carried by the k-th QUIC packet read.

11. The QUIC-based ACK frame processing method according to claim 1, It is characterized in that The S4 in T new The calculation method is as follows: Where, T old is the frequency at which the client sends ACK frames before updating, T new The updated frequency means that the client is notified every time T new After each packet, an ACK frame is sent.

12. The QUIC-based ACK frame processing method according to claim 1, It is characterized in that The creating of the ACK_FREQUENCY frame and sending it to the client comprises: Set the ACK frequency threshold T of the ACK_FREQUENCY frame new , according to the ACK frequency threshold T new Creating the ACK_FREQUENCY frame; The ACK_FREQUENCY frame is added to the sending queue.

13. The QUIC-based ACK frame processing method according to claim 1, It is characterized in that The step of creating an ACK_FREQUENCY frame and sending it to the client also includes setting a sequence number of the ACK_FREQUENCY frame, which is calculated as follows: SN i =SN i-1 +1; Where, SN i Is the sequence number of the currently created ACK_FREQUENCY frame, SN i-1 It is the sequence number of the previous ACK_FREQUENCY frame; So that the client ignores the current ACK_FREQUENCY frame when the sequence number of the current ACK_FREQUENCY frame received is smaller than the maximum value of the sequence numbers of the received ACK_FREQUENCY frames.

14. A QUIC-based ACK frame processing device, It is characterized in that include: A data receiving module, configured to receive in batches QUIC data packets carrying ACK frames from a client, wherein the QUIC data packets carry ACK frames; A data processing module, used to merge the ACK frames in the QUIC data packets received by the data receiving module, perform normal ACK frame processing on the merged ACK frames, and calculate the total number of ACK frames carried in the read QUIC data packets; A calculation module is used to divide the time window according to the round-trip time of the QUIC data packet, and when a new time window is reached, calculate the average number of ACK frames obtained by each reading of the QUIC data packet in the previous time window; The notification module is used to notify the client to update the frequency of sending ACK frames, and create an ACK_FREQUENCY frame based on the value of the updated ACK frame frequency calculated and sent to the client.

15. A computer device, It is characterized in that The invention comprises at least one processor and a computer-readable medium storing a computer program, wherein when the computer program is read and executed by the processor, the method according to any one of claims 1 to 13 is implemented.

16. A computer readable medium, It is characterized in that The computer-readable medium stores a computer program, and when the computer program is read and executed by a processor, the method according to any one of claims 1 to 13 is implemented.

Citation Information

Patent Citations

  • QUIC-based data transmission control method, system and equipment

    CN114726933A

  • Video transmission method, electronic equipment and computer storage medium

    CN117354559A

  • Communication control apparatus, method, program, and non-transitory computer readable recording medium

    US20210273889A1

  • Data processing method and electronic device

    WO2022179468A1

Cited By

  • QUIC protocol-based maximum data volume frame updating method and system

    CN122533706A

  • Quic protocol-based maximum data volume frame updating method and system

    CN122533706B