Message processing method and access device

By cached packets when the access device and retransmitted when confirming that the packet meets the conditions, the problem of TCP end-to-end retransmission delay is solved, and more efficient transmission efficiency and shorter stream completion time is achieved.

WO2025161866A1PCT designated stage Publication Date: 2025-08-07HUAWEI TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2025/070951
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-01-30
Filing Date
2025-01-07
Publication Date
2025-08-07

AI Technical Summary

Technical Problem

In the case of unstable wireless links in the last kilometer of the wide area, the end-to-end retransmission process of the Transmission Control Protocol (TCP) results in large transmission delays, affecting the flow completion time and user experience.

Method used

When the access device caches the message and retransmits the message by the access device when confirming that the message meets the retransmission conditions, it includes setting cache conditions such as the current wireless link round trip delay and message dequeue interval, using a random coefficient to judge the cache conditions to reduce storage overhead, and managing cached messages through a timer.

Benefits of technology

It effectively shortens the stream completion time, improves transmission efficiency, reduces retransmission steps and storage overhead, and improves transmission performance in situations of poor network quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025070951_07082025_PF_FP_ABST
    Figure CN2025070951_07082025_PF_FP_ABST
Patent Text Reader

Abstract

Provided in the present application is a message processing method. A message can be retransmitted by an access device when the access device caches the message and a terminal fails to receive the message. In this way, a flow transmission completed time can be effectively reduced and the transmission efficiency can be improved. The method comprises: after a message sent by a server is received, when network reference data meets a cache condition, storing the message in a local cache; after sending the message to a terminal, receiving an acknowledgment message sent by the terminal; when the acknowledgment message and the message belong to the same data flow and an acknowledgment number of the acknowledgment message is the same as a message segment sequence number of the message, incrementing the number of duplicate acknowledgments of the message by one; and when the number of duplicate acknowledgments of the message reaches a retransmission threshold, sending the message in the local cache to the terminal. The present application also provides an access device, a computer-readable medium and a computer program product, which can implement the above method.
Need to check novelty before this filing date? Find Prior Art

Description

A message processing method and access device

