CPC H04L 45/42 (2013.01) [H04L 45/22 (2013.01); H04L 45/566 (2013.01); H04L 67/563 (2022.05)] | 20 Claims |
1. A data transmission method, comprising:
obtaining, by an acceleration application on a terminal device, an application packet generated by a target application running on the terminal device;
determining, by the acceleration application, that the target application belongs to a set of applications preconfigured as applications that need accelerated transmission; and
in response to determining that the target application belongs to the set of applications:
setting, by the acceleration application, an identifier in a header of the application packet;
transmitting, by the acceleration application, the application packet with the identifier to a proxy server via a first routing device using a network data channel interface of the terminal device;
converting, by the acceleration application, the application packet into a corresponding short-range format packet and setting the identifier in a header of the corresponding short-range format packet; and
transmitting, by the acceleration application, the corresponding short-range format packet to a short-range device using a short-range wireless data channel interface of the terminal device different from the network data channel interface, wherein the short-range device converts the corresponding short-range format packet back to a corresponding application packet and transmits the corresponding application packet to the proxy server via a second routing device, and wherein the application packet and the corresponding short-range format packet both have a destination of an application server corresponding to the target application and are routed via the proxy server based on a deduplication mechanism;
after the application packet and the corresponding short-range format packet are transmitted, receiving, by the acceleration application, a current reply packet returned by the application server via the proxy server, the current reply packet being transmitted using the network data channel interface via the first routing device or using the short-range wireless data channel interface via the second routing device;
determining, by the acceleration application, that the identifier is set in the current reply packet and, in response to determining that the identifier is set in the current reply packet, determining whether a previously received reply packet has the identifier;
in response to determining that no previously received reply packet has the identifier, providing the current reply packet to the target application; and
in response to determining that a previously received reply packet has the identifier, discarding the current reply packet.
|