CN115516835A - Method, device and equipment for updating IP address and computer storage medium - Google Patents

Method, device and equipment for updating IP address and computer storage medium Download PDF

Info

Publication number
CN115516835A
CN115516835A CN202080100495.9A CN202080100495A CN115516835A CN 115516835 A CN115516835 A CN 115516835A CN 202080100495 A CN202080100495 A CN 202080100495A CN 115516835 A CN115516835 A CN 115516835A
Authority
CN
China
Prior art keywords
domain name
name resolution
terminal
address
address list
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202080100495.9A
Other languages
Chinese (zh)
Other versions
CN115516835B (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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Shenzhen Huantai Technology Co Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Shenzhen Huantai 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 Guangdong Oppo Mobile Telecommunications Corp Ltd, Shenzhen Huantai Technology Co Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Publication of CN115516835A publication Critical patent/CN115516835A/en
Application granted granted Critical
Publication of CN115516835B publication Critical patent/CN115516835B/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
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks

Landscapes

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

Abstract

The embodiment of the application discloses a method, a device and equipment for updating an IP address and a computer storage medium, wherein the method for updating the IP address comprises the following steps: the terminal sends a first access request to the gateway; receiving a notification message and a first access result sent by a gateway; the notification message is used for indicating that the first IP address list is updated; obtaining a domain name resolution result from a domain name resolution server based on the notification message; and the domain name resolution result comprises a second IP address list obtained after the first IP address list is updated.

Description

Method, device and equipment for updating IP address and computer storage medium Technical Field
The present disclosure relates to, but not limited to, network technologies, and in particular, to a method, an apparatus, a device, and a computer storage medium for updating an Internet Protocol (IP) address.
Background
When the current domain name resolution server is used, in order to avoid repeated requests of the terminal to the domain name resolution server, the terminal makes corresponding cache and sets fixed cache time after obtaining an IP address list, and the terminal can re-request the IP address list from the domain name resolution server only after the cache time is up.
However, during the caching of the IP address list, if the IP address list in the server is updated, the terminal still uses the internally stored non-updated IP address list for access, which results in a high access failure rate of the terminal.
Disclosure of Invention
The embodiment of the application provides an IP address updating method, device and equipment and a computer storage medium.
In a first aspect, a method for updating an IP address is provided, including:
the terminal sends a first access request to the gateway;
receiving a notification message and a first access result sent by a gateway; the notification message is used for indicating that the first IP address list is updated;
obtaining a domain name resolution result from a domain name resolution server based on the notification message; and the domain name resolution result comprises a second IP address list obtained after the first IP address list is updated.
In a second aspect, a method for updating an IP address is provided, including:
a gateway receives a notification message sent by a domain name resolution server; the notification message is used for indicating that the first IP address list is updated, and the terminal acquires a second IP address list obtained after the first IP address list is updated from the domain name resolution server;
receiving a first access request sent by the terminal;
and sending a notification message and a first access result to the terminal.
In a third aspect, a method for updating an IP address is provided, including:
the domain name resolution server sends a notification message to the gateway; the notification message is used for indicating that the first IP address list is updated, and is used for acquiring a second IP address list obtained after the first IP address list is updated from the domain name resolution server after the terminal receives the notification message sent by the gateway.
In a fourth aspect, an apparatus for updating an IP address is provided, including:
a sending unit, configured to send a first access request to a gateway;
the receiving unit is used for receiving the notification message and the first access result sent by the gateway; the notification message is used for indicating that the first IP address list is updated;
an obtaining unit, configured to obtain a domain name resolution result from a domain name resolution server based on the notification message; and the domain name resolution result comprises a second IP address list obtained after the first IP address list is updated.
In a fifth aspect, an apparatus for updating an IP address is provided, including:
a receiving unit, configured to receive a notification message sent by a domain name resolution server; the notification message is used for indicating that the first IP address list is updated, and is used for the terminal to acquire a second IP address list obtained after the first IP address list is updated from the domain name resolution server;
the receiving unit is further configured to receive a first access request sent by the terminal;
and the sending unit is used for sending the notification message and the first access result to the terminal.
In a sixth aspect, an apparatus for updating an IP address is provided, including:
a sending unit, configured to send a notification message to a gateway; the notification message is used for indicating that the first IP address list is updated, and for acquiring a second IP address list obtained after the first IP address list is updated from the domain name resolution server after the terminal receives the notification message sent by the gateway.
In a seventh aspect, an IP address updating apparatus is provided, including: a memory and a processor, wherein the processor is capable of,
the memory stores a computer program operable on the processor,
the processor implements the steps of the above method when executing the program.
In an eighth aspect, a computer storage medium is provided that stores one or more programs executable by one or more processors to implement the steps in the above-described method.
In a ninth aspect, a chip is provided, comprising: and the processor is used for calling and running the computer program from the memory so that the equipment provided with the chip executes the steps of the method.
In a tenth aspect, a computer program product is provided, the computer program product comprising a computer storage medium storing computer program code comprising instructions executable by at least one processor, the instructions realizing the steps of the above method when executed by the at least one processor.
In the embodiment of the application, a terminal sends a first access request to a gateway; receiving a notification message and a first access result sent by a gateway; the notification message is used for indicating that the first IP address list is updated; obtaining a domain name resolution result from a domain name resolution server based on the notification message; and the domain name resolution result comprises a second IP address list obtained after the first IP address list is updated. Therefore, after the terminal receives the notification message, the terminal determines that the first IP address list is updated, and then obtains a second IP address list obtained after the first IP address list is updated from the domain name resolution server, so that the terminal can obtain the second IP address list in time, and further the access success rate of the terminal can be improved.
Drawings
Fig. 1 is a schematic structural diagram of a network architecture according to an embodiment of the present application;
fig. 2 is a schematic flowchart of a method for updating an IP address provided in the related art;
fig. 3 is a schematic flowchart illustrating an implementation flow of a method for updating an IP address according to an embodiment of the present application;
fig. 4 is a schematic flowchart illustrating an implementation flow of another IP address updating method according to an embodiment of the present application;
fig. 5 is a schematic flowchart illustrating an implementation of another IP address updating method according to an embodiment of the present application;
fig. 6 is a schematic flowchart of a process for a terminal to obtain a second IP address list according to an embodiment of the present application;
fig. 7 is a schematic flowchart illustrating an implementation process of another IP address updating method according to an embodiment of the present application;
fig. 8 is a schematic structural diagram illustrating a component of an apparatus for updating an IP address according to an embodiment of the present application;
fig. 9 is a schematic structural diagram of another IP address updating apparatus according to an embodiment of the present application;
fig. 10 is a schematic structural diagram of another IP address updating apparatus according to an embodiment of the present application;
fig. 11 is a schematic structural diagram of an IP address updating apparatus according to an embodiment of the present application;
fig. 12 is a schematic structural diagram of a chip according to an embodiment of the present disclosure.
Detailed Description
The following detailed description will specifically explain how the technical solutions of the present application and the technical solutions of the present application solve the above technical problems by embodiments and with reference to the accompanying drawings. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments.
It should be noted that: in the present examples, "first", "second", etc. are used for distinguishing similar objects and are not necessarily used for describing a particular order or sequence.
The technical means described in the embodiments of the present application may be arbitrarily combined without conflict.
Fig. 1 is a schematic structural diagram of a network architecture according to an embodiment of the present disclosure, and as shown in fig. 1, the network architecture 10 includes a terminal 11, a gateway 12, a domain name resolution server 13, a first server 14, and a second server 15.
The terminal 11 in the embodiment of the present application may be a mobile phone. In other embodiments, the terminal 11 may be a server, a tablet, a laptop, a palmtop, a personal digital assistant, a portable media player, a smart speaker, a navigation device, a display device, a wearable device such as a smart band, a Virtual Reality (VR) device, an Augmented Reality (AR) device, a pedometer, a digital TV, a desktop computer, or the like.
The gateway 12 in the embodiment of the present application may be a server gateway or a proxy server.
The Domain Name resolution server 13 in this embodiment may be a HyperText Transfer Protocol Domain Name System (http dns) server or a local Domain Name System (LocalDNS) server. The HTTPDNS is based on a domain name system of a hypertext Transfer Protocol (HTTP) Protocol, domain name resolution is carried out by using the HTTP Protocol, and a domain name resolution request is directly sent to the HTTPDNS server, so that a local domain name system LocalDNS of an operator is bypassed.
An HTTP dns (domain name system based on HTTP) is a traffic scheduling solution customized for a mobile client based on HTTP and domain name resolution, and is used for solving the problems of abnormal resolution of a local dns (local domain name system), inaccurate traffic scheduling, and the like in the prior art. The principle of the HTTP DNS is mainly realized in the following mode that a terminal accesses an HTTP DNS interface, acquires an IP address configured on a domain name configuration management system by a service, and sends an HTTP request to the acquired IP address.
The first server 14 may be a traffic server or a reverse proxy server and the second server 15 may be a traffic server or a reverse proxy server.
The terminal 11 may be connected to the gateway 12, and the terminal 11 may send an access request to the gateway 12, where the access request may be: when the gateway 12 receives the first access request sent by the terminal 11, the gateway forwards the first access request to the first server 14, the first server 14 determines a first access result corresponding to the first access request in response to the first access request, and sends the first access result to the gateway 12, and then the gateway 12 may send the first access result to the terminal.
The terminal 11 may also be connected to a domain name resolution server 13, and the terminal 11 may obtain an IP address list corresponding to the domain name through the domain name resolution server 13, and the terminal 11 may also store a plurality of IP address lists.
The gateway 12 may also be connected to a domain name resolution server 13 for signaling interaction accordingly.
Fig. 2 is a schematic flow chart of an IP address updating method provided in the related art, and as shown in fig. 2, the IP address updating method includes:
s201, a terminal sends a domain name resolution request to a domain name resolution server; the domain name resolution request comprises a target domain name; the server receives a domain name resolution request sent by the terminal.
S203, the domain name resolution server responds to the domain name resolution request, and determines a target IP address list corresponding to a target domain name based on the target domain name in the domain name resolution request.
S205, the domain name resolution server sends a target IP address list to the terminal, and the terminal receives the target IP address list.
S207, the terminal starts a timer and determines that the timer is overtime.
The running time of the timer may be preset by the terminal itself or configured by the domain name resolution server, and the running time of the timer may be 1 day, 7 days, 14 days, or the like.
And S209, updating the target IP address list in the domain name resolution server in the running process of the timer of the terminal.
S211, the terminal sends a domain name resolution request to the server again; a server receives a domain name resolution request sent by a terminal; the domain name resolution request includes a target domain name.
In S211, the terminal transmits the domain name resolution request again at the timing when the timer expires.
S213, the domain name resolution server responds to the domain name resolution request, and determines an updated target IP address list corresponding to the target domain name based on the target domain name in the domain name resolution request.
S215, the domain name resolution server sends the updated target IP address list to the terminal, and the terminal receives the updated target IP address list.
In the related art, if the terminal updates the target IP address list in the domain name resolution server during the running period of the timer, but the target IP address list in the terminal is not updated yet, so that the terminal still accesses through the target IP address list, which results in a high failure rate of the terminal.
Fig. 3 is a schematic view of an implementation flow of a method for updating an IP address provided in an embodiment of the present application, as shown in fig. 3, where the method is applied to a terminal, and the method includes:
s301, the terminal sends a first access request to the gateway.
The first access request may be used to request a first access result corresponding to the first access request, where the first access result includes a resource that the terminal needs to access.
The terminal may store mappings between a plurality of domain names and IP address lists, for example, the terminal may store domain name a, domain name B, domain name C, and the like, and store mappings between domain name a and a first IP address list, mappings between domain name B and a second IP address list, and mappings between domain name C and a third IP address list. Each IP address list may include at least one IP address.
When the terminal needs to access the domain name B, the terminal may first query whether the domain name B exists inside, and after the query, access is performed through the IP address in the second IP address list. However, when the terminal needs to access the domain name G, the terminal queries the domain name stored in the terminal and does not find the domain name G, at this time, the terminal may send a domain name resolution request including the domain name G to the domain name resolution server, and after receiving the domain name resolution request, the domain name resolution server sends an IP address list corresponding to the domain name G to the terminal, so that the terminal may access through the IP address list corresponding to the domain name G. Further, the terminal may store the domain name G and the IP address list corresponding to the domain name G into an internal storage (e.g., SDK), so that when the domain name G is accessed next time, the IP address list corresponding to the domain name G may be obtained by querying the internal storage.
In this embodiment, the terminal may determine an IP address of a first server to be accessed, and send a first access request to the gateway based on the IP address of the first server. For example, before S301, the terminal may perform obtaining a first IP address list from the internal storage, and determine an IP address of the first server from the first IP address list, and then perform access using the IP address of the first server, that is, send an access request to the gateway, so that the gateway forwards the first access request to the first server, thereby establishing a connection between the terminal and the first server. It can be appreciated that the IP address of the first server can be included in the first list of IP addresses. The first IP address list may be stored in a Software Development Kit (SDK) of the terminal.
S303, the terminal receives the notification message and the first access result sent by the gateway; the notification message is used to indicate that the first IP address list is updated.
After the gateway receives the first access request, the gateway may forward the first access request to the first server, and receive a first access result fed back by the first server after responding to the first access request.
In the embodiment of the application, the notification message is used for the terminal to acquire the second IP address list obtained after the first IP address list is updated from the domain name resolution server.
In one embodiment, the gateway may integrate the access result and the notification message in one signaling message and transmit the signaling message to the terminal. In another embodiment, the gateway may send the access result and the notification message separately through two signaling messages.
The first IP address list may be an IP address list corresponding to the gateway, for example, the IP address list corresponding to the gateway may be one IP address list or a plurality of IP address lists, and the first IP address list may be one IP address list of the plurality of IP address lists corresponding to the gateway.
In one embodiment, the IP address of the first server may be included in the first IP address list, so that the terminal may determine the first IP address list through the IP address of the first server after receiving the notification message.
In another embodiment, the IP address of the first server may not be included in the first IP address list, but the notification message may include a first domain name, so that the terminal may determine the first IP address list according to the first domain name after receiving the notification message.
S305, the terminal obtains a domain name resolution result from the domain name resolution server based on the notification message; and the domain name resolution result comprises a second IP address list obtained after the first IP address list is updated.
And the domain name resolution result at least comprises a second IP address list. The IP address of the first server may or may not be included in the second list of IP addresses.
In the embodiment of the application, after the terminal receives the notification message, the terminal determines that the first IP address list is updated, and then obtains the second IP address list obtained after the first IP address list is updated from the domain name resolution server, so that the terminal can obtain the second IP address list in time, and further the access success rate of the terminal can be improved.
Fig. 4 is a schematic flow chart illustrating an implementation of another IP address updating method provided in the embodiment of the present application, and as shown in fig. 4, the method includes:
s401, the domain name resolution server sends a notification message to a gateway; and the gateway receives the notification message sent by the domain name resolution server.
The notification message is used for indicating that the first IP address list is updated, and the terminal acquires a second IP address list obtained after the first IP address list is updated from the domain name resolution server.
In one embodiment, the notification message may not include the first domain name corresponding to the first IP address list, and the terminal may determine the first domain name corresponding to the first IP address list by using the IP address of the first server. For example, since the terminal internally stores a mapping between the first domain name and the first IP address list, the terminal may determine the first domain name corresponding to the first IP address list based on the IP address of the first server and the mapping. In another embodiment, the notification message may include the first domain name, so that the terminal may resolve the notification message to obtain the first domain name.
In one embodiment, the domain name resolution server may generate a notification message upon determining that an update has occurred to the first list of IP addresses, and send the notification message to the gateway. The first IP address list update may be: and adding the IP address to the first IP address list, reducing the IP address in the first IP address list or changing the IP address in the first IP address list.
In an example process, the first IP address list may include M IP addresses, each of the M IP addresses corresponds to one service server, and the domain name resolution server may receive a change message of an IP address in the first IP address list, which is sent by any one of the M service servers in one-to-one correspondence with the M IP addresses through the gateway, so that the domain name resolution server updates the first IP address list based on the change message. Wherein M is an integer greater than or equal to 1. In another implementation, the domain name resolution server may receive a change message of the IP address sent by the other device, and update the first IP address list based on the change message.
In another example process, the second IP address list may include N IP addresses, and each of the N IP addresses corresponds to one service server. Wherein N is an integer greater than or equal to 1.
S403, the terminal sends a first access request to the gateway; the gateway receives a first access request sent by the terminal.
The embodiment of the application does not limit the sequence of the notification message and the first access request received by the gateway.
S405, the gateway sends a notification message and a first access result to the terminal; and the terminal receives the notification message and the first access result sent by the gateway.
It should be understood that the gateway sends the notification message and the first access result to the terminal after receiving the notification message and receiving the first access request sent by the terminal. The first access result corresponds to the first access request.
S407, the terminal obtains a domain name resolution result from the domain name resolution server based on the notification message; the domain name resolution result comprises a second IP address list obtained after the first IP address list is updated.
In the embodiment of the application, through an interactive process among the terminal, the gateway and the domain name resolution server, the domain name resolution server sends the notification message to the gateway when determining that the first IP address list is updated, so that the terminal receives the notification message through the gateway and acquires the second IP address list obtained after updating the first IP address list based on the notification message, and further, after the first IP address in the domain name resolution server is updated, the terminal can also obtain the updated second IP address list in time, and thus, the access success rate of the terminal can be improved.
Fig. 5 is a schematic flow chart illustrating an implementation of another IP address updating method provided in the embodiment of the present application, and as shown in fig. 5, the method includes:
s501, the domain name resolution server sends a notification message to the gateway.
The notification message is used for indicating that the first IP address list is updated, and for acquiring a second IP address list obtained after the first IP address list is updated from the domain name resolution server after the terminal receives the notification message sent by the gateway.
S503, the terminal determines the IP address of the first server from the first IP address list.
The communication Protocol between the terminal and the Gateway may be a Gateway to Gateway Protocol (GGP) or other network protocols.
The SDK of the terminal may store a mapping between each of the plurality of domain names and each of the IP address lists. The terminal may determine the first domain name to be accessed based on an operation of the terminal by a user, so as to determine a first IP address list corresponding to the first domain name in the plurality of mappings. For example, in the case where the first domain name is www.baidu.com, the terminal may determine the list of IP addresses corresponding to domain name www.baidu.com among the plurality of maps stored in the SDK, so that access can be made based on one IP address in the obtained list of IP addresses corresponding to www.baidu.com.
In an embodiment of the application, in the first IP address list, the first IP address list may include not only at least one IP address but also at least one weight parameter in one-to-one correspondence with the at least one IP address, and the terminal may determine the first-visited IP address based on the at least one weight parameter, and if access fails based on the first-visited IP address, determine the second-visited IP address based on the at least one weight parameter until access succeeds. The terminal may randomly select one of the at least one IP address as the connection based on a weighted random algorithm or a random weighted algorithm.
S505, the terminal may send a first access request to the gateway based on the IP address of the first server. The gateway receives a first access request sent by the terminal.
The first IP address list may include: m IP addresses and M weight parameters corresponding to the M IP addresses one by one, wherein M is an integer greater than or equal to 1; the terminal may determine an IP address of the first server from the M IP addresses based on the M weight parameters, and may further send a first access request to the gateway based on the IP address of the first server.
After the gateway receives the first access request, the service server accessed by the terminal can be determined to be the first server based on the IP address of the first server in the first access request. The gateway may then forward the first access request to the first server, and the first server, upon receiving the first access request, responds to the first access request and determines a first access result based on the first access request, and then sends the first access result to the gateway.
S507, the gateway sends a notification message and a first access result to the terminal; and the terminal receives the notification message and the first access result sent by the gateway.
S509, the terminal determines the first domain name corresponding to the first IP address list based on the notification message.
The terminal may trigger a process of determining a domain name corresponding to the IP address of the first server after receiving the notification message. In one embodiment, the terminal may determine the first domain name corresponding to the IP address of the first server based on a mapping between the first domain name and a first IP address list stored in the terminal.
S511, the terminal sends a domain name resolution request to a domain name resolution server; the domain name resolution request comprises a first domain name; and the domain name resolution server receives a domain name resolution request sent by the terminal.
The communication protocol between the terminal and the domain name resolution server is HTTP. HTTP is the most widely used network transport protocol on the internet, and all WWW documents comply with this standard. With the rapid development of internet technology, network services become an indispensable service in people's life, and currently, internet enterprises generally use domain names to provide services for users.
S513, the domain name resolution server sends a domain name resolution result to the terminal; and the terminal receives a domain name resolution result sent by the domain name resolution server.
And the domain name resolution result comprises a second IP address list obtained after the first IP address list is updated.
The DNS data (e.g., the second IP address list) sent by the domain name resolution server to the terminal is easily falsified and forged by a third party if it is not verified. In order to solve the problem, when the domain name resolution server sends the second IP address list to the terminal, the second IP address list may be encrypted by an asymmetric encryption method, where the encryption method may be that the domain name resolution server encrypts the second IP address list by using a private key, and the terminal decrypts the encrypted data by using a public key, or the encryption method may be that the domain name resolution server encrypts the second IP address list by using a public key, and the terminal decrypts the encrypted data by using a private key.
When the domain name resolution server is encrypted by the private key, the domain name resolution server may perform hash calculation on the second IP address list to obtain a first hash value; then, the first hash value can be encrypted by adopting a private key to obtain a first signature; the domain name resolution result may then be determined based on the first signature and the second list of IP addresses, e.g., by encoding the first signature and the second list of IP addresses. The domain name resolution result may include the first signature and the second IP address list.
And S515, the terminal checks the domain name resolution result, and updates the first mapping stored in the terminal into the second mapping after the checking is successful.
Wherein the first mapping may include: a mapping between the domain name and the first list of IP addresses, the second mapping may comprise: a mapping between the domain name and the second list of IP addresses.
The first mapping and the second mapping may both be stored in domain name resolution information or a domain name resolution module of the SDK.
When the terminal decrypts with the public key, the terminal can first determine the public key corresponding to the domain name resolution server; then, the public key can be adopted to decrypt the first signature to obtain a first hash value; then, the hash value of the second IP address list can be calculated to obtain a second hash value; and if the first hash value is the same as the second hash value, determining that the verification of the domain name resolution result is successful.
In one embodiment, the public key corresponding to the domain name resolution server may be stored inside the terminal, from which the terminal may obtain the public key corresponding to the domain name resolution server. In one implementation scenario, the public key may be extracted from a digital certificate stored internally in the terminal. In another embodiment, the public key corresponding to the domain name resolution server may be sent by the domain name resolution server to the terminal, the public key may be included in the domain name resolution result, or the domain name resolution server sends the public key to the terminal separately. In still another embodiment, the domain name resolution server may further send a digital certificate to the server, where the digital certificate may include the public key, so that the terminal may obtain the public key through the digital certificate, where the digital certificate may be included in the domain name resolution result, or the domain name resolution server separately sends the digital certificate to the terminal.
After S515, the terminal may perform access to the first domain name based on the second IP address list.
If the second IP address list includes one IP address, the IP address is the IP address of the first server, and the terminal can access the first IP address in the IP address list. If the second IP address list comprises at least two IP addresses, the terminal can determine a first weight parameter based on the at least two weight parameters; and then determining a first IP address to be accessed corresponding to the first weight parameter from the at least two IP addresses, and accessing by adopting the first IP address to be accessed.
In one embodiment, in the case that the terminal fails to access by using the first IP address to be accessed, the terminal may determine a second weight parameter other than the first weight parameter from the at least two weight parameters; and then, a second to-be-accessed IP address corresponding to the second weight parameter can be determined from the at least two IP addresses, and the second to-be-accessed IP address is adopted for accessing.
In this way, since the terminal modifies the first IP address list stored therein into the second IP address list, the terminal can access through the second IP address list when determining the access request for the domain name next time.
After the terminal updates the first IP address list into the second IP address list, if the gateway in the second IP address list is not notified, the gateway does not know whether the terminal updates the first IP address list. To solve this problem, the method for updating an IP address may further include performing the steps of: the terminal sends an update completion message to the gateway; the gateway receives an update completion message sent by the terminal; the update completion message is used to instruct the terminal to complete updating the stored first IP address list.
The terminal may send the update completion message to the gateway at a time when the terminal receives the domain name resolution result sent by the domain name resolution server, or after the terminal updates the internally stored first mapping to the second mapping.
After receiving the update completion message, the gateway may send a second access result to the terminal after receiving a second access request sent by the terminal based on the IP address of the second server based on the update completion message. After that, the gateway receives the notification message sent by the domain name resolution server again, and after receiving the access request of the terminal, sends the notification message to the terminal.
In the embodiment of the application, through an interactive process among the terminal, the gateway and the domain name resolution server, the second IP address list may include at least one IP address and at least one weight parameter corresponding to the at least one IP address one to one, so that the terminal can determine an IP address to be accessed first from the second IP address list by using a weight random algorithm, thereby avoiding a situation that the gateway corresponding to the first IP address generates request aggregation because the terminal starts to access from the first IP address in each access in the related art. In addition, the terminal verifies the second IP address list sent by the domain name resolution server, so that the second IP address is prevented from being falsified and forged by a third party.
Fig. 6 is a schematic flow chart of obtaining a second IP address list by a terminal according to an embodiment of the present application, and as shown in fig. 6, a manner of obtaining the second IP address list by the terminal may be implemented by the following steps S601 to S611:
s601, the terminal sends a DNS request to a domain name resolution server.
The DNS request may include a domain name, for example, the domain name may be www.domain.com, and the DNS request may be a domain name resolution request in the above embodiment.
S603, after receiving the DNS request, the http DNS server queries a second IP address list corresponding to the domain name in the DNS request.
As shown in fig. 6, the second IP address list has three IP addresses, which are weighted (corresponding to the weighting parameters of the above embodiment) 0.4, 0.3 and 0.3 respectively, compared to IP1, IP2 and IP 3.
S605, the http dns server may encrypt the second IP address list with a private key.
The encryption mode is that the HTTPDNS server calculates the hash value of the second IP address list to obtain a first hash value, and encrypts the first hash value to obtain a first signature.
S607, the http DNS server may return the result of the DNS request to the terminal.
The returned result may be a domain name resolution result, which includes the first signature and the second IP address list.
And S609, the terminal adopts the public key to decrypt and verify.
The decryption and verification method comprises the following steps: determining a public key corresponding to a domain name resolution server; decrypting the first signature by using a public key to obtain a first hash value; calculating the hash value of the updated IP address list to obtain a second hash value; and if the first hash value is the same as the second hash value, determining that the verification of the domain name resolution result is successful.
The http dns server may issue the public key, or the http dns server may issue a certificate, so that the terminal obtains the public key through the certificate.
S611, the terminal updates the first IP address list into a second IP address list.
After the verification is successful, the terminal may determine that the second IP address list is sent by the domain name resolution server, and then the terminal may update the first IP address list to the second IP address list. The updating process of the terminal may be deleting the first IP address list and writing the second IP address list.
In the embodiment of the application, the request return result is subjected to asymmetric encryption, so that the safety of data content in the network transmission process is effectively ensured, and the content cannot be tampered; meanwhile, by issuing a certificate and a decryption Token (Token) (which can be understood as a public key) to a legally authorized terminal, an irrelevant party or a malicious user is prevented from using the service. The direct Token issuing mode also avoids performance loss caused by connecting multiple handshakes by using Transport Layer Security (TLS).
Fig. 7 is a schematic flow chart illustrating an implementation of a further IP address updating method provided in an embodiment of the present application, and as shown in fig. 7, the method may include:
s701, the terminal sends a DNS request to a domain name resolution server and receives an IP address list AAA of the domain name resolution server responding to the DNS request.
Wherein the IP address list AAA comprises the address AAA.
S703, the terminal sends an access request to the gateway.
The terminal may send an access request to the gateway based on the address AAA.
S705, the gateway forwards the request to the service server a.
The service server a corresponds to the address AAA.
S707, the HTTPDNS server determines that the IP address list AAA is changed into the IP address list BBB, and sends a notification message to the gateway.
The IP address list BBB includes an IP address BBB. The notification message is used to indicate that the IP address list AAA has changed.
S709, the gateway sends the access result and the notification message to the terminal.
The notification message is used for notifying the terminal IP address list AAA change.
S711, after obtaining the IP address list BBB based on the notification message, the terminal may update the internally stored IP address list AAA to the IP address list BBB.
After that, the terminal can access the service server B based on the address BBB in the IP address list BBB.
In the embodiment of the application, when the IP address configuration is changed, the gateway protocol is used for informing the user that the IP address is modified. After receiving the message sent by the gateway, the user (terminal) sends Dns request to refresh the IP address of the corresponding domain name in real time, thereby achieving the capability of real-time refreshing.
In the embodiment of the application, based on the HTTPDNS service, a set of technical scheme with weight, which can refresh IP addresses in real time and prevent hijacking is provided, so that the problems of request aggregation, content tampering, terminal caching and the like in the conventional HTTPDNS are solved, and the safety, availability and flexibility of the HTTPDNS are greatly improved.
In the embodiment of the application, the HTTPDNS service returns the weighted IP addresses, thereby ensuring the balance of IP address access; the method adopts asymmetric encryption to carry out encryption transmission on HTTPDNS communication data, thereby ensuring that the content is prevented from being tampered; and the gateway protocol informs the user of refreshing the cache in real time, so that the real-time property is improved.
Based on the foregoing embodiments, an IP address updating apparatus provided in an embodiment of the present application includes each included unit and each module included in each unit, and may be implemented by a processor in a terminal, a gateway, or a domain name resolution server; of course, the implementation can also be realized through a specific logic circuit; in implementation, the processor may be a Central Processing Unit (CPU), a Microprocessor (MPU), a Digital Signal Processor (DSP), a Field Programmable Gate Array (FPGA), or the like.
Fig. 8 is a schematic structural diagram of a component of an IP address updating apparatus according to an embodiment of the present application, and as shown in fig. 8, the IP address updating apparatus 80 may be applied to a terminal, and the IP address updating apparatus 80 includes:
a sending unit 81, configured to send a first access request to a gateway;
a receiving unit 82, configured to receive a notification message and a first access result sent by a gateway; the notification message is used for indicating that the first IP address list is updated;
an obtaining unit 83, configured to obtain a domain name resolution result from the domain name resolution server based on the notification message; the domain name resolution result comprises a second IP address list obtained after the first IP address list is updated.
In some embodiments, the IP address updating apparatus 80 further includes: a determining unit 84, configured to determine, based on the notification message, a first domain name corresponding to the first IP address list;
a sending unit 81, configured to send a domain name resolution request to a domain name resolution server; the domain name resolution request comprises a first domain name;
the receiving unit 82 is further configured to receive a domain name resolution result sent by the domain name resolution server.
In some embodiments, the first list of IP addresses comprises: m IP addresses and M weight parameters which are in one-to-one correspondence with the M IP addresses, wherein M is an integer which is greater than or equal to 1;
the IP address updating apparatus 80 further includes: a determining unit 84, further configured to determine, based on the M weighting parameters, an IP address of the first server from the M IP addresses;
the sending unit 81 is further configured to send the first access request to the gateway based on the IP address of the first server.
In some embodiments, the domain name resolution result further includes the first signature, and the IP address updating device 80 further includes: a verification unit 85, configured to determine a public key corresponding to the domain name resolution server; decrypting the first signature by using a public key to obtain a first hash value; calculating a hash value of the second IP address list to obtain a second hash value; and if the first hash value is the same as the second hash value, determining that the verification of the domain name resolution result is successful.
In some embodiments, the IP address updating apparatus 80 further includes: an updating unit 86, configured to update the first mapping stored in the terminal to a second mapping; wherein the first mapping comprises: a mapping between the first domain name and the first list of IP addresses, the second mapping comprising: a mapping between the first domain name and the second list of IP addresses.
In some embodiments, the second list of IP addresses comprises: n IP addresses and N weight parameters which are in one-to-one correspondence with the N IP addresses, wherein N is an integer which is greater than or equal to 1;
a determining unit 84, configured to determine, based on the N weighting parameters, an IP address of the second server from the N IP addresses;
a sending unit 81, configured to send a second access request to the gateway based on the IP address of the second server;
the receiving unit 82 is further configured to receive the second access result sent by the gateway.
In some embodiments, the communication protocol between the terminal and the gateway is a gateway protocol, and the communication protocol between the terminal and the domain name resolution server is a hypertext transfer protocol.
In some embodiments, the sending unit 81 is further configured to send an update completion message to the gateway, where the update completion message is used to instruct the terminal to complete updating the stored first IP address list.
Fig. 9 is a schematic structural diagram of another IP address updating apparatus provided in an embodiment of the present application, and as shown in fig. 9, an IP address updating apparatus 90 may be applied to a gateway, where the IP address updating apparatus 90 includes:
a receiving unit 91, configured to receive a notification message sent by a domain name resolution server; the notification message is used for indicating the first IP address list to be updated and for the terminal to acquire a second IP address list obtained after the first IP address list is updated from the domain name resolution server;
a receiving unit 91, further configured to receive a first access request sent by a terminal;
a sending unit 92, configured to send the notification message and the first access result to the terminal.
In some embodiments, the receiving unit 91 is further configured to receive a first access request sent by the terminal based on the IP address of the first server;
the sending unit 92 is further configured to send the first access request to the first server, and receive the first access result sent by the first server.
In some embodiments, the receiving unit 91 is further configured to receive an update completion message sent by the terminal, where the update completion message is used to instruct the terminal to complete updating the stored first IP address list; and based on the updating completion message, after receiving a second access request sent by the terminal based on the IP address of the second server, sending a second access result to the terminal.
Fig. 10 is a schematic structural diagram of a further IP address updating apparatus according to an embodiment of the present application, and as shown in fig. 10, the IP address updating apparatus 100 may be applied to a domain name resolution server, and the IP address updating apparatus 100 includes:
a sending unit 101, configured to send a notification message to a gateway; the notification message is used for indicating that the first IP address list is updated, and for acquiring a second IP address list obtained after the first IP address list is updated from the domain name resolution server after the terminal receives the notification message sent by the gateway.
In some embodiments, the IP address updating apparatus 100 further includes: a receiving unit 102, configured to receive a domain name resolution request sent by a terminal; the domain name resolution request comprises a first domain name;
the sending unit 101 is further configured to send a domain name resolution result to the terminal, where the domain name resolution result includes a second IP address list.
In some embodiments, the IP address updating apparatus 100 further includes: the encryption unit 103 is configured to perform hash calculation on the second IP address list to obtain a first hash value; encrypting the first hash value by using a private key to obtain a first signature; determining a domain name resolution result based on the first signature and the second IP address list.
In some embodiments, the second list of IP addresses comprises: n IP addresses and N weight parameters which are in one-to-one correspondence with the N IP addresses, wherein N is an integer which is greater than or equal to 1.
The above description of the apparatus embodiments, similar to the above description of the method embodiments, has similar beneficial effects as the method embodiments. For technical details not disclosed in the embodiments of the apparatus of the present application, reference is made to the description of the embodiments of the method of the present application for understanding.
It should be noted that, in the embodiment of the present application, if the update method of the IP address is implemented in the form of a software functional module and is sold or used as a standalone product, the update method of the IP address may also be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a terminal, a gateway, or a domain name resolution server to execute all or part of the methods of the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read Only Memory (ROM), a magnetic disk, or an optical disk. Thus, embodiments of the present application are not limited to any specific combination of hardware and software.
It should be noted that fig. 11 is a schematic structural diagram of a component of an IP address updating device provided in an embodiment of the present application, as shown in fig. 11, an IP address updating device 110 may be the above-mentioned terminal, gateway, or domain name resolution server, and a hardware entity of the IP address updating device 110 includes: a processor 111 and a memory 112, wherein the memory 112 stores a computer program operable on the processor 111, and the processor 111 executes the program to implement the steps of the method of any of the above embodiments.
The Memory 112 stores a computer program executable on the processor, and the Memory 112 is configured to store instructions and applications executable by the processor 111, and may also buffer data (e.g., image data, audio data, voice communication data, and video communication data) to be processed or already processed by each module in the updating apparatus 110 of the to-be-processed processor 111 and the IP address, and may be implemented by a FLASH Memory (FLASH) or a Random Access Memory (RAM).
The processor 111 implements the steps of the IP address updating method of any one of the above when executing the program. The processor 111 generally controls the overall operation of the IP address updating apparatus 110.
The embodiment of the application provides a computer storage medium, which stores one or more programs, and the one or more programs can be executed by one or more processors to realize the steps of the method executed by the terminal in the method.
Embodiments of the present application provide a computer storage medium, which stores one or more programs, where the one or more programs are executable by one or more processors to implement the steps of the method performed by the gateway in the above method.
Embodiments of the present application provide a computer storage medium, which stores one or more programs that are executable by one or more processors to implement the steps of the method performed by the domain name resolution server in the above method.
Here, it should be noted that: the above description of the storage medium and device embodiments is similar to the description of the method embodiments above, with similar advantageous effects as the method embodiments. For technical details not disclosed in the embodiments of the storage medium and apparatus of the present application, reference is made to the description of the embodiments of the method of the present application for understanding.
Fig. 12 is a schematic structural diagram of a chip according to an embodiment of the present application. The chip 120 shown in fig. 12 includes a processor 121, and the processor 121 may call and run a computer program from a memory to implement the steps of the method performed by the terminal, the gateway, or the domain name resolution server in the embodiment of the present application.
In some embodiments, as shown in fig. 12, chip 120 may also include memory 122. From the memory 122, the processor 121 may call and run a computer program to implement the steps of the method performed by the terminal, the gateway, or the domain name resolution server in the embodiment of the present application.
The memory 122 may be a separate device from the processor 121, or may be integrated in the processor 121.
In some embodiments, the chip 120 may also include an input interface 123. The processor 121 may control the input interface 123 to communicate with other devices or chips, and specifically, may obtain information or data sent by other devices or chips.
In some embodiments, the chip 120 may also include an output interface 124. The processor 121 may control the output interface 124 to communicate with other devices or chips, and may particularly output information or data to the other devices or chips.
In some embodiments, the chip may be applied to the network device in the embodiments of the present application, and the chip may implement a corresponding process implemented by the network device in each method in the embodiments of the present application, and for brevity, details are not described here again.
In some embodiments, the chip may be applied to a terminal, a gateway, or a domain name resolution server in the embodiments of the present application, and the chip may implement a corresponding process implemented by the terminal, the gateway, or the domain name resolution server in each method in the embodiments of the present application, and for brevity, details are not described here again.
It should be understood that the chips mentioned in the embodiments of the present application may also be referred to as a system-on-chip, a system-on-chip or a system-on-chip.
An embodiment of the present application provides a computer program product, which includes a computer storage medium storing computer program code, where the computer program code includes instructions executable by at least one processor, and when the instructions are executed by the at least one processor, the steps of the method executed by the terminal, the gateway, or the domain name resolution server in the above method are implemented.
In some embodiments, the computer program product may be applied to a terminal, a gateway, or a domain name resolution server in the embodiments of the present application, and the computer program instructions enable a computer to execute corresponding processes implemented by the terminal, the gateway, or the domain name resolution server in the methods in the embodiments of the present application, which are not described herein again for brevity.
Here, it should be noted that: the above description of the embodiments of the storage medium and the terminal, gateway or domain name resolution server is similar to the description of the above embodiments of the method, and has similar beneficial effects as the embodiments of the method. For technical details not disclosed in the embodiments of the storage medium and the terminal, gateway or domain name resolution server of the present application, refer to the description of the embodiments of the method of the present application for understanding.
It should be understood that the processor of the embodiments of the present application may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method embodiments may be performed by integrated logic circuits of hardware in a processor or instructions in the form of software. The Processor may be a general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, or discrete hardware components. The various methods, steps, and logic blocks disclosed in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present application may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in a memory, and a processor reads information in the memory and combines hardware thereof to complete the steps of the method.
It will be appreciated that the memory in the embodiments of the subject application can be either volatile memory or nonvolatile memory, or can include both volatile and nonvolatile memory. The non-volatile Memory may be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically Erasable PROM (EEPROM), or a flash Memory. Volatile Memory can be Random Access Memory (RAM), which acts as external cache Memory. By way of example, and not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), synchronous Dynamic Random Access Memory (SDRAM), double Data Rate Synchronous Dynamic random access memory (DDR SDRAM), enhanced Synchronous SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), and Direct Rambus RAM (DR RAM). It should be noted that the memory of the systems and methods described herein is intended to comprise, without being limited to, these and any other suitable types of memory.
It should be understood that the above memories are exemplary but not limiting illustrations, for example, the memories in the embodiments of the present application may also be Static Random Access Memory (SRAM), dynamic random access memory (dynamic RAM, DRAM), synchronous Dynamic Random Access Memory (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (enhanced SDRAM, ESDRAM), synchronous Link DRAM (SLDRAM), direct Rambus RAM (DR RAM), and the like. That is, the memory in the embodiments of the present application is intended to comprise, without being limited to, these and any other suitable types of memory.
Here, it should be noted that: the above description of the storage medium, computer program, chip and device embodiments is similar to the description of the method embodiments described above, with similar advantageous effects as the method embodiments. For technical details not disclosed in the embodiments of the storage medium and apparatus of the present application, reference is made to the description of the embodiments of the method of the present application for understanding.
It should be appreciated that reference throughout this specification to "one embodiment" or "an embodiment of the present application" means that a particular feature, structure or characteristic described in connection with the embodiment is included in at least one embodiment of the present application. Thus, the appearances of the phrases "in one embodiment" or "in an embodiment" or "embodiments of the present application" or "the preceding embodiments" in various places throughout this specification are not necessarily all referring to the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. It should be understood that, in the various embodiments of the present application, the sequence numbers of the above-mentioned processes do not mean the execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application. The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments.
In a case where no special description is given, the terminal, the gateway, or the domain name resolution server executes any step in the embodiment of the present application, and the step may be executed by a processor of the terminal, the gateway, or the domain name resolution server. Unless otherwise stated, the embodiments of the present application do not limit the sequence in which the terminal, the gateway, or the domain name resolution server performs the following steps. In addition, the data may be processed in the same way or in different ways in different embodiments. It should be further noted that any step in this embodiment of the present application may be independently executed by the terminal, the gateway, or the domain name resolution server, that is, when the terminal, the gateway, or the domain name resolution server executes any step in the above embodiments, it may not depend on the execution of other steps.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described device embodiments are merely illustrative, for example, the division of the unit is only a logical functional division, and there may be other division ways in actual implementation, such as: multiple units or components may be combined, or may be integrated into another system, or some features may be omitted, or not implemented. In addition, the coupling, direct coupling or communication connection between the components shown or discussed may be through some interfaces, and the indirect coupling or communication connection between the devices or units may be electrical, mechanical or other forms.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units; can be located in one place or distributed on a plurality of network units; some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, all functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may be separately regarded as one unit, or two or more units may be integrated into one unit; the integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
The methods disclosed in the several method embodiments provided in the present application may be combined arbitrarily without conflict to arrive at new method embodiments.
Features disclosed in several of the product embodiments provided in the present application may be combined in any combination to yield new product embodiments without conflict.
The features disclosed in the several method or apparatus embodiments provided herein may be combined in any combination to arrive at a new method or apparatus embodiment without conflict.
Those of ordinary skill in the art will understand that: all or part of the steps for realizing the method embodiments can be completed by hardware related to program instructions, the program can be stored in a computer readable storage medium, and the program executes the steps comprising the method embodiments when executed; and the aforementioned storage medium includes: various media that can store program codes, such as a removable Memory device, a Read Only Memory (ROM), a magnetic disk, or an optical disk.
Alternatively, the integrated unit described above may be stored in a computer-readable storage medium if it is implemented in the form of a software functional module and sold or used as a separate product. Based on such understanding, the technical solutions of the embodiments of the present application or portions thereof that contribute to the related art may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: a removable storage device, a ROM, a magnetic or optical disk, or other various media that can store program code.
In the embodiments of the present application, the descriptions of the same steps and the same contents in different embodiments may be mutually referred to. In the embodiment of the present application, the term "and" does not affect the sequence of the steps, for example, the terminal, the gateway, or the domain name resolution server performs a and performs B, where the terminal, the gateway, or the domain name resolution server performs a first and then performs B, or the terminal, the gateway, or the domain name resolution server performs B first and then performs a, or the terminal, the gateway, or the domain name resolution server performs B while performing a.
The above description is only for the embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
Industrial applicability
By adopting the IP address updating scheme, the terminal can obtain the second IP address list obtained after the first IP address list is updated through the notification message, so that the access success rate of the terminal can be improved.

Claims (22)

  1. An updating method of an IP address comprises the following steps:
    the terminal sends a first access request to the gateway;
    receiving a notification message and a first access result sent by a gateway; the notification message is used for indicating that the first IP address list is updated;
    obtaining a domain name resolution result from a domain name resolution server based on the notification message; and the domain name resolution result comprises a second IP address list obtained after the first IP address list is updated.
  2. The method of claim 1, wherein the obtaining a domain name resolution result from a domain name resolution server based on the notification message comprises:
    determining a first domain name corresponding to the first IP address list based on the notification message;
    sending a domain name resolution request to the domain name resolution server; the domain name resolution request comprises the first domain name;
    and receiving the domain name resolution result sent by the domain name resolution server.
  3. The method of claim 1 or 2, wherein the first list of IP addresses comprises: m IP addresses and M weight parameters which are in one-to-one correspondence with the M IP addresses, wherein M is an integer which is greater than or equal to 1;
    before the terminal sends the first access request to the gateway, the method further comprises:
    determining an IP address of the first server from the M IP addresses based on the M weight parameters;
    the terminal sends a first access request to a gateway, and the first access request comprises the following steps: and the terminal sends the first access request to the gateway based on the IP address of the first server.
  4. The method according to any of claims 1 to 3, wherein the domain name resolution result further comprises a first signature; after obtaining the domain name resolution result from the domain name resolution server based on the notification message, the method further includes:
    determining a public key corresponding to the domain name resolution server;
    decrypting the first signature by adopting the public key to obtain a first hash value;
    calculating a hash value of the second IP address list to obtain a second hash value;
    and if the first hash value is the same as the second hash value, determining that the domain name resolution result is successfully checked.
  5. The method of claim 4, wherein after determining that the checking of the domain name resolution result is successful, further comprising:
    updating the first mapping stored in the terminal into a second mapping; wherein the first mapping comprises: a mapping between the first domain name and the first list of IP addresses, the second mapping comprising: a mapping between the first domain name and the second list of IP addresses.
  6. The method of any of claims 1 to 5, wherein the second list of IP addresses comprises: n IP addresses and N weight parameters which are in one-to-one correspondence with the N IP addresses, wherein N is an integer which is greater than or equal to 1;
    after obtaining the domain name resolution result from the domain name resolution server based on the notification message, the method further includes:
    determining an IP address of a second server from the N IP addresses based on the N weight parameters;
    sending a second access request to a gateway based on the IP address of the second server;
    and receiving a second access result sent by the gateway.
  7. The method according to any one of claims 1 to 6, wherein the communication protocol between the terminal and the gateway is a gateway protocol, and the communication protocol between the terminal and the domain name resolution server is a hypertext transfer protocol.
  8. The method according to any one of claims 1 to 7, wherein after obtaining a domain name resolution result from a domain name resolution server based on the notification message, the method further comprises:
    and sending an update completion message to the gateway, wherein the update completion message is used for indicating the terminal to complete the update of the stored first IP address list.
  9. An updating method of an IP address comprises the following steps:
    the gateway receives a notification message sent by a domain name resolution server; the notification message is used for indicating that the first IP address list is updated, and the terminal acquires a second IP address list obtained after the first IP address list is updated from the domain name resolution server;
    receiving a first access request sent by the terminal;
    and sending a notification message and a first access result to the terminal.
  10. The method of claim 9, wherein the receiving the first access request sent by the terminal comprises:
    receiving a first access request sent by the terminal based on the IP address of the first server;
    before sending the notification message and the first access result to the terminal, the method further includes:
    and sending the first access request to the first server, and receiving the first access result sent by the first server.
  11. The method according to claim 9 or 10, wherein after sending the notification message and the first access result to the terminal, further comprising:
    receiving an update completion message sent by the terminal, wherein the update completion message is used for indicating the terminal to complete updating the stored first IP address list;
    and based on the updating completion message, after receiving a second access request sent by the terminal based on the IP address of the second server, sending a second access result to the terminal.
  12. An updating method of an IP address comprises the following steps:
    the domain name resolution server sends a notification message to the gateway; the notification message is used for indicating that the first IP address list is updated, and for acquiring a second IP address list obtained after the first IP address list is updated from the domain name resolution server after the terminal receives the notification message sent by the gateway.
  13. The method of claim 12, wherein after the domain name resolution server sends the notification message to the gateway, further comprising:
    receiving a domain name resolution request sent by the terminal; the domain name resolution request comprises the first domain name;
    and sending a domain name resolution result to the terminal, wherein the domain name resolution result comprises the second IP address list.
  14. The method according to claim 12 or 13, wherein before sending the domain name resolution result to the terminal, the method further comprises:
    performing hash calculation on the second IP address list to obtain a first hash value;
    encrypting the first hash value by using a private key to obtain a first signature;
    determining the domain name resolution result based on the first signature and the second IP address list.
  15. The method of any of claims 12 to 14, wherein the second list of IP addresses comprises: n IP addresses and N weight parameters which are in one-to-one correspondence with the N IP addresses, wherein N is an integer which is greater than or equal to 1.
  16. An apparatus for updating an IP address, comprising:
    a sending unit, configured to send a first access request to a gateway;
    the receiving unit is used for receiving the notification message and the first access result sent by the gateway; the notification message is used for indicating that the first IP address list is updated;
    an obtaining unit, configured to obtain a domain name resolution result from a domain name resolution server based on the notification message; and the domain name resolution result comprises a second IP address list obtained after the first IP address list is updated.
  17. An apparatus for updating an IP address, comprising:
    a receiving unit, configured to receive a notification message sent by a domain name resolution server; the notification message is used for indicating that the first IP address list is updated, and is used for the terminal to acquire a second IP address list obtained after the first IP address list is updated from the domain name resolution server;
    the receiving unit is further configured to receive a first access request sent by the terminal;
    and the sending unit is used for sending the notification message and the first access result to the terminal.
  18. An apparatus for updating an IP address, comprising:
    a sending unit, configured to send a notification message to a gateway; the notification message is used for indicating that the first IP address list is updated, and for acquiring a second IP address list obtained after the first IP address list is updated from the domain name resolution server after the terminal receives the notification message sent by the gateway.
  19. An IP address updating apparatus comprising: a memory and a processor, wherein the processor is capable of,
    the memory stores a computer program operable on the processor,
    the processor implementing the steps of the method of any one of claims 1 to 8 when executing the program;
    alternatively, the processor implements the steps of the method of any one of claims 9 to 11 when executing the program;
    alternatively, the processor when executing the program implements the steps in the method of any one of claims 12 to 15.
  20. A computer storage medium storing one or more programs, the one or more programs being executable by one or more processors to perform the steps of the method of any one of claims 1 to 8;
    alternatively, the one or more programs may be executable by one or more processors to implement the steps in the method of any of claims 9 to 11;
    alternatively, the one or more programs may be executable by one or more processors to perform the steps of the method of any one of claims 12 to 15.
  21. A chip, comprising: a processor for calling and running a computer program from a memory so that a device on which the chip is installed performs the steps of the method according to any one of claims 1 to 8;
    or, to call and run a computer program from a memory, to cause a device on which the chip is installed to perform the steps of the method according to any one of claims 9 to 11;
    or to invoke and run a computer program from memory to cause a device on which the chip is installed to perform the steps of a method according to any of claims 12 to 15.
  22. A computer program product comprising a computer storage medium storing computer program code comprising instructions executable by at least one processor, the instructions when executed by the at least one processor implementing the steps in the method of any one of claims 1 to 8;
    or, when executed by the at least one processor, to implement a step in the method of any one of claims 9 to 11;
    or, when executed by the at least one processor, to implement the steps in the method of any one of claims 12 to 15.
CN202080100495.9A 2020-05-13 2020-05-13 Method, device, equipment and computer storage medium for updating IP address Active CN115516835B (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/090097 WO2021226894A1 (en) 2020-05-13 2020-05-13 Ip address updating method, apparatus, and device, and computer storage medium

Publications (2)

Publication Number Publication Date
CN115516835A true CN115516835A (en) 2022-12-23
CN115516835B CN115516835B (en) 2024-03-29

Family

ID=78526165

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202080100495.9A Active CN115516835B (en) 2020-05-13 2020-05-13 Method, device, equipment and computer storage medium for updating IP address

Country Status (2)

Country Link
CN (1) CN115516835B (en)
WO (1) WO2021226894A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114338630B (en) * 2021-12-13 2024-04-19 海尔优家智能科技(北京)有限公司 Domain name access method, device, electronic equipment, storage medium and program product
CN114979071B (en) * 2022-06-16 2024-03-26 Oppo广东移动通信有限公司 Dynamic domain name configuration method, device, electronic equipment and storage medium
CN115883515B (en) * 2022-12-23 2023-09-08 广东保伦电子股份有限公司 Separable conference terminal IP configuration method, device, computer equipment and medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102231765A (en) * 2011-06-28 2011-11-02 中兴通讯股份有限公司 Method and device for realizing load balance and set-top box
CN102571956A (en) * 2012-01-09 2012-07-11 华为技术有限公司 Correlation identification table updating method, correlation identification method, device and system
CN103888358A (en) * 2012-12-20 2014-06-25 中国移动通信集团公司 Routing method, device, system and gateway equipment
US20150237001A1 (en) * 2013-05-13 2015-08-20 Yandex Europe Ag Method of and system for providing a client device with an automatic update of an ip address associated with a domain name
CN110224996A (en) * 2019-05-20 2019-09-10 深圳壹账通智能科技有限公司 Network Access Method, device, computer equipment and the storage medium of application program
CN110855466A (en) * 2018-12-24 2020-02-28 互联网域名系统北京市工程研究中心有限公司 Method for actively pushing update to client by DNS (Domain name Server)

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104717314B (en) * 2013-12-17 2018-12-11 腾讯科技(深圳)有限公司 A kind of IP management method and system, client, server
CN105516394B (en) * 2016-01-15 2019-12-03 青岛海信移动通信技术股份有限公司 Dns address management method and terminal

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102231765A (en) * 2011-06-28 2011-11-02 中兴通讯股份有限公司 Method and device for realizing load balance and set-top box
CN102571956A (en) * 2012-01-09 2012-07-11 华为技术有限公司 Correlation identification table updating method, correlation identification method, device and system
CN103888358A (en) * 2012-12-20 2014-06-25 中国移动通信集团公司 Routing method, device, system and gateway equipment
US20150237001A1 (en) * 2013-05-13 2015-08-20 Yandex Europe Ag Method of and system for providing a client device with an automatic update of an ip address associated with a domain name
CN110855466A (en) * 2018-12-24 2020-02-28 互联网域名系统北京市工程研究中心有限公司 Method for actively pushing update to client by DNS (Domain name Server)
CN110224996A (en) * 2019-05-20 2019-09-10 深圳壹账通智能科技有限公司 Network Access Method, device, computer equipment and the storage medium of application program

Also Published As

Publication number Publication date
WO2021226894A1 (en) 2021-11-18
CN115516835B (en) 2024-03-29

Similar Documents

Publication Publication Date Title
US11520912B2 (en) Methods, media, apparatuses and computing devices of user data authorization based on blockchain
CA3061427C (en) Processing blockchain data based on smart contract operations executed in a trusted execution environment
US10860710B2 (en) Processing and storing blockchain data under a trusted execution environment
KR101989450B1 (en) Method for keeping security of data in public distributed database based on blockchain, and server for managing blockchain using the same
CN115516835B (en) Method, device, equipment and computer storage medium for updating IP address
WO2020238248A1 (en) Data storage method, apparatus and device
JP7132350B2 (en) Domain-specific browser identifiers as a replacement for browser cookies
US11509709B1 (en) Providing access to encrypted insights using anonymous insight records
EP3791560A1 (en) Contact discovery service with privacy aspect
US20190089529A1 (en) Cryptographic services utilizing commodity hardware
WO2023051337A1 (en) Data processing method and apparatus, and device and storage medium
JP7319380B2 (en) Protect browser cookies
US11374898B1 (en) Use of partial hash of domain name to return IP address associated with the domain name
WO2018203223A1 (en) Conditional removal of advertisements from web content
US20220255758A1 (en) Systems and methods for protecting data
JP7279209B2 (en) Cross-domain frequency filter for fraud detection
US20210374267A1 (en) Information processing device, information processing method, and recording medium
CN117061248B (en) Data security protection method and device for data sharing
CN115277225A (en) Data encryption method, data decryption method and related equipment
CN114143577A (en) Video acquisition method and system
CN113971242A (en) Attack defense method, equipment and storage medium of data query system

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