[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office on January 30, 2024, with application number 202410135037.9 and application name “A Message Processing Method and Access Device”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of communications, and in particular to a message processing method, access device, computer-readable storage medium, and computer program product. Background Art

[0003] Transmission Control Protocol (TCP) is a reliable communication protocol. When data packets are lost during transmission, TCP will retransmit the lost data packets.

[0004] In practical applications, wide-area last-mile wireless links are unstable, with significant bandwidth fluctuations, interference, and wall penetration causing significant packet loss during transmission. TCP end-to-end feedback and retransmission involve a long closed loop, requiring a complete control loop. This involves confirming that packets must travel from the terminal to the access device and then retransmitting them from the server to the access device and back to the terminal. This results in significant delays in packet loss recovery, severely impacting TCP flow completion time (FCT) and user experience. Summary of the Invention

[0005] The present application provides a message processing method that can cache messages on an access device and retransmit messages through the access device when the terminal has not received the message, which can effectively shorten the flow completion time and improve transmission efficiency.

[0006] A first aspect provides a message processing method, which is applied to an access device connected to a server and a terminal, respectively, wherein a TCP connection is established between the server and the terminal. The method comprises: upon receiving a message sent by the server, the access device obtains network reference data; when the network reference data meets a cache condition, indicating poor network quality, the message is stored in a local cache; after sending the message to the terminal, the access device receives a confirmation message sent by the terminal; when the confirmation message and the message belong to the same data stream and the confirmation number of the confirmation message is the same as the message segment sequence number, the number of repeated confirmations of the message is increased by one; when the number of repeated confirmations of the message reaches a retransmission threshold, the access device obtains the message from the local cache and sends the message to the terminal. When the network reference data does not meet the cache condition, the message is not stored.

[0007] The network reference data includes at least one of the current wireless link round trip time (WRTT) or the current message dequeue interval. WRTT is the time it takes for a message to travel back and forth between the access device and the terminal, and is obtained by using historical messages and their corresponding confirmation messages. The current WRTT can be T' i -T i or T' i is the time when the confirmation message of the i-th message is received, T i is the time when the i-th message is received from the server, i and j are positive integers and j <i。

[0008] This implementation allows packets to be stored on the access device even when network quality is poor. When the packet meets retransmission requirements (e.g., the number of repeated confirmations reaches the retransmission threshold), the access device retransmits the packet to the terminal. Compared to server retransmission, this effectively shortens the retransmission distance, reduces the number of retransmission steps, and reduces retransmission time.

[0009] In some possible implementations, the caching condition includes the current WRTT being greater than or equal to the product of the historical maximum WRTT and a random coefficient. Each time a message is received, a random coefficient is obtained from [0, 1] to determine whether the current WRTT is greater than or equal to the product of the historical maximum WRTT and the random coefficient. If it is, it indicates that the current wireless link quality is poor and the message is saved. If it is less than, it indicates that the current wireless link quality is good and the message is not saved. Due to the limited cache capacity of the access device, if a fixed coefficient is used instead of a random coefficient, the local cache may be insufficient. In this case, subsequent messages will be discarded and the tail message cannot be retransmitted. When a random coefficient is used, there is a certain degree of randomness when probabilistically caching messages, which can reduce storage overhead. Actual tests have shown that compared with the cache condition using a fixed coefficient, the cache condition using a random coefficient can improve the success rate of retransmitting the tail message and effectively reduce the flow completion time.

[0010] In some possible implementations, the caching condition includes a current message dequeue interval being greater than or equal to a preset time interval. If the current message dequeue interval is greater than or equal to the preset time interval, it indicates that the wireless link quality is poor and the message is cached. If the current message dequeue interval is less than the preset time interval, it indicates that the wireless link quality is good and the message is not stored.

[0011] In some possible implementations, the caching conditions include the current WRTT being greater than or equal to the product of the historical maximum WRTT and the random coefficient, and the current message dequeue interval being greater than or equal to a preset time interval. If the current WRTT is greater than or equal to the product of the historical maximum WRTT and the random coefficient, and the current message dequeue interval is greater than or equal to the preset time interval, it indicates that the wireless link quality is poor and the message is cached. If the current WRTT is less than the product of the historical maximum WRTT and the random coefficient, or the current message dequeue interval is less than the preset time interval, it indicates that the wireless link quality is good and the message is not saved.

[0012] In some possible implementations, when the network reference data meets the caching conditions, when the amount of message data in the local cache exceeds the cache threshold and the current WRTT is greater than the minimum WRTT of the cached message, the message corresponding to the minimum WRTT is deleted from the local cache and the message is stored in the local cache. The cache threshold can be a value close to or equal to the size of the local cache, which can be set according to actual conditions and is not limited in this application. The smaller the WRTT, the better the wireless link quality. Therefore, the probability of retransmission of the message with the minimum WRTT is the lowest. Replacing the cached message with the minimum WRTT with the current message can increase the probability of local retransmission in the case of limited cache.

[0013] In some possible implementations, after receiving an acknowledgment message from a terminal, the target message of the data flow to which the acknowledgment message belongs is deleted from the local cache. The target message's segment sequence number precedes the acknowledgment number of the acknowledgment message, meaning that the target message is a duplicate of a message already received by the terminal and does not need to be retransmitted. Therefore, deleting the target message frees up cache space, reducing storage overhead and facilitating storage of subsequent messages.

[0014] In some possible implementations, after receiving a completion message from a terminal or server, the messages of the data flow to which the completion message belongs are deleted from the local cache. Since the messages of the data flow do not need to be retransmitted when the data flow ends, deleting the messages of the data flow can reduce storage overhead and make it easier to store messages of other data flows.

[0015] In some possible implementations, when the message segment sequence number of the cached message is different from the confirmation number of the confirmation message, it indicates that the local cache does not store the message requested by the confirmation message, and the confirmation message is sent to the server to transparently transmit the TCP message.

[0016] In some possible implementations, when the confirmation number of the confirmation message is the same as the message segment sequence number of the message and the number of repeated confirmations of the message is less than the retransmission threshold, the confirmation message is sent to the server to transparently transmit the TCP message.

[0017] In some possible implementations, the lifetime of a data flow is obtained. When the lifetime of a data flow exceeds a lifetime threshold, packets of the data flow are deleted from the local cache. The lifetime threshold can be implemented using a data flow timer. When the lifetime of a data flow exceeds the lifetime threshold, it indicates that the storage overhead of the data flow packets is high, and the computational overhead of maintaining the data flow records is also high. Deleting packets of the data flow can reduce the computational and storage overhead of long flows and increase the available cache for short flows.

[0018] In some possible implementations, after receiving a message sent by a server, a timer is set for the message. If no confirmation message for the message is received when the timer times out, it indicates that the event of the terminal not receiving the message has timed out, and the message is retrieved from the local cache and sent to the terminal. Optionally, the start time of the timer is the time when the message is received. The duration of the timer is the timeout retransmission duration threshold. This provides a method for an access device to retransmit a message after a timeout. Compared with the server retransmitting the message after a timeout, the message retransmission between the server and the access device is reduced, thereby shortening the transmission distance of the retransmitted message, reducing the retransmission duration, and reducing the flow completion time. It should be noted that when a timer is set for a message, if the timer has not timed out and the number of repeated confirmations of the message reaches the retransmission threshold, the access device can send a message to the terminal and reset the timer. If the timer times out, the access device can send a message to the terminal and clear the number of repeated confirmations of the message to zero.

[0019] In some possible implementations, the timer satisfies the following formula: RTO =min(MAX,max(MIN,1.5*SRTT));T RTO is a timer, SRTT is smoothed RTT, MAX is the maximum value of historical WRTT, and MIN is the minimum value of historical WRTT.

[0020] A second aspect provides a message processing method, which is applied to an access device. The access device is connected to a server and a terminal, respectively. The server and the terminal establish a TCP connection. After receiving a message sent by the server, if the network reference data meets the caching conditions, it indicates that the network quality is poor. The access device stores the message in a local cache, sets a timer for the message, and then sends the message to the terminal. If the timer expires and no confirmation message for the message is received, the access device retrieves the message from the local cache and then sends the message to the terminal. If the network reference data does not meet the caching conditions, it indicates that the network quality is good, and the message is not saved, thereby reducing storage overhead.

[0021] Network reference data includes the current WRTT and / or the current packet dequeue interval. This allows packets to be stored on the access device in poor network conditions. When a terminal times out after not receiving a packet, the access device can retransmit the locally cached packet to the terminal. Compared to server retransmission, access device retransmission involves fewer steps and a shorter distance, thus shortening packet retransmission time and stream completion time.

[0022] In some possible implementations, the caching condition includes the current WRTT being greater than or equal to the product of the historical maximum WRTT and a random coefficient, where the random coefficient is in the range [0, 1]. For each received packet, a random coefficient is obtained from the range [0, 1] to determine whether the current WRTT is greater than or equal to the product of the historical maximum WRTT and the random coefficient. If it is, the current wireless link quality is poor and the packet is saved. If it is less, the current wireless link quality is good and the packet is not saved. Due to the limited cache capacity of access devices, replacing the random coefficient with a fixed coefficient can easily lead to insufficient local buffering. In this case, subsequent packets will be discarded, and the tail packet cannot be retransmitted. Using a random coefficient introduces a certain degree of randomness when probabilistically caching packets, reducing storage overhead. Actual tests have shown that compared to caching conditions using a fixed coefficient, caching conditions using a random coefficient can improve the success rate of tail packet retransmissions and effectively reduce flow completion time.

[0023] In some possible implementations, the caching condition includes a current message dequeue interval being greater than or equal to a preset time interval. If the current message dequeue interval is greater than or equal to the preset time interval, it indicates that the wireless link quality is poor and the message is cached. If the current message dequeue interval is less than the preset time interval, it indicates that the wireless link quality is good and the message is not stored.

[0024] In some possible implementations, the caching conditions include the current WRTT being greater than or equal to the product of the historical maximum WRTT and the random coefficient, and the current message dequeue interval being greater than or equal to a preset time interval. If the current WRTT is greater than or equal to the product of the historical maximum WRTT and the random coefficient, and the current message dequeue interval is greater than or equal to the preset time interval, it indicates that the wireless link quality is poor and the message is cached. If the current WRTT is less than the product of the historical maximum WRTT and the random coefficient, or the current message dequeue interval is less than the preset time interval, it indicates that the wireless link quality is good and the message is not saved.

[0025] In some possible implementations, the timer satisfies the following formula: RTO =min(MAX,max(MIN,1.5*SRTT)). T RTOis a timer, SRTT is smoothed RTT, MAX is the maximum value of historical WRTT, and MIN is the minimum value of historical WRTT. Experimental data shows that using this timer can shorten the time overhead of timeout retransmission, thereby shortening FCT.

[0026] The third aspect provides an access device, which includes a first communication module, a processing module and a second communication module, the first communication module is used to receive messages sent by the server; the processing module is used to store the message in the local cache when the network reference data meets the cache condition; the second communication module is used to send messages to the terminal and receive confirmation messages sent by the terminal; when the flow identifier of the confirmation message matches the flow identifier of the message and the confirmation number of the confirmation message is the same as the message segment sequence number of the message, the processing module is also used to increase the number of repeated confirmations of the message by one when the confirmation message and the message belong to the same data flow and the confirmation number of the confirmation message is the same as the message segment sequence number of the message; when the number of repeated confirmations of the message reaches the retransmission threshold, the message is obtained from the local cache; the second communication module is also used to send messages to the terminal.

[0027] In some possible implementations, the caching conditions include that the current WRTT is greater than or equal to the product of the historical maximum WRTT and the random coefficient, and / or the current message dequeue interval is greater than or equal to the preset time interval, and the random coefficient belongs to [0,1].

[0028] In some possible implementations, when the network reference data does not meet the cache condition, the processing module is further configured to not save the message.

[0029] In some possible implementations, when the network reference data meets the caching conditions, the processing module is also used to delete the message corresponding to the minimum WRTT in the local cache when the amount of message data in the local cache exceeds the cache threshold and the current WRTT is greater than the minimum WRTT of the cached message.

[0030] In some possible implementations, the processing module is further configured to delete, from the local cache, a target message of the data flow to which the confirmation message belongs.

[0031] In some possible implementations, the second communication module is further configured to receive a completion message sent by the terminal; and the processing module is further configured to delete, from the local cache, messages of the data flow to which the completion message belongs.

[0032] The explanation of terms in the third aspect, the steps executed by each module and the technical effects can be found in the corresponding description of the first aspect.

[0033] The fourth aspect provides an access device, which includes a first communication module, a processing module and a second communication module; the first communication module is used to receive messages sent by the server; the processing module is used to store the message in a local cache and set a timer for the message when the network reference data meets the cache conditions; the second communication module is used to send messages to the terminal; the processing module is also used to obtain the message from the local cache if no confirmation message of the message is received when the timer times out; the second communication module is also used to send messages to the terminal.

[0034] In some possible implementations, the caching conditions include that the current WRTT is greater than or equal to the product of the historical maximum WRTT and a random coefficient, and / or the current message dequeue interval is greater than or equal to a preset time interval, where the random coefficient belongs to [0,1].

[0035] In some possible implementations, when the network reference data does not meet the cache condition, the processing module is further configured to not save the message.

[0036] In some possible implementations, the timer satisfies the following formula: RTO =min(MAX,max(MIN,1.5*SRTT));T RTO is a timer, SRTT is smoothed RTT, MAX is the maximum value of historical WRTT, and MIN is the minimum value of historical WRTT.

[0037] In some possible implementations, when the network reference data meets the caching conditions, the processing module is also used to delete the message corresponding to the minimum WRTT in the local cache when the amount of message data in the local cache exceeds the cache threshold and the current WRTT is greater than the minimum WRTT of the cached message.

[0038] In some possible implementations, the processing module is further configured to delete, from the local cache, a target message of the data flow to which the confirmation message belongs.

[0039] In some possible implementations, the second communication module is further configured to receive a completion message sent by the terminal; and the processing module is further configured to delete, from the local cache, messages of the data flow to which the completion message belongs.

[0040] For the explanation of terms in the fourth aspect, the steps executed by each module and the technical effects, please refer to the corresponding description of the second aspect.

[0041] The fifth aspect provides an access device, comprising a processor and a memory; the processor is used to execute instructions stored in the memory, so that the access device executes the method described in the first aspect or any possible implementation of the first aspect.

[0042] The sixth aspect provides an access device, comprising a processor and a memory; the processor is used to execute instructions stored in the memory, so that the access device executes the method described in the second aspect or any possible implementation of the second aspect.

[0043] The seventh aspect provides a computer-readable storage medium comprising computer program instructions. When the computer program instructions are executed by a computing device, the computing device executes the method described in the first aspect or any possible implementation of the first aspect.

[0044] An eighth aspect provides a computer-readable storage medium comprising computer program instructions. When the computer program instructions are executed by a computing device, the computing device executes the method described in the second aspect or any possible implementation of the second aspect.

[0045] A ninth aspect provides a computer program product comprising instructions, which, when executed by a computing device, causes the computing device to execute the method described in the first aspect or any possible implementation of the first aspect.

[0046] The tenth aspect provides a computer program product comprising instructions, which, when executed by a computing device, causes the computing device to execute the method described in the second aspect or any possible implementation of the second aspect.

[0047] The eleventh aspect provides a chip system comprising a connected processor and memory, wherein the processor can execute instructions stored in the memory so that the chip system executes the method described in the first or second aspect above.

[0048] A twelfth aspect provides a chip system, comprising a processor for supporting an access device in implementing the functions described in the above aspects, such as sending or processing the data and / or information described in the above methods. In one possible design, the chip system further comprises a memory for storing program instructions and data necessary for the access device. The chip system may consist of a chip alone or may include a chip and other discrete components. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] FIG1 is a schematic diagram of an application scenario in an embodiment of the present application;

