CN111314472B - Domain name resolution method, domain name resolution server and terminal equipment - Google Patents

Domain name resolution method, domain name resolution server and terminal equipment Download PDF

Info

Publication number
CN111314472B
CN111314472B CN202010108777.5A CN202010108777A CN111314472B CN 111314472 B CN111314472 B CN 111314472B CN 202010108777 A CN202010108777 A CN 202010108777A CN 111314472 B CN111314472 B CN 111314472B
Authority
CN
China
Prior art keywords
address
domain name
user terminal
server
user
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
Application number
CN202010108777.5A
Other languages
Chinese (zh)
Other versions
CN111314472A (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.)
Juhaokan Technology Co Ltd
Original Assignee
Juhaokan 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 Juhaokan Technology Co Ltd filed Critical Juhaokan Technology Co Ltd
Priority to CN202010108777.5A priority Critical patent/CN111314472B/en
Publication of CN111314472A publication Critical patent/CN111314472A/en
Priority to PCT/CN2020/129871 priority patent/WO2021120969A1/en
Application granted granted Critical
Publication of CN111314472B publication Critical patent/CN111314472B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1004Server selection for load balancing
    • H04L67/1021Server selection for load balancing based on client or server locations
    • 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]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1004Server selection for load balancing
    • H04L67/1023Server selection for load balancing based on a hash applied to IP addresses or costs

Landscapes

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

Abstract

The method comprises the steps of searching whether a corresponding prior access address exists in a historical analysis record according to a user identification carried by a domain name resolution request after receiving the domain name resolution request, and returning the prior access address to a user terminal if the corresponding prior access address is searched, so that the user terminal can access data according to the prior access address. Because the prior access address corresponding to the user identifier is the server address which is analyzed and is closest to the user terminal initiating the request when the user terminal of the user identifier is used for prior access, when the same user identifier logs in on a plurality of devices in a plurality of regions, the user terminal accessed later and the user terminal accessed previously can access the same server to obtain the required data, and further, the consistency of the data obtained by each device is ensured.

Description

