CN111416883B - Address query method, device, terminal and computer readable storage medium - Google Patents

Address query method, device, terminal and computer readable storage medium Download PDF

Info

Publication number
CN111416883B
CN111416883B CN202010165770.7A CN202010165770A CN111416883B CN 111416883 B CN111416883 B CN 111416883B CN 202010165770 A CN202010165770 A CN 202010165770A CN 111416883 B CN111416883 B CN 111416883B
Authority
CN
China
Prior art keywords
dns server
dns
priority
domain name
historical
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.)
Active
Application number
CN202010165770.7A
Other languages
Chinese (zh)
Other versions
CN111416883A (en
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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN202010165770.7A priority Critical patent/CN111416883B/en
Publication of CN111416883A publication Critical patent/CN111416883A/en
Application granted granted Critical
Publication of CN111416883B publication Critical patent/CN111416883B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/955Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5007Internet protocol [IP] addresses

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application is applicable to the technical field of communication, and provides an address query method, an address query device, a terminal and a computer readable storage medium, wherein the method comprises the following steps: if the terminal receives the domain name access request, determining a DNS server; acquiring the priority of the DNS server, wherein the priority of the DNS server is determined by the terminal according to historical interaction information of each DNS server, and the historical interaction information comprises: historical DNS query success rate, historical DNS query frequency and historical DNS query time delay performance, wherein the priority is used for indicating the performance of the DNS server; and selecting a corresponding DNS server according to the priority of the DNS server from high to low until the IP address corresponding to the domain name in the domain name access request is inquired from the selected DNS server. By the method, good experience of the user can be improved.

Description

Address query method, device, terminal and computer readable storage medium
Technical Field
The present application belongs to the field of communications technologies, and in particular, to an address query method, an address query device, a terminal, and a computer-readable storage medium.
Background
The Domain Name System (DNS) is a core service of the internet, and it is a distributed database that maps Domain names and IP addresses to each other, enabling people to access the internet more conveniently without remembering IP strings that can be read directly by machines.
In the existing method, when a terminal queries a DNS server, a plurality of DNS servers are provided for the terminal to query, and when an address cannot be queried through a certain DNS server or the query is abnormal, the terminal queries the next DNS server after a specific time interval is reached. In the existing DNS server query method, if the DNS server which is queried preferentially is a server with poor performance, other servers are queried continuously after waiting for a certain time, so that the query time delay is large, and the user internet experience is poor.
Therefore, it is necessary to provide a new method to solve the above technical problems.
Disclosure of Invention
The embodiment of the application provides an address query method, an address query device, a terminal and a computer readable storage medium, and can solve the problems of large query delay and poor internet experience caused by prior query of a server with poor performance in the existing method.
In a first aspect, an embodiment of the present application provides an address query method, including:
if the terminal receives the domain name access request, determining a DNS server;
acquiring the priority of the DNS server, wherein the priority of the DNS server is determined by the terminal according to historical interaction information of each DNS server, and the historical interaction information comprises: historical DNS query success rate, historical DNS query frequency and historical DNS query time delay performance, wherein the priority is used for indicating the performance of the DNS server;
and selecting a corresponding DNS server according to the priority of the DNS server from high to low until the IP address corresponding to the domain name in the domain name access request is inquired from the selected DNS server.
In a second aspect, an embodiment of the present application provides an address query apparatus, including:
the server determining unit is used for determining the DNS server if the terminal receives the domain name access request;
a priority obtaining unit, configured to obtain a priority of the DNS server, where the priority of the DNS server is determined by the terminal according to history interaction information with each DNS server, and the history interaction information includes: historical DNS query success rate, historical DNS query frequency and historical DNS query time delay performance, wherein the priority is used for indicating the performance of the DNS server;
and the server selection unit is used for selecting a corresponding DNS server from high to low according to the priority of the DNS server until the IP address corresponding to the domain name in the domain name access request is inquired from the selected DNS server.
In a third aspect, an embodiment of the present application provides a terminal, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the method according to the first aspect when executing the computer program.
In a fourth aspect, the present application provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the computer program implements the method according to the first aspect.
In a fifth aspect, embodiments of the present application provide a computer program product, which, when run on a terminal, causes the terminal to perform the method described in the first aspect.
Compared with the prior art, the embodiment of the application has the advantages that: the priority of the DNS server is determined by the terminal according to historical interactive information of the terminal and each DNS server, and the historical interactive information comprises historical DNS query success rate, historical DNS query frequency and historical DNS query time delay performance which are key parameter indexes capable of representing DNS server query capability, namely the priority can indicate the performance of the DNS server, so that when the corresponding DNS server is selected from high to low according to the priority of the DNS server for address query, a query result can be obtained more quickly, and good experience of a user is greatly improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings used in the embodiments or the description of the prior art will be briefly described below.
Fig. 1 is a flowchart of an address query method according to an embodiment of the present application;
fig. 2 is a schematic structural diagram of an address query apparatus according to a second embodiment of the present application;
fig. 3 is a schematic structural diagram of a terminal according to a third embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
As used in this specification and the appended claims, the term "if" may be interpreted contextually as "when", "upon" or "in response to a determination" or "in response to a detection". Similarly, the phrase "if it is determined" or "if a [ described condition or event ] is detected" may be interpreted contextually to mean "upon determining" or "in response to determining" or "upon detecting [ described condition or event ]" or "in response to detecting [ described condition or event ]".
Furthermore, in the description of the present application and the appended claims, the terms "first," "second," and the like are used for distinguishing between descriptions and not necessarily for describing a relative importance or importance.
Reference throughout this specification to "one embodiment" or "some embodiments," or the like, means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the present application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," or the like, in various places throughout this specification are not necessarily all referring to the same embodiment, but rather mean "one or more but not all embodiments" unless specifically stated otherwise. The terms "comprising," "including," "having," and variations thereof mean "including, but not limited to," unless expressly specified otherwise.
The first embodiment is as follows:
when the existing terminal queries the IP address corresponding to the domain name through the DNS server, usually one DNS server is randomly selected to perform the query operation of the IP address after the interval time arrives. If the DNS server that is preferentially queried is a server with poor performance, it is still necessary to wait for a certain time before continuing to query other servers, which results in a large query delay and affects the user experience of surfing the internet.
In order to solve the technical problem, in the present application, the terminal determines the priority of each DNS server according to historical interaction information between the terminal and each DNS server, and preferentially queries the DNS server with a high priority for the IP address corresponding to the domain name.
Fig. 1 shows a flowchart of an address query method provided in an embodiment of the present application, where the address query method provided in the embodiment of the present application is applied to a terminal (such as a mobile phone, a desktop computer, a tablet computer, and the like), and the following details are described as follows:
step S11, if the terminal receives the domain name access request, determining a DNS server;
specifically, if the user inputs a domain name address in a browser of the terminal, the terminal receives a domain name access request. For example, if the user enters a domain name:www.cctv.comthen, the terminal receives the domain name access request, and then, the terminal determines a DNS server so as to query an Internet Protocol (IP) address corresponding to the domain name from the determined DNS server.
In this step, the terminal may perceive the DNS server in the vicinity of the location where the terminal receives the domain name access request, and acquire the unique identifier of the perceived DNS server after perceiving the DNS server. Of course, the number of DNS servers that the terminal can perceive is related to the location where it receives the domain name access request.
Step S12, acquiring the priority of the DNS server, wherein the priority of the DNS server is determined by the terminal according to historical interaction information of each DNS server, and the historical interaction information comprises: the historical DNS query success rate, the historical DNS query frequency and the historical DNS query delay performance are adopted, and the priority is used for indicating the performance of the DNS server;
the historical DNS query success rate can represent the interaction efficiency of the terminal and a DNS server, namely the satisfaction condition of the current DNS server to the IP address corresponding to the domain name queried by the terminal; the historical DNS query frequency can represent the interaction frequency of the terminal and a certain DNS server; the historical DNS query delay performance is used to characterize the request delay for obtaining the IP address corresponding to the domain name in the existing network state. Since the 3 parameters are all key indexes of user experience, the priority of the DNS server determined according to the 3 parameters can accurately indicate the performance of the DNS server, for example, the higher the priority, the higher the query performance corresponding to the DNS server is.
And S13, selecting a corresponding DNS from high to low according to the priority of the DNS until the IP address corresponding to the domain name in the domain name access request is inquired from the selected DNS.
Specifically, a DNS server with the highest priority (first highest) is determined, the domain name carried in the received domain name access request is sent to the DNS server with the first highest priority, and if the DNS server with the first highest priority queries the IP address corresponding to the domain name, the IP address is returned to the terminal, so that the terminal accesses the IP address, and the IP address corresponding to the domain name is not queried by other DNS servers. If the DNS server with the first high priority does not inquire the IP address corresponding to the domain name, the terminal selects the DNS server with the second high priority to inquire the IP address corresponding to the domain name, and selects whether to continuously inquire the IP addresses of other DNS servers according to whether the DNS server with the second high priority inquires the IP address corresponding to the domain name.
For example, if queried according to DNS server with the first highest priority "www.cctv.com"the IP address corresponding to this domain name is" 202.108.149.206", then the terminal receives and accesses" 202.108.149.206 "returned by the DNS server with the first highest priority, and does not inquire any other DNS server"www.cctv.com"IP address corresponding to this domain name.
In the embodiment of the application, the priority of the DNS server is determined by the terminal according to the historical interactive information of the terminal and each DNS server, and the historical interactive information comprises the historical DNS query success rate, the historical DNS query frequency and the historical DNS query time delay performance which are key parameter indexes capable of representing the DNS server query capability, namely the priority can indicate the performance of the DNS server, so that when the corresponding DNS server is selected for address query according to the priority of the DNS server from high to low, the query result can be obtained more quickly, and the good experience of a user is greatly improved.
In some embodiments, since the query performance of the DNS server is related to its recent load, the interaction information within a time period before the time when the domain name access request is received may be used as the historical interaction information, and in this case, the step S12 includes:
determining the priority of each DNS server according to historical interaction information of each DNS server, wherein the historical interaction information is as follows: the domain name access method comprises the steps of referring to interaction information in a first time period, wherein the first time period has a first specified duration, and the deadline is the time when a terminal receives a domain name access request.
In this embodiment, since the interactive information within a period of continuous time before the time when the statistical terminal receives the domain name access request is used as the historical interactive information, it can be ensured that the acquired historical information is recent information, and thus the priority determined according to the historical information can reflect the recent query performance of each DNS server. For example, assuming that the first specified duration is 24 hours, and the time when the terminal receives the domain name access request is 13. For example, if a domain name access request is received at 13 00 on 2/month and 2/day, the interactive information between the terminal and each DNS server within the time duration from 13 on 2/month and 1/day to 13 on 2/month and 2/day.
In some embodiments, since the load of the DNS server may also be related to a time period, for example, the load in a fixed time period of each day is large, and the load in another fixed time period is small, at this time, the interaction information in the fixed time period of different dates may be acquired as the historical interaction information, at this time, the step S12 includes:
determining the priority of each DNS server according to historical interaction information of each DNS server, wherein the historical interaction information is as follows: the second time period has a second specified time length, the termination time point is a time point when the terminal receives the domain name access request, and the second specified time length is shorter than the first specified time length.
In this embodiment, because the interaction information in the same time period on different dates is used as the historical interaction information, the determined priority of the DNS server can more accurately reflect the query performance of the DNS server in the time period. Of course, in order to reduce the amount of computation and increase the computation speed, the number of the different dates is a preset number, for example, the mutual information between the terminal and each DNS server in the second time period of each date in one month (if there are 30 days in one month, the preset number is 30) is counted. For example, assuming that the second specified duration is 1 hour, and the time when the terminal receives the domain name access request on 2 months and 2 days is 13.
In some embodiments, whether determining historical mutual information based on mutual information for a first time period or determining historical mutual information based on mutual information for a second time period on a different date, determining a priority for each DNS server based on historical mutual information with each DNS server may include:
Figure BDA0002407400440000071
wherein, cap i Is the priority of the i-th DNS server, alpha, beta, epsilon are priority weighting factors, fer i Frequency, total, for historical DNS queries i For the total number of query requests, suc i For the number of query requests that successfully return an IP address,
Figure BDA0002407400440000072
for historical DNS query success rates, per i delay Delay performance for historical DNS queries, wherein said Per i delay And determining according to the number of the query requests falling into each pre-divided time delay range and the corresponding time delay weight factor.
For example, assume that each time delay range divided in advance is: less than 50ms; greater than or equal to 50ms and less than 150ms; greater than or equal to 150ms and less than 250ms; greater than or equal to 250ms. Then Per i delay Can be determined according to the following formula:
Figure BDA0002407400440000081
wherein the content of the first and second substances,
Figure BDA0002407400440000082
for a number of queries less than 50ms,
Figure BDA0002407400440000083
for a number of queries greater than or equal to 50ms and less than 150ms,
Figure BDA0002407400440000084
is greater than or equal to 150ms and less than 250ms,
Figure BDA0002407400440000085
for a number of queries greater than or equal to 250ms, 1, 0.9, 0.8, 0.6 are performance factors for each latency range, with larger values indicating better performance.
In some embodiments, since the terminal may perceive the new DNS server (for example, after the terminal perceives the DNS server, if it is determined that a DNS server different from the pre-stored DNS server exists in the determined DNS server according to the identity of the perceived DNS server, it is determined that the DNS server different from the pre-stored DNS server is the new DNS server), that is, the terminal does not have any interaction information with the new DNS server. In this case, in order to reduce the amount of calculation and increase the speed of determining the priority, the priority of the new DNS server may be set to be the lowest directly, that is, if the priority queue is arranged from high to low, the priority of the new DNS server is arranged behind the priorities of all DNS servers having mutual information.
In some embodiments, since the terminal-aware query performance of the new DNS server may be superior, it is difficult to quickly let the user enjoy its query efficiency if the priority of the new DNS server is set to be the lowest directly. For example, if there are 3 DNS servers pre-stored in the terminal, and the priority of the new DNS server is set to be the lowest, that is, the new DNS server is selected for querying only after the query operation of the previous 3 DNS servers is performed and no corresponding IP address is queried, and actually, the query result may be obtained without selecting the new DNS server, and only a long time delay is consumed, so that the query result of the new DNS server can be enjoyed in time, the step S11 includes:
if the terminal receives the domain name access request, sensing a DNS server adjacent to the terminal to determine the DNS server;
correspondingly, the step S12 specifically includes:
and if the DNS server different from the pre-stored DNS server exists in the determined DNS server according to the identification of the DNS server, setting the priority of the DNS server different from the pre-stored DNS server as the highest level.
In this embodiment, since the priority of the new DNS server is set to be the highest, the terminal preferentially selects the new DNS server for querying, so that if the priority of the new DNS server is better, the high-speed querying efficiency of the new DNS server can be enjoyed in time, and if the priority of the new DNS server is worse, after the first query, the new DNS server can be determined to have a worse priority according to the interaction information corresponding to the first query, so that the terminal cannot preferentially use the new DNS server to perform the querying operation for a long time.
In some embodiments, since the terminal of the present application first selects the DNS server with better query performance according to the priority level to query the address, that is, the higher the frequency of being selected to perform address query is, the better query performance of the DNS server is indicated, in order to obtain the query result more quickly, after step S11, the method includes:
selecting a DNS server with the highest DNS query frequency from the determined DNS servers, and querying the IP address corresponding to the domain name in the domain name access request for the selected DNS server;
correspondingly, the step S12 specifically includes:
and if the IP address corresponding to the domain name in the domain name access request is not inquired from the selected DNS server, acquiring the priority of the DNS server.
In this embodiment, after each DNS server is determined, a DNS server with the highest DNS query frequency is selected according to the DNS query frequency of the terminal to each DNS server, and if an IP address corresponding to a domain name is not queried from the selected DNS server, the priority of each determined DNS server is obtained, so as to select the corresponding DNS server according to the priority.
In some embodiments, since there is a possibility that a server with abnormal network connection exists in the DNS server selected by the terminal, and the DNS server with abnormal network connection cannot necessarily return the queried IP address, if the terminal does not obtain a required IP address from other DNS servers with normal network connection and determines that the DNS server with abnormal network connection recovers network connection when querying before, reselect the DNS server with recovered network connection and query the selected DNS server for the IP address corresponding to the domain name instead of directly re-executing the address query according to the priority of the DNS server (i.e. not querying in the first query order), that is, the address query method further includes:
if the IP address corresponding to the domain name in the domain name access request is not inquired from the selected DNS server, judging whether the DNS server with abnormal network connection exists in the selected DNS server, and if the DNS server with abnormal network connection exists, inquiring the IP address corresponding to the domain name in the domain name access request from the DNS server with recovered network connection.
In this embodiment, if the required query result is not obtained (i.e., the IP address corresponding to the domain name is not obtained) after the address query operation is performed once, the DNS server for restoring the network connection is preferentially selected to perform the address query, instead of repeating the previous address query operation.
It should be noted that, if the number of DNS servers that have recovered network connection is greater than or equal to 2, the terminal sequentially selects corresponding DNS servers to query for IP addresses according to the priority of the DNS servers that have recovered network connection.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by functions and internal logic of the process, and should not constitute any limitation to the implementation process of the embodiments of the present application.
Example two:
fig. 2 shows a structural block diagram of an address query apparatus provided in the embodiment of the present application, and for convenience of description, only the parts related to the embodiment of the present application are shown.
The address inquiry apparatus 2 includes: a server determining unit 21, a priority obtaining unit 22, and a server selecting unit 23, wherein:
a server determining unit 21, configured to determine a DNS server if the terminal receives the domain name access request;
a priority obtaining unit 22, configured to obtain priorities of the DNS servers, where the priorities of the DNS servers are determined by the terminal according to historical mutual information about each DNS server, where the historical mutual information includes: the historical DNS query success rate, the historical DNS query frequency and the historical DNS query delay performance are adopted, and the priority is used for indicating the performance of the DNS server;
a server selecting unit 23, configured to select a corresponding DNS server according to the priority of the DNS server from high to low until the IP address corresponding to the domain name in the domain name access request is queried from the selected DNS server.
In the embodiment of the application, the priority of the DNS server is determined by the terminal according to the historical interactive information of the terminal and each DNS server, and the historical interactive information comprises the historical DNS query success rate, the historical DNS query frequency and the historical DNS query time delay performance which are key parameter indexes capable of representing the DNS server query capability, namely the priority can indicate the performance of the DNS server, so that when the corresponding DNS server is selected for address query according to the priority of the DNS server from high to low, the query result can be obtained more quickly, and the good experience of a user is greatly improved.
In some embodiments, the priority acquiring unit 22 includes:
determining the priority of each DNS server according to historical interaction information of each DNS server, wherein the historical interaction information comprises the following information: the domain name access method comprises the steps of referring to interaction information in a first time period, wherein the first time period has a first specified duration, and the deadline is the time when a terminal receives a domain name access request.
In some embodiments, the priority acquiring unit 22 includes:
determining the priority of each DNS server according to historical interaction information of each DNS server, wherein the historical interaction information comprises the following information: the second time period has a second specified time length, the termination time point is a time point when the terminal receives the domain name access request, and the second specified time length is shorter than the first specified time length.
In some embodiments, when determining the priority of each DNS server according to the historical interaction information of each DNS server, the priority obtaining unit 22 specifically includes:
Figure BDA0002407400440000111
wherein, cap i Is the priority of the i-th DNS server, alpha, beta, epsilon are priority weighting factors, fer i For historical DNS query frequency, per i delay Querying time delay performance, total for historical DNS i For the total number of query requests, suc i For the number of query requests that successfully return an IP address,
Figure BDA0002407400440000112
for historical DNS query success rates, per j delay Delay performance for historical DNS queries, wherein said Per i delay And determining according to the number of the query requests falling into each pre-divided time delay range and the corresponding time delay weight factor.
In some embodiments, the server determining unit 21 includes:
if the terminal receives the domain name access request, sensing a DNS server adjacent to the terminal to determine the DNS server;
correspondingly, the priority obtaining unit 22 specifically includes:
and if the DNS server different from the pre-stored DNS server exists in the determined DNS server according to the identification of the DNS server, setting the priority of the DNS server different from the pre-stored DNS server as the highest level.
In some embodiments, the address query device 2 further includes:
selecting a DNS server with the highest DNS query frequency from the determined DNS servers, and querying the IP address corresponding to the domain name in the domain name access request for the selected DNS server;
correspondingly, the priority obtaining unit 22 is specifically configured to:
and if the IP address corresponding to the domain name in the domain name access request is not inquired from the selected DNS server, acquiring the priority of the DNS server.
In some embodiments, the address query device 2 further includes:
if the IP address corresponding to the domain name in the domain name access request is not inquired from the selected DNS, judging whether a server with abnormal network connection exists in the selected DNS, and if the server with abnormal network connection exists, preferably inquiring the IP address corresponding to the domain name in the domain name access request from the server with recovered network connection.
In this embodiment, if the number of DNS servers whose network connection is restored is greater than or equal to 2, the IP address is selectively queried for the DNS server whose network connection is restored according to the priority level.
It should be noted that, for the information interaction, execution process, and other contents between the above-mentioned devices/units, the specific functions and technical effects thereof are based on the same concept as those of the embodiment of the method of the present application, and specific reference may be made to the part of the embodiment of the method, which is not described herein again.
Example three:
fig. 3 is a schematic structural diagram of a terminal according to a third embodiment of the present application. As shown in fig. 3, the terminal 3 of this embodiment includes: at least one processor 30 (only one processor is shown in fig. 3), a memory 31, and a computer program 32 stored in the memory 31 and executable on the at least one processor 30, the processor 30 implementing the steps in any of the various method embodiments described above when executing the computer program 32:
if the terminal receives the domain name access request, determining a DNS server;
acquiring the priority of the DNS server, wherein the priority of the DNS server is determined by the terminal according to historical interaction information of each DNS server, and the historical interaction information comprises: the historical DNS query success rate, the historical DNS query frequency and the historical DNS query delay performance are adopted, and the priority is used for indicating the performance of the DNS server;
and selecting a corresponding DNS server according to the priority of the DNS server from high to low until the IP address corresponding to the domain name in the domain name access request is inquired from the selected DNS server.
Those skilled in the art will appreciate that fig. 3 is only an example of the terminal 3, and does not constitute a limitation of the terminal 3, and may include more or less components than those shown, or combine some components, or different components, such as input and output devices, network access devices, etc.
The Processor 30 may be a Central Processing Unit (CPU), and the Processor 30 may be other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 31 may in some embodiments be an internal storage unit of the terminal 3, such as a hard disk or a memory of the terminal 3. The memory 31 may also be an external storage device of the terminal 3 in other embodiments, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), etc. provided on the terminal 3. Further, the memory 31 may also include both an internal storage unit and an external storage device of the terminal 3. The memory 31 is used for storing an operating system, an application program, a BootLoader (BootLoader), data, and other programs, such as program codes of the computer program. The memory 31 may also be used to temporarily store data that has been output or is to be output.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
An embodiment of the present application further provides a network device, where the network device includes: at least one processor, a memory, and a computer program stored in the memory and executable on the at least one processor, the processor implementing the steps of any of the various method embodiments described above when executing the computer program.
The embodiments of the present application further provide a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the computer program implements the steps in the above-mentioned method embodiments.
The embodiments of the present application provide a computer program product, which when running on a mobile terminal, enables the mobile terminal to implement the steps in the above method embodiments when executed.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, all or part of the processes in the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium and can implement the steps of the embodiments of the methods described above when the computer program is executed by a processor. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer readable medium may include at least: any entity or device capable of carrying computer program code to a photographing apparatus/terminal, a recording medium, computer Memory, read-Only Memory (ROM), random Access Memory (RAM), an electrical carrier signal, a telecommunications signal, and a software distribution medium. Such as a usb-disk, a removable hard disk, a magnetic or optical disk, etc. In certain jurisdictions, computer-readable media may not be an electrical carrier signal or a telecommunications signal in accordance with legislative and patent practice.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/network device and method may be implemented in other ways. For example, the above-described apparatus/network device embodiments are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implementing, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not depart from the spirit and scope of the embodiments of the present application, and they should be construed as being included in the present application.