[0050] FIG2 is a schematic diagram of an access device retransmitting a message in an embodiment of the present application;

[0051] FIG3 is a structural diagram of an access device in an embodiment of the present application;

[0052] FIG4 is a flow chart of a message processing method according to an embodiment of the present application;

[0053] FIG5 is a schematic diagram of a message processing method according to an embodiment of the present application;

[0054] FIG6 is another flow chart of the message processing method according to an embodiment of the present application;

[0055] FIG7 is another schematic diagram of the message processing method according to an embodiment of the present application;

[0056] FIG8 is another structural diagram of the access device in an embodiment of the present application. DETAILED DESCRIPTION

[0057] The message processing method of the present application can be applied to a communication system, which includes a server, an access device and a terminal. Referring to Figure 1, in one example, the server includes a file server, a hypertext transfer protocol (HTTP) video server, a short video server and a web game server. The terminal includes a mobile phone, a tablet computer and a desktop computer. The server is connected to the access device through a network, and the access device is connected to the terminal through a wireless link. The network includes but is not limited to the Internet. It should be understood that the server and terminal shown in Figure 1 are schematic examples, and the server of the present application can also be other types of servers, and the terminal can also be other types of electronic devices. The access device can be but is not limited to a wireless router, an access point or a base station.

[0058] In one example of a web service, 70% of packet loss is caused by retransmitting packets within the RTO. During the RTO retransmission process, as the number of retransmissions increases, the retransmission duration increases exponentially. Therefore, in poor network conditions (such as unstable wireless links or interference), the RTO duration can reach 4 to 200 times the RTT. This phenomenon is known as the long tail problem and can seriously affect the user experience.