Domain name resolution method, domain name resolution server and terminal equipment
Technical Field
The present application relates to the field of internet technologies, and in particular, to a domain name resolution method, a domain name resolution server, and a terminal device.
Background
In the related art, a client user accesses a server corresponding to a target domain name through the internet to acquire a data resource. The Domain Name resolution is usually performed by a Domain Name System (DNS), which is used as a distributed database that can map Domain names and IP (Internet Protocol) addresses to each other, and can resolve the Domain names to obtain IP addresses of corresponding servers, and return the IP addresses to the client, so that the client performs data access. In the process of data access by the client, if the physical distance between the user at the client and the server is long, the problems of high delay and high packet loss rate in the data access process are caused, and the user experience is influenced.
The remote multi-active technology deploys data center servers in different regions, synchronizes data resources provided by the CSP to the data center servers in different regions, and can realize the near access of a client user based on a preset routing strategy, namely, the access of the client is routed to a server closest to the client. However, when the same registered account (and its bound/associated account) logs onto the internet on different devices in different regions, different devices will be queried for different access addresses, so that different devices using the same registered account will access different servers. At this time, if the data on these accessed servers are inconsistent, the data requested by different devices will be inconsistent.
Disclosure of Invention
The application provides a domain name resolution method, a domain name access method, a domain name resolution server and terminal equipment, and aims to solve the problem of consistency of acquired data when the same registered account logs in multiple devices in multiple regions.
In a first aspect, the present application provides a domain name resolution method, including:
receiving a domain name resolution request sent by a user terminal, wherein the domain name resolution request carries a user identifier for logging in the user terminal;
according to the user identification, whether a prior access address corresponding to the user identification exists is searched in a historical analysis record, and the prior access address corresponding to the user identification is an IP address of a server closest to the user terminal obtained according to a domain name analysis request when a user terminal using the user identification carries out prior access;
if the prior access address corresponding to the user identifier is found in the historical analysis record, the prior access address is returned to the user terminal, so that the user terminal can access data according to the prior access address.
In a second aspect, the present application provides a domain name access method, including:
generating a domain name query request carrying a user identifier;
sending the domain name query request to a server;
receiving a prior access address or a target access address returned by the server, wherein the prior access address is a prior access address corresponding to the user identifier and found in a historical resolution record by the server, and the target access address is an IP address of a server which is determined by the server according to the domain name resolution request and is closest to the user terminal;
and performing data access according to the prior access address or the target access address.
In a third aspect, the present application provides a domain name resolution server, including:
the receiving module is used for receiving a domain name resolution request sent by a user terminal, wherein the domain name resolution request carries a user identifier for logging in the user terminal;
the first analysis module is used for searching whether a prior access address corresponding to the user identifier exists in a historical analysis record according to the user identifier, wherein the prior access address corresponding to the user identifier is an IP address of a server closest to the user terminal obtained according to a domain name analysis request when a user terminal using the user identifier performs prior access;
and the sending module is used for returning the prior access address to the user terminal if the prior access address corresponding to the user identifier is found in the historical analysis record, so that the user terminal can access data according to the prior access address.
In a fourth aspect, the present application provides a terminal device, comprising:
the generation module is used for generating a domain name query request carrying a user identifier;
the sending module is used for sending the domain name inquiry request to a server;
a receiving module, configured to receive a previous access address or a target access address returned by the server, where the previous access address is a previous access address corresponding to the user identifier and found in a history resolution record by the server, and the target access address is an IP address of a server closest to a user terminal and determined by the server according to the domain name resolution request;
and the access module is used for accessing data according to the prior access address or the target access address.
According to the technical scheme, the embodiment of the application provides a domain name resolution method, a domain name access method, a domain name resolution server and a terminal device, wherein after receiving a domain name resolution request, the domain name resolution method searches whether a corresponding prior access address exists in a historical resolution record according to a user identifier carried by the domain name resolution request, and if the prior access address corresponding to the user identifier is found, the prior access address is returned to the user terminal so that the user terminal can access data according to the prior access address. Because the prior access address corresponding to the user identifier is the server address which is analyzed by the server and is closest to the user terminal initiating the request when the user terminal using the user identifier accesses in the prior, when the same user identifier logs in on multiple devices in multiple regions, the user terminal accessing in the later and the user terminal accessing in the prior can access the same server to obtain the required data, and further, the consistency of the data obtained by each device with the same user identifier is ensured while the near access of the user terminal is ensured.
Drawings
In order to more clearly explain the technical solution of the present application, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious to those skilled in the art that other drawings can be obtained according to the drawings without any creative effort.
FIG. 1 is a schematic diagram of an implementation scenario illustratively shown in the present application according to some embodiments;
FIG. 2 is a flow diagram illustrating a domain name resolution method according to some embodiments of the present application;
FIG. 3 is a flow diagram illustrating a domain name access method according to some embodiments of the present application;
FIG. 4 is a block diagram of a domain name resolution server illustratively shown herein in accordance with some embodiments;
fig. 5 is a block diagram of a terminal device illustratively shown in the present application according to some embodiments.
Detailed Description
In order to make those skilled in the art better understand the technical solutions in the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
A Content Service Provider (CSP) can provide data resources such as videos, pictures, and texts for an internet user, and when a user terminal (client) needs to request data resources from the internet, it needs to obtain an access address of the data resources, i.e. an IP address of a server where the data resources are located, so as to communicate with the server.
In fact, the IP address is composed of 32-bit binary digits, which is difficult for the user to remember, and thus the server hostname is mapped to the IP, a mapping relationship between the server hostname and the IP address is formed, and the mapping relationship is used to obtain the IP address of the server of which the hostname is known. A Domain Name System (DNS), that is, a service System that stores mapping relationships between all Domain names and IPs on the internet, can respond to a Domain Name resolution request from a user terminal, resolve a target Domain Name (e.g., www.hisense.com), obtain an IP address of a corresponding server, and return the IP address to the user terminal, so that the user terminal can perform data access.
In some embodiments, the user terminal may initiate a recursive query or an iterative query to the DNS, and the DNS performs the recursive query or the iterative query in response to a request of the user terminal and returns a query result to the user terminal. The query result of the DNS may be an IP address of a server corresponding to the domain name, or an error, which indicates that the required IP address cannot be queried.
In some embodiments, in order to browse data information provided by the data center server of the CSP, an end user needs to sequentially go through a backbone network of an Internet Service Provider (ISP), a metropolitan area network, and an access network, and finally reach the user terminal. With the increase of the service access volume, the network traffic pressure of the CSP server also increases, and if the distance between the user terminal and the CSP server is long, there will be a high delay and a high packet loss rate in the network transmission.
In the remote multi-active technology, data center servers are deployed in different regions, data resources provided by CSP are synchronized to the data center servers in different regions, and then routing is carried out by using DNS based on an exit IP of a client, so that a user can obtain the data resources from the server closest to the user, namely, access nearby, and the problems of long delay time and high packet loss rate in the data access process are solved.
In some embodiments, a user terminal may initiate recursive query or iterative query to a DNS, the DNS performs the recursive query or the iterative query in response to a request of the user terminal to obtain an IP address list of a server corresponding to a target domain name, then determines a geographical location of the user terminal according to the IP address of the user terminal, and finally selects an IP address of a server closest to the geographical location of the user terminal from the IP address list obtained by the query, and returns the IP address to a client as a query result, thereby enabling the user terminal to access nearby.
In some embodiments, the IP address is mapped to a geographic location (region, such as administrative region), a mapping relationship between the IP address and the geographic location is formed, and the geographic location where the user terminal of the known export IP is located is obtained by using the mapping relationship.
As can be seen from the above embodiments, the resolution result (IP address of target domain name) of the DNS service to the domain name resolution request depends on the geographical location of the requesting user terminal, which means that the user terminals in different regions can be routed to the data center servers in different regions to request data.
However, since the data synchronization process between the data center servers in different regions is performed periodically, and the data synchronization time may reach several seconds or even longer due to the long distance between the data center servers in different regions, the data on the data center servers in different regions is inconsistent in a certain period of time. During this time, if the same registered account (and the account bound/associated with the same account) logs in the internet to request data on different devices in different regions, the devices are caused to query different access addresses, so that a plurality of devices using the same registered account access different servers to obtain different data.
As shown in fig. 1, the user a logs in (the upper client U) on the terminal device 1 using the registered account ID-1 in the region D1, and the user b logs in (the upper client U) on the terminal device 2 using the same registered account ID-1 in the region D2. Terminal device 1 and terminal device 2 respectively request the DNS system to resolve the IP address of the target domain name (e.g., www.hisense.com); responding to a request of a user terminal by the DNS, and executing recursive query or iterative query to obtain an IP address list of a server corresponding to a target domain name; the DNS judges the geographical position of the terminal device 1 according to the IP address of the terminal device 1, searches the IP address of the server 3 nearest to the terminal device 1 from the IP address list, returns the IP address to the terminal device 1, judges the geographical position of the terminal device 2 according to the IP address of the terminal device 2, searches the IP address of the server 4 nearest to the terminal device 2 from the IP address list, and returns the IP address to the terminal device 2.
When the IP addresses returned by the DNS server to the terminal device 1 and the terminal device 2 are different due to different geographical locations of the terminal device 1 and the terminal device 2, that is, the server 3 and the server 4 are different servers, the terminal device 1 and the terminal device 2 may request inconsistent data.
In addition, when the mapping relationship between the IP address and the geographic location changes, the above-mentioned routing method for determining the geographic location of the user terminal according to the IP address of the user terminal may also cause the terminal user to access different data center servers, and further cause the requested data to be inconsistent.
For example, before the mapping relationship between the IP address and the geographic location is changed, the terminal device 1 maps the IP address of the region D1 to the region D1, and after the mapping relationship between the IP address and the geographic location is changed, the IP address is mapped to the region D2, and at this time, the server changes the geographic location where the user terminal is assumed to be located from the region D1 to the region D2, so that the user terminal may access the data center server in different regions before and after the mapping relationship is changed, and the requested data may be inconsistent.
In order to ensure the consistency of data requested by different devices using the same registered account, the embodiment of the application provides a domain name resolution method, which can solve the problem of data consistency when multiple devices log in multiple regions of the same user while ensuring that a user terminal accesses nearby.
Fig. 2 is a flowchart illustrating a domain name resolution method according to some embodiments of the present application, and as shown in fig. 2, the method may include:
in step 110, the user terminal responds to the user operation to generate a domain name query request carrying the user identifier.
The domain name query request comprises information such as a user identifier, a target domain name, an outlet IP address of the client, a terminal device identifier and the like, wherein the user identifier refers to a registered account number of the client or other account numbers which have association or binding relation with the registered account number, such as a mobile phone number, logged in the user terminal.
And step 120, sending the domain name query request to a server.
Step 130, the server receives a domain name resolution request sent by the user terminal, where the domain name resolution request carries a user identifier of a client logged in the user terminal.
Step 140, the server searches whether there is a previous access address corresponding to the user identifier in the history resolution record according to the user identifier carried in the domain name resolution request, where the previous access address corresponding to the user identifier is an IP address of a server closest to a geographical location of the user terminal, where the server is located, when the user terminal using the user identifier performs previous access, and the server obtains the IP address of the server closest to the geographical location of the user terminal according to the domain name resolution request.
For convenience of description of the embodiment of the present application, a process of the user terminal requesting the server to resolve the target domain name in step 120 is defined as a current access, and an access process of the user terminal or another user terminal earlier than the current access is defined as a previous access.
If the previous access address corresponding to the user identifier is found, step 150 is performed, and if the previous access address corresponding to the user identifier is not found, step 160 is performed.
If the previous access address corresponding to the user identifier is found in the history analysis record, in step 150, the previous access address is returned to the user terminal, so that the user terminal can access data according to the previous access address, and the client logged in by using the user identifier still accesses the server previously accessed by the client, thereby ensuring the consistency of the data acquired when the same user account logs in on multiple devices in multiple regions.
If the previous access address corresponding to the user identifier is not found in the history resolution record, in step 160, the IP address of the server closest to the geographical location where the user terminal is located is determined as the target access address according to the domain name resolution request. And in step 170, returning the determined target access address to the user terminal, so that the user terminal performs data access according to the target access address.
The historical resolution record comprises a plurality of information items, each information item consists of a user identifier and a corresponding prior access address, the user identifier in each information item is carried by a domain name resolution request sent by a prior access user terminal, the prior access address is a resolution result returned to the user terminal by the server, and the prior access address is obtained by the server through resolution according to the domain name resolution request and is the IP address of the server closest to the geographical position of the user terminal.
In some embodiments, the user a logs in (a client U on) the terminal device 1 in the region D-1 by using the registered account ID-1, the terminal device 1 generates a domain name resolution request carrying the user identifier ID-1 and sends the domain name resolution request to the server, and the domain name resolution request further includes an IP address of the terminal device 1 and a target domain name to be resolved. The server receives the domain name resolution request sent by the terminal device 1, and firstly searches whether a prior access address corresponding to the user identification ID-1 exists in a history resolution record.
In an exemplary case where the history resolution record does not include an information entry about the user identifier ID-1, the server resolves the IP address IP-1 of the server 1 closest to the terminal device from the IP address of the terminal device 1 and the target domain name, returns the IP address IP-1 to the terminal device 1, and stores the user identifier ID-1 and IP-1 correspondence in the history resolution record, as shown in table 1:
TABLE 1
User identification Prior access address Time of access
ID-1 IP-1 Time1
ID-2 IP-2 Time2
ID-n IP-n Timen
In table 1, the access time may be a time when the server receives a domain name resolution request sent by the client, or a time when the server returns a resolution result to the client, which is not limited in the present application.
In some embodiments, the user b logs in (the client U on) the terminal device 2 in the region D-2 using the registration account ID-1, the terminal device 2 generates a domain name resolution request carrying the user identifier ID-1, and sends the domain name resolution request to the server, where the domain name resolution request further includes an IP address of the terminal device 2 and a target domain name to be resolved. The server receives the domain name resolution request sent by the terminal device 2, and firstly searches whether a prior access address corresponding to the user identification ID-1 exists in a history resolution record.
In an exemplary case where the history resolution record includes an information entry about the user identifier ID-1, taking the history resolution record shown in table 1 above as an example, the previous access address corresponding to the user identifier ID-1 is IP-1, and the server returns the previous access address IP-1 to the terminal device 2 as a resolution result.
As can be seen from the above embodiments, the terminal devices 1 and 2 successively request the server to resolve the IP address of the target domain name using the same registered account ID-1, the terminal device 1 that accessed first accesses obtains the required data according to the server 1 that is nearby the IP-1, and the terminal device 2 that accessed later accesses the server 1 according to the IP-1 to obtain the data consistent with the terminal device 1, thereby solving the problem of consistency of data obtained during multi-region multi-device login using the same registered account.
In some embodiments, the first mapping relationship and the second mapping relationship are obtained in advance. The first mapping relation is a mapping relation between a domain name and an IP address and is used for resolving a corresponding IP address according to a target domain name in a domain name resolution request, and the second mapping relation is a mapping relation between the IP address and a geographic position and is used for determining the geographic position of a user terminal according to the IP address of the user terminal in the domain name resolution request; in addition, the second mapping relation is also used for determining the geographical position of the server according to the IP address of the server in the first mapping relation, and further determining the server closest to the user terminal under the condition that the geographical position of the user terminal and the geographical position of the server are known.
Based on this, the server can determine the IP address of the server closest to the user terminal according to the following steps: firstly, acquiring an IP address list corresponding to a target domain name according to a first mapping relation and the target domain name, wherein the IP address list comprises IP addresses of servers corresponding to at least one target domain name; respectively determining the geographical position of the user terminal and the geographical position of the server in the IP address list according to the second mapping relation, the IP address of the user terminal and the IP address of the server in the IP address list; and finally, selecting the IP address of the server closest to the user terminal from the IP address list according to the geographical position of the user terminal and the geographical position of the server in the IP address list.
In some embodiments, in order to improve the flexibility of the domain name resolution method of the present application to better adapt to user requirements, when the storage duration of the previous access address in the history resolution record exceeds the preset duration, the previous access address exceeding the preset duration and the corresponding user identifier are deleted from the history resolution record. And regularly detecting whether the information items in the historical analysis record are overdue or not, and deleting the overdue information items, so that the change of the user in the geographical area can be tracked in time, and the situation that the user still obtains data according to the prior access address after migrating is avoided.
According to the technical scheme, the embodiment of the application provides a domain name resolution method, a domain name access method, a domain name resolution server and a terminal device, wherein after receiving a domain name resolution request, the domain name resolution method searches whether a corresponding prior access address exists in a historical resolution record according to a user identifier carried by the domain name resolution request, and if the prior access address corresponding to the user identifier is found, the prior access address is returned to the user terminal so that the user terminal can access data according to the prior access address. Because the prior access address corresponding to the user identifier is the server address which is analyzed by the server and is closest to the user terminal initiating the request when the user terminal using the user identifier accesses in the prior, when the same user identifier logs in on multiple devices in multiple regions, the user terminal accessing in the later and the user terminal accessing in the prior can access the same server to obtain the required data, and further, the consistency of the data obtained by each device with the same user identifier is ensured while the near access of the user terminal is ensured.
In some embodiments, the domain name resolution method provided by the embodiment of the present application may be applied to a GSLB (Global Server Load Balance) cluster, and provide a control terminal and a redis for the GSLB cluster. And importing the first mapping relation data and the second mapping relation data by using a UI panel of the control terminal, and storing the first mapping relation data, the second mapping relation data and the historical analysis record in the redis.
According to the domain name resolution method shown in fig. 2, an embodiment of the present application further provides a domain name access method, which is applied to a client, and as shown in fig. 3, the method may include:
step 210, generating a domain name query request carrying the user identifier.
The domain name query request also includes an egress IP address of the client and a target domain name.
Step 220, sending the domain name query request to a server.
Step 230, receiving a previous access address or a target access address returned by the server, where the previous access address is a previous access address corresponding to the user identifier and found in a history resolution record by the server, and the target access address is an IP address of a server closest to the user terminal and determined by the server according to the domain name resolution request.
And step 240, performing data access according to the prior access address or the target access address.
According to the domain name resolution method provided in the embodiment shown in fig. 2, an embodiment of the present application further provides a domain name resolution server, and as shown in fig. 4, the domain name resolution server may include:
a receiving module 410, configured to receive a domain name resolution request sent by a user terminal, where the domain name resolution request carries a user identifier for logging in the user terminal;
a first parsing module 420, configured to search, according to the user identifier, in a historical parsing record, whether a previous access address corresponding to the user identifier exists, where the previous access address corresponding to the user identifier is an IP address of a server closest to a user terminal obtained according to a domain name resolution request when a user terminal using the user identifier performs previous access;
a sending module 430, configured to, if a previous access address corresponding to the user identifier is found in the history parsing record, return the previous access address to the user terminal, so that the user terminal performs data access according to the previous access address.
In some embodiments, the domain name resolution server may further include: and the second resolution module is used for determining the IP address of the server closest to the user terminal according to the domain name resolution request if the prior access address corresponding to the user identifier is not found in the historical resolution record.
In some embodiments, the sending module is further configured to return the IP address of the server closest to the user terminal as a target access address, so that the user terminal performs data access according to the target access address.
In some embodiments, the domain name resolution server may further include: and the recording module is used for correspondingly storing the user identification and the target access address in the history analysis record.
In some embodiments, the second parsing module is specifically configured to: acquiring an IP address list corresponding to the target domain name, wherein the IP address list comprises the IP address of at least one server corresponding to the target domain name; determining the geographical position of the user terminal and the geographical position of the server according to the IP address of the user terminal and the IP address of the server in the IP address list; and selecting the IP address of the server closest to the user terminal from the IP address list according to the geographical position of the user terminal and the geographical positions of the servers in the IP address list.
In some embodiments, the second parsing module is specifically configured to: acquiring a mapping relation between an IP address and a geographic position; and searching the geographical position of the user terminal in the mapping relation according to the IP address of the user terminal.
In some embodiments, a GSLB cluster is built based on a domain name resolution server provided in the embodiments of the present application, and a control terminal and a redis are provided for the GSLB cluster. And importing the first mapping relation data and the second mapping relation data by using a UI panel of the control terminal, and storing the first mapping relation data, the second mapping relation data and the historical analysis record in the redis.
According to the domain name access method provided by the embodiment shown in fig. 3, the embodiment of the present application further provides a terminal device, which includes but is not limited to a display device, a portable intelligent user device, a head-mounted intelligent device, and the like. As shown in fig. 5, a terminal device provided in an embodiment of the present application includes:
a generating module 510, configured to generate a domain name query request carrying a user identifier;
a sending module 520, configured to send the domain name query request to a server;
a receiving module 530, configured to receive a previous access address or a target access address returned by the server, where the previous access address is a previous access address corresponding to the user identifier and found in a history resolution record by the server, and the target access address is an IP address of a server closest to a user terminal and determined by the server according to the domain name resolution request;
and an accessing module 540, configured to perform data access according to the previous access address or the target access address.
In a specific implementation, the present invention further provides a computer storage medium, where the computer storage medium may store a program, and the program may include some or all of the steps in each embodiment of the domain name resolution method or the domain name access method provided by the present invention when executed, and when a processor of a domain name resolution server or a terminal device provided by the present application runs the computer program instructions, the processor executes the steps of the domain name resolution method or the domain name access method provided by the present application. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM) or a Random Access Memory (RAM).
Those skilled in the art will readily appreciate that the techniques of the embodiments of the present invention may be implemented as software plus a required general purpose hardware platform. Based on such understanding, the technical solutions in the embodiments of the present invention may be essentially or partially implemented in the form of a software product, which may be stored in a storage medium, such as ROM/RAM, magnetic disk, optical disk, etc., and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method according to the embodiments or some parts of the embodiments.
The same and similar parts in the various embodiments in this specification may be referred to each other. Especially, for the embodiments of the domain name resolution server and the terminal device, since they are basically similar to the embodiments of the method, the description is simple, and the relevant points can be referred to the description in the embodiments of the method.
The above-described embodiments of the present invention should not be construed as limiting the scope of the present invention.

