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

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

Info

Publication number
CN115516835B
CN115516835B CN202080100495.9A CN202080100495A CN115516835B CN 115516835 B CN115516835 B CN 115516835B CN 202080100495 A CN202080100495 A CN 202080100495A CN 115516835 B CN115516835 B CN 115516835B
Authority
CN
China
Prior art keywords
domain name
terminal
name resolution
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.)
Active
Application number
CN202080100495.9A
Other languages
Chinese (zh)
Other versions
CN115516835A (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

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, equipment and a computer storage medium for updating an IP address, 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 the first IP address list to be updated; obtaining a domain name resolution result from a 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.

Description

Method, device, equipment and computer storage medium for updating IP address
Technical Field
Embodiments of the present application relate to, but are 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 (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 can make corresponding caches and set fixed cache time after obtaining the IP address list, and only after the cache time arrives, the terminal can re-request the IP address list to the domain name resolution server.
However, if the IP address list in the server is updated during the buffering of the IP address list, the terminal accesses the IP address list stored therein without being updated, which results in a high access failure rate of the terminal.
Disclosure of Invention
The embodiment of the application provides a method, a device, equipment and a computer storage medium for updating an IP address.
In a first aspect, there is provided a method for updating an IP address, 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 the first IP address list to be updated;
obtaining a domain name resolution result from a 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 a second aspect, there is provided a method for updating an IP address, including:
the gateway receives 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 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;
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, there is provided a method for updating an IP address, including:
the domain name resolution server sends a notification message to the gateway; the notification message is used for indicating the first IP address list to be 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, there is provided an apparatus for updating an IP address, 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 the first IP address list to be updated;
an obtaining unit, configured to obtain a domain name resolution result from a 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 a fifth aspect, there is provided an apparatus for updating an IP address, including:
the receiving unit is used for receiving the notification message sent by the domain name resolution server; the notification message is used for indicating the first IP address list to be 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.
A sixth aspect provides an apparatus for updating an IP address, including:
a sending unit, configured to send a notification message to a gateway; the notification message is used for indicating the first IP address list to be 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.
A seventh aspect provides an apparatus for updating an IP address, comprising: a memory and a processor, wherein the memory is configured to store,
the memory stores a computer program executable on a processor,
the steps of the above method are implemented when the processor executes the program.
In an eighth aspect, a computer storage medium is provided, where one or more programs are stored, the one or more programs being executable by one or more processors to implement the steps in the above method.
In a ninth aspect, there is provided a chip comprising: and a processor for calling and running the computer program from the memory, so that the device on which the chip is mounted performs the steps in the method.
In a tenth aspect, a computer program product is provided, comprising a computer storage medium storing computer program code comprising instructions executable by at least one processor for implementing the steps of the above method when said instructions are executed by said 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 the first IP address list to be updated; obtaining a domain name resolution result from a 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. 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 timely obtain the second IP address list, and 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 flow chart of a method for updating an IP address provided in the related art;
fig. 3 is a schematic implementation flow chart of an IP address updating method provided in the embodiment of the present application;
fig. 4 is a schematic implementation flow chart of another method for updating an IP address according to an embodiment of the present application;
fig. 5 is a schematic implementation flow chart of another method for updating an IP address according to an embodiment of the present application;
fig. 6 is a schematic flow chart of a terminal obtaining a second IP address list according to an embodiment of the present application;
fig. 7 is a schematic implementation flow chart of another method for updating an IP address according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of an IP address updating apparatus 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 disclosure;
fig. 10 is a schematic structural diagram of another IP address updating apparatus according to an embodiment of the present disclosure;
fig. 11 is a schematic structural diagram of an IP address update 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 application.
Detailed Description
The following will specifically describe the technical solutions of the present application and how the technical solutions of the present application solve the above technical problems by means of examples and with reference to the accompanying drawings. The following embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.
It should be noted that: in the examples of this application, "first," "second," etc. are used to distinguish similar objects and not necessarily to describe a particular order or precedence.
In addition, the embodiments described in the present application may be arbitrarily combined without any collision.
Fig. 1 is a schematic structural diagram of a network architecture provided in an embodiment of the present application, 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 computer, a notebook computer, a palm top computer, a personal digital assistant, a portable media player, a smart speaker, a navigation device, a display device, a wearable device such as a smart bracelet, a Virtual Reality (VR) device, an augmented Reality (Augmented Reality, AR) device, a pedometer, a digital TV or desktop computer, or the like.
The gateway 12 in the embodiments of the present application may be a server gateway or a proxy server.
The domain name resolution server 13 in the embodiments of the present application may be a hypertext transfer protocol domain name system (HyperText Transfer Protocol Domain Name System, http dns) server or a local domain name system (LocalDNS) server. Wherein the HTTP dns is based on the domain name system of the hypertext transfer protocol (Hyper Text Transfer Protocol, HTTP) protocol, uses the HTTP protocol for domain name resolution, and the domain name resolution request is directly sent to the HTTPDNS server, thereby bypassing the operator's local domain name system LocalDNS.
HTTP dns (HTTP-based domain name system) is a traffic scheduling solution based on HTTP and domain name resolution tailored to mobile clients, for solving the problems of abnormal resolution and inaccurate traffic scheduling of the LocalDNS (local domain name system) in the prior art. The principle of the HTTPDNS is mainly realized by the following way that a terminal accesses an HTTPDNS interface, acquires an IP address configured by a service on a domain name configuration management system, and sends an HTTP request to the acquired IP address.
The first server 14 may be a service server or a reverse proxy server and the second server 15 may be a service 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 be connected to the domain name resolution server 13, 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 store a plurality of IP address lists.
The gateway 12 may also be connected to a domain name resolution server 13 for corresponding signaling interactions.
Fig. 2 is a flow chart of an IP address updating method provided in the related art, 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; and 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 the 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 can be preset by the terminal or configured by the domain name resolution server, and the running time of the timer can be 1 day, 7 days or 14 days.
S209, in the running process of the timer of the terminal, the target IP address list in the domain name resolution server is updated.
S211, the terminal sends a domain name resolution request to the server again; the server receives a domain name resolution request sent by a terminal; the domain name resolution request includes the target domain name.
In S211, the timing at which the terminal transmits the domain name resolution request again is the timing at which 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 destination IP address list in the domain name resolution server is updated during the operation of the timer, but the destination IP address list in the terminal is not updated yet, the terminal accesses through the destination IP address list, which may result in a high failure rate of the terminal access.
Fig. 3 is a schematic implementation flow chart of an IP address updating method provided in an embodiment of the present application, where, as shown in fig. 3, 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 for requesting 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 a plurality of mappings between domain names and the IP address list, for example, the terminal may store a domain name a, a domain name B, a domain name C, etc., and store a mapping between the domain name a and the first IP address list, a mapping between the domain name B and the second IP address list, and a mapping between the domain name C and the third IP address list. At least one IP address may be included in each IP address list.
When the terminal needs to access the domain name B, the terminal can firstly query whether the domain name B exists internally, and access the domain name B through the IP address in the second IP address list after the terminal queries. 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 in an internal storage (for example, 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 the embodiment of the application, the terminal may determine the IP address of the first server to be accessed, and send the first access request to the gateway based on the IP address of the first server. For example, before S301, the terminal may perform obtaining the first IP address list from the internal storage, determine the IP address of the first server from the first IP address list, and then access with 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 first list of IP addresses may include the IP address of the first server. Wherein the first list of IP addresses may be stored in a software development kit (Software Development Kit, SDK) of the terminal.
S303, the terminal receives a notification message and a first access result sent by the gateway; the notification message is used to indicate that the first list of IP addresses is updated.
After the gateway receives the first access request, the first access request may be forwarded to the first server, and a first access result fed back by the first server after responding to the first access request is received.
In the embodiment of the application, the notification message is used for the terminal to acquire the second IP address list obtained after updating the first IP address list from the domain name resolution server.
In one embodiment, the gateway may integrate the access result and the notification message into one signaling message and send the signaling message to the terminal. In another embodiment, the gateway may send the access result and the notification message separately via 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 may be 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 first IP address list may include an IP address of the first server, 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 first IP address list may not include the IP address of the first server, but the notification message may include the 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 a 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.
The domain name resolution result at least comprises a second IP address list. The second list of IP addresses may or may not include the IP address of the first server.
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 the access success rate of the terminal can be improved.
Fig. 4 is a schematic implementation flow chart of another method for updating an IP address according to an embodiment of the present application, as shown in fig. 4, where the method includes:
s401, the domain name resolution server sends a notification message to the gateway; the gateway receives the notification message sent by the domain name resolution server.
The notification message is used for indicating the first IP address list to be 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.
In an 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 through the IP address of the first server. For example, since the mapping between the first domain name and the first IP address list is stored inside the terminal, 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 parse 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 to the first list of IP addresses has occurred and send the notification message to the gateway. The first IP address list update may be: adding an IP address to the first list of IP addresses, reducing an IP address in the first list of IP addresses, or changing an IP address in the first list of IP addresses.
In an example process, the first IP address list may include M IP addresses, where 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 sent by any one of the M service servers that corresponds to the M IP addresses one-to-one 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 list of IP addresses based on the change message.
In another example, the second IP address list may include N IP addresses, where each of the N IP addresses corresponds to a 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 receiving the notification message and the first access request 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 receives the notification message and, after receiving the first access request sent by the terminal, sends the notification message and the first access result to the terminal. The first access result corresponds to the first access request.
S407, the terminal obtains a domain name resolution result from a 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 the interaction flow among the terminal, the gateway and the domain name resolution server, the domain name resolution server sends the notification message to the gateway under the condition 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, the terminal can also obtain the updated second IP address list in time after updating the first IP address in the domain name resolution server, and the access success rate of the terminal can be improved.
Fig. 5 is a schematic implementation flow chart of another method for updating an IP address according to an embodiment of the present application, as shown in fig. 5, where the method includes:
s501, the domain name resolution server sends a notification message to the gateway.
The notification message is used for indicating the first IP address list to be 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.
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 protocol (Gateway to Gateway Protocol, GGP) or other network protocol.
The SDK of the terminal may store therein a mapping between each of the plurality of domain names and each of the list of IP addresses. The terminal may determine the first domain name to be accessed based on the operation of the user on the terminal, so as to determine a first IP address list corresponding to the first domain name in the multiple maps. For example, in the case where the first domain name is www.baidu.com, the terminal may determine an IP address list corresponding to the domain name www.baidu.com from among a plurality of maps stored in the SDK so that access can be made based on one of the obtained IP addresses in the IP address list corresponding to www.baidu.com.
In this embodiment of the present 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 corresponding to the at least one IP address one-to-one, and the terminal may determine the first accessed IP address based on the at least one weight parameter, and if access based on the first accessed IP address fails, determine the second accessed IP address based on the at least one weight parameter until access is successful. The terminal may randomly select one of the at least one IP address as the connection based on a weight random algorithm or a random weight 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, it may determine that the service server accessed by the terminal is 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, which, after 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 a first domain name corresponding to the first IP address list based on the notification message.
The terminal may trigger a flow 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 stored in the terminal and the first IP address list.
S511, the terminal sends a domain name resolution request to a domain name resolution server; the domain name resolution request includes a first domain name; and the domain name resolution server receives the domain name resolution request sent by the terminal.
The communication protocol between the terminal and the domain name resolution server is HTTP. HTTP is one of the most widely used network transport protocols over the internet, and all WWW files adhere to this standard. With the rapid development of internet technology, network services are an indispensable service in people's life, and currently, internet enterprises generally use domain names to provide services to users.
S513, the domain name resolution server sends a domain name resolution result to the terminal; and the terminal receives the domain name resolution result sent by the domain name resolution server.
The domain name resolution result comprises a second IP address list obtained after the first IP address list is updated.
DNS data (e.g., a second IP address list) sent by the domain name resolution server to the terminal is easily falsified 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, an asymmetric encryption method may be used to encrypt the second IP address list, where the encryption manner may be that the domain name resolution server encrypts the second IP address list with a private key, and the terminal decrypts the encrypted data with a public key, or the encryption manner may be that the domain name resolution server encrypts the second IP address list with a public key, and the terminal decrypts the encrypted data with a private key.
When the domain name resolution server encrypts with 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, encrypting the first hash value 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. Wherein the domain name resolution result may include a first signature and a second list of IP addresses.
And S515, checking the domain name resolution result by the terminal, and updating the first mapping stored in the terminal into the second mapping after the checking is successful.
Wherein the first mapping may comprise: mapping between the domain name and the first list of IP addresses, the second mapping may include: mapping between domain name and second list of IP addresses.
The first map and the second map 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 firstly determine the public key corresponding to the domain name resolution server; then, decrypting the first signature by adopting the public key to obtain a first hash value; then, a hash value of a 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 transmitted to the terminal by the domain name resolution server, the public key may be included in the domain name resolution result, or the domain name resolution server may separately transmit the public key to the terminal. In yet another embodiment, the domain name resolution server may further send a digital certificate to the server, where the digital certificate may include a 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 access 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 may access with the one 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 at least two weight parameters; and then determining a first IP address to be accessed corresponding to the first weight parameter from at least two IP addresses, and accessing by adopting the first IP address to be accessed.
In one embodiment, the terminal may determine a second weight parameter other than the first weight parameter from at least two weight parameters in case of access failure using the first IP address to be accessed; and then, determining a second IP address to be accessed corresponding to the second weight parameter from the at least two IP addresses, and accessing by adopting the second IP address to be accessed.
In this way, since the terminal modifies the first IP address list stored therein to the second IP address list, the terminal can access through the second IP address list when determining an access request for a domain name next time.
After the terminal updates the first IP address list to 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 of updating the 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 for indicating the terminal to complete updating the stored first IP address list.
The timing of the terminal sending the update completion message to the gateway may be after the terminal receives the domain name resolution result sent by the domain name resolution server, or after the terminal updates the first mapping stored in the terminal 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 again the notification message sent by the domain name resolution server, and after receiving the access request of the terminal, sends the notification message to the terminal.
In the embodiment of the application, through the interaction flow among the terminal, the gateway and the domain name resolution server, as the second IP address list can comprise at least one IP address and at least one weight parameter corresponding to the at least one IP address one by one, the terminal can determine the first accessed IP address from the second IP address list by adopting a weight random algorithm, and the situation that the gateway corresponding to the first IP address generates request aggregation is avoided because the terminal accesses from the first IP address each time in the related art. And the terminal checks the second IP address list sent by the domain name resolution server, so that the condition that the second IP address is falsified by a third party is avoided.
Fig. 6 is a schematic flow chart of a terminal obtaining a second IP address list according to an embodiment of the present application, and as shown in fig. 6, a manner in which the terminal obtains the second IP address list 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 list of IP addresses corresponding to the domain name in the DNS request.
As shown in fig. 6, the second IP address list has three IP addresses, with percentages of IP1, IP2, and IP3, and weights (corresponding to the weight parameters of the above embodiment) of the three IP addresses are respectively 0.4, 0.3, and 0.3.
S605, the HTTPDNS server may encrypt the second IP address list with the private key.
The encryption mode is that the HTTPDNS server calculates a 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 HTTPDNS server may return the result of the DNS request to the terminal.
The returned result may be a domain name resolution result, including the first signature and the second list of IP addresses.
S609, the terminal adopts the public key to decrypt and verify.
The decryption and verification modes are as follows: 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 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 HTTPDNS server may issue a public key, or may issue a certificate for the HTTPDNS server, so that the terminal obtains the public key through the certificate.
S611, the terminal updates the first IP address list to 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 to delete the first IP address list and write in the second IP address list.
In the embodiment of the application, asymmetric encryption is carried out aiming at the request return result, so that the security of the data content in the network transmission process is effectively ensured, and the content cannot be tampered; and simultaneously, the service is provided to a legally authorized terminal in the form of issuing a certificate and a decryption Token (Token) (which can be understood as a public key), so that irrelevant parties or malicious users are prevented from using the service. This direct Token down approach also avoids the performance loss associated with multiple handshakes using the transport layer security protocol (Transport Layer Security, TLS) connections.
Fig. 7 is a schematic implementation flow chart of another method for updating an IP address according to an embodiment of the present application, 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, determining that the IP address list AAA is changed to the IP address list BBB at the HTTPDNS server, and sending a notification message to the gateway.
The IP address list BBB includes therein 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 to notify the terminal of the change in the IP address list AAA.
S711, the terminal may update the internally stored IP address list AAA to the IP address list BBB after obtaining the IP address list BBB based on the notification message.
After this, the terminal can access the traffic 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 informs the user that the IP address has been modified. After receiving the message sent by the gateway, the user (terminal) sends out a Dns request in real time to refresh the IP address of the corresponding domain name, thereby achieving the capability of real-time refreshing.
In the embodiment of the application, based on the HTTPDNS service, a set of technical schemes with weights capable of refreshing IP addresses in real time and preventing hijacking is provided, so that the problems of a plurality of pain points such as request aggregation, content tampering, terminal cache and the like faced by the traditional HTTPDNS are solved, and the safety, usability and flexibility of the HTTPDNS are greatly improved.
In the embodiment of the application, the HTTPDNS service returns the weighted IP address, so that the balance of IP address access is ensured; the HTTPDNS communication data is encrypted and transmitted by adopting asymmetric encryption, so that the content tamper resistance is ensured; the gateway protocol informs the user to refresh the cache in real time, thereby improving the instantaneity.
Based on the foregoing embodiments, the embodiments of the present application provide an apparatus for updating an IP address, where the apparatus includes each unit included, and each module included in each unit may be implemented by a processor in a terminal, a gateway, or a domain name resolution server; of course, the method can also be realized by a specific logic circuit; in an 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 an IP address updating apparatus according to an embodiment of the present application, as shown in fig. 8, an IP address updating apparatus 80 may be applied to a terminal, and the IP address updating apparatus 80 includes:
A transmitting unit 81 configured to transmit a first access request to a gateway;
a receiving unit 82, configured to receive a notification message and a first access result sent by the gateway; the notification message is used for indicating the first IP address list to be updated;
an obtaining unit 83 for obtaining 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 updating means 80 of the IP address further comprises: a determining unit 84 for determining a first domain name corresponding to the first IP address list based on the notification message;
a sending unit 81, configured to send a domain name resolution request to a domain name resolution server; the domain name resolution request includes 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 includes: 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 IP address updating apparatus 80 further includes: a determining unit 84, configured to determine, based on the M weight parameters, an IP address of the first server from the M IP addresses;
The sending unit 81 is further configured to send a 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 a first signature, and the updating means 80 for an IP address further includes: a verification unit 85, configured to determine 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 verification of the domain name resolution result is successful.
In some embodiments, the updating means 80 of the IP address further comprises: an updating unit 86, configured to update the first mapping stored in the terminal to the second mapping; wherein the first mapping comprises: mapping between the first domain name and the first list of IP addresses, the second mapping comprising: mapping between the first domain name and the second list of IP addresses.
In some embodiments, the second list of IP addresses includes: n IP addresses and N weight parameters corresponding to the N IP addresses one by one, wherein N is an integer greater than or equal to 1;
a determining unit 84, configured to determine, based on the N weight 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 a 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 complete message to the gateway, where the update complete 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 the embodiment of the present application, as shown in fig. 9, an IP address updating apparatus 90 may be applied to a gateway, and the IP address updating apparatus 90 includes:
a receiving unit 91, configured to receive a notification message sent by the domain name resolution server; the notification message is used for indicating the first IP address list to be 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;
a receiving unit 91, configured to receive a first access request sent by a terminal;
a sending unit 92, configured to send a notification message and a 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 a first access request to the first server, and receive a first access result sent by the first server.
In some embodiments, the receiving unit 91 is further configured to receive an update complete message sent by the terminal, where the update complete message is used to instruct the terminal to complete updating the stored first IP address list; and based on the update 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 another IP address updating apparatus according to the embodiment of the present application, 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 transmitting unit 101 for transmitting a notification message to the gateway; the notification message is used for indicating the first IP address list to be 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 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 includes 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: an encryption unit 103, configured to perform hash computation on the second IP address list to obtain a first hash value; encrypting the first hash value by adopting a private key to obtain a first signature; and 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 includes: n IP addresses and N weight parameters corresponding to the N IP addresses one by one, wherein N is an integer greater than or equal to 1.
The description of the apparatus embodiments above is similar to that of the method embodiments above, with similar advantageous effects as the method embodiments. For technical details not disclosed in the device embodiments of the present application, please refer to the description of the method embodiments of the present application for understanding.
In the embodiment of the present application, if the method for updating the IP address is implemented in the form of a software functional module, and sold or used as a separate product, the method 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 essentially or some contributing to the related art may be embodied in the form of a software product stored in a storage medium, including several instructions for causing a terminal, gateway or domain name resolution server to perform all or part of the methods of the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read Only Memory (ROM), a magnetic disk, an optical disk, or other various media capable of storing program codes. 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 an IP address update device provided in the embodiment of the present application, as shown in fig. 11, the IP address update device 110 may be a terminal, a gateway, or a domain name resolution server, and the hardware entities of the IP address update device 110 include: a processor 111 and a memory 112, wherein the memory 112 stores a computer program executable on the processor 111, the processor 111 implementing the steps of the method of any of the embodiments described above when executing the program.
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 cache 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 update device 110 of the IP address and the to-be-processed processor 111, and may be implemented by a FLASH memory (FLASH) or a random access memory (Random Access Memory, RAM).
The processor 111 performs the steps of the method for updating the IP address of any one of the above-described steps when executing the program. The processor 111 generally controls the overall operation of the IP address updating device 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 implement steps of a method executed by a terminal in the above method.
Embodiments of the present application provide a computer storage medium storing one or more programs executable by one or more processors to implement steps of a method performed by a gateway in the above method.
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 implement the steps of the method executed by the domain name resolution server in the method.
It should be noted here that: the description of the storage medium and apparatus embodiments above is similar to that of the method embodiments described above, with similar benefits as the method embodiments. For technical details not disclosed in the embodiments of the storage medium and the apparatus of the present application, please refer to the description of the method embodiments 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, gateway or domain name resolution server in the embodiments of the present application.
In some embodiments, as shown in fig. 12, the chip 120 may also include a memory 122. The processor 121 may call and run a computer program from the memory 122 to implement the steps of the method performed by the terminal, gateway or domain name resolution server in the embodiments of the present application.
The memory 122 may be a separate device independent of the processor 121, or may be integrated into 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 in particular, may acquire information or data sent by the 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 in particular, may output information or data to 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 corresponding flows implemented by the network device in the methods in the embodiments of the present application, which are not described herein for brevity.
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 corresponding flows 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 for brevity.
It should be understood that the chips referred to in the embodiments of the present application may also be referred to as system-on-chip chips, or the like.
Embodiments of the present application provide a computer program product comprising a computer storage medium storing computer program code comprising instructions executable by at least one processor to implement the steps of the method performed by a terminal, gateway or domain name resolution server in the above method when the instructions are executed by the at least one processor.
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 cause the 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 for brevity.
It should be noted here that: the description of the storage medium and the terminal, gateway or domain name resolution server embodiments above are 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 the terminal, gateway or domain name resolution server of the present application, please refer to the description of the method embodiments of the present application for understanding.
It should be appreciated that the processor of an embodiment 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 implemented by integrated logic circuits of hardware in a processor or instructions in software form. The processor may be a general purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), an off-the-shelf programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components. The disclosed methods, steps, and logic blocks 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 a method disclosed in connection with the embodiments of the present application may be embodied directly in hardware, in a decoded processor, or in a combination of hardware and software modules in a decoded processor. The software modules may be located in a random access memory, flash memory, read only memory, programmable read only memory, or electrically erasable programmable memory, registers, etc. as well known in the art. The storage medium is located in a memory, and the processor reads the information in the memory and, in combination with its hardware, performs the steps of the above method.
It will be appreciated that the memory in embodiments of the present application may be either volatile memory or nonvolatile memory, or may include both volatile and nonvolatile memory. The nonvolatile Memory may be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically Erasable EPROM (EEPROM), or a flash Memory. The volatile memory may be random access memory (Random Access Memory, RAM) which acts as an external cache. By way of example, and not limitation, many forms of RAM are available, such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (Double Data Rate SDRAM), enhanced SDRAM (ESDRAM), synchronous DRAM (SLDRAM), and Direct 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 memory is exemplary but not limiting, and for example, the memory in the embodiments of the present application may be Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), direct RAM (DR RAM), and the like. That is, the memory in embodiments of the present application is intended to comprise, without being limited to, these and any other suitable types of memory.
It should be noted here that: the above description of the storage medium, computer program, chip and apparatus embodiments is similar to that 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 the apparatus of the present application, please refer to the description of the method embodiments of the present application for understanding.
It should be appreciated that reference throughout this specification to "one embodiment" or "an embodiment" or "embodiments of the present application" or "the foregoing embodiments" 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 "an embodiment of the present application" or "the foregoing embodiment" 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 various embodiments of the present application, the sequence numbers of the foregoing processes do not mean the order of execution, and the order of execution of the processes should be determined by the functions and internal logic thereof, and should not constitute any limitation on the implementation process of the embodiments of the present application. The foregoing embodiment numbers of the present application are merely for describing, and do not represent advantages or disadvantages of the embodiments.
Without specific explanation, the terminal, gateway, or domain name resolution server performs any step in the embodiments of the present application, and may be the processor of the terminal, gateway, or domain name resolution server performs the step. Embodiments of the present application do not limit the order in which the following steps are performed by the terminal, gateway, or domain name resolution server unless specifically stated. In addition, the manner in which the data is processed in different embodiments may be the same method or different methods. It should be further noted that, any step in the embodiments of the present application may be independently performed by the terminal, the gateway, or the domain name resolution server, that is, when the terminal, the gateway, or the domain name resolution server performs any step in the embodiments described above, the step may not depend on the execution of other steps.
In the several embodiments provided in this application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above described device embodiments are only illustrative, e.g. the division of the units is only one logical function division, and there may be other divisions in practice, such as: multiple units or components may be combined or may be integrated into another system, or some features may be omitted, or not performed. In addition, the various components shown or discussed may be coupled or directly coupled or communicatively coupled to each other via some interface, whether indirectly coupled or communicatively coupled to devices or units, whether electrically, mechanically, or otherwise.
The units described above as separate components may or may not be physically separate, and components shown as units may or may not be physical units; can be located in one place or distributed to a plurality of network units; some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, or each unit may be separately used as one unit, or two or more units may be integrated in one unit; the integrated units may be implemented in hardware or in hardware plus software functional units.
The methods disclosed in the several method embodiments provided in the present application may be arbitrarily combined without collision to obtain a new method embodiment.
The features disclosed in the several product embodiments provided in the present application may be combined arbitrarily without conflict to obtain new product embodiments.
The features disclosed in the several method or apparatus embodiments provided in the present application may be arbitrarily combined without conflict to obtain new method embodiments or apparatus embodiments.
Those of ordinary skill in the art will appreciate that: all or part of the steps for implementing the above method embodiments may be implemented by hardware related to program instructions, and the foregoing program may be stored in a computer readable storage medium, where the program, when executed, performs steps including the above method embodiments; and the aforementioned storage medium includes: a mobile storage device, a Read Only Memory (ROM), a magnetic disk or an optical disk, or the like, which can store program codes.
Alternatively, the integrated units described above may be stored in a computer readable storage medium if implemented in the form of software functional modules and sold or used as a stand-alone product. Based on such understanding, the technical solutions of the embodiments of the present application may be essentially or partially contributing to the related art, and the computer software product may be stored in a storage medium, and include several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a removable storage device, a ROM, a magnetic disk, or an optical disk.
In the embodiments of the present application, descriptions of the same steps and the same content in different embodiments may be referred to each other. 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 executes a and executes B, which may be that the terminal, the gateway or the domain name resolution server executes a first and then executes B, or that the terminal, the gateway or the domain name resolution server executes B first and then executes a, or that the terminal, the gateway or the domain name resolution server executes B while executing a.
The foregoing is merely an embodiment of the present application, but the protection scope of the present application is not limited thereto, and any person skilled in the art can easily think about changes or substitutions within the technical scope of the present application, and the changes and substitutions are intended to be covered in the protection 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
The embodiment of the application provides a method, a device, equipment and a computer storage medium for updating an IP address, and by adopting the scheme for updating the IP address in the application, a terminal can obtain a second IP address list obtained after updating a first IP address list through a notification message, so that the access success rate of the terminal can be improved.

Claims (20)

1. An updating method of an IP address, comprising:
the terminal sends a first access request to the gateway based on any one IP address in a first IP address list of the first server;
receiving a notification message and a first access result sent by the gateway; the notification message is used for indicating the first IP address list to be updated, and the first access result comprises resources which the terminal needs to access;
determining a first domain name corresponding to the first IP address list based on the notification message; sending a domain name resolution request to a domain name resolution server; the domain name resolution request includes the first domain name; receiving a domain name resolution result sent by the domain name resolution server; 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 first list of IP addresses comprises: 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;
before the terminal sends the first access request to the gateway, the method further comprises:
and determining the IP address of the first server from the M IP addresses based on the M weight parameters.
3. The method of claim 1 or 2, wherein the domain name resolution result further comprises a first signature; the method further comprises the following steps after obtaining the domain name resolution result from the domain name resolution server based on the notification message:
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 verification of the domain name resolution result is successful.
4. The method of claim 3, wherein the determining that the domain name resolution result is verified successfully further comprises:
updating 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: mapping between the first domain name and the second list of IP addresses.
5. The method of claim 1, wherein the second list of IP addresses comprises: n IP addresses and N weight parameters corresponding to the N IP addresses one by one, wherein N is an integer greater than or equal to 1;
The method further comprises the following steps after obtaining the domain name resolution result from the domain name resolution server based on the notification message:
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 the gateway based on the IP address of the second server;
and receiving a second access result sent by the gateway.
6. The method of claim 1, 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.
7. The method of claim 1, wherein the obtaining the domain name resolution result from the domain name resolution server based on the notification message further comprises:
sending an update completion message to the gateway; the update completion message is used for indicating that the terminal completes updating the stored first IP address list.
8. An updating method of an IP address, comprising:
the gateway receives 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; the terminal is used for acquiring a second IP address list obtained after updating the first IP address list from the domain name resolution server;
Receiving a first access request sent by the terminal based on any one IP address in the first IP address list of a first server;
and sending the notification message and the first access result to the terminal.
9. The method of claim 8, wherein before the sending the notification message and the first access result to the terminal, further comprising:
and sending the first access request to the first server, and receiving the first access result sent by the first server.
10. The method according to claim 8 or 9, wherein after the 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 of 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.
11. An updating method of an IP address, comprising:
the domain name resolution server sends a notification message to the gateway; the notification message is used for indicating the first IP address list to be updated; and the terminal is used for acquiring a second IP address list obtained after updating the first IP address list from the domain name resolution server based on the notification message under the condition that the terminal sends a first access request to the gateway based on any one IP address in the first IP address list of the first server and the terminal receives the notification message and the first access result sent by the gateway.
12. The method of claim 11, wherein after the domain name resolution server sends a notification message to a gateway, further comprising:
receiving a domain name resolution request sent by the terminal; the domain name resolution request includes a 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.
13. The method according to claim 11 or 12, wherein before the sending the domain name resolution result to the terminal, the method further comprises:
carrying out hash calculation on the second IP address list to obtain a first hash value;
encrypting the first hash value by adopting a private key to obtain a first signature;
and determining the domain name resolution result based on the first signature and the second IP address list.
14. The method of claim 11, wherein the second list of IP addresses comprises: n IP addresses and N weight parameters corresponding to the N IP addresses one by one, wherein N is an integer greater than or equal to 1.
15. An apparatus for updating an IP address, comprising:
a sending unit, configured to send a first access request to the gateway based on any one IP address in a first IP address list of the first server;
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 the first IP address list to be updated, and the first access result comprises resources which the terminal needs to access;
an obtaining unit, configured to determine a first domain name corresponding to the first IP address list based on the notification message; sending a domain name resolution request to a domain name resolution server; the domain name resolution request includes the first domain name; receiving a domain name resolution result sent by the domain name resolution server; the domain name resolution result comprises a second IP address list obtained after the first IP address list is updated.
16. An apparatus for updating an IP address, comprising:
the receiving unit is used for receiving the notification message sent by the domain name resolution server; the notification message is used for indicating the first IP address list to be updated; the terminal is used for acquiring a second IP address list obtained after updating the first IP address list from the domain name resolution server;
the receiving unit is further configured to receive a first access request sent by the terminal based on any one IP address in the first IP address list of the first server;
And the sending unit is used for sending the notification message and the first access result to the terminal.
17. 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 the first IP address list to be updated; and the terminal is used for acquiring a second IP address list obtained after updating the first IP address list from a domain name resolution server based on the notification message under the condition that the terminal sends a first access request to the gateway based on any one IP address in the first IP address list of the first server and the terminal receives the notification message and the first access result sent by the gateway.
18. An apparatus for updating an IP address, comprising: a memory and a processor, wherein the memory is configured to store,
the memory stores a computer program executable on a processor,
the processor implementing the steps of the method of any one of claims 1 to 7 when executing the program;
alternatively, the processor, when executing the program, implements the steps of the method of any one of claims 8 to 10;
alternatively, the processor, when executing the program, implements the steps of the method of any of claims 11 to 14.
19. A computer storage medium storing one or more programs executable by one or more processors to implement the steps of the method of any of claims 1 to 7;
alternatively, the one or more programs may be executable by one or more processors to implement the steps of the method of any of claims 8 to 10;
alternatively, the one or more programs may be executed by one or more processors to implement the steps in the method of any of claims 11 to 14.
20. A chip, comprising: a processor for calling and running a computer program from a memory, causing a device on which the chip is mounted to perform the steps of the method according to any one of claims 1 to 7;
or for calling and running a computer program from a memory, causing a device on which said chip is mounted to perform the steps of the method according to any one of claims 8 to 10;
or for calling and running a computer program from a memory, such that a device on which the chip is mounted performs the steps of the method according to any of claims 11 to 14.
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 CN115516835A (en) 2022-12-23
CN115516835B true 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 (5)

* 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
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 (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
RU2610586C2 (en) * 2013-05-13 2017-02-13 Общество С Ограниченной Ответственностью "Яндекс" Method and system for providing client device automatic update of ip address corresponding to domain name
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 (5)

* 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
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
CN115516835A (en) 2022-12-23
WO2021226894A1 (en) 2021-11-18

Similar Documents

Publication Publication Date Title
CN115516835B (en) Method, device, equipment and computer storage medium for updating IP address
US8312064B1 (en) Method and apparatus for securing documents using a position dependent file system
US10904227B2 (en) Web form protection
CN104935626B (en) For effective, secure distribution of digital content system and method
US9148283B1 (en) Storing encrypted objects
US8924674B2 (en) Permissions of objects in hosted storage
US11140177B2 (en) Distributed data authentication and validation using blockchain
US8689277B2 (en) Method and system for providing location of target device using stateless user information
US11921883B2 (en) Contact discovery service with privacy aspect
JP7132350B2 (en) Domain-specific browser identifiers as a replacement for browser cookies
US11582020B2 (en) Homomorphic encryption offload for lightweight devices
US20220300643A1 (en) Cryptographically secure data protection
US20140047236A1 (en) Authenticated file handles for network file systems
CN113364781A (en) Request processing method and system
Alsaawy et al. Triple cache approach for preserving privacy and enhancing performance of LBS
JP2023096089A (en) Pseudonym event certification by group signature
JP2022543947A (en) Protect browser cookies
US11895227B1 (en) Distributed key management system with a key lookup service
JP2021519022A (en) Self-authentication domain-specific browser identifier
CN114143577B (en) Video acquisition method and system
CN112637316B (en) Communication method and device
JP7279209B2 (en) Cross-domain frequency filter for fraud detection
WO2011077305A1 (en) Methods and apparatuses for providing content for user terminals
CN117061248B (en) Data security protection method and device for data sharing
CN114065228A (en) Data processing method and device

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