[0059] To shorten the time it takes to retransmit a message, this application provides a message processing method that, when network quality is poor, allows an access device between a server and a terminal to store the message and retransmit it through the access device. The method is described below. Referring to Figure 2, in one example, the message processing method includes the following steps:

[0060] S201. The file server sends messages 1 to 8 to an access device.

[0061] S202: The access device selects message 2, message 4, message 6, and message 8 from messages 1 to 8 for buffering.

[0062] S203 : The access device sends packets 1 to 8 to the terminal. The terminal receives packets 1 to 3 and 5 to 8. Packet 4 is lost.

[0063] S204: The terminal sends an ACK to the access device.

[0064] Each time a terminal receives a message, it returns an ACK. For example, after receiving message 3, the terminal returns an ACK to the access device. The ACK's acknowledgment number is 4, indicating a request to receive message 4. After receiving messages 5, 6, and 7, the terminal returns an ACK to the access device each time. All three ACKs have the acknowledgment number 4. These three ACKs are called duplicate acknowledgment messages.

[0065] S205: The access device sends message 4 to the terminal.

[0066] When the access device receives the ACK based on message 7, that is, when it receives the third repeated confirmation message, it obtains message 4 from the cache according to the confirmation number and sends message 4 to the terminal.

[0067] S206: The terminal obtains a message sequence including messages 1 to 8.

[0068] It should be noted that the steps for HTTP video servers, short video servers and web game servers to send messages are similar to the steps for file servers to send messages. The steps for access devices to process messages can refer to the corresponding descriptions in the embodiments of Figures 2, 4, 5, 6 or 7.

[0069] The following is a detailed introduction to the access device that implements the message processing method of the present application. Referring to Figure 3, in one embodiment, the access device 300 of the present application includes a first communication module 301, a processing module 302, and a second communication module 303. The first communication module 301 is used to receive messages sent by the server; the processing module 302 is used to store the message in a local cache when the network reference data meets the cache condition; the second communication module 303 is used to receive a confirmation message sent by the terminal after sending the message to the terminal; the processing module 302 is also used to increase the number of repeated confirmations of the message in the flow table by one when the confirmation message and the message belong to the same data flow and the confirmation number of the confirmation message is the same as the message segment sequence number of the message; when the number of repeated confirmations of the message reaches the retransmission threshold, the message is retrieved from the local cache; the second communication module 303 is also used to send the message to the terminal. The cache condition includes that the current WRTT is greater than or equal to the product of the historical maximum WRTT and the random coefficient, and / or that the current message dequeue interval is greater than or equal to the preset time interval.

[0070] In an optional embodiment, when the network reference data does not meet the cache condition, the processing module 302 is further configured to not save the message.

[0071] In an optional embodiment, when the network reference data meets the cache conditions, the processing module 302 is further used to delete the message corresponding to the minimum WRTT in the local cache when the amount of message data in the local cache exceeds the cache threshold and the current WRTT is greater than the minimum WRTT of the cached message.

[0072] In another optional embodiment, the processing module 302 is further configured to delete a target message of the data flow to which the confirmation message belongs from the local cache, where the message segment sequence number of the target message is before the confirmation number of the confirmation message.

[0073] In another optional embodiment, the first communication module 301 is further configured to receive a completion message sent by the terminal; and the processing module 302 is further configured to delete messages of the data flow to which the completion message belongs from the local cache.

[0074] The access device 300 may also perform the functions of any of the access devices in the embodiment shown in Figure 6. In another optional embodiment, the first communication module 301 is configured to receive a message sent by a server; the processing module 302 is configured to store the message in a local cache and set a timer for the message when the network reference data meets the cache condition; the second communication module 303 is configured to send the message to the terminal; the processing module 302 is further configured to retrieve the message from the local cache if the timer expires and no confirmation message for the message is received; and the second communication module 303 is further configured to send the message to the terminal.

[0075] It should be noted that, in other embodiments, the processing module 302 can be used to execute any step in the message processing method shown in Figures 2, 4, and 6, the first communication module 301 can be used to execute any step in the message processing method shown in Figures 2, 4, and 6, and the second communication module 303 can be used to execute any step in the message processing method shown in Figures 2, 4, and 6. The steps that the first communication module 301, the processing module 302, and the second communication module 303 are responsible for implementing can be specified as needed. The full functions of the computing device 300 are realized by the first communication module 301, the processing module 302, and the second communication module 303 respectively implementing different steps in the message processing method. For the explanation of terms and technical effects in the embodiment shown in Figure 3, please refer to the corresponding description of the embodiment shown in Figure 4 or Figure 6.

[0076] The following describes the message retransmission method of the present application, which includes access device fast retransmission and access device timeout retransmission:

[0077] 1. Fast retransmission of access devices:

[0078] Referring to FIG4 , an embodiment of the message processing method of the present application includes the following steps:

[0079] S401: The access device receives a message sent by a server.

[0080] In this embodiment, a TCP connection is established between the server and the terminal, and the message sent by the server includes a TCP message header and an Internet Protocol (IP) message header.