Claims (7)

1. An address query method, comprising:
if the terminal receives the domain name access request, determining a DNS server;
acquiring the priority of the DNS server, wherein the priority of the DNS server is determined by the terminal according to historical interaction information of each DNS server, and the historical interaction information comprises: historical DNS query success rate, historical DNS query frequency and historical DNS query time delay performance, wherein the priority is used for indicating the performance of the DNS server; the historical DNS query frequency is used for representing the interaction frequency of the terminal and a certain DNS server;
selecting a corresponding DNS server according to the priority of the DNS server from high to low until the IP address corresponding to the domain name in the domain name access request is inquired from the selected DNS server;
the obtaining the priority of the DNS server comprises: determining the priority of each DNS server according to historical interaction information of each DNS server, wherein the historical interaction information comprises the following information: the domain name access request is interactive information in each second time period with different dates, the second time period has a second designated time length, and the termination time point is the time point when the terminal receives the domain name access request;
if the terminal receives the domain name access request, determining the DNS server, including:
if the terminal receives the domain name access request, sensing a DNS server adjacent to the terminal to determine the DNS server and acquiring a unique identifier of the sensed DNS server;
correspondingly, the obtaining the priority of the DNS server specifically includes:
and if the DNS server different from the pre-stored DNS server exists in the determined DNS server according to the identification of the DNS server, setting the priority of the DNS server different from the pre-stored DNS server as the highest level.
2. The address query method of claim 1, wherein said determining the priority of each of the DNS servers based on historical interaction information with each of the DNS servers comprises:
Figure FDA0003929427240000021
wherein, cap i Is the priority of the ith DNS server, and α, β, ε are priority weighting factors, fer i For the purpose of historical DNS query frequency,
Figure FDA0003929427240000022
querying time delay performance, total for historical DNS i For the total number of query requests, suc i The number of query requests to successfully return an IP address,
Figure FDA0003929427240000023
in order to have a historical DNS query success rate,
Figure FDA0003929427240000024
querying latency performance for historical DNS, wherein the
Figure FDA0003929427240000025
According to the number of the query requests falling into each pre-divided time delay range and the corresponding time delay weight factorAnd (4) determining.
3. The address querying method according to claim 1 or 2, characterized by, after the determination of the DNS server, comprising:
selecting a DNS server with the highest DNS query frequency from the determined DNS servers, and querying the IP address corresponding to the domain name in the domain name access request for the selected DNS server;
correspondingly, the acquiring the priority of the DNS server specifically includes:
and if the IP address corresponding to the domain name in the domain name access request is not inquired from the selected DNS server, acquiring the priority of the DNS server.
4. The address query method according to claim 1 or 2, characterized in that the address query method further comprises:
if the IP address corresponding to the domain name in the domain name access request is not inquired from the selected DNS server, judging whether the DNS server with abnormal network connection exists in the selected DNS server, and if the DNS server with abnormal network connection exists, inquiring the IP address corresponding to the domain name in the domain name access request from the DNS server with recovered network connection.
5. An address lookup apparatus, comprising:
the server determining unit is used for determining a DNS server if the terminal receives the domain name access request;
a priority obtaining unit, configured to obtain a priority of the DNS server, where the priority of the DNS server is determined by the terminal according to history interaction information with each DNS server, and the history interaction information includes: the historical DNS query success rate, the historical DNS query frequency and the historical DNS query delay performance are adopted, and the priority is used for indicating the performance of the DNS server; the historical DNS query frequency is used for representing the interaction frequency of the terminal and a DNS server;
a server selecting unit, configured to select a corresponding DNS server according to a priority of the DNS server from high to low until an IP address corresponding to the domain name in the domain name access request is queried from the selected DNS server;
the priority acquisition unit includes: determining the priority of each DNS server according to historical interaction information of each DNS server, wherein the historical interaction information is as follows: the domain name access request is interactive information in each second time period of different dates, the second time period has a second designated time length, and the termination time point is the time point when the terminal receives the domain name access request;
the server determination unit includes:
if the terminal receives the domain name access request, sensing a DNS server adjacent to the terminal to determine the DNS server and acquiring a unique identifier of the sensed DNS server;
correspondingly, the priority acquiring unit specifically includes:
and if the DNS server different from the pre-stored DNS server exists in the determined DNS server according to the identification of the DNS server, setting the priority of the DNS server different from the pre-stored DNS server as the highest level.
6. A terminal comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the method according to any of claims 1 to 4 when executing the computer program.
7. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1 to 4.
CN202010165770.7A 2020-03-11 2020-03-11 Address query method, device, terminal and computer readable storage medium Active CN111416883B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010165770.7A CN111416883B (en) 2020-03-11 2020-03-11 Address query method, device, terminal and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010165770.7A CN111416883B (en) 2020-03-11 2020-03-11 Address query method, device, terminal and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN111416883A CN111416883A (en) 2020-07-14
CN111416883B true CN111416883B (en) 2023-03-03

Family

ID=71494332

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010165770.7A Active CN111416883B (en) 2020-03-11 2020-03-11 Address query method, device, terminal and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN111416883B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112632485A (en) * 2021-01-04 2021-04-09 中国电子信息产业集团有限公司第六研究所 DNS (Domain name System) system based authority management and control method and system
CN115706721A (en) * 2021-07-20 2023-02-17 维沃移动通信有限公司 DNS query method, device, equipment and medium
CN117240823A (en) * 2023-11-10 2023-12-15 快上云(上海)网络科技有限公司 Generalized network intelligent optimization method and generalized network intelligent optimization terminal

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102572014A (en) * 2012-03-07 2012-07-11 华为终端有限公司 Message processing method and device and system thereof
CN103002069A (en) * 2012-12-25 2013-03-27 北京小米科技有限责任公司 Domain name resolution method, device and system
CN106060131A (en) * 2016-05-26 2016-10-26 杭州华三通信技术有限公司 Method and device for allocating DNS servers
CN107172126A (en) * 2017-04-21 2017-09-15 华为技术有限公司 A kind of domain name system server distribution method and server
CN107888716A (en) * 2017-12-05 2018-04-06 广东欧珀移动通信有限公司 A kind of sort method of domain name resolution server, terminal device and storage medium
US9979588B1 (en) * 2015-02-16 2018-05-22 Amazon Technologies, Inc. DNS resolver prioritization

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102572014A (en) * 2012-03-07 2012-07-11 华为终端有限公司 Message processing method and device and system thereof
CN103002069A (en) * 2012-12-25 2013-03-27 北京小米科技有限责任公司 Domain name resolution method, device and system
US9979588B1 (en) * 2015-02-16 2018-05-22 Amazon Technologies, Inc. DNS resolver prioritization
CN106060131A (en) * 2016-05-26 2016-10-26 杭州华三通信技术有限公司 Method and device for allocating DNS servers
CN107172126A (en) * 2017-04-21 2017-09-15 华为技术有限公司 A kind of domain name system server distribution method and server
CN107888716A (en) * 2017-12-05 2018-04-06 广东欧珀移动通信有限公司 A kind of sort method of domain name resolution server, terminal device and storage medium

Also Published As

Publication number Publication date
CN111416883A (en) 2020-07-14

Similar Documents

Publication Publication Date Title
CN111416883B (en) Address query method, device, terminal and computer readable storage medium
CN109672757B (en) File access method and file access processing device
CN107172064B (en) Data access control method and device and server
CN110704677B (en) Program recommendation method and device, readable storage medium and terminal equipment
CN110858843A (en) Service request processing method and device and computer readable storage medium
CN109885729B (en) Method, device and system for displaying data
CN108520401B (en) User list management method, device, platform and storage medium
CN110582096B (en) Data request processing method and communication network system
CN115277588B (en) Fusing current limiting system based on middle platform system
CN111767481A (en) Access processing method, device, equipment and storage medium
CN112491939B (en) Multimedia resource scheduling method and system
CN112667396A (en) Access request processing method, device and system
CN110535853B (en) Video request scheduling method, device, server and storage medium
CN112783719A (en) Monitoring data acquisition method, server, system and computer readable storage medium
CN113744013A (en) Order number generation method, device, server and storage medium
CN111694628A (en) Page display method based on application program thread and related equipment
CN110061902A (en) A kind of method, apparatus regularly sending message and storage medium
CN117743206B (en) Data storage method and device
CN112187667A (en) Data downloading method, device, equipment and storage medium
CN113114611A (en) Method and device for managing blacklist
US8131704B2 (en) Method and system for managing search mediation information
CN112749190A (en) Data query method and device, computing equipment and computer storage medium
CN115640151B (en) Service calling method, device and storage medium
CN113504881B (en) Hotspot data processing method, client, target computing device and device
CN109308653B (en) Method, terminal and storage medium for avoiding congestion of client access server

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
GR01 Patent grant
GR01 Patent grant