Application server access method and terminal
AssigneeHuawei Technologies Co., Ltd.
InventorsBinjun Liu, Yuwei Fan, Fusheng Shen, Weichen Zhu, Lixin Lin, Ying Zhu
Life of this patent
Estimating the term…
Abstract
The present disclosure relates to application server access methods and terminals. One example method includes in response to a terminal failing to connect to an application server by using an IPv6 address, setting an accessed domain name to a restricted domain name, and, when the accessed domain name is re-accessed later, connecting to the application server by directly using an IPv4 address.
Claims17
A communications system, comprising a terminal, a domain name system server, and an application server, wherein:
- the terminal is configured to:
- receive a first operation of a user, wherein the first operation indicates to access a first domain name;
- and
- send a first domain name resolution request to the domain name system server, wherein the first domain name resolution request is used to request an IPv4 address and an IPv6 address corresponding to the first domain name;
- the domain name system server is configured to return, according to the first domain name resolution request, the IPv4 address and the IPv6 address corresponding to the first domain name to the terminal;
- and
- the terminal is further configured to:
- send a first connection request to the application server, wherein the first connection request comprises the IPv6 address corresponding to the first domain name;
- in response to determining that connection to the application server by using the IPv6 address fails, set the first domain name corresponding to the IPv6 address to restricted information;
- receive a second operation of the user, wherein the second operation indicates to re-access the first domain name;
- send a second connection request to the application server, wherein the second connection request comprises the IPv4 address corresponding to the first domain name;
- and
- in response to determining that air-interface communication of the terminal is normal and determining that a retransmission timer comprises an IPv6-type socket, a status of the IPv6-type socket is a preset state, and a quantity of retransmission times of the first connection request is greater than a preset quantity of times, determine that the connection to the application server by using the IPv6 address fails.
An application server access method, wherein the method comprises:
- receiving, by a terminal, a first operation of a user, wherein the first operation indicates to access a first domain name;
- sending, by the terminal, a first domain name resolution request to a domain name system server in response to receiving the first operation of the user, wherein the first domain name resolution request is used to request an IPv4 address and an IPv6 address corresponding to the first domain name;
- sending, by the terminal, a first connection request to an application server, wherein the first connection request comprises the IPv6 address corresponding to the first domain name;
- in response to determining that connection to the application server by using the IPv6 address fails, setting, by the terminal, the first domain name corresponding to the IPv6 address to restricted information;
- receiving, by the terminal, a second operation of the user, wherein the second operation indicates to re-access the first domain name;
- sending, by the terminal, a second connection request to the application server in response to receiving the second operation of the user, wherein the second connection request comprises the IPv4 address corresponding to the first domain name;
- and
- in response to determining that air-interface communication of the terminal is normal and determining that a retransmission timer comprises an IPv6-type socket, a status of the IPv6-type socket is a preset state, and a quantity of retransmission times of the first connection request is greater than a preset quantity of times, determining, by the terminal, that the connection to the application server by using the IPv6 address fails.
A terminal, comprising:
- at least one processor;
- a memory;
- and
- a touchscreen, wherein the memory and the touchscreen are coupled to the at least one processor, and the memory stores programming instructions for execution by the at least one processor to cause the terminal to perform operations comprising:
- receiving a first operation of a user, wherein the first operation indicates to access a first domain name;
- sending a first domain name resolution request to a domain name system server in response to receiving the first operation of the user, wherein the first domain name resolution request is used to request an IPv4 address and an IPv6 address corresponding to the first domain name;
- sending a first connection request to an application server, wherein the first connection request comprises the IPv6 address corresponding to the first domain name;
- in response to determining that connection to the application server by using the IPv6 address fails, setting the first domain name corresponding to the IPv6 address to restricted information;
- receiving a second operation of the user, wherein the second operation indicates to re-access the first domain name;
- sending, by the terminal, a second connection request to the application server in response to receiving the second operation of the user, wherein the second connection request comprises the IPv4 address corresponding to the first domain name;
- and
- in response to determining that air-interface communication of the terminal is normal and determining that a retransmission timer comprises an IPv6-type socket, a status of the IPv6-type socket is a preset state, and a quantity of retransmission times of the first connection request is greater than a preset quantity of times, determine that the connection to the application server by using the IPv6 address fails.
Dependencies are inferred from the claim text.