[0081] During the handshake phase of establishing a TCP connection, the access device can obtain the flow identifier of the message based on the synchronize (SYN) message and add it to the flow table. The access device can be configured with multiple flow tables. For example, the flow table entries of the first flow table include the flow identifier, the message segment sequence number, and the timer for timeout retransmission. The second flow table includes the flow identifier, the confirmation number of the most recently confirmed message, and the number of repeated confirmations for fast retransmission. The third flow table includes the flow identifier and the life threshold of the data flow. It should be understood that the flow table type and flow table attributes of the present application are not limited to the above examples, and can be adjusted according to actual needs. Optionally, the flow identifier of the message is an IP quintuple, and the IP quintuple includes the source port, destination port, source IP address, destination IP address, and transport layer protocol. Another option is that the flow identifier of the message is a hash value obtained by hashing the IP quintuple, and using the hash value to match the data flow is faster.

[0082] S402: The access device determines whether the current WRTT is greater than or equal to the historical maximum WRTT*random coefficient. If so, S403 is executed; if not, the message is not saved.

[0083] WRTT refers to the time it takes for a message to travel back and forth between the access device and the terminal. Optionally, the current WRTT is equal to T' i -T i , T' i is the time when the confirmation message of the i-th message is received, T i The current WRTT is the time at which the i-th message is received from the server, where i is a positive integer. For example, if the 10th message is received at the current moment and the last ACK received is the ACK for the 8th message, the current WRTT is calculated based on the time at which the 8th message was received and the time at which the ACK for the 8th message was received. It should be noted that the message corresponding to the current WRTT and the message corresponding to the historical WRTT belong to the same data stream, and the historical maximum WRTT is the maximum value among the historical WRTTs.

[0084] Alternatively, the current WRTT is equal to T' i is the time when the confirmation message of the i-th message is received, T iThe time at which the i-th message from the server is received. j is a positive integer less than i. The value of j can be set based on actual conditions and is not limited by this application. The current WRTT is calculated by calculating the time at which the most recent messages and confirmation messages are received using a sliding average method.

[0085] Due to the limited cache capacity of access devices, using a fixed coefficient instead of a random coefficient can easily lead to insufficient local cache capacity. This can cause subsequent packets to be discarded, preventing the retransmission of tail packets. Using a random coefficient randomly stores some packets, reducing storage overhead. Actual tests have shown that compared to using a fixed coefficient, using a random coefficient cache improves the success rate of tail packet retransmission and effectively reduces flow completion time.

[0086] S403: The access device determines whether the current message dequeue interval is greater than or equal to the preset time interval. If so, S404 is executed. If not, the message is not saved. The current message dequeue interval refers to the time difference between the current message dequeue time and the next message dequeue time.

[0087] S404: The access device saves the message in a local cache.

[0088] If the current WRTT is greater than or equal to the historical maximum WRTT*random coefficient and the current message dequeue interval is greater than or equal to the preset time interval, it indicates that the quality of the wireless link is poor and the message is saved in the local cache.

[0089] S405: The access device sends a message to the terminal.

[0090] S406: The access device receives a confirmation message sent by the terminal.

[0091] After receiving the i-th message, the terminal returns an acknowledgment message for the i-th message. The acknowledgment message is ACK. For example, the acknowledgment number of ACK is 50001, indicating that the terminal has not received the message with the message segment number 50001.

[0092] If the terminal does not receive the i-th message, it will send a confirmation message for the i+1-th message to the access device after receiving the i+1-th message. At this time, the confirmation number carried by the confirmation message for the i+1-th message is the message segment sequence number of the i-th message.

[0093] S407: When the confirmation message and the message belong to the same data flow and the confirmation number of the confirmation message is the same as the message segment sequence number of the message, the access device increases the number of repeated confirmations of the message by one.

[0094] If the flow identifier of the confirmation message is the same as the flow identifier of the message, it indicates that the confirmation message and the message belong to the same data flow. If the flow identifier of the confirmation message and the flow identifier of the message are different, it indicates that the confirmation message and the message belong to different data flows. The value by which the number of repeated confirmations is incremented can be, but is not limited to, 1. The specific value can be set according to actual circumstances and is not limited by this application.

[0095] Optionally, the flow table includes the flow table entries shown in Table 1:

[0096] Table 1

[0097] S408: When the number of repeated confirmations of the message reaches the retransmission threshold, the access device obtains the message from the local cache.

[0098] S409: The access device sends a message to the terminal.

[0099] The retransmission threshold can be 3, 4, 5, or 6. This application does not impose a limit on the retransmission threshold and can be set based on actual conditions. When the number of repeated confirmations of a message reaches the retransmission threshold, it indicates that the terminal has not received the message for a period of time. At this time, the access device retrieves the message from the local cache and sends the message to the terminal, thereby achieving fast retransmission.

[0100] In this embodiment, when network quality is poor, the message can be stored on the access device. When the message meets the retransmission conditions, the access device retransmits the message to the terminal. Compared with server retransmission, this can effectively shorten the message retransmission distance, reduce the message retransmission steps, and reduce the message retransmission time.

[0101] Secondly, when the network conditions are poor, some messages can be cached, which can reduce the number of messages cached by the access device and reduce storage overhead.

[0102] Thirdly, since the access device can retransmit the message, there is no need for the server to retransmit the message, thus reducing the packet loss caused by poor network quality between the server and the access device.

[0103] Moreover, when the terminal does not receive the message, the terminal can trigger retransmission by sending several confirmation messages, which is faster than the retransmission speed of timeout retransmission.

[0104] The network reference data of the present application may include the current WRTT and / or the current message dequeue interval. When the network reference data includes the current WRTT, the present application executes S402 and then skips S403 to execute S404. When the network reference data includes the current message dequeue interval, the present application may skip S402 and directly execute S403.

[0105] When the number of messages stored in the cache of the access device reaches the upper limit, the network quality may be poor and the message cannot be saved. The present application can replace messages with low packet loss probability with messages with high packet loss probability, thereby improving the reliability of message retransmission. In another optional embodiment, when the network reference data meets the cache conditions, the message processing method of the present application also includes: when the amount of message data in the local cache exceeds the cache threshold and the current WRTT is greater than the minimum WRTT of the cached message, the message corresponding to the minimum WRTT is deleted from the local cache, and then S404 is executed.

