WO2018112944A1 - Domain name resolution method and apparatus - Google Patents

Domain name resolution method and apparatus Download PDF

Info

Publication number
WO2018112944A1
WO2018112944A1 PCT/CN2016/111855 CN2016111855W WO2018112944A1 WO 2018112944 A1 WO2018112944 A1 WO 2018112944A1 CN 2016111855 W CN2016111855 W CN 2016111855W WO 2018112944 A1 WO2018112944 A1 WO 2018112944A1
Authority
WO
WIPO (PCT)
Prior art keywords
address
domain name
user
record
resolution
Prior art date
Application number
PCT/CN2016/111855
Other languages
French (fr)
Chinese (zh)
Inventor
朱磊
Original Assignee
深圳前海达闼云端智能科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳前海达闼云端智能科技有限公司 filed Critical 深圳前海达闼云端智能科技有限公司
Priority to CN201680002953.9A priority Critical patent/CN106797410A/en
Priority to PCT/CN2016/111855 priority patent/WO2018112944A1/en
Publication of WO2018112944A1 publication Critical patent/WO2018112944A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/45Network directories; Name-to-address mapping
    • H04L61/4505Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols
    • H04L61/4511Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols using domain name system [DNS]

Definitions

  • the present disclosure relates to the field of network technologies, and in particular, to a domain name resolution method and apparatus.
  • DNS Domain Name System
  • IP Internet Protocol
  • DNS Domain Name System
  • IP Internet Protocol
  • the process of obtaining the IP address corresponding to the domain name through the domain name is called domain name resolution (or host name resolution).
  • domain name resolution or host name resolution
  • the majority of the local DNS uses the default DNS address assigned by the operator, such as home broadband, corporate broadband, etc.
  • These local DNS can implement non-boot domain names (the boot domain name refers to a special domain name that needs to use the private network service).
  • Recursive query function in the existing DNS resolution process, when multiple users perform recursive query for the same domain name, the local DNS only performs DNS query for the first user who queries the domain name, so the local DNS cache The content is only the result of this query, and does not support multi-user differentiated queries.
  • the disclosure provides a domain name resolution method and apparatus.
  • the present disclosure provides a domain name resolution method, the method comprising:
  • the access request includes an IP address of the first user and a first domain name to be accessed, and the first user is any one of multiple users accessing the first domain name user;
  • the present disclosure provides a domain name resolution apparatus, where the apparatus includes:
  • a request receiving module configured to receive an access request sent by the first user, where the access request includes an IP address of the first user and a first domain name to be accessed, where the first user accesses the first domain name Any of the users;
  • a request sending module configured to send the IP address of the first user and the first domain name to a domain name resolution device
  • An address determining module configured to acquire, by the domain name resolution device, a first IP address of the first domain name, where the first IP address is determined according to a network attribute of an IP address of the first user;
  • a record caching module configured to cache a first parsing record for the first user according to the first user's IP address, the first domain name, and the first IP address;
  • An address sending module configured to send the first IP address to the first user.
  • the present disclosure provides a computer program product comprising a computer program executable by a programmable device, the computer program having when executed by the programmable device The code part used for the above method.
  • the present disclosure provides a non-transitory computer readable storage medium including one or more programs for the one or more programs In the above method.
  • the present disclosure provides an electronic device, the electronic device including:
  • One or more processors for executing a program in the non-transitory computer readable storage medium.
  • the domain name resolution method and apparatus receives an IP address sent by a first user and a first domain name to be accessed, and the first user is any one of a plurality of users accessing the first domain name. Transmitting the first user's Internet Protocol IP address and the first domain name to the domain name resolution device, and then obtaining, from the domain name resolution device, the first IP address of the first domain name determined according to the network attribute of the first user's IP address. The address, and then buffering the first parsing record for the first user according to the IP address of the first user, the first domain name, and the first IP address, and finally sending the first IP address to the first user.
  • the present disclosure is capable of generating a source of different users based on a request for domain name resolution
  • the IP address, for the first domain name returns the domain name resolution result most suitable for the user, and implements multi-user differentiated query for domain name resolution.
  • FIG. 1 is a flowchart of a domain name resolution method according to an exemplary embodiment
  • FIG. 2 is a schematic diagram of a domain name resolution method according to an exemplary embodiment
  • FIG. 3 is a schematic diagram of another domain name resolution method according to an exemplary embodiment.
  • FIG. 4 is a flowchart of another method for domain name resolution according to an exemplary embodiment
  • FIG. 5 is a flowchart of a cache parsing recording method according to the embodiment shown in FIG. 1;
  • FIG. 6 is a flowchart of still another method for domain name resolution according to an exemplary embodiment
  • FIG. 7 is a flowchart of a domain name resolution method according to another exemplary embodiment.
  • FIG. 8 is a flowchart of a method for acquiring a domain name IP address according to the embodiment shown in FIG. 1;
  • FIG. 9 is a block diagram of a domain name resolution apparatus according to an exemplary embodiment.
  • FIG. 10 is a block diagram of another domain name resolution apparatus according to an exemplary embodiment.
  • FIG. 11 is a block diagram of still another domain name resolution apparatus according to an exemplary embodiment
  • FIG. 12 is a block diagram of still another domain name resolution apparatus according to an exemplary embodiment
  • Figure 13 is a block diagram of still another address determining module according to the embodiment shown in Figure 9;
  • FIG. 14 is a block diagram of a domain name resolution apparatus according to another exemplary embodiment.
  • FIG. 15 is a block diagram of another domain name resolution apparatus according to another exemplary embodiment.
  • the application scenario may include at least one user, the at least one user is not limited to an individual user or an enterprise user, and the application scenario further includes a domain name resolution.
  • Device and domain name resolution device wherein the domain name resolution device can be understood as an intelligent DNS device, which supports access to multiple users
  • the request is received, the (for the domain name resolution device) is forwarded, the record cache is cached, and the query is performed.
  • the domain name resolution device is configured to perform domain name resolution according to the access request forwarded by the domain name resolution device, and returns a resolution record.
  • FIG. 1 is a flowchart of a domain name resolution method according to an exemplary embodiment. As shown in FIG. 1 , the domain name resolution method may include the following steps.
  • Step 101 Receive an access request sent by the first user, where the access request includes an IP address of the first user and a first domain name to be accessed, where the first user is any one of multiple users accessing the first domain name. .
  • the first domain name may include a boot domain name, a non-boot domain name, or an alias domain name
  • the IP address of the first user may include an IP address in the form of an A record or an IP address in an AAAA record format.
  • Step 102 Send the IP address of the first user and the first domain name to the domain name resolution device.
  • the first domain name is a non-boot domain name
  • the non-boot domain name can be recursively resolved. Therefore, the domain name resolution device can be a domain name resolution server. Therefore, the step 102 can include: the IP address of the first user and the first The domain name is sent to the domain name resolution server.
  • the domain name resolution server is generally referred to as a DNS server.
  • the domain name resolution server is an HTTP DNS (English: Hyper Text Transfer Protocol Domain Name System) server, or an HTTPS DNS ( English: Hyper Text Transfer Protocol over Secure Socket Layer Domain Name System, Chinese: Secure Hypertext Transfer Protocol Domain Name System) Server, or EDNS (English: Extension Mechanisms for Domain Name System, Chinese: Extended Domain Name System) server.
  • HTTP DNS Hyper Text Transfer Protocol Domain Name System
  • HTTPS DNS English: Hyper Text Transfer Protocol over Secure Socket Layer Domain Name System
  • Chinese Secure Hypertext Transfer Protocol Domain Name System
  • EDNS English: Extension Mechanisms for Domain Name System, Chinese: Extended Domain Name System
  • the step 102 may include: sending the IP address of the first user and the first domain name to a management center of a private network corresponding to the first domain name, where the private network includes multiple Access points.
  • Step 103 Obtain a first IP address of the first domain name from the domain name resolution device, where the first IP address is determined according to a network attribute of an IP address of the first user.
  • the first IP address may also include an IP address in the form of an A record or an IP address in the form of an AAAA record.
  • the first domain name is a non-boot domain name.
  • the step 103 may include: receiving, by the domain name resolution server, the first IP address, where the first IP address belongs to the domain name resolution server according to the IP address of the first user. At least one of a geographic area and a network operator determines the first domain name IP address.
  • the step 103 may further include: receiving, by the domain name resolution server, the first IP address, where the first IP address belongs to the domain name resolution server according to the IP address of the first user. a geographical area, a network operator to which the IP address of the first user belongs, a user in the management center, and an access point IP address mapping record determined by at least one of the access point for accessing the private network IP address.
  • the boot domain name may be a domain name of a special ICP (Internet Content Provider) that needs to use a dedicated network service.
  • the private network may include a CDN (Content Delivery Network) or an AND (Application Delivery Network) that performs access guidance and control for a specified ICP.
  • a mapping relationship between a plurality of different users and an IP address of an access point within the private network may be recorded in a management center of the private network.
  • the mapping relationship between different users and the IP addresses of the access points in the private network may be mappings from different geographic regions and/or different network operators and different access points; or, may be some A mapping relationship between a single user's IP address and a network access point.
  • the IP address applicable to the ICP domain name applicable to the user may be directly determined according to the foregoing mapping relationship.
  • Step 104 Cache the first parsing record for the first user according to the IP address of the first user, the first domain name, and the first IP address.
  • the first parsing record may include: a combination of the first user's IP address, the first domain name, and the first IP address; or the first user's IP address, the first domain name, and the user IP address. The combination of the three.
  • the step 104 may include: the first user's IP address, the The combination of the first domain name and the first IP address is cached as the first parsing record.
  • the first resolution record from the domain name resolution device can be cached in the form of a key/value pair.
  • the key may include: a combination of the IP address of the first user and the first domain name or a combination of a user IP address segment and the first domain name, and the value may be the first IP address.
  • Step 105 Send the first IP address to the first user.
  • the above steps 101-105 can be performed by the domain name resolution device described in the foregoing application scenario, and the first user can be a user registered in the domain name resolution device.
  • the domain name resolution service may not be provided by the access request initiated by the user.
  • FIG. 2 is a schematic diagram of a domain name resolution method according to an exemplary embodiment.
  • the user 1 to the user 3 access the domain name resolution device.
  • a domain name initiates an access request.
  • the IP address of User 1 is 1.1.1.1
  • the IP address of User 2 is 2.2.2.2
  • User 3 is an unregistered user
  • the first domain to be accessed by User 1 to User 3 is www.exmaple.com.
  • the parsing device After receiving the access request from User 1 to User 3, the parsing device sends a resolution request including the IP address of the user 1 and the domain name www.exmaple.com to the domain name resolution server, and includes the IP address and domain name of the user 2 www.exmaple.
  • the domain name resolution server determines the IP address 3.3.3.3 of the domain name www.exmaple.com suitable for user 1 according to user 1's IP address 1.1.1.1 and domain name www.exmaple.com, and According to User 2's IP address 2.2.2.2 and domain name www.exmaple.com, determine the IP address 4.4.4.4 for User 2's domain name www.exmaple.com; the domain name resolution server will be suitable for User 1's domain name www.exmaple.com IP Address 3.3.3.3 and the IP address 4.4.4.4 of the domain name www.exmaple.com suitable for User 2 are sent to the domain name resolution device, and the domain name resolution device caches the received IP address with the corresponding user and the domain name www.exmaple.com.
  • the cache can be as shown in Table 1. Key-value pairs in the form:
  • Timeout (seconds) 1.1.1.1_www.exmaple.com 3.3.3.3 120 2.2.2.2_www.exmaple.com 4.4.4.4 120
  • the timeout period is used to indicate the effective time of each parsing record.
  • FIG. 3 is a schematic diagram of another domain name resolution method according to an exemplary embodiment.
  • the enterprise 1 to the enterprise 3 access the domain name resolution device.
  • a domain name initiates an access request.
  • the IP1 address of enterprise 1 is: 1.1.1.1
  • the IP address of enterprise 2 is 2.2.2.2
  • the enterprise 3 is an unregistered user
  • the first domain name to be accessed by enterprise 1 to enterprise 3 is www.exmaple.com.
  • the analysis device received the interview from Enterprise 1 to Enterprise 3 After requesting the request, send a resolution request containing the IP address of the enterprise 1 and the domain name www.exmaple.com to the management center of the private network accessed by the domain name www.exmaple.com, and include the IP address and domain name of the enterprise 2 www.exmaple .com resolves the request and ignores the request of enterprise 3; the management center of the private network determines the suitable enterprise according to the IP address 1.1.1.1 of enterprise 1 and the mapping relationship between the IP address of the enterprise 1 and the access point recorded in the management center.
  • the IP address IP1 of the access point of the private network of 1 and the mapping relationship between the IP address 2.2.2.2 of the enterprise 2 and the IP address of the enterprise 2 recorded in the management center and the access point are determined to be suitable for the enterprise 2
  • the IP address IP2 of the access point of the network; Enterprise 1 and Enterprise 2 can access the first domain name www.exmaple.com through the IP1 and IP2 respectively.
  • the management center of the private network will be suitable for the IP address IP1 of the private network access point where the domain name www.exmaple.com of the enterprise 1 is located and the IP address IP2 of the private network access point where the domain name of the enterprise 2 is www.exmaple.com.
  • the domain name resolution device sends the IP address of the received private network access point to the corresponding enterprise and the domain name www.exmaple.com, where the cache can be in the form of a key-value pair as shown in Table 2:
  • the domain name resolution method receives an IP address sent by a first user and a first domain name to be accessed, and the first user is any one of multiple users accessing the first domain name. Transmitting the first user's Internet Protocol IP address and the first domain name to the domain name resolution device; obtaining, from the domain name resolution device, the first IP address of the first domain name determined according to the network attribute of the first user's IP address And caching the first parsing record for the first user according to the first user's IP address, the first domain name, and the first IP address; and sending the first IP address to the first user.
  • the disclosure can return the domain name resolution result that is most suitable for the user, and implement the multi-user differentiated query of the domain name resolution.
  • FIG. 4 is a flowchart of another method for domain name resolution according to an exemplary embodiment. As shown in FIG. 4, when the first resolution record includes the IP address of the first user, the first domain name, and the first When the IP address is combined, the domain name resolution method may further include the following steps.
  • step 106 when receiving the access request sent by the first user again, it is determined whether the domain name included in the resent access request is the same as the first domain name in the first resolution record.
  • step 107 when it is determined that the domain name included in the resent access request is the same as the first domain name in the first parsing record, the first IP address is obtained according to the cached first parsing record.
  • step 108 the first IP address is sent to the first user.
  • the first IP address corresponding to the domain name may be searched in the first parsed record of the cache according to the IP address of the user, without re-locating the domain name.
  • the parsing device sends a parsing request.
  • FIG. 5 is a flowchart of still another cache parsing recording method according to the embodiment shown in FIG. 1.
  • the step 104 may include the following steps.
  • Step 1041 Determine a user IP address segment to which the IP address of the first user belongs.
  • the range of the user IP address segment may be determined according to the same geographical area, or the IP address of multiple users of the same network operator or the same local area network (such as multiple users in an enterprise).
  • the range of the IP address segment may also be customized within the domain name resolution device according to the user's requirement for the size of the address segment.
  • the IP address segment can be defined as a 24-bit mask of IPv4 according to the needs of the user.
  • Step 1042 cache the combination of the first user's IP address, the first domain name, and the user IP address segment as the first resolution record.
  • FIG. 6 is a flowchart of still another method for domain name resolution according to an exemplary embodiment. As shown in FIG. 6, when the first resolution record includes an IP address of the first user, the first domain name, and the user IP. When the combination of the three address segments, the domain name resolution method may further include the following steps.
  • Step 109 When receiving the access request sent by the second user, determine whether the domain name included in the access request sent by the second user is the same as the first domain name in the first resolution record.
  • step 110 is continued.
  • Step 110 Determine whether the IP address of the second user belongs to the user IP address segment.
  • the user IP address segment may be acquired, and step 111 is continued.
  • Step 111 Acquire the first IP address according to the cached first parsing record.
  • the first IP address can be obtained according to the user IP address segment.
  • Step 112 Send the first IP address to the second user, where the second user is the same or different user as the first user.
  • a parsing record can cache a parsing record so that users belonging to the same IP address segment share a parsing record.
  • the embodiment described in FIG. 2 is taken as an example, and the user IP address segment to which the user 1 and the user 2 belong can be determined during the buffering, so that the parsing records cached for the user 1 and the user 2 can be represented as Table 3.
  • Timeout (seconds) 1.1.1.0/24_www.exmaple.com 3.3.3.3 120 2.2.2.0/24_www.exmaple.com 4.4.4.4 120
  • 1.1.1.0/24 indicates that the IP address segment of the IP from 1.1.1.0 to 1.1.1.24, when the user whose IP address is in this range requests to access www.exmaple.com again, the DNS query is no longer performed for the user.
  • the cache of the record is parsed, and the IP address of 3.3.3.3 is obtained directly from the record in Table 3 to the user.
  • 2.2.2.0/24 is the same as 1.1.1.0/24, and the above scheme is also applicable to the case of guiding the domain name.
  • the method is the same as the method shown in Table 3, and will not be described again.
  • the IP address segment where the IP address of the user is located may be directly in the first parsed record cached. Find the first IP address corresponding to the domain name without resending the resolution request to the domain name resolution device.
  • FIG. 7 is a flowchart of a domain name resolution method according to another exemplary embodiment. As shown in FIG. 7, the method may further include the following steps.
  • Step 113 Set a timeout period for the first parsing record when the first parsing record is cached.
  • the timeout period of the first parsing record may also be set, and the timeout period may be marked as TTL (Time to life).
  • Step 114 When the first parsing record cache duration exceeds the timeout period, the first solution is obtained. Analysis of record deletion.
  • FIG. 8 is a flowchart of a method for acquiring a domain name IP address according to the embodiment shown in FIG. 1. As shown in FIG. 8, the step 103 may include the following steps.
  • Step 1031 Obtain a second domain name determined according to the first domain name from the domain name resolution device, where the second domain name is an alias domain name of the first domain name.
  • step 1032 can be performed.
  • Step 1032 Send the IP address of the first user and the second domain name to the domain name resolution device.
  • Step 1033 Obtain an IP address of the second domain name from the domain name resolution device, where the IP address of the second domain name is determined according to a network attribute of the IP address of the first user.
  • Step 1034 Determine the IP address of the second domain name as the first IP address.
  • the IP address corresponding to the first domain name can be determined by the domain name resolution of the alias domain name.
  • the method for domain name resolution receives an IP address sent by a first user and a first domain name to be accessed, and the first user is any one of multiple users accessing the first domain name.
  • a user sending the first user's Internet Protocol IP address and the first domain name to the domain name resolution device; and obtaining, from the domain name resolution device, the first IP address of the first domain name determined according to the network attribute of the first user's IP address Addressing: storing, by the first user, an IP address, the first domain name, and the first IP address, a first parsing record for the first user; sending the first IP address to the first user.
  • the disclosure can report the recursive resolution or authoritative analysis result most suitable for the user according to the source IP address of the different users that issue the boot domain name, the non-boot domain name or the alias record, and implement the recursive resolution and authoritative analysis of the domain name. Multi-user differentiated queries.
  • FIG. 9 is a block diagram of a domain name resolution apparatus, which may be used to perform the method described in FIG. 1 , which may be implemented as a server by software, hardware, or a combination of both, according to an exemplary embodiment.
  • the server may be the server described in the above application scenario.
  • the apparatus 9000 can include:
  • the request receiving module 9010 is configured to receive an access request sent by the first user, where the access request includes an IP address of the first user and a first domain name to be accessed, where the first user is a plurality of users accessing the first domain name. Any user.
  • the request sending module 9020 is configured to send the IP address of the first user and the first domain name to the domain name resolution device.
  • the address determining module 9030 is configured to obtain, by the domain name resolution device, a first IP address of the first domain name, where the first IP address is determined according to a network attribute of an IP address of the first user.
  • the record cache module 9040 is configured to cache the first parsing record for the first user according to the first user's IP address, the first domain name, and the first IP address.
  • the address sending module 9050 is configured to send the first IP address to the first user.
  • the record caching module 9040 can be used to:
  • the combination of the first user's IP address, the first domain name, and the first IP address is cached as the first analysis record.
  • FIG. 10 is a block diagram of another domain name resolution apparatus, which may be used to perform the method described in FIG. 4, according to an exemplary embodiment.
  • the apparatus 9000 may further include: a domain name identification module 9060 and an address obtaining module 9070.
  • the domain name identification module 9060 is configured to determine, when receiving the access request sent by the first user, whether the domain name included in the resent access request is the same as the first domain name in the first resolution record.
  • the address obtaining module 9070 is configured to obtain the first IP address according to the cached first parsing record when it is determined that the domain name included in the resent access request is the same as the first domain name in the first parsing record.
  • the address sending module 9050 is configured to send the first IP address to the first user.
  • the record caching module 9040 is further configured to:
  • the combination of the first user's IP address, the first domain name, and the user IP address segment is cached as the first analysis record.
  • FIG. 11 is a block diagram of still another domain name resolution apparatus, which may be used to perform the method described in FIG. 6 according to an exemplary embodiment.
  • the device 9000 may further include: a domain name identification module 9060, an address segment determining module 9080, and an address obtaining module 9070.
  • the domain name identification module 9060 is further configured to: when receiving the access request sent by the second user, determine whether the domain name included in the access request sent by the second user is the same as the first domain name in the first resolution record.
  • the address segment determining module 9080 is configured to determine a domain included in the resent access request When the name is the same as the first domain name in the first parsing record, it is determined whether the IP address of the second user belongs to the user IP address segment.
  • the address obtaining module 9070 is further configured to: when determining whether the IP address of the second user belongs to the user IP address segment, obtain the first IP address according to the cached first parsing record.
  • the address sending module 9050 is further configured to send the first IP address to the second user, where the second user is the same user or a different user.
  • FIG. 12 is a block diagram of still another domain name resolution apparatus, which may be used to perform the method described in FIG. 7, according to an exemplary embodiment.
  • the device 9000 may further include:
  • the timeout setting module 9090 is configured to set a timeout period for the first parsing record when the first parsing record is cached.
  • the record deletion module 9100 is configured to delete the first parsing record when the first parsing record cache duration exceeds the timeout period.
  • the first domain name is a non-boot domain name
  • the request sending module 9020 is configured to:
  • the domain name resolution server is an HTTP DNS server, or an HTTPS DNS server, or an EDNS server.
  • the address determining module 9030 is configured to:
  • the domain name resolution server Receiving, by the domain name resolution server, the first IP address, where the first IP address is determined by the domain name resolution server according to at least one of a geographical area and a network operator to which the IP address of the first user belongs address.
  • the first domain name is a boot domain name
  • the request sending module 9020 is configured to:
  • the first user's IP address and the first domain name are sent to a management center of a private network corresponding to the first domain name, and the private network includes a plurality of access points.
  • the address determining module 9030 is configured to:
  • the first IP address is a network operator to which the domain name resolution server belongs according to the IP address of the first user, a network operator to which the IP address of the first user belongs, and the management The IP address of the access point used to access the private network determined by at least one of the user and the access point IP address mapping record in the center.
  • the IP address of the first user and the first IP address include an IP address in the form of an A record, or an IP address in an AAAA record format.
  • FIG. 13 is a block diagram of yet another address determination module, which may be used to perform the method described in FIG. 8, in accordance with the embodiment of FIG.
  • the address determining module 9030 may include:
  • the alias domain name obtaining sub-module 9031 is configured to obtain, from the domain name resolution device, a second domain name determined according to the first domain name, where the second domain name is an alias domain name of the first domain name.
  • the domain name sending submodule 9032 is configured to send the IP address of the first user and the second domain name to the domain name resolution device.
  • the address obtaining sub-module 9033 is configured to obtain an IP address of the second domain name from the domain name resolution device, where the IP address of the second domain name is determined according to a network attribute of the IP address of the first user.
  • the address determining submodule 9034 is configured to determine the IP address of the second domain name as the first IP address.
  • the apparatus for domain name resolution receives an IP address sent by a first user and a first domain name to be accessed, and the first user is any one of multiple users accessing the first domain name.
  • a user sending the first user's Internet Protocol IP address and the first domain name to the domain name resolution device; and obtaining, from the domain name resolution device, the first IP address of the first domain name determined according to the network attribute of the first user's IP address Addressing: storing, by the first user, an IP address, the first domain name, and the first IP address, a first parsing record for the first user; sending the first IP address to the first user.
  • the disclosure can return the result of recursive resolution or authoritative analysis that is most suitable for the user according to the source IP address of the different user that issues the boot domain name or the non-boot domain name resolution request, and implement the recursive resolution and authoritative analysis of the domain name. Multi-user differentiated queries.
  • the present disclosure also provides a computer program product comprising a computer program executable by a programmable device, the computer program having any of Figures 1 through 10 when executed by the programmable device The code portion of the method shown.
  • the present disclosure also provides a non-transitory computer readable storage medium including one or more programs for use in any of FIGS. 1 through 10 method.
  • the present disclosure also provides an electronic device, the electronic device comprising:
  • One or more processors for executing a program in the non-transitory computer readable storage medium.
  • FIG. 14 is a block diagram of a domain name resolution apparatus according to another exemplary embodiment, the domain The name resolution device 1400 can be an electronic device, such as the smart DNS device described in the aforementioned application scenario. As shown in FIG. 14, the apparatus 1400 can include a processor 1401, a memory 1402, a multimedia component 1403, an input/output (I/O) interface 1404, and a communication component 1405.
  • a processor 1401 a memory 1402
  • multimedia component 1403 multimedia component 1403
  • I/O input/output
  • the processor 1401 is configured to control the overall operation of the apparatus 1400 to complete all or part of the steps of the method shown in any of the foregoing FIGS. 1 to 10.
  • Memory 1402 is used to store various types of data to support operations at the device 1400, such as may include instructions for any application or method operating on the device 1400, as well as application related data, such as Contact data, sent and received messages, pictures, audio, video, and more.
  • the memory 1402 can be implemented by any type of volatile or non-volatile storage terminal device or a combination thereof, such as Static Random Access Memory (SRAM), electrically erasable programmable read only memory.
  • SRAM Static Random Access Memory
  • the multimedia component 1403 can include a screen and an audio component.
  • the screen may be, for example, a touch screen, and the audio component is used to output and/or input an audio signal.
  • the audio component can include a microphone for receiving an external audio signal.
  • the received audio signal may be further stored in memory 1402 or transmitted via communication component 1405.
  • the audio component also includes at least one speaker for outputting an audio signal.
  • the I/O interface 1404 provides an interface between the processor 1401 and other interface modules, such as a keyboard, a mouse, a button, and the like. These buttons can be virtual buttons or physical buttons.
  • Communication component 1405 is used for wired or wireless communication between the device 1400 and other terminal devices. Wireless communication, such as Wi-Fi, Bluetooth, Near Field Communication (NFC), 2G, 3G or 4G, or a combination of one or more of them, so the corresponding communication component 1405 can include: Wi-Fi module, Bluetooth module, NFC module.
  • the device 1400 may be configured by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), and digital signal processing terminals (Digital).
  • ASICs Application Specific Integrated Circuits
  • DSPs Digital Signal Processors
  • Digital Digital
  • DSPD Signal Processing Device
  • PLD Programmable Logic Device
  • FPGA Field Programmable Gate Array
  • a controller a microcontroller, a microprocessor or other electronic component is implemented for performing the above-described monitoring method of the terminal device.
  • non-transitory computer readable storage medium comprising instructions, such as a memory 1402 comprising instructions executable by processor 1401 of apparatus 1400 to perform the terminal device described above Monitoring method.
  • the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage terminal device.
  • FIG. 15 is a block diagram of another domain name resolution apparatus according to another exemplary embodiment.
  • the apparatus 1500 may be a server, which may be a server cluster composed of several servers, or may be a cloud computing service center.
  • the apparatus 1500 includes a processor 1501, a memory 1502, an I/O interface 1503, and a network interface 1504, wherein the memory 1502 can be used to store instructions executable by the processor 1501, and the processor 1502 can execute the instructions to The method shown in any of the above FIGS. 1 to 10 is performed.

