CPC H04W 76/16 (2018.02) [H04L 43/0852 (2013.01); H04L 69/14 (2013.01); H04W 80/06 (2013.01); H04W 84/12 (2013.01); H04W 88/06 (2013.01)] | 18 Claims |
1. A connection establishment method, comprising:
obtaining, by a terminal device, historical data of a multipath transmission control protocol (MPTCP) connection established between the terminal device and an application server,
wherein the historical data comprises a data transmission delay of a transmission control protocol (TCP) connection associated with a Wi-Fi network and a data transmission delay of a TCP connection associated with a cellular network;
determining, by the terminal device by using the historical data, a first average value μ1 of the data transmission delay of the TCP connection associated with the Wi-Fi network, a second average value μ2 of the data transmission delay of the TCP connection associated with the cellular network, and a standard deviation σ of the data transmission delay of the TCP connection associated with the Wi-Fi network, wherein
based on μ2≤μ1+2×σ, determining, by the terminal device based on the historical data, that the data transmission delay of the TCP connection associated with the cellular network is less than or equal to the data transmission delay of the TCP connection associated with the Wi-Fi network,
wherein x1 to xN are data transmission delays of the TCP connection associated with the Wi-Fi network, N is a quantity of data transmission delays of the TCP connection associated with the Wi-Fi network, y1 to yM are data transmission delays of the TCP connection associated with the cellular network, and M is a quantity of data transmission delays of the TCP connection associated with the cellular network;
based on determining that the data transmission delay of the TCP connection associated with the cellular network is less than or equal to the data transmission delay of the TCP connection associated with the Wi-Fi network, establishing, by the terminal device, a first TCP connection to the application server through an interface of the cellular network; and
after the first TCP connection is successfully established, establishing, by the terminal device, a second TCP connection to the application server through an interface of the Wi-Fi network.
|