[0106] Optionally, the flow table includes flow table entries as shown in Table 2:

[0107] Table 2

[0108] The wireless link quality corresponding to the minimum WRTT is generally better than that corresponding to other WRTTs, and the probability of retransmission is lower. Replacing the message corresponding to the minimum WRTT in the cache with a message with a larger WRTT can improve the hit rate of retransmitted messages in the case of limited cache.

[0109] The present application also provides another method for reducing storage overhead of an access device. In another optional embodiment, the message processing method of the present application further includes: deleting a target message of the data flow to which the confirmation message belongs from a local cache. The target message's message segment sequence number precedes the confirmation number of the confirmation message, indicating that the target message is a duplicate of a message already received by the terminal and that the received message does not need to be retransmitted. Therefore, deleting the target message from the local cache frees cache space and reduces storage overhead.

[0110] For confirmation messages that do not trigger retransmission, the access device in this application can forward the confirmation message to the server, thereby achieving TCP message transparent transmission. In an optional embodiment, when the flow identifier of the cached message does not match the flow identifier of the confirmation message, indicating that the locally cached message and the confirmation message belong to different data flows, the confirmation message is sent to the server. For data flow messages not stored in the local cache, the access device transparently transmits the confirmation message, allowing the server and terminal to transmit messages based on TCP.

[0111] In another optional embodiment, the message processing method of the present application further includes: when the message segment sequence number of the cached message is different from the confirmation number of the confirmation message, indicating that the local cache does not have the message requested by the confirmation message, sending the confirmation message to the server. For messages not stored in the local cache, the access device transparently transmits the confirmation message, enabling the server and the terminal to transmit messages based on TCP.

[0112] In another optional embodiment, the message processing method of the present application further includes: when the confirmation number of the confirmation message is the same as the message segment sequence number and the number of repeated confirmations of the message is less than the retransmission threshold, sending the confirmation message to the server. For messages stored in the local cache, when the number of repeated confirmations is less than the retransmission threshold, the access device transparently transmits the confirmation message, enabling the server and terminal to transmit messages based on TCP. In this case, the access device does not retransmit the message, which can reduce the number of retransmissions and reduce the resource overhead of retransmitting the message.

[0113] After the TCP connection ends, there is no need to retransmit the message, and the present application can clear the messages related to the TCP connection in the cache. In another optional embodiment, the message processing method of the present application also includes: receiving a completion message sent by the terminal, and deleting the message of the data flow to which the completion message belongs in the local cache.

[0114] In this embodiment, the completion message may be, but is not limited to, a FIN message or a FIN ACK message. When a TCP connection ends, deleting the messages of the data flow related to the TCP connection in the local cache can save storage overhead and increase available cache.

[0115] In another optional embodiment, the message processing method of the present application further includes: receiving a completion message sent by the server, and deleting messages of the data flow to which the completion message belongs in the local cache.

[0116] In this embodiment, when the TCP connection ends, the packets of the data flow related to the TCP connection in the local cache can be deleted to increase the available cache.

[0117] In another optional embodiment, the message processing method of the present application further includes: obtaining the lifetime of the data flow, and when the lifetime of the data flow is greater than a lifetime threshold, deleting the message of the data flow in the local cache.

[0118] Optionally, the life threshold included in the flow table may be as shown in Table 3:

[0119] Table 3

[0120] When a data flow's lifetime exceeds the lifetime threshold, it is considered a long-lived flow. The access device can delete the locally cached long flows and their flow entries to save storage. Maintaining only short-lived flows reduces computational and storage overhead compared to maintaining all data flows.

[0121] To facilitate understanding, the message processing method of this application is described below using a specific application scenario. Referring to Figure 5, in one example, a server sends a SYN message to an access device, which then sends the SYN message to a terminal. A three-way handshake establishes a TCP connection. The server then continues to send messages to the access device, and each time the terminal receives a data message, it sends back an ACK. For example, for message P50, after the access device sends P50 to the terminal, the terminal sends back an ACK, i.e., ACK for P51.

[0122] The server sends P51 to P55 to the access device. The access device obtains the current WRTT. When the current WRTT is greater than or equal to the WRTT threshold, it stores P51 to P55 in its local cache. The access device sends P51 to P55 to the terminal. Due to packet loss caused by network quality, the terminal does not receive P51. The terminal then sends an ACK (ACK for P51) back to the access device. After receiving P52 to P54, the terminal also sends an ACK (ACK for P51). These three ACKs are duplicate acknowledgment messages (dupack). When the number of duplicate acknowledgment messages reaches three, the access device obtains P51 from its local cache and sends it to the terminal.

[0123] 2. Access device timeout retransmission:

[0124] Referring to FIG6 , another embodiment of the message processing method in the present application includes:

[0125] S601: The access device receives a message sent by a server.

[0126] S602: The access device determines whether the current WRTT is greater than or equal to the historical maximum WRTT*random coefficient. If so, execute S603; if not, do not save the message.

[0127] S603: The access device determines whether the current message dequeue interval is greater than or equal to the preset time interval. If so, execute S604; if not, do not save the message.

[0128] S604: The access device stores the message in a local cache and sets a timer for the message.

[0129] It should be noted that the process of caching messages in S601 to S604 is similar to that in S401 to S404 , and for details, please refer to the corresponding records in the embodiment shown in FIG. 4 .

[0130] Optionally, the timer satisfies the following formula: T RTO =min(MAX,max(MIN,1.5*SRTT));T RTOis a timer, SRTT is smoothed RTT, MAX is the maximum value in the history WRTT, and MIN is the minimum value in the history WRTT. For the i-th message, MAX is the maximum value of the previous i-1 RTTs, MIN is the minimum value of the previous i-1 RTTs, and SRTT is the i-1th smoothed RTT. Optional, SRTT i-1 =0.8SRTT i-2 +0.2WRTT i-1 .

[0131] The access device may set a flow table including a timer. Optionally, the flow table includes the flow table entries shown in Table 4:

[0132] Table 4

[0133] In Table 4, p2, p4, p5, and p6 are segment numbers, WRTT2, WRTT4, WRTT5, and WRTT6 are WRTTs, and WRTT is optional. Timer is a timer.

[0134] S605: The access device sends a message to the terminal.