Landscapes

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

Abstract

Disclosed are a domain name resolution method and apparatus. The method comprises: receiving an internet protocol (IP) address sent by a first user and a first domain name required to be accessed, the first user being any of a plurality of users accessing the first domain name; sending the IP address of the first user and the first domain name to a domain name resolution device; obtaining a first IP address of the first domain name from the domain name resolution device, the first IP address being determined according to the network attributes of the IP address of the first user; caching a first resolution record for the first user according to the IP address of the first user, the first domain name and the first IP address; and sending the first IP address to the first user. By means of the method and apparatus, domain name resolution results best for the user can be returned for the first domain name according to source IP addresses of different users sending domain name request, and therefore, multi-user differential query of domain name resolution can be fulfilled.

Description

域名解析方法和装置Domain name resolution method and device 技术领域Technical field
本公开涉及网络技术领域,尤其涉及一种域名解析方法和装置。The present disclosure relates to the field of network technologies, and in particular, to a domain name resolution method and apparatus.
背景技术Background technique
DNS(Domain Name System,域名***)作为互联网上转发和储存域名和IP(Internet Protocol,互联网协议)地址相互映射的一个分布式数据库,能够使用户通过主机名访问互联网,而不用去记住能够被机器直接读取的IP数串。其中,通过域名最终得到该域名对应的IP地址的过程叫做域名解析(或主机名解析)。相关技术中,本地DNS绝大多数使用的是运营商默认分配的DNS地址,例如家庭宽带、公司宽带等,这些本地DNS能够实现非引导域名(引导域名指的是需要使用专网服务的特殊域名)的递归查询功能,现有的DNS解析过程中,当多个用户针对同一个域名进行递归查询时,本地DNS只针对第一个对该域名进行查询的用户进行DNS查询,因此本地DNS缓存的内容只有这一份查询结果,不支持多用户的差异化查询。DNS (Domain Name System) is a distributed database that maps and stores domain names and IP (Internet Protocol) addresses on the Internet. It enables users to access the Internet through host names without having to remember to be able to be The number of IP strings read directly by the machine. The process of obtaining the IP address corresponding to the domain name through the domain name is called domain name resolution (or host name resolution). In the related art, the majority of the local DNS uses the default DNS address assigned by the operator, such as home broadband, corporate broadband, etc. These local DNS can implement non-boot domain names (the boot domain name refers to a special domain name that needs to use the private network service). Recursive query function, in the existing DNS resolution process, when multiple users perform recursive query for the same domain name, the local DNS only performs DNS query for the first user who queries the domain name, so the local DNS cache The content is only the result of this query, and does not support multi-user differentiated queries.
发明内容Summary of the invention
本公开的为了解决上述的技术问题,提供一种域名解析方法和装置。In order to solve the above technical problem, the disclosure provides a domain name resolution method and apparatus.
为了实现上述目的,根据本公开实施例的第一方面,本公开提供一种域名解析方法,所述方法包括:In order to achieve the above object, according to a first aspect of an embodiment of the present disclosure, the present disclosure provides a domain name resolution method, the method comprising:
接收第一用户发送的访问请求,所述访问请求包括所述第一用户的IP地址和需要访问的第一域名,所述第一用户为访问所述第一域名的多个用户中的任一用户;Receiving an access request sent by the first user, where the access request includes an IP address of the first user and a first domain name to be accessed, and the first user is any one of multiple users accessing the first domain name user;
将所述第一用户的IP地址和所述第一域名发送至域名解析设备;Sending the IP address of the first user and the first domain name to the domain name resolution device;
从所述域名解析设备获取所述第一域名的第一IP地址,所述第一IP地址是根据所述第一用户的IP地址的网络属性确定的;Obtaining, by the domain name resolution device, a first IP address of the first domain name, where the first IP address is determined according to a network attribute of an IP address of the first user;
根据所述第一用户的IP地址、所述第一域名以及所述第一IP地址为所述第一用户缓存第一解析记录; Caching a first parsing record for the first user according to the IP address of the first user, the first domain name, and the first IP address;
将所述第一IP地址发送给所述第一用户。Sending the first IP address to the first user.
根据本公开实施例的第二方面,本公开提供一种域名解析装置,所述装置包括:According to a second aspect of the embodiments of the present disclosure, the present disclosure provides a domain name resolution apparatus, where the apparatus includes:
请求接收模块,用于接收第一用户发送的访问请求,所述访问请求包括所述第一用户的IP地址和需要访问的第一域名,所述第一用户为访问所述第一域名的多个用户中的任一用户;a request receiving module, configured to receive an access request sent by the first user, where the access request includes an IP address of the first user and a first domain name to be accessed, where the first user accesses the first domain name Any of the users;
请求发送模块,用于将所述第一用户的IP地址和所述第一域名发送至域名解析设备;a request sending module, configured to send the IP address of the first user and the first domain name to a domain name resolution device;
地址确定模块,用于从所述域名解析设备获取所述第一域名的第一IP地址,所述第一IP地址是根据所述第一用户的IP地址的网络属性确定的;An address determining module, configured to acquire, by the domain name resolution device, a first IP address of the first domain name, where the first IP address is determined according to a network attribute of an IP address of the first user;
记录缓存模块,用于根据所述第一用户的IP地址、所述第一域名以及所述第一IP地址为所述第一用户缓存第一解析记录;a record caching module, configured to cache a first parsing record for the first user according to the first user's IP address, the first domain name, and the first IP address;
地址发送模块,用于将所述第一IP地址发送给所述第一用户。An address sending module, configured to send the first IP address to the first user.
根据本公开实施例的第三方面,本公开提供一种计算机程序产品,所述计算机程序产品包含能够由可编程的装置执行的计算机程序,所述计算机程序具有当由所述可编程的装置执行时用于上述的方法的代码部分。According to a third aspect of an embodiment of the present disclosure, the present disclosure provides a computer program product comprising a computer program executable by a programmable device, the computer program having when executed by the programmable device The code part used for the above method.
根据本公开实施例的第四方面,本公开提供一种非临时性计算机可读存储介质,所述非临时性计算机可读存储介质中包括一个或多个程序,所述一个或多个程序用于上述的方法。According to a fourth aspect of an embodiment of the present disclosure, the present disclosure provides a non-transitory computer readable storage medium including one or more programs for the one or more programs In the above method.
根据本公开实施例的第五方面,本公开提供一种电子设备,所述电子设备包括:According to a fifth aspect of the embodiments of the present disclosure, the present disclosure provides an electronic device, the electronic device including:
上述的非临时性计算机可读存储介质;以及The non-transitory computer readable storage medium described above;
一个或者多个处理器,用于执行所述非临时性计算机可读存储介质中的程序。One or more processors for executing a program in the non-transitory computer readable storage medium.
综上所述,本公开提供的域名解析方法和装置,接收第一用户发送的IP地址和需要访问的第一域名,该第一用户为访问该第一域名的多个用户中的任一用户,将该第一用户的互联网协议IP地址和该第一域名发送至域名解析设备,而后从该域名解析设备获取根据该第一用户的IP地址的网络属性确定的该第一域名的第一IP地址,然后根据该第一用户的IP地址、该第一域名以及该第一IP地址为该第一用户缓存第一解析记录,最终将该第一IP地址发送给该第一用户。本公开能够根据发出域名解析请求的不同用户的源 IP地址,针对该第一域名,返回最适合该用户的域名解析结果,实现域名解析的多用户差异化查询。In summary, the domain name resolution method and apparatus provided by the present disclosure receives an IP address sent by a first user and a first domain name to be accessed, and the first user is any one of a plurality of users accessing the first domain name. Transmitting the first user's Internet Protocol IP address and the first domain name to the domain name resolution device, and then obtaining, from the domain name resolution device, the first IP address of the first domain name determined according to the network attribute of the first user's IP address. The address, and then buffering the first parsing record for the first user according to the IP address of the first user, the first domain name, and the first IP address, and finally sending the first IP address to the first user. The present disclosure is capable of generating a source of different users based on a request for domain name resolution The IP address, for the first domain name, returns the domain name resolution result most suitable for the user, and implements multi-user differentiated query for domain name resolution.
本公开的其他特征和优点将在随后的具体实施方式部分予以详细说明。Other features and advantages of the present disclosure will be described in detail in the detailed description which follows.
附图说明DRAWINGS
附图是用来提供对本公开的进一步理解,并且构成说明书的一部分,与下面的具体实施方式一起用于解释本公开,但并不构成对本公开的限制。在附图中:The drawings are intended to provide a further understanding of the disclosure, and are in the In the drawing:
图1是根据一示例性实施例示出的一种域名解析方法的流程图;FIG. 1 is a flowchart of a domain name resolution method according to an exemplary embodiment;
图2是根据一示例性实施例示出的一种域名解析方法的示意图;2 is a schematic diagram of a domain name resolution method according to an exemplary embodiment;
图3是根据一示例性实施例示出的另一种域名解析方法的示意图FIG. 3 is a schematic diagram of another domain name resolution method according to an exemplary embodiment.
图4是根据一示例性实施例示出的另一种域名解析方法的流程图;FIG. 4 is a flowchart of another method for domain name resolution according to an exemplary embodiment;
图5是根据图1所示实施例示出的一种缓存解析记录方法的流程图;FIG. 5 is a flowchart of a cache parsing recording method according to the embodiment shown in FIG. 1;
图6是根据一示例性实施例示出的又一种域名解析方法的流程图;FIG. 6 is a flowchart of still another method for domain name resolution according to an exemplary embodiment;
图7是根据另一示例性实施例示出的一种域名解析方法的流程图;FIG. 7 is a flowchart of a domain name resolution method according to another exemplary embodiment;
图8是根据图1所示实施例示出的一种域名IP地址获取方法的流程图;FIG. 8 is a flowchart of a method for acquiring a domain name IP address according to the embodiment shown in FIG. 1;
图9是根据一示例性实施例示出的一种域名解析装置的框图;FIG. 9 is a block diagram of a domain name resolution apparatus according to an exemplary embodiment;
图10是根据一示例性实施例示出的另一种域名解析装置的框图;FIG. 10 is a block diagram of another domain name resolution apparatus according to an exemplary embodiment; FIG.
图11是根据一示例性实施例示出的又一种域名解析装置的框图;FIG. 11 is a block diagram of still another domain name resolution apparatus according to an exemplary embodiment;
图12是根据一示例性实施例示出的又一种域名解析装置的框图;FIG. 12 is a block diagram of still another domain name resolution apparatus according to an exemplary embodiment;
图13是根据图9所示实施例示出的又一种地址确定模块的框图;Figure 13 is a block diagram of still another address determining module according to the embodiment shown in Figure 9;
图14是根据另一示例性实施例示出的一种域名解析装置的框图;FIG. 14 is a block diagram of a domain name resolution apparatus according to another exemplary embodiment; FIG.
图15是根据另一示例性实施例示出的另一种域名解析装置的框图。FIG. 15 is a block diagram of another domain name resolution apparatus according to another exemplary embodiment.
具体实施方式detailed description
以下结合附图对本公开的具体实施方式进行详细说明。应当理解的是,此处所描述的具体实施方式仅用于说明和解释本公开,并不用于限制本公开。The specific embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings. It is to be understood that the specific embodiments described herein are not to be construed
在介绍本公开提供的域名解析方法之前,首先对本公开所涉及应用场景进行介绍,该应用场景可以包括至少一个用户,该至少一个用户不限于个人用户或者企业用户,该应用场景还包括一域名解析装置和域名解析设备,其中该域名解析装置可以理解为一种智能DNS设备,其支持对多个用户的访 问请求的接收、(向域名解析设备)转发、解析记录缓存、查询等操作,域名解析设备用于根据域名解析装置转发的访问请求进行域名解析,并返回解析记录。Before introducing the domain name resolution method provided by the present disclosure, the application scenario of the present disclosure is first introduced. The application scenario may include at least one user, the at least one user is not limited to an individual user or an enterprise user, and the application scenario further includes a domain name resolution. Device and domain name resolution device, wherein the domain name resolution device can be understood as an intelligent DNS device, which supports access to multiple users The request is received, the (for the domain name resolution device) is forwarded, the record cache is cached, and the query is performed. The domain name resolution device is configured to perform domain name resolution according to the access request forwarded by the domain name resolution device, and returns a resolution record.
图1是根据一示例性实施例示出的一种域名解析方法的流程图,如图1所示,该域名解析方法可以包括以下步骤。FIG. 1 is a flowchart of a domain name resolution method according to an exemplary embodiment. As shown in FIG. 1 , the domain name resolution method may include the following steps.
步骤101,接收第一用户发送的访问请求,该访问请求包括该第一用户的IP地址和需要访问的第一域名,该第一用户为访问该第一域名的多个用户中的任一用户。Step 101: Receive an access request sent by the first user, where the access request includes an IP address of the first user and a first domain name to be accessed, where the first user is any one of multiple users accessing the first domain name. .
其中,该第一域名可以包括引导域名、非引导域名或者别名域名,该第一用户的IP地址可以包括A记录形式的IP地址,或AAAA记录形式的IP地址。The first domain name may include a boot domain name, a non-boot domain name, or an alias domain name, and the IP address of the first user may include an IP address in the form of an A record or an IP address in an AAAA record format.
步骤102,将该第一用户的IP地址和该第一域名发送至域名解析设备。Step 102: Send the IP address of the first user and the first domain name to the domain name resolution device.
以该第一域名为非引导域名为例,非引导域名可以采用递归解析,因此该域名解析设备可以为域名解析服务器,因此该步骤102可以包括:将该第一用户的IP地址和该第一域名发送至域名解析服务器。For example, the first domain name is a non-boot domain name, and the non-boot domain name can be recursively resolved. Therefore, the domain name resolution device can be a domain name resolution server. Therefore, the step 102 can include: the IP address of the first user and the first The domain name is sent to the domain name resolution server.
其中,域名解析服务器通常可以称为DNS服务器,在本实施例中该域名解析服务器为HTTP DNS(英文:Hyper Text Transfer Protocol Domain Name System,中文:超文本传输协议域名***)服务器,或者HTTPS DNS(英文:Hyper Text Transfer Protocol over Secure Socket Layer Domain Name System,中文:安全超文本传输协议域名***)服务器,或者EDNS(英文:Extension Mechanisms for Domain Name System,中文:扩展域名***)服务器。The domain name resolution server is generally referred to as a DNS server. In this embodiment, the domain name resolution server is an HTTP DNS (English: Hyper Text Transfer Protocol Domain Name System) server, or an HTTPS DNS ( English: Hyper Text Transfer Protocol over Secure Socket Layer Domain Name System, Chinese: Secure Hypertext Transfer Protocol Domain Name System) Server, or EDNS (English: Extension Mechanisms for Domain Name System, Chinese: Extended Domain Name System) server.
以该第一域名为引导域名为例,该步骤102可以包括:将该第一用户的IP地址和该第一域名发送至与该第一域名对应的专用网络的管理中心,该专用网络包括多个接入点。Taking the first domain name as the boot domain name as an example, the step 102 may include: sending the IP address of the first user and the first domain name to a management center of a private network corresponding to the first domain name, where the private network includes multiple Access points.
步骤103,从该域名解析设备获取该第一域名的第一IP地址,该第一IP地址是根据该第一用户的IP地址的网络属性确定的。Step 103: Obtain a first IP address of the first domain name from the domain name resolution device, where the first IP address is determined according to a network attribute of an IP address of the first user.
其中,该第一IP地址也可以包括A记录形式的IP地址,或AAAA记录形式的IP地址。The first IP address may also include an IP address in the form of an A record or an IP address in the form of an AAAA record.
以该第一域名为非引导域名为例,该步骤103可以包括:从该域名解析服务器接收该第一IP地址,该第一IP地址为该域名解析服务器根据该第一用户的IP地址所属的地理区域、网络运营商中的至少一者确定该第一域名 的IP地址。For example, the first domain name is a non-boot domain name. The step 103 may include: receiving, by the domain name resolution server, the first IP address, where the first IP address belongs to the domain name resolution server according to the IP address of the first user. At least one of a geographic area and a network operator determines the first domain name IP address.
以该第一域名为引导域名为例,该步骤103还可以包括:从该域名解析服务器接收该第一IP地址,该第一IP地址为该域名解析服务器根据该第一用户的IP地址所属的地理区域、该第一用户的IP地址所属的网络运营商、该管理中心中的用户与接入点IP地址映射记录中的至少一者确定的用于接入所述专用网络的接入点的IP地址。Taking the first domain name as the boot domain name as an example, the step 103 may further include: receiving, by the domain name resolution server, the first IP address, where the first IP address belongs to the domain name resolution server according to the IP address of the first user. a geographical area, a network operator to which the IP address of the first user belongs, a user in the management center, and an access point IP address mapping record determined by at least one of the access point for accessing the private network IP address.
示例地,该引导域名可以为需要使用专用网络服务的特殊ICP(Internet Content Provider,互联网内容供货商)的域名。该专用网络可以包括对指定的ICP进行接入引导和控制的CDN(Content Delivery Network,内容分发网络)或AND(Application Delivery Network,应用交付网络)。For example, the boot domain name may be a domain name of a special ICP (Internet Content Provider) that needs to use a dedicated network service. The private network may include a CDN (Content Delivery Network) or an AND (Application Delivery Network) that performs access guidance and control for a specified ICP.
示例地,多个不同的用户与该专用网络内的接入点的IP地址的映射关系可以被记录在该专用网络的管理中心中。其中,不同用户与该专用网络内的接入点的IP地址的映射关系可以是来自不同的地理区域和/或所属不同的网络运营商与不同接入点的映射关系;或者,可以是某个单一用户的IP地址直接与某个网络接入点建立的映射关系。Illustratively, a mapping relationship between a plurality of different users and an IP address of an access point within the private network may be recorded in a management center of the private network. The mapping relationship between different users and the IP addresses of the access points in the private network may be mappings from different geographic regions and/or different network operators and different access points; or, may be some A mapping relationship between a single user's IP address and a network access point.
由此可见,当接入该专用网络的用户对该ICP域名进行访问时,可以根据上述的映射关系,直接确定适用于该用户的接入该ICP域名的IP地址。Therefore, when the user accessing the private network accesses the ICP domain name, the IP address applicable to the ICP domain name applicable to the user may be directly determined according to the foregoing mapping relationship.
步骤104,根据该第一用户的IP地址、该第一域名以及该第一IP地址为该第一用户缓存第一解析记录。Step 104: Cache the first parsing record for the first user according to the IP address of the first user, the first domain name, and the first IP address.
其中,该第一解析记录可以包括:该第一用户的IP地址、该第一域名以及该第一IP地址三者的组合;或者该第一用户的IP地址、该第一域名以及用户IP地址段三者的组合。The first parsing record may include: a combination of the first user's IP address, the first domain name, and the first IP address; or the first user's IP address, the first domain name, and the user IP address. The combination of the three.
示例地,当该第一解析记录包括该第一用户的IP地址、该第一域名以及该第一IP地址三者的组合时,该步骤104可以包括:将该第一用户的IP地址、该第一域名以及第一IP地址三者的组合作为该第一解析记录进行缓存。For example, when the first resolution record includes a combination of the first user's IP address, the first domain name, and the first IP address, the step 104 may include: the first user's IP address, the The combination of the first domain name and the first IP address is cached as the first parsing record.
示例地,可以将来自该域名解析设备的该第一解析记录以键/值对的形式进行缓存。其中,该键可以包括:该第一用户的IP地址与该第一域名两者的组合或者用户IP地址段与该第一域名两者的组合,该值可以为该第一IP地址。For example, the first resolution record from the domain name resolution device can be cached in the form of a key/value pair. The key may include: a combination of the IP address of the first user and the first domain name or a combination of a user IP address segment and the first domain name, and the value may be the first IP address.
步骤105,将该第一IP地址发送给该第一用户。 Step 105: Send the first IP address to the first user.
另外,值得一提的是,上述的步骤101-105可以由上述应用场景中所述的域名解析装置执行,该第一用户可以为在该域名解析装置中注册的用户。当判断该用户为未注册的用户时,则可以对该用户发起的访问请求不提供该域名解析服务。In addition, it is worth mentioning that the above steps 101-105 can be performed by the domain name resolution device described in the foregoing application scenario, and the first user can be a user registered in the domain name resolution device. When it is determined that the user is an unregistered user, the domain name resolution service may not be provided by the access request initiated by the user.
示例地,图2是根据一示例性实施例示出的一种域名解析方法的示意图,如图2所示,当第一域名为非引导域名时,存在用户1~用户3向域名解析装置访问第一域名的发起访问请求。其中,用户1的IP地址为:1.1.1.1,用户2的IP地址为:2.2.2.2,用户3为未注册用户,用户1~用户3要访问的第一域名为www.exmaple.com,域名解析装置在收到用户1~用户3的访问请求后,向域名解析服务器发送包含用户1的IP地址和域名www.exmaple.com的解析请求,以及包含用户2的IP地址和域名www.exmaple.com的解析请求,并且忽略用户3的请求;域名解析服务器根据用户1的IP地址1.1.1.1和域名www.exmaple.com确定适合用户1的域名www.exmaple.com的IP地址3.3.3.3,以及根据用户2的IP地址2.2.2.2和域名www.exmaple.com确定适合用户2的域名www.exmaple.com的IP地址4.4.4.4;域名解析服务器将适合用户1的域名www.exmaple.com的IP地址3.3.3.3以及适合用户2的域名www.exmaple.com的IP地址4.4.4.4发送给域名解析装置,域名解析装置将接收到的IP地址与对应的用户以及域名www.exmaple.com进行缓存,其中缓存可以如表1所示的键值对的形式:For example, FIG. 2 is a schematic diagram of a domain name resolution method according to an exemplary embodiment. As shown in FIG. 2, when the first domain name is a non-boot domain name, the user 1 to the user 3 access the domain name resolution device. A domain name initiates an access request. The IP address of User 1 is 1.1.1.1, the IP address of User 2 is 2.2.2.2, User 3 is an unregistered user, and the first domain to be accessed by User 1 to User 3 is www.exmaple.com. After receiving the access request from User 1 to User 3, the parsing device sends a resolution request including the IP address of the user 1 and the domain name www.exmaple.com to the domain name resolution server, and includes the IP address and domain name of the user 2 www.exmaple. Com parses the request and ignores the request of user 3; the domain name resolution server determines the IP address 3.3.3.3 of the domain name www.exmaple.com suitable for user 1 according to user 1's IP address 1.1.1.1 and domain name www.exmaple.com, and According to User 2's IP address 2.2.2.2 and domain name www.exmaple.com, determine the IP address 4.4.4.4 for User 2's domain name www.exmaple.com; the domain name resolution server will be suitable for User 1's domain name www.exmaple.com IP Address 3.3.3.3 and the IP address 4.4.4.4 of the domain name www.exmaple.com suitable for User 2 are sent to the domain name resolution device, and the domain name resolution device caches the received IP address with the corresponding user and the domain name www.exmaple.com. The cache can be as shown in Table 1. Key-value pairs in the form:
表1Table 1
key value 超时时间(秒)Timeout (seconds)
1.1.1.1_www.exmaple.com1.1.1.1_www.exmaple.com 3.3.3.33.3.3.3 120120
2.2.2.2_www.exmaple.com2.2.2.2_www.exmaple.com 4.4.4.44.4.4.4 120120
其中,超时时间用于表示每条解析记录的有效时间。The timeout period is used to indicate the effective time of each parsing record.
示例地,图3是根据一示例性实施例示出的另一种域名解析方法的示意图,如图3所示,当第一域名为引导域名时,存在企业1~企业3向域名解析装置访问第一域名的发起访问请求。其中,企业1的IP1地址为:1.1.1.1,企业2的IP地址为:2.2.2.2,企业3为未注册用户,企业1~企业3要访问的第一域名为www.exmaple.com,域名解析装置在收到企业1~企业3的访 问请求后,向域名www.exmaple.com所接入的专用网络的管理中心发送包含企业1的IP地址和域名www.exmaple.com的解析请求,以及包含企业2的IP地址和域名www.exmaple.com的解析请求,并且忽略企业3的请求;专用网络的管理中心根据企业1的IP地址1.1.1.1和该管理中心中记录的该企业1的IP地址与接入点的映射关系确定适合企业1的专用网络的接入点的IP地址IP1,以及根据企业2的IP地址2.2.2.2和和该管理中心中记录的该企业2的IP地址与接入点的映射关系确定适合企业2的专用网络的接入点的IP地址IP2;企业1与企业2可以分别通过该IP1和IP2接入该第一域名www.exmaple.com。同时,由专用网络的管理中心将适合企业1的域名www.exmaple.com所在的专用网络接入点IP地址IP1以及适合企业2的域名www.exmaple.com所在的专用网络接入点IP地址IP2发送给域名解析装置,域名解析装置将接收到的专用网络接入点的IP地址与对应的企业以及域名www.exmaple.com进行缓存,其中缓存可以如表2所示的键值对的形式:For example, FIG. 3 is a schematic diagram of another domain name resolution method according to an exemplary embodiment. As shown in FIG. 3, when the first domain name is a boot domain name, the enterprise 1 to the enterprise 3 access the domain name resolution device. A domain name initiates an access request. The IP1 address of enterprise 1 is: 1.1.1.1, the IP address of enterprise 2 is 2.2.2.2, the enterprise 3 is an unregistered user, and the first domain name to be accessed by enterprise 1 to enterprise 3 is www.exmaple.com. The analysis device received the interview from Enterprise 1 to Enterprise 3 After requesting the request, send a resolution request containing the IP address of the enterprise 1 and the domain name www.exmaple.com to the management center of the private network accessed by the domain name www.exmaple.com, and include the IP address and domain name of the enterprise 2 www.exmaple .com resolves the request and ignores the request of enterprise 3; the management center of the private network determines the suitable enterprise according to the IP address 1.1.1.1 of enterprise 1 and the mapping relationship between the IP address of the enterprise 1 and the access point recorded in the management center. The IP address IP1 of the access point of the private network of 1 and the mapping relationship between the IP address 2.2.2.2 of the enterprise 2 and the IP address of the enterprise 2 recorded in the management center and the access point are determined to be suitable for the enterprise 2 The IP address IP2 of the access point of the network; Enterprise 1 and Enterprise 2 can access the first domain name www.exmaple.com through the IP1 and IP2 respectively. At the same time, the management center of the private network will be suitable for the IP address IP1 of the private network access point where the domain name www.exmaple.com of the enterprise 1 is located and the IP address IP2 of the private network access point where the domain name of the enterprise 2 is www.exmaple.com. The domain name resolution device sends the IP address of the received private network access point to the corresponding enterprise and the domain name www.exmaple.com, where the cache can be in the form of a key-value pair as shown in Table 2:
表2Table 2
key value 超时时间(秒)Timeout (seconds)
1.1.1.1_www.exmaple.com1.1.1.1_www.exmaple.com IP1IP1 120120
2.2.2.2_www.exmaple.com2.2.2.2_www.exmaple.com IP2IP2 120120
综上所述,本公开实施例提供的域名解析方法,接收第一用户发送的IP地址和需要访问的第一域名,该第一用户为访问该第一域名的多个用户中的任一用户;将该第一用户的互联网协议IP地址和该第一域名发送至域名解析设备;从该域名解析设备获取根据该第一用户的IP地址的网络属性确定的该第一域名的第一IP地址;根据该第一用户的IP地址、该第一域名以及该第一IP地址为该第一用户缓存第一解析记录;将该第一IP地址发送给该第一用户。本公开能够根据发出域名解析请求的不同用户的源IP地址,针对该域名,返回最适合该用户的域名解析结果,实现域名解析的多用户差异化查询。In summary, the domain name resolution method provided by the embodiment of the present disclosure receives an IP address sent by a first user and a first domain name to be accessed, and the first user is any one of multiple users accessing the first domain name. Transmitting the first user's Internet Protocol IP address and the first domain name to the domain name resolution device; obtaining, from the domain name resolution device, the first IP address of the first domain name determined according to the network attribute of the first user's IP address And caching the first parsing record for the first user according to the first user's IP address, the first domain name, and the first IP address; and sending the first IP address to the first user. According to the source IP address of the different users that issue the domain name resolution request, the disclosure can return the domain name resolution result that is most suitable for the user, and implement the multi-user differentiated query of the domain name resolution.
图4是根据一示例性实施例示出的另一种域名解析方法的流程图,如图4所示,当该第一解析记录包括该第一用户的IP地址、该第一域名以及该第一IP地址三者的组合时,该域名解析方法还可以包括以下步骤。 FIG. 4 is a flowchart of another method for domain name resolution according to an exemplary embodiment. As shown in FIG. 4, when the first resolution record includes the IP address of the first user, the first domain name, and the first When the IP address is combined, the domain name resolution method may further include the following steps.
在步骤106中,当接收到该第一用户再次发送的访问请求时,确定该再次发送的访问请求中包括的域名是否与该第一解析记录中的该第一域名相同。In step 106, when receiving the access request sent by the first user again, it is determined whether the domain name included in the resent access request is the same as the first domain name in the first resolution record.
在步骤107中,当确定该再次发送的访问请求中包括的域名与该第一解析记录中该第一域名相同时,根据缓存的该第一解析记录获取该第一IP地址。In step 107, when it is determined that the domain name included in the resent access request is the same as the first domain name in the first parsing record, the first IP address is obtained according to the cached first parsing record.
在步骤108中,将该第一IP地址发送给该第一用户。In step 108, the first IP address is sent to the first user.
由此可见,当同一用户多次对相同的域名进行访问时,可以直接根据该用户的IP地址,在缓存的该第一解析记录中查找该域名对应的第一IP地址,而无需重新向域名解析设备发送解析请求。Therefore, when the same user accesses the same domain name multiple times, the first IP address corresponding to the domain name may be searched in the first parsed record of the cache according to the IP address of the user, without re-locating the domain name. The parsing device sends a parsing request.
图5是根据图1所示实施例示出的又一种缓存解析记录方法的流程图,如图5所示,当该第一解析记录包括该第一用户的IP地址、该第一域名以及该用户IP地址段三者的组合时,该步骤104可以包括以下步骤。FIG. 5 is a flowchart of still another cache parsing recording method according to the embodiment shown in FIG. 1. As shown in FIG. 5, when the first parsing record includes the first user's IP address, the first domain name, and the When the combination of the user IP address segments is three, the step 104 may include the following steps.
步骤1041,确定该第一用户的IP地址所属的用户IP地址段。Step 1041: Determine a user IP address segment to which the IP address of the first user belongs.
示例地,该用户IP地址段的范围可以依据同一地理区域、或者同一网络运营商或者同一局域网络(比如一个企业中的多个用户)的多个用户的IP地址来确定。或者,该IP地址段的范围也可以是域名解析装置内部根据用户对地址段大小的需求自定义的。例如,该IP地址段可以根据用户的需求被定义为IPv4的24位掩码。For example, the range of the user IP address segment may be determined according to the same geographical area, or the IP address of multiple users of the same network operator or the same local area network (such as multiple users in an enterprise). Alternatively, the range of the IP address segment may also be customized within the domain name resolution device according to the user's requirement for the size of the address segment. For example, the IP address segment can be defined as a 24-bit mask of IPv4 according to the needs of the user.
步骤1042,将该第一用户的IP地址、该第一域名以及用户IP地址段三者的组合作为该第一解析记录进行缓存。Step 1042: cache the combination of the first user's IP address, the first domain name, and the user IP address segment as the first resolution record.
图6是根据一示例性实施例示出的又一种域名解析方法的流程图,如图6所示,当该第一解析记录包括该第一用户的IP地址、该第一域名以及该用户IP地址段三者的组合时,该域名解析方法还可以包括以下步骤。FIG. 6 is a flowchart of still another method for domain name resolution according to an exemplary embodiment. As shown in FIG. 6, when the first resolution record includes an IP address of the first user, the first domain name, and the user IP. When the combination of the three address segments, the domain name resolution method may further include the following steps.
步骤109,当接收到第二用户发送的访问请求时,确定该第二用户发送的访问请求中包括的域名是否与该第一解析记录中该第一域名相同。Step 109: When receiving the access request sent by the second user, determine whether the domain name included in the access request sent by the second user is the same as the first domain name in the first resolution record.
示例地,当该第二用户发送的访问请求中包括的域名与该第一解析记录中该第一域名相同时,继续进行步骤110。For example, when the domain name included in the access request sent by the second user is the same as the first domain name in the first resolution record, step 110 is continued.
步骤110,确定该第二用户的IP地址是否属于该用户IP地址段。Step 110: Determine whether the IP address of the second user belongs to the user IP address segment.
示例地,当确定该第二用户的IP地址属于该用户IP地址段时,可以获取该用户IP地址段,并继续步骤111。 For example, when it is determined that the IP address of the second user belongs to the user IP address segment, the user IP address segment may be acquired, and step 111 is continued.
步骤111,根据缓存的该第一解析记录获取该第一IP地址。Step 111: Acquire the first IP address according to the cached first parsing record.
示例地,可以根据该用户IP地址段获取该第一IP地址。For example, the first IP address can be obtained according to the user IP address segment.
步骤112,将该第一IP地址发送给该第二用户,该第二用户与该第一用户为相同或不同用户。Step 112: Send the first IP address to the second user, where the second user is the same or different user as the first user.
既可以理解为,不同用户的IP地址可能来自同一个IP地址段,而这些IP地址段的地理位置或者网络运营商可能是相同的,那么对于这样的一批用户则不用为每一个用户都缓存一个解析记录,可以缓存一个解析记录即可,使这些属于同一IP地址段的用户共享一个解析记录。示例地,还是以上述图2所述的实施例为例,在缓存时可以确定用户1和用户2所属的用户IP地址段,从而为用户1和用户2缓存的解析记录可以表示为表3所示的形式:It can be understood that the IP addresses of different users may come from the same IP address segment, and the geographical location of these IP address segments or the network operator may be the same, so for such a group of users, it is not necessary to cache for each user. A parsing record can cache a parsing record so that users belonging to the same IP address segment share a parsing record. For example, the embodiment described in FIG. 2 is taken as an example, and the user IP address segment to which the user 1 and the user 2 belong can be determined during the buffering, so that the parsing records cached for the user 1 and the user 2 can be represented as Table 3. Form of presentation:
表3table 3
key value 超时时间(秒)Timeout (seconds)
1.1.1.0/24_www.exmaple.com1.1.1.0/24_www.exmaple.com 3.3.3.33.3.3.3 120120
2.2.2.0/24_www.exmaple.com2.2.2.0/24_www.exmaple.com 4.4.4.44.4.4.4 120120
其中,1.1.1.0/24表示IP从1.1.1.0~1.1.1.24的IP地址段,当IP地址在这个范围内的用户再次请求访问www.exmaple.com时,不再为该用户进行DNS查询以及解析记录的缓存,而是直接从表3中的记录中获取3.3.3.3的IP地址给该用户。2.2.2.0/24与1.1.1.0/24同理,并且在于引导域名的情况向也同样适用上述方案,其方法与表3所示的方法相同,不再赘述。1.1.1.0/24 indicates that the IP address segment of the IP from 1.1.1.0 to 1.1.1.24, when the user whose IP address is in this range requests to access www.exmaple.com again, the DNS query is no longer performed for the user. The cache of the record is parsed, and the IP address of 3.3.3.3 is obtained directly from the record in Table 3 to the user. 2.2.2.0/24 is the same as 1.1.1.0/24, and the above scheme is also applicable to the case of guiding the domain name. The method is the same as the method shown in Table 3, and will not be described again.
由此可见,当来源与同一IP地址段的一个或多个用户多次对相同的域名进行访问时,可以直接根据该用户的IP地址所在的IP地址段,在缓存的该第一解析记录中查找该域名对应的第一IP地址,而无需重新向域名解析设备发送解析请求。Therefore, when the source and the one or more users of the same IP address segment access the same domain name multiple times, the IP address segment where the IP address of the user is located may be directly in the first parsed record cached. Find the first IP address corresponding to the domain name without resending the resolution request to the domain name resolution device.
图7是根据另一示例性实施例示出的一种域名解析方法的流程图,如图7所示,该方法还可以包括以下步骤。FIG. 7 is a flowchart of a domain name resolution method according to another exemplary embodiment. As shown in FIG. 7, the method may further include the following steps.
步骤113,在缓存该第一解析记录时,为该第一解析记录设置超时时间。Step 113: Set a timeout period for the first parsing record when the first parsing record is cached.
示例地,当缓存该第一解析记录时,还可以对该第一解析记录的超时时间进行设置,该超时时间可以被标记为TTL(Time to life,生存时间)。For example, when the first parsing record is cached, the timeout period of the first parsing record may also be set, and the timeout period may be marked as TTL (Time to life).
步骤114,当该第一解析记录缓存时长超过该超时时间时,将该第一解 析记录删除。Step 114: When the first parsing record cache duration exceeds the timeout period, the first solution is obtained. Analysis of record deletion.
图8是根据图1所示实施例示出的一种域名IP地址获取方法的流程图,如图8所示,该步骤103可以包括以下步骤。FIG. 8 is a flowchart of a method for acquiring a domain name IP address according to the embodiment shown in FIG. 1. As shown in FIG. 8, the step 103 may include the following steps.
步骤1031,从该域名解析设备获取根据该第一域名确定的第二域名,该第二域名为该第一域名的别名域名。Step 1031: Obtain a second domain name determined according to the first domain name from the domain name resolution device, where the second domain name is an alias domain name of the first domain name.
示例地,当该第一域名为别名域名时,该第一域名被映射到一个第二域名上,需要对这个第二域名重新进行请求,因此可以执行步骤1032。For example, when the first domain name is an alias domain name, the first domain name is mapped to a second domain name, and the second domain name needs to be re-requested, so step 1032 can be performed.
步骤1032,将该第一用户的IP地址和该第二域名发送至该域名解析设备。Step 1032: Send the IP address of the first user and the second domain name to the domain name resolution device.
步骤1033,从该域名解析设备获取该第二域名的IP地址,该第二域名的IP地址是根据该第一用户的IP地址的网络属性确定的。Step 1033: Obtain an IP address of the second domain name from the domain name resolution device, where the IP address of the second domain name is determined according to a network attribute of the IP address of the first user.
步骤1034,将该第二域名的IP地址确定为该第一IP地址。Step 1034: Determine the IP address of the second domain name as the first IP address.
由此可见,可以通过对该别名域名的域名解析,确定该第一域名对应的IP地址。Therefore, the IP address corresponding to the first domain name can be determined by the domain name resolution of the alias domain name.
综上所述,本公开实施例提供的域名解析的方法,接收第一用户发送的IP地址和需要访问的第一域名,该第一用户为访问该第一域名的多个用户中的任一用户;将该第一用户的互联网协议IP地址和该第一域名发送至域名解析设备;从该域名解析设备获取根据该第一用户的IP地址的网络属性确定的该第一域名的第一IP地址;根据该第一用户的IP地址、该第一域名以及该第一IP地址为该第一用户缓存第一解析记录;将该第一IP地址发送给该第一用户。本公开能够根据发出引导域名、非引导域名或者别名记录解析请求的不同用户的源IP地址,针对该域名,返回最适合该用户的递归解析或者权威解析的结果,实现域名的递归解析和权威解析的多用户差异化查询。In summary, the method for domain name resolution provided by the embodiment of the present disclosure receives an IP address sent by a first user and a first domain name to be accessed, and the first user is any one of multiple users accessing the first domain name. a user: sending the first user's Internet Protocol IP address and the first domain name to the domain name resolution device; and obtaining, from the domain name resolution device, the first IP address of the first domain name determined according to the network attribute of the first user's IP address Addressing: storing, by the first user, an IP address, the first domain name, and the first IP address, a first parsing record for the first user; sending the first IP address to the first user. The disclosure can report the recursive resolution or authoritative analysis result most suitable for the user according to the source IP address of the different users that issue the boot domain name, the non-boot domain name or the alias record, and implement the recursive resolution and authoritative analysis of the domain name. Multi-user differentiated queries.
图9是根据一示例性实施例示出的一种域名解析装置的框图,该装置9000可以用于执行图1所述的方法,该装置9000可以通过软件、硬件或者两者的结合实现成为服务器的部分或者全部,该服务器可以为上述应用场景中所述的服务器。参见图9,该装置9000可以包括:FIG. 9 is a block diagram of a domain name resolution apparatus, which may be used to perform the method described in FIG. 1 , which may be implemented as a server by software, hardware, or a combination of both, according to an exemplary embodiment. In part or in whole, the server may be the server described in the above application scenario. Referring to Figure 9, the apparatus 9000 can include:
请求接收模块9010,用于接收第一用户发送的访问请求,该访问请求包括该第一用户的IP地址和需要访问的第一域名,该第一用户为访问该第一域名的多个用户中的任一用户。 The request receiving module 9010 is configured to receive an access request sent by the first user, where the access request includes an IP address of the first user and a first domain name to be accessed, where the first user is a plurality of users accessing the first domain name. Any user.
请求发送模块9020,用于将该第一用户的IP地址和该第一域名发送至域名解析设备。The request sending module 9020 is configured to send the IP address of the first user and the first domain name to the domain name resolution device.
地址确定模块9030,用于从该域名解析设备获取该第一域名的第一IP地址,该第一IP地址是根据该第一用户的IP地址的网络属性确定的。The address determining module 9030 is configured to obtain, by the domain name resolution device, a first IP address of the first domain name, where the first IP address is determined according to a network attribute of an IP address of the first user.
记录缓存模块9040,用于根据该第一用户的IP地址、该第一域名以及该第一IP地址为该第一用户缓存第一解析记录。The record cache module 9040 is configured to cache the first parsing record for the first user according to the first user's IP address, the first domain name, and the first IP address.
地址发送模块9050,用于将该第一IP地址发送给该第一用户。The address sending module 9050 is configured to send the first IP address to the first user.
可选的,该记录缓存模块9040,可以用于:Optionally, the record caching module 9040 can be used to:
将该第一用户的IP地址、该第一域名以及该第一IP地址三者的组合作为该第一解析记录进行缓存。The combination of the first user's IP address, the first domain name, and the first IP address is cached as the first analysis record.
可选的,图10是根据一示例性实施例示出的另一种域名解析装置的框图,该装置9000可以用于执行图4所述的方法。参见图10,该装置9000还可以包括:域名识别模块9060和地址获取模块9070。Optionally, FIG. 10 is a block diagram of another domain name resolution apparatus, which may be used to perform the method described in FIG. 4, according to an exemplary embodiment. Referring to FIG. 10, the apparatus 9000 may further include: a domain name identification module 9060 and an address obtaining module 9070.
该域名识别模块9060,用于当接收到该第一用户再次发送的访问请求时,确定该再次发送的访问请求中包括的域名是否与该第一解析记录中的该第一域名相同。The domain name identification module 9060 is configured to determine, when receiving the access request sent by the first user, whether the domain name included in the resent access request is the same as the first domain name in the first resolution record.
该地址获取模块9070,用于当确定该再次发送的访问请求中包括的域名与该第一解析记录中该第一域名相同时,根据缓存的该第一解析记录获取该第一IP地址。The address obtaining module 9070 is configured to obtain the first IP address according to the cached first parsing record when it is determined that the domain name included in the resent access request is the same as the first domain name in the first parsing record.
该地址发送模块9050,用于将该第一IP地址发送给该第一用户。The address sending module 9050 is configured to send the first IP address to the first user.
可选的,该记录缓存模块9040,还可以用于:Optionally, the record caching module 9040 is further configured to:
确定该第一用户的IP地址所属的用户IP地址段。Determine the user IP address segment to which the IP address of the first user belongs.
将该第一用户的IP地址、该第一域名以及用户IP地址段三者的组合作为该第一解析记录进行缓存。The combination of the first user's IP address, the first domain name, and the user IP address segment is cached as the first analysis record.
可选的,图11是根据一示例性实施例示出的又一种域名解析装置的框图,该装置9000可以用于执行图6所述的方法。参见图11,该装置9000还可以包括:域名识别模块9060、地址段确定模块9080以及地址获取模块9070。Optionally, FIG. 11 is a block diagram of still another domain name resolution apparatus, which may be used to perform the method described in FIG. 6 according to an exemplary embodiment. Referring to FIG. 11, the device 9000 may further include: a domain name identification module 9060, an address segment determining module 9080, and an address obtaining module 9070.
该域名识别模块9060,还用于当接收到第二用户发送的访问请求时,确定该第二用户发送的访问请求中包括的域名是否与该第一解析记录中该第一域名相同。The domain name identification module 9060 is further configured to: when receiving the access request sent by the second user, determine whether the domain name included in the access request sent by the second user is the same as the first domain name in the first resolution record.
该地址段确定模块9080,用于当确定该再次发送的访问请求中包括的域 名与该第一解析记录中该第一域名相同时,确定该第二用户的IP地址是否属于该用户IP地址段。The address segment determining module 9080 is configured to determine a domain included in the resent access request When the name is the same as the first domain name in the first parsing record, it is determined whether the IP address of the second user belongs to the user IP address segment.
该地址获取模块9070,还用于当确定该第二用户的IP地址是否属于该用户IP地址段时,根据缓存的该第一解析记录获取该第一IP地址。The address obtaining module 9070 is further configured to: when determining whether the IP address of the second user belongs to the user IP address segment, obtain the first IP address according to the cached first parsing record.
该地址发送模块9050,还用于将该第一IP地址发送给该第二用户,该第二用户与该第一用户为相同或不同用户。The address sending module 9050 is further configured to send the first IP address to the second user, where the second user is the same user or a different user.
图12是根据一示例性实施例示出的又一种域名解析装置的框图,该装置9000可以用于执行图7所述的方法。参见图12,该装置9000还可以包括:FIG. 12 is a block diagram of still another domain name resolution apparatus, which may be used to perform the method described in FIG. 7, according to an exemplary embodiment. Referring to FIG. 12, the device 9000 may further include:
超时设置模块9090,用于在缓存该第一解析记录时,为该第一解析记录设置超时时间。The timeout setting module 9090 is configured to set a timeout period for the first parsing record when the first parsing record is cached.
记录删除模块9100,用于当该第一解析记录缓存时长超过该超时时间时,将该第一解析记录删除。The record deletion module 9100 is configured to delete the first parsing record when the first parsing record cache duration exceeds the timeout period.
可选的,该第一域名为非引导域名,该请求发送模块9020用于:Optionally, the first domain name is a non-boot domain name, and the request sending module 9020 is configured to:
将该第一用户的IP地址和该第一域名发送至域名解析服务器。Sending the IP address of the first user and the first domain name to the domain name resolution server.
其中,该域名解析服务器为HTTP DNS服务器,或者HTTPS DNS服务器,或者EDNS服务器。The domain name resolution server is an HTTP DNS server, or an HTTPS DNS server, or an EDNS server.
可选的,该地址确定模块9030,用于:Optionally, the address determining module 9030 is configured to:
从该域名解析服务器接收该第一IP地址,该第一IP地址为该域名解析服务器根据该第一用户的IP地址所属的地理区域、网络运营商中的至少一者确定该第一域名的IP地址。Receiving, by the domain name resolution server, the first IP address, where the first IP address is determined by the domain name resolution server according to at least one of a geographical area and a network operator to which the IP address of the first user belongs address.
可选的,该第一域名为引导域名,该请求发送模块9020,用于:Optionally, the first domain name is a boot domain name, and the request sending module 9020 is configured to:
将该第一用户的IP地址和该第一域名发送至与该第一域名对应的专用网络的管理中心,该专用网络包括多个接入点。The first user's IP address and the first domain name are sent to a management center of a private network corresponding to the first domain name, and the private network includes a plurality of access points.
可选的,该地址确定模块9030,用于:Optionally, the address determining module 9030 is configured to:
从该域名解析服务器接收该第一IP地址,该第一IP地址为该域名解析服务器根据该第一用户的IP地址所属的地理区域、该第一用户的IP地址所属的网络运营商、该管理中心中的用户与接入点IP地址映射记录中的至少一者确定的用于接入该专用网络的接入点的IP地址。Receiving the first IP address from the domain name resolution server, the first IP address is a network operator to which the domain name resolution server belongs according to the IP address of the first user, a network operator to which the IP address of the first user belongs, and the management The IP address of the access point used to access the private network determined by at least one of the user and the access point IP address mapping record in the center.
其中,该第一用户的IP地址和该第一IP地址包括A记录形式的IP地址,或AAAA记录形式的IP地址。 The IP address of the first user and the first IP address include an IP address in the form of an A record, or an IP address in an AAAA record format.
图13是根据图9所示实施例示出的又一种地址确定模块的框图,该地址确定模块9030可以用于执行图8中所述的方法。参见图13,该地址确定模块9030可以包括:13 is a block diagram of yet another address determination module, which may be used to perform the method described in FIG. 8, in accordance with the embodiment of FIG. Referring to FIG. 13, the address determining module 9030 may include:
别名域名获取子模块9031,用于从该域名解析设备获取根据该第一域名确定的第二域名,该第二域名为该第一域名的别名域名。The alias domain name obtaining sub-module 9031 is configured to obtain, from the domain name resolution device, a second domain name determined according to the first domain name, where the second domain name is an alias domain name of the first domain name.
域名发送子模块9032,用于将该第一用户的IP地址和该第二域名发送至该域名解析设备。The domain name sending submodule 9032 is configured to send the IP address of the first user and the second domain name to the domain name resolution device.
地址获取子模块9033,用于从该域名解析设备获取该第二域名的IP地址,该第二域名的IP地址是根据该第一用户的IP地址的网络属性确定的。The address obtaining sub-module 9033 is configured to obtain an IP address of the second domain name from the domain name resolution device, where the IP address of the second domain name is determined according to a network attribute of the IP address of the first user.
地址确定子模块9034,用于将该第二域名的IP地址确定为该第一IP地址。The address determining submodule 9034 is configured to determine the IP address of the second domain name as the first IP address.
综上所述,本公开实施例提供的域名解析的装置,接收第一用户发送的IP地址和需要访问的第一域名,该第一用户为访问该第一域名的多个用户中的任一用户;将该第一用户的互联网协议IP地址和该第一域名发送至域名解析设备;从该域名解析设备获取根据该第一用户的IP地址的网络属性确定的该第一域名的第一IP地址;根据该第一用户的IP地址、该第一域名以及该第一IP地址为该第一用户缓存第一解析记录;将该第一IP地址发送给该第一用户。本公开能够根据发出引导域名或者非引导域名解析请求的不同用户的源IP地址,针对该第一域名,返回最适合该用户的递归解析或者权威解析的结果,实现域名的递归解析和权威解析的多用户差异化查询。In summary, the apparatus for domain name resolution provided by the embodiment of the present disclosure receives an IP address sent by a first user and a first domain name to be accessed, and the first user is any one of multiple users accessing the first domain name. a user: sending the first user's Internet Protocol IP address and the first domain name to the domain name resolution device; and obtaining, from the domain name resolution device, the first IP address of the first domain name determined according to the network attribute of the first user's IP address Addressing: storing, by the first user, an IP address, the first domain name, and the first IP address, a first parsing record for the first user; sending the first IP address to the first user. The disclosure can return the result of recursive resolution or authoritative analysis that is most suitable for the user according to the source IP address of the different user that issues the boot domain name or the non-boot domain name resolution request, and implement the recursive resolution and authoritative analysis of the domain name. Multi-user differentiated queries.
另外,本公开还提供一种计算机程序产品,该计算机程序产品包含能够由可编程的装置执行的计算机程序,该计算机程序具有当由该可编程的装置执行时用于图1至图10任一所示的方法的代码部分。Additionally, the present disclosure also provides a computer program product comprising a computer program executable by a programmable device, the computer program having any of Figures 1 through 10 when executed by the programmable device The code portion of the method shown.
本公开还提供一种非临时性计算机可读存储介质,该非临时性计算机可读存储介质中包括一个或多个程序,该一个或多个程序用于图1至图10任一所示的方法。The present disclosure also provides a non-transitory computer readable storage medium including one or more programs for use in any of FIGS. 1 through 10 method.
本公开还提供一种电子设备,该电子设备包括:The present disclosure also provides an electronic device, the electronic device comprising:
上述的非临时性计算机可读存储介质;以及The non-transitory computer readable storage medium described above;
一个或者多个处理器,用于执行所述非临时性计算机可读存储介质中的程序。One or more processors for executing a program in the non-transitory computer readable storage medium.
图14是根据另一示例性实施例示出的一种域名解析装置的框图,该域 名解析装置1400可以是一种电子设备,例如可以是在前述应用场景中所述的智能DNS设备。如图14所示,该装置1400可以包括:处理器1401,存储器1402,多媒体组件1403,输入/输出(I/O)接口1404,以及通信组件1405。FIG. 14 is a block diagram of a domain name resolution apparatus according to another exemplary embodiment, the domain The name resolution device 1400 can be an electronic device, such as the smart DNS device described in the aforementioned application scenario. As shown in FIG. 14, the apparatus 1400 can include a processor 1401, a memory 1402, a multimedia component 1403, an input/output (I/O) interface 1404, and a communication component 1405.
其中,处理器1401用于控制该装置1400的整体操作,以完成上述图1至图10任一所示的方法的全部或部分步骤。存储器1402用于存储各种类型的数据以支持在该装置1400的操作,这些数据的例如可以包括用于在该装置1400上操作的任何应用程序或方法的指令,以及应用程序相关的数据,例如联系人数据、收发的消息、图片、音频、视频等等。该存储器1402可以由任何类型的易失性或非易失性存储终端设备或者它们的组合实现,例如静态随机存取存储器(Static Random Access Memory,简称SRAM),电可擦除可编程只读存储器(Electrically Erasable Programmable Read-Only Memory,简称EEPROM),可擦除可编程只读存储器(Erasable Programmable Read-Only Memory,简称EPROM),可编程只读存储器(Programmable Read-Only Memory,简称PROM),只读存储器(Read-Only Memory,简称ROM),磁存储器,快闪存储器,磁盘或光盘。多媒体组件1403可以包括屏幕和音频组件。其中屏幕例如可以是触摸屏,音频组件用于输出和/或输入音频信号。例如,音频组件可以包括一个麦克风,麦克风用于接收外部音频信号。所接收的音频信号可以被进一步存储在存储器1402或通过通信组件1405发送。音频组件还包括至少一个扬声器,用于输出音频信号。I/O接口1404为处理器1401和其他接口模块之间提供接口,上述其他接口模块可以是键盘,鼠标,按钮等。这些按钮可以是虚拟按钮或者实体按钮。通信组件1405用于该装置1400与其他终端设备之间进行有线或无线通信。无线通信,例如Wi-Fi,蓝牙,近场通信(Near Field Communication,简称NFC),2G、3G或4G,或它们中的一种或几种的组合,因此相应的该通信组件1405可以包括:Wi-Fi模块,蓝牙模块,NFC模块。The processor 1401 is configured to control the overall operation of the apparatus 1400 to complete all or part of the steps of the method shown in any of the foregoing FIGS. 1 to 10. Memory 1402 is used to store various types of data to support operations at the device 1400, such as may include instructions for any application or method operating on the device 1400, as well as application related data, such as Contact data, sent and received messages, pictures, audio, video, and more. The memory 1402 can be implemented by any type of volatile or non-volatile storage terminal device or a combination thereof, such as Static Random Access Memory (SRAM), electrically erasable programmable read only memory. (Electrically Erasable Programmable Read-Only Memory, EEPROM for short), Erasable Programmable Read-Only Memory (EPROM), Programmable Read-Only Memory (PROM) Read-Only Memory (ROM), magnetic memory, flash memory, disk or optical disk. The multimedia component 1403 can include a screen and an audio component. The screen may be, for example, a touch screen, and the audio component is used to output and/or input an audio signal. For example, the audio component can include a microphone for receiving an external audio signal. The received audio signal may be further stored in memory 1402 or transmitted via communication component 1405. The audio component also includes at least one speaker for outputting an audio signal. The I/O interface 1404 provides an interface between the processor 1401 and other interface modules, such as a keyboard, a mouse, a button, and the like. These buttons can be virtual buttons or physical buttons. Communication component 1405 is used for wired or wireless communication between the device 1400 and other terminal devices. Wireless communication, such as Wi-Fi, Bluetooth, Near Field Communication (NFC), 2G, 3G or 4G, or a combination of one or more of them, so the corresponding communication component 1405 can include: Wi-Fi module, Bluetooth module, NFC module.
在一示例性实施例中,装置1400可以被一个或多个应用专用集成电路(Application Specific Integrated Circuit,简称ASIC)、数字信号处理器(Digital Signal Processor,简称DSP)、数字信号处理终端设备(Digital Signal Processing Device,简称DSPD)、可编程逻辑器件(Programmable Logic Device,简称PLD)、现场可编程门阵列(Field Programmable Gate Array,简称FPGA)、 控制器、微控制器、微处理器或其他电子元件实现,用于执行上述的终端设备的监控方法。In an exemplary embodiment, the device 1400 may be configured by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), and digital signal processing terminals (Digital). Signal Processing Device (DSPD), Programmable Logic Device (PLD), Field Programmable Gate Array (FPGA), A controller, a microcontroller, a microprocessor or other electronic component is implemented for performing the above-described monitoring method of the terminal device.
在另一示例性实施例中,还提供了一种包括指令的非临时性计算机可读存储介质,例如包括指令的存储器1402,上述指令可由装置1400的处理器1401执行以完成上述的终端设备的监控方法。示例地,该非临时性计算机可读存储介质可以是ROM、随机存取存储器(Random Access Memory,简称RAM)、CD-ROM、磁带、软盘和光数据存储终端设备等。In another exemplary embodiment, there is also provided a non-transitory computer readable storage medium comprising instructions, such as a memory 1402 comprising instructions executable by processor 1401 of apparatus 1400 to perform the terminal device described above Monitoring method. By way of example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage terminal device.
图15是根据另一示例性实施例示出的另一种域名解析装置的框图,该装置1500可以是一种服务器,其可以由若干台服务器组成的服务器集群,或者可以是一个云计算服务中心。参照图15,装置1500包括处理器1501、存储器1502、I/O接口1503以及网络接口1504,其中该存储器1502可以用于存储可由处理器1501的执行的指令,处理器1502可以执行这些指令,以执行上述的图1至图10任一所示的方法。FIG. 15 is a block diagram of another domain name resolution apparatus according to another exemplary embodiment. The apparatus 1500 may be a server, which may be a server cluster composed of several servers, or may be a cloud computing service center. Referring to FIG. 15, the apparatus 1500 includes a processor 1501, a memory 1502, an I/O interface 1503, and a network interface 1504, wherein the memory 1502 can be used to store instructions executable by the processor 1501, and the processor 1502 can execute the instructions to The method shown in any of the above FIGS. 1 to 10 is performed.
以上结合附图详细描述了本公开的优选实施方式,但是,本公开并不限于上述实施方式中的具体细节,在本公开的技术构思范围内,可以对本公开的技术方案进行多种简单变型,这些简单变型均属于本公开的保护范围。The preferred embodiments of the present disclosure have been described in detail above with reference to the accompanying drawings. However, the present disclosure is not limited to the specific details of the above embodiments, and various simple modifications can be made to the technical solutions of the present disclosure within the scope of the technical idea of the present disclosure. These simple variations are all within the scope of the disclosure.
另外需要说明的是,在上述具体实施方式中所描述的各个具体技术特征,在不矛盾的情况下,可以通过任何合适的方式进行组合,为了避免不必要的重复,本公开对各种可能的组合方式不再另行说明。It should be further noted that the specific technical features described in the above specific embodiments may be combined in any suitable manner without contradiction. In order to avoid unnecessary repetition, the present disclosure is applicable to various possibilities. The combination method will not be described separately.
此外,本公开的各种不同的实施方式之间也可以进行任意组合,只要其不违背本公开的思想,其同样应当视为本公开所公开的内容。 In addition, any combination of various embodiments of the present disclosure may be made as long as it does not deviate from the idea of the present disclosure, and should also be regarded as the disclosure of the present disclosure.

