Domain name addressing method and device, and computer storable medium
By determining the service address with the best network service quality among multiple service addresses in a dual-stack network environment, the poor service quality caused by the client's priority selection of IPv6 is solved, and the network service quality and user experience are improved.
Patent Information
- Application Number
- CN202010563774.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-06-19
- Publication Date
- 2024-11-01
- Estimated Expiration
- 2040-06-19
AI Technical Summary
In a dual-stack network environment, the client's priority selection of IPv6 service addresses may lead to poor network service quality and affect user experience.
By receiving the client's domain name request, the service address with the best network service quality among multiple service addresses is determined, and the target service address is provided to the client based on the address to improve the network service quality.
Improve network service quality and user experience, and avoid poor service quality caused by imperfect IPv6 network construction.
Smart Images

Figure CN113824805B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to a domain name addressing method and device, and a computer storable medium. Background Art
[0002] DNS (Domain Name System) provides an important service on the Internet. The essence of DNS is to build a bridge between the world of human names and the underlying world of binary protocol addresses. DNS resolution is based on UDP (User Datagram Protocol) and is implemented using geographically distributed recursive resolvers with caching functions. When a client program needs to access a domain name, the first step is to find the service address corresponding to the domain name through the DNS resolution process. The service address is also called the server address. When the server has a dual-stack network, the domain name may correspond to both the IPv4 (Internet Protocol Version 4) service address and the IPv6 (Internet Protocol Version 6) service address.
[0003] In the related art, in a dual-stack environment, IPv6 service addresses are usually preferred to access domain names. Summary of the invention
[0004] The inventor believes that: related technology, since the current IPv6-based network construction is still imperfect, the IPv6 service address preferentially selected by the client may not bring a better user experience, and may even be much worse than the service quality provided by the IPv4 address, resulting in poor network service quality and user experience.
[0005] In view of the above technical problems, the present disclosure proposes a solution to improve network service quality and user experience.
[0006] According to a first aspect of the present disclosure, a domain name addressing method is provided, comprising: receiving a first domain name request from a client, the first domain name request comprising a domain name to be addressed and a first domain name record type; determining a service address with the best network service quality among multiple service addresses corresponding to the domain name to be addressed as the optimal service address, the multiple service addresses comprising a first service address corresponding to the first domain name record type and a second service address corresponding to a second domain name record type; determining a target service address providing network service for the domain name to be addressed according to the optimal service address; and sending the target service address to the client.
[0007] In some embodiments, determining a service address with the best network service quality among multiple service addresses corresponding to the domain name to be addressed as the best service address includes: obtaining a first service address with the best network service quality and a second service address with the best network service quality corresponding to the domain name to be addressed; and determining the best service address based on the network service quality information of the first service address with the best network service quality and the network service quality information of the second service address with the best network service quality.
[0008] In some embodiments, determining the target service address for providing network services for the domain name to be addressed includes: determining the target service address for providing network services for the domain name to be addressed according to the domain name record type corresponding to the optimal service address.
[0009] In some embodiments, according to the domain name record type corresponding to the optimal service address, determining the target service address for providing network services for the domain name to be addressed includes:
[0010] In a case where the domain name record type corresponding to the optimal service address is a first domain name record type, a target service address is determined according to the first service address with the best network service quality; in a case where the domain name record type corresponding to the optimal service address is a second domain name record type, whether a second domain name request from the client is received within a preset time is monitored, and the target service address is determined according to the monitoring result, the second domain name request including the domain name to be addressed and the second domain name record type.
[0011] In some embodiments, determining the target service address based on the monitoring results includes: when the monitoring result is that the second domain name request is received within a preset time, determining the target service address based on the second service address with the best network service quality; when the monitoring result is that the second domain name request is not received within the preset time, determining the target service address based on the first service address with the best network service quality.
[0012] In some embodiments, sending the target service address to the client includes: when the domain name record type corresponding to the optimal service address is a second domain name record type and a monitoring result is that a second domain name request is received from the client within a preset time, sending a response message including the target service address to the client for the second domain name request, and sending an empty response message to the client for the first domain name request.
[0013] In some embodiments, sending the target service address to the client includes: when the domain name record type corresponding to the optimal service address is a second domain name record type and a monitoring result is that no second domain name request is received from the client within a preset time, sending a response message including the target service address to the client for the first domain name request.
[0014] In some embodiments, sending the target service address to the client includes: when the domain name record type corresponding to the optimal service address is a first domain name record type, sending a response message including the target service address to the client for the first domain name request.
[0015] In some embodiments, sending the target service address to the client includes:
[0016] When the domain name record type corresponding to the optimal service address is the first domain name record type, whether the second domain name request is received is monitored within a preset time; when the second domain name request is monitored, an empty response message is sent to the client for the second domain name request.
[0017] In some embodiments, obtaining a first service address with the best network service quality and a second service address with the best network service quality corresponding to the domain name to be addressed includes: determining whether the domain name to be addressed hits the local DNS cache; if the domain name to be addressed hits the local DNS cache, obtaining the first service address with the best network service quality and the second service address with the best network service quality from the local DNS cache; if the domain name to be addressed does not hit the local DNS cache, performing domain name resolution on the domain name to be addressed to obtain the first service address and the second service address, and performing network service quality detection on the first service address and the second service address respectively to obtain the first service address and the second service address with the best network service quality.
[0018] In some embodiments, the domain name to be addressed belongs to a specified domain name list.
[0019] In some embodiments, the designated domain name list includes multiple domain names, and the domain name addressing method also includes: before receiving the first domain name request, performing domain name resolution on each domain name to obtain the first service address and the second service address of each domain name; storing the first service address and the second service address of each domain name in the local domain name system DNS cache.
[0020] In some embodiments, the domain name addressing method also includes: for each of the domain names, periodically monitoring whether the survival time of the first service address and the second service address in the local DNS cache is less than a preset threshold; if the survival time is less than the preset threshold, re-performing domain name resolution for each of the domain names.
[0021] In some embodiments, the designated domain name list includes multiple domain names, and the domain name addressing method also includes: before receiving a first domain name request from a client, obtaining a first service address and a second service address for each domain name; performing network service quality detection on the first service address and the second service address of each domain name respectively to obtain the first service address with the best network service quality and the second service address with the best network service quality.
[0022] In some embodiments, performing network service quality detection on the first service address and the second service address of each domain name includes: periodically performing network service quality detection on the first service address and the second service address.
[0023] According to a second aspect of the present disclosure, a domain name addressing device is provided, comprising: a receiving module, configured to receive a first domain name request from a client, the first domain name request comprising a domain name to be addressed and a first domain name record type; a first determining module, configured to determine a service address with the best network service quality among multiple service addresses corresponding to the domain name to be addressed as the optimal service address, the multiple service addresses comprising a first service address corresponding to the first domain name record type and a second service address corresponding to the second domain name record type; a second determining module, configured to determine a target service address providing network service for the domain name to be addressed based on the optimal service address; and a sending module, configured to send the target service address to the client.
[0024] According to a third aspect of the present disclosure, a domain name addressing device is provided, comprising: a memory; and a processor coupled to the memory, wherein the processor is configured to execute the domain name addressing method described in any of the above embodiments based on instructions stored in the memory.
[0025] According to a fourth aspect of the present disclosure, a computer storable medium is provided, on which computer program instructions are stored, and when the instructions are executed by a processor, the domain name addressing method described in any of the above embodiments is implemented.
[0026] In the above embodiments, the network service quality and user experience are improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] The accompanying drawings, which constitute a part of the specification, illustrate embodiments of the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0028] The present disclosure may be more clearly understood from the following detailed description with reference to the accompanying drawings, in which:
[0029] Figure 1a is a flow chart illustrating a domain name addressing method according to some embodiments of the present disclosure;
[0030] Figure 1b is a flowchart illustrating a domain name addressing method according to other embodiments of the present disclosure;
[0031] Figure 2 is a block diagram illustrating a domain name addressing system according to some embodiments of the present disclosure;
[0032] Figure 3 is a flow chart showing how to obtain a first service address with the best network service quality and a second service address with the best network service quality corresponding to a domain name to be addressed according to some embodiments of the present disclosure;
[0033] Figure 4 is a flow chart illustrating determining a target service address according to monitoring results according to some embodiments of the present disclosure;
[0034] Figure 5 is a block diagram showing a domain name addressing device according to some embodiments of the present disclosure;
[0035] Figure 6 is a block diagram showing a domain name addressing device according to some other embodiments of the present disclosure;
[0036] Figure 7 is a block diagram illustrating a computer system for implementing some embodiments of the present disclosure. DETAILED DESCRIPTION
[0037] Various exemplary embodiments of the present disclosure will now be described in detail with reference to the accompanying drawings. It should be noted that the relative arrangement of components and steps, numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present disclosure unless otherwise specifically stated.
[0038] At the same time, it should be understood that for the convenience of description, the sizes of the various parts shown in the drawings are not drawn according to the actual proportional relationship.
[0039] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the present disclosure, its application, or uses.
[0040] Technologies, methods, and equipment known to ordinary technicians in the relevant art may not be discussed in detail, but where appropriate, the technologies, methods, and equipment should be considered as part of the specification.
[0041] In all examples shown and discussed herein, any specific values should be interpreted as merely exemplary and not as limiting. Therefore, other examples of the exemplary embodiments may have different values.
[0042] It should be noted that like reference numerals and letters refer to similar items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.
[0043] The following will be combined Figure 1a , Figure 1b and Figure 2 The domain name addressing method of some embodiments of the present disclosure is described in detail.
[0044] Figure 1a is a flowchart illustrating a domain name addressing method according to some embodiments of the present disclosure.
[0045] Figure 1b is a flowchart illustrating a domain name addressing method according to some other embodiments of the present disclosure.
[0046] Figure 2 is a block diagram illustrating a domain name addressing system according to some embodiments of the present disclosure.
[0047] like Figure 1a As shown, the domain name addressing method includes: step S10, receiving a first domain name request from a client; step S20, determining an optimal service address; step S30, determining a target service address based on the optimal service address; step S40, sending the target service address to the client.
[0048] In step S10, a first domain name request is received from a client, wherein the first domain name request includes a domain name to be addressed and a first domain name record type.
[0049] For example, by Figure 2 The best response module 211 in the load balancing program 21 of the domain name addressing system 2 receives the first domain name request from the client 22. In some embodiments, Figure 2 The load balancing program 21 is deployed on at least one server. For example, the client includes but is not limited to Google Chrome.
[0050] In some embodiments, the first domain name record type is an A domain name record type or an AAAA domain name record type. In some embodiments, the domain name to be addressed belongs to a specified domain name list. For example, the specified domain name list includes multiple domain names. In some embodiments, the specified domain name list belongs to a key domain name list.
[0051] For example, specifying a list of domain names by Figure 2The configuration loading module 212 in the load balancing program 21 in the server reads the configuration file of the specified domain name list from the specified configuration file path, and stores the specified domain name list in the memory of the server. In some embodiments, when the load balancing program 21 is started or initialized, the configuration loading module 212 performs the operation of reading the configuration file. For example, the specified domain name list is stored in the memory of the server in a red-black tree data structure.
[0052] In some embodiments, the domain name addressing method further includes: Figure 1b Steps S1-S2 are shown. For example, steps S1-S2 are pre-fetch operations. In some embodiments, steps S1-S2 are performed before receiving the first domain name request.
[0053] In step S1, domain name resolution is performed on each domain name in the specified domain name list to obtain a first service address and a second service address of each domain name. For example, the first service address and the second service address are an IPV4 service address and an IPV6 service address, respectively.
[0054] For example, after the configuration loading module 212 performs the operation of reading the configuration file, it immediately sends a domain name resolution request for each domain name in the specified domain name list to the domain name recursion module 213. In response to each domain name resolution request, Figure 2 The domain name recursion module 213 of the load balancing program 21 sends a domain name recursion query request to the recursion service program 23. The recursion service program 23 obtains the first service address and the second service address of each domain name through query, and sends them to the domain name recursion module 213.
[0055] In some embodiments, the recursive service program 23 also obtains the time to live (TTL) of the first service address and the second service address of each domain name, and sends it to the domain name recursive module 213 .
[0056] In step S2, the first service address and the second service address of each domain name are stored in the local DNS cache. Through the pre-fetch operation, the efficiency of domain name addressing can be improved, and the user experience can be further improved.
[0057] For example, by Figure 2 The domain name recursion module 213 in the local DNS cache 215 stores the first service address and the second service address of each domain name. Figure 2The domain name recursion module 213 in the local DNS cache 215 also stores the first service address and the second service address of each domain name in the expiration time. For example, in the local DNS cache, the corresponding relationship between the domain name, the domain name record type, the service address and the expiration time is stored. The corresponding relationship is the domain name record data. In some embodiments, the corresponding relationship also includes an IN parameter. The IN parameter indicates that the type of the domain name is a .in domain name.
[0058] In some embodiments, each domain name in the specified domain name list has a cache node in the local DNS cache, and the corresponding relationship between the domain name, the domain name record type, the service address and the survival time is stored in the cache node.
[0059] In some embodiments, for each cache node, the first domain name record type and the second domain name record type correspond to a cache child node respectively. For example, a domain name in the specified domain name list is www.example.com. The IPv4 service addresses mapped to the domain name are 10.17.50.1 and 10.17.50.2. The IPv6 service addresses mapped to the domain name are 240e:eb:8001::8c2e:9024:6510 and 240e:eb:8001::8c2e:9024:6511. That is, on the authorization server, 4 service addresses are configured for the domain name, 2 IPv4 service addresses and 2 IPv6 service addresses.
[0060] For example, the corresponding relationships stored in the first cache child node of the cache node of the domain name include www.example.com.IN A 10.17.50.1 and www.example.com.IN A 10.17.50.2. The corresponding relationships stored in the second cache child node of the cache node of the domain name include www.example.com.IN AAAA 240e:eb:8001::8c2e:9024:6510 and www.example.com.IN AAAA 240e:eb:8001::8c2e:9024:6511.
[0061] In some embodiments, the domain name addressing method further includes: Figure 1b Steps S3-S4 are shown.
[0062] In step S3, for each domain name, periodically monitor whether the lifetime of the first service address and the second service address in the local DNS cache is less than a preset threshold. Figure 2 The service quality detection module 214 periodically monitors whether the survival time of the first service address and the second service address of each domain name in the local DNS cache is less than a preset threshold.
[0063] When the survival time is less than the preset threshold, step S4 is executed. In step S4, each domain name is re-resolved. By continuously monitoring the survival time, the efficiency of domain name addressing can be improved, and the time waste caused by re-triggering domain name resolution due to expiration of domain name records can be avoided, thereby further improving the user experience.
[0064] For example, by Figure 2 The service quality detection module 214 resends the domain name resolution request of the domain name to the domain name recursion module 213. Then, the domain name recursion module 213 sends the recursive query request of the domain name to the recursive service program 23 to implement the operation of re-resolving the domain name.
[0065] In some embodiments, when the survival time is greater than or equal to a preset threshold, no operation is performed.
[0066] In some embodiments, the domain name addressing method further includes: Figure 1b Steps S5-S6 are shown in FIG. 1 . For example, steps S5-S6 are performed before receiving the first domain name request. In some embodiments, Figure 2 The service quality detection module 214 executes steps S5 and S6.
[0067] In step S5, the first service address and the second service address of each domain name in the specified domain name list are obtained.
[0068] For example, determine whether each domain name hits the cache.
[0069] If the first service address and the second service address of each domain name exist in the local DNS cache, and the lifetime of the first service address and the second service address of each domain name is greater than or equal to a preset threshold, it is determined that each domain name hits the local DNS cache. If each domain name hits the local DNS cache, the first service address and the second service address of each domain name are obtained from the local DNS cache.
[0070] In the case that the first service address and the second service address of each domain name do not exist in the local DNS cache or the lifetime of the first service address and the second service address of each domain name is less than a preset threshold, it is determined that each domain name does not hit the local DNS cache. In the case that each domain name does not hit the local DNS cache, Figure 1b The pre-fetching operation of step S1 to step S2 shown obtains the first service address and the second service address of each domain name.
[0071] In step S6, the first service address and the second service address of each domain name are respectively tested for network service quality to obtain the first service address with the best network service quality and the second service address with the best network service quality. For example, the type of network service quality test includes at least one of UDP test, TCP (Transmission Control Protocol) test, HTTP (Hyper Text Transfer Protocol) test, and HTTPS (Hyper Text Transfer Protocol over Secure Socket Layer) test.
[0072] In some embodiments, by respectively Figure 2 The servers corresponding to the first service address and the second service address in the service cluster 24 send message requests corresponding to the type of network service quality detection to detect the network service quality of the servers corresponding to different service addresses. Since different domain names correspond to different service types, the service ports provided to the outside are also uncertain. Therefore, before performing network service quality detection on a domain name, it is necessary to specify the service port by configuration, and the server of the domain name can support the configuration of a specific service type. For example, the service port of the server providing DNS service is configured to 53, and the type of network service quality detection is configured to TCP detection.
[0073] The following will take TCP detection as an example to illustrate the process of performing network service quality detection on a DNS server.
[0074] For server accessibility testing, Figure 2 The service quality detection module 214 sends a TCP connection request to the server cluster 24. If the connection fails, it is considered unreachable. If the service type provided by the domain name is not specified, it is only necessary to compare the delay of the reachability detection between different service addresses.
[0075] For the detection of service delay, when the service type of the domain name in the specified domain name list is configured and the accessibility verification passes, the service request of the service type continues to be sent to the server cluster 24. The service type here is specified by configuration, and finally the access delay of each service address is compared.
[0076] It should be understood that among all types of network service quality detection, UDP detection is relatively special. Due to the unreliability and lack of connectivity of UDP, it is necessary to combine ICMP (Internet Control Message Protocol) to implement network service quality detection.
[0077] For example, the accessibility and delay of each first service address and each second service address of each domain name are detected respectively to obtain the network service quality of each first service address and each second service address of each domain name. In some embodiments, the shorter the delay, the better the network service quality, and the better the accessibility, the better the network service quality. According to this standard, the first service address with the best network service quality and the second service address with the best network service quality can be determined.
[0078] In some embodiments, for each domain name in the specified list of domain names, Figure 2 The first cache node and the second cache node of the cache node in the local DNS cache 215 respectively store the correspondence between the first service address with the best network service quality and the delay, and the correspondence between the second service address with the best network service quality and the delay.
[0079] In some embodiments, the first service address and the second service address are periodically tested for network service quality. By periodically testing the first service address and the second service address for network service quality, it is possible to ensure that the acquired optimal service address is the latest, improve the accuracy of network service quality testing, and further improve the accuracy of domain name addressing, thereby further improving network service quality and user experience.
[0080] For example, after receiving the first domain name request from the client, it is determined whether the domain name to be addressed belongs to the specified domain name list. In the case that the domain name to be addressed does not belong to the specified domain name list, the domain name to be addressed is resolved using the existing domain name resolution technology to obtain the service address corresponding to the domain name to be addressed, and at least one service address is selected using the existing strategy and returned to the client. In the case that the domain name to be addressed belongs to the specified domain name list, step S20 is executed.
[0081] return Figure 1a After receiving the first domain name request from the client, execute step S20.
[0082] In step S20, a service address with the best network service quality among multiple service addresses corresponding to the domain name to be addressed is determined as the best service address. The multiple service addresses include a first service address corresponding to the first domain name record type and a second service address corresponding to the second domain name record type. Figure 2The best response module 211 in determines the best service address.
[0083] For example, by Figure 1b Steps S21-S22 shown in FIG. Figure 1a In step S20, a service address with the best network service quality among multiple service addresses corresponding to the domain name to be addressed is determined as the optimal service address.
[0084] In step S21, a first service address with the best network service quality and a second service address with the best network service quality corresponding to the domain name to be addressed are obtained.
[0085] For example, by Figure 3 Steps S211 to S214 in the Figure 1b Step S21.
[0086] Figure 3 The present invention is a flowchart showing how to obtain a first service address with the best network service quality and a second service address with the best network service quality corresponding to a domain name to be addressed according to some embodiments of the present disclosure.
[0087] like Figure 3 As shown, obtaining the first service address with the best network service quality and the second service address with the best network service quality corresponding to the domain name to be addressed includes step S211 and step S214.
[0088] In step S211, it is determined whether the domain name to be addressed hits the local DNS cache.
[0089] When the domain name to be addressed hits the local DNS cache, step S212 is executed.
[0090] In step S212, a first service address with the best network service quality and a second service address with the best network service quality are obtained from the local DNS cache.
[0091] When the domain name to be addressed does not hit the local DNS cache, step S213-step S214 is executed.
[0092] In step S213, the domain name to be addressed is resolved to obtain the first service address and the second service address. Figure 2 The best response module 211 triggers the domain name recursion module 213 to initiate a recursive query request to the recursive service program 23 to implement the domain name resolution process for the addressing domain name.
[0093] In step S214, the first service address and the second service address are respectively tested for network service quality to obtain the first service address with the best network service quality and the second service address with the best network service quality. Figure 2 The service quality detection module 214 performs network service quality detection on the first service address and the second service address respectively.
[0094] return Figure 1b After obtaining the first service address with the best network service quality and the second service address with the best network service quality corresponding to the domain name to be addressed, execute step S22.
[0095] In step S22, the best service address is determined based on the network service quality information of the first service address with the best network service quality and the network service quality information of the second service address with the best network service quality. Figure 2 The best response module 211 determines the best service address according to the network service quality information of the first service address with the best network service quality and the network service quality information of the second service address with the best network service quality.
[0096] return Figure 1a After determining the service address with the best network service quality among multiple service addresses corresponding to the domain name to be addressed as the optimal service address, execute step S30.
[0097] In step S30, the target service address providing network service for the domain name to be addressed is determined according to the optimal service address. Figure 2 The best response module 211 in the embodiment determines a target service address that provides network services for the domain name to be addressed.
[0098] In some embodiments, a target service address that provides network services for the domain name to be addressed is determined based on the domain name record type corresponding to the optimal service address.
[0099] For example, by Figure 1b Steps S31 to S34 in the embodiment are used to determine the target service address for providing network services for the domain name to be addressed according to the domain name record type corresponding to the optimal service address.
[0100] In step S31, it is determined whether the domain name record type corresponding to the optimal service address is the first domain name record type or the second domain name record type.
[0101] When the domain name record type corresponding to the optimal service address is the first domain name record type, step S32 is executed.
[0102] In step S32, a target service address is determined according to the first service address with the best network service quality.
[0103] When the domain name record type corresponding to the optimal service address is the first domain name record type, step S33-step S34 is executed.
[0104] In step S33, it is monitored whether a second domain name request from the client is received within a preset time, for example, the preset time is 5 milliseconds.
[0105] In step S34, the target service address is determined according to the monitoring result. The second domain name request includes the domain name to be addressed and the second domain name record type.
[0106] For example, by Figure 4 Step S34 is implemented in the manner shown.
[0107] Figure 4 is a flowchart illustrating determining a target service address based on monitoring results according to some embodiments of the present disclosure.
[0108] like Figure 4 As shown, determining the target service address according to the monitoring result includes steps S341 to S343.
[0109] In step S341, it is determined whether a second domain name request is received within the predicted time according to the monitoring result.
[0110] When the monitoring result is that the second domain name request is received within the preset time, step S342 is executed.
[0111] In step S342, the target service address is determined according to the second service address with the best network service quality. For example, the target service address is determined according to the second service address with the best network service quality.
[0112] If the monitoring result is that no second domain name request is received within the preset time, step S343 is executed.
[0113] In step S343, the target service address is determined according to the first service address with the best network service quality. For example, the target service address is determined according to the first service address with the best network service quality.
[0114] return Figure 1a After determining the target service address that provides network services for the domain name to be addressed according to the optimal service address, execute step S40.
[0115] In step S40, the target service address is sent to the client. Figure 2 The best response module in sends the target service address to the client.
[0116] In some embodiments, when the domain name record type corresponding to the optimal service address is the first domain name record type, for the first domain name request, a response message including the target service address is sent to the client.
[0117] For example, in the case where the domain name record type corresponding to the best service address is the first domain name record type, after determining the target service address according to the first service address with the best network service quality, a response message including the first service address with the best network service quality is sent to the client. In some embodiments, there are multiple first service addresses with the best network service quality, and a response message including any one of the first service addresses with the best network service quality is sent to the client.
[0118] In some embodiments, when the domain name record type corresponding to the optimal service address is the first domain name record type, within a preset time, it is monitored whether a second domain name request is received. When the second domain name request is detected, an empty response message is sent to the client for the second domain name request.
[0119] In some embodiments, when the domain name record type corresponding to the optimal service address is a second domain name record type and the monitoring result is that a second domain name request is received from the client within a preset time, a response message including the target service address is sent to the client for the second domain name request, and an empty response message is sent to the client for the first domain name request.
[0120] For example, in the case where the domain name record type corresponding to the best service address is the second domain name record type and the monitoring result is that a second domain name request is received from the client within a preset time, after determining the target service address according to the second service address with the best network service quality, a response message including the second service address with the best network service quality is sent to the client. In some embodiments, there are multiple second service addresses with the best network service quality, and a response message including any one of the second service addresses with the best network service quality is sent to the client.
[0121] In some embodiments, when the domain name record type corresponding to the optimal service address is a second domain name record type and the monitoring result is that no second domain name request is received from the client within a preset time, a response message including the target service address is sent to the client for the first domain name request.
[0122] For example, when the domain name record type corresponding to the best service address is the second domain name record type and the monitoring result is that no second domain name request is received from the client within the preset time, after determining the target service address according to the first service address with the best network service quality, a response message including the first service address with the best network service quality is sent to the client. In some embodiments, there are multiple first service addresses with the best network service quality, and a response message including any one of the first service addresses with the best network service quality is sent to the client.
[0123] The present invention obtains the service address with the best network service quality of different domain name record types as the best service address by making a domain name request for a certain domain name record type, and determines the target service address according to the best service address, thereby comprehensively considering the network service quality of service addresses of different domain name record types and improving the network service quality and user experience.
[0124] In addition, after providing the best response result to the client, it can also avoid the problem of multiple browser reconnections due to poor network service quality. It not only reduces the waste of network resources, but also improves the user experience, which is of great positive significance for the promotion and popularization of IPV6.
[0125] Figure 5 is a block diagram illustrating a domain name addressing device according to some embodiments of the present disclosure.
[0126] like Figure 5 As shown, the domain name addressing device 51 includes a receiving module 511, a first determining module 512, a second determining module 513 and a sending module 514. For example, the domain name addressing device 51 includes Figure 2 The load balancing program 21 is shown.
[0127] The receiving module 511 is configured to receive a first domain name request from a client, for example, by executing Figure 1a In step S10, the first domain name request includes the domain name to be addressed and the first domain name record type.
[0128] The first determination module 512 is configured to determine a service address with the best network service quality among multiple service addresses corresponding to the domain name to be addressed as the optimal service address, for example, by performing the following steps: Figure 1a In step S20, the plurality of service addresses include a first service address corresponding to the first domain name record type and a second service address corresponding to the second domain name record type.
[0129] The second determination module 513 is configured to determine the target service address that provides network services for the domain name to be addressed according to the optimal service address, for example, by performing the following steps: Figure 1a Step S30 is shown.
[0130] The sending module 514 is configured to send the target service address to the client, for example, by executing Figure 1a Step S40 is shown.
[0131] Figure 6 is a block diagram showing a domain name addressing device according to some other embodiments of the present disclosure.
[0132] like Figure 6As shown, the domain name addressing device 61 includes a memory 611; and a processor 612 coupled to the memory 611. The memory 611 is used to store instructions for executing the domain name addressing method corresponding to the embodiment. The processor 612 is configured to execute the domain name addressing method in any of the embodiments of the present disclosure based on the instructions stored in the memory 611.
[0133] Figure 7 is a block diagram illustrating a computer system for implementing some embodiments of the present disclosure.
[0134] like Figure 7 As shown, the computer system 70 may be embodied in the form of a general-purpose computing device. The computer system 70 includes a memory 710, a processor 720, and a bus 700 that connects the various system components.
[0135] The memory 710 may include, for example, a system memory, a non-volatile storage medium, etc. The system memory may store, for example, an operating system, an application program, a boot loader, and other programs. The system memory may include a volatile storage medium, such as a random access memory (RAM) and / or a cache memory. The non-volatile storage medium may store, for example, instructions for executing at least one of the corresponding embodiments of the domain name addressing method. The non-volatile storage medium includes, but is not limited to, a disk memory, an optical memory, a flash memory, etc.
[0136] The processor 720 can be implemented by a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistors, etc. Discrete hardware components. Accordingly, each module such as the judgment module and the determination module can be implemented by a central processing unit (CPU) running instructions in a memory that execute corresponding steps, or can be implemented by a dedicated circuit that executes corresponding steps.
[0137] The bus 700 may use any of a variety of bus architectures, including, but not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MCA) bus, and a Peripheral Component Interconnect (PCI) bus.
[0138] The computer system 70 may also include an input / output interface 730, a network interface 740, a storage interface 750, etc. These interfaces 730, 740, 750, the memory 710, and the processor 720 may be connected via a bus 700. The input / output interface 730 may provide a connection interface for input / output devices such as a display, a mouse, and a keyboard. The network interface 740 may provide a connection interface for various networked devices. The storage interface 750 may provide a connection interface for external storage devices such as a floppy disk, a USB flash drive, and an SD card.
[0139] Here, various aspects of the present disclosure are described with reference to flowcharts and / or block diagrams of methods, devices, and computer program products according to embodiments of the present disclosure. It should be understood that each frame of the flowchart and / or block diagram and the combination of frames can be implemented by computer-readable program instructions.
[0140] These computer-readable program instructions may be provided to a processor of a general-purpose computer, a special-purpose computer or other programmable device to produce a machine, so that the processor executes the instructions to produce means for implementing the functions specified in one or more blocks in the flowchart and / or block diagram.
[0141] These computer-readable program instructions may also be stored in a computer-readable memory, which cause the computer to work in a specific manner to produce an article of manufacture, including instructions for implementing the functions specified in one or more blocks in the flowchart and / or block diagram.
[0142] The present disclosure can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects.
[0143] The domain name addressing method and device, and computer storable medium in the above-mentioned embodiments improve the network service quality and user experience.
[0144] So far, the domain name addressing method and device, and computer storable medium according to the present disclosure have been described in detail. In order to avoid obscuring the concept of the present disclosure, some details known in the art are not described. Based on the above description, those skilled in the art can fully understand how to implement the technical solution disclosed here.
Claims
1. A domain name addressing method, include: Receiving a first domain name request from a client, wherein the first domain name request includes a domain name to be addressed and a first domain name record type; Determining a service address with the best network service quality among a plurality of service addresses corresponding to the domain name to be addressed as the best service address, wherein the plurality of service addresses include a first service address corresponding to the first domain name record type and a second service address corresponding to the second domain name record type, including: acquiring the first service address with the best network service quality and the second service address with the best network service quality corresponding to the domain name to be addressed; determining the best service address according to network service quality information of the first service address with the best network service quality and network service quality information of the second service address with the best network service quality; Determining, according to the optimal service address, a target service address that provides network services for the domain name to be addressed, including: when the domain name record type corresponding to the optimal service address is a first domain name record type, determining the target service address according to the first service address with the best network service quality; when the domain name record type corresponding to the optimal service address is a second domain name record type, monitoring whether a second domain name request from the client is received within a preset time, and determining the target service address according to the monitoring result, the second domain name request including the domain name to be addressed and the second domain name record type; Send the target service address to the client.
2. The domain name addressing method according to claim 1, in, According to the monitoring results, the target service addresses are determined to include: If the monitoring result is that the second domain name request is received within a preset time, determining the target service address according to the second service address with the best network service quality; When the monitoring result is that the second domain name request is not received within the preset time, the target service address is determined according to the first service address with the best network service quality.
3. The domain name addressing method according to claim 1, in, Sending the target service address to the client includes: When the domain name record type corresponding to the optimal service address is a second domain name record type and the monitoring result is that a second domain name request is received from the client within a preset time, a response message including a target service address is sent to the client for the second domain name request, and an empty response message is sent to the client for the first domain name request.
4. The domain name addressing method according to claim 1, in, Sending the target service address to the client includes: When the domain name record type corresponding to the optimal service address is a second domain name record type and a monitoring result is that no second domain name request is received from the client within a preset time, a response message including a target service address is sent to the client for the first domain name request.
5. The domain name addressing method according to claim 1, in, Sending the target service address to the client includes: In a case where the domain name record type corresponding to the optimal service address is the first domain name record type, a response message including the target service address is sent to the client for the first domain name request.
6. The domain name addressing method according to claim 5, in, Sending the target service address to the client further includes: In a case where the domain name record type corresponding to the optimal service address is a first domain name record type, monitoring whether the second domain name request is received within a preset time; In case the second domain name request is detected, an empty response message is sent to the client for the second domain name request.
7. The domain name addressing method according to claim 1, in, Acquiring a first service address with the best network service quality and a second service address with the best network service quality corresponding to the domain name to be addressed includes: Determine whether the domain name to be addressed hits the local DNS cache; When the domain name to be addressed hits the local DNS cache, obtaining a first service address with the best network service quality and a second service address with the best network service quality from the local DNS cache; When the domain name to be addressed does not hit the local DNS cache, domain name resolution is performed on the domain name to obtain a first service address and a second service address, and network service quality detection is performed on the first service address and the second service address respectively to obtain the first service address with the best network service quality and the second service address with the best network service quality.
8. The domain name addressing method according to claim 1, in, The domain name to be addressed belongs to a specified domain name list.
9. The domain name addressing method according to claim 8, in, The designated domain name list includes a plurality of domain names, and the domain name addressing method further includes: Before receiving the first domain name request, performing domain name resolution on each domain name to obtain a first service address and a second service address of each domain name; The first service address and the second service address of each domain name are stored in a local domain name system DNS cache.
10. The domain name addressing method according to claim 9, further comprising: include: For each domain name, periodically monitor whether the survival time of the first service address and the second service address in the local DNS cache is less than a preset threshold; When the survival time is less than a preset threshold, domain name resolution is performed again on each domain name.
11. The domain name addressing method according to claim 8, in, The designated domain name list includes multiple domain names, and the domain name addressing method further includes: Before receiving a first domain name request from a client, obtaining a first service address and a second service address for each domain name; The first service address and the second service address of each domain name are respectively tested for network service quality to obtain the first service address with the best network service quality and the second service address with the best network service quality.
12. The domain name addressing method according to claim 11, in, Performing network service quality detection on the first service address and the second service address of each domain name respectively includes: Periodically perform network service quality detection on the first service address and the second service address respectively.
13. A domain name addressing device, include: A receiving module is configured to receive a first domain name request from a client, wherein the first domain name request includes a domain name to be addressed and a first domain name record type; The first determination module is configured to determine a service address with the best network service quality among a plurality of service addresses corresponding to the domain name to be addressed as the best service address, wherein the plurality of service addresses include a first service address corresponding to the first domain name record type and a second service address corresponding to the second domain name record type, including: obtaining the first service address with the best network service quality and the second service address with the best network service quality corresponding to the domain name to be addressed; and determining the best service address according to network service quality information of the first service address with the best network service quality and network service quality information of the second service address with the best network service quality; The second determination module is configured to determine, according to the optimal service address, a target service address that provides network services for the domain name to be addressed, including: when the domain name record type corresponding to the optimal service address is a first domain name record type, determining the target service address according to the first service address with the best network service quality; when the domain name record type corresponding to the optimal service address is a second domain name record type, monitoring whether a second domain name request from the client is received within a preset time, and determining the target service address according to the monitoring result, the second domain name request including the domain name to be addressed and the second domain name record type; The sending module is configured to send the target service address to the client.
14. A domain name addressing device, include: Memory; as well as A processor coupled to the memory, wherein the processor is configured to execute the domain name addressing method according to any one of claims 1 to 12 based on instructions stored in the memory.
15. A computer storable medium having computer program instructions stored thereon, which, when executed by a processor, implements the domain name addressing method according to any one of claims 1 to 12.
