CN106331213B - Domain name system DNS processing method and device - Google Patents
Domain name system DNS processing method and device Download PDFInfo
- Publication number
- CN106331213B CN106331213B CN201610749575.2A CN201610749575A CN106331213B CN 106331213 B CN106331213 B CN 106331213B CN 201610749575 A CN201610749575 A CN 201610749575A CN 106331213 B CN106331213 B CN 106331213B
- Authority
- CN
- China
- Prior art keywords
- domain name
- address
- terminal device
- network
- dns
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000003672 processing method Methods 0.000 title claims abstract description 18
- 238000000034 method Methods 0.000 claims abstract description 35
- 238000012545 processing Methods 0.000 claims description 18
- 230000000977 initiatory effect Effects 0.000 abstract description 4
- 238000004458 analytical method Methods 0.000 abstract 2
- 238000004891 communication Methods 0.000 description 14
- 230000006870 function Effects 0.000 description 14
- 238000010586 diagram Methods 0.000 description 12
- 238000004590 computer program Methods 0.000 description 6
- 230000003287 optical effect Effects 0.000 description 6
- 230000008569 process Effects 0.000 description 6
- 230000008859 change Effects 0.000 description 4
- 238000001514 detection method Methods 0.000 description 4
- 230000009471 action Effects 0.000 description 3
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 238000007726 management method Methods 0.000 description 3
- 230000001133 acceleration Effects 0.000 description 2
- 239000004973 liquid crystal related substance Substances 0.000 description 2
- 230000007774 longterm Effects 0.000 description 2
- 238000010295 mobile communication Methods 0.000 description 2
- 230000003068 static effect Effects 0.000 description 2
- 241000699666 Mus <mouse, genus> Species 0.000 description 1
- 241000699670 Mus sp. Species 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 238000007418 data mining Methods 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 238000007599 discharging Methods 0.000 description 1
- 230000005484 gravity Effects 0.000 description 1
- 238000012905 input function Methods 0.000 description 1
- 238000013507 mapping Methods 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 230000005236 sound signal Effects 0.000 description 1
- 238000010897 surface acoustic wave method Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/45—Network directories; Name-to-address mapping
- H04L61/4505—Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols
- H04L61/4511—Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols using domain name system [DNS]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/50—Address allocation
- H04L61/5076—Update or notification mechanisms, e.g. DynDNS
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/58—Caching of addresses or names
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
Description
技术领域technical field
本发明涉及电子技术领域,尤其涉及一种域名系统DNS处理方法及装置。The invention relates to the field of electronic technology, in particular to a domain name system (DNS) processing method and device.
背景技术Background technique
DNS(Domain Name System,域名系统)是因特网上作为域名和IP地址相互映射的一个分布式数据库,能够使用户更方便的访问互联网,而不用去记住能够被机器直接读取的IP数串。将域名映射为IP地址的过程就称为“域名解析”。域名解析需要由专门的域名解析服务器来完成,DNS就是进行域名解析的服务器。当用户在应用程序中输入DNS名称(域名)时,DNS服务器可以将此名称解析为与之相对应的IP地址。因而,用户在上网时输入的域名,却是通过该域名指向的IP地址才能最终上网。DNS (Domain Name System, Domain Name System) is a distributed database on the Internet that maps domain names and IP addresses to each other, enabling users to access the Internet more conveniently without having to remember IP numbers that can be directly read by machines. The process of mapping a domain name to an IP address is called "domain name resolution." Domain name resolution needs to be completed by a dedicated domain name resolution server, and DNS is the server for domain name resolution. When a user enters a DNS name (domain name) in an application, the DNS server can resolve this name into its corresponding IP address. Therefore, the domain name entered by the user when surfing the Internet can finally access the Internet through the IP address pointed to by the domain name.
现有技术中,网站的域名一般是唯一的,而IP地址在不同网络环境下有可能是不一样的,因此应用在访问某个网站的时候,首先发起DNS查询请求,在获取到DNS服务器返回的DNS解析结果(IP地址)之后,再通过IP地址访问网站。In the existing technology, the domain name of a website is generally unique, and the IP address may be different in different network environments. Therefore, when an application visits a website, it first initiates a DNS query request, and obtains the DNS server to return After the DNS resolution result (IP address) of your website, you can access the website through the IP address.
目前很多第三方应用软件为了加快访问网站的速度,减少DNS查询的时间,通常在第一次访问某个网站的时候,会发起DNS查询,然后把DNS查询的结果缓存到本地,在一段时间内访问该网站会直接使用之前DNS的查询结果,而不会再次发起DNS查询。然而,这样容易出现一个问题,在无线保真Wi-Fi网络和移动数据网络的DNS查询结果经常是不一致的,如果最初的连接的是移动数据网络,后面切换到Wi-Fi网络,很多应用不会自动去更新DNS查询结果,直接使用之前的查询结果,就会出现访问网络失败。只有等待应用缓存的DNS缓存到期之后,再次发起DNS才能获取正确的IP地址。如此一来,大大降低了用户访问网络的成功率和效率,影响用户体验。At present, in order to speed up the speed of accessing websites and reduce the time of DNS query, many third-party application software usually initiate a DNS query when visiting a certain website for the first time, and then cache the results of the DNS query locally. Visiting this website will directly use the previous DNS query results without initiating DNS queries again. However, this is prone to a problem. The DNS query results of the wireless fidelity Wi-Fi network and the mobile data network are often inconsistent. It will automatically update the DNS query results, and if the previous query results are directly used, access to the network will fail. The correct IP address can only be obtained by initiating DNS again after waiting for the DNS cache in the application cache to expire. As a result, the success rate and efficiency of user access to the network are greatly reduced, affecting user experience.
发明内容Contents of the invention
本发明实施例所要解决的技术问题在于,提供一种域名系统DNS处理方法及装置,可以解决现有技术中终端设备在发生接入网络切换后,无法快速接入到指定网络的问题。The technical problem to be solved by the embodiments of the present invention is to provide a domain name system DNS processing method and device, which can solve the problem in the prior art that a terminal device cannot quickly access a designated network after a network access switch occurs.
第一方面,本发明实施例提供了一种域名系统DNS处理方法,可包括:In the first aspect, the embodiment of the present invention provides a DNS processing method of the domain name system, which may include:
在检测到终端设备的接入网络发生切换的情况下,发起目标域名的DNS查询请求;Initiate a DNS query request for the target domain name when it is detected that the access network of the terminal device is switched;
接收所述DNS查询请求对应的DNS解析结果,所述DNS解析结果中包括至少一个与所述目标域名对应的第一IP地址;receiving a DNS resolution result corresponding to the DNS query request, where the DNS resolution result includes at least one first IP address corresponding to the target domain name;
将所述第一IP地址存储在所述终端设备中。storing the first IP address in the terminal device.
结合第一方面,在第一种可能的实现方式中,所述方法还包括:With reference to the first aspect, in a first possible implementation manner, the method further includes:
当接收到针对所述目标域名的访问指令时,访问存储在所述终端设备中的所述第一IP地址对应的网络位置。When receiving the access instruction for the target domain name, access the network location corresponding to the first IP address stored in the terminal device.
结合第一方面的第一种可能的实现方式,在第二种可能的实现方式中,所述方法还包括:With reference to the first possible implementation of the first aspect, in a second possible implementation, the method further includes:
在所述检测到终端设备的接入网络发生切换之前,所述终端设备中存储有所述目标域名对应的第二IP地址。Before it is detected that the access network of the terminal device is switched, the terminal device stores the second IP address corresponding to the target domain name.
结合第一方面的第二种可能的实现方式,在第三种可能的实现方式中,所述方法还包括:With reference to the second possible implementation of the first aspect, in a third possible implementation, the method further includes:
若访问所述第一IP地址对应的网络位置失败,则访问所述第二IP地址对应的网络位置。If accessing the network location corresponding to the first IP address fails, accessing the network location corresponding to the second IP address.
结合第一方面的第三种可能的实现方式,在第四种可能的实现方式中,所述方法还包括:With reference to the third possible implementation manner of the first aspect, in a fourth possible implementation manner, the method further includes:
若访问所述第二IP地址对应的网络位置失败,则向所述终端设备发送所述目标域名的的DNS解析结果过期通知,以提示所述终端设备进行所述目标域名对应的IP地址的更新。If the access to the network location corresponding to the second IP address fails, an expiration notification of the DNS resolution result of the target domain name is sent to the terminal device to prompt the terminal device to update the IP address corresponding to the target domain name .
结合第一方面或第一方面的第一种可能的实现方式或第一方面的第二种可能的实现方式或第一方面的第三种可能的实现方式或第一方面的第四种可能的实现方式中任意一种方式,在第五种可能的实现方式中,所述接入网络发生切换包括以下至少一项:In combination with the first aspect or the first possible implementation of the first aspect or the second possible implementation of the first aspect or the third possible implementation of the first aspect or the fourth possible implementation of the first aspect In any one of the implementation manners, in a fifth possible implementation manner, the switching of the access network includes at least one of the following:
无线保真Wi-Fi网络与移动数据网络之间的切换;Switch between wireless fidelity Wi-Fi network and mobile data network;
不同移动数据网络之间的切换;Handover between different mobile data networks;
不同Wi-Fi网络之间的切换。Switch between different Wi-Fi networks.
第二方面,本发明实施例提供了一种域名系统DNS处理装置,可包括:In a second aspect, an embodiment of the present invention provides a domain name system DNS processing device, which may include:
查询模块,用于在检测到终端设备的接入网络发生切换的情况下,发起目标域名的DNS查询请求;A query module, configured to initiate a DNS query request for the target domain name when it is detected that the access network of the terminal device is switched;
接收模块,用于接收所述DNS查询请求对应的DNS解析结果,所述DNS解析结果中包括至少一个与所述目标域名对应的第一IP地址;A receiving module, configured to receive a DNS resolution result corresponding to the DNS query request, where the DNS resolution result includes at least one first IP address corresponding to the target domain name;
第一存储模块,用于将所述第一IP地址存储在所述终端设备中。A first storage module, configured to store the first IP address in the terminal device.
结合第二方面,在第一种可能的实现方式中,所述装置还包括:With reference to the second aspect, in a first possible implementation manner, the device further includes:
第一访问模块,用于当接收到针对所述目标域名的访问指令时,访问存储在所述终端设备中的所述第一IP地址对应的网络位置。A first access module, configured to access a network location corresponding to the first IP address stored in the terminal device when receiving an access instruction for the target domain name.
结合第二方面的第一种可能的实现方式,在第二种可能的实现方式中,所述装置还包括:With reference to the first possible implementation manner of the second aspect, in a second possible implementation manner, the device further includes:
第二存储模块,用于在所述检测到终端设备的接入网络发生切换之前,所述终端设备中存储有所述目标域名对应的第二IP地址。The second storage module is configured to store, in the terminal device, the second IP address corresponding to the target domain name before the switchover of the access network of the terminal device is detected.
结合第二方面的第二种可能的实现方式,在第三种可能的实现方式中,所述装置还包括:With reference to the second possible implementation manner of the second aspect, in a third possible implementation manner, the device further includes:
第二访问模块,用于若访问所述第一IP地址对应的网络位置失败,则访问所述第二IP地址对应的网络位置。The second access module is configured to access the network location corresponding to the second IP address if the access to the network location corresponding to the first IP address fails.
结合第二方面的第三种可能的实现方式,在第四种可能的实现方式中,所述装置还包括:With reference to the third possible implementation manner of the second aspect, in a fourth possible implementation manner, the device further includes:
通知模块,用于若访问所述第二IP地址对应的网络位置失败,则向所述终端设备发送所述目标域名的的DNS解析结果过期通知,以提示所述终端设备进行所述目标域名对应的IP地址的更新。A notification module, configured to send an expiration notification of the DNS resolution result of the target domain name to the terminal device if the access to the network location corresponding to the second IP address fails, so as to prompt the terminal device to correspond to the target domain name update of the IP address.
结合第二方面或第二方面的第一种可能的实现方式或第二方面的第二种可能的实现方式或第二方面的第三种可能的实现方式或第二方面的第四种可能的实现方式中任意一种方式,在第五种可能的实现方式中,所述接入网络发生切换包括以下至少一项:In combination with the second aspect or the first possible implementation of the second aspect or the second possible implementation of the second aspect or the third possible implementation of the second aspect or the fourth possible implementation of the second aspect In any one of the implementation manners, in a fifth possible implementation manner, the switching of the access network includes at least one of the following:
无线保真Wi-Fi网络与移动数据网络之间的切换;Switch between wireless fidelity Wi-Fi network and mobile data network;
不同移动数据网络之间的切换;Handover between different mobile data networks;
不同Wi-Fi网络之间的切换。Switch between different Wi-Fi networks.
第三方面,本发明实施例提供了一种终端设备,可包括:In a third aspect, an embodiment of the present invention provides a terminal device, which may include:
存储有可执行程序代码的存储器;a memory storing executable program code;
与所述存储器耦合的处理器;a processor coupled to the memory;
所述处理器调用所述存储器中存储的所述可执行程序代码,执行如本发明实施例第一方面任意一方法中所描述的部分或全部步骤。The processor invokes the executable program code stored in the memory to execute some or all of the steps described in any method of the first aspect of the embodiments of the present invention.
第四方面,本发明提供一种计算机存储介质,用于储存为本发明实施例第二方面提供的域名系统DNS处理装置所用的计算机软件指令,其包含用于执行上述方面所设计的程序。In a fourth aspect, the present invention provides a computer storage medium for storing computer software instructions used by the domain name system DNS processing device provided in the second aspect of the embodiment of the present invention, which includes the program designed to execute the above aspect.
实施本发明实施例,具有如下有益效果:Implementing the embodiment of the present invention has the following beneficial effects:
本发明实施例,通过在检测到终端设备的接入网络发生切换的情况下,发起目标域名的DNS查询请求,并接收DNS查询请求对应的DNS解析结果,最终将DNS解析结果中包括至少一个与目标域名对应的第一IP地址存储在终端设备中。即在终端设备的接入网络发生切的换情况下可能存在的目标域名对应的IP地址会产生变化的情形下,预先在用户访问该目标域名对应的网络之前,获取并存储该目标域名对应的IP地址,以便于用户在需要访问该目标域名时,可以直接访问该存储的IP地址,而无需临时获取,加快了目标域名对应的网络的访问的成功率和速率,提升用户的网络体验。In the embodiment of the present invention, when it is detected that the access network of the terminal device is switched, a DNS query request for the target domain name is initiated, and the DNS resolution result corresponding to the DNS query request is received, and finally the DNS resolution result includes at least one The first IP address corresponding to the target domain name is stored in the terminal device. That is, when the access network of the terminal device is switched, if the IP address corresponding to the target domain name that may exist will change, before the user accesses the network corresponding to the target domain name, obtain and store the IP address corresponding to the target domain name in advance. IP address, so that when users need to access the target domain name, they can directly access the stored IP address without temporarily obtaining it, which speeds up the success rate and speed of accessing the network corresponding to the target domain name, and improves the user's network experience.
附图说明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. Those skilled in the art can also obtain other drawings based on these drawings without creative work.
图1是本发明实施例提供的一种域名系统DNS处理方法的流程示意图;FIG. 1 is a schematic flowchart of a domain name system DNS processing method provided by an embodiment of the present invention;
图2是本发明实施例提供的另一种域名系统DNS处理方法的流程示意图;Fig. 2 is a schematic flow chart of another domain name system DNS processing method provided by an embodiment of the present invention;
图3是本发明实施例提供的域名系统DNS处理方法的一个具体应用场景示意图;Fig. 3 is a schematic diagram of a specific application scenario of the domain name system DNS processing method provided by the embodiment of the present invention;
图4是本发明实施例提供的域名系统DNS处理方法的另一个具体应用场景示意图;FIG. 4 is a schematic diagram of another specific application scenario of the domain name system DNS processing method provided by the embodiment of the present invention;
图5是本发明实施例提供的域名系统DNS处理装置的结构示意图;5 is a schematic structural diagram of a domain name system DNS processing device provided by an embodiment of the present invention;
图6是本发明实施例提供的域名系统DNS处理装置的另一实施例的结构示意图;FIG. 6 is a schematic structural diagram of another embodiment of a domain name system DNS processing device provided by an embodiment of the present invention;
图7是本发明实施例提供的终端设备的结构示意图;FIG. 7 is a schematic structural diagram of a terminal device provided by an embodiment of the present invention;
图8是本发明提供的终端设备的另一实施例的结构示意图。Fig. 8 is a schematic structural diagram of another embodiment of a terminal device provided by the present invention.
具体实施方式detailed description
为了使本技术领域的人员更好地理解本发明方案,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分的实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都应当属于本发明保护的范围。In order to enable those skilled in the art to better understand the solutions of the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only It is an embodiment of a part of the present invention, but not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts shall fall within the protection scope of the present invention.
以下分别进行详细说明。Each will be described in detail below.
本发明的说明书和权利要求书及所述附图中的术语“第一”、“第二”、“第三”和“第四”等是用于区别不同对象,而不是用于描述特定顺序。此外,术语“包括”和“具有”以及它们任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或单元的过程、方法、系统、产品或设备没有限定于已列出的步骤或单元,而是可选地还包括没有列出的步骤或单元,或可选地还包括对于这些过程、方法、产品或设备固有的其它步骤或单元。The terms "first", "second", "third" and "fourth" in the description and claims of the present invention and the drawings are used to distinguish different objects, rather than to describe a specific order . Furthermore, the terms "include" and "have", 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 series of steps or units is not limited to the listed steps or units, but optionally also includes unlisted steps or units, or optionally further includes For other steps or units inherent in these processes, methods, products or apparatuses.
在本文中提及“实施例”意味着,结合实施例描述的特定特征、结构或特性可以包含在本发明的至少一个实施例中。在说明书中的各个位置出现该短语并不一定均是指相同的实施例,也不是与其它实施例互斥的独立的或备选的实施例。本领域技术人员显式地和隐式地理解的是,本文所描述的实施例可以与其它实施例相结合。Reference herein to an "embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the present invention. The occurrences of this phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is understood explicitly and implicitly by those skilled in the art that the embodiments described herein can be combined with other embodiments.
以下,对本申请中的部分用语进行解释说明,以便于本领域技术人员理解。Hereinafter, some terms used in this application are explained to facilitate the understanding of those skilled in the art.
1)、终端设备,又称之为用户设备(User Equipment,UE),是一种向用户提供语音和/或数据连通性的设备,如具有无线连接功能的手持式设备、车载设备等。常见的终端设备例如包括:手机、平板电脑、笔记本电脑、掌上电脑、移动互联网设备(Mobile InternetDevice,MID)、可穿戴设备、智能手环、计步器、MP3播放器(Moving Picture Experts GroupAudio Layer III,动态影像专家压缩标准音频层面3)、MP4(Moving Picture ExpertsGroup Audio Layer IV,动态影像专家压缩标准音频层面3)播放器、个人数字助理(Personal Digital Assistant,PDA)和膝上型便携计算机等。1) Terminal equipment, also called User Equipment (UE), is a device that provides voice and/or data connectivity to users, such as handheld devices and vehicle-mounted devices with wireless connection functions. Common terminal devices include, for example: mobile phones, tablet computers, notebook computers, handheld computers, mobile Internet devices (Mobile Internet Device, MID), wearable devices, smart bracelets, pedometers, MP3 players (Moving Picture Experts GroupAudio Layer III , MP4 (Moving Picture ExpertsGroup Audio Layer IV, Moving Picture Experts Group Audio Layer 3) player, personal digital assistant (Personal Digital Assistant, PDA) and laptop portable computer etc.
2)、IP地址,是指互联网协议地址又译为网际协议地址(Internet ProtocolAddress,IP Address),IP地址是IP协议提供的一种统一的地址格式,它为互联网上的每一个网络和每一台主机分配一个逻辑地址,以此来屏蔽物理地址的差异。在Internet上,每一个节点都依靠唯一的IP地址互相区分和相互联系。IP地址是一个32位二进制数的地址,由4个8位字段组成,每个字段之间用点号隔开,用于标识TCP/IP宿主机。每个IP地址都包含两部分:网络ID和主机ID。网络ID标识在同一个物理网络上的所有宿主机,主机ID标识该物理网络上的每一个宿主机,于是整个Internet上的每个计算机都依靠各自唯一的IP地址来标识。2), IP address, refers to the Internet protocol address and translated into the Internet protocol address (Internet Protocol Address, IP Address), IP address is a unified address format provided by the IP protocol, it is for every network and every Each host is assigned a logical address to shield the difference in physical addresses. On the Internet, each node relies on a unique IP address to distinguish and communicate with each other. The IP address is a 32-bit binary address consisting of four 8-bit fields, each field is separated by a dot, and is used to identify the TCP/IP host. Every IP address consists of two parts: a network ID and a host ID. The network ID identifies all hosts on the same physical network, and the host ID identifies each host on the physical network, so each computer on the entire Internet is identified by its own unique IP address.
3)、“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。字符“/”一般表示前后关联对象是一种“或”的关系。3), "Multiple" refers to two or more than two. "And/or" describes the association relationship of associated objects, indicating that there may be three types of relationships, for example, A and/or B may indicate: A exists alone, A and B exist simultaneously, and B exists independently. The character "/" generally indicates that the contextual objects are an "or" relationship.
图1是本发明实施例提供的一种域名系统DNS处理方法的流程示意图,下面将结合附图1从终端设备侧对本发明实施例中的一种域名系统DNS处理方法进行详细介绍,该方法包括以下步骤S101-步骤S103。Fig. 1 is a schematic flowchart of a domain name system DNS processing method provided by an embodiment of the present invention. The following will describe in detail a domain name system DNS processing method in the embodiment of the present invention from the terminal device side in conjunction with Fig. 1 , the method includes The following steps S101-step S103.
步骤S101:在检测到终端设备的接入网络发生切换的情况下,发起目标域名的DNS查询请求。Step S101: Initiate a DNS query request of the target domain name when it is detected that the access network of the terminal device is switched.
具体地,终端设备或者终端设备中的相关处理器或者相关处理模块,(后续相同不再赘述)在检测到终端设备的接入网络发生切换的情况下,发起目标域名的DNS查询请,而DNS查询请求,即是指向相应的DNS服务器发起查询指令,以获得包含该目标域名的解析的IP地址的DNS解析结果。而接入网络切换表示终端设备当前所接入的网络与发生切换之前的接入网络不同,可以包括无线保真Wi-Fi网络与移动数据网络之间的切换,不同移动数据网络之间的切换,不同Wi-Fi网络之间的切换,有线网络与无线网络之间的切换等,例如用户从家里使用Wi-Fi网络切换到出门后使用的移动数据网络。Specifically, the terminal device or related processors or related processing modules in the terminal device, (the same will not be repeated later) when detecting that the access network of the terminal device is switched, initiate a DNS query request for the target domain name, and the DNS The query request is to point to the corresponding DNS server to initiate a query command to obtain the DNS resolution result including the resolved IP address of the target domain name. Access network switching means that the network currently accessed by the terminal device is different from the access network before the switching, which may include switching between Wi-Fi networks and mobile data networks, and switching between different mobile data networks. , switching between different Wi-Fi networks, switching between wired networks and wireless networks, etc., for example, a user switches from using a Wi-Fi network at home to a mobile data network used after going out.
需要说明的是,在发生网络切换时或者之后,终端设备发起目标域名的DNS查询请求(请求查询对应的IP地址),该目标域名可以是用户预先存储在终端设备的指定DNS列表中的,例如,将用户使用频率最高的一类网站或应用的域名放置在该DNS列表中;也可以是用户终端设备中的所有访问过的网站的域名放置在该列表中,亦或者是一些IP地址变化较为频繁的域名,本发明对此不作具体限定。可以理解的是,由于在现有技术中,网络未发生切换的情况下,重复多次访问同一个网站(例如目标域名),一般IP地址不会发生变化,因此只要第一次访问的时候保存了对应的IP地址,则可以在第一次访问之后,可以直接使用对应的IP地址,无需重新查询,但是在一些情况下,例如终端设备的接入网络发生切换的情况下,可能会导致保存的IP地址会无效,用户无法正常访问,因此本发明实施例可以通过在发生接入网络切换时,就重新或提前获取目标域名对应的最新IP地址,以避免用户需要访问的时候,会出现访问失败的情况。It should be noted that when or after a network switch occurs, the terminal device initiates a DNS query request for the target domain name (requesting to query the corresponding IP address), the target domain name may be pre-stored by the user in the specified DNS list of the terminal device, for example , put the domain names of the most frequently used websites or applications in the DNS list; it can also be the domain names of all visited websites in the user terminal device, or some IP address changes are relatively Frequent domain names are not specifically limited in the present invention. It can be understood that, because in the prior art, when the network is not switched, the same website (such as the target domain name) is repeatedly visited, and the general IP address will not change, so as long as the first visit is saved If you have obtained the corresponding IP address, you can directly use the corresponding IP address after the first visit without re-querying, but in some cases, such as when the access network of the terminal device is switched, it may result in saving The IP address of the target domain name will be invalid, and the user cannot access it normally. Therefore, in the embodiment of the present invention, when an access network switch occurs, the latest IP address corresponding to the target domain name can be obtained again or in advance, so as to avoid access when the user needs to access Failure situation.
步骤S102:接收所述DNS查询请求对应的DNS解析结果,所述DNS解析结果中包括至少一个与所述目标域名对应的第一IP地址。Step S102: Receive a DNS resolution result corresponding to the DNS query request, where the DNS resolution result includes at least one first IP address corresponding to the target domain name.
具体地,接收到DNS查询请求的DNS服务器将DNS解析结果反馈给终端设备,DNS解析结果中包括至少一个与所述目标域名对应的第一IP地址,原因在于有些域名的网站可能对应多个服务器,即可能存在多个IP地址,因此反馈的DNS解析结果中至少包含了一个与目标域名对应的第一IP地址。在具体的应用场景中,其具体过程例如,终端设备为平常使用的智能手机,打开浏览器,输入一个域名,比如输入www.163.com,这时,使用的智能手机会发出一个DNS请求到本地DNS服务器,本地DNS服务器一般都是智能手机的网络接入服务器商提供,比如中国电信,中国移动;查询www.163.com的DNS请求到达本地DNS服务器之后,本地DNS服务器会首先查询它的缓存记录,如果缓存中有此条记录,就可以直接返回结果如果没有,本地DNS服务器还要向DNS根服务器进行查询,根DNS服务器没有记录具体的域名和IP地址的对应关系,而是告诉本地DNS服务器,可以到域服务器上去继续查询,并给出域服务器的地址。本地DNS服务器继续向域服务器发出请求。最后,本地DNS服务器向域名的解析服务器发出请求,这时就能收到一个域名和IP地址对应关系,本地DNS服务器不仅要把IP地址返回给用户的智能手机,还要把这个对应关系保存在缓存中,以备下次别的用户查询时,可以直接返回结果,加快网络访问。同时智能手机收到该IP地址可以保存在手机的缓存中,以便于下次访问不需要访问本地DNS服务器(见步骤S103)。Specifically, the DNS server that receives the DNS query request feeds back the DNS resolution result to the terminal device, and the DNS resolution result includes at least one first IP address corresponding to the target domain name, because the website of some domain name may correspond to multiple servers , that is, there may be multiple IP addresses, so the DNS resolution result fed back includes at least one first IP address corresponding to the target domain name. In a specific application scenario, the specific process is, for example, the terminal device is an ordinary smart phone, open the browser, enter a domain name, such as www.163.com, at this time, the smart phone will send a DNS request to Local DNS server, local DNS server is generally provided by the network access server provider of the smart phone, such as China Telecom, China Mobile; after the DNS request for www.163.com arrives at the local DNS server, the local DNS server will first query its Cache record, if there is this record in the cache, you can directly return the result. If not, the local DNS server will also query the DNS root server. The root DNS server does not record the corresponding relationship between the specific domain name and IP address, but tells the local DNS server, you can go to the domain server to continue querying, and give the address of the domain server. The local DNS server continues to make requests to the domain server. Finally, the local DNS server sends a request to the resolution server of the domain name. At this time, a corresponding relationship between the domain name and the IP address can be received. The local DNS server not only returns the IP address to the user's smartphone, but also saves the corresponding relationship in the In the cache, in case other users query next time, the results can be returned directly to speed up network access. At the same time, the smart phone receives the IP address and can store it in the cache memory of the mobile phone, so that the next visit does not need to visit the local DNS server (see step S103).
步骤S103:将所述第一IP地址存储在所述终端设备中。Step S103: storing the first IP address in the terminal device.
具体地,将查询获得的所述目标域名对应的第一IP地址存储在所述终端设备中。虽然此时用户还没有访问目标域名,即终端设备还没有接收到针对该目标域名的访问指令,但是,本发明实施例中,可以通过提前将目标域名(例如用户经常需要访问的网站)对应的IP地址进行存储,则当用户需要访问的时候,就可以直接使用,不需要再等用户发出访问指令的时候,才去获取IP地址,导致用户的响应时间大大增加,但是如果提前进行查询存储的话,当用户实际进行访问时,则可以避免临时需要查询消耗的时间,加快用户进入网站的速度。Specifically, the first IP address corresponding to the target domain name obtained through query is stored in the terminal device. Although the user has not accessed the target domain name at this time, that is, the terminal device has not received an access instruction for the target domain name, but in the embodiment of the present invention, the target domain name (such as the website that the user often needs to visit) can be corresponding The IP address is stored, and when the user needs to access, it can be used directly, and there is no need to wait for the user to issue an access command before obtaining the IP address, which will greatly increase the user's response time, but if the query is stored in advance , when the user actually visits, the time consumed by the temporary query can be avoided, and the speed of the user entering the website can be accelerated.
本发明实施例,通过在检测到终端设备的接入网络发生切换的情况下,发起目标域名的DNS查询请求,并接收DNS查询请求对应的DNS解析结果,最终将DNS解析结果中包括至少一个与目标域名对应的第一IP地址存储在终端设备中。即在终端设备的接入网络发生切的换情况下可能存在的目标域名对应的IP地址会产生变化的情形下,预先在用户访问该目标域名对应的网络之前,获取并存储该目标域名对应的IP地址,以便于用户在需要访问该目标域名时,可以直接访问该存储的IP地址,而无需临时获取,加快了目标域名对应的网络的访问的成功率和速率,提升用户的网络体验。In the embodiment of the present invention, when it is detected that the access network of the terminal device is switched, a DNS query request for the target domain name is initiated, and the DNS resolution result corresponding to the DNS query request is received, and finally the DNS resolution result includes at least one The first IP address corresponding to the target domain name is stored in the terminal device. That is, when the access network of the terminal device is switched, if the IP address corresponding to the target domain name that may exist will change, before the user accesses the network corresponding to the target domain name, obtain and store the IP address corresponding to the target domain name in advance. IP address, so that when users need to access the target domain name, they can directly access the stored IP address without temporarily obtaining it, which speeds up the success rate and speed of accessing the network corresponding to the target domain name, and improves the user's network experience.
图2是本发明实施例提供的另一种域名系统DNS处理方法的流程示意图,下面将结合附图2从终端设备侧对本发明实施例中的另一种域名系统DNS处理方法进行详细介绍,如图2所示,该方法可以包括以下步骤S201-步骤S207。Fig. 2 is a schematic flowchart of another domain name system DNS processing method provided by the embodiment of the present invention. The following will introduce in detail another domain name system DNS processing method in the embodiment of the present invention from the terminal device side in conjunction with Fig. 2 , as shown in FIG. As shown in FIG. 2, the method may include the following steps S201-S207.
步骤S201:在所述检测到终端设备的接入网络发生切换之前,所述终端设备中存储有所述目标域名对应的第二IP地址。Step S201: before it is detected that the access network of the terminal device is switched, the terminal device stores a second IP address corresponding to the target domain name.
具体地,在本发明实施例所指的接入网络发生切换之前,假设针对目标域名,之前有访问过该目标域名的记录,则在之前访问过该目标域名之后,就将查询获得的第二IP地址进行存储,以便于后续再接入该切换之前的网络时,直接访问此第二IP地址,当然前提是该第二IP地址还没有过期,即在有效期内,该有效期可以是用户根据经验值设置的,也可以是相关应用本身根据大量数据挖掘设置的合理的时间值。如图3所示,图3为本发明实施例提供的域名系统DNS处理方法的具体应用场景示意图,图3中,例如用户出门在外时,使用的是移动数据网络访问的网站11(图3左侧),但是回到家中之后需要将终端设备的接入网络切换为Wi-Fi网络(图右左侧),此时当使用移动数据网络时,使用的是本方法步骤中的第二IP地址访问的目标域名对应的网络,当使用Wi-Fi时,则是使用第二IP地址访问目标域名对应的网络。Specifically, before the switchover of the access network referred to in the embodiment of the present invention, assuming that there is a record of visiting the target domain name before, then after the target domain name has been visited before, the obtained second The IP address is stored so that when accessing the network before the switch, the second IP address can be accessed directly. Of course, the premise is that the second IP address has not expired, that is, within the validity period, which can be determined by the user based on experience. It can also be a reasonable time value set by the relevant application itself based on a large amount of data mining. As shown in FIG. 3, FIG. 3 is a schematic diagram of a specific application scenario of the domain name system DNS processing method provided by the embodiment of the present invention. In FIG. side), but after returning home, it is necessary to switch the access network of the terminal device to the Wi-Fi network (the left side of the figure on the right). At this time, when using the mobile data network, the second IP address in the steps of this method is used The network corresponding to the accessed target domain name, when using Wi-Fi, uses the second IP address to access the network corresponding to the target domain name.
步骤S202:在检测到终端设备的接入网络发生切换的情况下,发起目标域名的DNS查询请求。Step S202: Initiate a DNS query request of the target domain name when it is detected that the access network of the terminal device is switched.
步骤S203:接收所述DNS查询请求对应的DNS解析结果,所述DNS解析结果中包括至少一个与所述目标域名对应的第一IP地址。Step S203: Receive a DNS resolution result corresponding to the DNS query request, where the DNS resolution result includes at least one first IP address corresponding to the target domain name.
步骤S204:将所述第一IP地址存储在所述终端设备中。Step S204: storing the first IP address in the terminal device.
具体地,步骤S202至步骤S204可参考上述图1实施例中的步骤S101至步骤S103,这里不再赘述。Specifically, for step S202 to step S204, reference may be made to step S101 to step S103 in the above embodiment in FIG. 1 , which will not be repeated here.
步骤S205:当接收到针对所述目标域名的访问指令时,访问存储在所述终端设备中的所述第一IP地址对应的网络位置。Step S205: When receiving the access instruction for the target domain name, access the network location corresponding to the first IP address stored in the terminal device.
具体地,在接收到目标域名的访问指令时,则可以直接访问存储在终端设备中的第一IP地址对应的网络位置,而不需要临时发起目标域名的DNS查询请求,因此可以大大节省用户进入相关网站的时间,提升用户上网体验。Specifically, when receiving an access instruction of the target domain name, the network location corresponding to the first IP address stored in the terminal device can be directly accessed without temporarily initiating a DNS query request of the target domain name, thus greatly saving the user from entering Time spent on relevant websites to improve users' online experience.
步骤S206:若访问所述第一IP地址对应的网络位置失败,则访问所述第二IP地址对应的网络位置。Step S206: If the access to the network location corresponding to the first IP address fails, access the network location corresponding to the second IP address.
具体地,若访问第一IP地址对应的网络位置失败时,则表明有可能该网络位置对应的服务器暂时未提供服务或者出现了故障,暂时无法成功连接,因此可能需要访问其它服务器对应的IP地址,即可以访问之前有访问目标域名成功的第二IP地址。Specifically, if the access to the network location corresponding to the first IP address fails, it indicates that the server corresponding to the network location may not provide services temporarily or has a fault, and the connection cannot be successful temporarily, so it may be necessary to access the IP addresses corresponding to other servers , that is, you can access the second IP address that has successfully accessed the target domain name before.
步骤S207:若访问所述第二IP地址对应的网络位置失败,则向所述终端设备发送所述目标域名的DNS解析结果过期通知,以提示所述终端设备进行所述目标域名对应的IP地址的更新。Step S207: If the access to the network location corresponding to the second IP address fails, send an expiration notification of the DNS resolution result of the target domain name to the terminal device, so as to prompt the terminal device to obtain the IP address corresponding to the target domain name. update.
具体地,第二IP地址为发生网络切换之前存储的IP地址,也就是在网络切换前的接入网络下,访问目标域名对应的IP地址,若该IP地址对应的网络位置也访问失败时,说明目标域名对应的第一IP地址和第二IP地址都失效了,需要重新查询获取,因此需要向终端设备发送目标域名的DNS解析结果过期通知,提示终端设备进行该目标域名对应的IP地址的更新,以便于后续再次访问该目标域名的时候,可以直接进行相对应的IP地址的访问,并能访问成功。如图4所示,图4为本发明实施例所提供的域名系统DNS处理方法的另一种具体应用场景示意图,图4中,在发生网络切换之后(移动数据网络切换为Wi-Fi网络),此时可能存第一IP地址和第二IP地址都无法访问的情况,此时终端设备发出访问失败的提示,并且在后台重新进行目标域名的DNS查询请求,以便于可以成功访问该目标域名对应的网络。Specifically, the second IP address is the IP address stored before the network switch occurs, that is, the IP address corresponding to the access target domain name under the access network before the network switch, if the network location corresponding to the IP address also fails to access, It means that both the first IP address and the second IP address corresponding to the target domain name are invalid, and they need to be re-queried to obtain. Therefore, it is necessary to send an expiration notice of the DNS resolution result of the target domain name to the terminal device, prompting the terminal device to perform IP address corresponding to the target domain name. Update, so that when you access the target domain name again later, you can directly access the corresponding IP address, and the access can be successful. As shown in Figure 4, Figure 4 is a schematic diagram of another specific application scenario of the domain name system DNS processing method provided by the embodiment of the present invention. In Figure 4, after a network switch occurs (mobile data network is switched to a Wi-Fi network) , at this time, there may be a situation where neither the first IP address nor the second IP address can be accessed. At this time, the terminal device sends a prompt of access failure, and re-does the DNS query request of the target domain name in the background, so that the target domain name can be successfully accessed. corresponding network.
本发明实施例,通过在检测到终端设备的接入网络发生切换的情况下,发起目标域名的DNS查询请求,并接收DNS查询请求对应的DNS解析结果,最终将DNS解析结果中包括至少一个与目标域名对应的第一IP地址存储在终端设备中。即在终端设备的接入网络发生切的换情况下可能存在的目标域名对应的IP地址会产生变化的情形下,预先在用户访问该目标域名对应的网络之前,获取并存储该目标域名对应的IP地址,以便于用户在需要访问该目标域名时,可以直接访问该存储的IP地址,而无需临时获取,加快了目标域名对应的网络的访问的成功率和速率,提升用户的网络体验。In the embodiment of the present invention, when it is detected that the access network of the terminal device is switched, a DNS query request for the target domain name is initiated, and the DNS resolution result corresponding to the DNS query request is received, and finally the DNS resolution result includes at least one The first IP address corresponding to the target domain name is stored in the terminal device. That is, when the access network of the terminal device is switched, if the IP address corresponding to the target domain name that may exist will change, before the user accesses the network corresponding to the target domain name, obtain and store the IP address corresponding to the target domain name in advance. IP address, so that when users need to access the target domain name, they can directly access the stored IP address without temporarily obtaining it, which speeds up the success rate and speed of accessing the network corresponding to the target domain name, and improves the user's network experience.
本发明实施例还提供了一种域名系统DNS处理装置10,如图5所示,图5是本发明实施例中的域名系统DNS处理装置的结构示意图,下面将结合附图5,对域名系统DNS处理装置10的结构进行详细介绍。该装置10可包括:查询模块102、接收模块103和第一存储模块104,其中The embodiment of the present invention also provides a domain name system DNS processing device 10, as shown in FIG. 5, which is a schematic structural diagram of the domain name system DNS processing device in the embodiment of the present invention. The structure of the DNS processing device 10 will be described in detail. The device 10 may include: a query module 102, a receiving module 103 and a first storage module 104, wherein
查询模块102,用于在检测到终端设备的接入网络发生切换的情况下,发起目标域名的DNS查询请求;The query module 102 is configured to initiate a DNS query request of the target domain name when it is detected that the access network of the terminal device is switched;
接收模块103,用于接收所述DNS查询请求对应的DNS解析结果,所述DNS解析结果中包括至少一个与所述目标域名对应的第一IP地址;A receiving module 103, configured to receive a DNS resolution result corresponding to the DNS query request, where the DNS resolution result includes at least one first IP address corresponding to the target domain name;
第一存储模块104,用于将所述第一IP地址存储在所述终端设备中。The first storage module 104 is configured to store the first IP address in the terminal device.
具体地,如图6所示的本发明提供的域名系统DNS处理装置的另一实施例的结构示意图,该装置10还可包括:Specifically, as shown in FIG. 6 , a schematic structural diagram of another embodiment of a domain name system DNS processing device provided by the present invention, the device 10 may further include:
第一访问模块105,用于当接收到针对所述目标域名的访问指令时,访问存储在所述终端设备中的所述第一IP地址对应的网络位置。The first access module 105 is configured to access the network location corresponding to the first IP address stored in the terminal device when an access instruction for the target domain name is received.
进一步地,如图6所示,所述装置还包括:Further, as shown in Figure 6, the device also includes:
第二存储模块101,用于在所述检测到终端设备的接入网络发生切换之前,所述终端设备中存储有所述目标域名对应的第二IP地址。The second storage module 101 is configured to store, in the terminal device, the second IP address corresponding to the target domain name before the switchover of the access network of the terminal device is detected.
再进一步地,如图6所示,所述装置还包括:Further, as shown in Figure 6, the device also includes:
第二访问模块106,用于若访问所述第一IP地址对应的网络位置失败,则访问所述第二IP地址对应的网络位置。The second access module 106 is configured to access the network location corresponding to the second IP address if the access to the network location corresponding to the first IP address fails.
再进一步地,如图6所示,所述装置还包括:Further, as shown in Figure 6, the device also includes:
通知模块107,用于若访问所述第二IP地址对应的网络位置失败,则向所述终端设备发送所述目标域名的的DNS解析结果过期通知,以提示所述终端设备进行所述目标域名对应的IP地址的更新。The notification module 107 is configured to send an expiration notification of the DNS resolution result of the target domain name to the terminal device if the access to the network location corresponding to the second IP address fails, so as to prompt the terminal device to perform the DNS resolution of the target domain name. The corresponding IP address is updated.
再进一步地,所述接入网络发生切换包括以下至少一项:Still further, the switching of the access network includes at least one of the following:
无线保真Wi-Fi网络与移动数据网络之间的切换;Switch between wireless fidelity Wi-Fi network and mobile data network;
不同移动数据网络之间的切换;Handover between different mobile data networks;
不同Wi-Fi网络之间的切换。Switch between different Wi-Fi networks.
可理解的是,域名系统DNS处理装置10中各模块的功能可对应参考上述图1至图4中的各方法实施例中的具体实现方式,这里不再赘述。It can be understood that, the function of each module in the domain name system DNS processing device 10 can refer to the specific implementation manners in the above-mentioned method embodiments in FIG. 1 to FIG. 4 correspondingly, which will not be repeated here.
在本实施例中,域名系统DNS处理装置10是以模块的形式来呈现。这里的“模块”可以指特定应用集成电路(application-specific integrated circuit,ASIC),执行一个或多个软件或固件程序的处理器和存储器,集成逻辑电路,和/或其他可以提供上述功能的器件。此外,查询模块102可通过图7所示的终端设备的处理器201来实现,接收模块103可通过图7所示的终端设备的通信接口203来实现等。In this embodiment, the domain name system DNS processing device 10 is presented in the form of modules. The "module" here may refer to an application-specific integrated circuit (ASIC), a processor and memory executing one or more software or firmware programs, an integrated logic circuit, and/or other devices that can provide the above functions . In addition, the query module 102 can be realized by the processor 201 of the terminal device shown in FIG. 7 , the receiving module 103 can be realized by the communication interface 203 of the terminal device shown in FIG. 7 , and so on.
本发明实施例还提供了一种终端设备20,如图7所示,图7是本发明实施例中的终端设备的结构示意图,下面将结合附图7对终端设备20的结构进行详细介绍。该终端设备20包括至少一个处理器201,至少一个存储器202、至少一个通信接口203。所述处理器201、所述存储器202和所述通信接口203通过所述通信总线连接并完成相互间的通信。The embodiment of the present invention also provides a terminal device 20 , as shown in FIG. 7 , which is a schematic structural diagram of the terminal device in the embodiment of the present invention. The structure of the terminal device 20 will be described in detail below with reference to FIG. 7 . The terminal device 20 includes at least one processor 201 , at least one memory 202 , and at least one communication interface 203 . The processor 201 , the memory 202 and the communication interface 203 are connected through the communication bus and complete mutual communication.
处理器201可以是通用中央处理器(CPU),微处理器,特定应用集成电路(application-specific integrated circuit,ASIC),或一个或多个用于控制以上方案程序执行的集成电路。The processor 201 may be a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of the programs in the above solutions.
通信接口203,用于与其他设备或通信网络通信,如以太网,无线接入网(RAN),无线局域网(Wireless Local Area Networks,WLAN)等。The communication interface 203 is used for communicating with other devices or communication networks, such as Ethernet, Radio Access Network (RAN), Wireless Local Area Networks (Wireless Local Area Networks, WLAN) and so on.
存储器202可以是只读存储器(read-only memory,ROM)或可存储静态信息和指令的其他类型的静态存储设备,随机存取存储器(random access memory,RAM)或者可存储信息和指令的其他类型的动态存储设备,也可以是电可擦可编程只读存储器(ElectricallyErasable Programmable Read-Only Memory,EEPROM)、只读光盘(Compact Disc Read-Only Memory,CD-ROM)或其他光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)、磁盘存储介质或者其他磁存储设备、或者能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质,但不限于此。存储器可以是独立存在,通过总线与处理器相连接。存储器也可以和处理器集成在一起。The memory 202 may be a read-only memory (read-only memory, ROM) or other types of static storage devices that can store static information and instructions, and a random access memory (random access memory, RAM) or other types that can store information and instructions It can also be an electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, EEPROM), a CD-ROM (Compact Disc Read-Only Memory, CD-ROM) or other optical disk storage, optical disk storage ( including compact discs, laser discs, optical discs, digital versatile discs, blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or can be used to carry or store desired program code in the form of instructions or data structures and can be stored by a computer Any other medium, but not limited to. The memory can exist independently and be connected to the processor through the bus. Memory can also be integrated with the processor.
其中,所述存储器202用于存储执行以上方案的应用程序代码,并由处理器201来控制执行。所述处理器201用于执行所述存储器202中存储的应用程序代码。Wherein, the memory 202 is used to store application program codes for executing the above solution, and the execution is controlled by the processor 201 . The processor 201 is configured to execute application program codes stored in the memory 202 .
存储器202存储的代码可执行以上提供的终端设备执行的图1-图4的域名系统DNS处理方法,比如在检测到终端设备的接入网络发生切换的情况下,发起目标域名的DNS查询请求;接收所述DNS查询请求对应的DNS解析结果,所述DNS解析结果中包括至少一个与所述目标域名对应的第一IP地址;将所述第一IP地址存储在所述终端设备中。The code stored in the memory 202 can execute the domain name system DNS processing method in FIGS. 1-4 performed by the terminal device provided above, for example, when it is detected that the access network of the terminal device is switched, a DNS query request for the target domain name is initiated; receiving a DNS resolution result corresponding to the DNS query request, the DNS resolution result including at least one first IP address corresponding to the target domain name; storing the first IP address in the terminal device.
请参阅图8,图8是本发明实施例提供的终端设备的另一实施例的结构示意图。该终端设备30可以为智能移动终端(如手机),终端设备30包括:射频(英文:radiofrequency,RF)电路301、存储有一个或多个计算机程序的存储器302、输入装置303、输出装置304、传感器305、音频电路306、无线保真(英文:wireless fidelity,WiFi)模块307、包括有一个或多个处理核心的处理器308、以及电源303等部件。本领域技术人员可以理解,图8中示出的终端设备结构并不构成对终端设备的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。其中:Please refer to FIG. 8. FIG. 8 is a schematic structural diagram of another embodiment of a terminal device provided by an embodiment of the present invention. The terminal device 30 can be an intelligent mobile terminal (such as a mobile phone), and the terminal device 30 includes: a radio frequency (English: radiofrequency, RF) circuit 301, a memory 302 storing one or more computer programs, an input device 303, an output device 304, A sensor 305 , an audio circuit 306 , a wireless fidelity (English: wireless fidelity, WiFi) module 307 , a processor 308 including one or more processing cores, and a power supply 303 and other components. Those skilled in the art can understand that the structure of the terminal device shown in FIG. 8 does not constitute a limitation on the terminal device, and may include more or less components than those shown in the figure, or combine some components, or arrange different components. in:
RF电路301可用于收发信息或通话过程中,信号的接收和发送,特别地,将基站的下行信息接收后,交由一个或多个处理器308处理;另外,将涉及上行的数据发送给基站。通常,RF电路301包括但不限于天线、至少一个放大器、调谐器、一个或多个振荡器、用户身份模块(英文:subscriber identity module,SIM)卡、收发信机、耦合器、低噪声放大器(英文:low noise amplifier,LNA)、双工器等。此外,RF电路301还可以通过无线通信与网络或其他终端设备进行通信。所述无线通信可以使用任一通信标准或协议,包括但不限于全球移动通讯系统(英文:global system of mobile communication,GSM)、通用分组无线服务(英文:general packet radio service,GPRS)、码分多址(英文:code division multipleaccess,CDMA)、宽带码分多址(英文:wideband code division multiple access,WCDMA)、长期演进(英文:long term evolution,LTE)、电子邮件、短消息服务(英文:shortmessaging service,SMS)等。The RF circuit 301 can be used for sending and receiving information or receiving and sending signals during a call. In particular, after receiving the downlink information of the base station, it is processed by one or more processors 308; in addition, the data related to the uplink is sent to the base station . Generally, the RF circuit 301 includes, but is not limited to, an antenna, at least one amplifier, a tuner, one or more oscillators, a subscriber identity module (English: subscriber identity module, SIM) card, a transceiver, a coupler, a low noise amplifier ( English: low noise amplifier, LNA), duplexer, etc. In addition, the RF circuit 301 can also communicate with the network or other terminal devices through wireless communication. The wireless communication can use any communication standard or protocol, including but not limited to global system of mobile communication (English: global system of mobile communication, GSM), general packet radio service (English: general packet radio service, GPRS), code division Multiple access (English: code division multiple access, CDMA), broadband code division multiple access (English: wideband code division multiple access, WCDMA), long term evolution (English: long term evolution, LTE), email, short message service (English: short messaging service, SMS), etc.
存储器302可用于存储计算机程序以及模块,处理器308通过运行存储在存储器302的计算机程序以及模块,从而执行各种功能应用以及数据处理。存储器302可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据终端设备30的使用所创建的数据(比如拍摄的照片、音频数据、视频数据等)等。此外,存储器302可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。相应地,存储器302还可以包括存储器控制器,以提供处理器308和输入装置303对存储器302的访问。The memory 302 can be used to store computer programs and modules, and the processor 308 executes various functional applications and data processing by running the computer programs and modules stored in the memory 302 . The memory 302 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application program required by a function (such as a sound playback function, an image playback function, etc.); Data created using the terminal device 30 (such as photographed photos, audio data, video data, etc.) and the like. In addition, the memory 302 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage devices. Correspondingly, the memory 302 may also include a memory controller to provide access to the memory 302 by the processor 308 and the input device 303 .
输入装置303可用于接收输入的数字或字符信息,以及产生与用户设置以及功能控制有关的键盘、鼠标、操作杆、光学或者轨迹球信号输入。具体地,输入装置303可包括触敏表面3031以及其他输入设备3032。触敏表面3031,也称为触摸显示面板或者触控板,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触敏表面3031上或在触敏表面3031附近的操作),并根据预先设定的程式驱动相应的连接装置。可选的,触敏表面3031可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器308,并能接收处理器308发来的命令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触敏表面3031。除了触敏表面3031,输入装置303还可以包括其他输入设备3032。具体地,其他输入设备3032可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆等中的一种或多种。The input device 303 can be used to receive input numbers or character information, and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control. Specifically, the input device 303 may include a touch-sensitive surface 3031 and other input devices 3032 . The touch-sensitive surface 3031, also referred to as a touch display panel or a touchpad, can collect user touch operations on or near it (for example, the user uses any suitable object or accessory such as a finger, a stylus, etc. on the touch-sensitive surface 3031 or on The operation near the touch-sensitive surface 3031), and drive the corresponding connection device according to the preset program. Optionally, the touch-sensitive surface 3031 may include two parts, a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, and detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact coordinates, and sends it to the to the processor 308, and can receive and execute commands sent by the processor 308. In addition, the touch-sensitive surface 3031 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch-sensitive surface 3031 , the input device 303 may also include other input devices 3032 . Specifically, other input devices 3032 may include, but are not limited to, one or more of physical keyboards, function keys (such as volume control keys, switch keys, etc.), trackballs, mice, joysticks, and the like.
输出装置304可用于显示由用户输入的信息或提供给用户的信息以及终端设备30的各种图形用户界面,这些图形用户界面可以由图形、文本、图标、视频和其任意组合来构成。输出装置304可包括显示面板3041,可选的,显示面板3041可以采用液晶显示器(英文:liquid crystal display,LCD)、有机发光二极管(英文:organic light-emitting diode,OLED)等形式来配置。进一步的,触敏表面3031可覆盖显示面板3041,当触敏表面3031检测到在其上或附近的触摸操作后,传送给处理器308以确定触摸事件的类型,随后处理器308根据触摸事件的类型在显示面板3041上提供相应的视觉输出。虽然在图8中,触敏表面3031与显示面板3041是作为两个独立的部件来实现输入和输入功能,但是在某些实施例中,可以将触敏表面3031与显示面板3041集成而实现输入和输出功能。The output device 304 can be used to display information input by the user or provided to the user and various graphical user interfaces of the terminal device 30. These graphical user interfaces can be composed of graphics, text, icons, videos and any combination thereof. The output device 304 may include a display panel 3041. Optionally, the display panel 3041 may be configured in the form of a liquid crystal display (English: liquid crystal display, LCD) or an organic light-emitting diode (English: organic light-emitting diode, OLED). Further, the touch-sensitive surface 3031 may cover the display panel 3041, and when the touch-sensitive surface 3031 detects a touch operation on or near it, the touch operation is sent to the processor 308 to determine the type of the touch event, and then the processor 308 determines the type of the touch event according to the The type provides a corresponding visual output on the display panel 3041. Although in FIG. 8, the touch-sensitive surface 3031 and the display panel 3041 are used as two independent components to realize input and input functions, in some embodiments, the touch-sensitive surface 3031 and the display panel 3041 can be integrated to realize input. and output functions.
终端设备30还可包括至少一种传感器305,比如距离传感器、光传感器、运动传感器以及其他传感器。具体地,距离传感器用于检测所述终端设备屏幕与覆盖所述终端设备的物体之间的距离,光传感器用于检测所述终端设备外部环境的光信号。作为运动传感器的一种,重力加速度传感器可检测各个方向上(一般为三轴)加速度的大小,静止时可检测出重力的大小及方向,可用于识别终端设备30姿态的应用(比如横竖屏切换、相关游戏、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击)等;至于终端设备30还可配置的陀螺仪、气压计、湿度计、温度计、红外线传感器等其他传感器,此处不再赘述。The terminal device 30 may further include at least one sensor 305, such as a distance sensor, a light sensor, a motion sensor, and other sensors. Specifically, the distance sensor is used to detect the distance between the screen of the terminal device and the object covering the terminal device, and the light sensor is used to detect the light signal of the external environment of the terminal device. As a kind of motion sensor, the gravitational acceleration sensor can detect the magnitude of acceleration in various directions (generally three axes), and can detect the magnitude and direction of gravity when it is stationary, and can be used to identify the application of terminal device 30 posture (such as horizontal and vertical screen switching) , related games, magnetometer attitude calibration), vibration recognition related functions (such as pedometer, knocking), etc.; as for other sensors such as gyroscopes, barometers, hygrometers, thermometers, and infrared sensors that can also be configured on the terminal device 30, I won't repeat them here.
音频电路306、扬声器3061、传声器3062可提供用户与终端设备30之间的音频接口。音频电路306可将接收到的音频数据转换后的电信号,传输到扬声器3061,由扬声器3061转换为声音信号输出;另一方面,传声器3062将收集的声音信号转换为电信号,由音频电路306接收后转换为音频数据,再将音频数据输出处理器308处理后,经RF电路301以发送给比如另一设备,或者将音频数据输出至存储器302以便进一步处理。音频电路306还可能包括耳塞插孔,以提供外设耳机与终端设备30的通信。The audio circuit 306 , the speaker 3061 and the microphone 3062 can provide an audio interface between the user and the terminal device 30 . The audio circuit 306 can transmit the electrical signal converted from the received audio data to the loudspeaker 3061, and the loudspeaker 3061 converts it into a sound signal output; After being received, it is converted into audio data, and then the audio data is processed by the output processor 308, and then sent to another device through the RF circuit 301, or the audio data is output to the memory 302 for further processing. The audio circuit 306 may also include an earplug jack to provide communication between an external earphone and the terminal device 30 .
WiFi属于短距离无线传输技术,终端设备30通过WiFi模块307可以帮助用户收发电子邮件、浏览网页和访问流式媒体等,它为用户提供了无线的宽带互联网访问。虽然图8示出了WiFi模块307,但是可以理解的是,其并不属于终端设备30的必须构成,完全可以根据需要在不改变发明的本质的范围内而省略。WiFi is a short-distance wireless transmission technology. The terminal device 30 can help users send and receive emails, browse webpages, and access streaming media through the WiFi module 307. It provides users with wireless broadband Internet access. Although FIG. 8 shows a WiFi module 307, it can be understood that it is not an essential component of the terminal device 30, and can be completely omitted as required without changing the essence of the invention.
处理器308是终端设备30的控制中心,利用各种接口和线路连接整个终端设备30的各个部分,通过运行或执行存储在存储器302内的计算机程序和/或模块,以及调用存储在存储器302内的数据,执行终端设备30的各种功能和处理数据,从而对终端设备30进行整体监控。可选的,处理器308可包括一个或多个处理核心;优选的,处理器308可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器308中。The processor 308 is the control center of the terminal device 30, and uses various interfaces and lines to connect various parts of the entire terminal device 30, and runs or executes computer programs and/or modules stored in the memory 302, and calls stored in the memory 302 data, execute various functions of the terminal device 30 and process data, so as to monitor the terminal device 30 as a whole. Optionally, the processor 308 may include one or more processing cores; preferably, the processor 308 may integrate an application processor and a modem processor, wherein the application processor mainly processes operating systems, user interfaces, and application programs, etc. , the modem processor mainly handles wireless communications. It can be understood that the foregoing modem processor may not be integrated into the processor 308 .
终端设备30还包括给各个部件供电的电源303(比如电池),优选的,电源可以通过电源管理系统与处理器308逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。电源303还可以包括一个或多个直流或交流电源、再充电系统、电源故障检测电路、电源转换器或者逆变器、电源状态指示器等任意组件。The terminal device 30 also includes a power supply 303 (such as a battery) for supplying power to various components. Preferably, the power supply can be logically connected to the processor 308 through the power management system, so that functions such as charging, discharging, and power consumption management can be realized through the power management system. . The power supply 303 may also include one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators, and any other components.
尽管未示出,终端设备30还可以包括摄像头、蓝牙模块等,此处不再赘述。具体在本发明实施例中,终端设备的输出装置304(或输入装置303)是触摸屏显示器,终端设备30还包括有存储器302、处理器308、以及一个或多个的计算机程序,其中一个或多个计算机程序存储于存储器302中,处理器308用于调用存储器302(非易失性存储器)存储的域名系统DNS处理的程序执行前述方法实施例中的各方法步骤流程,在此不再赘述。Although not shown, the terminal device 30 may also include a camera, a Bluetooth module, etc., which will not be repeated here. Specifically, in the embodiment of the present invention, the output device 304 (or input device 303) of the terminal device is a touch screen display, and the terminal device 30 also includes a memory 302, a processor 308, and one or more computer programs, wherein one or more A computer program is stored in the memory 302, and the processor 308 is used to call the domain name system DNS processing program stored in the memory 302 (non-volatile memory) to execute the steps and procedures of the methods in the foregoing method embodiments, which will not be repeated here.
本发明实施例还提供一种计算机存储介质,其中,该计算机存储介质可存储有程序,该程序执行时包括上述方法实施例中记载的任何一种域名系统DNS处理方法的部分或全部步骤。An embodiment of the present invention also provides a computer storage medium, wherein the computer storage medium can store a program, and the program includes some or all steps of any domain name system DNS processing method described in the above method embodiments when executed.
需要说明的是,对于前述的各方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本发明并不受It should be noted that, for the sake of simple description, the aforementioned method embodiments are expressed as a series of action combinations, but those skilled in the art should know that the present invention is not limited by
所描述的动作顺序的限制,因为依据本发明,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和模块并不一定是本发明所必须的。The sequence of actions described is limited because certain steps may be performed in other orders or simultaneously in accordance with the invention. Secondly, those skilled in the art should also know that the embodiments described in the specification belong to preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。In the foregoing embodiments, the descriptions of each embodiment have their own emphases, and for parts not described in detail in a certain embodiment, reference may be made to relevant descriptions of other embodiments.
在本申请所提供的几个实施例中,应该理解到,所揭露的装置,可通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed device can be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or can be Integrate into another system, or some features may be ignored, or not implemented. In another point, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储器中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储器中,包括若干指令用以使得一台计算机设备(可为个人计算机、服务器或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储器包括:U盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。If the integrated unit is realized in the form of software function unit and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the essence of the technical solution of the present invention or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a memory. Several instructions are included to make a computer device (which may be a personal computer, server or network device, etc.) execute all or part of the steps of the methods described in various embodiments of the present invention. The above-mentioned memory includes: various media capable of storing program codes such as USB flash drive, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk.
本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序可以存储于一计算机可读存储器中,存储器可以包括:闪存盘、只读存储器(英文:Read-Only Memory,简称:ROM)、随机存取器(英文:Random Access Memory,简称:RAM)、磁盘或光盘等。Those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above-mentioned embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable memory, and the memory can include: a flash disk , Read-only memory (English: Read-Only Memory, abbreviated: ROM), random access device (English: Random Access Memory, abbreviated: RAM), magnetic disk or optical disk, etc.
以上对本发明实施例进行了详细介绍,本文中应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想;同时,对于本领域的一般技术人员,依据本发明的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本发明的限制。The embodiments of the present invention have been described in detail above, and specific examples have been used in this paper to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only used to help understand the method and core idea of the present invention; at the same time, for Those skilled in the art will have changes in the specific implementation and scope of application according to the idea of the present invention. In summary, the contents of this specification should not be construed as limiting the present invention.
Claims (7)
- A kind of 1. domain name system DNS processing method, it is characterised in that including:In the case where the access network for detecting terminal device switches, the DNS query request of target domain name is initiated;Receive dns resolution result corresponding to DNS query request, the dns resolution result include it is at least one with it is described First IP address corresponding to target domain name;First IP address is stored in the terminal device;Methods described also includes:Before the access network for detecting terminal device switches, the aiming field is stored with the terminal device Second IP address corresponding to name;If accessing network site failure corresponding to first IP address, network position corresponding to second IP address is accessed Put;If accessing network site failure corresponding to second IP address, the target domain name is sent to the terminal device Dns resolution result late note, to prompt the terminal device to carry out the renewal of IP address corresponding to the target domain name.
- 2. the method as described in claim 1, it is characterised in that methods described also includes:When receiving the access instruction for the target domain name, the first IP being stored in the terminal device is accessed Network site corresponding to address.
- 3. method as claimed in claim 1 or 2, it is characterised in that the access network switches including following at least one :Switching between Wireless Fidelity Wi-Fi network and mobile data network;Switching between different mobile data networks;Switching between different Wi-Fi networks.
- A kind of 4. domain name system DNS processing unit, it is characterised in that including:Enquiry module, in the case of being switched in the access network for detecting terminal device, initiate the DNS of target domain name Inquiry request;Receiving module, for receiving dns resolution result corresponding to DNS query request, the dns resolution result include to Few first IP address corresponding with the target domain name;First memory module, for first IP address to be stored in the terminal device;Described device also includes:Second memory module, for before the access network for detecting terminal device switches, the terminal device In be stored with the second IP address corresponding to the target domain name;Second access modules, if for accessing network site failure corresponding to first IP address, access the 2nd IP Network site corresponding to address;Notification module, if for accessing network site failure corresponding to second IP address, sent to the terminal device The dns resolution result late note of the target domain name, to prompt the terminal device to carry out corresponding to the target domain name The renewal of IP address.
- 5. device as claimed in claim 4, it is characterised in that described device also includes:First access modules, for when receiving the access instruction for the target domain name, access to be stored in the terminal Network site corresponding to first IP address in equipment.
- 6. the device as described in claim 4 or 5, it is characterised in that the access network switches including following at least one :Switching between Wireless Fidelity Wi-Fi network and mobile data network;Switching between different mobile data networks;Switching between different Wi-Fi networks.
- A kind of 7. terminal device, it is characterised in that including:It is stored with the memory of executable program code;The processor coupled with the memory;The processor calls the executable program code stored in the memory, performs as claims 1 to 3 is any Method described in.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610749575.2A CN106331213B (en) | 2016-08-29 | 2016-08-29 | Domain name system DNS processing method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610749575.2A CN106331213B (en) | 2016-08-29 | 2016-08-29 | Domain name system DNS processing method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106331213A CN106331213A (en) | 2017-01-11 |
CN106331213B true CN106331213B (en) | 2017-11-24 |
Family
ID=57789868
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610749575.2A Active CN106331213B (en) | 2016-08-29 | 2016-08-29 | Domain name system DNS processing method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106331213B (en) |
Families Citing this family (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2018137180A1 (en) * | 2017-01-25 | 2018-08-02 | 华为技术有限公司 | Domain name access method and device |
CN107743149B (en) * | 2017-11-20 | 2021-03-16 | 广州华多网络科技有限公司 | Network access method, device and terminal |
CN109981806B (en) * | 2017-12-28 | 2022-07-05 | 北京京东尚科信息技术有限公司 | Domain name processing and registering method and system, and computer system |
CN108924274B (en) * | 2018-09-14 | 2021-10-26 | Oppo广东移动通信有限公司 | Domain name system DNS processing method and device, storage medium and electronic equipment |
CN109618017A (en) * | 2018-12-12 | 2019-04-12 | 北京知道创宇信息技术有限公司 | Domain name management method, apparatus and system |
CN110098978B (en) * | 2019-04-12 | 2021-02-26 | 网宿科技股份有限公司 | DNS scheduling test method and device, network equipment and storage medium |
CN110351115A (en) * | 2019-05-23 | 2019-10-18 | 中国平安财产保险股份有限公司 | Reduce method, apparatus, computer equipment and the storage medium of network access time delay |
CN110784560A (en) * | 2019-09-19 | 2020-02-11 | 平安壹钱包电子商务有限公司 | Network connection method, device, computer equipment and computer readable storage medium |
CN114006935B (en) * | 2020-07-14 | 2023-11-21 | 成都鼎桥通信技术有限公司 | Private network terminal network access method, device and equipment |
CN111917899B (en) * | 2020-07-28 | 2022-05-17 | 平安科技(深圳)有限公司 | Domain name compression method and related product thereof |
CN113452808B (en) * | 2021-06-29 | 2023-06-23 | 百果园技术(新加坡)有限公司 | Domain name resolution method, device, equipment and storage medium |
CN114785781B (en) * | 2022-03-22 | 2024-03-26 | 阿里巴巴(中国)有限公司 | Data access method and device |
CN114785753B (en) * | 2022-05-05 | 2023-10-27 | 上海道客网络科技有限公司 | Domain name resolution method, system, medium and electronic equipment of container cloud platform |
CN116382809B (en) * | 2023-05-26 | 2023-10-20 | 荣耀终端有限公司 | Application program starting method and electronic equipment |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101964968A (en) * | 2009-07-22 | 2011-02-02 | 中兴通讯股份有限公司 | Method and system for inquiring domain name in mobile terminal |
WO2013082791A1 (en) * | 2011-12-08 | 2013-06-13 | 华为技术有限公司 | Dns client address and rr ttl updating method, device and system |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101945374B (en) * | 2009-07-03 | 2014-01-01 | 华为终端有限公司 | Network switching method, communication system and corresponding device |
-
2016
- 2016-08-29 CN CN201610749575.2A patent/CN106331213B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101964968A (en) * | 2009-07-22 | 2011-02-02 | 中兴通讯股份有限公司 | Method and system for inquiring domain name in mobile terminal |
WO2013082791A1 (en) * | 2011-12-08 | 2013-06-13 | 华为技术有限公司 | Dns client address and rr ttl updating method, device and system |
Also Published As
Publication number | Publication date |
---|---|
CN106331213A (en) | 2017-01-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106331213B (en) | Domain name system DNS processing method and device | |
US11057376B2 (en) | Method, apparatus, and system for controlling intelligent device, and storage medium | |
EP3306865B1 (en) | Communication message sending method and device | |
US10304461B2 (en) | Remote electronic service requesting and processing method, server, and terminal | |
WO2015090248A1 (en) | Server overload protection method and device | |
WO2014206276A1 (en) | Domain name resolution method, domain name server, and domain name access method, system and terminal | |
WO2014206143A1 (en) | Method, apparatus and device for displaying number of unread messages | |
CN106357897A (en) | Method and device for obtaining drop information | |
WO2014206138A1 (en) | Webpage data update method, apparatus and terminal device | |
WO2015000430A1 (en) | Intelligent word selection method and device | |
WO2015067142A1 (en) | Webpage display method and device | |
CN106131930A (en) | A WiFi network access control method, device and terminal | |
WO2015043192A1 (en) | Character selection method and apparatus and terminal device | |
CN106951761A (en) | A fingerprint unlocking method and device | |
CN106326072B (en) | Information processing method and mobile terminal | |
CN106648455A (en) | Data migration method and mobile terminal | |
CN107466015A (en) | Network access control method and related products | |
WO2014183438A1 (en) | Method, apparatus, and communication system for allocating and managing voice channels | |
US10628078B2 (en) | Data access method and related device | |
CN106339862A (en) | Information processing method and mobile terminal | |
CN107045610B (en) | Data migration method, terminal device and computer-readable storage medium | |
US20140344423A1 (en) | Method, apparatus and system for switching function mode | |
CN111314900B (en) | Wireless connection method, wireless connection device and mobile terminal | |
CN106658705A (en) | A network positioning method and terminal equipment | |
CN106302718B (en) | Data downloading method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CP01 | Change in the name or title of a patent holder |
Address after: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18 Patentee after: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP., Ltd. Address before: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18 Patentee before: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP., Ltd. |
|
CP01 | Change in the name or title of a patent holder |