Claims (23)

  1. 一种域名解析方法,其特征在于,所述方法包括:A method for domain name resolution, characterized in that the method comprises:
    接收第一用户发送的访问请求,所述访问请求包括所述第一用户的互联网协议IP地址和需要访问的第一域名,所述第一用户为访问所述第一域名的多个用户中的任一用户;Receiving an access request sent by the first user, where the access request includes an Internet Protocol IP address of the first user and a first domain name to be accessed, where the first user is among a plurality of users accessing the first domain name Any user;
    将所述第一用户的IP地址和所述第一域名发送至域名解析设备;Sending the IP address of the first user and the first domain name to the domain name resolution device;
    从所述域名解析设备获取所述第一域名的第一IP地址,所述第一IP地址是根据所述第一用户的IP地址的网络属性确定的;Obtaining, by the domain name resolution device, a first IP address of the first domain name, where the first IP address is determined according to a network attribute of an IP address of the first user;
    根据所述第一用户的IP地址、所述第一域名以及所述第一IP地址为所述第一用户缓存第一解析记录;Caching a first parsing record for the first user according to the IP address of the first user, the first domain name, and the first IP address;
    将所述第一IP地址发送给所述第一用户。Sending the first IP address to the first user.
  2. 根据权利要求1所述的方法,其特征在于,所述根据所述第一用户的IP地址、所述第一域名以及所述第一IP地址为所述第一用户缓存第一解析记录,包括:The method according to claim 1, wherein the first parsing record is cached by the first user according to the IP address of the first user, the first domain name, and the first IP address, including :
    将所述第一用户的IP地址、所述第一域名以及所述第一IP地址三者的组合作为所述第一解析记录进行缓存;And combining a combination of the first user's IP address, the first domain name, and the first IP address as the first parsing record;
    所述方法还包括:The method further includes:
    当接收到所述第一用户再次发送的访问请求时,确定所述再次发送的访问请求中包括的域名是否与所述第一解析记录中的所述第一域名相同;When the access request sent by the first user is received, determining whether the domain name included in the resent access request is the same as the first domain name in the first resolution record;
    当确定所述再次发送的访问请求中包括的域名与所述第一解析记录中所述第一域名相同时,根据缓存的所述第一解析记录获取所述第一IP地址;When it is determined that the domain name included in the re-transmitted access request is the same as the first domain name in the first parsing record, acquiring the first IP address according to the cached first parsing record;
    将所述第一IP地址发送给所述第一用户。Sending the first IP address to the first user.
  3. 根据权利要求1所述的方法,其特征在于,所述根据所述第一用户的IP地址、所述第一域名以及所述第一IP地址为所述第一用户缓存第一解析记录,包括:The method according to claim 1, wherein the first parsing record is cached by the first user according to the IP address of the first user, the first domain name, and the first IP address, including :
    确定所述第一用户的IP地址所属的用户IP地址段;Determining a user IP address segment to which the IP address of the first user belongs;
    将所述第一用户的IP地址、所述第一域名以及所述用户IP地址段三者的组合作为所述第一解析记录进行缓存;And combining a combination of the first user's IP address, the first domain name, and the user IP address segment as the first parsing record;
    所述方法还包括:The method further includes:
    当接收到第二用户发送的访问请求时,确定所述第二用户发送的访问请 求中包括的域名是否与所述第一解析记录中所述第一域名相同;When receiving the access request sent by the second user, determining the access sent by the second user Whether the domain name included in the request is the same as the first domain name in the first parsing record;
    当确定所述再次发送的访问请求中包括的域名与所述第一解析记录中所述第一域名相同时,确定所述第二用户的IP地址是否属于所述用户IP地址段;Determining whether the IP address of the second user belongs to the user IP address segment when it is determined that the domain name included in the re-transmitted access request is the same as the first domain name in the first resolution record;
    当确定所述第二用户的IP地址是否属于所述用户IP地址段时,根据缓存的所述第一解析记录获取所述第一IP地址;When determining whether the IP address of the second user belongs to the user IP address segment, acquiring the first IP address according to the cached first parsing record;
    将所述第一IP地址发送给所述第二用户,所述第二用户与所述第一用户为相同或不同用户。Sending the first IP address to the second user, where the second user is the same or different user as the first user.
  4. 根据权利要求1-3任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1 to 3, wherein the method further comprises:
    在缓存所述第一解析记录时,为所述第一解析记录设置超时时间;Setting a timeout period for the first parsing record when the first parsing record is cached;
    当所述第一解析记录缓存时长超过所述超时时间时,将所述第一解析记录删除。And when the first parsing record cache duration exceeds the timeout period, deleting the first parsing record.
  5. 根据权利要求1-4任一项所述的方法,其特征在于,所述第一域名为非引导域名,所述将所述第一用户的IP地址和所述第一域名发送至域名解析设备,包括:The method according to any one of claims 1 to 4, wherein the first domain name is a non-boot domain name, and the IP address of the first user and the first domain name are sent to a domain name resolution device. ,include:
    将所述第一用户的IP地址和所述第一域名发送至域名解析服务器;Sending the IP address of the first user and the first domain name to a domain name resolution server;
    其中,所述域名解析服务器为超文本传输协议域名***HTTP DNS服务器,或者安全超文本传输协议域名***HTTPS DNS服务器,或者扩展域名***EDNS服务器。The domain name resolution server is a hypertext transfer protocol domain name system HTTP DNS server, or a secure hypertext transfer protocol domain name system HTTPS DNS server, or an extended domain name system EDNS server.
  6. 根据权利要求5所述的方法,其特征在于,所述从所述域名解析设备获取所述第一域名的第一IP地址,所述第一IP地址是根据所述第一用户的IP地址的网络属性确定的,包括:The method according to claim 5, wherein the first IP address of the first domain name is obtained from the domain name resolution device, and the first IP address is based on an IP address of the first user. Determined by the network properties, including:
    从所述域名解析服务器接收所述第一IP地址,所述第一IP地址为所述域名解析服务器根据所述第一用户的IP地址所属的地理区域、网络运营商中的至少一者确定所述第一域名的IP地址。Receiving, by the domain name resolution server, the first IP address, where the first IP address is determined by the domain name resolution server according to at least one of a geographical area and a network operator to which the IP address of the first user belongs The IP address of the first domain name.
  7. 根据权利要求1-4任一项所述的方法,其特征在于,所述第一域名为引导域名,所述将所述第一用户的IP地址和所述第一域名发送至域名解析设备,包括:The method according to any one of claims 1 to 4, wherein the first domain name is a boot domain name, and the IP address of the first user and the first domain name are sent to a domain name resolution device, include:
    将所述第一用户的IP地址和所述第一域名发送至与所述第一域名对应的专用网络的管理中心,所述专用网络包括多个接入点。 Transmitting the IP address of the first user and the first domain name to a management center of a private network corresponding to the first domain name, the private network comprising a plurality of access points.
  8. 根据权利要求7所述的方法,其特征在于,所述从所述域名解析设备获取所述第一域名的第一IP地址,所述第一IP地址是根据所述第一用户的IP地址的网络属性确定的,包括:The method according to claim 7, wherein the first IP address of the first domain name is obtained from the domain name resolution device, and the first IP address is based on an IP address of the first user. Determined by the network properties, including:
    从所述域名解析服务器接收所述第一IP地址,所述第一IP地址为所述域名解析服务器根据所述第一用户的IP地址所属的地理区域、所述第一用户的IP地址所属的网络运营商、所述管理中心中的用户与接入点IP地址映射记录中的至少一者确定的用于接入所述专用网络的接入点的IP地址。Receiving, by the domain name resolution server, the first IP address, where the first IP address belongs to the geographic area to which the domain name resolution server belongs according to the IP address of the first user, and the IP address of the first user belongs to An IP address of an access point for accessing the private network determined by at least one of a network operator, a user in the management center, and an access point IP address mapping record.
  9. 根据权利要求1-8任一项所述的方法,其特征在于,所述第一用户的IP地址和所述第一IP地址包括A记录形式的IP地址,或AAAA记录形式的IP地址。The method according to any one of claims 1-8, wherein the IP address of the first user and the first IP address comprise an IP address in the form of an A record, or an IP address in the form of an AAAA record.
  10. 根据权利要求1-4任一项所述的方法,其特征在于,所述从所述域名解析设备获取根据所述第一用户的IP地址的网络属性确定的所述第一域名的第一IP地址,包括:The method according to any one of claims 1 to 4, wherein the obtaining, from the domain name resolution device, a first IP of the first domain name determined according to a network attribute of an IP address of the first user Address, including:
    从所述域名解析设备获取根据所述第一域名确定的第二域名,所述第二域名为所述第一域名的别名域名;Obtaining, by the domain name resolution device, a second domain name determined according to the first domain name, where the second domain name is an alias domain name of the first domain name;
    将所述第一用户的IP地址和所述第二域名发送至所述域名解析设备;Sending the IP address of the first user and the second domain name to the domain name resolution device;
    从所述域名解析设备获取所述第二域名的IP地址,所述第二域名的IP地址是根据所述第一用户的IP地址的网络属性确定的;Obtaining, by the domain name resolution device, an IP address of the second domain name, where the IP address of the second domain name is determined according to a network attribute of an IP address of the first user;
    将所述第二域名的IP地址确定为所述第一IP地址。The IP address of the second domain name is determined as the first IP address.
  11. 一种域名解析装置,其特征在于,所述装置包括:A domain name resolution device, characterized in that the device comprises:
    请求接收模块,用于接收第一用户发送的访问请求,所述访问请求包括所述第一用户的互联网协议IP地址和需要访问的第一域名,所述第一用户为访问所述第一域名的多个用户中的任一用户;a request receiving module, configured to receive an access request sent by the first user, where the access request includes an Internet Protocol IP address of the first user and a first domain name to be accessed, where the first user accesses the first domain name Any of a plurality of users;
    请求发送模块,用于将所述第一用户的IP地址和所述第一域名发送至域名解析设备;a request sending module, configured to send the IP address of the first user and the first domain name to a domain name resolution device;
    地址确定模块,用于从所述域名解析设备获取所述第一域名的第一IP地址,所述第一IP地址是根据所述第一用户的IP地址的网络属性确定的;An address determining module, configured to acquire, by the domain name resolution device, a first IP address of the first domain name, where the first IP address is determined according to a network attribute of an IP address of the first user;
    记录缓存模块,用于根据所述第一用户的IP地址、所述第一域名以及所述第一IP地址为所述第一用户缓存第一解析记录;a record caching module, configured to cache a first parsing record for the first user according to the first user's IP address, the first domain name, and the first IP address;
    地址发送模块,用于将所述第一IP地址发送给所述第一用户。An address sending module, configured to send the first IP address to the first user.
  12. 根据权利要求11所述的装置,其特征在于,所述记录缓存模块,用 于:The apparatus according to claim 11, wherein said record buffer module is used to:
    将所述第一用户的IP地址、所述第一域名以及所述第一IP地址的组合作为所述第一解析记录进行缓存;And combining the IP address of the first user, the first domain name, and the first IP address as the first parsing record;
    所述装置还包括:域名识别模块和地址获取模块;The device further includes: a domain name identification module and an address acquisition module;
    所述域名识别模块,用于当接收到所述第一用户再次发送的访问请求时,确定所述再次发送的访问请求中包括的域名是否与所述第一解析记录中的所述第一域名相同;The domain name identification module is configured to: determine, when the access request sent by the first user is re-sent, whether the domain name included in the re-transmitted access request and the first domain name in the first resolution record the same;
    所述地址获取模块,用于当确定所述再次发送的访问请求中包括的域名与所述第一解析记录中所述第一域名相同时,根据缓存的所述第一解析记录获取所述第一IP地址;The address obtaining module is configured to: when determining that the domain name included in the re-transmitted access request is the same as the first domain name in the first parsing record, acquiring the first parsing record according to the cached first parsing record An IP address;
    所述地址发送模块,用于将所述第一IP地址发送给所述第一用户。The address sending module is configured to send the first IP address to the first user.
  13. 根据权利要求11所述的装置,其特征在于,所述记录缓存模块,还用于:The device according to claim 11, wherein the record buffer module is further configured to:
    确定所述第一用户的IP地址所属的用户IP地址段;Determining a user IP address segment to which the IP address of the first user belongs;
    将所述第一用户的IP地址、所述第一域名以及所述用户IP地址段的组合作为所述第一解析记录进行缓存;And combining the IP address of the first user, the first domain name, and the user IP address segment as the first parsing record;
    所述装置还包括:域名识别模块、地址段确定模块以及地址获取模块;The device further includes: a domain name identification module, an address segment determining module, and an address obtaining module;
    所述域名识别模块,还用于当接收到第二用户发送的访问请求时,确定所述第二用户发送的访问请求中包括的域名是否与所述第一解析记录中所述第一域名相同;The domain name identification module is further configured to: determine, when receiving the access request sent by the second user, whether the domain name included in the access request sent by the second user is the same as the first domain name in the first resolution record ;
    所述地址段确定模块,用于当确定所述再次发送的访问请求中包括的域名与所述第一解析记录中所述第一域名相同时,确定所述第二用户的IP地址是否属于所述用户IP地址段;The address segment determining module, configured to determine, when the domain name included in the resent access request is the same as the first domain name in the first resolution record, determine whether the IP address of the second user belongs to the User IP address segment;
    所述地址获取模块,还用于当确定所述第二用户的IP地址是否属于所述用户IP地址段时,根据缓存的所述第一解析记录获取所述第一IP地址;The address obtaining module is further configured to: when determining whether the IP address of the second user belongs to the user IP address segment, acquire the first IP address according to the cached first parsing record;
    所述地址发送模块,还用于将所述第一IP地址发送给所述第二用户,所述第二用户与所述第一用户为相同或不同用户。The address sending module is further configured to send the first IP address to the second user, where the second user is the same or different user as the first user.
  14. 根据权利要求11-13任一项所述的装置,其特征在于,所述装置还包括:The device according to any one of claims 11 to 13, wherein the device further comprises:
    超时设置模块,用于在缓存所述第一解析记录时,为所述第一解析记录设置超时时间; a timeout setting module, configured to set a timeout period for the first parsing record when the first parsing record is cached;
    记录删除模块,用于当所述第一解析记录缓存时长超过所述超时时间时,将所述第一解析记录删除。And a record deletion module, configured to delete the first parsing record when the first parsing record cache duration exceeds the timeout period.
  15. 根据权利要求11-14任一项所述的装置,其特征在于,所述第一域名为非引导域名,所述请求发送模块,用于:The device according to any one of claims 11 to 14, wherein the first domain name is a non-boot domain name, and the request sending module is configured to:
    将所述第一用户的IP地址和所述第一域名发送至域名解析服务器;Sending the IP address of the first user and the first domain name to a domain name resolution server;
    其中,所述域名解析服务器为超文本传输协议域名***HTTP DNS服务器,或者安全超文本传输协议域名***HTTPS DNS服务器,或者扩展域名***EDNS服务器。The domain name resolution server is a hypertext transfer protocol domain name system HTTP DNS server, or a secure hypertext transfer protocol domain name system HTTPS DNS server, or an extended domain name system EDNS server.
  16. 根据权利要求15所述的装置,其特征在于,所述地址确定模块,用于:The device according to claim 15, wherein the address determining module is configured to:
    从所述域名解析服务器接收所述第一IP地址,所述第一IP地址为所述域名解析服务器根据所述第一用户的IP地址所属的地理区域、网络运营商中的至少一者确定所述第一域名的IP地址。Receiving, by the domain name resolution server, the first IP address, where the first IP address is determined by the domain name resolution server according to at least one of a geographical area and a network operator to which the IP address of the first user belongs The IP address of the first domain name.
  17. 根据权利要求11-14任一项所述的装置,其特征在于,所述第一域名为引导域名,所述请求发送模块,用于:The device according to any one of claims 11 to 14, wherein the first domain name is a boot domain name, and the request sending module is configured to:
    将所述第一用户的IP地址和所述第一域名发送至与所述第一域名对应的专用网络的管理中心,所述专用网络包括多个接入点。Transmitting the IP address of the first user and the first domain name to a management center of a private network corresponding to the first domain name, the private network comprising a plurality of access points.
  18. 根据权利要求17所述的装置,其特征在于,所述地址确定模块,用于:The device according to claim 17, wherein the address determining module is configured to:
    从所述域名解析服务器接收所述第一IP地址,所述第一IP地址为所述域名解析服务器根据所述第一用户的IP地址所属的地理区域、所述第一用户的IP地址所属的网络运营商、所述管理中心中的用户与接入点IP地址映射记录中的至少一者确定的用于接入所述专用网络的接入点的IP地址。Receiving, by the domain name resolution server, the first IP address, where the first IP address belongs to the geographic area to which the domain name resolution server belongs according to the IP address of the first user, and the IP address of the first user belongs to An IP address of an access point for accessing the private network determined by at least one of a network operator, a user in the management center, and an access point IP address mapping record.
  19. 根据权利要求11-18任一项所述的装置,其特征在于,所述第一用户的IP地址和所述第一IP地址包括A记录形式的IP地址,或AAAA记录形式的IP地址。The apparatus according to any one of claims 11-18, wherein the IP address of the first user and the first IP address comprise an IP address in the form of an A record, or an IP address in the form of an AAAA record.
  20. 根据权利要求11-14任一项所述的装置,其特征在于,所述地址确定模块,包括:The device according to any one of claims 11 to 14, wherein the address determining module comprises:
    别名域名获取子模块,用于从所述域名解析设备获取根据所述第一域名确定的第二域名,所述第二域名为所述第一域名的别名域名;An alias domain name obtaining sub-module, configured to obtain, by the domain name resolution device, a second domain name determined according to the first domain name, where the second domain name is an alias domain name of the first domain name;
    域名发送子模块,用于将所述第一用户的IP地址和所述第二域名发送 至所述域名解析设备;a domain name sending submodule, configured to send the IP address of the first user and the second domain name To the domain name resolution device;
    地址获取子模块,用于从所述域名解析设备获取所述第二域名的IP地址,所述第二域名的IP地址是根据所述第一用户的IP地址的网络属性确定的;An address obtaining submodule, configured to acquire an IP address of the second domain name from the domain name resolution device, where the IP address of the second domain name is determined according to a network attribute of an IP address of the first user;
    地址确定子模块,用于将所述第二域名的IP地址确定为所述第一IP地址。The address determining submodule is configured to determine an IP address of the second domain name as the first IP address.
  21. 一种计算机程序产品,其特征在于,所述计算机程序产品包含能够由可编程的装置执行的计算机程序,所述计算机程序具有当由所述可编程的装置执行时用于执行权利要求1至10中任一项所述的方法的代码部分。A computer program product, comprising: a computer program executable by a programmable device, the computer program having when executed by the programmable device for performing claims 1 to 10 The code portion of the method of any of the preceding claims.
  22. 一种非临时性计算机可读存储介质,其特征在于,所述非临时性计算机可读存储介质中包括一个或多个程序,所述一个或多个程序用于执行权利要求1至10中任一项所述的方法。A non-transitory computer readable storage medium, characterized in that the non-transitory computer readable storage medium comprises one or more programs for performing any of claims 1 to 10. One of the methods described.
  23. 一种电子设备,其特征在于,所述电子设备包括:An electronic device, comprising:
    权利要求22中所述的非临时性计算机可读存储介质;以及The non-transitory computer readable storage medium of claim 22;
    一个或者多个处理器,用于执行所述非临时性计算机可读存储介质中的程序。 One or more processors for executing a program in the non-transitory computer readable storage medium.
