[go: up one dir, main page]

CN119697153A - Application server access method, chip module, terminal and storage medium - Google Patents

Application server access method, chip module, terminal and storage medium Download PDF

Info

Publication number
CN119697153A
CN119697153A CN202311246771.4A CN202311246771A CN119697153A CN 119697153 A CN119697153 A CN 119697153A CN 202311246771 A CN202311246771 A CN 202311246771A CN 119697153 A CN119697153 A CN 119697153A
Authority
CN
China
Prior art keywords
target
ipv6
address
domain name
application
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311246771.4A
Other languages
Chinese (zh)
Inventor
彭涛
石帅
胡浩
陈晓娟
陈瑞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN202311246771.4A priority Critical patent/CN119697153A/en
Publication of CN119697153A publication Critical patent/CN119697153A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/45Network directories; Name-to-address mapping
    • H04L61/4505Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols
    • H04L61/4511Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols using domain name system [DNS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2101/00Indexing scheme associated with group H04L61/00
    • H04L2101/60Types of network addresses
    • H04L2101/686Types of network addresses using dual-stack hosts, e.g. in Internet protocol version 4 [IPv4]/Internet protocol version 6 [IPv6] networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment of the specification provides an access method, a chip module, a terminal and a storage medium of an application server, and relates to the technical field of communication, wherein the access method of the application server comprises the steps of detecting that a first domain name is accessed for a target application; the method includes the steps of receiving a first domain name resolution request from a domain name system server, requesting a plurality of first IPv4 addresses and a plurality of first IPv6 addresses corresponding to the first domain name, receiving a first connection request from an application server, the first connection request including a first target IPv6 address of the plurality of first IPv6 addresses, responding to a network quality lower than a set quality level when the application server is accessed based on the first target IPv6 address, and detecting that a target application accesses the first domain name again, receiving a second domain name resolution request from the domain name system server, requesting a plurality of second Pv4 addresses and a plurality of second IPv6 addresses corresponding to the first domain name, and receiving a second connection request from the application server, the second connection request including a second target IPv6 address of the plurality of second IPv6 addresses.

Description

Access method of application server, chip module, terminal and storage medium
[ Field of technology ]
Embodiments of the present disclosure relate to the field of communications technologies, and in particular, to an access method, a chip module, a terminal, and a storage medium for an application server.
[ Background Art ]
Currently, with the transition from internet protocol version4 (Internet Protocol version, IPv 4) to internet protocol version 6 (Internet Protocol version, IPv 6), most terminals support Dual Stack (Dual Stack) functions of IPv4 and IPv6 by default, i.e., the terminals can access the application server through both an IPv4 address and an IPv6 address. Considering that deployment of IPv6 is a direction of development of future networks, terminals generally prefer to access application servers using IPv6 addresses.
When an application in a terminal needs to access a large website, the domain name of the large website may simultaneously correspond to a plurality of IPv4 addresses and a plurality of IPv6 addresses, and at this time, the application in the terminal may access an application server corresponding to the large website based on a certain IPv6 address of the plurality of IPv6 addresses preferentially, but the network quality between the terminal and the corresponding application server may be poor due to network fluctuation of the IPv6 address, which results in poor user internet surfing experience.
[ Invention ]
The embodiment of the specification provides an access method, a chip module, a terminal and a storage medium of an application server, which can avoid repeatedly using an IPv6 address to access the application server under the condition that the network quality of a network where the IPv6 address is located is poor, thereby improving the success rate of the terminal accessing the application server based on the IPv6 address and the efficiency of accessing the application server, and being beneficial to improving the Internet surfing experience of users.
In a first aspect, an embodiment of the present disclosure provides a method for accessing an application server, where the method includes:
Detecting a first operation aiming at a target application, wherein the first operation indicates the target application to access a first domain name;
Responding to the first operation, and sending a first domain name resolution request to a domain name system server, wherein the first domain name resolution request is used for requesting a plurality of first IPv4 addresses and a plurality of first IPv6 addresses corresponding to the first domain name;
receiving the plurality of first IPv4 addresses and the plurality of first IPv6 addresses sent by the domain name system server, and sending a first connection request to a first application server, wherein the first connection request comprises a first target IPv6 address in the plurality of first IPv6 addresses;
Responsive to determining that the network quality at the time of accessing the first application server based on the first target IPv6 address is below a first set network quality level, and detecting a second operation for the target application, the second operation indicating that the target application again accesses the first domain name;
Responding to the second operation, and sending a second domain name resolution request to the domain name system server, wherein the second domain name resolution request is used for requesting a plurality of second Pv4 addresses and a plurality of second IPv6 addresses corresponding to the first domain name;
And receiving the plurality of second IPv4 addresses and the plurality of second IPv6 addresses sent by the domain name system server, and sending a second connection request to a second application server, wherein the second connection request comprises a second target IPv6 address in the plurality of second IPv6 addresses, and the second target IPv6 address is different from the first target IPv6 address.
In the embodiment of the present disclosure, when a target application on a terminal needs to access a first domain name, the terminal defaults to request, from a domain name system server, a plurality of first IPv4 addresses and a plurality of first IPv6 addresses corresponding to the first domain name at the same time. After obtaining the plurality of first IPv4 addresses and the plurality of first IPv6 addresses corresponding to the first domain name, the terminal may select a certain IPv6 address, for example, a first target IPv6 address, from the plurality of first IPv6 addresses based on the principle of preferentially using the IPv6 addresses, so as to initiate a connection request to the corresponding first application server. If the terminal determines that the network quality in the process of accessing the first application server based on the first target IPv6 address is poor, the condition that the network where the first target IPv6 address is located fluctuates can be considered, and if the target application accesses the first domain name again, the terminal requests and receives a plurality of second IPv4 addresses and a plurality of second IPv6 addresses corresponding to the first domain name again from the domain name system server, then selects the second target IPv6 address from the plurality of second IPv6 addresses to access the corresponding second application server, and does not continue to access the corresponding first application server based on the first target IPv6 address, so that the situation of repeated access abnormality caused by repeatedly using the first target IPv6 address to access the application server is avoided, the success rate of accessing the application server based on the IPv6 address of the terminal and the efficiency of accessing the application server are improved, and the Internet surfing experience of a user is facilitated.
Optionally, determining that the network quality when accessing the first application server based on the first target IPv6 address is lower than a first set network quality level includes:
determining a single address connection anomaly rate according to the number of IPv6 sockets with target addresses being the first application server and the number of IPv6 sockets which are not responded by the first application server, wherein the target addresses are created in a first preset duration;
determining a single address data transmission abnormal rate according to the number of data packets sent by the first application server and received in the first preset time period and the number of abnormal data packets in the data packets;
obtaining a first network anomaly rate in unit time according to the single address connection anomaly rate, the single address data transmission anomaly rate and the first preset time length;
and in response to the first network anomaly rate being above a first set threshold, determining that network quality when the first application server is accessed based on the first target IPv6 address is below the first set network quality level.
In this embodiment of the present disclosure, on the one hand, the terminal creates an IPv6 socket with a target address of the first application server, which is used to establish a connection with the first application server, so that the terminal may determine a single address connection anomaly rate in a process of establishing a connection based on a single IPv6 address by counting the number of created IPv6 sockets and the number of IPv6 sockets in the created IPv6 socket that are not responded to by the first application server. If the single address connection abnormality rate is larger, the possibility that the abnormality occurs in the process of establishing connection between the target application in the terminal and the first application server based on the first target IPv6 address is higher, otherwise, if the single address connection abnormality rate is smaller, the possibility that the abnormality occurs in the process of establishing connection between the terminal and the first application server based on the first target IPv6 address is lower, on the other hand, after the terminal establishes connection between the terminal and the first application server based on the first target IPv6 address, the single address data transmission abnormality rate in the process of establishing connection based on the single IPv6 address can be determined by counting the number of data packets sent by the received first application server and the number of abnormal data packets in the data packets. And if the single-address data transmission abnormality rate is larger, the possibility that the data transmission is abnormal after the terminal establishes connection with the first application server based on the first target IPv6 address is higher, otherwise, if the single-address data transmission abnormality rate is smaller, the possibility that the data transmission is abnormal after the terminal establishes connection with the first application server based on the first target IPv6 address is lower is indicated. The network quality of the terminal accessing the first application server based on the first target IPv6 address in the unit duration can be accurately estimated by combining the single address connection abnormality rate in the first preset duration with the single address data transmission abnormality rate in the first preset duration, so that a basis is provided for whether the IPv6 address used is required to be switched when the first domain name is required to be accessed again.
Optionally, after determining that the network quality when accessing the first application server based on the first target IPv6 address is below the first set network quality level, the method further includes:
the target application is set to disable the first target IPv6 address.
In the embodiment of the present disclosure, if the terminal determines that the network quality of the target application accessing the corresponding first application server based on the first target IPv6 address is poor, the terminal may set the target application to disable the first target IPv6 address, so as to avoid repeated access anomalies caused by repeatedly using the first target IPv6 address to access the first application server when the target application accesses the first domain name again.
Optionally, sending the second connection request to the second application server includes:
in response to the presence of the first target IPv6 address disabled by the target application in the plurality of second IPv6 addresses, filtering the first target IPv6 address disabled by the target application from the plurality of second IPv6 addresses, and determining the second target IPv6 address from the remaining second IPv6 addresses;
And sending the second connection request to the second application server based on the second target IPv6 address.
In this embodiment of the present disclosure, if the target application in the terminal accesses the first domain name again, the plurality of second IPv6 addresses requested and received from the domain name system server include the first target IPv6 address that has been used by the target application in history and has been disabled, the first target IPv6 address may be directly filtered out of the plurality of second IPv6 addresses, and then the second target IPv6 address is determined from the remaining IPv6 addresses, so as to ensure that the second target IPv6 address is different from the disabled first target IPv6 address. On the basis, compared with the method for connecting the corresponding first application server by repeatedly using the first target IPv6 address, the method for connecting the corresponding second application server based on the second target IPv6 address can improve the connection success rate and reduce the abnormal rate of data transmission after connection establishment.
Optionally, after detecting the second operation for the target application, the method further comprises:
And responding to the second operation, sending a third connection request to a third application server, wherein the third connection request comprises a third target IPv6 address in the plurality of first Pv6 addresses, and the third target IPv6 address is different from the first target IPv6 address.
In the embodiment of the specification, if the terminal determines that the network quality is poor in the process of accessing the first application server based on the first target IPv6 address and detects that the target application accesses the first domain name again, the terminal can directly determine other IPv6 addresses different from the first target IPv6 address from the plurality of first IPv6 addresses, for example, the second target IPv6 address, to access the corresponding third application server, instead of continuously accessing the corresponding first application server based on the first target IPv6 address, so that the situation of repeated access abnormality caused by repeatedly using the first target IPv6 address to access the application server is avoided, the success rate of accessing the application server based on the IPv6 address of the terminal and the efficiency of accessing the application server are improved, and the internet surfing experience of a user is facilitated.
Optionally, after setting the first target IPv6 address of the target application to a disabled state, the method further includes:
And responding to the first preset condition, and releasing the forbidden state of the target application to the first target IPv6 address, wherein the first preset condition is that the forbidden duration of the target application for forbidden the first target IPv6 address reaches a second preset duration, or an operator switching event is detected, or a network switching event is detected.
In this embodiment of the present disclosure, when the disabling duration of disabling the first target Pv6 address by the target application reaches the second preset duration, or it is detected that the user id card used by the terminal switches the operator, or it is detected that the network type used by the terminal is changed, it may be considered that network fluctuations affecting the network quality when the terminal accesses the first application server based on the first target IPv6 address have been eliminated, and at this time, the disabling state of the target application on the first target IPv6 address may be released, so that the first target IPv6 address may be normally used when the first domain name is accessed again later.
Optionally, the method further comprises:
Responsive to determining that the network quality of the IPv6 network of the target application is below a second set network quality level, and detecting a third operation for the target application, the third operation indicating that the target application accesses a second domain name;
Responding to the third operation, and sending a third domain name resolution request to the domain name system server, wherein the third domain name resolution request is used for requesting a plurality of third IPv4 addresses corresponding to the second domain name;
and sending a fourth connection request to a fourth application server, wherein the fourth connection request comprises a first target IPv4 address in the third IPv4 addresses.
In this embodiment of the present disclosure, if the terminal determines that the IPv6 network of the target application is poor in overall network quality, and detects that the target application needs to access the second domain name, the terminal may only request, for example, multiple third IPv4 addresses corresponding to the first domain name from the domain name system server, and determine, after receiving the multiple IPv4 addresses returned by the domain name system server, a certain IPv4 address from the multiple third IPv4 addresses, for example, the first target IPv4 address, to access the corresponding fourth application server, thereby avoiding a situation of repeated access abnormality caused by repeatedly using the IPv6 address to access the application server in a case that the network of the IPv6 network of the target application is poor, so as to improve a success rate of accessing the application server by the terminal and an efficiency of accessing the application server, and facilitate improving a user's internet surfing experience.
Optionally, in response to determining that the network quality of the IPv6 network of the target application is below a second set network quality level, the method includes:
determining multi-address abnormal access rate according to the total number of accesses of the target application to the corresponding application server based on a plurality of target IPv6 addresses and the total number of abnormal accesses of the target application to the corresponding application server based on the plurality of target IPv6 addresses within a third preset duration;
Determining a multi-address connection anomaly rate according to the total number of IPv6 sockets created by the target application when accessing the corresponding application server based on the plurality of target IPv6 addresses within the third preset duration and the total number of responses of the corresponding application server in the IPv6 sockets;
determining a second network anomaly rate according to the multi-address anomaly access rate and the multi-address connection anomaly rate;
and determining that the network quality of the IPv6 network of the target application is lower than the second set network quality level in response to the second network anomaly rate being higher than a second set threshold.
In the embodiment of the present disclosure, in a third preset duration, the target application may access other domain names in addition to the first domain name, that is, the target application may access the corresponding application server based on multiple IPv6 addresses in the third preset duration, so on one hand, the multiple address abnormal access rate when the target application in the terminal accesses the corresponding application server based on different IPv6 addresses may be determined by counting the total number of accesses to the corresponding application server based on the IPv6 addresses and the total number of abnormal accesses when the target application accesses the corresponding application server based on the IPv6 addresses in the above process. If the multi-address abnormal access rate is larger, the possibility that the network quality of the IPv6 network used by the target application in the terminal is poorer is indicated to be higher, otherwise, if the multi-address abnormal access rate is smaller, the possibility that the network quality of the IPv6 network used by the target application in the terminal is poorer is indicated to be lower, on the other hand, the total number of IPv6 sockets created when the target application accesses the corresponding application server based on different IPv6 addresses and the total number of IPv6 sockets which are not responded by the corresponding application server in the IPv6 sockets created when the target application accesses the corresponding application server based on different IPv6 addresses can be counted, and the multi-address connection abnormal rate of the target application in the terminal in the process of establishing connection with the corresponding application server based on different IPv6 addresses can be determined. If the multi-address connection abnormality rate is larger, the possibility that the network quality of the IPv6 network used by the target application in the terminal is poorer on the whole is higher; conversely, if the multi-address connection anomaly rate is smaller, the likelihood that the network quality of the IPv6 network used by the target application in the terminal is poor as a whole is lower. The network quality of the target application in the terminal when accessing the corresponding application server based on the IPv6 network can be accurately estimated by combining the multi-address access anomaly rate and the multi-address connection anomaly rate in the third preset time period, so that a basis is provided for whether the IPv4 network needs to be switched when any domain name needs to be accessed.
Optionally, after determining that the target application accesses the corresponding application server based on the IPv6 network, the method further includes:
The target application is set to disable all IPv6 addresses.
In the embodiment of the present disclosure, if the terminal determines that the overall network quality is poor when the target application accesses the corresponding application server based on different IPv6, the terminal may set the target application to disable all IPv6 addresses, so as to avoid repeated access anomalies caused by repeatedly using the IPv6 addresses to access the corresponding application server when the target application accesses any domain name again.
Optionally, setting the target application to disable all IPv6 addresses includes:
In response to determining that the network quality of the IPv4 network of the target application is above a third set network quality level, the target application is set to disable all IPv6 addresses.
In the embodiment of the present disclosure, when determining that the network quality of the IPv6 network used by the target application is poor, the terminal needs to further determine the network quality of the IPv4 network used by the target application, and if the network quality of the IPv4 network used by the target application is good, the target application is set to disable all IPv6 addresses, so as to ensure that the subsequent target application has a higher success rate and higher access efficiency when accessing the corresponding application server based on the IPv4 network.
Optionally, in response to the third operation, sending a third domain name resolution request to the domain name system server, including:
Determining, in response to the third operation, whether all IPv6 addresses of the target application are in a disabled state;
If yes, the third domain name resolution request is sent to the domain name system server.
In the embodiment of the present disclosure, when the terminal determines that the IPv6 network of the target application is poor in overall network quality and the IPv4 network of the target application is good in overall network quality, if it is detected that the target application needs to access the second domain name, the terminal may first determine whether all IPv6 addresses of the target application are disabled, if yes, change a policy of preferentially using the IPv6 network, and convert to an IPv4 network with better network quality, that is, when domain name resolution is performed on the domain name system server, only an IPv4 address corresponding to the second domain name is requested, so that resource waste caused by requesting an IPv6 address corresponding to the second domain name is avoided when it is ensured that subsequent target applications have a higher success rate and a higher access efficiency when accessing the corresponding application server based on the IPv4 network.
Optionally, after detecting the third operation for the target application, the method further comprises:
Responding to a third operation, and sending a fourth domain name resolution request to the domain name system server, wherein the fourth domain name resolution request is used for requesting a plurality of fourth IPv4 addresses and a plurality of fourth IPv6 addresses corresponding to the second domain name;
and receiving the plurality of fourth IPv4 addresses and the plurality of fourth IPv6 addresses sent by the domain name system server, and sending a fifth connection request to a fifth application server, wherein the fifth connection request comprises a second target IPv4 address in the plurality of fourth IPv4 addresses.
In the embodiment of the present disclosure, when the terminal determines that the IPv6 network of the target application is poor in overall network quality and the IPv4 network of the target application is good in overall network quality, if it is detected that the target application needs to access the second domain name, multiple IPv4 addresses and multiple IPv6 addresses corresponding to the second domain name may be simultaneously requested from the domain name system server, for example, multiple fourth IPv4 addresses and multiple fourth IPv6 addresses, and then a certain IPv4 address is preferentially selected from the multiple fourth IPv4 addresses, for example, the second target IPv4 address, to access the corresponding fifth application server, so that in the case that the IPv6 network of the target application is poor in overall network quality, the IPv4 network with a better network may be used to access the corresponding application server, thereby avoiding the situation of repeated access anomalies caused by repeatedly using the IPv6 addresses to access the application server, and ensuring a higher success rate and higher access efficiency when the terminal accesses the application server, and being beneficial to improving the internet experience of the user.
Optionally, sending a fifth connection request to a fifth application server includes:
Determining whether all IPv6 addresses of the target application are in a disabled state;
If yes, determining the second target IPv4 address from the fourth IPv4 addresses;
and sending the fifth connection request to the fifth application server based on the second target IPv4 address.
In the embodiment of the present disclosure, when the terminal obtains multiple fourth IPv4 addresses and multiple fourth IPv6 addresses corresponding to the second domain name at the same time, the terminal may determine whether all IPv6 addresses of the target application are in a disabled state, if yes, determine the second target IPv4 address from the multiple fourth IPv4 addresses, and access the corresponding fifth application server, that is, when the network of the IPv6 network of the target application is poor, by determining that all IPv6 addresses of the target application are disabled, thereby changing a policy of preferentially using the IPv6 network, and converting into a situation of repeatedly accessing the corresponding application server based on the IPv4 network with better network quality, so as to avoid repeated access anomalies caused by repeatedly accessing the application server based on the IPv6 network, thereby ensuring that the terminal has a higher success rate and higher access efficiency when accessing the application server, and being beneficial to improving the internet surfing experience of the user.
Optionally, determining that the network quality of the IPv4 network of the target application is higher than a third set network quality level includes:
Determining the multi-address data packet anomaly rate according to the number of data packets sent by the application server and the number of anomaly data packets in the data packets received when the target application accesses the corresponding application server based on a plurality of target IPv4 addresses within the third preset duration;
Obtaining a third network anomaly rate in unit duration according to the third preset duration and the multi-address data packet anomaly rate;
And if the third network anomaly rate is smaller than a third set threshold value, determining that the network quality of the IPv4 network of the target application is higher than the third set network quality level.
In the embodiment of the present disclosure, in the third preset period, the target application may access the corresponding application server based on different IPv4 addresses, so that the total number of data packets sent by the IPv4 application server and the total number of abnormal data packets in the received data packets received by the terminal in the above process may be counted, so that the abnormal rate of multi-address data transmission may be determined. If the multi-address data transmission anomaly rate is larger, the possibility that the overall network quality of the IPv4 network used by the target application is better is lower, and correspondingly, the network anomaly rate in unit time length is larger, otherwise, if the multi-address data transmission anomaly rate is smaller, the possibility that the overall network quality of the IPv4 network used by the target application is better is higher, and correspondingly, the network anomaly rate in unit time length is smaller, so that the overall network quality of the IPv4 network used by the target application in the third preset time length is accurately estimated.
Optionally, after setting the target application to disable all IPv6 addresses, the method further includes:
And responding to the second preset condition, and releasing the forbidden state of the target application to all IPv6 addresses, wherein the second preset condition is that the forbidden duration including the forbidden duration of the target application to all IPv6 addresses reaches a fourth preset duration, or an operator switching event is detected, or a network switching event is detected.
In the embodiment of the present disclosure, when the disabling duration of disabling all IPv6 addresses by the target application reaches a fourth preset duration, or it is detected that the subscriber identity module card used by the terminal switches the operator, or it is detected that the network type used by the terminal is changed, it may be considered that network fluctuations affecting the network quality when the terminal accesses the application server based on the IPv6 network have been eliminated, and at this time, the disabling state of all IPv6 addresses by the target application may be released, so that when any domain name is accessed again later, the IPv6 address may be preferentially used.
In a second aspect, embodiments of the present disclosure provide an access device for an application server, the device including:
The detection unit is used for detecting a first operation aiming at a target application, wherein the first operation indicates the target application to access a first domain name;
A sending unit, configured to send, in response to the first operation, a first domain name resolution request to a domain name system server, where the first domain name resolution request is used to request a plurality of first IPv4 addresses and a plurality of first IPv6 addresses corresponding to the first domain name;
The processing unit is used for receiving the plurality of first IPv4 addresses and the plurality of first IPv6 addresses sent by the domain name system server, and sending a first connection request to a first application server, wherein the first connection request comprises a first target IPv6 address in the plurality of first IPv6 addresses;
The processing unit is further configured to, in response to determining that the network quality when accessing the first application server based on the first target IPv6 address is below a first set network quality level, detect a second operation for the target application, and instruct the target application to access the first domain name again;
The sending unit is further configured to send, in response to the second operation, a second domain name resolution request to the domain name system server, where the second domain name resolution request is used to request a plurality of second Pv4 addresses and a plurality of second IPv6 addresses corresponding to the first domain name;
The processing unit is further configured to receive the plurality of second IPv4 addresses and the plurality of second IPv6 addresses sent by the domain name system server, and send a second connection request to a second application server, where the second connection request includes a second target IPv6 address of the plurality of second IPv6 addresses, and the second target IPv6 address is different from the first target IPv6 address.
Optionally, the processing unit includes a first network quality assessment unit;
the first network quality evaluation unit is specifically configured to:
determining a single address connection anomaly rate according to the number of IPv6 sockets with target addresses being the first application server and the number of IPv6 sockets which are not responded by the first application server, wherein the target addresses are created in a first preset duration;
determining a single address data transmission abnormal rate according to the number of data packets sent by the first application server and received in the first preset time period and the number of abnormal data packets in the data packets;
obtaining a first network anomaly rate in unit time according to the single address connection anomaly rate, the single address data transmission anomaly rate and the first preset time length;
and in response to the first network anomaly rate being above a first set threshold, determining that network quality when the first application server is accessed based on the first target IPv6 address is below the first set network quality level.
Optionally, the processing unit is further configured to set the target application to disable the first target IPv6 address.
Optionally, the processing unit comprises a filtering unit, a determining unit and a first connection request sending unit;
the filtering unit is configured to filter, in response to the presence of the first target IPv6 address disabled by the target application in the plurality of second IPv6 addresses, the first target IPv6 address disabled by the target application from the plurality of second IPv6 addresses;
The determining unit is configured to determine the second target IPv6 address from the remaining second IPv6 addresses;
The connection request sending unit is configured to send the second connection request to the second application server based on the second target IPv6 address.
Optionally, the sending unit is further configured to send, in response to the second operation, a third connection request to a third application server, where the third connection request includes a third target IPv6 address of the plurality of first Pv6 addresses, and the third target IPv6 address is different from the first target IPv6 address.
Optionally, the processing unit is further configured to, in response to satisfaction of a first preset condition, release a disabled state of the target application on the first target IPv6 address, where the first preset condition is that a disabled duration including that the target application disables the first target IPv6 address reaches a second preset duration, or detects an operator handover event, or detects a network handover event.
Optionally, the processing unit is further configured to, in response to determining that the network quality of the IPv6 network of the target application is lower than a second set network quality level, detect a third operation for the target application, and instruct the target application to access a second domain name;
The sending unit is further configured to send a third domain name resolution request to the domain name system server in response to the third operation, where the third domain name resolution request is used to request a plurality of third IPv4 addresses corresponding to the second domain name;
The sending unit is further configured to send a fourth connection request to a fourth application server, where the fourth connection request includes a first target IPv4 address of the plurality of third IPv4 addresses.
Optionally, the processing unit includes a second network quality assessment unit;
the second network quality evaluation unit is specifically configured to:
determining multi-address abnormal access rate according to the total number of accesses of the target application to the corresponding application server based on a plurality of target IPv6 addresses and the total number of abnormal accesses of the target application to the corresponding application server based on the plurality of target IPv6 addresses within a third preset duration;
Determining a multi-address connection anomaly rate according to the total number of IPv6 sockets created by the target application when accessing the corresponding application server based on the plurality of target IPv6 addresses within the third preset duration and the total number of responses of the corresponding application server in the IPv6 sockets;
determining a second network anomaly rate according to the multi-address anomaly access rate and the multi-address connection anomaly rate;
and determining that the network quality of the IPv6 network of the target application is lower than the second set network quality level in response to the second network anomaly rate being higher than a second set threshold.
Optionally, the processing unit is further configured to set the target application to disable all IPv6 addresses.
Optionally, the processing unit comprises a third network quality evaluation unit and a disabling unit;
the third network quality evaluation unit is configured to determine that the network quality of the IPv4 network of the target application is higher than a third set network quality level;
the disabling unit is configured to set the target application to disable all IPv6 addresses.
Optionally, the sending unit is further configured to send a fourth domain name resolution request to the domain name system server in response to the third operation, where the fourth domain name resolution request is used to request a plurality of fourth IPv4 addresses and a plurality of fourth IPv6 addresses corresponding to the second domain name;
The processing unit is further configured to receive the plurality of fourth IPv4 addresses and the plurality of fourth IPv6 addresses sent by the domain name system server, and send a fifth connection request to a fifth application server, where the fifth connection request includes a second target IPv4 address in the plurality of fourth IPv4 addresses.
Optionally, the processing unit comprises a second connection request sending unit;
the second connection request sending unit is specifically configured to:
Determining whether all IPv6 addresses of the target application are in a disabled state;
If yes, determining the second target IPv4 address from the fourth IPv4 addresses;
and sending the fifth connection request to the fifth application server based on the second target IPv4 address.
Optionally, the third network quality evaluation unit is specifically configured to:
Determining the multi-address data packet anomaly rate according to the number of data packets sent by the application server and the number of anomaly data packets in the data packets received when the target application is based on the application server corresponding to a plurality of target IPv4 addresses within the third preset duration;
Obtaining a third network anomaly rate in unit duration according to the third preset duration and the multi-address data packet anomaly rate;
And if the third network anomaly rate is smaller than a third set threshold value, determining that the network quality of the IPv4 network of the target application is higher than the third set network quality level.
Optionally, the processing unit is further configured to, in response to satisfaction of a second preset condition, release a disabled state of the target application on all IPv6 addresses, where the second preset condition is that a disabled duration including that the target application disables all IPv6 addresses reaches a fourth preset duration, or detects an operator handover event, or detects a network handover event.
In a third aspect, embodiments of the present disclosure provide a chip module comprising a memory for storing computer program instructions and a processor for executing the program instructions, wherein the computer program instructions, when executed by the processor, trigger the chip module to perform the steps of the method according to any one of the first aspects
In a fourth aspect, embodiments of the present description provide a terminal comprising a memory for storing computer program instructions and a processor for executing the program instructions, wherein the computer program instructions, when executed by the processor, trigger the terminal to perform the steps of the method according to any of the embodiments of the first aspect.
In a fifth aspect, embodiments of the present description provide a computer-readable storage medium storing computer instructions that, when executed by a computer, cause the computer to perform the steps of the method according to any one of the embodiments of the first or second aspects.
In a sixth aspect, embodiments of the present description provide a computer program product comprising computer instructions which, when run in a computer, cause the computer to perform the steps of the method according to any one of the embodiments of the first or second aspects.
It should be understood that, the second to sixth aspects of the embodiment of the present invention are consistent with the technical solutions of the first aspect of the embodiment of the present invention, and the beneficial effects obtained by each aspect and the corresponding possible implementation manner are similar, and are not repeated.
[ Description of the drawings ]
In order to more clearly illustrate the technical solutions of the embodiments of the present description, the drawings that are needed in the embodiments will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present description, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic architecture diagram of a communication system according to an embodiment of the present disclosure;
Fig. 2 is a schematic structural diagram of a terminal according to an embodiment of the present disclosure;
Fig. 3 is a software structural block diagram of a terminal according to an embodiment of the present disclosure;
Fig. 4 is a flowchart of an access method of an application server according to an embodiment of the present disclosure;
FIG. 5 is a schematic diagram of a first operation performed on a target application provided in the illustrative embodiment;
Fig. 6 is a flow chart of a domain name resolution method according to an embodiment of the present disclosure;
fig. 7 is a schematic flow chart of a connection process between a terminal and an application server according to an embodiment of the present disclosure;
Fig. 8 is a flowchart of a method for evaluating network quality of a network where a first IPv6 address is located according to an embodiment of the present disclosure;
fig. 9 is a flowchart of an access method of an application server according to an embodiment of the present disclosure;
fig. 10 is a flowchart of an access method of an application server according to an embodiment of the present disclosure;
Fig. 11 is a flowchart of an access method of an application server according to an embodiment of the present disclosure;
fig. 12 is a flowchart of a method for connecting to a second application server based on a second target IPv6 address according to an embodiment of the present disclosure;
fig. 13 is a schematic flow chart of a method for connecting to a third application server based on a third target IPv6 address according to an embodiment of the present disclosure;
fig. 14 is a flowchart of an access method of an application server according to an embodiment of the present disclosure;
fig. 15 is a flowchart of an access method of an application server according to an embodiment of the present disclosure;
Fig. 16 is a flowchart of a method for accessing an application server based on an IPv4 address according to an embodiment of the present disclosure;
fig. 17 is a flowchart of a method for evaluating network quality of an IPv6 network of a target application according to an embodiment of the present application;
fig. 18 is a flow chart of a method for accessing an application server based on an IPv4 address according to an embodiment of the present application;
fig. 19 is a flowchart of a method for accessing an application server based on an IPv4 address according to an embodiment of the present disclosure;
Fig. 20 is a flowchart of a method for accessing an application server based on an IPv4 address according to an embodiment of the present disclosure;
FIG. 21 is a flowchart illustrating a method for restricting the use of IPv6 addresses by a target application according to an embodiment of the present disclosure;
Fig. 22 is a flowchart of a method for evaluating network quality of a target application using an IPv4 network according to an embodiment of the present disclosure;
fig. 23 is a flow chart of a method for sending a domain name resolution request according to an embodiment of the present application;
Fig. 24 is a flowchart of a method for connecting to a fifth application server based on a second target IPv4 address according to an embodiment of the present application;
fig. 25 is a flowchart of a method for accessing an application server based on an IPv4 address according to an embodiment of the present disclosure;
Fig. 26 is a flowchart of a method for accessing an application server based on an IPv4 address according to an embodiment of the present disclosure;
Fig. 27 is a flowchart illustrating an overall process of accessing a corresponding application server by a target application based on a single address according to an embodiment of the present disclosure;
FIG. 28 is a flowchart illustrating an overall process of accessing a corresponding application server by a target application based on multiple addresses according to an embodiment of the present disclosure;
Fig. 29 is a schematic structural diagram of an access device of an application server according to an embodiment of the present disclosure;
fig. 30 is a schematic structural diagram of a chip module according to an embodiment of the present disclosure.
[ Detailed description ] of the invention
For a better understanding of the technical solutions of the present specification, embodiments of the present specification are described in detail below with reference to the accompanying drawings.
It should be understood that the described embodiments are only some, but not all, of the embodiments of the present description. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, are intended to be within the scope of the present disclosure.
The terminology used in the embodiments of the description presented herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the description presented herein. As used in this specification and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
Currently, service providers need to transition from deploying IPv4 to deploying IPv6 application servers because IPv4 addresses have been exhausted. The service provider then begins deploying an IPv6 application server, or a dual stack application server. The dual-stack application server simultaneously supports an IPv4 protocol stack and an IPv6 protocol stack. That is, during the transition from IPv4 to IPv6 application servers, there are both IPv4 and IPv6 application servers in the network. Most terminals support dual stack functions of IPv4 and IPv6 by default, i.e. the terminals can access the application server through the IPv4 address and the application server through the IPv6 address. Considering that deployment of IPv6 is a direction of development of future networks, terminals generally prefer to access application servers using IPv6 addresses.
Referring to fig. 1, an architecture diagram of a communication system according to an embodiment of the present disclosure is provided. As shown in fig. 1, the communication system includes one or more terminals 101, one or more Domain name system (Domain NAME SYSTEM, DNS) servers 102, and one or more application servers 103. The terminal 101 may be a smart phone, a tablet computer, a smart wearable device, a personal computer (personal computer, PC), a Personal Digital Assistant (PDA), a Virtual Reality (VR), an augmented reality technology (augmented REALITY AR), an in-vehicle device, a smart sound, a robot, or the like, and the type of the terminal 101 device is not particularly limited herein.
An application running on the terminal 101 may access the corresponding application server 103 through a Domain Name (Domain Name). First, the terminal 101 transmits a domain name resolution request to the DNS server 102, where the domain name resolution request includes at least a resolved domain name, a request type, a DNS server address, and the like, and information included in the domain name resolution request is not particularly limited. Wherein the resolved domain name is used to characterize a particular website or web service. For example, the resolved domain name may be www.example.com. The request type is mainly divided into two types, for example, when the request type comprises an A record, the IPv4 address corresponding to the domain name is only inquired, and when the request type comprises an A record and an AAAA record, the IPv4 address and the IPv6 address corresponding to the domain name are inquired. In general, for the terminal 101 supporting both IPv4 and IPv6 dual stack functions, the request type in the domain name resolution request sent by the terminal needs to include both an a record and an AAAA record. For DNS server addresses, if DNS server addresses are not provided, a default local DNS server is used. Then, after receiving the domain name resolution request, DNS server 102 resolves the domain name according to the request type to obtain the IP address corresponding to the domain name. It is noted that, when the request type in the domain name resolution request includes both an a record and an AAAA record, the obtained IP address corresponding to the domain name includes both an IPv4 address and an IPv6 address. If www.example.com indicates a large website, the obtained IP address may include multiple IPv4 addresses and multiple IPv6 addresses. Finally, the terminal 101 may preferentially use any IPv6 address among the plurality of IPv6 addresses to initiate a connection request to the corresponding application server 103. It should be understood that the multiple IPv4 addresses resolved based on the same domain name may correspond to the same application server, or may correspond to different application servers, and similarly, the multiple IPv6 addresses resolved based on the same domain name may correspond to the same application server, or may correspond to different application servers, and the multiple IPv4 addresses resolved based on the same domain name and the multiple IPv6 addresses may correspond to the same application server (i.e., the application server is a dual stack server), or may correspond to different application servers.
In the above scenario, when the terminal 101 accesses the corresponding application server 103 based on one IPv6 address of the plurality of IPv6 addresses preferentially, the network quality between the terminal 101 and the corresponding application server 103 may be poor due to the network fluctuation where the IPv6 address is located, and for the terminal 101, there may occur that a response from the application server 103 cannot be received, or a waiting time for receiving a response from the application server 103 is long, which results in poor user internet surfing experience.
In view of this, an embodiment of the present disclosure provides an access method for an application server, where when a target application first accesses a domain name, a plurality of IPv6 addresses corresponding to the domain name may be requested from a DNS server, and then a certain IPv6 address is determined from a plurality of IPv6 addresses corresponding to the domain name to access the corresponding application server. If the network quality of the terminal accessing the corresponding application server based on the IPv6 address is poor, and when the target application accesses the same domain name again, the terminal can request a plurality of IPv6 addresses corresponding to the domain name to the DNS server again, and then select IPv6 addresses which are different from the history from the plurality of IPv6 addresses obtained again to access the corresponding application server, thereby avoiding the situation of repeated abnormal access caused by repeated utilization of the IPv6 addresses which have caused abnormal access in history, further improving the success rate of the terminal accessing the application server based on the IPv6 addresses and the efficiency of accessing the application server, and being beneficial to improving the Internet surfing experience of users.
Referring to fig. 2, a schematic structural diagram of a terminal 101 according to an embodiment of the present disclosure is provided. The terminal 101 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (universal serial bus, USB) interface 130, a charge management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, keys 190, a motor 191, an indicator 192, a camera 193, a display 194, and a subscriber identity module (subscriber identification module, SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyro sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, and the like.
It should be understood that the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the terminal 101. In other embodiments of the application, terminal 101 may include more or less components than shown, or certain components may be combined, or certain components may be split, or different arrangements of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (IMAGE SIGNAL processor, ISP), a controller, a video codec, a digital signal processor (DIGITAL SIGNAL processor, DSP), a baseband processor, and/or a neural network processor (neural-network processing unit, NPU), etc. Wherein the different processing units may be separate devices or may be integrated in one or more processors.
The controller can generate operation control signals according to the instruction operation codes and the time sequence signals to finish the control of instruction fetching and instruction execution.
A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may hold instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to reuse the instruction or data, it can be called directly from the memory. Repeated accesses are avoided and the latency of the processor 110 is reduced, thereby improving the efficiency of the system.
In some embodiments, the processor 110 may include one or more interfaces. The interfaces may include an integrated circuit (inter-INTEGRATED CIRCUIT, I2C) interface, an integrated circuit built-in audio (inter-INTEGRATED CIRCUIT SOUND, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous receiver transmitter (universal asynchronous receiver/transmitter, UART) interface, a mobile industry processor interface (mobile industry processor interface, MIPI), a general-purpose input/output (GPIO) interface, a subscriber identity module (subscriber identity module, SIM) interface, and/or a universal serial bus (universal serial bus, USB) interface, among others.
The I2C interface is a bi-directional synchronous serial bus comprising a serial data line (SERIAL DATA LINE, SDA) and a serial clock line (derail clock line, SCL). In some embodiments, the processor 110 may contain multiple sets of I2C buses. The processor 110 may be coupled to the touch sensor 180K, charger, flash, camera 193, etc., respectively, through different I2C bus interfaces. For example, the processor 110 may be coupled to the touch sensor 180K through an I2C interface, such that the processor 110 communicates with the touch sensor 180K through an I2C bus interface to implement a touch function of the terminal 101.
The I2S interface may be used for audio communication. In some embodiments, the processor 110 may contain multiple sets of I2S buses. The processor 110 may be coupled to the audio module 170 via an I2S bus to enable communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 may transmit an audio signal to the wireless communication module 160 through the I2S interface, to implement a function of answering a call through the bluetooth headset.
PCM interfaces may also be used for audio communication to sample, quantize and encode analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 may be coupled through a PCM bus interface. In some embodiments, the audio module 170 may also transmit audio signals to the wireless communication module 160 through the PCM interface to implement a function of answering a call through the bluetooth headset. Both the I2S interface and the PCM interface may be used for audio communication.
The UART interface is a universal serial data bus for asynchronous communications. The bus may be a bi-directional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, a UART interface is typically used to connect the processor 110 with the wireless communication module 160. For example, the processor 110 communicates with a bluetooth module in the wireless communication module 160 through a UART interface to implement bluetooth functions. In some embodiments, the audio module 170 may transmit an audio signal to the wireless communication module 160 through a UART interface, to implement a function of playing music through a bluetooth headset.
The MIPI interface may be used to connect the processor 110 to peripheral devices such as a display 194, a camera 193, and the like. The MIPI interfaces include camera serial interfaces (CAMERA SERIAL INTERFACE, CSI), display serial interfaces (DISPLAY SERIAL INTERFACE, DSI), and the like. In some embodiments, processor 110 and camera 193 communicate through a CSI interface to implement the photographing function of terminal 101. The processor 110 and the display 194 communicate via a DSI interface to implement the display functions of the terminal 101.
The GPIO interface may be configured by software. The GPIO interface may be configured as a control signal or as a data signal. In some embodiments, a GPIO interface may be used to connect the processor 110 with the camera 193, the display 194, the wireless communication module 160, the audio module 170, the sensor module 180, and the like. The GPIO interface may also be configured as an I2C interface, an I2S interface, a UART interface, an MIPI interface, etc.
The USB interface 130 is an interface conforming to the USB standard specification, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, or the like. The USB interface 130 may be used to connect a charger to charge the terminal 101, or may be used to transfer data between the terminal 101 and a peripheral device. And can also be used for connecting with a headset, and playing audio through the headset. The interface may also be used to connect other electronic devices, such as AR devices, etc.
It should be understood that the interfacing relationship between the modules illustrated in the embodiment of the present application is only illustrative, and does not limit the structure of the terminal 101. In other embodiments of the present application, the terminal 101 may also use different interfacing manners in the above embodiments, or a combination of multiple interfacing manners.
The charge management module 140 is configured to receive a charge input from a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charge management module 140 may receive a charging input of a wired charger through the USB interface 130. In some wireless charging embodiments, the charge management module 140 may receive wireless charging input through a wireless charging coil of the terminal 101. The charging management module 140 may also supply power to the terminal 101 through the power management module 141 while charging the battery 142.
The power management module 141 is used for connecting the battery 142, and the charge management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and/or the charge management module 140 to power the processor 110, the internal memory 121, the display 194, the camera 193, the wireless communication module 160, and the like. The power management module 141 may also be configured to monitor battery capacity, battery cycle number, battery health (leakage, impedance) and other parameters. In other embodiments, the power management module 141 may also be provided in the processor 110. In other embodiments, the power management module 141 and the charge management module 140 may be disposed in the same device.
The wireless communication function of the terminal 101 can be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, a modem processor, a baseband processor, and the like.
The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in terminal 101 may be configured to cover a single or multiple communication bands. Different antennas may also be multiplexed to improve the utilization of the antennas. For example, the antenna 1 may be multiplexed into a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
The mobile communication module 150 may provide a solution for wireless communication including 2G/3G/4G/5G or the like applied on the terminal 101. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA), etc. The mobile communication module 150 may receive electromagnetic waves from the antenna 1, perform processes such as filtering, amplifying, and the like on the received electromagnetic waves, and transmit the processed electromagnetic waves to the modem processor for demodulation. The mobile communication module 150 can amplify the signal modulated by the modem processor, and convert the signal into electromagnetic waves through the antenna 1 to radiate. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be disposed in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be provided in the same device as at least some of the modules of the processor 110.
The modem processor may include a modulator and a demodulator. The modulator is used for modulating the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used for demodulating the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low frequency baseband signal to the baseband processor for processing. The low frequency baseband signal is processed by the baseband processor and then transferred to the application processor. The application processor outputs sound signals through an audio device (not limited to the speaker 170A, the receiver 170B, etc.), or displays images or video through the display screen 194. In some embodiments, the modem processor may be a stand-alone device. In other embodiments, the modem processor may be provided in the same device as the mobile communication module 150 or other functional module, independent of the processor 110.
In some embodiments, the terminal 101 may establish a communication connection with the operator's mobile communication network through the mobile communication module 150 and access the internet through the mobile communication network. For example, the terminal 101 communicates with the DNS server 102 and the application server 103 through the mobile communication module 150.
The wireless communication module 160 may provide solutions for wireless communication including wireless local area network (wireless local area networks, WLAN) (e.g., wireless fidelity (WIRELESS FIDELITY, wi-Fi) network), bluetooth (BT), global navigation satellite system (global navigation SATELLITE SYSTEM, GNSS), frequency modulation (frequency modulation, FM), near field communication (NEAR FIELD communication, NFC), infrared (IR), etc., applied on the terminal 101. The wireless communication module 160 may be one or more devices that integrate at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the electromagnetic wave signals, filters the electromagnetic wave signals, and transmits the processed signals to the processor 110. The wireless communication module 160 may also receive a signal to be transmitted from the processor 110, frequency modulate it, amplify it, and convert it to electromagnetic waves for radiation via the antenna 2.
In some embodiments, terminal 101 may establish a communication connection with the internet through wireless communication module 160 to access the internet. For example, the terminal 101 communicates with the DNS server 102 and the application server 103 through the wireless communication module 160.
In some embodiments, antenna 1 and mobile communication module 150 of terminal 101 are coupled, and antenna 2 and wireless communication module 160 are coupled, such that terminal 101 may communicate with a network and other devices via wireless communication technology. The wireless communication techniques can include the Global System for Mobile communications (global system for mobile communications, GSM), general packet radio service (GENERAL PACKET radio service, GPRS), code division multiple access (code division multiple access, CDMA), wideband code division multiple access (wideband code division multiple access, WCDMA), time division code division multiple access (time-division code division multiple access, TD-SCDMA), long term evolution (long term evolution, LTE), BT, GNSS, WLAN, NFC, FM, and/or IR techniques, among others. The GNSS may include a global satellite positioning system (global positioning system, GPS), a global navigation satellite system (global navigation SATELLITE SYSTEM, GLONASS), a beidou satellite navigation system (beidou navigation SATELLITE SYSTEM, BDS), a quasi zenith satellite system (quasi-zenith SATELLITE SYSTEM, QZSS) and/or a satellite based augmentation system (SATELLITE BASED AUGMENTATION SYSTEMS, SBAS).
The terminal 101 implements display functions through a GPU, a display screen 194, an application processor, and the like. The GPU is a microprocessor for image processing, and is connected to the display 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
The display screen 194 is used to display images, videos, and the like. The display 194 includes a display panel. The display panel may employ a Liquid Crystal Display (LCD) CRYSTAL DISPLAY, an organic light-emitting diode (OLED), an active-matrix organic LIGHT EMITTING diode (AMOLED), a flexible light-emitting diode (FLED), miniled, microLed, micro-oLed, a quantum dot LIGHT EMITTING diode (QLED), or the like. In some embodiments, the terminal 101 may include 1 or N displays 194, N being a positive integer greater than 1.
The terminal 101 may implement photographing functions through an ISP, a camera 193, a video codec, a GPU, a display 194, an application processor, and the like.
The ISP is used to process data fed back by the camera 193. For example, when photographing, the shutter is opened, light is transmitted to the camera photosensitive element through the lens, the optical signal is converted into an electric signal, and the camera photosensitive element transmits the electric signal to the ISP for processing and is converted into an image visible to naked eyes. ISP can also optimize the noise, brightness and skin color of the image. The ISP can also optimize parameters such as exposure, color temperature and the like of a shooting scene. In some embodiments, the ISP may be provided in the camera 193.
The camera 193 is used to capture still images or video. The object generates an optical image through the lens and projects the optical image onto the photosensitive element. The photosensitive element may be a charge coupled device (charge coupled device, CCD) or a Complementary Metal Oxide Semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, which is then transferred to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV, or the like format. In some embodiments, terminal 101 may include 1 or N cameras 193, N being a positive integer greater than 1.
The digital signal processor is used for processing digital signals, and can process other digital signals besides digital image signals. For example, when the terminal 101 selects a frequency bin, the digital signal processor is used to fourier transform the frequency bin energy, or the like.
Video codecs are used to compress or decompress digital video. The terminal 101 may support one or more video codecs. Thus, the terminal 101 can play or record video in a variety of encoding formats, such as moving picture experts group (moving picture experts group, MPEG) 1, MPEG2, MPEG3, MPEG4, and the like.
The NPU is a neural-network (NN) computing processor, and can rapidly process input information by referencing a biological neural network structure, for example, referencing a transmission mode between human brain neurons, and can also continuously perform self-learning. Applications such as intelligent recognition of the terminal 101, for example, image recognition, face recognition, voice recognition, text understanding, etc., can be realized through the NPU.
The external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to realize the memory capability of the extension terminal 101. The external memory card communicates with the processor 110 through an external memory interface 120 to implement data storage functions. For example, files such as music, video, etc. are stored in an external memory card.
The internal memory 121 may be used to store computer executable program code including instructions. The internal memory 121 may include a storage program area and a storage data area. The storage program area may store an application program (such as a sound playing function, an image playing function, etc.) required for at least one function of the operating system, etc. The storage data area may store data created during use of the terminal 101 (such as audio data, phonebook, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may further include a nonvolatile memory such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (universal flash storage, UFS), and the like. The processor 110 performs various functional applications of the terminal 101 and data processing by executing instructions stored in the internal memory 121 and/or instructions stored in a memory provided in the processor.
The terminal 101 may implement audio functions through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, an application processor, and the like. Such as music playing, recording, etc.
The audio module 170 is used to convert digital audio information into an analog audio signal output and also to convert an analog audio input into a digital audio signal. The audio module 170 may also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be disposed in the processor 110, or a portion of the functional modules of the audio module 170 may be disposed in the processor 110.
The speaker 170A, also referred to as a "horn," is used to convert audio electrical signals into sound signals. The terminal 101 can listen to music through the speaker 170A or listen to hands-free calls.
A receiver 170B, also referred to as a "earpiece", is used to convert the audio electrical signal into a sound signal. When the terminal 101 picks up a call or voice message, the voice can be picked up by bringing the receiver 170B close to the human ear.
Microphone 170C, also referred to as a "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or transmitting voice information, the user can sound near the microphone 170C through the mouth, inputting a sound signal to the microphone 170C. The terminal 101 may be provided with at least one microphone 170C. In other embodiments, the terminal 101 may be provided with two microphones 170C, and may implement a noise reduction function in addition to collecting sound signals. In other embodiments, the terminal 101 may be further provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify the source of sound, implement directional recording functions, etc.
The earphone interface 170D is used to connect a wired earphone. The headset interface 170D may be a USB interface 130 or a 3.5mm open mobile electronic device platform (open mobile terminal platform, OMTP) standard interface, a american cellular telecommunications industry association (cellular telecommunications industry association of the USA, CTIA) standard interface.
The pressure sensor 180A is used to sense a pressure signal, and may convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A may be disposed on the display screen 194. The pressure sensor 180A is of various types, such as a resistive pressure sensor, an inductive pressure sensor, a capacitive pressure sensor, and the like. The capacitive pressure sensor may be a capacitive pressure sensor comprising at least two parallel plates with conductive material. The capacitance between the electrodes changes when a force is applied to the pressure sensor 180A. The terminal 101 determines the strength of the pressure from the change in capacitance. When a touch operation is applied to the display 194, the terminal 101 detects the intensity of the touch operation according to the pressure sensor 180A. The terminal 101 may also calculate the position of the touch from the detection signal of the pressure sensor 180A. In some embodiments, touch operations that act on the same touch location, but at different touch operation strengths, may correspond to different operation instructions. For example, when a touch operation with a touch operation intensity smaller than a first pressure threshold is applied to the short message application icon, an instruction to view the short message is executed. And executing an instruction for newly creating the short message when the touch operation with the touch operation intensity being greater than or equal to the first pressure threshold acts on the short message application icon.
The gyro sensor 180B may be used to determine a motion gesture of the terminal 101. In some embodiments, the angular velocity of terminal 101 about three axes (i.e., x, y, and z axes) may be determined by gyro sensor 180B. The gyro sensor 180B may be used for photographing anti-shake. Illustratively, when the shutter is pressed, the gyro sensor 180B detects the shake angle of the terminal 101, calculates the distance to be compensated by the lens module according to the angle, and makes the lens counteract the shake of the terminal 101 by the reverse motion, thereby realizing anti-shake. The gyro sensor 180B may also be used for navigating, somatosensory game scenes.
The air pressure sensor 180C is used to measure air pressure. In some embodiments, the terminal 101 calculates altitude from barometric pressure values measured by the barometric pressure sensor 180C, aiding in positioning and navigation.
The magnetic sensor 180D includes a hall sensor. The terminal 101 can detect the opening and closing of the flip cover using the magnetic sensor 180D. In some embodiments, when the terminal 101 is a flip machine, the terminal 101 may detect the opening and closing of the flip according to the magnetic sensor 180D. And then according to the detected opening and closing state of the leather sheath or the opening and closing state of the flip, the characteristics of automatic unlocking of the flip and the like are set.
The acceleration sensor 180E may detect the magnitude of acceleration of the terminal 101 in various directions (typically three axes). The magnitude and direction of gravity can be detected when the terminal 101 is stationary. The method can also be used for recognizing the gesture of the terminal 101, and can be applied to horizontal and vertical screen switching, pedometer and other applications.
A distance sensor 180F for measuring a distance. The terminal 101 may measure the distance by infrared or laser. In some embodiments, the terminal 101 may range using the distance sensor 180F to achieve fast focusing.
The proximity light sensor 180G may include, for example, a Light Emitting Diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The terminal 101 emits infrared light outward through the light emitting diode. The terminal 101 detects infrared reflected light from nearby objects using a photodiode. When sufficient reflected light is detected, it can be determined that there is an object near the terminal 101. When insufficient reflected light is detected, the terminal 101 may determine that there is no object in the vicinity of the terminal 101. The terminal 101 can detect that the user holds the terminal 101 close to the ear to talk by using the proximity light sensor 180G, so as to automatically extinguish the screen for the purpose of saving power. The proximity light sensor 180G may also be used in holster mode, pocket mode to automatically unlock and lock the screen.
The ambient light sensor 180L is used to sense ambient light level. The terminal 101 may adaptively adjust the brightness of the display 194 based on the perceived ambient light level. The ambient light sensor 180L may also be used to automatically adjust white balance when taking a photograph. The ambient light sensor 180L may also cooperate with the proximity light sensor 180G to detect whether the terminal 101 is in a pocket to prevent false touches.
The fingerprint sensor 180H is used to collect a fingerprint. The terminal 101 can utilize the collected fingerprint characteristics to realize fingerprint unlocking, access the application lock, fingerprint photographing, fingerprint incoming call answering and the like.
The temperature sensor 180J is for detecting temperature. In some embodiments, terminal 101 performs a temperature processing strategy using the temperature detected by temperature sensor 180J. For example, when the temperature reported by temperature sensor 180J exceeds a threshold, terminal 101 performs a reduction in the performance of a processor located in the vicinity of temperature sensor 180J in order to reduce power consumption to implement thermal protection. In other embodiments, when the temperature is below another threshold, the terminal 101 heats the battery 142 to avoid the low temperature causing the terminal 101 to be abnormally shut down. In other embodiments, when the temperature is below a further threshold, terminal 101 performs boosting of the output voltage of battery 142 to avoid abnormal shutdown caused by low temperatures.
The touch sensor 180K, also referred to as a "touch device". The touch sensor 180K may be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, which is also called a "touch screen". The touch sensor 180K is for detecting a touch operation acting thereon or thereabout. The touch sensor may communicate the detected touch operation to the application processor to determine the touch event type. Visual output related to touch operations may be provided through the display 194. In other embodiments, the touch sensor 180K may be disposed on the surface of the terminal 101 at a different location than the display 194.
The bone conduction sensor 180M may acquire a vibration signal. In some embodiments, bone conduction sensor 180M may acquire a vibration signal of a human vocal tract vibrating bone pieces. The bone conduction sensor 180M may also contact the pulse of the human body to receive the blood pressure pulsation signal. In some embodiments, bone conduction sensor 180M may also be provided in a headset, in combination with an osteoinductive headset. The audio module 170 may analyze the voice signal based on the vibration signal of the sound portion vibration bone block obtained by the bone conduction sensor 180M, so as to implement a voice function. The application processor may analyze the heart rate information based on the blood pressure beat signal acquired by the bone conduction sensor 180M, so as to implement a heart rate detection function.
The keys 190 include a power-on key, a volume key, etc. The keys 190 may be mechanical keys. Or may be a touch key. The terminal 101 may receive key inputs, generating key signal inputs related to user settings and function controls of the terminal 101.
The motor 191 may generate a vibration cue. The motor 191 may be used for incoming call vibration alerting as well as for touch vibration feedback. For example, touch operations acting on different applications (e.g., photographing, audio playing, etc.) may correspond to different vibration feedback effects. The motor 191 may also correspond to different vibration feedback effects by touching different areas of the display screen 194. Different application scenarios (such as time reminding, receiving information, alarm clock, game, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect may also support customization.
The indicator 192 may be an indicator light, may be used to indicate a state of charge, a change in charge, a message indicating a missed call, a notification, etc.
The SIM card interface 195 is used to connect a SIM card. The SIM card may be contacted and separated from the terminal 101 by inserting the SIM card interface 195 or extracting it from the SIM card interface 195. The terminal 101 may support 1 or N SIM card interfaces, N being a positive integer greater than 1. The SIM card interface 195 may support Nano SIM cards, micro SIM cards, and the like. The same SIM card interface 195 may be used to insert multiple cards simultaneously. The types of the plurality of cards may be the same or different. The SIM card interface 195 may also be compatible with different types of SIM cards. The SIM card interface 195 may also be compatible with external memory cards. The terminal 101 interacts with the network through the SIM card to realize functions such as communication and data communication. In some embodiments, the terminal 101 employs an eSIM, i.e., an embedded SIM card. The eSIM card may be embedded in the terminal 101 and cannot be separated from the terminal 101.
The software system of the terminal 101 may employ a layered architecture, an event driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. In the embodiment of the invention, taking an Android system with a layered architecture as an example, a software structure of the terminal 101 is illustrated.
Fig. 3 is a software configuration block diagram of the terminal 101 according to the embodiment of the present invention.
The layered architecture divides the software into several layers, each with distinct roles and branches. The layers communicate with each other through a software interface. In some embodiments, the Android system is divided into four layers, from top to bottom, an application layer, an application framework layer, an Zhuoyun rows (Android runtime) and system libraries, and a kernel layer, respectively.
The application layer may include a series of application packages.
As shown in fig. 3, the application package may include applications (only a portion of which is shown) such as cameras, gallery, calendar, phone calls, maps, navigation, WLAN, bluetooth, music, video, short messages, browser, etc. Most of these applications require internet surfing, for example, navigation, browsers, video, music, etc.
The application framework layer provides an application programming interface (application programming interface, API) and programming framework for the application of the application layer. The application framework layer includes a number of predefined functions.
As shown in fig. 3, the application framework layer may include a DNS protocol stack and a status notification module. An application in the application layer may send a domain name resolution request to a DNS server through a DNS protocol stack. The domain name and the IP address corresponding to the domain name may be cached in the DNS protocol stack, including an IPv4 address and an IPv6 address.
In some embodiments, the status notification module may send the disabling information received from the kernel layer to the DNS protocol stack, which may then be maintained by the DNS protocol stack, including but not limited to the DNS protocol stack maintaining a single IPv6 address or all IPv6 addresses disabled by a single application.
For example, the DNS protocol stack determines, according to a domain name resolution request sent by an application, whether all IPv6 addresses are disabled for the application, and if not, includes both an a record and an AAAA record in the domain name resolution request sent to the DNS server. After receiving a plurality of IPv4 addresses and a plurality of IPv6 addresses sent by a DNS server, a subsequent DNS protocol stack judges whether the IPv6 addresses are forbidden by the same application program or not, if so, the forbidden IPv6 addresses are filtered out of the IPv6 addresses, then one IPv6 address is selected from the rest IPv6 addresses to send the IPv6 addresses to the application program, namely the DNS protocol stack sends an IPv6 address which is not forbidden to the application program, and then the application program establishes communication connection with the application server based on the IPv6 addresses which are not forbidden and carries out communication.
For another example, the DNS protocol stack includes, according to a domain name resolution request sent by the application, a domain name resolution request sent to the DNS server, and the domain name resolution request sent to the DNS server includes both an a record and an AAAA record. After receiving the multiple IPv4 addresses and the multiple IPv6 addresses sent by the DNS server, the subsequent DNS protocol stack judges whether the application program is forbidden to all IPv6 addresses. If yes, selecting one IPv4 address from the IPv4 addresses and sending the selected IPv4 address to the application program, and then establishing communication connection with the application server by the application program based on the selected IPv4 address and carrying out communication.
For another example, the DNS protocol stack determines whether the application is disabled for all IPV6 addresses based on a domain name resolution request sent by the application. If yes, only the record A is included in the domain name resolution request sent to the DNS server. After receiving the multiple IPv4 addresses sent by the DNS server, the subsequent DNS protocol stack selects one IPv4 address from the multiple IPv4 addresses and sends the selected IPv4 address to the application program, and then the application program establishes communication connection with the application server based on the selected IPv4 address and performs communication.
For another example, when the DNS protocol stack determines that the disabling duration of the single IPv6 address of the single application reaches the preset duration, or determines that an operator handover event occurs, or determines that a network handover time occurs, the disabling state of the single IPv6 address or all IPv6 addresses of the single application is released.
The application framework layer may also include a window manager, content provider, view system, telephony manager, resource manager, notification manager, etc.
The window manager is used for managing window programs. The window manager can acquire the size of the display screen, judge whether a status bar exists, lock the screen, intercept the screen and the like.
The content provider is used to store and retrieve data and make such data accessible to applications. The data may include control panel data, video, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.
The view system includes visual controls, such as controls to display text, controls to display pictures, and the like. The view system may be used to build applications. The display interface may be composed of one or more views. For example, the display interface of the control panel may include a view displaying text and a view displaying a picture.
The telephony manager is used to provide the communication functions of the terminal 101. Such as the management of call status (including on, hung-up, etc.).
The resource manager provides various resources for the application program, such as localization strings, icons, pictures, layout files, video files, and the like.
The notification manager allows the application to display notification information in a status bar, can be used to communicate notification type messages, can automatically disappear after a short dwell, and does not require user interaction. Such as notification manager is used to inform that the download is complete, message alerts, etc. The notification manager may also be a notification in the form of a chart or scroll bar text that appears on the system top status bar, such as a notification of a background running application, or a notification that appears on the screen in the form of a dialog window. For example, a text message is prompted in a status bar, a prompt tone is emitted, the electronic device vibrates, and an indicator light blinks, etc.
Android run time includes a core library and virtual machines. Android runtime is responsible for scheduling and management of the android system.
The core library comprises two parts, wherein one part is a function required to be called by java language, and the other part is an android core library.
The application layer and the application framework layer run in a virtual machine. The virtual machine executes java files of the application program layer and the application program framework layer as binary files. The virtual machine is used for executing the functions of object life cycle management, stack management, thread management, security and exception management, garbage collection and the like.
The system library may include a plurality of functional modules. Such as surface 1 manager (surface manager), media library (Media Libraries), three-dimensional graphics processing library (e.g., openGL ES), 2D graphics engine (e.g., SGL), etc.
The surface manager is used to manage the display subsystem and provides a fusion of 2D and 3D layers for multiple applications.
Media libraries support a variety of commonly used audio, video format playback and recording, still image files, and the like. The media library may support a variety of audio and video encoding formats, such as MPEG4, h.264, MP3, AAC, AMR, JPG, PNG, etc.
The three-dimensional graphic processing library is used for realizing three-dimensional graphic drawing, image rendering, synthesis, layer processing and the like.
The 2D graphics engine is a drawing engine for 2D drawing.
The kernel layer is a layer between hardware and software. The inner core layer at least comprises a display driver, a camera driver, an audio driver and a sensor driver.
In the embodiment of the present disclosure, the kernel layer includes a TCP/IP protocol stack, which is configured to encapsulate a message generated by an upper layer application, and generate a message conforming to an inter-network communication protocol (such as an IPv4 protocol or an IPv6 protocol) so as to be transmitted to a corresponding server through a network. Correspondingly, the method is also used for analyzing the message sent by the server received from the network, generating a message which can be analyzed by the upper layer application, and sending the message to the upper layer application for further processing and the like.
The kernel layer also comprises a network monitoring module which is used for monitoring the network quality of the IPv4 network and the IPv6 network of the foreground application in the terminal and judging whether a single IPv6 address or all IPv6 addresses of the foreground application need to be forbidden.
The kernel layer also includes Wi-Fi drivers and Modem drivers. Wi-Fi driven may be used to establish and disconnect a Wi-Fi link between the terminal 101 and the DNS server 102 or the application server 103, and to transmit messages using the Wi-Fi link. Modem driver, can be used for setting up and breaking the mobile communication link between terminal 101 and base station, and use this mobile communication link to communicate with DNS server 102 or application server 103 through the mobile communication network.
The technical scheme provided by the embodiment of the specification is described below with reference to the accompanying drawings. The technical solutions involved in the following embodiments may be implemented in the hardware architecture shown in fig. 2 and the terminal 101 of the software architecture shown in fig. 3.
Fig. 4 is a schematic flow chart of an access method of an application server according to an embodiment of the present disclosure. The flow is described as follows:
Step 201, the terminal detects a first operation aiming at a target application, wherein the first operation indicates the target application to access a first domain name.
In the embodiment of the present specification, the target application may be regarded as an application having a web function and running in the foreground, for example, the target application is a browser, a news-type application, or a video-type application, and is not particularly limited herein. When the user performs the first operation on the target application, the terminal can know that the user wants to access the first domain name through the target application. It should be appreciated that the first operation described above may be a single operation or may be a combination of a plurality of operations, and is not particularly limited herein.
Referring to fig. 5, a schematic diagram of performing a first operation on a target application according to an embodiment of the present disclosure is provided. As shown in fig. 5 (a), if the target application is a browser, when the terminal detects that the browser is started for the first time after being started, or detects that the browser running in the background is switched to the foreground, the terminal may display the main interface 301 of the browser. Then, a first operation performed by the user on the browser to access the first domain name may include an operation of entering a web address or keyword corresponding to the first domain name in an address bar 302 in the main interface 301 and then selecting the "search" control 503. Or may be an operation that the user clicks the text link 504 or the picture link 505 corresponding to the first domain name on the main interface 301 of the browser.
As shown in fig. 5 (b), if the target application is a news application, the first operation performed by the user on the news application to access the first domain name may include an operation of starting the news application 507 at the terminal main interface 506. In some embodiments, as shown in FIG. 5 (c), the news application may pre-load the contents of the main interface 508, and the first operation performed by the user on the news application to access the first domain name may further include the user selecting, on the main interface 508 of the news application, a control 509 corresponding to a piece of news, such as news 1.
It should be understood that, in the implementation of the first operation, the related information may be input manually by the user and clicked manually, or may be input by the user through voice and selected through voice, which is not limited in particular herein.
Step 202, the terminal responds to a first operation and sends a first domain name resolution request to a domain name system server, wherein the first domain name resolution request is used for requesting a plurality of first IPv4 addresses and a plurality of first IPv6 addresses corresponding to a first domain name.
In the embodiment of the present disclosure, after detecting a first operation for characterizing access to a first domain name, a target application in a terminal may find an IP address corresponding to the first domain name through a DNS protocol stack in a framework layer. If the DNS protocol stack has the IP address corresponding to the first domain name cached, for example, the IPv4 address corresponding to the first domain name is found, and the IPv6 address corresponding to the first domain name is found, then the IPv6 address is preferentially used to request to connect to the corresponding application server.
If the DNS protocol stack in the framework layer of the target application does not find the IP address corresponding to the first domain name, namely, neither the IPv4 address corresponding to the first domain name nor the IPv6 address corresponding to the first domain name is found, the terminal sends a first domain name resolution request to the DNS server through the DNS protocol stack, wherein the first domain name resolution request comprises an A record and an AAAA record at the same time so as to request the DNS server to return a plurality of IPv4 addresses and a plurality of IPv6 addresses. Of course, in another embodiment, no record may be specified in the first domain name resolution request, i.e., neither an a record nor an AAAA record is included in the first domain name resolution request, so as to request the DNS server to return multiple IPv4 addresses and multiple IPv6 addresses.
In step 203, the dns server resolves the first domain name in response to the first domain name resolution request to obtain a plurality of first IPv4 addresses and a plurality of first IPv6 addresses.
In this embodiment of the present disclosure, after receiving the first domain name resolution request, the DNS server resolves the first domain name according to the resolved domain name and the network address type to be resolved carried in the first domain name resolution request, so as to obtain a plurality of first IPv4 addresses and a plurality of first IPv6 addresses corresponding to the first domain name. It should be understood that the specific number of IPv4 addresses and IPv6 addresses corresponding to the first domain name that can be resolved by the DNS server depends on the specific configuration adopted by the server of the target application, and the present application is not particularly limited.
Fig. 6 is a schematic flow chart of a domain name resolution method according to an embodiment of the present disclosure. As shown in fig. 6, the resolution process will be described using the first domain name www.example.com as an example.
Step 301, the dns server sends a query request to the root domain name server requesting a query of the IP address of the top-level domain server of the com domain.
It should be understood that the top-level domain names managed by the root domain name server include, but are not limited to, com, & cn, & net, & org, & edu, & gov, and the like.
Step 302, the root domain name server sends a response message to the DNS server, where the response message carries the IP address of the top-level domain server of the com domain.
Step 303, the DNS server sends a query request to the top domain name server of the com domain based on the IP address of the top domain name server of the com domain, requesting to query the IP address of the authoritative domain name server of the example.
Step 304. The top-level domain name server of the com domain sends a response message to the DNS server, the response message carrying the IP address of the authoritative domain name server of the example.
Step 305, the dns server sends a query request to the authoritative domain name server of the example.
And 306, the authoritative domain name server of the example domain sends a response message to the DNS server, wherein the response message carries the IP address corresponding to www.example.com, and the network address comprises a plurality of IPv4 addresses and a plurality of IPv6 addresses.
It should be understood that when the top-level domain name type to which the first domain name belongs is other types, the resolution process for the first domain name is similar, and will not be described herein.
In step 204, the DNS server sends a first domain name resolution response to the terminal, wherein the first domain name resolution response carries a plurality of first IPv4 addresses and a plurality of first IPv6 addresses corresponding to the first domain name.
In the embodiment of the present disclosure, after obtaining the domain name resolution result of the first domain name, the DNS server obtains a plurality of first IPv4 addresses and a plurality of first IPv6 addresses corresponding to the first domain name, so that, on one hand, the domain name resolution result corresponding to the first domain name may be saved, and on the other hand, the domain name resolution result of the first domain name is sent to the terminal, so that the terminal may access the corresponding application server according to the domain name resolution result.
Step 205, the terminal sends a first connection request to the first application server, where the first connection request includes a first target IPv6 address of the plurality of first IPv6 addresses.
In this embodiment of the present disclosure, after obtaining a plurality of first IPv4 addresses and a plurality of first IPv6 addresses corresponding to a first domain name, the terminal may select a first target IPv6 address from a plurality of first IPv6 addresses based on a principle of preferentially using the IPv6 addresses, for example, the first target IPv6 address may be a first IPv6 address in the plurality of first IPv6 addresses, or the first target IPv6 address may be any IPv6 address randomly selected from the plurality of first IPv6 addresses. And then, initiating a first connection request to a corresponding first application server based on the first target IPv6 address.
Fig. 7 is a schematic flow chart of a connection establishment process between a terminal and an application server according to an embodiment of the present disclosure. As shown in fig. 7, the process of establishing a connection between a terminal and a first application service is described as follows:
step 401, the terminal creates an IPv6 socket and binds the IPv6 address and port number of the terminal.
Step 402, the terminal sends an IPv6 message segment with a SYN flag to the first application server, where the IPv6 message segment carries an active IPv6 address (terminal IPv6 address) and a source port number (terminal port number), and a destination IPv6 address (i.e., a first destination IPv6 address) and a destination port number (first application server port number), and the SYN flag IPv6 message segment is used to request the terminal to establish a connection with the first application server.
Step 403, the first application server creates a new IPv6 socket and binds the source IPv6 address (i.e. the first target IPv6 address) and the source port number (i.e. the first application server port number).
Step 404, the first application server sends an IPv6 message segment with a SYN-ACK flag to the terminal, where the IPv6 message segment carries an active IPv6 address (i.e., a first target IPv6 address) and a source port number (i.e., a first application server port number), and the target IPv6 address (i.e., the terminal IPv6 address) and the target port number (i.e., the terminal port number), and the IPv6 message segment with the SYN-ACK flag is used to inform that the terminal has successfully received the connection request.
Step 405. The terminal creates a new IPv6 socket and binds the source IPv6 address (terminal IPv6 address) and the source port number (terminal port number).
In step 406, the terminal sends an IPv6 message segment with an ACK flag to the first application server, where the IPv6 message segment carries an active IPv6 address (terminal IPv6 address) and a source port number (terminal port number), and a destination IPv6 address (i.e., a first destination IPv6 address) and a destination port number (first application server port number), and the IPv6 message segment with an ACK flag is used to inform the first server that the terminal has received the IPv6 message segment with a SYN-ACK flag, and inform the first application server that data transmission is possible.
It will be appreciated that after the terminal has established a connection with the first application server, data transfer may take place using the respective socket.
Step 206, the terminal determines that the network quality when accessing the first application server based on the first target IPv6 address is lower than the first set network quality level.
In this embodiment of the present disclosure, a network where a first IPv6 address is located may have network fluctuation, or a first application server may have congestion, so that the quality of the network when a terminal accesses the first application server based on a first target IPv6 address is poor, and in this embodiment of the present disclosure, a situation that the network is poor when the terminal accesses any application server is referred to as an access anomaly. The terminal is represented by that the terminal cannot obtain the response of the first application server in a longer time or the waiting time of the terminal for obtaining the response of the first application server is longer.
The following describes in detail how the terminal determines the network quality between itself and the first application server.
Fig. 8 is a flowchart of a method for evaluating network quality of a network where a first IPv6 address is located according to an embodiment of the present disclosure. Step 206 may be implemented in particular by performing sub-steps 2061 to 2062:
Step 2061, determining the single address connection anomaly rate according to the number of IPv6 sockets with the target address of the first application server and the number of the IPv6 sockets which are not responded by the first application server, wherein the target address is created in the first preset time period.
In this embodiment of the present disclosure, the terminal creates an IPv6 socket with a target address of the first application server, which is used to establish a connection with the first application server. Then, the terminal calculates the number of IPv6 sockets with the target address created by the first preset duration as the first application server and the number of IPv6 sockets which are not responded by the first application server in the created IPv6 sockets, so that the single address connection abnormality rate when connection is established based on the first IPv6 address can be determined.
For example, the single address connection anomaly rate when establishing a connection with respect to the first target IPv6 address may be determined by calculating a ratio of a number of IPv6 sockets created within the first preset duration for which the target address is the first application server that are not responded to by the first application server to a number of IPv6 sockets created within the first preset duration for which the target address is the first application server. The calculation formula of the single address connection anomaly rate is shown in formula (1):
Wherein V6SockErr represents a single address connection anomaly rate, V6SockNum represents the number of IPv6 sockets with the target address of the first application server created within a first preset duration, and V6SockErrNum represents the number of IPv6 sockets with the target address of the first application server created within the first preset duration, which are not responded by the first application server.
It will be appreciated that the above embodiments are from the point of view of establishing a connection to evaluate the quality of the network between the terminal and the first application server. And if the single address abnormality rate is larger, the possibility that the network quality is poor when the terminal accesses the first application server based on the first target IPv6 address is indicated to be larger, and otherwise, the possibility that the network quality is poor when the terminal accesses the first application server based on the first target IPv6 address is indicated to be smaller.
Step 2062, determining the single address data transmission anomaly rate according to the number of data packets sent by the first application server and received in the first preset time period and the number of anomaly data packets in the data packets.
In this embodiment of the present disclosure, after the terminal establishes a connection with the first application server, there is data transmission between the terminal and the first application server, and the carrier of the data transmission is a data packet. The terminal can count the number of data packets sent by the first application server received in the first preset duration and the number of abnormal data packets in the data packets sent by the first application server received in the first preset duration, so that the single-address data transmission abnormal rate in the data transmission process after the connection is established based on the first target IPv6 address can be determined.
For example, the single address data transmission abnormal rate in the data transmission process after the connection is established based on the first target IPv6 address may be determined by calculating the number of abnormal data packets in the data packets sent by the first application server and received by the terminal in the first preset time period, and the number of data packets sent by the first application server and received by the terminal in the first preset time period. The calculation formula of the single address data transmission abnormal rate is shown as formula (2):
wherein V6SkbErr represents the abnormal rate of single address data transmission, V6SkbNum represents the number of data packets sent by the first application server received by the terminal within the first preset time period, and V6SkbErrNum represents the number of abnormal data packets in the data packets sent by the first application server received by the terminal within the first preset time period.
It should be appreciated that the above-described embodiments evaluate the network quality between the terminal and the first application server from a data transmission perspective. And if the single address data transmission abnormal rate is larger, the possibility that the network quality is poor when the terminal accesses the first application server based on the first target IPv6 address is larger, and otherwise, the possibility that the network quality is poor when the terminal accesses the first application server based on the first target IPv6 address is smaller.
Step 2063, obtaining the first network anomaly rate in the unit duration according to the single address connection anomaly rate, the single address data transmission anomaly rate and the first preset duration.
In the embodiment of the present disclosure, after obtaining, respectively, a single address connection anomaly rate when the terminal connects to the first application server based on the first target IPv6 address within a first preset duration, and a single address data transmission anomaly rate when the terminal performs data transmission with the first application server, the first network anomaly rate within a unit duration may be determined according to the single address connection anomaly rate, the single address data transmission anomaly rate, and the first preset duration.
For example, a weighted sum of the single address connection anomaly rate and the corresponding weight, and the single address data transmission anomaly rate and the corresponding weight may be calculated, and then a ratio of the weighted sum to a first preset time period may be calculated, so as to determine the first network anomaly rate within the unit time period. The calculation formula of the first network anomaly rate is shown as formula (3):
QualV6=(V6SockErr*W1+V6SkbErr*W2)/T1 (3)
wherein QualV denotes a first network anomaly rate, V6SockErr denotes a single address connection anomaly rate, W1 denotes a weight corresponding to the single address connection anomaly rate, V6SkbErr denotes a single address data transmission anomaly rate, W2 denotes a weight corresponding to the single address data transmission anomaly rate, and the sum of W1 and W2 is 1. In one possible embodiment, W1 may be set to be greater than W2 in view of the greater extent of impact of the connection process anomaly on whether a network quality problem occurs between the final terminal and the first application server than the data transmission process anomaly. Of course, other arrangements may be adopted according to the actual situation, and are not particularly limited here.
Step 2064 is a determination that the network quality at the time of accessing the first application server based on the first target IPv6 address is below the first set network quality level responsive to the first network anomaly rate being above the first set threshold.
In the embodiment of the present disclosure, if the first network anomaly rate between the terminal and the first application server, which is determined based on the connection establishment process and the data transmission process, is higher, it may be more accurately determined that the network quality of the terminal accessing the first application server based on the first target IPv6 address is worse.
Step 207, the terminal detects a second operation for the target application, wherein the second operation instructs the target application to access the first domain name again.
In the embodiment of the present disclosure, when the terminal determines that the network quality is poor when accessing the first application server based on the first target IPv6 address, the terminal appears that the response from the first application server cannot be obtained, or the waiting time for obtaining the response of the first application server is long, and at this time, the user may perform a second operation on the target application, so that the target application accesses the first domain name again. It should be appreciated that the second operation for triggering the target application to access the first domain name again may be the same operation as the first operation for triggering the target application to access the first domain name for the first time, and may refer to the related description in step 201, or may be a different operation, for example, the second operation may be a refresh operation.
And step 208, the terminal responds to the second operation and sends a second domain name resolution request to the domain name system server, wherein the second domain name resolution request is used for requesting a plurality of second Pv4 addresses and a plurality of second IPv6 addresses corresponding to the first domain name.
In this embodiment of the present disclosure, after detecting the second operation of revisiting the first domain name, the DNS protocol stack in the target application framework layer sends a second domain name resolution request to the DNS server to request the DNS server to return a plurality of second IPv4 addresses and a plurality of second IPv6 addresses corresponding to the first domain name, which may refer to the description related to step 202 and will not be repeated herein.
In step 209, the DNS server resolves the first domain name in response to the second domain name resolution request to obtain a plurality of second IPv4 addresses and a plurality of second IPv6 addresses.
In this embodiment of the present disclosure, the DNS server performs the resolution process on the first domain name, which may refer to the related description of step 203, and will not be described herein. It should be noted that the second IPv4 addresses obtained by resolving the first domain name again may be identical or partially identical to the first IPv4 addresses obtained by resolving the first domain name in step 203. Similarly, the second IPv6 addresses obtained by resolving the first domain name again may be identical or partially identical to the first IPv6 addresses obtained when resolving the first domain name in step 203.
Step 210, the DNS server sends a second domain name resolution response to the terminal, wherein the second domain name resolution response carries a plurality of second IPv4 addresses and a plurality of second IPv6 addresses corresponding to the first domain name.
In the embodiment of the present disclosure, after obtaining the domain name resolution result of the first domain name again, the DNS server obtains a plurality of second IPv4 addresses and a plurality of second IPv6 addresses corresponding to the first domain name, on one hand, the domain name resolution result corresponding to the first domain name obtained again may be saved, and on the other hand, the domain name resolution result of the first domain name obtained again is sent to the terminal, so that the terminal may access the corresponding application server according to the domain name resolution result.
Step 211, the terminal sends a second connection request to the second application server, wherein the second connection request comprises a second target IPv6 address in the plurality of second IPv6 addresses.
In this embodiment of the present disclosure, after obtaining a plurality of second IPv4 addresses and a plurality of second IPv6 addresses corresponding to a first domain name, a terminal initiates a connection request to a corresponding second application server by selecting one of the plurality of second IPv6 addresses, for example, a second target IPv6 address, based on a principle of preferentially using the IPv6 addresses. It should be noted that, historically, when accessing the first application server based on the first target IPv6 address, the network quality is poor, so in order to avoid the problem of repeated access anomaly caused by repeated use of the first target IPv6 address, the second target IPv6 address is different from the first target IPv6 address, so that the success rate of accessing the application server based on the IPv6 address and the efficiency of accessing the application server by the terminal can be improved, which is beneficial to improving the internet surfing experience of the user.
It should be understood that the first application server corresponding to the first target IPv6 address and the second application server corresponding to the second target IPv6 address may be the same application server or may be different application servers, and are not particularly limited herein.
In some embodiments, considering that the network quality of the terminal is poor when accessing the first application server based on the first target IPv6 address due to the existence of the fluctuation of the network where the first target IPv6 address exists, the network where other IPv6 addresses in the plurality of first IPv6 addresses may not exist, so in the embodiments of the present disclosure, other IPv6 addresses except the first target IPv6 address may also be selected directly from the plurality of first IPv6 addresses to access the corresponding application server.
Fig. 9 is a schematic flow chart of an access method of an application server according to an embodiment of the present disclosure. After step 207, step 212 may also continue to be performed:
And 212, the terminal responds to the second operation and sends a third connection request to a third application server, wherein the third connection request carries a third target IPv6 address in the plurality of first target IPv6 addresses.
In the embodiment of the specification, when the terminal accesses the first application server based on the first IPv6 address, and it is detected that the target application accesses the first domain name again, the terminal may select a third target IPv6 address different from the first target IPv6 address from a plurality of first IPv6 addresses obtained when the terminal first accesses and resolves the first domain name, to access the corresponding third application server, so as to avoid the situation of repeated access abnormality caused by repeated use of the first target IPv6 address, thereby improving the success rate of the terminal accessing the application server based on the IPv6 address and the efficiency of accessing the application server, and being beneficial to improving the internet surfing experience of the user. It should be understood that the first application server corresponding to the first target IPv6 address and the third application server corresponding to the third target IPv6 address may be the same application server or may be different application servers, and are not particularly limited herein.
In some embodiments, in a case that the network quality of the target application accessing the first application server based on the first IPv6 address in the terminal is poor, the target application may be further restricted from using the first target IPv6 address.
Fig. 10 and fig. 11 are schematic flow diagrams of an access method of an application server provided in the present disclosure. After performing step 206, step 213 may be further performed:
step 213, the target application is set to disable the first target IPv6 address.
In the embodiment of the present disclosure, if the terminal determines that the network quality of the target application accessing the corresponding first application server based on the first target IPv6 address is poor, the terminal may set the target application to disable the first target IPv6 address, so as to avoid repeated access anomalies caused by repeatedly using the first target IPv6 address to access the first application server when the target application accesses the first domain name again.
For example, the target application is provided with a corresponding address blacklist, and the first target IPv6 address may be added to the address blacklist corresponding to the target application, so as to achieve the effect that the target application disables the first target IPv6 address, and there are other possible ways, which are not particularly limited herein.
The following describes in detail how the terminal connects to the corresponding application server based on other IPv6 addresses after the target application is set to disable the first target IPv6 address, respectively.
Referring to fig. 12, a flowchart of a method for connecting to a second application server based on a second target IPv6 address according to an embodiment of the present disclosure is provided. Step 211 may be implemented in particular by sub-steps 2111 to 2112:
Step 2111, in response to the first target IPv6 address forbidden by the target application being present in the plurality of second IPv6 addresses, filtering the first target IPv6 address forbidden by the target application from the plurality of second IPv6 addresses, and determining the second target IPv6 address from the remaining second IPv6 addresses.
In this embodiment of the present disclosure, after receiving the plurality of second IPv4 addresses and the plurality of second IPv6 addresses, the terminal first determines whether a first target IPv6 address disabled by the target application exists in the plurality of second IPv6 addresses based on a rule of preferentially using the IPv6 addresses. If the target IPv6 address does not exist, the second target IPv6 address is directly determined from the plurality of second IPv6 addresses. For example, the obtained plurality of second IPv6 addresses are presented in a list, and a first second IPv6 address may be selected as the second target IPv6 address from an IPv6 address list containing the plurality of second IPv6 addresses, or one second IPv6 address may be randomly selected as the second target IPv6 address from the plurality of second IPv6 addresses. And if the first target IPv6 address forbidden by the target application exists in the plurality of second IPv6 addresses, filtering the first target IPv6 address from the plurality of second IPv6 addresses, and then determining the second target IPv6 address from the rest of second IPv6 addresses. Here, the manner of determining the second target IPv6 address from the remaining second IPv6 addresses is similar to the manner of directly determining the second target IPv6 address from the plurality of second IPv6 addresses, and is not described herein again.
Step 2112, sending a second connection request to the second application server based on the second target IPv6 address.
In the embodiment of the present disclosure, after determining a second target IPv6 address different from the first target IPv6 address from the plurality of second IPv6 addresses, the corresponding second application server may be accessed based on the second target IPv6 address.
Referring to fig. 13, a flowchart of a method for connecting a third application server based on a third target IPv6 address according to an embodiment of the present disclosure is provided. Step 212 may be implemented by performing sub-steps 2121 to 2122:
step 2121, responsive to the second operation, filtering the first target IPv6 address disabled by the target application from the plurality of first IPv6 addresses and determining a third target IPv6 address from the remaining first IPv6 addresses.
In the embodiment of the present disclosure, when the terminal determines that the target application needs to access the first domain name again, first, the terminal determines whether the first target IPv6 address is disabled by the target application, if yes, filters the first target IPv6 address from the plurality of first IPv6 addresses, and then determines a third target IPv6 address from the remaining first IPv6 addresses. Here, the manner of determining the third target IPv6 address from the remaining first IPv6 addresses is similar to the manner of directly determining the second target IPv6 address from the plurality of second IPv6 addresses, and is not described herein again.
Step 2122, sending a third connection request to a third application server based on the third target IPv6 address.
In the embodiment of the present disclosure, after determining a third target IPv6 address different from the first target IPv6 address from the plurality of first IPv6 addresses, the corresponding third application server may be accessed based on the third target IPv6 address.
In some embodiments, when the target application in the terminal accesses the first application server based on the first target IPv6 address, the network quality is poor, possibly due to the existence of the fluctuation of the network where the first target IPv6 address is located, so as long as the network is restored to be normal, the target application can not be restricted to use the first target IPv6 address any more.
Fig. 14 and fig. 15 are schematic flow diagrams of an access method of an application server according to an embodiment of the present disclosure. After step 213, step 214 may also continue to be performed:
step 214, in response to the first preset condition being met, releasing the disabled state of the target application on the first target IPv6 address.
In the embodiment of the present disclosure, the network fluctuation of the network where the first and the first target IPv6 addresses are located may be considered to be short-term, so that the first preset condition may be that the disabling duration of disabling the first target IPv6 address by the target application reaches the second preset duration, after the second preset duration, the network short-term fluctuation of the network where the first target IPv6 address is located may be considered to be eliminated, and at this time, disabling of the first target IPv6 address by the target application may be released. For example, after the target application disables the first target IPv6 address for 24 hours, the disabled state of the target application for the first target IPv6 address is released. It should be appreciated that the second preset time period may be set according to an average time period of the network fluctuation in practical applications, and is not particularly limited herein.
The network fluctuation of the network where the second and first target IPv6 addresses are located may be caused by using a specific operator network, so that the first preset condition may be that an operator switching event is detected, and after the operator switching event is detected, the network fluctuation of the network where the first target IPv6 address is located may be considered to be eliminated, and at this time, the disabling of the target application on the first target IPv6 address may be released. For example, when the terminal detects that the operator of the user identification card (Subscriber Identity Module, SIM) used is china telecommunication when accessing the first application server using the first target IPv6 address, it is considered that the short-term fluctuation of the network where the first target IPv6 address is located is caused by using the china telecommunication network. After the target application is set to disable the first target IPv6 address, if the terminal detects that the operator of the used SIM card is switched from china telecommunication to china mobile, it can be considered that the network fluctuation of the network where the first target IPv6 address is located has been eliminated, and at this time, the disabled state of the first target IPv6 address can be released.
Third, network fluctuation of the network where the first target IPv6 address is located is caused by using a specific type of network, so that the first preset condition can be that a network switching event is detected, and after the network switching event is detected, the network fluctuation of the network where the first target IPv6 address is located can be considered to be eliminated, and at the moment, the disabling of the target application to the first target IPv6 address can be relieved. For example, when the first application server is accessed using the first target IPv6 address, the terminal detects that the type of network used is a cellular network, and it is considered that the network fluctuation of the network where the first target IPv6 address is located is caused by using the cellular network. After the target application is set to disable the first target IPv6 address, if the terminal detects that the used network type is switched from the cellular network to the wireless fidelity (WIRELESS FIDELITY, WIFI) network, it can be considered that the network fluctuation of the network where the first target IPv6 address is located is eliminated, and at this time, the disabled state of the target application on the first target IPv6 address can be released.
It should be understood that the above-mentioned disabling of the first target IPv6 address by the target application may be performed by moving the first target IPv6 address out of the address blacklist corresponding to the target application, and other possible implementations are not limited herein.
Of course, the first preset condition for releasing the disabled state of the target application to the first target IPv6 address includes, but is not limited to, the above three conditions, and the present application is not particularly limited.
In some embodiments, the target application in the terminal may access other domain names in addition to the first domain name. If the target application accesses the corresponding application server based on different IPv6 addresses corresponding to different domain names, the problem of poor network quality often occurs, which indicates that the IPv6 network used by the target application may have poor overall network quality, and at this time, the target application may switch to the IPv4 network for priority use.
Referring to fig. 16, a flow chart of a method for accessing an application server based on an IPv4 address according to an embodiment of the present disclosure is provided. The flow of the method is described as follows:
Step 215, the terminal determines that the network quality of the IPv6 network of the target application is lower than the second set network quality level.
In the embodiment of the present disclosure, the terminal may evaluate the overall network quality of the IPv6 network used by the target application according to the overall situation that the target application accesses different application servers based on different IPv6 addresses over a period of time. If it is determined that the overall network quality of the IPv6 network used by the target application is poor, the IPv6 address is not preferentially used to access the corresponding application server in the subsequent process, but is switched to use the IPv4 address to access the corresponding application server.
A description is given below of how to evaluate the overall network quality of the IPv6 network used by the target application.
Fig. 17 is a flowchart of a method for evaluating network quality of an IPv6 network of a target application according to an embodiment of the present application. Step 215 may be implemented by performing sub-steps 2151 through 2154:
and 2151, determining the multi-address abnormal access rate according to the total number of accesses of the target application to the corresponding application server based on the multiple target IPv6 addresses and the total number of abnormal accesses of the target application to the corresponding application server based on the multiple target IPv6 addresses within the third preset time period.
In this embodiment of the present disclosure, the target application in the terminal accesses the first application server based on the first target IPv6 address, may be recorded as one access, on the basis of this, in the case that the network quality of accessing the first application server based on the first target IPv6 address is poor, the target application in the terminal accesses the second application server based on the second target IPv6 address, or the target application accesses the third application server based on the third target IPv6 address, and similarly may be recorded as one access, the terminal may count the total number of accesses of the target application to the corresponding application server based on the different target IPv6 addresses within a third preset duration, and within the third preset duration, and then calculate the multiple address abnormal access rate based on the total number of accesses and the total number of abnormal accesses to the corresponding application server based on the different target IPv6 addresses.
For example, the multi-address abnormal access rate may be determined by calculating a ratio of a total number of abnormal accesses when the corresponding application server is accessed based on different target IPv6 addresses in the third preset time period to a total number of accesses when the corresponding application server is accessed based on different target IPv6 addresses in the third preset time period. The calculation formula of the multi-address abnormal access rate is shown as formula (4):
Wherein V6AddrErr represents a multi-address exception access rate, V6ADDRERRCNT represents a total number of exception accesses to the corresponding application server based on different target IPv6 addresses within a third preset duration, and V6AddrCnt represents a total number of accesses to the corresponding application server based on different target IPv6 addresses within the third preset duration.
It should be understood that in the above embodiment, if the multiple address abnormal access rate is larger, the likelihood that the overall network quality of the IPv6 network used by the target application in the terminal is poor is indicated to be higher, whereas if the multiple address abnormal access rate is smaller, the likelihood that the overall network quality of the IPv6 network used by the target application in the terminal is poor is indicated to be lower.
And 2152, determining the multi-address connection anomaly rate according to the total number of IPv6 sockets created when the target application accesses the corresponding application server based on the plurality of target IPv6 addresses within the third preset time period and the total number of non-responded application servers in the IPv6 sockets.
In the embodiment of the present disclosure, when a target application in a terminal accesses a first application server based on a first target IPv6 address, in a connection establishment stage, it is required to create IPv6 sockets with the target address being the first application server, at this time, the number of IPv6 sockets created in the connection process and the number of IPv6 sockets not responded by the first application server may be recorded, on the basis of this, when the target application in the terminal accesses a second application server based on a second target IPv6 address under the condition that the network quality of accessing the first application server based on the first target IPv6 address is poor, in the connection establishment stage, it is required to create IPv6 sockets with the target address being the second application server, at this time, the number of IPv6 sockets created in the connection process and the number of IPv6 sockets not responded by the second application server may be recorded, and similarly, the terminal may count the total number of 6 sockets created when the target application accesses a corresponding application server based on different IPv6 addresses within a third preset time period and the total number of non-corresponding application server access non-sockets based on different IPv6 addresses. And then determining the multi-address connection anomaly rate based on the total number of IPv6 sockets created when the target application accesses the corresponding application server based on different IPv6 addresses within a third preset duration and the total number of IPv6 sockets which are not responded by the corresponding application server in the IPv6 sockets created when the target application accesses the corresponding application server based on different IPv6 addresses.
For example, the multi-address connection anomaly rate may be determined by calculating a ratio of a total number of IPv6 sockets not responded by the corresponding application server among IPv6 sockets created when the corresponding application server is accessed based on different IPv6 addresses within a third preset time period, and a total number of IPv6 sockets created when the corresponding application server is accessed based on different IPv6 addresses within the third preset time period. The calculation formula of the multi-address connection anomaly rate is shown as formula (5):
Wherein V6SockErr * represents a multi-address connection anomaly rate, V6SockErrNum * represents the total number of IPv6 sockets which are not responded by the corresponding application server in the IPv6 sockets created when the corresponding application server is accessed based on different IPv6 addresses within a third preset time period, and V6SockNum * represents the total number of IPv6 sockets created when the corresponding application server is accessed based on different IPv6 addresses within the third preset time period.
In the above embodiment, if the multi-address connection anomaly rate is larger, the possibility that the network quality of the IPv6 network used by the target application in the terminal is poor as a whole is indicated to be higher, and otherwise, if the multi-address connection anomaly rate is smaller, the possibility that the network quality of the IPv6 network used by the target application in the terminal is poor as a whole is indicated to be lower.
And 2153, determining a second network anomaly rate according to the multi-address anomaly access rate and the multi-address connection anomaly rate.
In this embodiment of the present disclosure, in the third preset duration, the target application may access more times for some domain names and less times for some domain names when accessing different domain names. In the extreme scenario, the access anomaly ratio of the domain name with the smaller access times is high, so that the multi-address anomaly access ratio is increased, but the number of IPv6 sockets which are not responded by the application server and counted by the domain name with the smaller access times is also small even if the access anomaly is caused, so that the multi-address connection anomaly ratio is low in the scenario. Therefore, the multi-address abnormal access rate and the multi-address connection abnormal rate are combined, for example, the average value of the multi-address abnormal access rate and the multi-address connection abnormal rate is calculated, and the second network abnormal rate is obtained, so that the network quality of the target application under the scene can be more reasonably evaluated. The calculation formula of the second network anomaly rate is shown as formula (6):
AppQualV6=AVG(V6AddrErr+V6SockErr*) (6)
Wherein AppQualV denotes a second network anomaly rate, V6AddrEr denotes a multi-address anomaly access rate, V6SockErr denotes a multi-address connection anomaly rate, AVG denotes a calculated average value.
It should be appreciated that the above calculation method can evaluate the network quality of the IPv6 network used by the target application more accurately in the above more extreme scenario, and thus can be more suitable in other scenarios.
Step 2154 is determining that the network quality of the IPv6 network of the target application is below the second set network quality level in response to the second network anomaly rate being above the second set threshold.
In the embodiment of the present disclosure, if it is determined from the overall access point and the connection establishment point that the network anomaly rate of the target application when using the IPv6 network is high, it is more accurately determined that the network quality of the IPv6 network used by the target application in the terminal is poor.
For example, in the third preset duration, the target application accesses three domains, namely, domain name 1, domain name 2 and domain name 3, where domain name 1 is accessed 30 times (28 times of success and 2 times of abnormality), the total IPv6 socket sent during accessing domain name 1 is 90, the number of unresponsive sockets is 6, domain name 2 and domain name 3 are accessed 5 times respectively, and both access abnormality, the total IPv6 socket sent during accessing domain name 2 and domain name 3 is 30, the total number of unresponsive sockets is 10, the multi-address abnormality access rate is 0.3, and the multi-address connection abnormality rate is 0.13. If the multi-address abnormal access rate and the multi-address connection abnormal rate are averaged, the second network abnormal rate is 0.215. If the second set threshold is 0.25, if the multi-address anomaly rate is only compared with the second set threshold, the multi-address anomaly rate is 0.3, and is greater than the second set threshold, at this time, the target application may be judged that the overall network quality of the used IPv6 network is poor, and then the IPv4 network may be preferentially used subsequently, but in reality, the target application accesses the domain name 1 with the largest number of accesses based on the IPv6 network, and has a higher access success rate, that is, when accessing the domain name 1 based on the IPv6 network, the network quality is better, and the multi-address anomaly rate is greater than the second set threshold, mainly because the access failure rate of the domain name 2 with the smaller number of accesses is higher than that of the domain name 3 based on the IPv6 network, and when accessing the domain name 2 with the domain name 3 is higher in success rate, and the number of accesses the domain name 1 is far greater than that of accessing the domain name 2 and the domain name 3, it is obviously unreasonable to prohibit the use of the IPv6 network subsequently. Therefore, after the multi-address anomaly rate is combined with the multi-address connection anomaly rate, the obtained second network anomaly is only 0.215 and is smaller than the second set threshold value, which means that when any domain name is accessed later, the network is still preferentially based on the IPv6 network, and the domain name 1 with the highest historical access frequency is included.
Step 216, the terminal detects a third operation for the target application, and the third operation indicates the target application to access the second domain name.
In the embodiment of the present disclosure, when the terminal determines that the overall quality of the IPv6 network used by the target application is poor, the terminal often cannot obtain the response from the corresponding application server or has long waiting time for obtaining the response from the corresponding application server when accessing any domain name in history, and if the user performs the third operation on the target application to access the second domain name, then the adjustment of the IP address policy used by the target application is required. It should be understood that the second domain name herein may be a domain name that has not been visited in history, or may be a domain name that has been visited in history, which is not particularly limited herein.
In step 217, in response to the third operation, the terminal sends a third domain name resolution request to the domain name system server, where the third domain name resolution request is used to request a plurality of third IPv4 addresses corresponding to the second domain name.
In the embodiment of the present disclosure, after detecting a third operation for characterizing access to the second domain name, the target application in the terminal sends a third domain name resolution request to the DNS server by using the DNS protocol stack in the target application framework layer, where the third domain name resolution request is only used to request a plurality of third IPv4 addresses corresponding to the second domain name, because the network quality of the IPv6 network used by the target application is poor as a whole.
In step 218, the dns server resolves the second domain name in response to the third domain name resolution request to obtain a plurality of third IPv4 addresses.
In this specification, the process of resolving the third domain name by the DNS server may refer to the description of the DNS server resolving the first domain name in step 203, which is not repeated herein.
Step 219, the DNS server sends a domain name resolution response to the terminal, wherein the domain name resolution response carries a plurality of third IPv4 addresses corresponding to the third domain name.
In the embodiment of the present disclosure, after obtaining the domain name resolution result of the second domain name, the DNS server obtains a plurality of third IPv4 addresses corresponding to the third domain name, so that, on one hand, the domain name resolution result corresponding to the second domain name may be saved, and on the other hand, the domain name resolution result corresponding to the second domain name is sent to the terminal, so that a target application in the terminal accesses a corresponding application server according to the domain name resolution result.
Step 220, the terminal sends a fourth connection request to the fourth application server, wherein the fourth connection request comprises a first target IPv4 address in the plurality of third IPv4 addresses.
In this embodiment of the present disclosure, after obtaining the plurality of third IPv4 addresses corresponding to the second domain name, the terminal may select the first target IPv4 address from the plurality of third IPv4 addresses, for example, the plurality of third IPv4 addresses are presented in the form of an IPv4 address list, and then the first IPv4 address in the IPv4 address list may be used as the first target IPv4 address, or one IPv4 address may be randomly selected from the IPv4 address list as the first target IPv4 address, where how to determine the first target IPv4 address from the plurality of third IPv4 addresses is not particularly limited. After the terminal selects the first target IPv4 address, the target application can initiate a connection request to the corresponding fourth application server based on the first target IPv4 address, so that the situation of repeated access abnormality caused by repeatedly using the IPv6 address to access the application server is avoided under the condition that the network of the IPv6 network of the target application is poor, the success rate of the terminal accessing the application server and the efficiency of accessing the application server are improved, and the Internet surfing experience of a user is improved. It should be understood that if the second domain name is the same as the first domain name, the fourth application server may be the same server as the first application server, or may be different from the first application server, and is not particularly limited herein.
In some embodiments, after detecting the third operation of accessing the second domain name, the terminal may still request the IPv4 address and the IPv6 address corresponding to the second domain name to the DNS server at the same time, and then, in the connection initiation stage, preferably select the IPv4 address corresponding to the second domain name to initiate connection to the application server, so as to avoid the situation of repeated access abnormality caused by repeatedly using the IPv6 address to access the application server in the case of poor network of the IPv6 network of the target application, thereby ensuring that the terminal has a higher success rate and a higher access efficiency when accessing the application server, and being beneficial to improving the internet surfing experience of the user.
Fig. 18 is a schematic flow chart of a method for accessing an application server based on an IPv4 address according to an embodiment of the present application. After performing step 216, steps 221 to 224 may also be continued to be performed:
Step 221, responding to the third operation, sending a fourth domain name resolution request to the DNS server, wherein the fourth domain name resolution request is used for requesting a plurality of fourth IPv4 addresses and a plurality of fourth IPv6 addresses corresponding to the second domain name.
In the embodiment of the present disclosure, after detecting the third operation of accessing the second domain name, the target application in the terminal sends a fourth domain name resolution request to the DNS server by using the DNS protocol stack in the target application framework layer, where the fourth domain name resolution request is still used to request a plurality of fourth IPv4 addresses and a plurality of fourth IPv6 addresses corresponding to the second domain name, although the network quality of the IPv6 network used by the target application is poor as a whole.
In step 222, the dns server resolves the second domain name in response to the fourth domain name resolution request to obtain a plurality of fourth IPv4 addresses and a plurality of fourth IPv6 addresses.
In this specification, the process of resolving the third domain name by the DNS server may refer to the description of the DNS server resolving the first domain name in step 203, which is not repeated herein.
Step 223, the dns server sends a domain name resolution response to the terminal, where the domain name resolution response carries a plurality of fourth IPv4 addresses and a plurality of fourth IPv6 addresses.
In the embodiment of the present disclosure, after obtaining the domain name resolution result of the second domain name, the DNS server may save the domain name resolution result corresponding to the second domain name after obtaining a plurality of third IPv4 addresses corresponding to the second domain name, and send the domain name resolution result corresponding to the second domain name to the terminal, so that a target application in the terminal accesses a corresponding application server according to the domain name resolution result.
Step 224, the terminal sends a fifth connection request to the fifth application server, the fifth connection request including a second target IPv4 address of the fourth IPv4 addresses.
In this embodiment of the present disclosure, after obtaining the plurality of fourth IPv4 addresses and the plurality of fourth IPv6 addresses corresponding to the second domain name, the terminal selects the second target IPv4 address from the plurality of fourth IPv4 addresses by using the rule of preferentially using the IPv4 addresses, for example, the plurality of fourth IPv4 addresses are presented in the form of an IPv4 address list, and then the first IPv4 address in the IPv4 address list may be used as the second target IPv4 address, or one IPv4 address may be randomly selected from the IPv4 address list as the second target IPv4 address, where how to determine the second target IPv4 address from the plurality of fourth IPv4 addresses is not particularly limited. After the terminal selects the second target IPv4 address, the target application can initiate a connection request to the corresponding fifth application server based on the second target IPv4 address, so that the situation of repeated access abnormality caused by repeatedly using the IPv6 address to access the application server is avoided under the condition that the network of the IPv6 network of the target application is poor, the success rate of the terminal accessing the application server and the efficiency of accessing the application server are improved, and the Internet surfing experience of a user is improved. It should be understood that if the second domain name is the same as the first domain name, the fifth application server may be the same as the first application server, or may be different from the first application server, and is not particularly limited herein. Meanwhile, the fifth application server and the fourth application server may be the same application server or may be different application servers.
In some embodiments, in the case that it is determined that the IPv6 network used by the target application in the terminal is poor in overall network quality, the use of the IPv6 network by the target application may be further limited.
Referring to fig. 19 and fig. 20, a flowchart of a method for accessing an application server based on an IPv4 address according to an embodiment of the present disclosure is provided. After performing step 215, step 225 may also continue to be performed:
step 225, the target application is set to disable all IPv6 addresses.
In the embodiment of the present disclosure, if the terminal determines that the network quality is poor when the target application accesses the corresponding application server based on the multiple target IPv6 addresses, the terminal may set the target application to disable all IPv6 addresses, so as to avoid repeated access anomalies caused by repeatedly using the IPv6 addresses to access the corresponding application servers when the target application accesses any domain name again.
For example, the terminal is provided with an application blacklist for disabling all IPv6 addresses, and when the target application is added into the application blacklist, the effect that the target application disables all IPv6 addresses can be achieved
Further, in the above embodiment, only the network quality of the IPv6 network used by the target application is evaluated, and in the case where the network quality of the IPv6 network used by the target application is poor, the network quality of the IPv4 network used by the target application is not necessarily good. Therefore, when the target application is set to disable all IPv6 addresses, it is necessary to determine whether all IPv6 addresses of the target application can be disabled in combination with the network quality of the IPv4 network used by the target application.
Referring to fig. 21, a flow chart of a method for restricting usage of an IPv6 address by a target application according to an embodiment of the present disclosure is provided. Step 225 may be implemented in particular by sub-steps 2251 to 2252:
step 2251 is to determine that the network quality of the IPv4 network used by the target application is higher than the third set network quality level.
In the embodiment of the present disclosure, the target application may have only a portion of domain names having multiple IPv4 addresses and multiple IPv6 addresses simultaneously, where the portion of domain names are suitable for the principle of preferentially using IPv6 addresses when accessed, and the remaining portion of domain names may have only multiple IPv4 addresses, where the portion of domain names are not suitable for the principle of preferentially using IPv6 addresses when accessed, but are only capable of using IPv4 addresses. Therefore, the terminal can evaluate the network quality of the IPv4 network used by the target application within the third preset time period.
Referring to fig. 22, a flowchart of a method for evaluating network quality of a target application using an IPv4 network according to an embodiment of the present disclosure is provided. Step 2251 may be implemented by performing sub-steps 22511 to 22513:
Step 22511, determining the multi-address data packet anomaly rate according to the total number of data packets sent by the received application server and the total number of anomaly data packets in the data packets when the target application accesses the corresponding application server based on the plurality of target IPv4 addresses within the third preset time period.
In the embodiment of the present disclosure, in the process that the target application in the terminal accesses the corresponding application server based on different target IPv4 addresses, there is data transmission, and the carrier of the data transmission is a data packet. Therefore, the terminal can count the total number of data packets sent by the application server corresponding to the target IPv4 address received in the third preset duration and the total number of abnormal data packets sent by the application server corresponding to the target IPv4 address received in the third preset duration, so that the abnormal multi-address data transmission rate in the data transmission process after the target application establishes connection with the corresponding application server based on different target IPv4 addresses can be determined.
For example, the multi-address data transmission anomaly rate may be determined by calculating a ratio of a total number of the received abnormal data packets sent by the application server when the target application accesses the corresponding application server based on the different target IPv4 addresses within the third preset duration and a total number of the data packets sent by the application server when the target application accesses the corresponding application server based on the different target IPv4 addresses within the third preset duration. The calculation formula of the multi-address data transmission abnormal rate is shown as formula (7):
Wherein V4SkbErr * represents a multi-address data transmission anomaly rate, V4SkbNum * represents a total number of data packets sent by the received application server when the target application in the terminal accesses the corresponding application server based on different target IPv4 addresses within a third preset duration, and V4SkbErrNum * represents a total number of anomaly data packets sent by the received application server when the target application in the terminal accesses the corresponding application server based on different target IPv4 addresses within the third preset duration.
And 22512, obtaining a third network abnormal rate in the unit time according to the third preset time and the multi-address data transmission abnormal rate.
In the embodiment of the present disclosure, after counting the abnormal rate of multi-address data transmission of the target application when accessing the corresponding application server using different target IPv4 addresses within a third preset duration, determining a third network abnormal rate within a unit duration according to the third preset duration and the abnormal rate of multi-address data transmission.
For example, a ratio of the multi-address data transmission anomaly rate to a third predetermined duration may be calculated to determine a third network anomaly rate. The calculation formula of the third network anomaly rate is shown in formula (8):
AppQualV4=V6SkbErr*/T2 (8)
Wherein AppQualV denotes a third network anomaly rate, V6SkbErr * denotes a multi-address data transmission anomaly rate, and T2 denotes a third preset time period.
Step 22513 is to determine that the network quality of the IPv4 network of the target application is higher than the third set network quality level if the third network anomaly rate is less than the third set threshold.
In the embodiment of the present disclosure, from the perspective of data transmission, if it is determined that the network anomaly rate of the target application when using the IPv4 network is high, it is more accurately determined that the network quality of the IPv4 network used by the target application in the terminal is poor. Otherwise, if it is determined that the network anomaly rate of the target application is lower when the IPv4 network is used, it is accurately determined that the network quality of the IPv4 network used by the target application in the terminal is higher. It should be understood that, since the deployment of the application server corresponding to the IPv4 address is mature, the possibility of failure in the connection establishment stage between the terminal and the application server corresponding to the IPv4 address may be considered to be low, and thus, when evaluating the network quality of the IPv4 network used by the target application, the data transmission process between the terminal and the application server corresponding to the IPv4 address is mainly based on.
Step 2252 sets the target application to disable all IPv6 addresses.
In the embodiment of the present disclosure, under the condition that it is determined that the network quality of the IPv4 network used by the target application is better, the target application is set to disable all IPv6 addresses, so as to ensure that the subsequent target application has a higher success rate and higher access efficiency when accessing the corresponding application server based on the IPv4 network.
The specific procedure of how the terminal performs domain name resolution in step 217 and initiates a connection request in step 224 after the target application is set to disable all IPv6 addresses, respectively, is described in detail below
Fig. 23 is a schematic flow chart of a method for sending a domain name resolution request according to an embodiment of the present application. Step 217 may be implemented in particular by performing sub-steps 2171 to 2172:
step 2171 is to determine whether all IPv6 addresses of the target application are in a disabled state in response to the third operation.
If yes, a third domain name resolution request is sent to the domain name system server.
In the embodiment of the present disclosure, when the terminal determines that the IPv6 network of the target application is poor in overall network quality and the IPv4 network of the target application is good in overall network quality, if it is detected that the target application needs to access the second domain name, the terminal may first determine whether all IPv6 addresses of the target application are disabled, if yes, change a policy of preferentially using the IPv6 network, and convert to an IPv4 network with better network quality, that is, when domain name resolution is performed on the domain name system server, only an IPv4 address corresponding to the second domain name is requested, so that resource waste caused by requesting an IPv6 address corresponding to the second domain name is avoided when it is ensured that subsequent target applications have a higher success rate and a higher access efficiency when accessing the corresponding application server based on the IPv4 network.
Referring to fig. 24, a flowchart of a method for connecting a fifth application server based on a second target IPv4 address according to an embodiment of the present application is shown. Step 224 may be implemented by performing sub-steps 2241 to 2243 in particular:
step 2241 is to determine whether all IPv6 addresses of the target application are in a disabled state.
Step 2242, if yes, determining the second target IPv4 address from the fourth IPv4 addresses.
Step 2243, a fifth connection request is sent to the fifth application server based on the second target IPv4 address.
In the embodiment of the present disclosure, when the terminal obtains multiple fourth IPv4 addresses and multiple fourth IPv6 addresses corresponding to the second domain name at the same time, the terminal may determine whether all IPv6 addresses of the target application are in a disabled state, if yes, change a policy of preferentially using the IPv6 network, and convert to preferentially using the IPv4 network with better network quality to access the corresponding application server, and at this time, determine the second target IPv4 address from the multiple fourth IPv4 addresses to access the corresponding fifth application server, so as to avoid repeated access anomalies caused by repeatedly accessing the application server based on the IPv6 network, thereby ensuring that the terminal has a higher success rate and a higher access efficiency when accessing the application server, and being beneficial to improving the internet surfing experience of the user.
In some embodiments, when the target application in the terminal accesses the corresponding application server based on the IPv6 network, the overall network quality is poor, possibly due to the fluctuation of the network where the used IPv6 address is located, so that the target application can not be restricted to use the IPv6 address any more as long as the network is restored to be normal.
Referring to fig. 25 and 26, a flowchart of a method for accessing an application server based on an IPv4 address is provided in an embodiment of the present disclosure. After step 225, step 226 may also continue to be performed:
and step 226, in response to the second preset condition being met, the disabled state of the target application on all IPv6 addresses is released.
In the embodiment of the present disclosure, when the first and target applications access the corresponding application servers using the plurality of target IPv6 addresses, the network fluctuation of the network where the plurality of target IPv6 addresses are located may be considered to be short-term, so that the second preset condition may be that the disabling duration of the target application for disabling all IPv6 addresses reaches a fourth preset duration, after the fourth preset duration, the network short-term fluctuation of the network where the plurality of target IPv6 addresses are located may be considered to be eliminated, and at this time, the disabling state of the target application for all IPv6 addresses may be released. For example, after the target application disables all IPv6 addresses for 48 hours, the disabled state of the target application for all IPv6 addresses is released. It should be appreciated that the third preset time period may be set according to an average time period of the network fluctuation in practical applications, and is not particularly limited herein.
When the target application accesses the corresponding application server by using the plurality of target IPv6 addresses, network fluctuation of the network where the plurality of target IPv6 addresses are located may be caused by using a specific operator network, so that the second preset condition may be that an operator switching event is detected, and after the operator switching event is detected, the network fluctuation of the network where the plurality of target IPv6 addresses are located is considered to be eliminated, and at this time, the forbidden state of the target application to all IPv6 addresses may be released. For example, when the terminal detects that the operator of the user identification card (Subscriber Identity Module, SIM) used is china telecommunication when accessing the corresponding application server using the plurality of target IPv6 addresses, it is considered that the network fluctuation of the network where the plurality of target IPv6 addresses are located is caused by using the china telecommunication network. After the target application is set to disable all target IPv6 addresses, if the terminal detects that the operator of the used SIM card is switched from China telecom to China Mobile, the network fluctuation of the network where the plurality of target IPv6 addresses are located can be considered to be eliminated, and the disabling state of the target application on all IPv6 addresses can be relieved at the moment.
Third, when the target application accesses the corresponding application server by using the plurality of target IPv6 addresses, network fluctuation of the network where the plurality of target IPv6 addresses are located is caused by using a specific type of network, so that the second preset condition may be that a network switching event is detected, and after the network switching event is detected, it may be considered that the network fluctuation of the network where the plurality of target IPv6 addresses are located has been eliminated, and at this time, the disabled state of the target application on all IPv6 addresses may be released. For example, when the terminal detects that the type of network used is a cellular network when accessing the corresponding application server using the plurality of target IPv6 addresses, it is considered that the network fluctuation of the network where the plurality of target IPv6 addresses are located is caused by using the cellular network. After the target application is set to disable all IPv6 addresses, if the terminal detects that the used network type is switched from the cellular network to the wireless fidelity (WIRELESS FIDELITY, WIFI) network, it can be considered that the network fluctuation of the network where the plurality of target IPv6 addresses are located is eliminated, and at this time, the disabled state of the target application on the plurality of target IPv6 addresses can be released.
It should be understood that the above-mentioned disabling of all IPv6 addresses by the target application may be to shift the target application out of the application blacklist for disabling all IPv6 addresses, and there are other possible implementations, which are not limited in particular herein.
Of course, the second preset condition for releasing the disabled state of the target application to all IPv6 addresses includes, but is not limited to, the above three conditions, and the present application is not particularly limited.
The following describes the whole process of accessing the corresponding server by the target application under single address and multiple addresses
Referring to fig. 27, a flowchart of a whole process of accessing a corresponding application server by a target application based on a single address is provided in an embodiment of the present disclosure.
Link 1, first access to the first domain name.
When the terminal detects that the target application needs to access the first domain name, the terminal can request a plurality of first IPv4 addresses and a plurality of first IPv6 addresses corresponding to the first domain name from the DNS server. After receiving the plurality of first IPv4 addresses and the plurality of first IPv6 addresses, the terminal selects a first target IPv6 address from the plurality of first IPv6 addresses based on the principle of preferentially using the IPv6 addresses, and then the target application accesses the corresponding first application server based on the first target IPv6 address. When the target application accesses the first application server based on the first target IPv6 address, on one hand, the terminal counts the number of IPv6 sockets (V6 SockNum) of which the target address is the first application server and the number of IPv6 sockets which are not responded by the first application server (V6 SockErrNum) in the established connection stage between the terminal and the first application server, and then obtains the single-address connection anomaly rate (V6 SockErr) by calculating the ratio of V6SockErrNum to V6SockNum, and on the other hand, the terminal counts the number of data packets (V6 SkbNum) sent by the first application server and the number of anomaly data packets (V6 SkbErrNum) sent by the first application server and received by the terminal in the data transmission stage between the terminal and the first application server after connection is established, and then obtains the single-address data transmission anomaly rate (V6 SkbErr) by calculating the ratio of V6SkbErrNum to V6 SkbNum. Finally, the terminal determines a first network anomaly rate (QualV) within the unit duration according to the single address connection anomaly rate (V6 SockErr), the single address data transmission anomaly rate (V6 SkbErr) and the statistical time period (i.e., the first preset duration). If QualV is higher than the first set threshold, the network quality when the terminal accesses the first application service based on the first target IPv6 address is considered to be poor, so that the target application is set to disable the first target IPv6 address.
And step 2, revisiting the first domain name.
If the terminal detects that the target application needs to access the first domain name again, two possible embodiments exist at this time:
The first terminal requests a plurality of second IPv4 addresses and a plurality of second IPv6 addresses corresponding to the first domain name from the DNS server. After receiving the plurality of second IPv4 addresses and the plurality of second IPv6 addresses, the terminal first determines whether the plurality of second IPv6 addresses include a first target IPv6 address disabled by the target application, based on a principle of preferentially using the IPv6 addresses. And if the address is included, filtering the first target IPv6 address from a plurality of second IPv6 addresses, selecting the second target IPv6 address from the rest of the second IPv6 addresses, and accessing the corresponding second application server by the target application based on the second target IPv6 address. If the second IPv6 address is not included, the second target IPv6 address is directly selected from the plurality of second IPv6 addresses, and then the target application accesses the corresponding second application server based on the second target IPv6 address.
And the second terminal filters the first target IPv6 address from the plurality of first IPv6 addresses, selects a third target IPv6 address from the rest of first IPv6 addresses, and then the target application accesses a corresponding third application server based on the third target IPv6 address.
On the basis, after detecting that the first preset condition is reached, the terminal releases the forbidden state of the target application to the first target IPv6 address.
In a second scenario, please refer to fig. 28, which is a schematic flow chart of a whole process of accessing a corresponding application server by a target application based on multiple addresses according to an embodiment of the present disclosure.
And step 1, judging whether all IPv6 addresses of the target application need to be forbidden or not based on the multi-address access condition.
The target application in the terminal may access multiple domain names, for example, the first domain name, the second domain name, and the third domain name, in the third preset duration, where the number of domain names accessed by the target application in the third preset duration is not particularly limited. In accessing each domain name in the plurality of domain names, the specific process may refer to scenario one, which is not described herein. In accessing multiple domain names, the target application accesses a corresponding application server based on multiple target IPv6 addresses. On one hand, the terminal may count the total number of accesses (V6 AddrCnt) of the target application to the corresponding application server based on the plurality of target IPv6 addresses, and the total number of abnormal accesses (V6 ADDRERRCNT) of the corresponding application server based on the plurality of IPv6 addresses, and then calculate the ratio of V6ADDRERRCNT to V6AddrCnt to obtain a multi-address abnormal access rate (V6 AddrErr), on the other hand, the terminal may count the total number of IPv6 sockets created when the target application accesses the corresponding application server based on the plurality of target IPv6 addresses (V6 SockNum *), and the total number of non-responded IPv6 sockets created (V6 SockErrNum *), and then calculate the ratio of V6SockErrNum * to V6SockNum *, so as to obtain the multi-address connection abnormal rate (V6 SockErr *). After obtaining V6AddrErr and V6SockErr *, the terminal calculates the average value of V6AddrErr and V6SockErr * to obtain a second network anomaly rate (AppQualV 6). Meanwhile, the terminal can also count the total number (V4 SkbNum *) of data packets sent by the received application server and the total number (V4 SkbErrNum *) of abnormal data packets in the data packets sent by the received application server when the target application accesses the corresponding application server based on a plurality of target IPv4 addresses within a third preset time period (T2), then calculate the ratio of V4SkbErrNum * to V4SkbNum * to obtain a multi-address transmission abnormal rate (V4 SkbErr), and finally calculate the ratio of V4SkbErr to T2 to obtain a third network abnormal rate (AppQualV 4) within a unit time period. that is, appQualV is for evaluating an IPv6 network used by the target application, appQualV is for evaluating an IPv4 network used by the target application. If AppQualV is higher than the second set threshold and AppQualV is lower than the third set threshold, it indicates that the network quality of the IPv6 network used by the target application is poor, and the network quality of the IPv4 network used by the target application is good, and the target application is set to disable all IPv6 addresses.
And 2, accessing the corresponding application server by the target application based on the IPv4 address.
After the terminal sets the target application to disable all IPv6 addresses, if it detects that the target application accesses any domain name, for example, the target application accesses a second domain name, two possible embodiments exist at this time:
And the first terminal judges whether the target application is set to disable all IPv6 addresses, and if so, requests a plurality of third IPv4 addresses corresponding to the second domain name from the DNS server. After receiving the plurality of third IPv4 addresses, the terminal selects a first target IPv4 address from the plurality of third IPv4 addresses, and then the target application can access the corresponding fourth application server based on the first target IPv4 address.
And the second terminal requests the DNS server for a plurality of fourth IPv4 addresses and a plurality of fourth IPv6 addresses corresponding to the second domain name. After receiving the fourth IPv4 addresses and the fourth IPv6 addresses, the terminal judges whether the target application is set to disable all IPv6 addresses to preferentially select a second target IPv4 address from the fourth IPv4 addresses, and then the target application accesses a corresponding fifth application server based on the second target IPv4 address.
Referring to fig. 29, based on the same inventive concept, the embodiment of the present disclosure further provides an access device for an application server, where the device includes a detection unit 501, a sending unit 502, and a processing unit 503.
A detecting unit 501 configured to detect a first operation for a target application, where the first operation indicates that the target application accesses a first domain name;
A sending unit 502, configured to send, in response to a first operation, a first domain name resolution request to a domain name system server, where the first domain name resolution request is used to request a plurality of first IPv4 addresses and a plurality of first IPv6 addresses corresponding to a first domain name;
A processing unit 503, configured to receive the plurality of first IPv4 addresses and the plurality of first IPv6 addresses sent by the domain name system server, and send a first connection request to the first application server, where the first connection request includes a first target IPv6 address of the plurality of first IPv6 addresses;
The processing unit 503 is further configured to, in response to determining that the network quality when accessing the first application server based on the first target IPv6 address is lower than the first set network quality level, and detecting a second operation for the target application, the second operation indicating that the target application accesses the first domain name again;
The sending unit 502 is further configured to send, in response to a second operation, a second domain name resolution request to the domain name system server, where the second domain name resolution request is used to request a plurality of second Pv4 addresses and a plurality of second IPv6 addresses corresponding to the first domain name;
The processing unit 503 is further configured to receive a second IPv4 address and a plurality of second IPv6 addresses sent by the domain name system server, and send a second connection request to the second application server, where the second connection request includes a second target IPv6 address of the plurality of second IPv6 addresses, and the second target IPv6 address is different from the first target IPv6 address.
Optionally, the processing unit 503 comprises a first network quality assessment unit;
The first network quality assessment unit is specifically configured to:
Determining the single address connection abnormality rate according to the number of IPv6 sockets with the target address created in the first preset duration as the first application server and the number of the IPv6 sockets which are not responded by the first application server;
Determining the single-address data transmission abnormal rate according to the number of data packets sent by the first application server and received in the first preset time period and the number of abnormal data packets in the data packets;
Obtaining a first network anomaly rate in unit time according to the single address connection anomaly rate, the single address data transmission anomaly rate and the first preset time;
In response to the first network anomaly rate being above the first set threshold, determining that network quality at the time of accessing the first application server based on the first target IPv6 address is below the first set network quality level.
Optionally, the processing unit 503 is further configured to set the target application to disable the first target IPv6 address.
Optionally, the processing unit 503 includes a filtering unit, a determining unit, and a first connection request sending unit;
The filtering unit is used for responding to the first target IPv6 address forbidden by the target application in the plurality of second IPv6 addresses and filtering the first target IPv6 address forbidden by the target application from the plurality of second IPv6 addresses;
a determining unit, configured to determine a second target IPv6 address from the remaining second IPv6 addresses;
And the first connection request sending unit is used for sending a second connection request to the second application server based on the second target IPv6 address.
Optionally, the sending unit 502 is further configured to send, in response to the second operation, a third connection request to a third application server, where the third connection request includes a third target IPv6 address of the plurality of first Pv6 addresses, and the third target IPv6 address is different from the first target IPv6 address.
Optionally, the processing unit 503 is further configured to, in response to meeting a first preset condition, release the disabling state of the target application to the first target IPv6 address, where the first preset condition is that a disabling duration including disabling, by the target application, the first target IPv6 address reaches a second preset duration, or detects an operator handover event, or detects a network handover event.
Optionally, the processing unit 503 is further configured to, in response to determining that the network quality of the IPv6 network of the target application is lower than the second set network quality level, and detect a third operation for the target application, the third operation indicating that the target application accesses the second domain name;
the sending unit 502 is further configured to send, in response to a third operation, a third domain name resolution request to the domain name system server, where the third domain name resolution request is used to request a plurality of third IPv4 addresses corresponding to the second domain name;
and the sending unit is further used for sending a fourth connection request to the fourth application server, wherein the fourth connection request comprises a first target IPv4 address in the plurality of third IPv4 addresses.
Optionally, the processing unit 503 comprises a second network quality assessment unit;
the second network quality evaluation unit is specifically configured to:
Determining multi-address abnormal access rate according to the total number of accesses of the target application to the corresponding application server based on the multiple target IPv6 addresses and the total number of abnormal accesses of the target application to the corresponding application server based on the multiple target IPv6 addresses within a third preset duration;
Determining the multi-address connection anomaly rate according to the total number of IPv6 sockets created when the target application accesses the corresponding application server based on a plurality of target IPv6 addresses within a third preset duration and the total number of responses of the corresponding application server which are not responded in the IPv6 sockets;
Determining a second network anomaly rate according to the multi-address anomaly access rate and the multi-address connection anomaly rate;
And determining that the network quality of the IPv6 network of the target application is lower than the second set network quality level in response to the second network anomaly rate being higher than the second set threshold.
Optionally, the processing unit 503 is further configured to set the target application to disable all IPv6 addresses.
Optionally, the processing unit 503 includes a third network quality assessment unit and a disabling unit;
a third network quality evaluation unit, configured to determine that the network quality of the IPv4 network of the target application is higher than a third set network quality level;
and the disabling unit is used for setting the target application to disable all IPv6 addresses.
Optionally, the sending unit 502 is further configured to send, in response to the third operation, a fourth domain name resolution request to the domain name system server, where the fourth domain name resolution request is used to request a plurality of fourth IPv4 addresses and a plurality of fourth IPv6 addresses corresponding to the second domain name;
The processing unit is further configured to receive the plurality of fourth IPv4 addresses and the plurality of fourth IPv6 addresses sent by the domain name system server, and send a fifth connection request to the fifth application server, where the fifth connection request includes a second target IPv4 address in the plurality of fourth IPv4 addresses.
Optionally, the processing unit 503 includes a second connection request sending unit;
the second connection request sending unit is specifically configured to:
determining whether all IPv6 addresses of the target application are in a disabled state;
If yes, determining a second target IPv4 address from the fourth IPv4 addresses;
and sending a fifth connection request to a fifth application server based on the second target IPv4 address.
Optionally, the third network quality assessment unit is specifically configured to:
determining the multi-address data packet anomaly rate according to the number of data packets sent by the received application server and the number of anomaly data packets in the data packets when the target application is based on the application servers corresponding to the plurality of target IPv4 addresses within a third preset duration;
obtaining a third network anomaly rate in unit duration according to a third preset duration and the anomaly rate of the multi-address data packet;
And if the third network anomaly rate is smaller than the third set threshold value, determining that the network quality of the IPv4 network of the target application is higher than the third set network quality level.
Optionally, the processing unit 503 is further configured to, in response to meeting a second preset condition, release the disabling state of the target application for all IPv6 addresses, where the second preset condition is that the disabling duration including disabling all IPv6 addresses by the target application reaches a fourth preset duration, or detects an operator handover event, or detects a network handover event.
Referring to fig. 30, the embodiment of the present disclosure further provides a chip module, where the chip module includes at least one processor 601, and the processor 601 is configured to execute a computer program stored in a memory, to implement the steps of the flow chart of the access method of the application server shown in fig. 4, fig. 6 to fig. 28 provided in the embodiment of the present disclosure.
Alternatively, the processor 601 may be a central processing unit, a specific ASIC, or one or more integrated circuits for controlling the execution of programs.
Optionally, the chip module may further comprise a memory 602 connected to the at least one processor 601, and the memory 602 may comprise ROM, RAM and disk memory. The memory 602 is used for storing data required for the operation of the processor 601, i.e. instructions executable by at least one processor 601, the at least one processor 601 performing the method as shown in fig. 1-7 by executing the instructions stored by the memory 602. Wherein the number of memories 602 is one or more. Wherein the number of memories 602 is one or more.
The present embodiments also provide a computer storage medium, where the computer storage medium stores computer instructions that, when executed on a computer, cause the computer to perform the method described in fig. 4, 6-28.
The present description provides a computer program product comprising computer instructions which, when executed on a computer, cause the computer to perform the method as described in fig. 4, 6-28.
The above embodiments may be implemented in whole or in part by software, hardware, firmware, or any other combination. When implemented in software, the above-described embodiments may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded or executed on a computer, produces a flow or function in accordance with embodiments of the present description, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another, for example, by wired (e.g., coaxial cable, optical fiber, digital Subscriber Line (DSL)), or wireless (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains one or more sets of available media. The usable medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium. The semiconductor medium may be a Solid State Disk (SSD) STATE DRIVE.
The foregoing description of the preferred embodiments is provided for the purpose of illustration only, and is not intended to limit the scope of the disclosure, since any modifications, equivalents, improvements, etc. that fall within the spirit and principles of the disclosure are intended to be included within the scope of the disclosure.

Claims (19)

1.一种应用服务器的访问方法,其特征在于,所述方法包括:1. A method for accessing an application server, characterized in that the method comprises: 检测到针对目标应用的第一操作,第一操作指示所述目标应用访问第一域名;A first operation on a target application is detected, where the first operation instructs the target application to access a first domain name; 响应于所述第一操作,向域名系统服务器发送第一域名解析请求,所述第一域名解析请求用于请求所述第一域名对应的多个第一IPv4地址以及多个第一IPv6地址;In response to the first operation, sending a first domain name resolution request to a domain name system server, where the first domain name resolution request is used to request a plurality of first IPv4 addresses and a plurality of first IPv6 addresses corresponding to the first domain name; 接收所述域名系统服务器所发送的所述多个第一IPv4地址以及所述多个第一IPv6地址,并向第一应用服务器发送第一连接请求,所述第一连接请求包括所述多个第一Ipv6地址中的第一目标IPv6地址;Receiving the multiple first IPv4 addresses and the multiple first IPv6 addresses sent by the domain name system server, and sending a first connection request to a first application server, wherein the first connection request includes a first target IPv6 address among the multiple first IPv6 addresses; 响应于确定基于所述第一目标IPv6地址访问所述第一应用服务器时的网络质量低于第一设定网络质量等级,且检测到针对所述目标应用的第二操作,所述第二操作指示所述目标应用再次访问所述第一域名;In response to determining that the network quality when accessing the first application server based on the first target IPv6 address is lower than a first set network quality level, and detecting a second operation for the target application, the second operation instructs the target application to access the first domain name again; 响应于所述第二操作,向所述域名系统服务器发送第二域名解析请求,所述第二域名解析请求用于请求所述第一域名对应的多个第二Pv4地址以及多个第二IPv6地址;In response to the second operation, sending a second domain name resolution request to the domain name system server, where the second domain name resolution request is used to request multiple second Pv4 addresses and multiple second IPv6 addresses corresponding to the first domain name; 接收所述域名系统服务器发送的所述多个第二IPv4地址以及所述多个第二IPv6地址,并向第二应用服务器发送第二连接请求,所述第二连接请求包括所述多个第二IPv6地址中的第二目标IPv6地址,所述第二目标IPv6地址与所述第一目标IPv6地址不相同。Receive the multiple second IPv4 addresses and the multiple second IPv6 addresses sent by the domain name system server, and send a second connection request to the second application server, the second connection request includes a second target IPv6 address among the multiple second IPv6 addresses, and the second target IPv6 address is different from the first target IPv6 address. 2.根据权利要求1所述的方法,其特征在于,确定基于所述第一目标IPv6地址访问所述第一应用服务器时的网络质量低于第一设定网络质量等级,包括:2. The method according to claim 1, characterized in that determining that the network quality when accessing the first application server based on the first target IPv6 address is lower than a first set network quality level comprises: 根据第一预设时长内所创建的目标地址为所述第一应用服务器的IPv6套接字的数量,以及所述IPv6套接字中未被所述第一应用服务器响应的数量,确定出单地址连接异常率;Determine a single-address connection abnormality rate according to the number of IPv6 sockets whose target address is the first application server and which are created within a first preset time period, and the number of the IPv6 sockets that are not responded to by the first application server; 根据所述第一预设时长内接收到的所述第一应用服务器所发送的数据包的数量,以及所述数据包中异常数据包的数量,确定出单地址数据传输异常率;Determine a single-address data transmission abnormality rate according to the number of data packets sent by the first application server and received within the first preset time period, and the number of abnormal data packets in the data packets; 根据所述单地址连接异常率、所述单地址数据传输异常率以及所述第一预设时长,获得单位时长内的第一网络异常率;Obtaining a first network abnormality rate within a unit time period according to the single-address connection abnormality rate, the single-address data transmission abnormality rate, and the first preset time period; 响应于所述第一网络异常率高于第一设定阈值,确定基于所述第一目标IPv6地址访问所述第一应用服务器时的网络质量低于所述第一设定网络质量等级。In response to the first network abnormality rate being higher than a first set threshold, it is determined that the network quality when accessing the first application server based on the first target IPv6 address is lower than the first set network quality level. 3.根据权利要求1或2所述的方法,其特征在于,在确定基于所述第一目标IPv6地址访问所述第一应用服务器时的网络质量低于所述第一设定网络质量等级之后,所述方法还包括:3. The method according to claim 1 or 2, characterized in that after determining that the network quality when accessing the first application server based on the first target IPv6 address is lower than the first set network quality level, the method further comprises: 将所述目标应用设置为禁用所述第一目标IPv6地址。The target application is configured to disable the first target IPv6 address. 4.根据权利要求3所述的方法,其特征在于,向第二应用服务器发送第二连接请求,包括:4. The method according to claim 3, wherein sending the second connection request to the second application server comprises: 响应于所述多个第二IPv6地址中存在被所述目标应用禁用的所述第一目标IPv6地址,将被所述目标应用禁用的所述第一目标IPv6地址从所述多个第二IPv6地址中滤除,并从剩余第二IPv6地址中确定出所述第二目标IPv6地址;In response to the presence of the first target IPv6 address disabled by the target application in the plurality of second IPv6 addresses, filtering the first target IPv6 address disabled by the target application from the plurality of second IPv6 addresses, and determining the second target IPv6 address from the remaining second IPv6 addresses; 基于所述第二目标IPv6地址向所述第二应用服务器发送所述第二连接请求。The second connection request is sent to the second application server based on the second target IPv6 address. 5.根据权利要求1所述的方法,其特征在于,在检测到针对所述目标应用的第二操作之后,所述方法还包括:5. The method according to claim 1, characterized in that after detecting the second operation on the target application, the method further comprises: 响应于所述第二操作,向第三应用服务器发送第三连接请求,所述第三连接请求包括所述多个第一Pv6地址中的第三目标IPv6地址,所述第三目标IPv6地址与所述第一目标IPv6地址不相同。In response to the second operation, a third connection request is sent to a third application server, the third connection request including a third target IPv6 address among the multiple first Pv6 addresses, the third target IPv6 address being different from the first target IPv6 address. 6.根据权利要求3或4所述的方法,其特征在于,在将所述目标应用的所述第一目标IPv6地址设置为禁用状态之后,所述方法还包括:6. The method according to claim 3 or 4, characterized in that after setting the first target IPv6 address of the target application to a disabled state, the method further comprises: 响应于满足第一预设条件,解除所述目标应用对所述第一目标IPv6地址的禁用状态,其中,所述第一预设条件为包括所述目标应用禁用所述第一目标IPv6地址的禁用时长达到第二预设时长,或者,检测到运营商切换事件,或者检测到网络切换事件。In response to satisfying a first preset condition, the target application's disabling state of the first target IPv6 address is released, wherein the first preset condition includes the target application disabling the first target IPv6 address for a disabling period reaching a second preset period, or an operator switching event is detected, or a network switching event is detected. 7.根据权利要求1或5所述的方法,其特征在于,所述方法还包括:7. The method according to claim 1 or 5, characterized in that the method further comprises: 响应于确定所述目标应用的IPv6网络的网络质量低于第二设定网络质量等级,且检测到针对所述目标应用的第三操作,所述第三操作指示所述目标应用访问第二域名;In response to determining that the network quality of the IPv6 network of the target application is lower than a second set network quality level, and detecting a third operation for the target application, the third operation instructs the target application to access a second domain name; 响应于所述第三操作,向所述域名系统服务器发送第三域名解析请求,所述第三域名解析请求用于请求所述第二域名对应的多个第三IPv4地址;In response to the third operation, sending a third domain name resolution request to the domain name system server, where the third domain name resolution request is used to request a plurality of third IPv4 addresses corresponding to the second domain name; 向第四应用服务器发送第四连接请求,所述第四连接请求包括所述多个第三IPv4地址中的第一目标IPv4地址。A fourth connection request is sent to a fourth application server, where the fourth connection request includes the first target IPv4 address among the multiple third IPv4 addresses. 8.根据权利要求7所述的方法,其特征在于,响应于确定所述目标应用的IPv6网络的网络质量低于第二设定网络质量等级,包括:8. The method according to claim 7, characterized in that, in response to determining that the network quality of the IPv6 network of the target application is lower than a second set network quality level, it comprises: 根据第三预设时长内所述目标应用基于多个目标IPv6地址访问对应应用服务器的访问总数量,以及所述目标应用基于所述多个目标IPv6地址异常访问对应应用服务器的异常访问总数量,确定出多地址异常访问率;Determine a multi-address abnormal access rate according to the total number of accesses of the target application to the corresponding application server based on the multiple target IPv6 addresses within the third preset time period, and the total number of abnormal accesses of the target application to the corresponding application server based on the multiple target IPv6 addresses; 根据所述第三预设时长内所述目标应用基于所述多个目标IPv6地址访问对应应用服务器时所创建的IPv6套接字的总数量,以及基于所述IPv6套装字中未被对应应用服务器响应的总数量,确定出多地址连接异常率;Determine a multi-address connection abnormality rate based on a total number of IPv6 sockets created when the target application accesses the corresponding application server based on the multiple target IPv6 addresses within the third preset time period, and a total number of IPv6 sockets that are not responded to by the corresponding application server in the IPv6 socket set; 根据所述多地址异常访问率与所述多地址连接异常率,确定出第二网络异常率;Determining a second network abnormality rate according to the multi-address abnormal access rate and the multi-address connection abnormality rate; 响应于所述第二网络异常率高于第二设定阈值,确定所述目标应用的IPv6网络的网络质量低于所述第二设定网络质量等级。In response to the second network abnormality rate being higher than a second set threshold, it is determined that the network quality of the IPv6 network of the target application is lower than the second set network quality level. 9.根据权利要求7或8所述的方法,在确定所述目标应用基于IPv6网络访问对应应用服务器异常之后,所述方法还包括:9. The method according to claim 7 or 8, after determining that the target application accesses the corresponding application server based on the IPv6 network abnormally, the method further comprises: 将所述目标应用设置为禁用全部IPv6地址。The target application is configured to disable all IPv6 addresses. 10.根据权利要求9所述的方法,其特征在于,将所述目标应用设置为禁用全部IPv6地址,包括:10. The method according to claim 9, wherein setting the target application to disable all IPv6 addresses comprises: 响应于确定所述目标应用的IPv4网络的网络质量高于第三设定网络质量等级,将所述目标应用设置为禁用全部IPv6地址。In response to determining that the network quality of the IPv4 network of the target application is higher than a third set network quality level, the target application is set to disable all IPv6 addresses. 11.根据权利要求10所述的方法,其特征在于,响应于所述第三操作,向所述域名系统服务器发送第三域名解析请求,包括:11. The method according to claim 10, wherein in response to the third operation, sending a third domain name resolution request to the domain name system server comprises: 响应于所述第三操作,确定所述目标应用的全部IPv6地址是否处于禁用状态;In response to the third operation, determining whether all IPv6 addresses of the target application are in a disabled state; 若是,向所述域名系统服务器发送所述第三域名解析请求。If yes, send the third domain name resolution request to the domain name system server. 12.根据权利要求10所述的方法,其特征在于,在检测到针对所述目标应用的第三操作之后,所述方法还包括:12. The method according to claim 10, characterized in that after detecting the third operation on the target application, the method further comprises: 响应于第三操作,向所述域名系统服务器发送第四域名解析请求,所述第四域名解析请求用于请求第二域名对应的多个第四IPv4地址与多个第四IPv6地址;In response to the third operation, sending a fourth domain name resolution request to the domain name system server, wherein the fourth domain name resolution request is used to request a plurality of fourth IPv4 addresses and a plurality of fourth IPv6 addresses corresponding to the second domain name; 接收域名系统服务器发送的所述多个第四IPv4地址与所述多个第四IPv6地址,并向第五应用服务器发送第五连接请求,所述第五连接请求包括所述多个第四IPv4地址中的第二目标IPv4地址。Receive the multiple fourth IPv4 addresses and the multiple fourth IPv6 addresses sent by the domain name system server, and send a fifth connection request to the fifth application server, where the fifth connection request includes the second target IPv4 address among the multiple fourth IPv4 addresses. 13.根据权利要求12所述的方法,其特征在于,向第五应用服务器发送第五连接请求,包括:13. The method according to claim 12, wherein sending the fifth connection request to the fifth application server comprises: 确定所述目标应用的全部IPv6地址是否处于禁用状态;Determining whether all IPv6 addresses of the target application are in a disabled state; 若是,从所述多个第四IPv4地址中确定出所述第二目标IPv4地址;If so, determining the second target IPv4 address from the plurality of fourth IPv4 addresses; 基于所述第二目标IPv4地址向所述第五应用服务器发送所述第五连接请求。The fifth connection request is sent to the fifth application server based on the second target IPv4 address. 14.根据权利要求10所述的方法,其特征在于,确定所述目标应用的IPv4网络的网络质量高于第三设定网络质量等级,包括:14. The method according to claim 10, wherein determining that the network quality of the IPv4 network of the target application is higher than a third set network quality level comprises: 根据所述第三预设时长内所述目标应用基于多个目标IPv4地址对应的应用服务器时,接收到的所述应用服务器所发送的数据包的数量,以及所述数据包中异常数据包的数量,确定出多地址数据包异常率;Determine the multi-address data packet abnormality rate according to the number of data packets sent by the application server and the number of abnormal data packets in the data packets when the target application is based on the application servers corresponding to the multiple target IPv4 addresses within the third preset time period; 根据所述第三预设时长与所述多地址数据包异常率,获得单位时长内的第三网络异常率;Obtaining a third network abnormality rate within a unit time length according to the third preset time length and the multi-address data packet abnormality rate; 若所述第三网络异常率小于第三设定阈值,确定所述目标应用的IPv4网络的网络质量高于所述第三设定网络质量等级。If the third network abnormality rate is less than a third set threshold, it is determined that the network quality of the IPv4 network of the target application is higher than the third set network quality level. 15.根据权利要求9-14任一项所述的方法,其特征在于,在将所述目标应用设置为禁用全部IPv6地址之后,所述方法还包括:15. The method according to any one of claims 9 to 14, characterized in that after setting the target application to disable all IPv6 addresses, the method further comprises: 响应于满足第二预设条件,解除所述目标应用对全部IPv6地址的禁用状态,其中,所述第二预设条件为包括所述目标应用禁用全部IPv6地址的禁用时长达到第四预设时长,或者,检测到运营商切换事件,或者检测到网络切换事件。In response to satisfying a second preset condition, the target application's disabling state of all IPv6 addresses is released, wherein the second preset condition includes the target application disabling all IPv6 addresses for a disabling period reaching a fourth preset period, or an operator switching event is detected, or a network switching event is detected. 16.一种芯片模组,其特征在于,所述芯片模组包括用于存储计算机程序指令的存储器和用于执行程序指令的处理器,其中,当所述计算机程序指令被所述处理器执行时,触发所述芯片模组执行如权利要求1-15中任一项所述方法的步骤。16. A chip module, characterized in that the chip module comprises a memory for storing computer program instructions and a processor for executing program instructions, wherein when the computer program instructions are executed by the processor, the chip module is triggered to execute the steps of the method as described in any one of claims 1-15. 17.一种终端,其特征在于,所述终端包括用于存储计算机程序指令的存储器和用于执行程序指令的处理器,其中,当所述计算机程序指令被所述处理器执行时,触发所述终端执行如权利要求1-15中任一项所述方法的步骤。17. A terminal, characterized in that the terminal comprises a memory for storing computer program instructions and a processor for executing program instructions, wherein when the computer program instructions are executed by the processor, the terminal is triggered to execute the steps of the method as described in any one of claims 1-15. 18.一种计算机可读存储介质,其特征在于,所述计算机可读存储介质用于存储有计算机指令,当所述计算机指令在计算机中运行时,使所述计算机执行如权利要求1-15任一项所述方法的步骤。18. A computer-readable storage medium, characterized in that the computer-readable storage medium is used to store computer instructions, and when the computer instructions are executed in a computer, the computer is caused to execute the steps of the method according to any one of claims 1 to 15. 19.一种计算机程序产品,其特征在于,所述计算机程序产品包含计算机指令,当所述计算机指令在计算机上执行时,使得所述计算机执行权利要求1-15任一项所述方法的步骤。19. A computer program product, characterized in that the computer program product comprises computer instructions, and when the computer instructions are executed on a computer, the computer is caused to execute the steps of the method according to any one of claims 1 to 15.
CN202311246771.4A 2023-09-25 2023-09-25 Application server access method, chip module, terminal and storage medium Pending CN119697153A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311246771.4A CN119697153A (en) 2023-09-25 2023-09-25 Application server access method, chip module, terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311246771.4A CN119697153A (en) 2023-09-25 2023-09-25 Application server access method, chip module, terminal and storage medium

Publications (1)

Publication Number Publication Date
CN119697153A true CN119697153A (en) 2025-03-25

Family

ID=95026275

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311246771.4A Pending CN119697153A (en) 2023-09-25 2023-09-25 Application server access method, chip module, terminal and storage medium

Country Status (1)

Country Link
CN (1) CN119697153A (en)

Similar Documents

Publication Publication Date Title
JP7235871B2 (en) Data transmission method and electronic device
CN113542839B (en) Screen projection method of electronic device and electronic device
JP7193647B2 (en) Connection establishment method and terminal device
CN114125354A (en) A method for cooperating with an electronic device and a smart speaker and an electronic device
EP4020952B1 (en) Call method and apparatus
US11792631B2 (en) Emergency call method and user terminal
WO2020019533A1 (en) Data transmission method and electronic device
CN115696483A (en) Network link switching method based on electronic equipment state and electronic equipment
US11895215B2 (en) Application server access method and terminal
CN114567871B (en) File sharing method, device, electronic device and readable storage medium
CN114006712A (en) A method, electronic device and system for obtaining verification code
CN115460445B (en) Screen projection method of electronic equipment and electronic equipment
US12041026B2 (en) Reverse address resolution method and electronic device
CN113810451B (en) Method and device for establishing point-to-point link, first terminal equipment and storage medium
CN115242891B (en) Data transmission method, system and related device
CN115134404B (en) Method for managing push connection and electronic equipment
CN114980152B (en) A method for improving voice call quality
CN119697153A (en) Application server access method, chip module, terminal and storage medium
CN116709220B (en) Network connection method, device, electronic device and computer-readable storage medium
CN118450043B (en) Call processing method, terminal and storage medium
CN116938950A (en) Data transmission method, electronic equipment and storage medium
HK40028988A (en) Connection establishment method, and terminal apparatus
HK40028988B (en) Connection establishment method, and terminal apparatus
CN119277306A (en) Method for outputting pairing notification and related device
CN116170782A (en) Screen projection method, related device and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination