Domain name resolution method and device, equipment, medium and program product

By selecting the optimal authoritative domain name server among authoritative domain name servers for domain name resolution, the problem of long domain name resolution time or failure in the existing technology is solved, and a more efficient and reliable domain name resolution process is achieved.

CN118802941APending Publication Date: 2024-10-18TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310415501.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-04-11
Publication Date
2024-10-18

AI Technical Summary

Technical Problem

In the existing domain name resolution process, there are cases where domain name resolution takes a long time or fails to resolve. In particular, the response time of the authoritative domain name server is slow, resulting in access delays and failures.

Method used

Select the optimal authoritative domain name server among the authoritative domain name servers for domain name resolution. By receiving the query request from the local domain name server, select the optimal authoritative domain name server among multiple second authoritative domain name servers, and perform the second authoritative domain name server based on the IP address of the server. queries to ensure the efficiency and reliability of domain name resolution.

Benefits of technology

By selecting the optimal authoritative domain name server, domain name resolution time is shortened, domain name resolution failures are avoided, and access speed and reliability are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure BDA0004193436860000131
    Figure BDA0004193436860000131
  • Figure BDA0004193436860000141
    Figure BDA0004193436860000141
  • Figure HDA0004193436880000011
    Figure HDA0004193436880000011
Patent Text Reader

Abstract

The invention provides a domain name resolution method and device, equipment, a medium and a program product, and can relate to the Internet technology, and the method comprises the steps: receiving a first query request which is sent by a local domain name server and is used for requesting to query an IP address corresponding to a public domain name of a plurality of second authoritative domain name servers, the public domain name and the first to-be-analyzed domain name have a corresponding relationship, and the public domain name and the first to-be-analyzed domain name belong to different top-level domains; and in response to the first query request, selecting an optimal authoritative domain name server from the plurality of second authoritative domain name servers, and sending an IP address of the optimal authoritative domain name server to the local domain name server, the local domain name server sends a second query request used for requesting to query the IP address corresponding to the first to-be-analyzed domain name to the optimal authority domain name server based on the IP address of the optimal authority domain name server. Therefore, the situation of failure of domain name resolution can be avoided, and the domain name resolution duration performed by the authoritative domain name server is shortened.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of Internet technology, and in particular to a domain name resolution method, device, equipment, medium and program product. Background Art

[0002] Domain name resolution refers to the process of converting a domain name to an Internet Protocol (IP) address. It is a service that points a domain name to the IP address of a website space, allowing objects to easily access the website through the registered domain name.

[0003] At present, the domain name resolution process includes: the terminal device obtains the first domain name to be resolved, firstly detects whether the browser cache has the IP address corresponding to the first domain name to be resolved; if the browser cache has the IP address corresponding to the first domain name to be resolved, the IP address is obtained; if the browser cache has not the IP address corresponding to the first domain name to be resolved, the terminal device detects whether the local system cache has the IP address corresponding to the first domain name to be resolved; if the local system cache has the IP address corresponding to the first domain name to be resolved, the IP address is obtained; if the local system cache has not the IP address corresponding to the first domain name to be resolved, the terminal device sends a request to the local domain name server (Domain Server) to request the IP address corresponding to the first domain name to be resolved. The local domain name server responds to the query request and detects whether the IP address corresponding to the first domain name to be resolved is cached locally; if the local domain name server has the IP address corresponding to the first domain name to be resolved cached locally, the local domain name server returns the IP address to the terminal device; if the local domain name server does not have the IP address corresponding to the first domain name to be resolved cached locally, the local domain name server sends a query request to the root domain name server for the IP address of the top-level domain name server corresponding to the first domain name to be resolved; the root domain name server queries the IP address of the top-level domain name server and The IP address of the top-level domain name server is sent to the local domain name server; the local domain name server then sends a query request to the top-level domain name server for requesting the IP address of the authoritative domain name server corresponding to the first domain name to be resolved; the top-level domain name server responds to the query request and returns the IP address of the authoritative domain name server to the local domain name server; the local domain name server then sends a query request to the authoritative domain name server for requesting to query the IP address corresponding to the first domain name to be resolved; the authoritative domain name server responds to the query request, queries the IP address corresponding to the first domain name to be resolved, and returns the IP address to the local domain name server; further, the local domain name server returns the IP address to the above-mentioned terminal device.

[0004] However, currently, there may be a situation where the domain name resolution performed by the above authoritative domain name server takes a long time or even fails. Summary of the invention

[0005] The present application provides a domain name resolution method, apparatus, device, medium and program product, thereby avoiding domain name resolution failure and shortening the domain name resolution time performed by an authoritative domain name server.

[0006] In a first aspect, an embodiment of the present application provides a domain name resolution method, which is applied to a first authoritative domain name server, and the method includes: receiving a first query request sent by a local domain name server; wherein the first query request is used to request to query the IP addresses corresponding to the public domain names of multiple second authoritative domain name servers, and there is a corresponding relationship between the public domain names and the first domain name to be resolved, and the public domain names and the first domain name to be resolved belong to different top-level domains; in response to the first query request, selecting the best authoritative domain name server from the multiple second authoritative domain name servers, and sending the IP address of the best authoritative domain name server to the local domain name server, so that the local domain name server sends a second query request to the best authoritative domain name server based on the IP address of the best authoritative domain name server; wherein the second query request is used to request to query the IP address corresponding to the first domain name to be resolved.

[0007] In a second aspect, an embodiment of the present application provides a domain name resolution method, which is applied to a local domain name server, and the method includes: obtaining a public domain name corresponding to a first domain name to be resolved; wherein the public domain name is a public domain name of multiple second authoritative domain name servers; sending a first query request to the first authoritative domain name server; wherein the first query request is used to request to query the IP address corresponding to the public domain name, and the public domain name and the first domain name to be resolved belong to different top-level domains; receiving the IP address of the best authoritative domain name server among the multiple second authoritative domain name servers sent by the first authoritative domain name server; sending a second query request to the best authoritative domain name server based on the IP address of the best authoritative domain name server; wherein the second query request is used to request to query the IP address corresponding to the first domain name to be resolved; receiving the IP address corresponding to the first domain name to be resolved sent by the best authoritative domain name server.

[0008] In a third aspect, an embodiment of the present application provides a domain name resolution device, comprising: a communication module and a processing module; the communication module is used to receive a first query request sent by a local domain name server; wherein the first query request is used to request to query the IP addresses corresponding to the public domain names of multiple second authoritative domain name servers, there is a corresponding relationship between the public domain names and the first domain name to be resolved, and the public domain names and the first domain name to be resolved belong to different top-level domains; the processing module is used to respond to the first query request and select the optimal authoritative domain name server from multiple second authoritative domain name servers; the communication module is also used to send the IP address of the optimal authoritative domain name server to the local domain name server, so that the local domain name server sends a second query request to the optimal authoritative domain name server based on the IP address of the optimal authoritative domain name server; wherein the second query request is used to request to query the IP address corresponding to the first domain name to be resolved.

[0009] In some possible implementations, the processing module is further used to: before selecting the optimal authoritative domain name server from among the multiple second authoritative domain name servers, obtain target information of each of the multiple second authoritative domain name servers for selecting the optimal authoritative domain name server; accordingly, the processing module is specifically used to: based on the target information of each of the multiple second authoritative domain name servers, select the optimal authoritative domain name server from among the multiple second authoritative domain name servers.

[0010] In some implementable embodiments, for any second authoritative domain name server among multiple second authoritative domain name servers, the target information of the second authoritative domain name server is the distance information between the second authoritative domain name server and the local domain name server; accordingly, the processing module is specifically used to: based on the distance information between each of the multiple second authoritative domain name servers and the local domain name server, select the authoritative domain name server closest to the local domain name server from the multiple second authoritative domain name servers; determine the authoritative domain name server closest to the local domain name server as the optimal authoritative domain name server.

[0011] In some possible implementations, for any second authoritative domain name server among multiple second authoritative domain name servers, the target information of the second authoritative domain name server is the load information of the second authoritative domain name server; accordingly, the processing module is specifically used to: based on the respective load information of the multiple second authoritative domain name servers, select the authoritative domain name server with the smallest load among the multiple second authoritative domain name servers; determine the authoritative domain name server with the smallest load as the optimal authoritative domain name server.

[0012] In some implementable manners, for any second authoritative domain name server among the plurality of second authoritative domain name servers, the target information of the second authoritative domain name server includes: distance information between the second authoritative domain name server and the local domain name server, and load information of the second authoritative domain name server; accordingly, the processing module is specifically used to: obtain distance scores of the plurality of second authoritative domain name servers based on the distance information between the plurality of second authoritative domain name servers and the local domain name server; wherein, for any second authoritative domain name server among the plurality of second authoritative domain name servers, the closer the distance information between the second authoritative domain name server and the local domain name server, the higher the distance score of the second authoritative domain name server; obtain load scores of the plurality of second authoritative domain name servers based on the load information of the plurality of second authoritative domain name servers; wherein, for any second authoritative domain name server among the plurality of second authoritative domain name servers, the smaller the load of the second authoritative domain name server, the higher the load score of the second authoritative domain name server; perform weighted summation on the distance scores and load scores of the plurality of second authoritative domain name servers to obtain weighted sum scores of the plurality of second authoritative domain name servers; select the authoritative domain name server with the highest weighted sum score from the plurality of second authoritative domain name servers; determine the authoritative domain name server with the highest weighted sum score as the optimal authoritative domain name server.

[0013] In some possible implementations, for any second authoritative domain name server among multiple second authoritative domain name servers, the target information of the second authoritative domain name server includes: distance information between the second authoritative domain name server and the local domain name server, and load information of the second authoritative domain name server; accordingly, the processing module is specifically used to: select the optimal authoritative domain name server among the multiple second authoritative domain name servers based on the respective target information of the multiple second authoritative domain name servers, the priority of the distance information, and the priority of the load information.

[0014] In some implementable embodiments, the priority of distance information is higher than the priority of load information; accordingly, the processing module is specifically used to: select the first K1 authoritative domain name servers from multiple second authoritative domain name servers in order of the distance between the multiple second authoritative domain name servers and the local domain name server from small to large, where K1 is an integer greater than 1; based on the load information of each of the first K1 authoritative domain name servers, select the authoritative domain name server with the smallest load from the first K1 authoritative domain name servers; and determine the authoritative domain name server with the smallest load as the optimal authoritative domain name server.

[0015] In some implementable embodiments, the priority of load information is higher than the priority of distance information; accordingly, the processing module is specifically used to: select the first K2 authoritative domain name servers from multiple second authoritative domain name servers in order of the load of multiple second authoritative domain name servers from small to large, K2 is an integer greater than 1; based on the distance information between each of the first K2 authoritative domain name servers and the local domain name server, select the authoritative domain name server closest to the local domain name server from the first K2 authoritative domain name servers; determine the authoritative domain name server closest to the local domain name server as the optimal authoritative domain name server.

[0016] In some implementations, the processing module is further used to: before selecting the optimal authoritative domain name server from multiple second authoritative domain name servers based on the target information of each of the multiple second authoritative domain name servers, if there is a faulty authoritative domain name server among the multiple second authoritative domain name servers, delete the faulty authoritative domain name server from the multiple second authoritative domain name servers.

[0017] In a fourth aspect, an embodiment of the present application provides a domain name resolution device, including: a communication module, used to: obtain a public domain name corresponding to a first domain name to be resolved; wherein the public domain name is a public domain name of multiple second authoritative domain name servers; send a first query request to the first authoritative domain name server; wherein the first query request is used to request to query the IP address corresponding to the public domain name, and the public domain name and the first domain name to be resolved belong to different top-level domains; receive the IP address of the best authoritative domain name server among the multiple second authoritative domain name servers sent by the first authoritative domain name server; send a second query request to the best authoritative domain name server based on the IP address of the best authoritative domain name server; wherein the second query request is used to request to query the IP address corresponding to the first domain name to be resolved; receive the IP address corresponding to the first domain name to be resolved sent by the best authoritative domain name server.

[0018] In some implementable embodiments, the communication module is specifically used to: send a third query request to a root domain name server, the third query request is used to request to query the IP address of a first top-level domain name server corresponding to a first domain name to be resolved; receive the IP address of the first top-level domain name server sent by the root domain name server; send a fourth query request to the first top-level domain name server based on the IP address of the first top-level domain name server; wherein the fourth query request is used to request to query the IP address corresponding to the first domain name to be resolved; receive the public domain name sent by the first top-level domain name server.

[0019] In some possible implementations, the communication module is also used to: receive a fifth query request, wherein the fifth query request is used to request a query for an IP address corresponding to a second domain name to be resolved; in response to the fifth query request, send the fifth query request to an optimal authoritative domain name server; and receive the IP address corresponding to the second domain name to be resolved sent by the optimal authoritative domain name server.

[0020] In a fifth aspect, an embodiment of the present application provides a domain name resolution system, including: a local domain name server, a first authoritative domain name server and multiple second authoritative domain name servers; the local domain name server is used to: obtain a public domain name corresponding to a first domain name to be resolved; wherein the public domain name is a public domain name of multiple second authoritative domain name servers, and the public domain name and the first domain name to be resolved belong to different top-level domains; send a first query request to the first authoritative domain name server; wherein the first query request is used to request to query an IP address corresponding to the public domain name; the first authoritative domain name server is used to: respond to the first query request, select the best authoritative domain name server from multiple second authoritative domain name servers, and send the IP address of the best authoritative domain name server to the local domain name server; the local domain name server is also used to: send a second query request to the best authoritative domain name server based on the IP address of the best authoritative domain name server; wherein the second query request is used to request to query the IP address corresponding to the first domain name to be resolved; receive the IP address corresponding to the first domain name to be resolved sent by the best authoritative domain name server.

[0021] In a sixth aspect, an embodiment of the present application provides an electronic device, comprising: a processor and a memory, the memory being used to store a computer program, the processor being used to call and run the computer program stored in the memory, and executing the method in the first aspect, the second aspect or their respective implementations.

[0022] In a seventh aspect, an embodiment of the present application provides a computer-readable storage medium for storing a computer program, wherein the computer program enables a computer to execute a method as in the first aspect, the second aspect, or each of their implementations.

[0023] In an eighth aspect, an embodiment of the present application provides a computer program product, comprising computer program instructions, which enable a computer to execute a method as in the first aspect, the second aspect, or each of their implementations.

[0024] In a ninth aspect, an embodiment of the present application provides a computer program, which enables a computer to execute the method in the first aspect, the second aspect, or each implementation thereof.

[0025] Through the technical solution provided in the embodiments of the present application, the first authoritative domain name server can select the optimal authoritative domain name server for the local domain name server, so that the optimal authoritative domain name server can implement domain name resolution. Since the optimal authoritative domain name server can operate normally (i.e., without faults) compared with other authoritative domain name servers, and / or, compared with other authoritative domain name servers, its domain name resolution efficiency is higher, based on this, domain name resolution is performed through the optimal authoritative domain name server, which can shorten the resolution time of the authoritative domain name server for the domain name to be resolved, and even avoid the failure of domain name resolution. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0027] Figure 1 is an exemplary domain name system architecture diagram;

[0028] Figure 2 A schematic diagram of domain name resolution provided for related technologies;

[0029] Figure 3 A schematic diagram of an application scenario provided for an embodiment of the present application;

[0030] Figure 4 An interactive flow chart of a domain name resolution method provided in an embodiment of the present application;

[0031] Figure 5 A schematic diagram of domain name resolution provided in an embodiment of the present application;

[0032] Figure 6 A schematic diagram of a domain name resolution device 600 provided in an embodiment of the present application;

[0033] Figure 7 A schematic diagram of a domain name resolution device 700 provided in an embodiment of the present application;

[0034] Figure 8 It is a schematic block diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0035] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0036] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product, or server that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products, or devices.

[0037] Before introducing the technical solution of the present application, the following first describes the relevant knowledge involved in the embodiments of the present application:

[0038] 1. Domain name resolution refers to the process of converting a domain name to an IP address. It is a service that points a domain name to the IP address of a website space, allowing objects to easily access the website through the registered domain name.

[0039] Second, the Domain Name System is a service of the Internet. As a distributed database that maps domain names and IP addresses, it enables people to access the Internet more conveniently.

[0040] Figure 1 is an exemplary domain name system architecture diagram, such as Figure 1 As shown, the system architecture is also called a domain name tree. The top layer of the system is the root node, the second layer is the top-level domain name, the third layer is the second-level domain name, the fourth layer is the third-level domain name, and the fifth layer is the fourth-level domain name.

[0041] 3. Root domain name server, which corresponds to the root node in the domain name system, is the highest level domain name server, but there is not only one, but many, with a total of 13 root domain name servers with different IP addresses, represented by A to M. Each root domain name server knows the domain names and IP addresses of all top-level domain name servers, but often only knows these, so accessing the root domain name server generally only gets the IP address of the top-level domain name server, and cannot directly know the IP address of the specific server you are looking for.

[0042] 4. Top-level domain name server is responsible for managing all second-level domain names under the top-level domain name. For example, cn is a top-level domain name server, which manages second-level domain names such as edu and gov. When a query request is received, it either gives the final result (that is, the specific IP address) or gives the IP address of the authoritative domain name server that should be accessed next.

[0043] 5. Authoritative domain name server. Each domain name partition corresponds to a server called an authoritative domain name server. When an authoritative domain name server receives a DNS query request, if the authoritative domain name server can give the IP address corresponding to the first domain name to be resolved, it returns the IP address. For example, the authoritative domain name server corresponding to abc.com can give the IP address of vxabc.com, and then directly returns the IP address. If the authoritative domain name server cannot give the IP address corresponding to the first domain name to be resolved, the authoritative domain name server can return the IP address of the authoritative domain name server to be accessed next. For example, assuming that the authoritative domain name server corresponding to abc.com cannot give the IP address of tyabc.com, the authoritative domain name server will return the IP address of the authoritative domain name server y.abc.com.

[0044] 6. Local domain name server, also known as the preferred domain name server or default domain name server, does not belong to the hierarchical structure of the domain name tree, but is quite important. When a terminal device wants to perform a DNS query, it will first send the query request to the local domain name server. If the local domain name server cannot find the IP address of the first domain name to be resolved, it will trigger the terminal device to query the IP address of the first domain name to be resolved from the authoritative domain name server.

[0045] 7. A record, also known as host record. Simply put, A record is the IP address corresponding to the specified domain name, that is, it records the correspondence between the domain name and the IP address.

[0046] For example, here are three A records:

[0047] www.baidu.com.IN A 1.1.1.2

[0048] mx1.baidu.com.IN A 1.1.1.3

[0049] mx2.baidu.com.IN A 1.1.1.3

[0050] The first A record indicates that the IP address corresponding to the domain name www.baidu.com is 1.1.1.2;

[0051] The second A record indicates that the IP address corresponding to the domain name mx1.baidu.com is 1.1.1.3;

[0052] The third A record indicates that the IP address corresponding to the domain name mx2.baidu.com is 1.1.1.3.

[0053] 8. Domain Name Server (NS) record, which is used to specify which domain name server will resolve the domain name.

[0054] For example, here are two NS records:

[0055] baidu.com.IN NS ns1.baidu.com.

[0056] baidu.com.IN NS ns2.baidu.com.

[0057] The first NS record indicates that the domain name baidu.com is resolved by the domain name server corresponding to ns1.baidu.com;

[0058] The second NS record indicates that the domain name baidu.com is resolved by the domain name server corresponding to ns2.baidu.com.

[0059] The following is a description of the technical problems, inventive concepts and application scenarios to be solved by the technical solution of this application:

[0060] The following is an example to illustrate the domain name resolution process provided by the related technology:

[0061] Figure 2 A schematic diagram of domain name resolution provided for related technologies, such as Figure 2 As shown in FIG. 1 , the domain name resolution process includes:

[0062] S201: The terminal device performs a local query on the first domain name to be resolved www.x.com;

[0063] The terminal device obtains the first domain name www.x.com to be resolved, and first detects whether the IP address corresponding to www.x.com is cached in the browser cache; if the IP address corresponding to www.x.com is cached in the browser cache, the IP address is obtained; if the IP address corresponding to www.x.com is not cached in the browser cache, the terminal device detects whether the IP address corresponding to www.x.com is cached in the local system cache; if the IP address corresponding to www.x.com is cached in the local system cache, the IP address is obtained; if the IP address corresponding to www.x.com is not cached in the local system cache, step S202 is executed;

[0064] S202: The terminal device sends a query request to the local domain name server for querying the IP address corresponding to www.x.com. In other words, the terminal device requests the local domain name server to query the IP address corresponding to www.x.com;

[0065] In response to the query request, the local domain name server detects whether the IP address corresponding to www.x.com is cached locally; if the local domain name server does not cache the IP address corresponding to www.x.com locally, execute S203; if the local domain name server has the IP address corresponding to www.x.com cached locally, execute S209;

[0066] S203, the local domain name server sends a query request to the root domain name server for querying the IP address of the .com top-level domain name server corresponding to www.x.com. In other words, the local domain name server requests the root domain name server to query the IP address of the .com top-level domain name server corresponding to www.x.com;

[0067] S204: The root domain name server queries the IP address of the .com top-level domain name server, and sends the IP address of the .com top-level domain name server to the local domain name server;

[0068] S205: The local domain name server sends a query request for the IP address of the authoritative domain name server corresponding to www.x.com to the .com top-level domain name server; in other words, the local domain name server requests the .com top-level domain name server to query the IP address of the authoritative domain name server corresponding to www.x.com;

[0069] S206: The .com top-level domain name server responds to the query request and returns the IP address of the authoritative domain name server to the local domain name server;

[0070] S207: The local domain name server sends a query request to the authoritative domain name server for querying the IP address corresponding to www.x.com; in other words, the local domain name server requests the authoritative domain name server to query the IP address corresponding to www.x.com;

[0071] S208: The authoritative domain name server responds to the query request, queries the IP address corresponding to www.x.com, and returns the IP address to the local domain name server;

[0072] S209: The local domain name server returns the IP address to the terminal device.

[0073] However, currently, there may be a situation where the domain name resolution performed by the above authoritative domain name server takes a long time or even fails.

[0074] In order to solve this technical problem, the present application proposes to set up multiple second authoritative domain name servers, which can all resolve the first domain name to be resolved, select the optimal authoritative domain name server from these second authoritative domain name servers, and resolve the first domain name to be resolved through the optimal authoritative domain name server, thereby avoiding the failure of domain name resolution and shortening the domain name resolution time performed by the authoritative domain name server.

[0075] The embodiments of the present application can be applied to Figure 3 The application scenarios shown in the figure are, but not limited to:

[0076] For example, Figure 3 A schematic diagram of an application scenario provided in an embodiment of the present application, such as Figure 3 As shown, the application scenario includes: a local domain name server, at least one first authoritative domain name server, and multiple second authoritative domain name servers, wherein the local domain name server is connected to the at least one first authoritative domain name server and the multiple second authoritative domain name servers in a wired or wireless manner.

[0077] It should be understood that the first authoritative domain name server is used to select the best authoritative domain name server from multiple second authoritative domain name servers and return the IP address of the best authoritative domain name server to the local domain name server. Each second authoritative domain name server can resolve the first domain name to be resolved, that is, it can query the IP address corresponding to the first domain name to be resolved.

[0078] In some implementations, the application scenario also includes: terminal equipment, root domain name server, top-level domain name server, but is not limited thereto. The local domain name server can be connected to the terminal equipment, root domain name server, and top-level domain name server in a wired or wireless manner.

[0079] In some possible implementations, the terminal device is installed with a browser, and the terminal device can collect the object's click operation on the web link on the browser, or the input operation on the search box of the browser, etc., and respond to the click operation or the input operation to obtain the first domain name to be resolved.

[0080] In some implementations, the terminal device may be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, etc., but is not limited thereto.

[0081] In some possible implementations, the local domain name server, root domain name server, top-level domain name server, first authoritative domain name server, and second authoritative domain name server can all be independent physical servers, or a server cluster or distributed system composed of multiple physical servers. They can also be cloud servers that provide basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), as well as big data and artificial intelligence platforms.

[0082] It should be noted that the above application scenario includes a terminal device, a local domain name server, a root domain name server, two top-level domain name servers, a first authoritative domain name server, and two second authoritative domain name servers. In fact, the application scenario can also include other numbers of these devices. For example, one or more second authoritative domain name servers can be deployed in major cities across the country.

[0083] It is worth mentioning that the two top-level domain name servers included in this application scenario are the top-level domain name server corresponding to the first domain name to be resolved, and the top-level domain name server corresponding to the public domain name of multiple second authoritative domain name servers. For example, assuming that the first domain name to be resolved is www.x.com, its corresponding top-level domain name server is the .com top-level domain name server, assuming that the public domain names of multiple second authoritative domain name servers are ns.x.cn, www.x.com, then the top-level domain name server corresponding to the public domain name is the .cn top-level domain name server.

[0084] The technical solution of this application is described in detail below:

[0085] Figure 4 The interactive flow chart of a domain name resolution method provided in an embodiment of the present application, the method can be executed by a local domain name server, a first authoritative domain name server and the best authoritative server among multiple second authoritative domain name servers, such as Figure 4 As shown, the method includes:

[0086] S410: The local domain name server obtains a public domain name corresponding to the first domain name to be resolved; wherein the public domain name is a public domain name of multiple second authoritative domain name servers, and the public domain name and the first domain name to be resolved belong to different top-level domains;

[0087] S420: The local domain name server sends a first query request to the first authoritative domain name server; wherein the first query request is used to request to query the IP address corresponding to the public domain name;

[0088] S430: The first authoritative domain name server selects an optimal authoritative domain name server from a plurality of second authoritative domain name servers in response to the first query request;

[0089] S440: The first authoritative domain name server sends the IP address of the optimal authoritative domain name server to the local domain name server;

[0090] S450: The local domain name server sends a second query request to the optimal authoritative domain name server based on the IP address of the optimal authoritative domain name server; wherein the second query request is used to request to query the IP address corresponding to the first domain name to be resolved;

[0091] S460: The optimal authoritative domain name server determines the IP address corresponding to the first domain name to be resolved in response to the second query request;

[0092] S470: The best authoritative domain name server sends the IP address corresponding to the first domain name to be resolved to the local domain name server.

[0093] The following is a detailed description of S410:

[0094] In the embodiment of the present application, the local domain name server may perform S410 in any of the following situations, but is not limited thereto:

[0095] In case one, the local domain name server receives a query request from a terminal device for querying the IP address corresponding to the first domain name to be resolved, that is, the fifth query request to be mentioned below; the local domain name server responds to the fifth query request and detects whether the IP address corresponding to the first domain name to be resolved is cached locally; if the local domain name server does not cache the IP address corresponding to the first domain name to be resolved locally, the local domain name server is triggered to execute S410.

[0096] In some possible implementations, the terminal device is installed with a browser, and the terminal device can collect the object's click operation on the web link on the browser, or the input operation on the search box of the browser, etc., and respond to the click operation or the input operation to obtain the first domain name to be resolved.

[0097] In the embodiment of the present application, the terminal device may send the fifth query request to the local domain name server under the triggering of any of the following implementable methods, but is not limited thereto:

[0098] In some possible implementations, the terminal device may first detect whether the IP address corresponding to the first domain name to be resolved is cached in the browser cache; if the IP address corresponding to the first domain name to be resolved is not cached in the browser cache, the terminal device detects whether the IP address corresponding to the first domain name to be resolved is cached in the local system cache; if the IP address corresponding to the first domain name to be resolved is not cached in the local system cache, the terminal device sends a fifth query request to the local domain name server.

[0099] In other possible implementations, the terminal device does not locally detect whether it has cached the IP address corresponding to the first domain name to be resolved, but directly sends the fifth query request to the local domain name server.

[0100] In case 2, the local domain name server receives the object operation, and responds to the object operation to trigger the local domain name server to execute S410.

[0101] In some implementations, the object operation is used to input a first domain name to be resolved and request to query an IP address corresponding to the first domain name to be resolved. For example, assuming that the local domain name server has an input device, the object inputs the first domain name to be resolved through the input device and clicks a query button for the first domain name to be resolved, based on which the local domain name server executes S410.

[0102] In some implementations, the input device includes at least one of the following, but is not limited to: a keyboard, a mouse, a microphone, etc.

[0103] It should be understood that the above-mentioned public domain name is the public domain name of multiple second authoritative domain name servers, and the public domain name means that the above-mentioned multiple second authoritative domain name servers correspond to the same domain name. For example, the public domain name of multiple second authoritative domain name servers is ns.x.cn.

[0104] It should be understood that the public domain name may also be referred to as a public domain name or a shared domain name, etc., and the embodiments of the present application do not limit this.

[0105] It should be understood that the public domain name and the first domain name to be resolved belong to different top-level domains. The reason for this setting is: in the embodiment of the present application, since the public domain name and the first domain name to be resolved belong to different top-level domains, the authoritative domain name server corresponding to the public domain name, that is, the above-mentioned first authoritative domain name server can be selected from multiple second authoritative domain name servers. Otherwise, if the public domain name and the first domain name to be resolved belong to the same top-level domain, then the first authoritative domain name server is actually the second authoritative domain name server, which will resolve the first domain name to be resolved by itself, so that the domain name resolution process ends, and the selection of the optimal authoritative domain name server cannot be achieved.

[0106] It should be understood that the first authoritative domain name server can resolve the public domain name, that is, can determine the IP address corresponding to the public domain name, or the first authoritative domain name server is responsible for the domain name partition corresponding to the public domain name. For example, assuming that the public domain name is ns.x.cn, the domain name partition that the first authoritative domain name server is responsible for is x.cn.

[0107] In the embodiment of the present application, the local domain name server may obtain the public domain name in any of the following achievable ways, but is not limited thereto:

[0108] In some implementations, the first top-level domain name server corresponding to the first domain name to be resolved is configured with a mapping relationship between the first domain name to be resolved and the above public domain name. For example, assuming that the first domain name to be resolved is www.x.com, the public domain name with a mapping relationship therewith is ns.x.cn. Based on this, S410 may include:

[0109] S410-1: The local domain name server sends a third query request to the root domain name server, where the third query request is used to query the IP address of the first top-level domain name server corresponding to the first domain name to be resolved;

[0110] It should be understood that the top-level domain name suffix of the first domain name to be resolved is the same as the top-level domain name that the first top-level domain name server is responsible for. For example, the first domain name to be resolved is www.x.com, and the first top-level domain name server is a .com top-level domain name server.

[0111] S410-2: The local domain name server receives the IP address of the first top-level domain name server sent by the root domain name server;

[0112] S410-3: The local domain name server sends a fourth query request to the first top-level domain name server based on the IP address of the first top-level domain name server; wherein the fourth query request is used to request to query the IP address corresponding to the first domain name to be resolved;

[0113] It should be understood that the first top-level domain name server itself does not store the IP address corresponding to the first domain name to be resolved. Therefore, when the first top-level domain name server receives the fourth query request, it can only search for the public domain name corresponding to the first domain name to be resolved.

[0114] In some implementations, the fourth query request may also be replaced by a sixth query request, wherein the sixth query request is used to request a public domain name corresponding to the first domain name to be resolved.

[0115] S410-4: The local domain name server receives the public domain name sent by the first top-level domain name server.

[0116] In other possible implementations, the local domain name server may be configured with a mapping relationship between the first domain name to be resolved and the above public domain name. For example, assuming that the first domain name to be resolved is www.x.com, the public domain name with a mapping relationship therewith is ns.x.cn. Based on this, the local domain name server may determine the public domain name corresponding to the first domain name to be resolved based on the above mapping relationship stored locally.

[0117] The following is a detailed description of S420:

[0118] In some implementations, the local domain name server pre-stores a mapping relationship between the public domain name and the IP address of the first authoritative domain name server. Based on this, after the local domain name server obtains the public domain name, it can determine the IP address of the first authoritative domain name server based on the mapping relationship.

[0119] In other possible implementations, the local domain name server does not store the mapping relationship between the public domain name and the IP address of the first authoritative domain name server. Based on this, after obtaining the public domain name, the local domain name server can send a seventh query request to the second top-level domain name server corresponding to the public domain name. The seventh query request is used to request the IP address of the first authoritative domain name server. Further, the local domain name server receives the IP address of the first authoritative domain name server sent by the second top-level domain name server.

[0120] For example, the local domain name server sends the seventh query request to the second top-level domain name server. The second top-level domain name server queries that the IP address of the first authoritative domain name server is 2.3.4.5. Based on this, the second top-level domain name server can return the IP address 2.3.4.5 to the local domain name server, so that the local domain name server can send the above-mentioned first query request to the first authoritative domain name server based on the IP address.

[0121] It should be understood that the top-level domain name suffix of the public domain name is the same as the top-level domain name that the second top-level domain name server is responsible for. For example, assuming that the public domain name is ns.x.cn, the second top-level domain name server is the .cn top-level domain name server.

[0122] In some implementations, the first query request carries the public domain name.

[0123] The following is a detailed description of S430:

[0124] In the embodiment of the present application, the first authoritative domain name server may select the optimal authoritative domain name server in any of the following achievable ways, but is not limited thereto:

[0125] In a first implementation mode, before executing S430, the domain name resolution method further includes:

[0126] The first authoritative domain name server obtains target information of each of the plurality of second authoritative domain name servers for selecting an optimal authoritative domain name server.

[0127] Based on this, S430 may include:

[0128] S430 - 1 : Selecting an optimal authoritative domain name server from the plurality of second authoritative domain name servers based on the respective target information of the plurality of second authoritative domain name servers.

[0129] In a second implementation method, multiple second authoritative domain name servers are arranged in descending order of excellence, based on which the first authoritative domain name server can select the first authoritative domain name server from the multiple second authoritative domain name servers as the optimal authoritative domain name server.

[0130] A third implementation method is that multiple second authoritative domain name servers are arranged in order of excellence from low to high. Based on this, the first authoritative domain name server can select the last authoritative domain name server among the multiple second authoritative domain name servers as the optimal authoritative domain name server.

[0131] The following is a detailed description of the above-mentioned achievable method 1:

[0132] In the embodiment of the present application, the target information of each second authoritative domain name server may be any of the following, but is not limited thereto:

[0133] In case 1, the target information of a second authoritative domain name server may include at least one of the following: distance information between the second authoritative domain name server and the local domain name server, and load information of the second authoritative domain name server.

[0134] In case 2, the target information of a second authoritative domain name server may include at least one of the following: distance information between the second authoritative domain name server and the local domain name server, load information of the second authoritative domain name server, and identification information of whether the second authoritative domain name server fails.

[0135] The following is a detailed description of S430-1 in these two cases:

[0136] In case 1, if for any second authoritative domain name server among the plurality of second authoritative domain name servers, the target information of the second authoritative domain name server is the distance information between the second authoritative domain name server and the local domain name server; then S430-1 may include:

[0137] S430-1-1A: The first authoritative domain name server selects an authoritative domain name server closest to the local domain name server from among the multiple second authoritative domain name servers based on the distance information between each of the multiple second authoritative domain name servers and the local domain name server;

[0138] S430-1-2A: The first authoritative domain name server determines the authoritative domain name server closest to the local domain name server as the optimal authoritative domain name server.

[0139] For example, assuming that there are three second authoritative domain name servers, namely second authoritative domain name server 01, second authoritative domain name server 02, and second authoritative domain name server 03, the distance between the local domain name server and the second authoritative domain name server 01 is 10km, the distance between the local domain name server and the second authoritative domain name server 02 is 100km, and the distance between the local domain name server and the second authoritative domain name server 03 is 50km. Based on this, the first authoritative domain name server can use the second authoritative domain name server 01 as the optimal authoritative domain name server.

[0140] In case 1, if for any second authoritative domain name server among the plurality of second authoritative domain name servers, the target information of the second authoritative domain name server is the load information of the second authoritative domain name server; then S430-1 may include:

[0141] S430-1-1B: The first authoritative domain name server selects an authoritative domain name server with the smallest load from among the multiple second authoritative domain name servers based on the load information of each of the multiple second authoritative domain name servers;

[0142] S430-1-2B: The first authoritative domain name server determines the authoritative domain name server with the smallest load as the optimal authoritative domain name server.

[0143] For example, assuming that there are three second authoritative domain name servers, namely second authoritative domain name server 01, second authoritative domain name server 02, and second authoritative domain name server 03, the load of second authoritative domain name server 01 is 50%, the load of second authoritative domain name server 02 is 70%, and the load of second authoritative domain name server 03 is 30%. Based on this, the first authoritative domain name server can use second authoritative domain name server 03 as the optimal authoritative domain name server.

[0144] In case 1, if for any second authoritative domain name server among multiple second authoritative domain name servers, the target information of the second authoritative domain name server includes: distance information between the second authoritative domain name server and the local domain name server, and load information of the second authoritative domain name server; then S430-1 may include:

[0145] S430-1-1C: The first authoritative domain name server obtains a distance score of each of the plurality of second authoritative domain name servers based on the distance information between each of the plurality of second authoritative domain name servers and the local domain name server;

[0146] S430-1-2C: The first authoritative domain name server obtains a load score of each of the plurality of second authoritative domain name servers based on the load information of each of the plurality of second authoritative domain name servers;

[0147] S430-1-3C: The first authoritative domain name server performs a weighted sum of the distance scores and load scores of the plurality of second authoritative domain name servers to obtain a weighted sum score of the plurality of second authoritative domain name servers;

[0148] S430-1-4C: The first authoritative domain name server selects an authoritative domain name server with the highest weighted sum score from among the multiple second authoritative domain name servers;

[0149] S430-1-5C: The first authoritative domain name server determines the authoritative domain name server with the highest weighted sum score as the optimal authoritative domain name server.

[0150] The following is a detailed description of S430-1-1C:

[0151] It should be understood that, for any second authoritative domain name server among the multiple second authoritative domain name servers, the closer the distance information between the second authoritative domain name server and the local domain name server is, the higher the distance score of the second authoritative domain name server is.

[0152] In the embodiment of the present application, the first authoritative domain name server may determine the distance score of the second authoritative domain name server in any of the following achievable ways, but is not limited thereto:

[0153] In some implementations, the first authoritative domain name server may obtain a mapping relationship between a distance interval and a distance score, and determine a corresponding distance score based on the distance interval to which the distance between the second authoritative server and the local domain name server belongs and the mapping relationship. For example, the mapping relationship is shown in Table 1:

[0154] Table 1

[0155] Distance interval Distance score (0km,10km】 10 (10km,20km】 9 (20km,30km) 8 (30km,40km】 7 (40km,50km】 6 (50km,60km】 5 (60km,70km】 4 (70km,80km】 3 (80km,90km】 2 (90km,100km】 1 (100km,+∞) 0

[0156] The first authoritative domain name server may obtain the mapping relationship between the distance interval and the distance score in the following achievable manner, but is not limited thereto:

[0157] In some implementations, the first authoritative domain name server generates and stores a mapping relationship between the distance interval and the distance score, and obtains the mapping relationship between the distance interval and the distance score locally.

[0158] In other possible implementations, the first authoritative domain name server obtains the mapping relationship between the distance interval and the distance score from other devices, such as a local domain name server.

[0159] The first authoritative domain name server may also determine the distance score of the second authoritative domain name server in the following achievable manner:

[0160] In some implementations, the electronic device may input distance information between each of the plurality of second authoritative domain name servers and the local domain name server into the first model to obtain a distance score for each of the plurality of second authoritative domain name servers.

[0161] The electronic device may input the distance information between each of the plurality of second authoritative domain name servers and the local domain name server into the first model in batches, and the first model outputs the distance scores of each of the plurality of second authoritative domain name servers in batches. Alternatively, the electronic device may input the distance information between each of the plurality of second authoritative domain name servers and the local domain name server into the first model one by one, and the first model outputs the distance scores of each of the plurality of second authoritative domain name servers one by one.

[0162] In some implementations, the first model may be a neural network model, but is not limited thereto.

[0163] In some implementations, the training device may perform supervised training or unsupervised training on the first model through training samples. When supervised training is used, each training sample may include: a distance information and a distance score corresponding to the distance information, and the distance score is used as label data. When unsupervised training is used, each training sample may include: a distance information.

[0164] In the training phase of the first model, the electronic device can calculate the training loss. Further, the electronic device can minimize the loss to adjust the parameters of the first model until the loss converges or the number of training times reaches a preset number.

[0165] In some implementations, the loss may be a cross entropy loss, a one-norm (L1) loss, a mean square error loss (MSE), etc., but is not limited thereto.

[0166] The first authoritative domain name server may also determine the distance score of the second authoritative domain name server in the following achievable manner:

[0167] In some implementations, the first authoritative domain name server calculates the reciprocals of the distances between each of the plurality of second authoritative domain name servers and the local domain name server, and normalizes the reciprocals to obtain the distance scores of each of the plurality of second authoritative domain name servers.

[0168] For example, suppose there are three second authoritative domain name servers, namely second authoritative domain name server 01, second authoritative domain name server 02, and second authoritative domain name server 03. The distance between the local domain name server and the second authoritative domain name server 01 is 10 km, the distance between the local domain name server and the second authoritative domain name server 02 is 100 km, and the distance between the local domain name server and the second authoritative domain name server 03 is 50 km. The reciprocals of these three distances are 0.1, 0.01, and 0.02, respectively. The sum of the three is 0.13, and then 0.1 / 0.13≈0.77, 0.01 / 0.13≈0.08, and 0.02 / 0.13≈0.15 are calculated. Based on this, these three values ​​are the distance scores of the second authoritative domain name server 01, the second authoritative domain name server 02, and the second authoritative domain name server 03, respectively.

[0169] The following is a detailed description of S430-1-2C:

[0170] It should be understood that, for any second authoritative domain name server among the multiple second authoritative domain name servers, the smaller the load of the second authoritative domain name server, the higher the load score of the second authoritative domain name server.

[0171] In some implementations, the first authoritative domain name server may obtain a mapping relationship between the load interval and the load score of the second authoritative domain name server, and determine the corresponding load score based on the load interval to which the load of the second authoritative server belongs and the mapping relationship. For example, the mapping relationship is shown in Table 2:

[0172] Table 2

[0173]

[0174]

[0175] The first authoritative domain name server may obtain the mapping relationship between the load interval and the load score in the following achievable manner, but is not limited thereto:

[0176] In some implementations, the first authoritative domain name server generates and stores a mapping relationship between the load interval and the load score, and obtains the mapping relationship between the load interval and the load score locally.

[0177] In other possible implementations, the first authoritative domain name server obtains the mapping relationship between the load interval and the load score from other devices, such as a local domain name server.

[0178] The first authoritative domain name server may also determine the load score of the second authoritative domain name server in the following achievable manner:

[0179] In some implementations, the electronic device may input the distance information of each of the plurality of second authoritative domain name servers into the second model to obtain the load score of each of the plurality of second authoritative domain name servers.

[0180] The electronic device may input the load information of each of the plurality of second authoritative domain name servers into the second model in batches, and the second model may output the load scores of each of the plurality of second authoritative domain name servers in batches. Alternatively, the electronic device may input the load information of each of the plurality of second authoritative domain name servers into the second model one by one, and the second model may output the load scores of each of the plurality of second authoritative domain name servers one by one.

[0181] In some implementations, the second model may be a neural network model, but is not limited thereto.

[0182] In some implementations, the training device may perform supervised training or unsupervised training on the second model through training samples. When supervised training is used, each training sample may include: a load information and a load score corresponding to the load information, and the load score is used as label data. When unsupervised training is used, each training sample may include: a load information.

[0183] In the training phase of the second model, the electronic device can calculate the training loss. Further, the electronic device can minimize the loss to adjust the parameters of the second model until the loss converges or the number of training times reaches a preset number.

[0184] In some implementations, the loss may be a cross entropy loss, a one-norm (L1) loss, a MSE, etc., but is not limited thereto.

[0185] The first authoritative domain name server may also determine the load score of the second authoritative domain name server in the following achievable manner:

[0186] In some implementations, the first authoritative domain name server calculates the inverses of the loads of the plurality of second authoritative domain name servers respectively, and normalizes the inverses to obtain the load scores of the plurality of second authoritative domain name servers respectively.

[0187] For example, suppose there are three second authoritative domain name servers, namely second authoritative domain name server 01, second authoritative domain name server 02, and second authoritative domain name server 03. The load of second authoritative domain name server 01 is 50%, the load of second authoritative domain name server 02 is 70%, and the load of second authoritative domain name server 03 is 30%. The reciprocals of their three loads are 2, 1.43, and 3.33, respectively. The sum of the three is 6.76, and then 2 / 6.76≈0.30, 1.43 / 6.76≈0.21, and 3.33 / 6.76≈0.49 are calculated. Based on this, these three values ​​are the load scores of the second authoritative domain name server 01, the second authoritative domain name server 02, and the second authoritative domain name server 03, respectively.

[0188] The following is a detailed description of S430-1-3C:

[0189] In some implementations, the respective weights of the distance score and the load score may be predefined, preconfigured, etc.

[0190] In some implementations, the weights of the distance score and the load score may be fixed. For example, in any case, the weight corresponding to the distance score of each authoritative domain name server is 0.5, and the weight corresponding to the load score is also 0.5.

[0191] In some implementations, the weights of the distance score and the load score may be dynamically changed. For example, the weights of the distance score and the load score may change periodically, and the periods of the two may be the same or different. For example, assuming that the change period of the weights of the distance score and the load score is one week, assuming that the weight of the distance score is 0.5 and the weight of the load score is 0.5 in the first week, the weight of the distance score is 0.6 and the weight of the load score is 0.4 in the second week, the weight of the distance score is 0.4 and the weight of the load score is 0.6 in the third week, and the weight of the distance score is 0.4 and the weight of the load score is 0.6, and the weight of the first week is repeated from the fourth week, and so on.

[0192] The following is an exemplary description in combination with S430-1-4C and S430-1-5C:

[0193] For example, assuming that there are three second authoritative domain name servers, namely, second authoritative domain name server 01, second authoritative domain name server 02, and second authoritative domain name server 03, their respective distance scores are 0.77, 0.08, and 0.15, and their respective load scores are 0.30, 0.21, and 0.49, and the weights corresponding to the distance scores and the load scores are both 0.5. Based on this, the weighted sum scores of the second authoritative domain name server 01, the second authoritative domain name server 02, and the second authoritative domain name server 03 are 0.77*0.5+0.30*0.5=0.54, 0.08*0.5+0.21*0.5=0.15, and 0.15*0.5+0.49*0.5=0.32. Based on this, the first authoritative domain name server can use the second authoritative domain name server 01 with the highest weighted sum score as the optimal authoritative domain name server.

[0194] In case 1, for any second authoritative domain name server among multiple second authoritative domain name servers, the target information of the second authoritative domain name server includes: the distance information between the second authoritative domain name server and the local domain name server, and the load information of the second authoritative domain name server; the following implementable manner may also be adopted:

[0195] In some implementations, S430-1 may include:

[0196] S430-1-1D: The first authoritative domain name server selects the best authoritative domain name server from the plurality of second authoritative domain name servers based on the respective target information, the priority of the distance information, and the priority of the load information of the plurality of second authoritative domain name servers.

[0197] In some implementations, the priority of the distance information and the priority of the load information may be predefined or preconfigured, but is not limited thereto.

[0198] In some implementations, assuming that the priority of distance information is higher than that of load information, S430-1-1D may include:

[0199] S430-1-1D-1a: The first authoritative domain name server selects the first K1 authoritative domain name servers from the plurality of second authoritative domain name servers in ascending order of distance between the plurality of second authoritative domain name servers and the local domain name server, where K1 is an integer greater than 1;

[0200] S430-1-1D-2a: The first authoritative domain name server selects an authoritative domain name server with the smallest load from among the first K1 authoritative domain name servers based on the load information of each of the first K1 authoritative domain name servers;

[0201] S430-1-1D-3a: The first authoritative domain name server determines the authoritative domain name server with the smallest load as the optimal authoritative domain name server.

[0202] For example, suppose there are three second authoritative domain name servers, namely, second authoritative domain name server 01, second authoritative domain name server 02, and second authoritative domain name server 03. The distance between the local domain name server and the second authoritative domain name server 01 is 10 km, the distance between the local domain name server and the second authoritative domain name server 02 is 100 km, and the distance between the local domain name server and the second authoritative domain name server 03 is 50 km. The load of the second authoritative domain name server 01 is 50%, the load of the second authoritative domain name server 02 is 70%, and the load of the second authoritative domain name server 03 is 30%. Assume that the value of K1 is 2. Based on this, according to the order of the distance between the multiple second authoritative domain name servers and the local domain name server from small to large, the first two authoritative domain name servers are selected from the multiple second authoritative domain name servers, that is, the second authoritative domain name server 01 and the second authoritative domain name server 03 are selected. Further, the first authoritative domain name server selects the one with the smaller load from the two authoritative domain name servers, that is, the second authoritative domain name server 03 is selected.

[0203] In some implementations, assuming that the priority of load information is higher than that of distance information, S430-1-1D may include:

[0204] S430-1-1D-1b: The first authoritative domain name server selects the first K2 authoritative domain name servers from the plurality of second authoritative domain name servers in ascending order of load of the plurality of second authoritative domain name servers, where K2 is an integer greater than 1;

[0205] S430-1-1D-2b: The first authoritative domain name server selects an authoritative domain name server closest to the local domain name server from the first K2 authoritative domain name servers based on the distance information between each of the first K2 authoritative domain name servers and the local domain name server;

[0206] S430-1-1D-3b: The first authoritative domain name server determines the authoritative domain name server closest to the local domain name server as the optimal authoritative domain name server.

[0207] For example, suppose there are three second authoritative domain name servers, namely, second authoritative domain name server 01, second authoritative domain name server 02, and second authoritative domain name server 03. The distance between the local domain name server and the second authoritative domain name server 01 is 10 km, the distance between the local domain name server and the second authoritative domain name server 02 is 100 km, and the distance between the local domain name server and the second authoritative domain name server 03 is 50 km. The load of the second authoritative domain name server 01 is 50%, the load of the second authoritative domain name server 02 is 70%, and the load of the second authoritative domain name server 03 is 30%. Assume that the value of K2 is 2. Based on this, according to the order of the loads of the plurality of second authoritative domain name servers from small to large, the first two authoritative domain name servers are selected from the plurality of second authoritative domain name servers, that is, the second authoritative domain name server 01 and the second authoritative domain name server 03 are selected. Further, the first authoritative domain name server selects one of the two authoritative domain name servers that is closer to the local domain name server, that is, the second authoritative domain name server 01 is selected.

[0208] In some achievable methods, before selecting the optimal authoritative domain name server, the first authoritative domain name server may first detect whether there is a faulty authoritative domain name server among the multiple second authoritative domain name servers, and if there is a faulty authoritative domain name server among the multiple second authoritative domain name servers, the faulty authoritative domain name server is deleted from the multiple second authoritative domain name servers. Based on this, the first authoritative domain name server may select the optimal authoritative domain name server from the remaining second authoritative domain name servers, wherein the selection method in this case is similar to the above-mentioned method of selecting the optimal authoritative domain name server from the multiple second authoritative domain name servers, and will not be described in detail.

[0209] For example, assuming that there are three second authoritative domain name servers, namely second authoritative domain name server 01, second authoritative domain name server 02, and second authoritative domain name server 03, the first authoritative domain name server detects that second authoritative domain name server 01 has a fault. Based on this, the first authoritative domain name server excludes second authoritative domain name server 01 and selects the optimal authoritative domain name server from second authoritative domain name server 02 and second authoritative domain name server 03.

[0210] The following is a detailed description of S430-1 under the second situation of target information:

[0211] Among them, situation 2 specifically includes the following 7 possibilities:

[0212] 1. The target information of a second authoritative domain name server includes: the distance information between the second authoritative domain name server and the local domain name server;

[0213] 2. The target information of a second authoritative domain name server includes: load information of the second authoritative domain name server;

[0214] 3. The target information of a second authoritative domain name server includes: identification information of whether the second authoritative domain name server fails;

[0215] 4. The target information of a second authoritative domain name server includes: the distance information between the second authoritative domain name server and the local domain name server, and the load information of the second authoritative domain name server;

[0216] 5. The target information of a second authoritative domain name server includes: the distance information between the second authoritative domain name server and the local domain name server, and the identification information of whether the second authoritative domain name server fails;

[0217] 6. The target information of a second authoritative domain name server includes: load information of the second authoritative domain name server and identification information of whether the second authoritative domain name server fails;

[0218] 7. The target information of a second authoritative domain name server includes: load information of the second authoritative domain name server, load information of the second authoritative domain name server, and identification information of whether a failure occurs to the second authoritative domain name server.

[0219] It should be understood that for the specific contents of Item 1, Item 2 and Item 4, reference can be made to the above text, and the embodiments of the present application do not limit this.

[0220] With respect to item 3, the first authoritative domain name server may select the optimal authoritative domain name server in the following achievable manner, but is not limited thereto:

[0221] In some possible implementations, the first authoritative domain name server may delete a faulty authoritative domain name server from multiple second authoritative domain name servers based on identification information of whether each of the multiple second authoritative domain name servers has failed. Furthermore, the first authoritative domain name server may randomly select an authoritative domain name server from the remaining second authoritative domain name servers and use the authoritative domain name server as the optimal authoritative domain name server.

[0222] With respect to item 5, the first authoritative domain name server may select the optimal authoritative domain name server in the following achievable manner, but is not limited thereto:

[0223] The first authoritative domain name server may delete a faulty authoritative domain name server from the multiple second authoritative domain name servers based on identification information of whether each of the multiple second authoritative domain name servers has a fault. Furthermore, the first authoritative domain name server may select an authoritative domain name server that is closest to the local domain name server from the second authoritative domain name servers based on distance information between each of the remaining second authoritative domain name servers and the local domain name server; and determine the authoritative domain name server that is closest to the local domain name server as the optimal authoritative domain name server.

[0224] With respect to item 6, the first authoritative domain name server may select the optimal authoritative domain name server in the following achievable manner, but is not limited thereto:

[0225] The first authoritative domain name server may delete a faulty authoritative domain name server from the multiple second authoritative domain name servers based on identification information of whether each of the multiple second authoritative domain name servers has a fault. Furthermore, the first authoritative domain name server may select an authoritative domain name server with the smallest load from the second authoritative domain name servers based on load information of the remaining second authoritative domain name servers; and determine the authoritative domain name server with the smallest load as the optimal authoritative domain name server.

[0226] With respect to item 7, the first authoritative domain name server may select the optimal authoritative domain name server in the following achievable manner, but is not limited thereto:

[0227] The first authoritative domain name server can delete the faulty authoritative domain name server from the multiple second authoritative domain name servers based on the identification information of whether each of the multiple second authoritative domain name servers has a fault. Further, reference can be made to the method in situation one where the first authoritative domain name server selects the optimal authoritative domain name server when the target information includes: the distance information between the second authoritative domain name server and the local domain name server, and the load information of the second authoritative domain name server.

[0228] In some achievable methods, before selecting the optimal authoritative domain name server, the first authoritative domain name server may first detect whether there is a faulty authoritative domain name server among the multiple second authoritative domain name servers, and if there is a faulty authoritative domain name server among the multiple second authoritative domain name servers, the faulty authoritative domain name server is deleted from the multiple second authoritative domain name servers. Based on this, the first authoritative domain name server may select the optimal authoritative domain name server from the remaining second authoritative domain name servers, wherein the selection method in this case is similar to the above-mentioned method of selecting the optimal authoritative domain name server from the multiple second authoritative domain name servers, and will not be described in detail.

[0229] The following is a detailed description of the second and third implementation methods of S430:

[0230] In some implementable embodiments, the excellence of each second authoritative domain name server can be obtained based on the distance information between the second authoritative domain name server and the local domain name server and / or the load information of the second authoritative domain name server, wherein, the smaller the distance information between the second authoritative domain name server and the local domain name server, the higher the excellence of the second authoritative domain name server, and the smaller the load information of the second authoritative domain name server, the higher the excellence of the second authoritative domain name server. The embodiment of the present application does not limit the method for calculating the excellence of the second authoritative domain name server.

[0231] In some implementations, the local domain name server may cache all results of the above domain name resolution process.

[0232] For example, the IP address of the best authoritative domain name server can be cached, so that when the local domain name server receives the fifth query request, it responds to the fifth query request and sends the fifth query request to the best authoritative domain name server; and receives the IP address corresponding to the second domain name to be resolved sent by the best authoritative domain name server. The fifth query request is used to request the IP address corresponding to the second domain name to be resolved.

[0233] For another example, the local domain name server can cache the first domain name to be resolved and the IP address corresponding to the first domain name to be resolved. Based on this, when the local domain name server receives the IP address for requesting to query the first domain name to be resolved again, the local domain name server can query the IP address of the first domain name to be resolved locally.

[0234] The following is an example of the domain name resolution process provided by the embodiment of the present application:

[0235] Figure 5 A schematic diagram of domain name resolution provided in the embodiment of the present application, such as Figure 5 As shown in FIG. 1 , the domain name resolution process includes:

[0236] S501: The terminal device performs a local query on the first domain name to be resolved www.x.com;

[0237] The terminal device obtains the first domain name www.x.com to be resolved, and first detects whether the IP address corresponding to www.x.com is cached in the browser cache; if the IP address corresponding to www.x.com is cached in the browser cache, the IP address is obtained; if the IP address corresponding to www.x.com is not cached in the browser cache, the terminal device detects whether the IP address corresponding to www.x.com is cached in the local system cache; if the IP address corresponding to www.x.com is cached in the local system cache, the IP address is obtained; if the IP address corresponding to www.x.com is not cached in the local system cache, step S502 is executed;

[0238] S502, the terminal device sends a query request for querying the IP address corresponding to www.x.com to the local domain name server. In other words, the terminal device requests the local domain name server to query the IP address corresponding to www.x.com;

[0239] In response to the query request, the local domain name server detects whether the IP address corresponding to www.x.com is cached locally; if the local domain name server does not cache the IP address corresponding to www.x.com locally, execute S503; if the local domain name server has the IP address corresponding to www.x.com cached locally, execute S509;

[0240] S503, the local domain name server sends a query request for querying the IP address of the .com top-level domain name server corresponding to www.x.com to the root domain name server. In other words, the local domain name server requests the root domain name server to query the IP address of the .com top-level domain name server corresponding to www.x.com;

[0241] S504: The root domain name server queries the IP address of the .com top-level domain name server, and sends the IP address of the .com top-level domain name server to the local domain name server;

[0242] S505: The local domain name server sends a query request for querying the IP address of www.x.com to the .com top-level domain name server, that is, the local domain name server requests the .com top-level domain name server to query the IP address of www.x.com;

[0243] S506: The .com top-level domain name server returns ns.x.cn to the local domain name server;

[0244] It should be understood that since the .com top-level domain name server does not store the IP address of www.x.com, but it is configured with the public domain name ns.x.cn corresponding to www.x.com, which is the public domain name corresponding to multiple second authoritative domain name servers, that is, the .com top-level domain name server can only inform the local domain name server that the NS record of www.x.com is ns.x.cn. Based on this, the .com top-level domain name server returns ns.x.cn to the local domain name server. Therefore, the local domain name server needs to continue to query the IP address corresponding to ns.x.cn.

[0245] S507: The local domain name server sends a query request for the IP address of the .cn top-level domain name server to the root domain name server, that is, the local domain name server requests the root domain name server to query the IP address of the .cn top-level domain name server;

[0246] S508: The root domain name server returns the IP address of the .cn top-level domain to the local domain name server;

[0247] S509: The local domain name server requests the .cn top-level domain server to query the IP address of the NS of ns.x.cn; the local domain name server requests to query the IP address of the authoritative domain name server (ie, the first authoritative domain name server) of ns.x.cn.

[0248] S510: The .cn top-level domain server returns the IP address of the first authoritative domain name server to the local domain name server.

[0249] Here we assume that the IP address of the first authoritative domain name server is 2.3.4.5.

[0250] S511: The local domain name server requests the first authoritative domain name server to query the IP address corresponding to ns.x.cn;

[0251] S512: The first authoritative domain name server selects the best authoritative domain name server from the multiple second authoritative domain name servers, and returns the IP address of the best authoritative domain name server to the local domain name server;

[0252] Here we assume that the IP address of the optimal authoritative domain name server is 1.2.3.4.

[0253] S513: The local domain name server requests the best authoritative domain name server to query the IP address of www.x.com;

[0254] S514: The best authoritative domain name server queries the IP address of www.x.com and returns the IP address to the local domain name server;

[0255] S515: The local domain name server returns the IP address to the terminal device.

[0256] It should be understood that the explanations of S501 to S515 can be referred to above, and the embodiments of the present application will not be elaborated on them.

[0257] An embodiment of the present application provides a domain name resolution method, wherein a first authoritative domain name server can select an optimal authoritative domain name server for a local domain name server, so that the optimal authoritative domain name server implements domain name resolution. Since the optimal authoritative domain name server is able to operate normally (i.e., without failure) relative to other authoritative domain name servers, and / or, relative to other authoritative domain name servers, its domain name resolution efficiency is higher, based on this, domain name resolution is performed through the optimal authoritative domain name server, which can shorten the resolution time of the authoritative domain name server for the domain name to be resolved, and even avoid the situation where the domain name resolution fails.

[0258] Furthermore, in an embodiment of the present application, the local domain name server can cache the IP address of the optimal authoritative server, so that when other domain names to be resolved need to be resolved again in the future, it can send a resolution request to the optimal authoritative domain name server, thereby improving the efficiency of subsequent domain name resolution.

[0259] The preferred embodiments of the present application are described in detail above in conjunction with the accompanying drawings. However, the present application is not limited to the specific details in the above embodiments. Within the technical concept of the present application, the technical solution of the present application can be subjected to a variety of simple modifications, and these simple modifications all belong to the protection scope of the present application. For example, the various specific technical features described in the above specific embodiments can be combined in any suitable manner without contradiction. In order to avoid unnecessary repetition, the present application will not further explain various possible combinations. For another example, the various different embodiments of the present application can also be arbitrarily combined, as long as they do not violate the ideas of the present application, they should also be regarded as the contents disclosed in the present application.

[0260] It should also be understood that in the various method embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0261] The method provided in the embodiment of the present application is described above, and the device provided in the embodiment of the present application is described below.

[0262] Figure 6 A schematic diagram of a domain name resolution device 600 provided in an embodiment of the present application is shown as follows: Figure 6 As shown, the device 600 includes: a communication module 610 and a processing module 620 .

[0263] The communication module 610 is used to receive a first query request sent by a local domain name server; wherein the first query request is used to request to query the IP addresses corresponding to the public domain names of multiple second authoritative domain name servers, there is a corresponding relationship between the public domain names and the first domain name to be resolved, and the public domain names and the first domain name to be resolved belong to different top-level domains; the processing module 620 is used to respond to the first query request and select the optimal authoritative domain name server from multiple second authoritative domain name servers; the communication module 610 is also used to send the IP address of the optimal authoritative domain name server to the local domain name server, so that the local domain name server sends a second query request to the optimal authoritative domain name server based on the IP address of the optimal authoritative domain name server; wherein the second query request is used to request to query the IP address corresponding to the first domain name to be resolved.

[0264] In some implementations, the processing module 620 is further used to: before selecting the optimal authoritative domain name server from among the multiple second authoritative domain name servers, obtain target information of each of the multiple second authoritative domain name servers for selecting the optimal authoritative domain name server; accordingly, the processing module 620 is specifically used to: based on the target information of each of the multiple second authoritative domain name servers, select the optimal authoritative domain name server from among the multiple second authoritative domain name servers.

[0265] In some implementations, for any second authoritative domain name server among multiple second authoritative domain name servers, the target information of the second authoritative domain name server is the distance information between the second authoritative domain name server and the local domain name server; accordingly, the processing module 620 is specifically used to: based on the distance information between each of the multiple second authoritative domain name servers and the local domain name server, select the authoritative domain name server closest to the local domain name server from the multiple second authoritative domain name servers; determine the authoritative domain name server closest to the local domain name server as the optimal authoritative domain name server.

[0266] In some implementations, for any second authoritative domain name server among multiple second authoritative domain name servers, the target information of the second authoritative domain name server is the load information of the second authoritative domain name server; accordingly, the processing module 620 is specifically used to: based on the respective load information of the multiple second authoritative domain name servers, select the authoritative domain name server with the smallest load among the multiple second authoritative domain name servers; determine the authoritative domain name server with the smallest load as the optimal authoritative domain name server.

[0267] In some implementations, for any second authoritative domain name server among the plurality of second authoritative domain name servers, the target information of the second authoritative domain name server includes: distance information between the second authoritative domain name server and the local domain name server, and load information of the second authoritative domain name server; accordingly, the processing module 620 is specifically used to: obtain distance scores of the plurality of second authoritative domain name servers based on the distance information between the plurality of second authoritative domain name servers and the local domain name server; wherein, for any second authoritative domain name server among the plurality of second authoritative domain name servers, the closer the distance information between the second authoritative domain name server and the local domain name server, the higher the distance score of the second authoritative domain name server; obtain load scores of the plurality of second authoritative domain name servers based on the load information of the plurality of second authoritative domain name servers; wherein, for any second authoritative domain name server among the plurality of second authoritative domain name servers, the smaller the load of the second authoritative domain name server, the higher the load score of the second authoritative domain name server; perform weighted summation on the distance scores and load scores of the plurality of second authoritative domain name servers to obtain weighted sum scores of the plurality of second authoritative domain name servers; select the authoritative domain name server with the highest weighted sum score from the plurality of second authoritative domain name servers; and determine the authoritative domain name server with the highest weighted sum score as the optimal authoritative domain name server.

[0268] In some implementations, for any second authoritative domain name server among multiple second authoritative domain name servers, the target information of the second authoritative domain name server includes: distance information between the second authoritative domain name server and the local domain name server, and load information of the second authoritative domain name server; accordingly, the processing module 620 is specifically used to: select the optimal authoritative domain name server from the multiple second authoritative domain name servers based on the respective target information of the multiple second authoritative domain name servers, the priority of the distance information, and the priority of the load information.

[0269] In some implementations, the priority of distance information is higher than the priority of load information; accordingly, the processing module 620 is specifically used to: select the first K1 authoritative domain name servers from the multiple second authoritative domain name servers in order of the distance between the multiple second authoritative domain name servers and the local domain name server from small to large, where K1 is an integer greater than 1; based on the load information of each of the first K1 authoritative domain name servers, select the authoritative domain name server with the smallest load from the first K1 authoritative domain name servers; and determine the authoritative domain name server with the smallest load as the optimal authoritative domain name server.

[0270] In some implementable embodiments, the priority of load information is higher than the priority of distance information; accordingly, the processing module 620 is specifically used to: select the first K2 authoritative domain name servers from multiple second authoritative domain name servers in order of the load of multiple second authoritative domain name servers from small to large, K2 is an integer greater than 1; based on the distance information between each of the first K2 authoritative domain name servers and the local domain name server, select the authoritative domain name server closest to the local domain name server from the first K2 authoritative domain name servers; determine the authoritative domain name server closest to the local domain name server as the optimal authoritative domain name server.

[0271] In some implementations, the processing module 620 is further used to: before selecting the optimal authoritative domain name server from the multiple second authoritative domain name servers based on the target information of each of the multiple second authoritative domain name servers, if there is a faulty authoritative domain name server among the multiple second authoritative domain name servers, delete the faulty authoritative domain name server from the multiple second authoritative domain name servers.

[0272] It should be understood that the device embodiment and the method embodiment may correspond to each other, and similar descriptions may refer to the method embodiment. To avoid repetition, they will not be described here. Specifically, Figure 6 The device 600 shown may perform Figure 4 The method embodiment corresponding to the first authoritative domain name server in the apparatus 600, and the aforementioned and other operations and / or functions of each module in the apparatus 600 are respectively to implement Figure 4 For the sake of brevity, the corresponding processes in each method corresponding to the first authoritative domain name server are not repeated here.

[0273] The above describes the device 600 of the embodiment of the present application from the perspective of the functional module in conjunction with the accompanying drawings. It should be understood that the functional module can be implemented in hardware form, can be implemented by instructions in software form, and can also be implemented by a combination of hardware and software modules. Specifically, the steps of the method embodiment in the embodiment of the present application can be completed by the hardware integrated logic circuit and / or software form instructions in the processor, and the steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware decoding processor to perform, or a combination of hardware and software modules in the decoding processor to perform. Optionally, the software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, an electrically erasable programmable memory, a register, etc. The storage medium is located in a memory, and the processor reads the information in the memory, and completes the steps in the above method embodiment in conjunction with its hardware.

[0274] Figure 7 A schematic diagram of a domain name resolution device 700 provided in an embodiment of the present application is shown as follows: Figure 7As shown, the device 700 includes: a communication module 710, which is used to: obtain a public domain name corresponding to a first domain name to be resolved; wherein the public domain name is a public domain name of multiple second authoritative domain name servers; send a first query request to the first authoritative domain name server; wherein the first query request is used to request to query the IP address corresponding to the public domain name, and the public domain name and the first domain name to be resolved belong to different top-level domains; receive the IP address of the best authoritative domain name server among multiple second authoritative domain name servers sent by the first authoritative domain name server; send a second query request to the best authoritative domain name server based on the IP address of the best authoritative domain name server; wherein the second query request is used to request to query the IP address corresponding to the first domain name to be resolved; receive the IP address corresponding to the first domain name to be resolved sent by the best authoritative domain name server.

[0275] In some possible implementations, the communication module 710 is specifically used to: send a third query request to a root domain name server, the third query request is used to request an IP address of a first top-level domain name server corresponding to a first domain name to be resolved; receive the IP address of a first top-level domain name server sent by the root domain name server; send a fourth query request to the first top-level domain name server based on the IP address of the first top-level domain name server; wherein the fourth query request is used to request an IP address corresponding to the first domain name to be resolved; receive a public domain name sent by the first top-level domain name server.

[0276] In some possible implementations, the communication module 710 is also used to: receive a fifth query request, wherein the fifth query request is used to request a query for an IP address corresponding to a second domain name to be resolved; in response to the fifth query request, send the fifth query request to an optimal authoritative domain name server; and receive an IP address corresponding to the second domain name to be resolved sent by the optimal authoritative domain name server.

[0277] It should be understood that the device embodiment and the method embodiment may correspond to each other, and similar descriptions may refer to the method embodiment. To avoid repetition, they will not be described here. Specifically, Figure 7 The device 700 shown may perform Figure 4 The method embodiment corresponding to the local domain name server in the device 700, and the aforementioned and other operations and / or functions of each module in the device 700 are respectively to implement Figure 4 The corresponding processes in each method corresponding to the local domain name server in are not repeated here for the sake of brevity.

[0278] The above describes the device 700 of the embodiment of the present application from the perspective of the functional module in conjunction with the accompanying drawings. It should be understood that the functional module can be implemented in hardware form, can be implemented by instructions in software form, and can also be implemented by a combination of hardware and software modules. Specifically, the steps of the method embodiment in the embodiment of the present application can be completed by the hardware integrated logic circuit and / or software form instructions in the processor, and the steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware decoding processor to perform, or a combination of hardware and software modules in the decoding processor to perform. Optionally, the software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, an electrically erasable programmable memory, a register, etc. The storage medium is located in a memory, and the processor reads the information in the memory, and completes the steps in the above method embodiment in conjunction with its hardware.

[0279] The embodiment of the present application also provides a domain name resolution system, including: a local domain name server, a first authoritative domain name server and a plurality of second authoritative domain name servers.

[0280] The local domain name server is used to: obtain a public domain name corresponding to a first domain name to be resolved; wherein the public domain name is a public domain name of multiple second authoritative domain name servers, and the public domain name and the first domain name to be resolved belong to different top-level domains; send a first query request to the first authoritative domain name server; wherein the first query request is used to request to query the IP address corresponding to the public domain name; the first authoritative domain name server is used to: respond to the first query request, select the best authoritative domain name server from multiple second authoritative domain name servers, and send the IP address of the best authoritative domain name server to the local domain name server; the local domain name server is also used to: send a second query request to the best authoritative domain name server based on the IP address of the best authoritative domain name server; wherein the second query request is used to request to query the IP address corresponding to the first domain name to be resolved; receive the IP address corresponding to the first domain name to be resolved sent by the best authoritative domain name server.

[0281] Among them, the functions of the first authoritative domain name server and the local domain name server can be referred to some embodiments of the above method and device, which will not be described in detail.

[0282] Figure 8 It is a schematic block diagram of an electronic device provided in an embodiment of the present application, and the electronic device may be the above-mentioned first authoritative domain name server or a local domain name server.

[0283] like Figure 8 As shown, the electronic device may include:

[0284] The memory 810 and the processor 820, the memory 810 is used to store the computer program and transmit the program code to the processor 820. In other words, the processor 820 can call and run the computer program from the memory 810 to implement the method in the embodiment of the present application.

[0285] For example, the processor 820 may be configured to execute the above method embodiments according to instructions in the computer program.

[0286] In some embodiments of the present application, the processor 820 may include but is not limited to:

[0287] General-purpose processor, digital signal processor (DSP), application-specific integrated circuit (ASIC), field programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, etc.

[0288] In some embodiments of the present application, the memory 810 includes but is not limited to:

[0289] Volatile memory and / or non-volatile memory. Among them, the non-volatile memory can be read-only memory (ROM), programmable ROM (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM) or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM), and direct RAM bus random access memory (DR RAM).

[0290] In some embodiments of the present application, the computer program may be divided into one or more modules, which are stored in the memory 810 and executed by the processor 820 to complete the method provided by the present application. The one or more modules may be a series of computer program instruction segments capable of completing specific functions, and the instruction segments are used to describe the execution process of the computer program in the electronic device.

[0291] like Figure 8 As shown, the electronic device may also include:

[0292] The transceiver 830 may be connected to the processor 820 or the memory 810 .

[0293] The processor 820 may control the transceiver 830 to communicate with other devices, specifically, to send information or data to other devices, or to receive information or data sent by other devices. The transceiver 830 may include a transmitter and a receiver. The transceiver 830 may further include an antenna, and the number of antennas may be one or more.

[0294] It should be understood that the various components in the electronic device are connected via a bus system, wherein the bus system includes not only a data bus but also a power bus, a control bus and a status signal bus.

[0295] The present application also provides a computer storage medium on which a computer program is stored, and when the computer program is executed by a computer, the computer can perform the method of the above method embodiment. In other words, the present application embodiment also provides a computer program product containing instructions, and when the instructions are executed by a computer, the computer can perform the method of the above method embodiment.

[0296] When software is used for implementation, it can 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 the computer program instructions are loaded and executed on a computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (digital subscriber line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integration. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a digital video disc (digital video disc, DVD)), or a semiconductor medium (e.g., a solid state drive (solid state disk, SSD)), etc.

[0297] Those of ordinary skill in the art will appreciate that the modules and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0298] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the module is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.

[0299] The modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. For example, each functional module in each embodiment of the present application may be integrated into a processing module, or each module may exist physically separately, or two or more modules may be integrated into one module.

[0300] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A domain name resolution method, It is characterized in that The method is applied to a first authoritative domain name server, and the method comprises: Receive a first query request sent by a local domain name server; wherein the first query request is used to request to query the Internet Protocol IP addresses corresponding to the public domain names of multiple second authoritative domain name servers, there is a corresponding relationship between the public domain names and the first domain name to be resolved, and the public domain name and the first domain name to be resolved belong to different top-level domains; In response to the first query request, an optimal authoritative domain name server is selected from the multiple second authoritative domain name servers, and the IP address of the optimal authoritative domain name server is sent to the local domain name server, so that the local domain name server sends a second query request to the optimal authoritative domain name server based on the IP address of the optimal authoritative domain name server; wherein the second query request is used to request to query the IP address corresponding to the first domain name to be resolved.

2. The method according to claim 1, It is characterized in that Before selecting the best authoritative domain name server from the plurality of second authoritative domain name servers, the method further includes: Obtaining target information of each of the plurality of second authoritative domain name servers for selecting the optimal authoritative domain name server; The selecting the best authoritative domain name server from the plurality of second authoritative domain name servers comprises: Based on the target information of each of the plurality of second authoritative domain name servers, an optimal authoritative domain name server is selected from the plurality of second authoritative domain name servers.

3. The method according to claim 2, It is characterized in that For any second authoritative domain name server among the plurality of second authoritative domain name servers, the target information of the second authoritative domain name server is the distance information between the second authoritative domain name server and the local domain name server; The selecting the best authoritative domain name server from the plurality of second authoritative domain name servers based on the respective target information of the plurality of second authoritative domain name servers comprises: Based on the distance information between each of the plurality of second authoritative domain name servers and the local domain name server, selecting an authoritative domain name server closest to the local domain name server from the plurality of second authoritative domain name servers; The authoritative domain name server closest to the local domain name server is determined as the optimal authoritative domain name server.

4. The method according to claim 2, It is characterized in that For any second authoritative domain name server among the plurality of second authoritative domain name servers, the target information of the second authoritative domain name server is the load information of the second authoritative domain name server; The selecting the best authoritative domain name server from the plurality of second authoritative domain name servers based on the respective target information of the plurality of second authoritative domain name servers comprises: Based on the load information of each of the plurality of second authoritative domain name servers, selecting an authoritative domain name server with the smallest load among the plurality of second authoritative domain name servers; The authoritative domain name server with the smallest load is determined as the optimal authoritative domain name server.

5. The method according to claim 2, It is characterized in that For any second authoritative domain name server among the plurality of second authoritative domain name servers, the target information of the second authoritative domain name server includes: distance information between the second authoritative domain name server and the local domain name server, and load information of the second authoritative domain name server; The selecting the best authoritative domain name server from the plurality of second authoritative domain name servers based on the respective target information of the plurality of second authoritative domain name servers comprises: Based on the distance information between each of the plurality of second authoritative domain name servers and the local domain name server, obtaining a distance score for each of the plurality of second authoritative domain name servers; wherein, for any second authoritative domain name server among the plurality of second authoritative domain name servers, the closer the distance information between the second authoritative domain name server and the local domain name server, the higher the distance score of the second authoritative domain name server; Based on the load information of each of the plurality of second authoritative domain name servers, a load score of each of the plurality of second authoritative domain name servers is obtained; wherein, for any second authoritative domain name server among the plurality of second authoritative domain name servers, the smaller the load of the second authoritative domain name server, the higher the load score of the second authoritative domain name server; Performing weighted summation on the distance scores and load scores of the plurality of second authoritative domain name servers to obtain the weighted summation scores of the plurality of second authoritative domain name servers; Selecting an authoritative domain name server with the highest weighted sum score from among the plurality of second authoritative domain name servers; The authoritative domain name server with the highest weighted sum score is determined as the optimal authoritative domain name server.

6. The method according to claim 2, It is characterized in that For any second authoritative domain name server among the plurality of second authoritative domain name servers, the target information of the second authoritative domain name server includes: distance information between the second authoritative domain name server and the local domain name server, and load information of the second authoritative domain name server; The selecting the best authoritative domain name server from the plurality of second authoritative domain name servers based on the respective target information of the plurality of second authoritative domain name servers comprises: Based on the respective target information of the plurality of second authoritative domain name servers, the priority of the distance information and the priority of the load information, an optimal authoritative domain name server is selected from the plurality of second authoritative domain name servers.

7. The method according to claim 6, It is characterized in that The priority of the distance information is higher than the priority of the load information; The selecting the optimal authoritative domain name server from the plurality of second authoritative domain name servers based on the respective target information of the plurality of second authoritative domain name servers, the priority of the distance information, and the priority of the load information comprises: In order of the distances between the plurality of second authoritative domain name servers and the local domain name server from small to large, selecting the first K1 authoritative domain name servers from the plurality of second authoritative domain name servers, where K1 is an integer greater than 1; Based on the load information of each of the first K1 authoritative domain name servers, selecting an authoritative domain name server with the smallest load among the first K1 authoritative domain name servers; The authoritative domain name server with the smallest load is determined as the optimal authoritative domain name server.

8. The method according to claim 6, It is characterized in that The priority of the load information is higher than the priority of the distance information; The selecting the optimal authoritative domain name server from the plurality of second authoritative domain name servers based on the respective target information of the plurality of second authoritative domain name servers, the priority of the distance information, and the priority of the load information comprises: Selecting first K2 authoritative domain name servers from the plurality of second authoritative domain name servers in ascending order of load of the plurality of second authoritative domain name servers, where K2 is an integer greater than 1; Based on the distance information between each of the first K2 authoritative domain name servers and the local domain name server, select an authoritative domain name server closest to the local domain name server from the first K2 authoritative domain name servers; The authoritative domain name server closest to the local domain name server is determined as the optimal authoritative domain name server.

9. The method according to any one of claims 2 to 8, It is characterized in that Before selecting the best authoritative domain name server from the plurality of second authoritative domain name servers based on the target information of each of the plurality of second authoritative domain name servers, the method further includes: If there is a faulty authoritative domain name server among the plurality of second authoritative domain name servers, the faulty authoritative domain name server is deleted from the plurality of second authoritative domain name servers.

10. A domain name resolution method, It is characterized in that The method is applied to a local domain name server, and the method comprises: Obtaining a public domain name corresponding to the first domain name to be resolved; wherein the public domain name is a public domain name of multiple second authoritative domain name servers; Sending a first query request to a first authoritative domain name server; wherein the first query request is used to request an IP address corresponding to the public domain name, and the public domain name and the first domain name to be resolved belong to different top-level domains; Receiving the IP address of the best authoritative domain name server among the plurality of second authoritative domain name servers sent by the first authoritative domain name server; Sending a second query request to the optimal authoritative domain name server based on the IP address of the optimal authoritative domain name server; wherein the second query request is used to request to query the IP address corresponding to the first domain name to be resolved; Receive the IP address corresponding to the first domain name to be resolved sent by the optimal authoritative domain name server.

11. The method according to claim 10, It is characterized in that The step of obtaining the public domain names of multiple second authoritative domain name servers corresponding to the first domain name to be resolved includes: Sending a third query request to the root domain name server, wherein the third query request is used to query the IP address of the first top-level domain name server corresponding to the first domain name to be resolved; Receive the IP address of the first top-level domain name server sent by the root domain name server; Sending a fourth query request to the first top-level domain name server based on the IP address of the first top-level domain name server; wherein the fourth query request is used to request to query the IP address corresponding to the first domain name to be resolved; Receive the public domain name sent by the first top-level domain name server.

12. The method according to claim 10 or 11, It is characterized in that Also includes: Receive a fifth query request, wherein the fifth query request is used to request to query the IP address corresponding to the second domain name to be resolved; In response to the fifth query request, sending the fifth query request to the optimal authoritative domain name server; Receive the IP address corresponding to the second domain name to be resolved sent by the optimal authoritative domain name server.

13. A domain name resolution device, It is characterized in that include: Communication module and processing module; The communication module is used to receive a first query request sent by a local domain name server; wherein the first query request is used to request to query the IP addresses corresponding to the public domain names of multiple second authoritative domain name servers, there is a corresponding relationship between the public domain names and the first domain name to be resolved, and the public domain name and the first domain name to be resolved belong to different top-level domains; The processing module is used for selecting an optimal authoritative domain name server from the plurality of second authoritative domain name servers in response to the first query request; The communication module is also used to send the IP address of the optimal authoritative domain name server to the local domain name server, so that the local domain name server sends a second query request to the optimal authoritative domain name server based on the IP address of the optimal authoritative domain name server; wherein the second query request is used to request to query the IP address corresponding to the first domain name to be resolved.

14. A domain name resolution device, It is characterized in that include: Communication modules for: Obtaining a public domain name corresponding to the first domain name to be resolved; wherein the public domain name is a public domain name of multiple second authoritative domain name servers; Sending a first query request to a first authoritative domain name server; wherein the first query request is used to request an IP address corresponding to the public domain name, and the public domain name and the first domain name to be resolved belong to different top-level domains; Receiving the IP address of the best authoritative domain name server among the plurality of second authoritative domain name servers sent by the first authoritative domain name server; Sending a second query request to the optimal authoritative domain name server based on the IP address of the optimal authoritative domain name server; wherein the second query request is used to request to query the IP address corresponding to the first domain name to be resolved; Receive the IP address corresponding to the first domain name to be resolved sent by the optimal authoritative domain name server.

15. A domain name resolution system, It is characterized in that include: A local domain name server, a first authoritative domain name server, and a plurality of second authoritative domain name servers; The local domain name server is used to: Obtaining a public domain name corresponding to the first domain name to be resolved; wherein the public domain name is a public domain name of multiple second authoritative domain name servers, and the public domain name and the first domain name to be resolved belong to different top-level domains; Sending a first query request to a first authoritative domain name server; wherein the first query request is used to request an IP address corresponding to the public domain name; The first authoritative domain name server is used to: select an optimal authoritative domain name server from the plurality of second authoritative domain name servers in response to the first query request, and send the IP address of the optimal authoritative domain name server to the local domain name server; The local domain name server is also used for: Sending a second query request to the optimal authoritative domain name server based on the IP address of the optimal authoritative domain name server; wherein the second query request is used to request to query the IP address corresponding to the first domain name to be resolved; Receive the IP address corresponding to the first domain name to be resolved sent by the optimal authoritative domain name server.

16. An electronic device, It is characterized in that include: A processor and a memory, the memory being used to store a computer program, and the processor being used to call and run the computer program stored in the memory to execute the method according to any one of claims 1 to 12.

17. A computer-readable storage medium, It is characterized in that Used to store a computer program, the computer program causing a computer to execute the method according to any one of claims 1 to 12.

18. A computer program product comprising a computer program / instructions, It is characterized in that When the computer program / instructions are executed by a processor, the method according to any one of claims 1 to 12 is implemented.