[0135] S606: When the timer times out and no confirmation message is received for the message, the access device obtains the message from the local cache.

[0136] Specifically, after the access device sends the i-th message, the terminal sends back an ACK with the same acknowledgment number as the sequence number of the i-th message segment, indicating that the terminal has not received the acknowledgment message for the i-th message. If the acknowledgment number of the ACK sent back by the terminal is greater than the sequence number of the i-th message segment, the terminal has received the acknowledgment message for the i-th message. If the acknowledgment message for the message is not received after the timer expires, it indicates that the message has timed out.

[0137] S607: The access device sends a message to the terminal.

[0138] In this embodiment, when network quality is poor, packets can be stored on the access device. If a terminal times out while receiving a packet, the access device can retransmit the locally cached packet to the terminal. Compared to server retransmission, packet retransmission on the access device involves fewer steps and a shorter transmission distance, thus shortening packet retransmission time and stream completion time.

[0139] The network reference data of the present application may include the current WRTT and / or the current message dequeue interval. When the network reference data includes the current WRTT, the present application executes S602 and then skips S603 and executes S604. When the network reference data includes the current message dequeue interval, the present application may skip S602 and execute S603 directly.

[0140] Based on the embodiment shown in FIG6 , the message processing method of the present application also includes the following optional embodiments:

[0141] In another optional embodiment, the message processing method of the present application further includes: deleting the target message of the data flow to which the confirmation message belongs from the local cache.

[0142] In an optional embodiment, when the flow identifier of the cached message does not match the flow identifier of the confirmation message, it indicates that the locally cached message and the confirmation message belong to different data flows, and the confirmation message is sent to the server.

[0143] In another optional embodiment, the message processing method of the present application further includes: when the message segment sequence number of the cached message is different from the confirmation number of the confirmation message, it indicates that the local cache does not have the message requested by the confirmation message, and the confirmation message is sent to the server.

[0144] In another optional embodiment, the message processing method of the present application further includes: when the confirmation number of the confirmation message is the same as the message segment sequence number of the message and the number of repeated confirmations of the message is less than the retransmission threshold, sending the confirmation message to the server.

[0145] In another optional embodiment, the message processing method of the present application further includes: receiving a completion message sent by the server, and deleting messages of the data flow to which the completion message belongs in the local cache.

[0146] In another optional embodiment, the message processing method of the present application further includes: obtaining the lifetime of the data flow, and when the lifetime of the data flow is greater than a lifetime threshold, deleting the message of the data flow in the local cache.

[0147] The steps and technical effects in the optional embodiment of the embodiment shown in Figure 6 can be found in the corresponding records above and will not be repeated here.

[0148] To facilitate understanding, the message processing method in the embodiment shown in Figure 6 is described below using a specific application scenario. Referring to Figure 7, in one example, a server sends a SYN message to an access device. The access device then sends the SYN message to a terminal, establishing a TCP connection through a three-way handshake. The server then continues to send messages to the access device. For example, for message P50, after the access device sends P50 to the terminal, the terminal sends an ACK (ACK for P51) back to the access device.

[0149] The server sends P51 to P55 to the access device, and the access device obtains the current WRTT. When the current WRTT is greater than or equal to the WRTT threshold, P51 to P55 are stored in the local cache and a timer (T RTOAfter the access device sends P51 to P55 to the terminal, the terminal does not receive P55 due to packet loss caused by network quality. The terminal then sends an ACK to the access device, i.e., ACK for P55. The access device sends a ACK to the terminal at T RTO If the access device does not receive a P55 confirmation message within 10 seconds, that is, does not receive a message with a confirmation number greater than the message segment number of P55, the P55 confirmation timer will time out. When the P55 timer times out, the access device obtains P55 from the local cache and sends P55 to the terminal.

[0150] 8 , the present application provides an access device 800, which includes a bus 802, a processor 804, a memory 806, and a communication interface 808. The processor 804, the memory 806, and the communication interface 808 are connected via the bus 802. It should be understood that the present application does not limit the number of processors and memories in the access device 800.

[0151] The processor 804 may include any one or more processors such as a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP).

[0152] The memory 806 may include a volatile memory, such as a random access memory (RAM). The memory 806 may also include a non-volatile memory, such as a read-only memory (ROM), a flash memory, a hard disk drive (HDD), or a solid state drive (SSD). The memory 806 stores executable program code, and the processor 804 executes the executable program code to implement the aforementioned message processing method. Specifically, the memory 806 stores instructions for executing the message processing method.

[0153] The communication interface 808 uses a transceiver module such as, but not limited to, a network interface card or a transceiver to implement communication between the access device 800 and other devices or a communication network.

[0154] It should be noted that the processor 804 can implement the functions of the processing module 302. The communication interface 808 can implement the functions of the first communication module 301 and the second communication module 303 under the control of the processor 804.

[0155] The present application provides a computer-readable storage medium, in which a computer program is stored. When the computer-readable storage medium is run on a computer, the computer is enabled to execute the message processing method in the above embodiment or the optional embodiment.

[0156] The present application also provides a computer program product, which, when executed on a computer, enables the computer to execute the message processing method in the above-mentioned embodiment or optional embodiment.

[0157] The present application also provides a chip system, which includes a processor and a memory coupled to each other. The memory is used to store computer programs or instructions, and the processor is used to execute the computer programs or instructions stored in the memory, so that the access device performs the steps performed by the access device in the above embodiment. Optionally, the memory is a memory within the chip, such as a register, a cache, etc. The memory can also be a memory located outside the chip within the site, such as a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM), etc. The processor mentioned in any of the above places can be a general-purpose central processing unit, a microprocessor, an application specific integrated circuit (ASIC) or one or more integrated circuits for implementing the above-mentioned message processing method.

[0158] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the protection scope of the technical solutions of the embodiments of the present application.

Claims

1. A message processing method, characterized in that: The method is applied to an access device, the access device is connected to a server and a terminal respectively, the server establishes a Transmission Control Protocol (TCP) connection with the terminal, and the method includes: receiving a message sent by the server; When the network reference data meets the cache condition, the message is stored in the local cache, wherein the network reference data includes at least one of the current radio link round trip delay WRTT or the current message dequeue interval; sending the message to the terminal; Receiving the confirmation message sent by the terminal; When the confirmation message and the message belong to the same data flow and the confirmation number of the confirmation message is the same as the message segment sequence number of the message, increase the number of repeated confirmations of the message by one; When the number of repeated confirmations of the message reaches a retransmission threshold, obtaining the message from the local cache; Sending the message to the terminal.

