[go: up one dir, main page]

CN108462759A - Domain name analytic method and device - Google Patents

Domain name analytic method and device Download PDF

Info

Publication number
CN108462759A
CN108462759A CN201710095758.1A CN201710095758A CN108462759A CN 108462759 A CN108462759 A CN 108462759A CN 201710095758 A CN201710095758 A CN 201710095758A CN 108462759 A CN108462759 A CN 108462759A
Authority
CN
China
Prior art keywords
domain name
dns
address
dns server
record
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201710095758.1A
Other languages
Chinese (zh)
Other versions
CN108462759B (en
Inventor
翁逍克
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nanchang Jinkai Capital Management Co ltd
Original Assignee
Nanchang Black Shark Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nanchang Black Shark Technology Co Ltd filed Critical Nanchang Black Shark Technology Co Ltd
Priority to CN201710095758.1A priority Critical patent/CN108462759B/en
Publication of CN108462759A publication Critical patent/CN108462759A/en
Application granted granted Critical
Publication of CN108462759B publication Critical patent/CN108462759B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

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

Landscapes

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

Abstract

本发明提供一种域名解析方法及装置,通过从域名系统DNS服务器中获取用户的DNS记录;并存储DNS记录,DNS记录包括N个域名和N个网络协议IP地址的一一对应关系,N为大于0的整数;当获取到用户输入的第一域名时,根据DNS记录,获取第一域名对应的第一IP地址。本发明提供的域名解析方法及装置,减少了电子设备与DNS服务器之间频繁的通信。

The present invention provides a domain name resolution method and device, by obtaining the user's DNS record from the domain name system DNS server; An integer greater than 0; when the first domain name input by the user is acquired, the first IP address corresponding to the first domain name is acquired according to the DNS record. The domain name analysis method and device provided by the invention reduce frequent communication between electronic equipment and DNS servers.

Description

域名解析方法及装置Domain name resolution method and device

技术领域technical field

本发明涉及互联网技术,尤其涉及一种域名解析方法及装置。The invention relates to Internet technology, in particular to a domain name resolution method and device.

背景技术Background technique

域名系统(Domain Name System,简称:DNS)是因特网上域名和IP地址相互映射的一个分布式数据库。用户使用电子设备访问互联网上其他服务器的主机时,DNS服务器将用户输入的主机的域名转化为主机的网络协议(Internet Protocol,简称:IP)地址,使用户更方便的访问互联网。其中,用户不需要记住主机名的IP地址数字串,而是直接在电子设备上输入主机的域名,通过主机的域名直接能够访问其他服务器的主机。The Domain Name System (DNS for short) is a distributed database that maps domain names and IP addresses to each other on the Internet. When a user uses an electronic device to access the host of other servers on the Internet, the DNS server converts the domain name of the host entered by the user into the Internet Protocol (Internet Protocol, referred to as: IP) address of the host, so that the user can access the Internet more conveniently. Among them, the user does not need to remember the IP address number string of the host name, but directly enters the domain name of the host on the electronic device, and can directly access the host of other servers through the domain name of the host.

现有技术中,由于用户每次输入域名后电子设备都需要将域名发送至DNS服务器,由DNS服务器将域名转换为IP地址后将IP地址返回电子设备。DNS的RFC标准定义了电子设备的本地DNS缓存库,每次电子设备将域名发送至DNS服务器并接收到IP地址后,将该域名与IP地址的对应关系存至本地DNS缓存库。当用户再次输入该域名后,优先在本地DNS缓存库中寻找域名转换为IP地址的对应关系,以减少电子设备与DNS服务器之间频繁独立的通信。In the prior art, since the electronic device needs to send the domain name to the DNS server every time the user inputs the domain name, the DNS server converts the domain name into an IP address and returns the IP address to the electronic device. The RFC standard of DNS defines the local DNS cache library of the electronic device. Every time the electronic device sends the domain name to the DNS server and receives the IP address, the corresponding relationship between the domain name and the IP address is stored in the local DNS cache library. When the user enters the domain name again, the corresponding relationship between the domain name and the IP address is first searched in the local DNS cache library, so as to reduce frequent independent communications between the electronic device and the DNS server.

采用现有技术,由于不同的用户经常访问的域名并不相同,用户更换电子设备或不同用户使用同一电子设备时,电子设备仍然需要与DNS服务器之间进行频繁的通信。With the existing technology, since different users frequently visit different domain names, when a user changes an electronic device or different users use the same electronic device, the electronic device still needs to communicate frequently with the DNS server.

发明内容Contents of the invention

本发明提供一种域名解析方法及装置,减少了电子设备与DNS服务器之间频繁的通信。The invention provides a domain name analysis method and device, which reduces frequent communication between electronic equipment and DNS servers.

本发明提供一种域名解析方法,包括:从域名系统DNS服务器中获取用户的DNS记录;并存储所述DNS记录,所述DNS记录包括N个域名和N个网络协议IP地址的一一对应关系,所述N为大于0的整数;The present invention provides a domain name resolution method, comprising: obtaining the user's DNS record from the domain name system DNS server; and storing the DNS record, the DNS record including the one-to-one correspondence between N domain names and N network protocol IP addresses , the N is an integer greater than 0;

当获取到所述用户输入的第一域名时,根据所述DNS记录,获取所述第一域名对应的第一IP地址。When the first domain name input by the user is acquired, the first IP address corresponding to the first domain name is acquired according to the DNS record.

在本发明一实施例中,所述根据所述DNS记录,获取所述第一域名对应的第一IP地址,包括:In an embodiment of the present invention, the obtaining the first IP address corresponding to the first domain name according to the DNS record includes:

当所述DNS记录的所述N个域名中包括所述第一域名时,从所述DNS记录中获取所述第一域名对应的所述第一IP地址。When the N domain names in the DNS record include the first domain name, the first IP address corresponding to the first domain name is obtained from the DNS record.

在本发明一实施例中,所述根据所述DNS记录,获取所述第一域名对应的第一IP地址,还包括:In an embodiment of the present invention, the obtaining the first IP address corresponding to the first domain name according to the DNS record further includes:

当所述DNS记录的所述N个域名中不包括所述第一域名时,向所述DNS服务器发送域名解析请求,所述域名解析请求包括所述第一域名;When the first domain name is not included in the N domain names in the DNS record, sending a domain name resolution request to the DNS server, where the domain name resolution request includes the first domain name;

接收所述DNS服务器发送的所述第一IP地址。receiving the first IP address sent by the DNS server.

在本发明一实施例中,所述接收所述DNS服务器发送的所述第一IP地址之后,还包括:In an embodiment of the present invention, after receiving the first IP address sent by the DNS server, further includes:

存储所述第一域名与所述第一IP地址的对应关系;storing the correspondence between the first domain name and the first IP address;

当DNS记录更新时间到达时,将所述第一域名与所述第一IP地址的对应关系发送至所述DNS服务器,以使所述DNS服务器根据第一域名与所述第一IP地址的对应关系更新所述用户的DNS记录。When the DNS record update time arrives, send the correspondence between the first domain name and the first IP address to the DNS server, so that the DNS server can The relationship updates the user's DNS records.

在本发明一实施例中,还包括:In an embodiment of the invention, it also includes:

当第一更新时间到达时,将所述第一域名的访问记录发送给所述DNS服务器,以使所述DNS服务器根据所述第一域名的访问记录以及第一域名与所述第一IP地址的对应关系更新所述用户的DNS记录。When the first update time arrives, send the access record of the first domain name to the DNS server, so that the DNS server can The corresponding relationship updates the DNS record of the user.

在本发明一实施例中,还包括:In an embodiment of the invention, it also includes:

在第二更新时间到达时,接收所述DNS服务器发送的更新后的所述DNS记录。When the second update time arrives, receive the updated DNS record sent by the DNS server.

本发明提供一种域名解析装置,包括:The present invention provides a domain name resolution device, comprising:

DNS记录获取模块,所述DNS记录获取模块用于从域名系统DNS服务器中获取用户的DNS记录;并存储所述DNS记录,所述DNS记录包括N个域名和N个网络协议IP地址的一一对应关系,所述N为大于0的整数;DNS record acquisition module, the DNS record acquisition module is used to obtain the user's DNS record from the domain name system DNS server; and store the DNS record, the DNS record includes one by one of N domain names and N network protocol IP addresses Correspondence, the N is an integer greater than 0;

域名解析模块,所述域名解析模块用于当获取到所述用户输入的第一域名时,根据所述DNS记录,获取所述第一域名对应的第一IP地址。A domain name resolution module, configured to obtain the first IP address corresponding to the first domain name according to the DNS record when the first domain name input by the user is obtained.

在本发明一实施例中,所述域名解析模块具体用于当所述DNS记录的所述N个域名中包括所述第一域名时,从所述DNS记录中获取所述第一域名对应的所述第一IP地址。In an embodiment of the present invention, the domain name resolution module is specifically configured to obtain the domain name corresponding to the first domain name from the DNS record when the N domain names in the DNS record include the first domain name. The first IP address.

在本发明一实施例中,还包括:接收模块;In an embodiment of the present invention, it also includes: a receiving module;

所述域名解析模块具体用于当所述DNS记录的所述N个域名中不包括所述第一域名时,向所述DNS服务器发送域名解析请求,所述域名解析请求包括所述第一域名;The domain name resolution module is specifically configured to send a domain name resolution request to the DNS server when the N domain names in the DNS record do not include the first domain name, and the domain name resolution request includes the first domain name ;

所述接收模块用于接收所述DNS服务器发送的所述第一IP地址。The receiving module is configured to receive the first IP address sent by the DNS server.

在本发明一实施例中,还包括:存储模块和发送模块;In an embodiment of the present invention, it also includes: a storage module and a sending module;

所述存储模块用于存储所述第一域名与所述第一IP地址的对应关系;The storage module is used to store the correspondence between the first domain name and the first IP address;

所述发送模块用于当DNS记录更新时间到达时,将所述第一域名与所述第一IP地址的对应关系发送至所述DNS服务器,以使所述DNS服务器根据第一域名与所述第一IP地址的对应关系更新所述用户的DNS记录。The sending module is configured to send the corresponding relationship between the first domain name and the first IP address to the DNS server when the DNS record update time arrives, so that the DNS server can The corresponding relationship of the first IP address updates the DNS record of the user.

在本发明一实施例中,所述发送模块还用于当第一更新时间到达时,将所述第一域名的访问记录发送给所述DNS服务器,以使所述DNS服务器根据所述第一域名的访问记录以及第一域名与所述第一IP地址的对应关系更新所述用户的DNS记录。In an embodiment of the present invention, the sending module is further configured to send the access record of the first domain name to the DNS server when the first update time arrives, so that the DNS server The access record of the domain name and the corresponding relationship between the first domain name and the first IP address update the DNS record of the user.

在本发明一实施例中,所述接收模块还用于在第二更新时间到达时,接收所述DNS服务器发送的更新后的所述DNS记录。In an embodiment of the present invention, the receiving module is further configured to receive the updated DNS record sent by the DNS server when the second update time arrives.

本发明提供一种域名解析方法及装置,通过从域名系统DNS服务器中获取用户的DNS记录;并存储DNS记录,DNS记录包括N个域名和N个网络协议IP地址的一一对应关系,N为大于0的整数;当获取到用户输入的第一域名时,根据DNS记录,获取第一域名对应的第一IP地址。本发明提供的域名解析方法及装置,减少了电子设备与DNS服务器之间频繁的通信。The present invention provides a domain name resolution method and device, by obtaining the user's DNS record from the domain name system DNS server; An integer greater than 0; when the first domain name input by the user is acquired, the first IP address corresponding to the first domain name is acquired according to the DNS record. The domain name analysis method and device provided by the invention reduce frequent communication between electronic equipment and DNS servers.

附图说明Description of drawings

为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only These are some embodiments of the present invention. For those skilled in the art, other drawings can also be obtained according to these drawings without any creative effort.

图1为本发明域名解析方法实施例一的流程示意图;FIG. 1 is a schematic flow diagram of Embodiment 1 of the domain name resolution method of the present invention;

图2为本发明域名解析方法实施例二的流程示意图;FIG. 2 is a schematic flow diagram of Embodiment 2 of the domain name resolution method of the present invention;

图3为本发明域名解析装置实施例一的结构示意图;FIG. 3 is a schematic structural diagram of Embodiment 1 of the domain name resolution device of the present invention;

图4为本发明域名解析装置实施例二的结构示意图。FIG. 4 is a schematic structural diagram of Embodiment 2 of the domain name resolution device of the present invention.

具体实施方式Detailed ways

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some, not all, embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.

本发明的说明书和权利要求书及上述附图中的术语“第一”、“第二”、“第三”、“第四”等(如果存在)是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的本发明的实施例例如能够以除了在这里图示或描述的那些以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。The terms "first", "second", "third", "fourth", etc. (if any) in the description and claims of the present invention and the above drawings are used to distinguish similar objects, and not necessarily Used to describe a specific sequence or sequence. It is to be understood that the data so used are interchangeable under appropriate circumstances such that the embodiments of the invention described herein are, for example, capable of practice in sequences other than those illustrated or described herein. Furthermore, the terms "comprising" and "having", as well as any variations thereof, are intended to cover a non-exclusive inclusion, for example, a process, method, system, product or device comprising a sequence of steps or elements is not necessarily limited to the expressly listed instead, may include other steps or elements not explicitly listed or inherent to the process, method, product or apparatus.

下面以具体地实施例对本发明的技术方案进行详细说明。下面这几个具体的实施例可以相互结合,对于相同或相似的概念或过程可能在某些实施例不再赘述。The technical solution of the present invention will be described in detail below with specific embodiments. The following specific embodiments may be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments.

图1为本发明域名解析方法实施例一的流程示意图。如图1所示,本实施例域名解析方法包括:FIG. 1 is a schematic flowchart of Embodiment 1 of the domain name resolution method of the present invention. As shown in Figure 1, the domain name resolution method of this embodiment includes:

S101:从域名系统DNS服务器中获取用户的DNS记录,并存储DNS记录,DNS记录包括N个域名和N个网络协议IP地址的一一对应关系,N为大于0的整数。S101: Obtain the DNS record of the user from the Domain Name System DNS server, and store the DNS record. The DNS record includes a one-to-one correspondence between N domain names and N network protocol IP addresses, where N is an integer greater than 0.

具体地,本实施例执行的主体可以是任何能够连接互联网的电子设备。例如:手机、平板电脑或电脑等。本步骤S101可以在用户第一次通过电子设备首次连接互联网时由电子设备执行。当用户通过电子设备连接互联网后,从DNS服务器中获取用户的DNS记录,并将DNS记录存储至电子设备中的用户DNS缓存库中。DNS记录中包括N个域名和N个网络协议IP地址的一一对应关系,N为大于0的整数。Specifically, the subject executed in this embodiment may be any electronic device capable of connecting to the Internet. For example: mobile phone, tablet or computer, etc. This step S101 may be executed by the electronic device when the user first connects to the Internet through the electronic device. After the user connects to the Internet through the electronic device, the user's DNS record is obtained from the DNS server, and the DNS record is stored in the user's DNS cache library in the electronic device. The DNS record includes a one-to-one correspondence between N domain names and N network protocol IP addresses, where N is an integer greater than 0.

可选地,DNS记录中例如可以包括符合用户使用习惯的,即用户最常访问的前N个域名和IP地址。例如:DNS服务器中存储所有注册用户的DNS记录,并为每个用户分配用户名和密码。第一用户在使用手机时,通过手机使用其用户名和密码登陆DNS服务器之后,手机从DNS服务器中获取第一用户的DNS记录并存储在手机的存储空间中。第一用户的DNS记录中例如包括第一用户使用其他电子设备访问互联网时,最常访问的前100条DNS记录,即100个域名和100个网络协议IP地址的一一对应关系。需要说明的是,本实施例不限于此。Optionally, the DNS records may include, for example, the top N domain names and IP addresses that conform to the user's usage habits, that is, the most frequently visited by the user. For example: the DNS server stores the DNS records of all registered users, and assigns a user name and password to each user. When the first user uses the mobile phone, after logging in to the DNS server with his user name and password through the mobile phone, the mobile phone obtains the DNS record of the first user from the DNS server and stores it in the storage space of the mobile phone. The first user's DNS records include, for example, the first 100 most frequently accessed DNS records when the first user uses other electronic devices to access the Internet, that is, the one-to-one correspondence between 100 domain names and 100 network protocol IP addresses. It should be noted that this embodiment is not limited thereto.

S102:当获取到用户输入的第一域名时,根据DNS记录,获取第一域名对应的第一IP地址。S102: When the first domain name input by the user is obtained, according to the DNS record, obtain the first IP address corresponding to the first domain name.

具体地,当电子设备获取到用户输入的第一域名时,即用户希望访问第一域名对应的第一IP地址的内容。则电子设备根据S101中获取的DNS记录,从DNS记录中获取第一域名对应的第一IP地址。由于DNS记录中与用户有关,DNS记录可以理解为用户级的数据库,则若用户所输入的第一域名在DNS记录中时,电子设备直接从DNS记录中获取第一域名对应的第一IP地址,而不用向DNS服务器发送第一域名并由DNS服务器解析第一域名得到第一IP地址,从而减少了电子设备与DNS服务器之间频繁的通信,节省了资源消耗,且提高了服务端即电子设备访问第一IP地址的速度。Specifically, when the electronic device acquires the first domain name input by the user, that is, the user wishes to access content at the first IP address corresponding to the first domain name. Then the electronic device acquires the first IP address corresponding to the first domain name from the DNS record according to the DNS record acquired in S101. Since the DNS record is related to the user, the DNS record can be understood as a user-level database. If the first domain name entered by the user is in the DNS record, the electronic device directly obtains the first IP address corresponding to the first domain name from the DNS record. , instead of sending the first domain name to the DNS server and the DNS server resolves the first domain name to obtain the first IP address, thereby reducing the frequent communication between the electronic device and the DNS server, saving resource consumption, and improving the efficiency of the server, that is, the electronic The speed at which the device accesses the first IP address.

图2为本发明域名解析方法实施例二的流程示意图。如图2所示,本实施例包括:FIG. 2 is a schematic flowchart of Embodiment 2 of the domain name resolution method of the present invention. As shown in Figure 2, this embodiment includes:

S201:当DNS记录的N个域名中包括第一域名时,从DNS记录中获取第一域名对应的第一IP地址。S201: When the N domain names in the DNS record include the first domain name, obtain the first IP address corresponding to the first domain name from the DNS record.

具体地,若DNS记录的N个域名中包括用户所输入的第一域名时,则电子设备直接从DNS记录中获取第一域名对应的第一IP地址。Specifically, if the N domain names in the DNS record include the first domain name input by the user, the electronic device directly acquires the first IP address corresponding to the first domain name from the DNS record.

S202:当DNS记录的N个域名中不包括第一域名时,向DNS服务器发送域名解析请求,域名解析请求包括第一域名。S202: When the N domain names in the DNS record do not include the first domain name, send a domain name resolution request to the DNS server, where the domain name resolution request includes the first domain name.

具体地,S202与S201为并列方案,若DNS记录的N个域名中不包括第一域名时,则电子设备通过域名解析请求向DNS服务器发送第一域名,以使网络侧的DNS服务器解析第一域名得到第一IP地址。Specifically, S202 and S201 are a parallel solution. If the N domain names in the DNS record do not include the first domain name, the electronic device sends the first domain name to the DNS server through a domain name resolution request, so that the DNS server on the network side resolves the first domain name. The domain name gets the first IP address.

S203:接收DNS服务器发送的第一IP地址。S203: Receive the first IP address sent by the DNS server.

具体地,当DNS服务器解析第一域名得到第一IP地址后向电子设备发送第一IP地址。电子设备接收从而得到DNS服务器发送的第一IP地址。Specifically, after the DNS server resolves the first domain name to obtain the first IP address, it sends the first IP address to the electronic device. The electronic device receives and obtains the first IP address sent by the DNS server.

进一步地,在上述实施例中,在S203之后,还包括:存储第一域名与第一IP地址的对应关系;当DNS记录更新时间到达时,将第一域名与第一IP地址的对应关系发送至DNS服务器,以使DNS服务器根据第一域名与第一IP地址的对应关系更新用户的DNS记录。Further, in the above embodiment, after S203, it also includes: storing the correspondence between the first domain name and the first IP address; when the DNS record update time arrives, sending the correspondence between the first domain name and the first IP address to the DNS server, so that the DNS server updates the user's DNS record according to the correspondence between the first domain name and the first IP address.

其中,若DNS记录的N个域名中不包括第一域名时,则在S203之后,将用户访问的第一域名,即不在DNS记录中域名存储至电子设备本地存储单元中,同时存储第一域名与第一IP地址的对应关系。并当DNS记录更新时间到达时,将第一域名与第一IP地址的对应关系发送至DNS服务器,以使DNS服务器根据第一域名与第一IP地址的对应关系更新用户的DNS记录。可选地,DNS记录更新时间可以为一小时或一天。Wherein, if the N domain names in the DNS record do not include the first domain name, then after S203, the first domain name accessed by the user, that is, the domain name not in the DNS record is stored in the local storage unit of the electronic device, and the first domain name is stored at the same time Corresponding relationship with the first IP address. And when the DNS record update time arrives, the corresponding relationship between the first domain name and the first IP address is sent to the DNS server, so that the DNS server updates the DNS record of the user according to the corresponding relationship between the first domain name and the first IP address. Optionally, the DNS record update time can be one hour or one day.

进一步地,在上述实施例中,还包括:Further, in the above embodiments, it also includes:

当第一更新时间到达时,将第一域名的访问记录发送给DNS服务器,以使DNS服务器根据第一域名的访问记录以及第一域名与第一IP地址的对应关系更新用户的DNS记录。When the first update time arrives, the access record of the first domain name is sent to the DNS server, so that the DNS server updates the DNS record of the user according to the access record of the first domain name and the correspondence between the first domain name and the first IP address.

例如:当第一更新时间到达时,将第一时间周期内用户访问的所有第一域名的访问记录发送给DNS服务器,以使DNS服务器根据第一域名的访问记录以及第一域名与第一IP地址的对应关系更新用户的DNS记录。其中,访问记录包括用户访问第一域名的访问周期、访问习惯和/或访问次数等。For example: when the first update time arrives, send all the access records of the first domain name accessed by the user within the first time period to the DNS server, so that the DNS server can The corresponding relationship between addresses updates the user's DNS records. Wherein, the access record includes the access cycle, access habits and/or access times of the user accessing the first domain name.

进一步地,在上述实施例中,还包括:Further, in the above embodiments, it also includes:

在第二更新时间到达时,接收DNS服务器发送的更新后的DNS记录。When the second update time arrives, the updated DNS record sent by the DNS server is received.

例如:当第二更新时间到达时,DNS服务器向电子设备发送更新后的DNS记录,则电子设备接收DNS服务器发送的更新后的DNS记录。For example: when the second update time arrives, the DNS server sends the updated DNS record to the electronic device, and the electronic device receives the updated DNS record sent by the DNS server.

可选地,在上述各实施例中,若DNS记录的N个域名中不包括用户所输入的第一域名时,可以从符合RFC(Request For Comments)标准的DNS缓存库中通过第一域名获取第一IP地址,若DNS缓存库中仍然不包括第一域名,再向DNS服务器发送第一域名,以使DNS服务器解析第一域名得到第一IP地址。Optionally, in each of the above embodiments, if the first domain name entered by the user is not included in the N domain names of the DNS record, the first domain name may be obtained from a DNS cache library that complies with the RFC (Request For Comments) standard. For the first IP address, if the DNS cache still does not include the first domain name, then send the first domain name to the DNS server, so that the DNS server can resolve the first domain name to obtain the first IP address.

图3为本发明域名解析装置实施例一的结构示意图。如图3所示,本实施例域名解析装置包括:DNS记录获取模块301和域名解析模块302。其中,DNS记录获取模块301用于从域名系统DNS服务器中获取用户的DNS记录,并存储DNS记录,DNS记录包括N个域名和N个网络协议IP地址的一一对应关系,N为大于0的整数。域名解析模块302用于当获取到用户输入的第一域名时,根据DNS记录,获取第一域名对应的第一IP地址。FIG. 3 is a schematic structural diagram of Embodiment 1 of the domain name resolution device of the present invention. As shown in FIG. 3 , the domain name resolution device in this embodiment includes: a DNS record acquisition module 301 and a domain name resolution module 302 . Wherein, the DNS record obtaining module 301 is used to obtain the DNS record of the user from the domain name system DNS server, and store the DNS record, the DNS record includes the one-to-one correspondence between N domain names and N network protocol IP addresses, and N is greater than 0 integer. The domain name resolution module 302 is configured to obtain the first IP address corresponding to the first domain name according to DNS records when the first domain name input by the user is obtained.

本实施例所示装置用于执行图1所示域名解析方法,其实现方式与原理类似,不再赘述。The device shown in this embodiment is used to execute the domain name resolution method shown in FIG. 1 , and its implementation method is similar to the principle, which will not be repeated here.

图4为本发明域名解析装置实施例二的结构示意图。图4所示实施例在上述实施例基础上还包括:接收模块401、存储模块402和发送模块403。FIG. 4 is a schematic structural diagram of Embodiment 2 of the domain name resolution device of the present invention. The embodiment shown in FIG. 4 further includes: a receiving module 401 , a storage module 402 and a sending module 403 on the basis of the foregoing embodiments.

进一步地,在上述实施例中,域名解析模块302具体用于当DNS记录的N个域名中包括第一域名时,从DNS记录中获取第一域名对应的第一IP地址。Further, in the above embodiment, the domain name resolution module 302 is specifically configured to obtain the first IP address corresponding to the first domain name from the DNS record when the N domain names in the DNS record include the first domain name.

域名解析模块302具体用于当DNS记录的N个域名中不包括第一域名时,向DNS服务器发送域名解析请求,域名解析请求包括第一域名。接收模块401用于接收DNS服务器发送的第一IP地址。The domain name resolution module 302 is specifically configured to send a domain name resolution request to the DNS server when the N domain names in the DNS record do not include the first domain name, and the domain name resolution request includes the first domain name. The receiving module 401 is configured to receive the first IP address sent by the DNS server.

进一步地,在上述实施例中,存储模块402用于存储第一域名与第一IP地址的对应关系。发送模块403用于当DNS记录更新时间到达时,将第一域名与第一IP地址的对应关系发送至DNS服务器,以使DNS服务器根据第一域名与第一IP地址的对应关系更新用户的DNS记录。Further, in the above embodiment, the storage module 402 is configured to store the correspondence between the first domain name and the first IP address. The sending module 403 is configured to send the correspondence between the first domain name and the first IP address to the DNS server when the DNS record update time arrives, so that the DNS server can update the user's DNS according to the correspondence between the first domain name and the first IP address Record.

进一步地,在上述实施例中,发送模块403还用于当第一更新时间到达时,将第一域名的访问记录发送给DNS服务器,以使DNS服务器根据第一域名的访问记录以及第一域名与第一IP地址的对应关系更新用户的DNS记录。Further, in the above embodiment, the sending module 403 is also configured to send the access record of the first domain name to the DNS server when the first update time arrives, so that the DNS server The corresponding relationship with the first IP address updates the DNS record of the user.

接收模块401还用于在第二更新时间到达时,接收DNS服务器发送的更新后的DNS记录。The receiving module 401 is further configured to receive the updated DNS record sent by the DNS server when the second update time arrives.

本实施例所示装置用于执行图2所示域名解析方法,其实现方式与原理类似,不再赘述。The device shown in this embodiment is used to execute the domain name resolution method shown in FIG. 2 , and its implementation method is similar to the principle, which will not be repeated here.

本领域普通技术人员可以理解:实现上述各方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成。前述的程序可以存储于一计算机可读取存储介质中。该程序在执行时,执行包括上述各方法实施例的步骤;而前述的存储介质包括:ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。Those of ordinary skill in the art can understand that all or part of the steps for implementing the above method embodiments can be completed by program instructions and related hardware. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps including the above-mentioned method embodiments; and the aforementioned storage medium includes: ROM, RAM, magnetic disk or optical disk and other various media that can store program codes.

最后应说明的是:以上各实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述各实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的范围。Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present invention, rather than limiting them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: It is still possible to modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the technical solutions of the various embodiments of the present invention. scope.

Claims (12)

1. a kind of domain name analytic method, which is characterized in that including:
The DNS records of user are obtained from domain name system DNS server, and store the DNS records, and the DNS records include N The one-to-one relationship of a domain name and N number of network protocol IP address, the N are the integer more than 0;
It when getting first domain name input by user, is recorded according to the DNS, obtains first domain name corresponding the One IP address.
2. according to the method described in claim 1, it is characterized in that, described according to DNS records, acquisition first domain name Corresponding first IP address, including:
When N number of domain name of DNS records includes first domain name, described the is obtained in being recorded from the DNS Corresponding first IP address of one domain name.
3. according to the method described in claim 2, it is characterized in that, described according to DNS records, acquisition first domain name Corresponding first IP address further includes:
When not including first domain name in N number of domain name of DNS records, domain name is sent to the dns server Analysis request, domain name analysis request include first domain name;
Receive first IP address that the dns server is sent.
4. according to the method described in claim 3, it is characterized in that, described first for receiving the dns server and sending After IP address, further include:
Store the correspondence of first domain name and first IP address;
When reaching DNS record renewal times, the correspondence of first domain name and first IP address is sent to institute Dns server is stated, so that the dns server updates the use according to the correspondence of the first domain name and first IP address The DNS at family is recorded.
5. according to the method described in claim 4, it is characterized in that, further including:
When reaching the first renewal time, the access record of first domain name is sent to the dns server, so that described Dns server is according to the access record of first domain name and the correspondence of first domain name and first IP address Update the DNS records of the user.
6. method according to claim 4 or 5, which is characterized in that further include:
When reaching the second renewal time, the updated DNS records that the dns server is sent are received.
7. a kind of domain name mapping device, which is characterized in that including:
DNS records acquisition module, DNS of the DNS record acquisition modules for obtaining user from domain name system DNS server Record, and the DNS records are stored, the DNS records include the one-to-one correspondence pass of N number of domain name and N number of network protocol IP address System, the N are the integer more than 0;
Domain name mapping module, domain name parsing module is used for when getting first domain name input by user, according to institute DNS records are stated, corresponding first IP address of first domain name is obtained.
8. device according to claim 7, which is characterized in that
Domain name parsing module is specifically used for when the DNS N number of domain names recorded include first domain name, from Corresponding first IP address of first domain name is obtained in the DNS records.
9. device according to claim 8, which is characterized in that further include:Receiving module;
Domain name parsing module is specifically used for when not including first domain name in N number of domain name that the DNS is recorded, Domain name analysis request is sent to the dns server, domain name analysis request includes first domain name;
The receiving module is used to receive first IP address that the dns server is sent.
10. device according to claim 9, which is characterized in that further include:Memory module and sending module;
The memory module is used to store the correspondence of first domain name and first IP address;
The sending module is used for when reaching DNS record renewal times, by first domain name and first IP address Correspondence is sent to the dns server, so that pair of the dns server according to the first domain name and first IP address It should be related to the DNS records for updating the user.
11. device according to claim 10, which is characterized in that the sending module is additionally operable to arrive when the first renewal time Up to when, the access of first domain name record is sent to the dns server, so that the dns server is according to described the The DNS that the access record of one domain name and the correspondence of first domain name and first IP address update the user remembers Record.
12. the device according to claim 10 or 11, which is characterized in that
The receiving module is additionally operable to when reaching the second renewal time, receives the updated institute that the dns server is sent State DNS records.
CN201710095758.1A 2017-02-22 2017-02-22 Domain name resolution method and device Active CN108462759B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710095758.1A CN108462759B (en) 2017-02-22 2017-02-22 Domain name resolution method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710095758.1A CN108462759B (en) 2017-02-22 2017-02-22 Domain name resolution method and device

Publications (2)

Publication Number Publication Date
CN108462759A true CN108462759A (en) 2018-08-28
CN108462759B CN108462759B (en) 2021-12-21

Family

ID=63222147

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710095758.1A Active CN108462759B (en) 2017-02-22 2017-02-22 Domain name resolution method and device

Country Status (1)

Country Link
CN (1) CN108462759B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108989487A (en) * 2018-09-06 2018-12-11 北京泰策科技有限公司 CDN Optimization Scheduling based on local dns
CN109347945A (en) * 2018-10-12 2019-02-15 北京天融信网络安全技术有限公司 A kind of method and apparatus of nslookup
CN111541798A (en) * 2020-04-24 2020-08-14 东软睿驰汽车技术(沈阳)有限公司 Domain name resolution method and device and electronic equipment
CN119182768A (en) * 2023-06-21 2024-12-24 荣耀终端有限公司 Network access method and electronic equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120108225A1 (en) * 2010-11-01 2012-05-03 Michael Luna Mobile traffic categorization and policy for network use optimization while preserving user experience
CN103581213A (en) * 2012-07-19 2014-02-12 阿里巴巴集团控股有限公司 Shared Hosts file application method, equipment and system
CN104539603A (en) * 2014-12-22 2015-04-22 中国科学院计算机网络信息中心 Safe DNS system based on local analysis and DNS security analysis method
CN106331201A (en) * 2015-07-01 2017-01-11 中兴通讯股份有限公司 Domain name system resource record caching control method and server

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120108225A1 (en) * 2010-11-01 2012-05-03 Michael Luna Mobile traffic categorization and policy for network use optimization while preserving user experience
CN103581213A (en) * 2012-07-19 2014-02-12 阿里巴巴集团控股有限公司 Shared Hosts file application method, equipment and system
CN104539603A (en) * 2014-12-22 2015-04-22 中国科学院计算机网络信息中心 Safe DNS system based on local analysis and DNS security analysis method
CN106331201A (en) * 2015-07-01 2017-01-11 中兴通讯股份有限公司 Domain name system resource record caching control method and server

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108989487A (en) * 2018-09-06 2018-12-11 北京泰策科技有限公司 CDN Optimization Scheduling based on local dns
CN109347945A (en) * 2018-10-12 2019-02-15 北京天融信网络安全技术有限公司 A kind of method and apparatus of nslookup
CN111541798A (en) * 2020-04-24 2020-08-14 东软睿驰汽车技术(沈阳)有限公司 Domain name resolution method and device and electronic equipment
CN111541798B (en) * 2020-04-24 2022-09-13 东软睿驰汽车技术(沈阳)有限公司 Domain name resolution method and device and electronic equipment
CN119182768A (en) * 2023-06-21 2024-12-24 荣耀终端有限公司 Network access method and electronic equipment

Also Published As

Publication number Publication date
CN108462759B (en) 2021-12-21

Similar Documents

Publication Publication Date Title
US8583824B2 (en) Identifying an efficient destination server
US9143389B2 (en) Methods, appratuses, and computer program products for determining a network interface to access a network resource
CN102624920B (en) A method and device for accessing through a proxy server
CN106933871B (en) Short link processing method, device and short link server
CN103888358B (en) Routing method, device, system and gateway equipment
CN102982091B (en) Techniques for Dynamic Domain-Based Isolation
CN103501358B (en) A kind of domain name trustship management method and device
US11303606B1 (en) Hashing name resolution requests according to an identified routing policy
US20140164645A1 (en) Routing table maintenance
CN108462759B (en) Domain name resolution method and device
CN108471458A (en) authoritative DNS service providing method and system
CN109951541A (en) A serial number generation method and server
US11095608B2 (en) Cross protocol association for internet addresses for metadata association systems and methods
US10122828B1 (en) Geographic-aware virtual desktops
CN108243265A (en) A DNS resolution processing method and device
JP5986339B2 (en) Optional vertical-based query
CN110933193B (en) Domain name resolution method and device, electronic equipment and computer readable storage medium
CN106101112A (en) Access the method for privately owned equipment, system and the public network server using dynamic IP
CN109391658B (en) Account data synchronization method and equipment, storage medium and terminal thereof
CN108551495A (en) A kind of method for accessing domain name not using DNS Protocol or similar agreement
JP6484166B2 (en) Name resolution device, name resolution method, and name resolution program
JP4644300B2 (en) Communication control system
EP2647179B1 (en) Service access apparatus, method, computer program and computer program product for selective initiation of communication
CN105872125A (en) Domain name resolution method and apparatus
CN111355819B (en) Method and network device for resolving domain names

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20251105

Address after: 330000 Jiangxi Province Nanchang City Nanchang Economic and Technological Development Zone Liuyun Road Commercial Street A Building 311 Room

Patentee after: Nanchang Jinkai Capital Management Co.,Ltd.

Country or region after: China

Address before: Room 815-1, Floor 8, Block A, Huajiang Building, No. 1, Tsinghua Science Park (Jiangxi), No. 299, Yuping East Street, Nanchang Economic and Technological Development Zone, Jiangxi Province, 330013

Patentee before: BLACKSHARK TECHNOLOGIES (NANCHANG) Co.,Ltd.

Country or region before: China

TR01 Transfer of patent right