PCT/CN2016/111855 2016-12-23 2016-12-23 Domain name resolution method and apparatus WO2018112944A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201680002953.9A CN106797410A (en) 2016-12-23 2016-12-23 Domain name analytic method and device
PCT/CN2016/111855 WO2018112944A1 (en) 2016-12-23 2016-12-23 Domain name resolution method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2016/111855 WO2018112944A1 (en) 2016-12-23 2016-12-23 Domain name resolution method and apparatus

Publications (1)

Publication Number Publication Date
WO2018112944A1 true WO2018112944A1 (en) 2018-06-28

Family

ID=58952248

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/111855 WO2018112944A1 (en) 2016-12-23 2016-12-23 Domain name resolution method and apparatus

Country Status (2)

Country Link
CN (1) CN106797410A (en)
WO (1) WO2018112944A1 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112217915A (en) * 2020-09-28 2021-01-12 中国工商银行股份有限公司 Cloud adaptation transformation method and device for traditional environment internet access area
CN113364895A (en) * 2021-06-29 2021-09-07 中国电信股份有限公司 Method, device, electronic equipment and storage medium for resource scheduling
CN114500471A (en) * 2022-03-28 2022-05-13 北京天维信通科技有限公司 IP address list analysis and maintenance method, system, intelligent terminal and storage medium
CN114553826A (en) * 2022-01-11 2022-05-27 阿里巴巴(中国)有限公司 Domain name management method, domain name management device, electronic apparatus, domain name management medium, and program product
CN115189940A (en) * 2022-07-08 2022-10-14 深圳依时货拉拉科技有限公司 Domain name resolution method and device, computer equipment and computer readable storage medium