Claims (9)

1. A domain name resolution method is characterized by comprising the following steps:
receiving a domain name resolution request sent by a user terminal, wherein the domain name resolution request carries a user identifier for logging in the user terminal; acquiring a first mapping relation and a second mapping relation in advance; the first mapping relation is a mapping relation between a domain name and an IP address and is used for resolving a corresponding IP address according to a target domain name in a domain name resolution request, and the second mapping relation is a mapping relation between the IP address and a geographic position and is used for determining the geographic position of a user terminal according to the IP address of the user terminal in the domain name resolution request;
according to the user identification, whether a prior access address corresponding to the user identification exists is searched in a historical analysis record, and the prior access address corresponding to the user identification is an IP address of a server closest to the user terminal obtained according to a domain name analysis request when a user terminal using the user identification carries out prior access; the prior access address comprises an IP address last accessed by the user terminal or an IP address last accessed by other user terminals with the same user identification;
if the prior access address corresponding to the user identifier is found in the historical analysis record, returning the prior access address to the user terminal so that the user terminal can access data according to the prior access address;
if the prior access address corresponding to the user identifier is not found in the historical resolution record, determining the IP address of the server closest to the user terminal according to the domain name resolution request;
and returning the IP address of the server closest to the user terminal as a target access address to the user terminal so that the user terminal can access data according to the target access address.
2. The method of claim 1, further comprising:
and correspondingly storing the user identification and the target access address in the history analysis record.
3. The method of claim 1, wherein the domain name resolution request comprises an IP address of the user terminal and a target domain name, and wherein determining the IP address of the server closest to the user terminal according to the domain name resolution request comprises:
acquiring an IP address list corresponding to the target domain name, wherein the IP address list comprises the IP address of at least one server corresponding to the target domain name;
determining the geographical position of the user terminal and the geographical position of the server according to the IP address of the user terminal and the IP address of the server in the IP address list;
and selecting the IP address of the server closest to the user terminal from the IP address list according to the geographical position of the user terminal and the geographical positions of the servers in the IP address list.
4. The method of claim 3, wherein determining the geographic location of the user terminal based on the IP address of the user terminal comprises:
acquiring a mapping relation between an IP address and a geographic position;
and searching the geographical position of the user terminal in the mapping relation according to the IP address of the user terminal.
5. The method of claim 1, further comprising:
and when the storage duration of the prior access address in the historical analysis record exceeds the preset duration, deleting the prior access address and the corresponding user identifier in the historical analysis record.
6. A method for domain name access, the method comprising:
generating a domain name query request carrying a user identifier;
sending the domain name query request to a server; the domain name query request is used for the server side to obtain a first mapping relation and a second mapping relation in advance; the first mapping relation is a mapping relation between a domain name and an IP address and is used for resolving a corresponding IP address according to a target domain name in a domain name resolution request, and the second mapping relation is a mapping relation between the IP address and a geographic position and is used for determining the geographic position of a user terminal according to the IP address of the user terminal in the domain name resolution request;
receiving a prior access address or a target access address returned by the server, wherein the prior access address is a prior access address corresponding to the user identifier and found in a historical resolution record by the server, and the prior access address corresponding to the user identifier is an IP address of a server closest to the user terminal according to a domain name resolution request when the user terminal using the user identifier performs prior access; the prior access address comprises an IP address accessed by the user terminal last time or an IP address accessed by other user terminals last time with the same user identification; the target access address is the IP address of the server which is determined by the server according to the domain name resolution request and is closest to the user terminal when the server does not find the prior access address corresponding to the user identifier;
and performing data access according to the prior access address or the target access address.
7. The method according to claim 6, wherein the domain name resolution request includes an IP address of the user terminal and a target domain name, and the server determines an IP address of a server closest to the user terminal according to the domain name resolution request, including:
acquiring an IP address list corresponding to the target domain name, wherein the IP address list comprises the IP address of at least one server corresponding to the target domain name;
determining the geographical position of the user terminal and the geographical position of the server according to the IP address of the user terminal and the IP address of the server in the IP address list;
and selecting the IP address of the server closest to the user terminal from the IP address list according to the geographical position of the user terminal and the geographical positions of the servers in the IP address list.
8. A domain name resolution server, comprising:
the receiving module is used for receiving a domain name resolution request sent by a user terminal, wherein the domain name resolution request carries a user identifier for logging in the user terminal; acquiring a first mapping relation and a second mapping relation in advance; the first mapping relation is a mapping relation between a domain name and an IP address and is used for resolving a corresponding IP address according to a target domain name in a domain name resolution request, and the second mapping relation is a mapping relation between the IP address and a geographic position and is used for determining the geographic position of a user terminal according to the IP address of the user terminal in the domain name resolution request;
the first analysis module is used for searching whether a prior access address corresponding to the user identifier exists in a historical analysis record according to the user identifier, wherein the prior access address corresponding to the user identifier is an IP address of a server closest to the user terminal obtained according to a domain name analysis request when a user terminal using the user identifier performs prior access; the prior access address comprises an IP address last accessed by the user terminal or an IP address last accessed by other user terminals with the same user identification;
a second resolution module, configured to determine, according to the domain name resolution request, an IP address of a server closest to the user terminal if a previous access address corresponding to the user identifier is not found in the history resolution record;
a sending module, configured to, if a previous access address corresponding to the user identifier is found in the history parsing record, return the previous access address to the user terminal, so that the user terminal performs data access according to the previous access address; and if the prior access address corresponding to the user identifier is not found in the historical analysis record, returning the IP address of the server closest to the user terminal as a target access address so that the user terminal accesses data according to the target access address.
9. A terminal device, comprising:
the generation module is used for generating a domain name query request carrying a user identifier;
the sending module is used for sending the domain name inquiry request to a server; the domain name query request is used for the server side to obtain a first mapping relation and a second mapping relation in advance; the first mapping relation is a mapping relation between a domain name and an IP address and is used for resolving a corresponding IP address according to a target domain name in a domain name resolution request, and the second mapping relation is a mapping relation between the IP address and a geographic position and is used for determining the geographic position of a user terminal according to the IP address of the user terminal in the domain name resolution request;
a receiving module, configured to receive a previous access address or a target access address returned by the server, where the previous access address is a previous access address corresponding to the user identifier and found in a history resolution record by the server, and the target access address is an IP address of a server closest to a user terminal and determined according to the domain name resolution request when the previous access address corresponding to the user identifier is not found by the server; the prior access address corresponding to the user identifier is an IP address of a server closest to the user terminal, which is obtained according to a domain name resolution request when the user terminal using the user identifier performs prior access; the prior access address comprises an IP address accessed by the user terminal last time or an IP address accessed by other user terminals last time with the same user identification;
and the access module is used for accessing data according to the prior access address or the target access address.
CN202010108777.5A 2020-02-21 2020-02-21 Domain name resolution method, domain name resolution server and terminal equipment Active CN111314472B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202010108777.5A CN111314472B (en) 2020-02-21 2020-02-21 Domain name resolution method, domain name resolution server and terminal equipment
PCT/CN2020/129871 WO2021120969A1 (en) 2020-02-21 2020-11-18 Domain name resolution method, domain name resolution server, and terminal device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010108777.5A CN111314472B (en) 2020-02-21 2020-02-21 Domain name resolution method, domain name resolution server and terminal equipment

Publications (2)

Publication Number Publication Date
CN111314472A CN111314472A (en) 2020-06-19
CN111314472B true CN111314472B (en) 2022-03-11

Family

ID=71147333

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010108777.5A Active CN111314472B (en) 2020-02-21 2020-02-21 Domain name resolution method, domain name resolution server and terminal equipment

Country Status (2)

Country Link
CN (1) CN111314472B (en)
WO (1) WO2021120969A1 (en)

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111314472B (en) * 2020-02-21 2022-03-11 聚好看科技股份有限公司 Domain name resolution method, domain name resolution server and terminal equipment
CN112087484B (en) * 2020-07-28 2023-08-11 深圳拓邦股份有限公司 Method and system for rapidly positioning specific server
CN111953811B (en) * 2020-08-07 2024-02-06 腾讯科技(深圳)有限公司 Site access method, site registration method, device, equipment and storage medium
CN112689027A (en) * 2020-12-11 2021-04-20 北京北信源软件股份有限公司 Addressing method and device for accessing dynamic address server by APP user
CN113364873A (en) * 2021-06-08 2021-09-07 中国联合网络通信集团有限公司 Traffic scheduling method and equipment
CN113472469B (en) * 2021-07-27 2023-12-05 厦门亿联网络技术股份有限公司 Data synchronization method, device, equipment and storage medium
CN114095567B (en) * 2021-10-12 2023-12-29 鸬鹚科技(深圳)有限公司 Data access request processing method and device, computer equipment and medium
CN114221933B (en) * 2021-11-11 2024-04-26 中国建设银行股份有限公司 Multi-center multi-activity addressing method, device and system for mobile phone bank
CN114285821A (en) * 2021-11-17 2022-04-05 奇安信科技集团股份有限公司 Domain name resolution method, device, electronic equipment, storage medium and product
CN114039799B (en) * 2021-12-10 2023-11-17 国网福建省电力有限公司 Network security protection system and method
CN114785465B (en) * 2022-04-26 2024-04-12 上海识装信息科技有限公司 Implementation method, server and storage medium for multiple activities in different places
CN115277566B (en) * 2022-05-20 2024-03-22 鸬鹚科技(深圳)有限公司 Load balancing method and device for data access, computer equipment and medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103262077A (en) * 2010-10-25 2013-08-21 诺基亚公司 Method and apparatus for a device identifier based solution for user identification
CN104301758A (en) * 2014-10-10 2015-01-21 安徽华米信息科技有限公司 Method, device and system for pushing videos
CN106547800A (en) * 2015-09-23 2017-03-29 北京国双科技有限公司 The method and device of striding equipment synchronization user behavior
CN109819066A (en) * 2019-01-31 2019-05-28 平安科技(深圳)有限公司 A kind of intelligently parsing field name method and device based on geographical location
CN110674098A (en) * 2019-09-19 2020-01-10 浪潮电子信息产业股份有限公司 Domain name resolution method in distributed file system

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4375740B2 (en) * 2004-10-08 2009-12-02 日本電信電話株式会社 Gateway device and communication connection method
US8990356B2 (en) * 2011-10-03 2015-03-24 Verisign, Inc. Adaptive name resolution
WO2015030270A1 (en) * 2013-08-26 2015-03-05 Seo Jeong Hoan Domain name system and domain name service method based on user information
CN104519146A (en) * 2013-09-29 2015-04-15 中国电信股份有限公司 Method and system for domain name service based on user position
CN106161669A (en) * 2015-04-28 2016-11-23 阿里巴巴集团控股有限公司 A kind of quick domain name analytic method and system and terminal thereof and server
CN106657132A (en) * 2017-01-09 2017-05-10 北京小米移动软件有限公司 Method and device for accessing website
CN108600412B (en) * 2018-05-03 2021-09-03 深圳市茁壮网络股份有限公司 Domain name resolution method and system
CN108881939B (en) * 2018-07-05 2020-09-15 北京奇艺世纪科技有限公司 Video CDN processing method and system
CN110740191B (en) * 2019-10-29 2023-03-24 成都超有爱科技有限公司 Resource access method, device, electronic equipment and storage medium
CN111314472B (en) * 2020-02-21 2022-03-11 聚好看科技股份有限公司 Domain name resolution method, domain name resolution server and terminal equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103262077A (en) * 2010-10-25 2013-08-21 诺基亚公司 Method and apparatus for a device identifier based solution for user identification
CN104301758A (en) * 2014-10-10 2015-01-21 安徽华米信息科技有限公司 Method, device and system for pushing videos
CN106547800A (en) * 2015-09-23 2017-03-29 北京国双科技有限公司 The method and device of striding equipment synchronization user behavior
CN109819066A (en) * 2019-01-31 2019-05-28 平安科技(深圳)有限公司 A kind of intelligently parsing field name method and device based on geographical location
CN110674098A (en) * 2019-09-19 2020-01-10 浪潮电子信息产业股份有限公司 Domain name resolution method in distributed file system

Also Published As

Publication number Publication date
CN111314472A (en) 2020-06-19
WO2021120969A1 (en) 2021-06-24

Similar Documents

Publication Publication Date Title
CN111314472B (en) Domain name resolution method, domain name resolution server and terminal equipment
US11811657B2 (en) Updating routing information based on client location
JP5150769B2 (en) Updating routing information using request routing and client location information
US7769826B2 (en) Systems and methods of providing DNS services using separate answer and referral caches
CN111800458B (en) Dynamic load balancing method and system for Kubernetes container cloud platform
US7047301B2 (en) Method and system for enabling persistent access to virtual servers by an LDNS server
CN103281409B (en) Based on mobile Internet domain name analytic method and the dns server of Transmission Control Protocol
CN110740191B (en) Resource access method, device, electronic equipment and storage medium
WO2011049770A2 (en) Method and system to determine an application delivery server based on geo-location information
CN109327559B (en) Domain name resolution method and device based on hybrid cloud platform
CN114205330A (en) Domain name resolution method, domain name resolution device, server, and storage medium
CN103873604A (en) Network access method based on analysis of CDN data
CN109818821B (en) Detection method and device for CDN (content delivery network) architecture of website
CN110933193B (en) Domain name resolution method and device, electronic equipment and computer readable storage medium
CN114448849B (en) Method for detecting supporting mode of IPv6 network of website and electronic equipment
CN103973819A (en) Method, related device and system for responding to request for community domain name
CN113067803A (en) Resource isolation system, request processing method and request processing device
CN104092751A (en) Service access method and device
CN108712515B (en) Domain name resolution method and system
CN116708366A (en) DNS domain name management method and device
CN116055449A (en) DNS packet forwarding method and device
CN107015994B (en) Webpage content acquisition method and device
CN112118226A (en) Method and device for inquiring video networking number, terminal equipment and storage medium
CN113489803A (en) Load balancing method, terminal and gateway server

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