2. The method according to claim 1, characterized in that The cache conditions include that the current WRTT is greater than or equal to the product of the historical maximum WRTT and a random coefficient, and / or the current message dequeue interval is greater than or equal to a preset time interval, wherein the random coefficient belongs to [0, 1].

3. The method according to claim 1, characterized in that The method further comprises: When the network reference data does not meet the cache condition, the message is not saved.

4. The method according to claim 1, wherein Before storing the message in the local cache, the method further includes: When the amount of message data in the local cache exceeds a cache threshold and the current WRTT is greater than a minimum WRTT of cached messages, the message corresponding to the minimum WRTT is deleted from the local cache.

5. The method according to any one of claims 1 to 4, characterized in that The method further comprises: The target message of the data flow to which the confirmation message belongs is deleted from the local cache, wherein the message segment sequence number of the target message is before the confirmation number of the confirmation message.

6. The method according to any one of claims 1 to 4, characterized in that The method further comprises: receiving a completion message sent by the terminal; The message of the data flow to which the completion message belongs is deleted from the local cache.

7. A message processing method, characterized in that: The method is applied to an access device, the access device is connected to a server and a terminal respectively, the server establishes a Transmission Control Protocol (TCP) connection with the terminal, and the method includes: Receive messages sent by the server; When the network reference data meets the cache condition, the message is stored in the local cache and a timer is set for the message, wherein the network reference data includes at least one of the current radio link round trip delay WRTT or the current message dequeue interval; Sending the message to the terminal; When the timer times out and no confirmation message for the message is received, obtaining the message from the local cache; Send the message to the terminal.

8. The method according to claim 7, characterized in that The cache conditions include that the current WRTT is greater than or equal to the product of the historical maximum WRTT and a random coefficient, and / or the current message dequeue interval is greater than or equal to a preset time interval, wherein the random coefficient belongs to [0, 1].

9. The method according to claim 7, characterized in that The method further comprises: When the network reference data does not meet the cache condition, the message is not saved.

10. The method according to any one of claims 7 to 9, characterized in that The timer satisfies the following formula: RTO =min(MAX,max(MIN,1.5*SRTT)); T RTO It is a timer, SRTT is smoothed RTT, MAX is the historical maximum WRTT, and MIN is the historical minimum WRTT.

11. An access device, characterized in that: include: A first communication module, configured to receive a message sent by a server; a processing module, configured to store the message in a local cache when network reference data meets a cache condition, wherein the network reference data includes at least one of a current radio link round trip delay WRTT or a current message dequeue interval; A second communication module is configured to send the message to the terminal and receive a confirmation message sent by the terminal; The processing module is further configured to, when the confirmation message and the message belong to the same data flow and the confirmation number of the confirmation message is the same as the message segment sequence number of the message, increase the number of repeated confirmations of the message by one; and when the number of repeated confirmations of the message reaches a retransmission threshold, obtain the message from the local cache; The second communication module is further configured to send the message to the terminal.

12. The access device according to claim 11, characterized in that: The cache conditions include that the current WRTT is greater than or equal to the product of the historical maximum WRTT and a random coefficient, and / or the current message dequeue interval is greater than or equal to a preset time interval, and the random coefficient belongs to [0, 1].

13. The access device according to claim 11, characterized in that: When the network reference data does not meet the cache condition, the processing module is further configured to not save the message.

14. The access device according to claim 11, characterized in that: When the network reference data meets the cache conditions, the processing module is also used to delete the message corresponding to the minimum WRTT in the local cache when the amount of message data in the local cache exceeds the cache threshold and the current WRTT is greater than the minimum WRTT of the cached message.

15. The access device according to any one of claims 11 to 14, characterized in that: The processing module is further configured to delete a target message of the data flow to which the confirmation message belongs from the local cache, wherein the message segment sequence number of the target message is before the confirmation number of the confirmation message.

16. The access device according to any one of claims 11 to 14, characterized in that: The second communication module is further configured to receive a completion message sent by the terminal; and the processing module is further configured to delete, from the local cache, messages of the data flow to which the completion message belongs.

17. An access device, characterized in that: include: A first communication module, configured to receive a message sent by a server; a processing module, configured to store the message in a local cache and set a timer for the message when the network reference data meets a cache condition; A second communication module, configured to send the message to the terminal; The processing module is further configured to, when the timer times out and no confirmation message of the message is received, obtain the message from the local cache; The second communication module is further configured to send the message to the terminal.

18. The access device according to claim 17, characterized in that: The cache conditions include that the current WRTT is greater than or equal to the product of the historical maximum WRTT and a random coefficient, and / or the current message dequeue interval is greater than or equal to a preset time interval, wherein the random coefficient belongs to [0, 1].

19. The access device according to claim 17, wherein: When the network reference data does not meet the cache condition, the processing module is further configured to not save the message.

20. The access device according to any one of claims 17 to 19, characterized in that: The timer satisfies the following formula: RTO =min(MAX,max(MIN,1.5*SRTT)); T RTO It is a timer, SRTT is smoothed RTT, MAX is the historical maximum WRTT, and MIN is the historical minimum WRTT.

21. An access device, characterized in that: The device comprises a processor and a memory, wherein the processor is configured to execute instructions stored in the memory so as to enable the access device to execute the method according to any one of claims 1 to 10.

22. A computer-readable storage medium, characterized in that The method comprises computer program instructions which, when executed by a computing device, cause the computing device to perform the method according to any one of claims 1 to 10.

23. A computer program product comprising instructions, characterized in that When the instructions are executed by a computing device, the computing device is caused to perform the method according to any one of claims 1 to 10.

Citation Information

Patent Citations

  • Message processing method and access device

    CN120415653A

  • Method and device for realizing TCP (Transmission Control Protocol) transmission

    CN102355462A

  • Processing method and device of transmission control protocol during network congestion

    CN110213167A

  • Communications device serving as transmission control protocol (TCP) proxy

    US20170117999A1

  • TCP throughput control by imposing temporal delay

    US8379515B1