Families Citing this family (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107360269A (en) * 2017-07-21 2017-11-17 ***通信集团江苏有限公司 Domain name analysis system optimization method, device, equipment and storage medium
CN111213348B (en) * 2017-10-11 2021-07-16 华为技术有限公司 Method, device and system for domain name resolution in data center system
CN109756584B (en) * 2017-11-07 2022-01-18 中国电信股份有限公司 Domain name resolution method, domain name resolution device and computer readable storage medium
CN108418881A (en) * 2018-03-05 2018-08-17 北京云端智度科技有限公司 A kind of CDN network content distribution system and method
CN108886540B (en) * 2018-06-13 2021-07-23 达闼机器人有限公司 Domain name resolution method, device and computer readable storage medium
CN110636374A (en) * 2018-06-22 2019-12-31 北京京东尚科信息技术有限公司 Method and device for searching information
CN108449283A (en) * 2018-06-22 2018-08-24 郑州云海信息技术有限公司 Domain name analytic method, system, equipment based on load balancing and storage medium
CN109561082A (en) * 2018-11-16 2019-04-02 国网思极网安科技(北京)有限公司 A kind of method and system for distinguishing DNS user
CN109618016B (en) * 2018-12-10 2022-02-22 深圳市网心科技有限公司 DNS request sending and processing method, related method and related device
CN111355819B (en) * 2018-12-24 2022-11-11 北京华为数字技术有限公司 Method and network equipment for analyzing domain name
CN109618024A (en) * 2019-02-01 2019-04-12 网宿科技股份有限公司 A kind of domain name analytic method and system based on HTTP
CN109769043A (en) * 2019-03-14 2019-05-17 中国工商银行股份有限公司 Domain name analytic method, apparatus and system
CN110602270B (en) * 2019-11-01 2022-10-14 北京博睿宏远数据科技股份有限公司 Domain name resolution method and device, computer equipment and storage medium
CN112866424A (en) * 2019-11-28 2021-05-28 华为技术有限公司 Domain name query method and related equipment
CN111064821A (en) * 2019-12-23 2020-04-24 北京达佳互联信息技术有限公司 Method and device for determining IP address of edge node
CN111405079A (en) * 2020-03-06 2020-07-10 深圳市宝能投资集团有限公司 Domain name resolution method and device, storage medium and electronic equipment
CN111541798B (en) * 2020-04-24 2022-09-13 东软睿驰汽车技术(沈阳)有限公司 Domain name resolution method and device and electronic equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102216923A (en) * 2008-11-17 2011-10-12 亚马逊技术有限公司 Request routing and updating routing information utilizing client location information
CN103581213A (en) * 2012-07-19 2014-02-12 阿里巴巴集团控股有限公司 Shared Hosts file application method, equipment and system
CN104917851A (en) * 2015-05-08 2015-09-16 亚信科技(南京)有限公司 Information processing method and DNS buffer server
CN105516385A (en) * 2015-12-02 2016-04-20 传线网络科技(上海)有限公司 Domain name resolution method, server and system

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102739811B (en) * 2011-04-07 2016-03-02 ***通信集团公司 The method and apparatus of domain name mapping
CN103491201A (en) * 2013-08-27 2014-01-01 北京蓝汛通信技术有限责任公司 Domain name resolution method and domain name server
US20150207776A1 (en) * 2014-01-21 2015-07-23 Telecommunication Systems, Inc. Intelligent ip resolver
CN104243627A (en) * 2014-08-29 2014-12-24 华为技术有限公司 Domain name resolution method, device and system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102216923A (en) * 2008-11-17 2011-10-12 亚马逊技术有限公司 Request routing and updating routing information utilizing client location information
CN103581213A (en) * 2012-07-19 2014-02-12 阿里巴巴集团控股有限公司 Shared Hosts file application method, equipment and system
CN104917851A (en) * 2015-05-08 2015-09-16 亚信科技(南京)有限公司 Information processing method and DNS buffer server
CN105516385A (en) * 2015-12-02 2016-04-20 传线网络科技(上海)有限公司 Domain name resolution method, server and system

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112217915A (en) * 2020-09-28 2021-01-12 中国工商银行股份有限公司 Cloud adaptation transformation method and device for traditional environment internet access area
CN112217915B (en) * 2020-09-28 2022-10-11 中国工商银行股份有限公司 Cloud adaptation transformation method and device for traditional environment internet access area
CN113364895A (en) * 2021-06-29 2021-09-07 中国电信股份有限公司 Method, device, electronic equipment and storage medium for resource scheduling
CN113364895B (en) * 2021-06-29 2023-01-13 天翼云科技有限公司 Method, device, electronic equipment and storage medium for resource scheduling
CN114553826A (en) * 2022-01-11 2022-05-27 阿里巴巴(中国)有限公司 Domain name management method, domain name management device, electronic apparatus, domain name management medium, and program product
CN114553826B (en) * 2022-01-11 2023-10-17 阿里巴巴(中国)有限公司 Domain name management method, device, electronic equipment, medium and program product
CN114500471A (en) * 2022-03-28 2022-05-13 北京天维信通科技有限公司 IP address list analysis and maintenance method, system, intelligent terminal and storage medium
CN115189940A (en) * 2022-07-08 2022-10-14 深圳依时货拉拉科技有限公司 Domain name resolution method and device, computer equipment and computer readable storage medium

Also Published As

Publication number Publication date
CN106797410A (en) 2017-05-31

Similar Documents

Publication Publication Date Title
WO2018112944A1 (en) Domain name resolution method and apparatus
CN106068639B (en) The Transparent Proxy certification handled by DNS
US11606388B2 (en) Method for minimizing the risk and exposure duration of improper or hijacked DNS records
US10033818B2 (en) Using listen ranges to deliver content to electronic devices from local caching servers
US10432581B2 (en) Network identification as a service
TWI652585B (en) Method and server for remotely querying information
JP5974079B2 (en) Global traffic management using changed hostnames
US20100281146A1 (en) Dynamic domain name service system and automatic registration method
US11025584B2 (en) Client subnet efficiency by equivalence class aggregation
WO2019010694A1 (en) Method and device for acquiring address of local domain name server and authoritative name server
US20150032905A1 (en) Method and system for associating internet protocol (ip) address, media access control (mac) address and location for a user device
US20160127305A1 (en) Visibility control for domain name system service discovery
US20160218978A1 (en) System and method for suppressing dns requests
RU2642833C2 (en) Method and device for mediere resource support
WO2017166524A1 (en) Domain name parsing method and apparatus
WO2022206549A1 (en) Domain name acquisition method and system, electronic device, equipment, and medium
CN105991568A (en) Proxy realizing device
WO2017000669A1 (en) Centralised management control method, apparatus, and related device for domain name resource record caching
WO2022237729A1 (en) Domain name parsing method and system, electronic apparatus, device, and medium
US10193853B1 (en) Web browser or web service based detection of internet facing DNS server
JP6523768B2 (en) Name resolution device, name resolution method and name resolution program
EP3800833A1 (en) Deep packet inspection application classification systems and methods
CN112769970A (en) Method and system for DNS ECS intelligent transparent transmission
US11381503B2 (en) Data packet routing method and data packet routing device
WO2021129603A1 (en) Method and device for acquiring location information, apparatus, and storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16924882

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 23.10.2019)

122 Ep: pct application non-entry in european phase

Ref document number: 16924882

Country of ref document: EP

Kind code of ref document: A1