WO2012089013A1 - Domain name system caching method, authorized domain name server and caching domain name server - Google Patents

Domain name system caching method, authorized domain name server and caching domain name server Download PDF

Info

Publication number
WO2012089013A1
WO2012089013A1 PCT/CN2011/083913 CN2011083913W WO2012089013A1 WO 2012089013 A1 WO2012089013 A1 WO 2012089013A1 CN 2011083913 W CN2011083913 W CN 2011083913W WO 2012089013 A1 WO2012089013 A1 WO 2012089013A1
Authority
WO
WIPO (PCT)
Prior art keywords
domain name
name resolution
server
resolution result
cached
Prior art date
Application number
PCT/CN2011/083913
Other languages
French (fr)
Chinese (zh)
Inventor
张德文
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2012089013A1 publication Critical patent/WO2012089013A1/en

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
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0654Management of faults, events, alarms or notifications using network fault recovery
    • H04L41/0668Management of faults, events, alarms or notifications using network fault recovery by dynamic selection of recovery network elements, e.g. replacement by the most appropriate element after failure
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0805Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
    • H04L43/0817Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking functioning
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/16Threshold monitoring
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/45Network directories; Name-to-address mapping
    • H04L61/4505Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols
    • H04L61/4511Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols using domain name system [DNS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/58Caching of addresses or names

Definitions

  • the domain name system cache method the authorized domain name server, and the cached domain name server.
  • the application is submitted to the Chinese Patent Office on December 29, 2010, and the application number is 201010612278.6.
  • the invention name is "domain name system cache method, authorized domain name server, cache domain name server". The priority of the Chinese Patent Application, the entire contents of which is incorporated herein by reference.
  • the present invention relates to the field of information technology, and in particular, to a method for updating a domain name system cache, an authorized domain name server, and a cached domain name server.
  • the Domain Name System is a distributed host information database that uses a client/server model, which mainly includes a cached domain name server and an authorized domain name server.
  • the authorized domain name server stores the correspondence between the domain name and the Internet Protocol (IP) address in the network.
  • IP Internet Protocol
  • the authorized domain name server can resolve the domain name to the corresponding IP address.
  • the terminal sends a domain name resolution request to the cached domain name server, where the domain name resolution request carries the domain name that the terminal requests to resolve.
  • the cached domain name server sends a domain name resolution request to the authorized domain name server.
  • the domain name resolution server performs domain name resolution according to the domain name resolution request, obtains the domain name resolution result, and sends a domain name resolution response to the cache domain name server.
  • the domain name resolution response includes the domain name resolution result
  • the domain name resolution result includes the IP address of the content server and the analysis result.
  • Time To Live (TTL) The cached domain name server sends the domain name resolution result to the terminal.
  • the cached domain name server After receiving the domain name resolution response, the cached domain name server caches the domain name resolution result according to the time-to-live. After receiving the domain name resolution request for parsing the same domain name, the cached domain name server directly sends the cached domain name resolution result to the terminal. . After the TTL expires, the cached domain name server deletes the domain name resolution result from the cache.
  • the cached domain name server still returns the address of the failed content server based on the domain name resolution request, so that the terminal requests the content from the faulty content server according to the domain name resolution result. When the content request fails.
  • the embodiment of the present invention provides a method for updating a domain name system cache, and an authorized domain name server and a cached domain name server, so as to delete the domain name resolution result on the cached domain name server in time after the content server is faulty, to prevent the terminal from sending a request to the faulty content server.
  • the method for updating the domain name system cache provided by the embodiment of the present invention includes:
  • the second domain name resolution result of the domain name that is requested to be resolved is obtained, and the domain name and the first domain name that are requested to be resolved are obtained.
  • the working state of the content server corresponding to the second domain name resolution result is normal;
  • the embodiment of the invention further provides a method for updating a domain name system cache, including:
  • the domain name resolution result deletion message is generated, and the domain name resolution result deletion message is used to delete the first in the cache domain name server.
  • the domain name resolution result, the domain name resolution result deletion message carries the domain name requested for resolution, and the domain name of the request resolution corresponds to the first domain name resolution result;
  • the embodiment of the invention further provides a method for updating a domain name system cache, including:
  • the embodiment of the invention further provides a method for updating a domain name system cache, including: And receiving the domain name resolution result deletion message sent by the authorized domain name server, where the domain name resolution result deletion message carries the domain name of the request resolution, and the domain name resolution result deletion message is used to delete the first domain name resolution result carried in the cache domain name server, The first domain name resolution result corresponds to the domain name of the request resolution;
  • the first domain name resolution result corresponding to the domain name that is requested to be resolved in the cache is deleted.
  • An embodiment of the present invention further provides an authorized domain name server, including:
  • the parsing result obtaining unit is configured to obtain a second domain name parsing result of the domain name requested to be parsed when the content server corresponding to the first domain name parsing result in the self cache is faulty or the load exceeds a threshold, and the request is parsed
  • the domain name is corresponding to the first domain name resolution result, and the working state of the content server corresponding to the second domain name resolution result is normal;
  • An update message sending unit configured to send a domain name resolution update message to the cached domain name server corresponding to the domain name that is requested to be parsed, where the domain name resolution update message carries the domain name that is requested to be parsed, and the domain name resolution update message is used to indicate
  • the cached domain name server updates the cached first domain name resolution result to the second domain name resolution result.
  • An embodiment of the present invention further provides an authorized domain name server, including
  • a message generating unit configured to: when detecting that the content server corresponding to the first domain name resolution result in the cache is faulty or the load exceeds a threshold, generating a domain name resolution result deletion message, where the domain name resolution result deletion message is used for deleting The first domain name resolution result carried in the cached domain name server, where the domain name resolution result deletion message carries the domain name requested for resolution, and the domain name to be resolved corresponds to the first domain name resolution result;
  • a message sending unit configured to send the domain name resolution result deletion message to the cached domain name server, so that the cached domain name server deletes a first domain name resolution result in the cache, the cached domain name server, and the request resolution The domain name corresponds.
  • the embodiment of the invention further provides a cached domain name server, including:
  • An update message receiving unit configured to receive a domain name resolution update message sent by the authorized domain name server, where the domain name resolution update message is used to indicate that the cached domain name server updates the cached first domain name resolution result to the second domain name resolution result,
  • the domain name resolution update message carries the domain name requested for resolution;
  • the second update unit is configured to update the first domain name resolution result in the cache to the second domain name resolution result, where the first domain name resolution result corresponds to the domain name requested to be resolved.
  • the embodiment of the invention further provides a cached domain name server, including:
  • the deletion message receiving unit is configured to receive a domain name resolution result deletion message sent by the authorized domain name server, where the domain name resolution result deletion message carries the domain name requested to be resolved, and the domain name resolution result deletion message is used to delete the number carried in the cache domain name server.
  • a domain name resolution result where the first domain name resolution result corresponds to the domain name of the request resolution;
  • the deletion execution unit is configured to delete the first domain name resolution result corresponding to the domain name of the request resolution in the cache.
  • the method for updating the domain name system cache may be applied to a scenario in which the content server corresponding to the first domain name resolution result is faulty or the load exceeds a threshold, and the embodiment of the present invention sends the domain name resolution update to the cached domain name server.
  • the message causes the cached domain name server to delete the first domain name resolution result of the cache to be the second domain name resolution result or delete the cached first domain name resolution result, so as to avoid returning the wrong first domain name resolution result to the terminal.
  • the embodiment of the present invention may enable the cached domain name server to return the second domain name resolution result to the terminal after receiving the domain name resolution request of the terminal, and the content server corresponding to the second domain name resolution result is working normally, and the terminal may be in a normal working state.
  • the content server requests content.
  • FIG. 1 is a flowchart of a method for updating a domain name system cache according to a first embodiment of the present invention
  • FIG. 2 is a flowchart of a method for a domain name server to send a domain name resolution update message to a cached domain name server corresponding to a domain name requested to be resolved by the domain name server according to the first embodiment of the present invention
  • FIG. 3 is a flowchart of a method for updating a cache of a domain name system according to Embodiment 2 of the present invention
  • FIG. 4 is a flowchart of a method for updating a cache of a domain name system according to Embodiment 3 of the present invention
  • FIG. 5 is an authorization of Embodiment 3 of the present invention
  • FIG. 6 is a flowchart of a method for updating a domain name system cache according to Embodiment 4 of the present invention
  • FIG. 7 is a flowchart of a method for updating a domain name system cache according to Embodiment 5 of the present invention
  • FIG. 8 is a cache domain name according to Embodiment 5 of the present invention
  • the server updates the first domain name resolution result in the cache to a flowchart of the second domain name resolution result
  • 9 is a flowchart of a method for updating a domain name system cache provided by Embodiment 6 of the present invention
  • FIG. 10 is a flowchart of a first domain name resolution result corresponding to a domain name requested to be resolved by a cached domain name server in a cache of a sixth embodiment of the present invention; flow chart;
  • FIG. 11 is an application scenario diagram of a method for updating a domain name system cache provided by Embodiment 7 of the present invention.
  • FIG. 12 is a schematic structural diagram of an authorized domain name server according to Embodiment 8 of the present invention
  • FIG. 13 is a schematic structural diagram of an authorized domain name server according to Embodiment 9 of the present invention
  • FIG. 14 is an update message in an authorized domain name server according to Embodiment 9 of the present invention
  • Schematic diagram of the sending unit
  • FIG. 15 is a schematic structural diagram of an authorized domain name server according to Embodiment 10 of the present invention
  • FIG. 16 is a schematic structural diagram of a deletion message sending unit in an authorized domain name server according to Embodiment 10 of the present invention
  • FIG. 17 is a schematic structural diagram of an authorized domain name server according to Embodiment 11 of the present invention
  • FIG. 18 is a schematic structural diagram of a cached domain name server according to Embodiment 12 of the present invention
  • FIG. 19 is a cached domain name server according to Embodiment 12 of the present invention
  • FIG. 20 is a schematic structural diagram of a cached domain name server according to Embodiment 13 of the present invention
  • FIG. 21 is a schematic diagram of a structure of a delete execution unit in a cached domain name server according to Embodiment 13 of the present invention.
  • the present invention provides a method for updating a domain name system cache, an authorized domain name server, and a cached domain name server.
  • FIG. 1 is a flowchart of a method for updating a domain name system cache according to Embodiment 1 of the present invention.
  • the method for updating the domain name system cache provided by the first embodiment of the present invention includes:
  • the second domain name resolution result of the domain name that is requested to be resolved is obtained, and the domain name and the first domain name resolution of the request are resolved.
  • the working state of the content server corresponding to the second domain name resolution result is normal.
  • the first domain name resolution result is cached in the authorized domain name server, and the authorized domain name server obtains the second domain name of the domain name that is requested to be resolved when detecting that the content server corresponding to the first domain name resolution result is faulty or the load exceeds the threshold. Analyze the results.
  • the domain name to be parsed corresponds to the first domain name resolution result, and the content server corresponding to the second domain name resolution result is normal.
  • the normal working status of the content server can be understood as that the content server does not currently fail, and the content service can be normally provided for the user terminal.
  • the threshold of the load of the content server can be flexibly determined according to actual conditions.
  • the domain name resolution update message is sent to the cached domain name server corresponding to the domain name that is requested to be parsed.
  • the domain name resolution update message carries the domain name of the request resolution, and the domain name resolution update message is used to indicate that the cached domain name server updates the cached first domain name resolution result. Parse the result for the second domain name.
  • the authorized domain name server sends a domain name resolution update message to the cached domain name server corresponding to the domain name that is requested to be resolved.
  • the authorized domain name server can obtain the address of the corresponding cached domain name server according to the correspondence between the domain name that is requested to be resolved and the cached domain name server.
  • the cache corresponding to the domain name requested for resolution The domain name server has sent a domain name resolution request to the authorized domain name server for the domain name.
  • the domain name requested to be parsed may correspond to multiple cached domain name servers, that is, multiple cached domain name servers corresponding to the domain name resolved by the same request may receive the domain name resolution update message.
  • the cached domain name server updates the first domain name resolution result in the cache to the second domain name resolution result, and after receiving the domain name resolution request, the cached second domain name resolution result is sent to the terminal, so that the terminal sends the second domain name to the second domain name.
  • the content server requesting the inner valley corresponding to the parsing result.
  • the method for updating the domain name system cache may be applied to a scenario in which the content server corresponding to the first domain name resolution result is faulty or the load exceeds a threshold, and the embodiment of the present invention sends the domain name resolution update to the cached domain name server.
  • the result of deleting the first domain name resolution of the cache is the second domain name resolution result, and avoids returning the wrong first domain name resolution result to the terminal.
  • the cached domain name server After receiving the domain name resolution request of the terminal, the cached domain name server returns the second domain name resolution result to the terminal, and the content server corresponding to the second domain name resolution result is in a normal working state, and the terminal may request content from the content server with normal working status.
  • the step of the domain name server in the first embodiment of the present invention for the domain name server to perform the domain name resolution update message corresponding to the domain name server corresponding to the domain name that is requested to be resolved may include:
  • the authorized domain name server searches for the address of the cached domain name server corresponding to the domain name requested to be resolved according to the pre-stored correspondence, that is, the correspondence between the domain name to be parsed and the cached domain name server, and obtains the cached domain name.
  • the IP address of the server is not limited to the pre-stored correspondence.
  • the authorized domain name server sends a domain name resolution update message to the cached domain name server according to the IP address of the cached domain name server, so that the cached domain name server that receives the update message deletes the cached domain name resolution result.
  • the domain name resolution update message provided by the embodiment of the present invention further includes cache update indication information and a second domain name resolution result.
  • the cache update indication information is used to instruct the cached domain name server to update the cached first domain name resolution result to the second domain name resolution result.
  • the cached domain name server deletes the first domain name resolution result cached by itself according to the update indication information.
  • FIG. 3 is a flow chart of a method for updating a domain name system cache according to Embodiment 2 of the present invention.
  • the terminal sends a domain name resolution request to the cached domain name server, where the domain name resolution request carries the domain name that the terminal requests to resolve.
  • the cached domain name server sends a domain name resolution request to the authorized domain name server.
  • the authorized domain name server receives the domain name resolution request sent by the cached domain name server, and the domain name resolution request includes the domain name requested for resolution.
  • C2. Parse the domain name that is requested to be parsed according to the received domain name resolution request, and obtain the first domain name resolution result.
  • the authorized domain name server parses the domain name of the request for parsing according to the received domain name resolution request, and obtains the first domain name resolution result.
  • the first domain name resolution result includes the address of the content server corresponding to the domain name and the lifetime of the first domain name resolution result.
  • the lifetime of the first domain name resolution result is referred to as a first lifetime.
  • C3. Cache a correspondence between the first domain name resolution result and the domain name requested to be resolved, and a correspondence between the domain name requested to be resolved and the cache domain name server, and send a domain name resolution response to the cache domain name server, where the domain name resolution response includes The first domain name resolution result and the domain name requested to be resolved.
  • the authorized domain name server caches the correspondence between the first domain name resolution result and the domain name requested to be resolved, the domain name requested to be resolved, and the cache domain name server.
  • the time for authorizing the domain name server to cache the corresponding relationship may be flexibly determined according to requirements, for example, in seconds or hours.
  • the authorized domain name server also sends a domain name resolution response to the cached domain name server according to the domain name resolution request.
  • the domain name resolution response includes the first domain name resolution result and the domain name requested to be resolved.
  • the cached domain name server After receiving the domain name resolution response, the cached domain name server sends the first domain name resolution result to the corresponding terminal, so that the terminal can access the corresponding content server according to the first domain name resolution result.
  • the authorized domain name server authenticates the domain name server.
  • the domain name that is requested to be parsed is again subjected to domain name resolution, and the second domain name resolution result of the domain name requested for resolution is obtained, and the current working state of the content server corresponding to the second domain name resolution result is normal.
  • the domain name resolution update message carries the domain name of the request resolution, and the domain name resolution update message is used to indicate that the cached domain name server updates the cached first domain name resolution result. Analyze the second domain name fruit.
  • the authorized domain name server sends a domain name resolution update message to the cached domain name server corresponding to the domain name that is requested to be resolved.
  • the authorized domain name server can obtain the address of the corresponding cached domain name server according to the correspondence between the domain name that is requested to be resolved and the cached domain name server.
  • the cache corresponding to the domain name requested for resolution The domain name server has sent a domain name resolution request to the authorized domain name server for the domain name.
  • the domain name for requesting resolution may correspond to multiple cached domain name servers, that is, multiple cached domain name servers corresponding to the domain name resolved by the same request may receive the domain name resolution update message.
  • the domain name resolution update message sent by the authorized domain name server carries the domain name for request resolution, and the domain name resolution update message is used to indicate that the cached domain name server updates the cached first domain name resolution result to the second domain name resolution result.
  • the cached domain name server updates the first domain name resolution result in the cache to the second domain name resolution result, and after receiving the domain name resolution request, the cached second domain name resolution result is sent to the terminal, so that the terminal sends the second domain name to the second domain name.
  • the content server requesting the inner valley corresponding to the parsing result.
  • the first domain name resolution result in the cache and the address of the cache domain name server are automatically deleted, which not only saves the cache space, but also can save the cache space. Improve the performance of authorized domain name servers.
  • the authorized domain name server may further update the first domain name resolution result in the cache to the second domain name resolution result after obtaining the second domain name resolution result corresponding to the domain name requested to be resolved.
  • the authorized domain name server detects that the content server corresponding to the domain name resolution result is faulty, and may adopt the following manner:
  • the authorized domain name server receives the content service corresponding to the first domain name resolution result. If the fault report message is sent by the device, it is determined that the content server is faulty.
  • the preset time can be determined according to a specific content server.
  • FIG. 4 is a flow chart of a method for updating a domain name system cache according to Embodiment 3 of the present invention.
  • the domain name resolution result deletion message is generated, and the domain name resolution result deletion message is used to delete the cached cached domain name server.
  • the domain name resolution result deletion message carries the domain name requested for resolution, and the first domain name resolution result corresponds to the domain name requested to be resolved.
  • the authorized domain name server caches the first domain name resolution result, and the authorized domain name server generates a domain name resolution result deletion message when the content server corresponding to the first domain name resolution result is faulty or the load exceeds the threshold, and the domain name resolution result is generated.
  • the delete message is used to delete the first domain name resolution result cached in the cached domain name server.
  • the domain name resolution result deletion message carries the domain name requested for resolution, and the cached first domain name resolution result and the domain name requested to be resolved have a corresponding relationship.
  • D2 Send a domain name resolution result deletion message to the cache domain name server, so that the cache domain name server deletes the first domain name resolution result in the cache, and the cache domain name server corresponds to the domain name requested to be parsed.
  • the authorized domain name server sends the message to the cached domain name server corresponding to the domain name that is requested to be analyzed. It should be noted that the domain name requested for resolution can correspond to multiple cached domain name servers.
  • the cached domain name server After receiving the domain name resolution result deletion message, the cached domain name server deletes the first domain name resolution result corresponding to the domain name requested for resolution in the cache. Cache domain name server is deleting After the first domain name resolution result is obtained in the cache, the domain name resolution result can be requested again from the authorized domain name server after receiving the domain name resolution request, and the correct domain name resolution result is obtained.
  • the method for updating the domain name system cache may be applied to a scenario in which the content server corresponding to the first domain name resolution result is faulty or the load is higher than a preset threshold, and the embodiment of the present invention sends the domain name resolution to the cached domain name server.
  • the message is deleted, so that the cached domain name server deletes the cached first domain name resolution result, and avoids returning the wrong first domain name resolution result to the terminal.
  • the cached domain name server After receiving the domain name resolution request of the terminal, the cached domain name server re-requests the correct domain name resolution result to the authorized domain name server, and sends the correct domain name resolution result to the cached domain name server, so that the terminal can request the content from the correct content server.
  • step D2 the step of the domain name server performing the domain name resolution result deletion message sent to the cache domain name server (step D2) may specifically include:
  • El searches for the address of the cached domain name server corresponding to the domain name requested to be resolved in the cache according to the pre-saved correspondence.
  • the authorized domain name server searches and searches in the cache according to the pre-stored correspondence, that is, the correspondence between the first domain name resolution result and the domain name requested to be resolved, the domain name requested to be resolved, and the cached domain name server.
  • the address of the cached domain name server corresponding to the first domain name resolution result, and the IP address of the cached domain name server is obtained.
  • FIG. 6 is a flow chart of a method for updating a domain name system cache according to Embodiment 4 of the present invention.
  • the terminal sends a domain name resolution request to the cached domain name server, where the domain name resolution request carries the domain name requested for resolution.
  • the cached domain name server sends a domain name resolution request to the authorized domain name server.
  • the authorized domain name server receives the domain name resolution request sent by the cached domain name server,
  • the domain name resolution request includes the domain name requested to be resolved.
  • the authorized domain name server parses the domain name of the request for parsing according to the received domain name resolution request, and obtains the first domain name resolution result.
  • the first domain name resolution result includes the address of the content server corresponding to the domain name and the lifetime of the first domain name resolution result.
  • the lifetime of the first domain name resolution result is referred to as a first lifetime.
  • F3. Cache a correspondence between the first domain name resolution result and the domain name requested to be resolved, and a correspondence between the domain name requested to be resolved and the cached domain name server, and send a domain name resolution response to the cache domain name server, where the domain name resolution response is It includes the first domain name resolution result and the domain name requested for resolution.
  • the authorized domain name server caches the correspondence between the first domain name resolution result and the domain name requested to be resolved, the domain name requested to be resolved, and the cache domain name server that sends the domain name resolution request.
  • the time at which the authorized domain name server caches the corresponding relationship may be flexibly determined according to needs, for example, in seconds or hours.
  • the authorized domain name server also sends a domain name resolution response to the cached domain name server according to the domain name resolution request.
  • the domain name resolution response includes the first domain name resolution result and the domain name requested to be resolved.
  • the cached domain name server After receiving the domain name resolution response, the cached domain name server sends the first domain name resolution result to the corresponding terminal, and the terminal accesses the corresponding content server according to the first domain name resolution result.
  • the domain name resolution result deletion message is generated, and the domain name resolution result deletion message is used to delete the first domain name resolution result carried in the cache domain name server.
  • the domain name resolution result deletion message carries the domain name requested for resolution, and the first domain name resolution result corresponds to the domain name requested to be resolved.
  • the domain name resolution result deletion message is used to delete the first domain name resolution result carried in the cached domain name server.
  • the domain name resolution result deletion message carries the domain name of the request resolution, and there is a correspondence between the cached first domain name resolution result and the domain name requested to be resolved.
  • the authorized domain name server sends the message to the cached domain name server corresponding to the domain name that is requested to be resolved.
  • the domain name requested for resolution may correspond to multiple cached domain name servers, and the authorized domain name server may send a domain name resolution result deletion message to multiple cached domain name servers, thereby causing multiple cached domain name servers to delete the first domain name resolution in the cache. result.
  • the cached domain name server After receiving the domain name resolution result deletion message, the cached domain name server deletes the first domain name resolution result corresponding to the domain name requested for resolution in the cache. After deleting the first domain name resolution result in the cache, the cached domain name server may request the domain name resolution result from the authorized domain name server after receiving the domain name resolution request for the request, and obtain the correct domain name resolution result.
  • the authorized domain name server detects that the content server corresponding to the domain name resolution result is faulty, and may adopt the following manner:
  • the authorized domain name server receives the fault report message sent by the content server corresponding to the first domain name resolution result, and determines that the content server is faulty.
  • the preset time can be determined according to a specific content server.
  • FIG. 7 is a flow chart of a method for updating a domain name system cache according to Embodiment 5 of the present invention.
  • the cache of the cached domain name server includes request parsing.
  • the authorized domain name server sends a domain name resolution update message to the cached domain name server when it is required to delete the domain name resolution result cached in the cached domain name service, for example, if the content server corresponding to the first domain name resolution result is faulty or the load is higher than the preset threshold.
  • the method for updating the domain name system cache provided by the fifth embodiment of the present invention may include:
  • Gl Receive a domain name resolution update message sent by the authorized domain name server, where the domain name resolution update message is used to indicate that the cached domain name server updates the cached first domain name resolution result to the second domain name resolution result, where the domain name resolution update message carries the request resolution domain name.
  • the cache domain name server receives the domain name resolution update message sent by the authorized domain name server, and the domain name resolution update message is used to indicate that the cached domain name server updates the cached first domain name resolution result to the second domain name resolution result, and the domain name resolution update message is carried in the domain name resolution update message.
  • the domain name requested to be resolved is the domain name resolution update message sent by the authorized domain name server, and the domain name resolution update message is used to indicate that the cached domain name server updates the cached first domain name resolution result to the second domain name resolution result, and the domain name resolution update message is carried in the domain name resolution update message.
  • the domain name requested to be resolved.
  • the cached domain name server can find the first domain name resolution result that needs to be updated according to the domain name parsed by the request in its own cache.
  • G2 The first domain name resolution result in the cache is updated to the second domain name resolution result, and the first domain name resolution result corresponds to the domain name requested to be resolved.
  • the cached domain name server updates the first domain name resolution result corresponding to the domain name to be resolved in the cache to the second domain name resolution result according to the update indication information.
  • the cached domain name server updates the first domain name resolution result corresponding to the domain name that is requested to be parsed in the cache to the second domain name resolution result, and may analyze the updated domain name after receiving the domain name resolution request.
  • the second domain name resolution result is sent to the terminal.
  • the embodiment of the present invention can prevent the terminal from requesting content from the failed content server by deleting the domain name resolution result in the self cache, and further causes the terminal to request content from the currently available content server.
  • the second domain name resolution result cached in the cached domain name server further includes a time-to-live, and the survival time of the second domain name resolution result is referred to as a second time-to-live time in the embodiment of the present invention.
  • the embodiment of the present invention can not only save the cached resource of the cached domain name server, but also enable the terminal to obtain a newer domain name resolution result.
  • the cached domain name server caches the first domain name in its own cache.
  • the process of updating the parsing result to the second domain name parsing result may be: H1. Searching, in the cache, the first domain name parsing result corresponding to the domain name requested for parsing according to the pre-stored correspondence.
  • the cached domain name server searches for the first domain name resolution result corresponding to the domain name to be resolved in the cache according to the pre-stored correspondence, that is, the correspondence between the domain name to be resolved and the first domain name resolution result.
  • the cache domain name server pre-stores the correspondence between the domain name for request resolution and the first domain name resolution result. After receiving the domain name resolution response sent by the authorized domain name server, the cached domain name server pre-stores the correspondence between the first domain name resolution result in the domain name resolution response and the domain name resolved by the request.
  • H2 Update the first domain name resolution result that is found to the second domain name resolution result.
  • the cached domain name server updates the first domain name resolution result found to the second domain name resolution result.
  • FIG. 9 is a flow chart of a method for updating a domain name system cache according to Embodiment 6 of the present invention.
  • the cache of the cached domain name server includes the domain name to be resolved and the first domain name resolution result corresponding to the domain name.
  • the domain name resolution server caches the domain name resolution result of the cached domain name server, for example, if the content server corresponding to the first domain name resolution result is faulty or the load is higher than the preset threshold, the domain name resolution result is sent to the cached domain name server. Delete the message.
  • the method for updating the domain name system cache provided by the sixth embodiment of the present invention may include:
  • the domain name resolution result deletion message sent by the authorized domain name server is received, and the domain name resolution result deletion message carries the domain name of the request resolution, and the domain name resolution result deletion message is used to delete the first domain name resolution result carried in the cache domain name server, A domain name resolution result corresponds to the domain name requested to be resolved.
  • the cached domain name server receives the domain name resolution result deletion message sent by the authorized domain name server, and the domain name resolution result deletion message carries the domain name of the request resolution, and the domain name resolution result deletion message is used to delete the first domain name resolution result carried in the cache domain name server.
  • the first domain name resolution result corresponds to the domain name requested to be resolved.
  • J2 Delete the first domain name resolution result corresponding to the domain name requested for resolution in the cache. Specifically, the cached domain name server deletes the information from the cache according to the domain name resolution result deletion information. The first domain name resolution result corresponding to the domain name requested to be resolved.
  • the cached domain name server deletes the first domain name resolution result corresponding to the domain name resolved by the request in the cache. After receiving the domain name resolution request, it is determined that the corresponding domain name resolution result does not exist in the cache, and the domain name resolution result is requested again from the authorized domain name server, that is, the domain name resolution request is sent to the authorized domain name server, and the updated domain name resolution is obtained from the authorized domain name server. As a result, the cached domain name server sends the updated domain name resolution result to the corresponding terminal.
  • the embodiment of the present invention can avoid sending an address of a content server that has a fault or a load exceeding a threshold to the terminal, and can prevent the terminal from requesting content from a content server that has a fault or a load exceeding a threshold.
  • the content server available to request content.
  • the step of deleting the first domain name resolution result corresponding to the domain name requested to be resolved in the cache name server by the cache domain name server may be performed by parsing the request
  • the lifetime of the first domain name resolution corresponding to the domain name is changed to 0, and the first lifetime is changed to 0.
  • the cached domain name server automatically deletes the first domain name resolution result.
  • the cache domain name server deletes the first domain name resolution result corresponding to the domain name that is requested to be resolved in the cache (step F2), which may be:
  • the cached domain name server searches for the first domain name resolution result corresponding to the domain name to be resolved in the cache according to the pre-stored correspondence, that is, the correspondence between the domain name to be resolved and the first domain name resolution result.
  • the cache domain name server pre-stores the correspondence between the domain name for request resolution and the first domain name resolution result. After receiving the domain name resolution response sent by the authorized domain name server, the cached domain name server pre-stores the correspondence between the first domain name resolution result in the domain name resolution response and the domain name resolved by the request.
  • the cached domain name server deletes the first domain name resolution result that is found.
  • FIG. 11 is an application scenario diagram of a method for updating a domain name system cache according to Embodiment 7 of the present invention.
  • a content provider (domain name www.abc.com) deploys two content servers Server1 and Server2 in a certain area, and the authorized domain name server is responsible for managing the status of Server1 and Server2, and Serverl and Server2 are working normally.
  • the status report message is sent to the authorized name server periodically.
  • Local DNS is the cached domain name server in the area, and there are some user terminals in the area, such as UE1 and UE2.
  • the SI and Local DNS receive the domain name resolution request sent by UE1.
  • the domain name resolution request sent by the UE1 carries the domain name of the request resolution www.abc.com and the address of the terminal.
  • Local DNS sends a domain name resolution request to the authorized domain name server.
  • the local DNS when the local DNS does not cache the domain name resolution result corresponding to the domain name www.abc.com, the local DNS sends a domain name resolution request to the authorized domain name server, where the domain name resolution request carries the domain name www.abc.com and the cached domain name.
  • the address of the cache domain name server may be the IP address of the cached domain name server.
  • the authorized domain name server performs domain name resolution according to the domain name resolution request, and obtains the first domain name parsing result.
  • the authorized domain name server may search for the first domain name resolution result corresponding to the domain name that is requested to be resolved, and the first domain name resolution result includes the address of the content server.
  • the first domain name resolution result includes the address ipl of the server1 and the lifetime of the first domain name resolution result.
  • the authorized domain name server caches the correspondence between the first domain name resolution result and the domain name requested to be resolved, the correspondence between the local DNS address and the domain name requested to be resolved, and sends a domain name resolution response to the Local DNS.
  • the authorized domain name server sends a domain name resolution response to the local DNS according to the received domain name resolution request, and the domain name resolution response carries the first domain name resolution result.
  • the authorized domain name server caches the first domain name resolution result and the domain name requested to be resolved by itself. Correspondence between the corresponding relationship, the domain name requested to be resolved, and the cached domain name server requesting domain name resolution.
  • the correspondence between the domain name server www.abc.com and the local DNS address and the correspondence between the domain name www.abc.com and the first domain name resolution result are authorized by the domain name server.
  • the authorized domain name server sends a domain name resolution response to the local DNS according to the domain name resolution request, where the first domain name resolution result is carried.
  • the local DNS receives the domain name resolution response, and caches the first domain name resolution result.
  • the local DNS sends a domain name resolution response to the UE1, which carries the first domain name resolution result.
  • the UE1 requests content from the content server Server 1 according to the first domain name resolution result.
  • the authorized domain name server detects that the server 1 is faulty and obtains the second domain name resolution result.
  • the authorized domain name server receives the fault report message sent by the server 1, or fails to receive the status report message of the server 1 in the preset time period, and then determines that the server 1 is faulty, and obtains the second domain name resolution result.
  • the authorized domain name server does not receive the fault report message sent by the server 2 or receives the status report message sent by the server 2 within the preset time, and then determines that the status of the server 2 is normal, and obtains the IP address of the server 2.
  • the second domain name resolution result includes the IP address of server 2 and the second lifetime.
  • the authorized domain name server updates the first domain name resolution result corresponding to www.abc.com in the cache to the second domain name resolution result.
  • the domain name server is authorized to search for the first domain name resolution result corresponding to www.abc.com in the cache, and the first domain name resolution result is updated to the second domain name resolution result, which specifically includes the first domain name resolution result.
  • the address of Server1 is updated to the address of Server 2, and the lifetime of the first domain name resolution result (ie, the first lifetime) is updated to the lifetime of the second domain name resolution result (ie, the second lifetime).
  • the authorized domain name server sends a domain name resolution update message to the local DNS, and the domain name resolution update message includes cache update indication information, a second domain name resolution result, and a domain name www.abc.com.
  • the domain name resolution update message may be a new message type in the embodiment of the present invention, where the message includes cache update indication information, a second domain name resolution result, and a domain name www.abc.com.
  • the second domain name resolution result includes the address of the server 2 and the lifetime of the address of the server 2 (second lifetime).
  • the local DNS receives the domain name resolution update message, and updates the first domain name resolution result corresponding to the server1 in the cache to the second domain name resolution result.
  • the local DNS updates the first domain name resolution result corresponding to the domain name www.abc.com in the cache to the second domain name resolution result.
  • the update process specifically includes updating the address of Server1 in the first domain name resolution result to the address of Server 2, and updating the lifetime of the first domain name resolution result (that is, the first lifetime) to the survival time of the second domain name resolution result. (ie the second survival time).
  • the local DNS can also authenticate the validity of the update message. For example, the IP address of the sender is authenticated, and is consistent with the source IP address of the last domain name resolution response.
  • the authorized domain name server can also carry the authentication code generated according to a certain key. The key and the encryption algorithm used can be returned to the Local DNS in advance in the domain name resolution response message.
  • the local DNS recalculates the authentication code according to the previously obtained password and encryption algorithm, and determines whether the received authentication code and the calculated authentication code are consistent. If they are consistent, the authentication is passed, and the domain name is updated according to the domain name.
  • the indication information in the message deletes the first domain name resolution result of the cache.
  • the embodiment of the present invention can enhance the security of the domain name system by increasing the legality authentication of the domain name resolution update message.
  • UE2 may request domain name resolution from Local DNS.
  • the Local DNS receives the domain name resolution request sent by the UE2.
  • the domain name resolution request sent by the UE2 carries the domain name www.abc.com requested for resolution.
  • the local DNS obtains the parsing result of the domain name in its own cache, and returns a domain name resolution response to the UE2, where the address of the server 2 is carried.
  • the local DNS searches for the domain name resolution result corresponding to the domain name www.abc.com in the cache.
  • the second domain name resolution result includes the address of the server 2.
  • the UE2 requests content from the content server Server 2 according to the second domain name parsing result.
  • the working state of the server is normal, and the UE2 can request the required content from the server 2.
  • the local DNS and the authorized domain name server delete the domain name resolution result in the cache after the TTL expires. After the local DNS deletes the domain name resolution result, if the domain name resolution request is received again, the domain name resolution result is not generated in the cache, and the domain name resolution request is sent to the authorized domain name server, and the authorized domain name server performs domain name resolution according to the domain name resolution request. , returns the result of domain name resolution, and caches the results of domain name resolution. After receiving the domain name resolution result, the local DNS caches the domain name resolution result locally, and returns the domain name resolution result to the requested user terminal.
  • the method for updating the domain name system cache provided by the seventh embodiment of the present invention can update the result of the domain name resolution cached on the Local DNS on the basis of the original TTL mechanism, so as to avoid the terminal requesting the content service failure or the service delay.
  • FIG. 12 is a schematic structural diagram of an authorized domain name server according to Embodiment 8 of the present invention.
  • the authorized domain name server provided in Embodiment 8 of the present invention includes:
  • the parsing result obtaining unit 110 is configured to obtain a second domain name parsing result of the domain name requested to be parsed when the content server corresponding to the first domain name parsing result in the self cache is faulty or the load exceeds a threshold, and the request parsing is performed.
  • the domain name is corresponding to the first domain name resolution result, and the working state of the content server corresponding to the second domain name resolution result is normal;
  • the update message sending unit 120 is configured to send a domain name resolution update message to the cached domain name server corresponding to the domain name that is requested to be parsed, where the domain name resolution update message carries the domain name requested for resolution, and the domain name resolution update message is used to indicate that the cached domain name server is to be cached.
  • the first domain name resolution result is updated to the second domain name resolution result.
  • the authorization domain name server provided in Embodiment 8 of the present invention can be used in the foregoing Embodiment 1 of the method for updating the domain name system cache. For details, refer to the description of Embodiment 1 above.
  • the authorized domain name server provided by the embodiment of the present invention sends a domain name resolution update message to the cached domain name server, so that the cached domain name server deletes the first domain name resolution result of the cached domain name as the second domain name resolution result, and avoids returning the wrong first domain name resolution to the terminal. result.
  • the cached domain name server After receiving the domain name resolution request of the terminal, the cached domain name server returns a second domain name resolution result to the terminal, and The content server corresponding to the second domain name resolution result is in a normal working state, and the terminal may request content from the content server with a normal working state.
  • the first update unit 130 is configured to update the first domain name resolution result in the cache to the second domain name resolution result after the parsing result obtaining unit 110 obtains the second domain name resolution result of the domain name requested to be parsed.
  • FIG. 13 is a schematic structural diagram of an authorized domain name server according to Embodiment 9 of the present invention.
  • the authorized domain name server provided in Embodiment 9 of the present invention includes:
  • the first receiving unit 210 is configured to receive a domain name resolution request sent by the cached domain name server, where the domain name resolution request includes a domain name that is requested to be parsed;
  • the domain name resolution unit 220 is configured to parse the domain name that is requested to be parsed according to the domain name resolution request, and obtain the first domain name resolution result;
  • the cache unit 230 is configured to cache a correspondence between the first domain name resolution result and the domain name requested to be resolved, and a correspondence between the domain name requested to be resolved and the cache domain name server.
  • the parsing response sending unit 240 is configured to The cached domain name server sends a domain name resolution response, and the domain name resolution response includes the first domain name resolution result and the domain name of the request resolution.
  • the analysis result obtaining unit 250 is configured to detect the content corresponding to the first domain name resolution result in the cache. If the server is faulty or the load exceeds the threshold, the second domain name resolution result of the domain name to be resolved is obtained, and the domain name to be resolved is corresponding to the first domain name resolution result, and the content server corresponding to the second domain name resolution result is working normally. ;
  • the update message sending unit 260 is configured to send a domain name resolution update message to the cached domain name server corresponding to the domain name that is requested to be parsed, where the domain name resolution update message carries the domain name of the request resolution, and the domain name resolution update message is used to indicate that the cached domain name server will The cached first domain name resolution result is updated to the second domain name resolution result.
  • the authorized domain name server provided in the ninth embodiment of the present invention can be used in the foregoing method 2 of the method for updating the domain name system cache. For details, refer to the description of the second embodiment.
  • the authorized domain name server provided in Embodiment 9 of the present invention further includes:
  • the first update unit 270 is configured to update the first domain name resolution result in the self cache to the second domain name resolution result after the parsing result obtaining unit 250 obtains the second domain name resolution result of the domain name requested to be parsed.
  • FIG. 14 is a schematic structural diagram of an update message sending unit in an authorized domain name server according to Embodiment 9 of the present invention.
  • the update message sending unit 260 in the authorized domain name server provided in the ninth embodiment of the present invention may include:
  • the first searching module 261 is configured to search, in the cache, the address of the cached domain name server corresponding to the domain name requested to be parsed according to the pre-saved correspondence relationship;
  • the update message sending module 262 is configured to send a domain name resolution update message to the cached domain name server, where the domain name resolution update message carries the domain name requested for resolution, and the domain name resolution update message is used to indicate that the cached domain name server will cache the first The domain name resolution result is updated to the second domain name resolution result.
  • FIG. 15 is a schematic structural diagram of an authorized domain name server according to Embodiment 10 of the present invention.
  • the authorized domain name server provided in Embodiment 10 of the present invention may include:
  • the deletion message generating unit 310 is configured to generate a domain name resolution result deletion message when the content server corresponding to the first domain name resolution result in the self-cache is faulty or the load exceeds a threshold, and the domain name resolution result deletion message is used for deleting The first domain name resolution result carried in the cached domain name server, where the domain name resolution result deletion message carries the domain name requested for resolution, and the domain name to be resolved corresponds to the first domain name resolution result;
  • the deletion message sending unit 320 is configured to send the domain name resolution result deletion message to the cached domain name server, so that the cached domain name server deletes the first domain name resolution result in the cache, and the cached domain name server corresponds to the domain name of the request resolution. .
  • the authorization domain name server provided in the tenth embodiment of the present invention can be used in the foregoing third embodiment of the method for updating the domain name system cache. For details, refer to the description of the third embodiment.
  • the authorized domain name server according to the embodiment of the present invention sends a domain name resolution result deletion message to the cached domain name server, so that the cached domain name server deletes the cached first domain name resolution result, and avoids The terminal returns the wrong first domain name resolution result.
  • the cached domain name server After receiving the domain name resolution request of the terminal, the cached domain name server re-requests the correct domain name resolution result to the authorized domain name server, and sends the correct domain name resolution result to the cached domain name server, so that the terminal can request the content from the correct content server.
  • FIG. 16 is a schematic structural diagram of a deletion message sending unit in an authorized domain name server according to Embodiment 10 of the present invention.
  • the deletion message sending unit 320 in the authorized domain name server provided by the tenth embodiment of the present invention may specifically include:
  • the second searching module 321 is configured to search, in the cache, the address of the cached domain name server corresponding to the domain name requested to be parsed according to the pre-saved correspondence relationship;
  • the delete message sending module 322 is configured to send a domain name resolution result deletion message to the cached domain name server, so that the cached domain name server deletes the first domain name resolution result in the cache, and the cached domain name server corresponds to the domain name requested to be resolved.
  • FIG. 17 is a schematic diagram showing the structure of an authorized domain name server according to Embodiment 11 of the present invention.
  • the authorized domain name server provided in Embodiment 11 of the present invention may include:
  • the first receiving unit 410 is configured to receive a domain name resolution request sent by the cached domain name server, where the domain name resolution request includes a domain name that is requested to be parsed;
  • the domain name resolution unit 420 is configured to parse the domain name that is requested to be parsed according to the domain name resolution request, and obtain the first domain name resolution result;
  • the cache unit 430 is configured to cache a correspondence between the first domain name resolution result and the domain name requested to be parsed, and a correspondence between the domain name requested to be resolved and the cache domain name server;
  • the analytic response sending unit 440 is configured to send a domain name resolution response to the cached domain name server, where the domain name resolution response includes the first domain name resolution result and the domain name of the request resolution.
  • the deletion message generating unit 450 is configured to generate a domain name resolution result deletion message when the content server corresponding to the first domain name resolution result in the self-cache is faulty or the load exceeds a threshold, and the domain name resolution result deletion message is used for deleting The first domain name resolution result carried in the cached domain name server, where the domain name resolution result deletion message carries the domain name requested for resolution, and the domain name to be resolved corresponds to the first domain name resolution result;
  • the deletion message sending unit 460 is configured to send the domain name resolution result deletion message to the cached domain name server, so that the cached domain name server deletes the first domain name resolution result in the cache, and the cached domain name server corresponds to the domain name requested to be resolved.
  • the authorization domain name server provided in the eleventh embodiment of the present invention can be used in the foregoing method 4 of the method for updating the domain name system cache. For details, refer to the description of the fourth embodiment.
  • FIG. 18 is a schematic structural diagram of a cached domain name server according to Embodiment 12 of the present invention.
  • the cached domain name server provided in Embodiment 12 of the present invention includes:
  • the update message receiving unit 510 is configured to receive a domain name resolution update message sent by the authorized domain name server, where the domain name resolution update message is used to indicate that the cached domain name server updates the cached first domain name resolution result to the second domain name resolution result, and the domain name is Parsing the domain name carrying the request resolution in the update message;
  • the second update unit 520 is configured to update the first domain name resolution result in the self cache to the second domain name resolution result, where the first domain name resolution result corresponds to the domain name requested to be parsed.
  • the cached domain name server provided in Embodiment 12 of the present invention can be used in the foregoing Embodiment 5 of the method for updating the domain name system cache.
  • the cached domain name server provided by the embodiment of the present invention updates the first domain name resolution result corresponding to the domain name to be resolved in the cache to the second domain name resolution result, and may further analyze the updated domain name after receiving the domain name resolution request. As a result, the second domain name resolution result is sent to the terminal.
  • the embodiment of the present invention can prevent the terminal from requesting content from the failed content server by deleting the domain name resolution result in the self cache, and further causes the terminal to request content from the currently available content server.
  • the cached domain name server provided in Embodiment 12 of the present invention may further include:
  • the timeout deleting unit 530 is configured to delete the second domain name resolution result in the self cache after the second timeout period expires.
  • FIG. 19 is a schematic structural diagram of a second update unit in a cached domain name server according to Embodiment 12 of the present invention.
  • the second update unit 520 in the cached domain name server provided in the twelfth embodiment of the present invention may include:
  • the third search module 521 is configured to search, in the cache, the first domain name resolution result corresponding to the domain name that is requested to be parsed according to the pre-stored correspondence relationship, where the first domain name resolution result corresponds to the domain name resolved by the request;
  • the cache update module 522 is configured to update the first domain name resolution result that is found to the second domain name resolution result.
  • FIG. 20 is a schematic structural diagram of a cached domain name server according to Embodiment 13 of the present invention.
  • the cached domain name server provided in Embodiment 13 of the present invention includes:
  • the deletion message receiving unit 610 is configured to receive a domain name resolution result deletion message sent by the authorized domain name server, where the domain name resolution result deletion message carries the domain name requested to be resolved, and the domain name resolution result deletion message is used to delete the first carried in the cache domain name server.
  • the domain name resolution result the first domain name resolution result corresponding to the domain name of the request resolution;
  • the deletion execution unit 620 is configured to delete the first domain name resolution result corresponding to the domain name requested for resolution in the cache.
  • the cached domain name server provided in the thirteenth embodiment of the present invention can be used in the foregoing sixth embodiment of the method for updating the domain name system cache. For details, refer to the description of the sixth embodiment.
  • the cached domain name server provided by the embodiment of the present invention deletes the first domain name resolution result corresponding to the domain name resolved by the request in the cache, and then determines that the corresponding domain name resolution result does not exist in the cache after receiving the domain name resolution request.
  • the domain name resolution request is sent to the authorized domain name server, and the domain name resolution request is sent to the authorized domain name server, and the updated domain name resolution result is obtained from the authorized domain name server, and the cached domain name server sends the updated domain name resolution result to the corresponding terminal.
  • FIG. 21 is a schematic structural diagram of a deletion execution unit in a cached domain name server according to Embodiment 13 of the present invention.
  • the deletion execution unit 620 in the cached domain name server provided in the thirteenth embodiment of the present invention may include:
  • the fourth search module 621 is configured to search, in the cache, the first domain name resolution result corresponding to the domain name requested to be parsed according to the pre-stored correspondence relationship;
  • the cache deletion module 622 is configured to delete the first domain name resolution result that is found.
  • the storage medium can be a disk, a CD, or a read-only memory (Read-Only).
  • ROM Read Only Memory
  • RAM Random Access Memory

Abstract

Disclosed is a method for updating domain name system cache, the method comprises: obtaining a second parsing result of a domain name requesting parsing when detecting the content server corresponding to a first domain name parsing result in the cache has encountered a fault or the load of the server has exceeded a threshold, the domain name requesting parsing corresponds to the first parsing result of the domain name, the content server corresponding to the second parsing result of the domain name operates normally; and sending a domain name parsing update message to the caching domain name server corresponding to the domain name requesting parsing, wherein the domain name parsing update message carries the domain name requesting parsing, and the domain name parsing update message is used for instructing the caching domain name server to update the cached first parsing result of the domain name to the second parsing result of the domain name. The embodiments of the present invention allows the caching domain name server to return the correct domain name parsing result to a terminal, and the terminal requests contents from a content server operating normally according to the domain name parsing result.

Description

域名系统緩存的方法、 授权域名服务器、 緩存域名服务器 本申请要求于 2010 年 12 月 29 日提交中国专利局、 申请号为 201010612278.6, 发明名称为 "域名系统緩存的方法、 授权域名服务器、 緩 存域名服务器" 的中国专利申请的优先权, 其全部内容通过引用结合在本 申请中。 技术领域  The domain name system cache method, the authorized domain name server, and the cached domain name server. The application is submitted to the Chinese Patent Office on December 29, 2010, and the application number is 201010612278.6. The invention name is "domain name system cache method, authorized domain name server, cache domain name server". The priority of the Chinese Patent Application, the entire contents of which is incorporated herein by reference. Technical field
本发明涉及信息技术领域, 具体涉及一种更新域名系统緩存的方法、 授权域名服务器和緩存域名服务器。  The present invention relates to the field of information technology, and in particular, to a method for updating a domain name system cache, an authorized domain name server, and a cached domain name server.
背景技术 Background technique
域名系统(Domain Name System, DNS )是一个分布式的主机信息数 据库, 采用客户机 /服务器模式, 它主要包括緩存域名服务器和授权域名服 务器。 其中, 授权域名服务器保存有该网络中域名和互联网协议(Internet Protocol, IP )地址之间的对应关系。 授权域名服务器可以将域名解析为对 应的 IP地址。  The Domain Name System (DNS) is a distributed host information database that uses a client/server model, which mainly includes a cached domain name server and an authorized domain name server. The authorized domain name server stores the correspondence between the domain name and the Internet Protocol (IP) address in the network. The authorized domain name server can resolve the domain name to the corresponding IP address.
在现有的域名解析过程中, 终端向緩存域名服务器发送域名解析请求, 该域名解析请求中携带终端请求解析的域名。 緩存域名服务器向授权域名 服务器发送域名解析请求。 授权域名服务器根据域名解析请求执行域名解 析, 获得域名解析结果, 并向緩存域名服务器发送域名解析响应, 该域名 解析响应中包括域名解析结果, 域名解析结果中包括内容服务器的 IP地址 和解析结果的生存时间(Time To Live, TTL )。 緩存域名服务器向终端发送 域名解析结果。  In the existing domain name resolution process, the terminal sends a domain name resolution request to the cached domain name server, where the domain name resolution request carries the domain name that the terminal requests to resolve. The cached domain name server sends a domain name resolution request to the authorized domain name server. The domain name resolution server performs domain name resolution according to the domain name resolution request, obtains the domain name resolution result, and sends a domain name resolution response to the cache domain name server. The domain name resolution response includes the domain name resolution result, and the domain name resolution result includes the IP address of the content server and the analysis result. Time To Live (TTL). The cached domain name server sends the domain name resolution result to the terminal.
其中, 緩存域名服务器在接收到域名解析响应后, 根据生存时间来緩 存域名解析结果, 在接收到终端发送的针对同样的域名进行解析的域名解 析请求后, 直接将緩存的域名解析结果向终端发送。 在 TTL超时后, 緩存 域名服务器从緩存中删除该域名解析结果。  After receiving the domain name resolution response, the cached domain name server caches the domain name resolution result according to the time-to-live. After receiving the domain name resolution request for parsing the same domain name, the cached domain name server directly sends the cached domain name resolution result to the terminal. . After the TTL expires, the cached domain name server deletes the domain name resolution result from the cache.
在 TTL超时之前, 如果所述域名解析结果中域名对应的内容服务器故 障, 緩存域名服务器仍会基于域名解析请求返回故障的内容服务器的地址, 导致终端根据该域名解析结果向故障的内容服务器请求内容时, 内容请求 失败。 发明内容 If the content server corresponding to the domain name fails in the domain name resolution result, the cached domain name server still returns the address of the failed content server based on the domain name resolution request, so that the terminal requests the content from the faulty content server according to the domain name resolution result. When the content request fails. Summary of the invention
本发明实施例提供一种更新域名系统緩存的方法以及授权域名服务 器、 緩存域名服务器, 以在内容服务器故障后, 及时删除自身緩存域名服 务器上的域名解析结果, 避免终端向故障的内容服务器发送请求。  The embodiment of the present invention provides a method for updating a domain name system cache, and an authorized domain name server and a cached domain name server, so as to delete the domain name resolution result on the cached domain name server in time after the content server is faulty, to prevent the terminal from sending a request to the faulty content server. .
为解决上述技术问题, 本发明实施例是通过以下技术方案来实现的: 本发明实施例提供的更新域名系统緩存的方法, 包括:  In order to solve the above technical problem, the embodiment of the present invention is implemented by the following technical solutions: The method for updating the domain name system cache provided by the embodiment of the present invention includes:
在检测到自身緩存中的第一域名解析结果对应的内容服务器发生故障 或负荷超过门限值时, 获取请求解析的域名的第二域名解析结果, 所述请 求解析的域名和所述第一域名解析结果对应, 所述第二域名解析结果对应 的内容服务器的工作状态正常;  If the content server corresponding to the first domain name resolution result in the cache is faulty or the load exceeds the threshold, the second domain name resolution result of the domain name that is requested to be resolved is obtained, and the domain name and the first domain name that are requested to be resolved are obtained. Corresponding to the analysis result, the working state of the content server corresponding to the second domain name resolution result is normal;
向所述请求解析的域名对应的緩存域名服务器发送域名解析更新消 息, 所述域名解析更新消息中携带所述请求解析的域名, 所述域名解析更 新消息用于指示所述緩存域名服务器将緩存的第一域名解析结果更新为所 述第二域名解析结果。  Sending a domain name resolution update message to the cached domain name server corresponding to the domain name that is requested to be parsed, where the domain name resolution update message carries the domain name of the request resolution, and the domain name resolution update message is used to indicate that the cached domain name server is to be cached. The first domain name resolution result is updated to the second domain name resolution result.
本发明实施例还提供一种更新域名系统緩存的方法, 包括:  The embodiment of the invention further provides a method for updating a domain name system cache, including:
在检测到自身緩存中的第一域名解析结果对应的内容服务器发生故障 或负荷超过门限值时, 生成域名解析结果删除消息, 所述域名解析结果删 除消息用于删除緩存域名服务器中的第一域名解析结果, 所述域名解析结 果删除消息中携带请求解析的域名, 所述请求解析的域名和所述第一域名 解析结果对应;  When the content server corresponding to the first domain name resolution result in the cache is faulty or the load exceeds the threshold, the domain name resolution result deletion message is generated, and the domain name resolution result deletion message is used to delete the first in the cache domain name server. The domain name resolution result, the domain name resolution result deletion message carries the domain name requested for resolution, and the domain name of the request resolution corresponds to the first domain name resolution result;
向所述緩存域名服务器发送所述域名解析结果删除消息, 以使所述緩 存域名服务器删除自身緩存中的第一域名解析结果 , 所述緩存域名服务器 和所述请求解析的域名对应。  Sending the domain name resolution result deletion message to the cached domain name server, so that the cached domain name server deletes the first domain name resolution result in the cache, and the cached domain name server corresponds to the domain name of the request resolution.
本发明实施例还提供一种更新域名系统緩存的方法, 包括:  The embodiment of the invention further provides a method for updating a domain name system cache, including:
接收授权域名服务器发送的域名解析更新消息, 所述域名解析更新消 息用于指示緩存域名服务器将緩存的第一域名解析结果更新为所述第二域 名解析结果, 所述域名解析更新消息中携带请求解析的域名;  Receiving a domain name resolution update message sent by the authorized domain name server, where the domain name resolution update message is used to indicate that the cached domain name server updates the cached first domain name resolution result to the second domain name resolution result, where the domain name resolution update message carries the request Resolved domain name;
将自身緩存中的第一域名解析结果更新为所述第二域名解析结果, 所 述第一域名解析结果和所述请求解析的域名对应。  And updating the first domain name resolution result in the cache to the second domain name resolution result, where the first domain name resolution result corresponds to the domain name of the request resolution.
本发明实施例还提供一种更新域名系统緩存的方法, 包括: 接收授权域名服务器发送的域名解析结果删除消息, 所述域名解析结 果删除消息中携带请求解析的域名, 所述域名解析结果删除消息用于删除 緩存域名服务器中携带的第一域名解析结果, 所述第一域名解析结果和所 述请求解析的域名对应; The embodiment of the invention further provides a method for updating a domain name system cache, including: And receiving the domain name resolution result deletion message sent by the authorized domain name server, where the domain name resolution result deletion message carries the domain name of the request resolution, and the domain name resolution result deletion message is used to delete the first domain name resolution result carried in the cache domain name server, The first domain name resolution result corresponds to the domain name of the request resolution;
删除自身緩存中与所述请求解析的域名对应的第一域名解析结果。 本发明实施例还提供一种授权域名服务器, 包括:  The first domain name resolution result corresponding to the domain name that is requested to be resolved in the cache is deleted. An embodiment of the present invention further provides an authorized domain name server, including:
解析结果获取单元, 用于在检测到自身緩存中的第一域名解析结果对 应的内容服务器发生故障或负荷超过门限值时, 获取请求解析的域名的第 二域名解析结果, 所述请求解析的域名和所述第一域名解析结果对应, 所 述第二域名解析结果对应的内容服务器的工作状态正常;  The parsing result obtaining unit is configured to obtain a second domain name parsing result of the domain name requested to be parsed when the content server corresponding to the first domain name parsing result in the self cache is faulty or the load exceeds a threshold, and the request is parsed The domain name is corresponding to the first domain name resolution result, and the working state of the content server corresponding to the second domain name resolution result is normal;
更新消息发送单元, 用于向所述请求解析的域名对应的緩存域名服务 器发送域名解析更新消息 , 所述域名解析更新消息中携带所述请求解析的 域名 , 所述域名解析更新消息用于指示所述緩存域名服务器将緩存的第一 域名解析结果更新为所述第二域名解析结果。  An update message sending unit, configured to send a domain name resolution update message to the cached domain name server corresponding to the domain name that is requested to be parsed, where the domain name resolution update message carries the domain name that is requested to be parsed, and the domain name resolution update message is used to indicate The cached domain name server updates the cached first domain name resolution result to the second domain name resolution result.
本发明实施例还提供一种授权域名服务器, 包括  An embodiment of the present invention further provides an authorized domain name server, including
删除消息生成单元, 用于在检测到自身緩存中的第一域名解析结果对 应的内容服务器发生故障或负荷超过门限值时, 生成域名解析结果删除消 息 , 所述域名解析结果删除消息用于删除緩存域名服务器中携带的第一域 名解析结果, 所述域名解析结果删除消息中携带请求解析的域名, 请求解 析的域名和所述第一域名解析结果对应;  And a message generating unit, configured to: when detecting that the content server corresponding to the first domain name resolution result in the cache is faulty or the load exceeds a threshold, generating a domain name resolution result deletion message, where the domain name resolution result deletion message is used for deleting The first domain name resolution result carried in the cached domain name server, where the domain name resolution result deletion message carries the domain name requested for resolution, and the domain name to be resolved corresponds to the first domain name resolution result;
删除消息发送单元, 用于向所述緩存域名服务器发送所述域名解析结 果删除消息, 以使所述緩存域名服务器删除自身緩存中的第一域名解析结 果, 所述緩存域名服务器和所述请求解析的域名对应。  a message sending unit, configured to send the domain name resolution result deletion message to the cached domain name server, so that the cached domain name server deletes a first domain name resolution result in the cache, the cached domain name server, and the request resolution The domain name corresponds.
本发明实施例还提供一种緩存域名服务器, 包括:  The embodiment of the invention further provides a cached domain name server, including:
更新消息接收单元, 用于接收授权域名服务器发送的域名解析更新消 息, 所述域名解析更新消息用于指示緩存域名服务器将緩存的第一域名解 析结果更新为所述第二域名解析结果 , 所述域名解析更新消息中携带请求 解析的域名;  An update message receiving unit, configured to receive a domain name resolution update message sent by the authorized domain name server, where the domain name resolution update message is used to indicate that the cached domain name server updates the cached first domain name resolution result to the second domain name resolution result, The domain name resolution update message carries the domain name requested for resolution;
第二更新单元, 用于将自身緩存中的第一域名解析结果更新为所述第 二域名解析结果, 所述第一域名解析结果和所述请求解析的域名对应。  The second update unit is configured to update the first domain name resolution result in the cache to the second domain name resolution result, where the first domain name resolution result corresponds to the domain name requested to be resolved.
本发明实施例还提供一种緩存域名服务器, 包括: 删除消息接收单元, 用于接收授权域名服务器发送的域名解析结果删 除消息, 所述域名解析结果删除消息中携带请求解析的域名, 所述域名解 析结果删除消息用于删除緩存域名服务器中携带的第一域名解析结果 , 所 述第一域名解析结果和所述请求解析的域名对应; The embodiment of the invention further provides a cached domain name server, including: The deletion message receiving unit is configured to receive a domain name resolution result deletion message sent by the authorized domain name server, where the domain name resolution result deletion message carries the domain name requested to be resolved, and the domain name resolution result deletion message is used to delete the number carried in the cache domain name server. a domain name resolution result, where the first domain name resolution result corresponds to the domain name of the request resolution;
删除执行单元, 用于删除自身緩存中与所述请求解析的域名对应的第 一域名解析结果。  The deletion execution unit is configured to delete the first domain name resolution result corresponding to the domain name of the request resolution in the cache.
在本发明实施例提供的更新域名系统緩存的方法可以应用在第一域名 解析结果对应的内容服务器发生故障或负荷超过门限值的场景中, 本发明 实施例通过向緩存域名服务器发送域名解析更新消息, 使得緩存域名服务 器删除自身緩存的第一域名解析结果为第二域名解析结果或删除緩存的第 一域名解析结果, 避免向终端返回错误的第一域名解析结果。 本发明实施 例可以使得緩存域名服务器在随后接收到终端的域名解析请求后, 向终端 返回第二域名解析结果, 而第二域名解析结果对应的内容服务器工作状态 正常, 终端可以向工作状态正常的内容服务器请求内容。  The method for updating the domain name system cache provided in the embodiment of the present invention may be applied to a scenario in which the content server corresponding to the first domain name resolution result is faulty or the load exceeds a threshold, and the embodiment of the present invention sends the domain name resolution update to the cached domain name server. The message causes the cached domain name server to delete the first domain name resolution result of the cache to be the second domain name resolution result or delete the cached first domain name resolution result, so as to avoid returning the wrong first domain name resolution result to the terminal. The embodiment of the present invention may enable the cached domain name server to return the second domain name resolution result to the terminal after receiving the domain name resolution request of the terminal, and the content server corresponding to the second domain name resolution result is working normally, and the terminal may be in a normal working state. The content server requests content.
附图说明 DRAWINGS
为了更清楚地说明本发明实施例中的技术方案, 下面将对现有技术和 实施例中所需要使用的附图作简单地介绍, 显而易见地, 下面描述中的附 图仅仅是本发明的一些实施例, 对于本领域普通技术人员来讲, 在不付出 创造性劳动的前提下, 还可以根据这些附图获得其他的附图。  In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the prior art and the embodiments will be briefly described below. Obviously, the drawings in the following description are only some of the present invention. For the embodiments, those skilled in the art can obtain other drawings according to the drawings without any creative work.
图 1是本发明实施例一提供的更新域名系统緩存的方法的流程图; 图 2是本发明实施例一中授权域名服务器向请求解析的域名对应的緩 存域名服务器发送域名解析更新消息的方法流程图;  1 is a flowchart of a method for updating a domain name system cache according to a first embodiment of the present invention; FIG. 2 is a flowchart of a method for a domain name server to send a domain name resolution update message to a cached domain name server corresponding to a domain name requested to be resolved by the domain name server according to the first embodiment of the present invention; Figure
图 3是本发明实施例二提供的更新域名系统緩存的方法的流程图; 图 4是本发明实施例三提供的更新域名系统緩存的方法的流程图; 图 5是本发明实施例三中授权域名服务器在执行向緩存域名服务器发 送域名解析结果删除消息的方法流程图;  3 is a flowchart of a method for updating a cache of a domain name system according to Embodiment 2 of the present invention; FIG. 4 is a flowchart of a method for updating a cache of a domain name system according to Embodiment 3 of the present invention; FIG. 5 is an authorization of Embodiment 3 of the present invention; A flowchart of a method for the domain name server to perform a domain name resolution result deletion message to the cache name server;
图 6是本发明实施例四提供的更新域名系统緩存的方法流程图; 图 7是本发明实施例五提供的更新域名系统緩存的方法的流程图; 图 8是本发明实施例五中緩存域名服务器将自身緩存中的第一域名解 析结果更新为第二域名解析结果的流程图; 图 9是本发明实施例六提供的更新域名系统緩存的方法的流程图; 图 10是本发明实施例六中緩存域名服务器删除自身緩存中与请求解析 的域名对应的第一域名解析结果的方法流程图; 6 is a flowchart of a method for updating a domain name system cache according to Embodiment 4 of the present invention; FIG. 7 is a flowchart of a method for updating a domain name system cache according to Embodiment 5 of the present invention; FIG. 8 is a cache domain name according to Embodiment 5 of the present invention; The server updates the first domain name resolution result in the cache to a flowchart of the second domain name resolution result; 9 is a flowchart of a method for updating a domain name system cache provided by Embodiment 6 of the present invention; FIG. 10 is a flowchart of a first domain name resolution result corresponding to a domain name requested to be resolved by a cached domain name server in a cache of a sixth embodiment of the present invention; flow chart;
图 11 是本发明实施例七提供的更新域名系统緩存的方法的应用场景 图;  11 is an application scenario diagram of a method for updating a domain name system cache provided by Embodiment 7 of the present invention;
图 12是本发明实施例八提供的授权域名服务器的结构示意图; 图 13是本发明实施例九提供的授权域名服务器的结构示意图; 图 14是本发明实施例九提供的授权域名服务器中更新消息发送单元的 结构示意图;  FIG. 12 is a schematic structural diagram of an authorized domain name server according to Embodiment 8 of the present invention; FIG. 13 is a schematic structural diagram of an authorized domain name server according to Embodiment 9 of the present invention; FIG. 14 is an update message in an authorized domain name server according to Embodiment 9 of the present invention; Schematic diagram of the sending unit;
图 15是本发明实施例十提供的授权域名服务器的结构示意图; 图 16是本发明实施例十提供的授权域名服务器中删除消息发送单元的 结构示意图;  15 is a schematic structural diagram of an authorized domain name server according to Embodiment 10 of the present invention; FIG. 16 is a schematic structural diagram of a deletion message sending unit in an authorized domain name server according to Embodiment 10 of the present invention;
图 17是本发明实施例十一提供的授权域名服务器的结构示意图; 图 18是本发明实施例十二提供的緩存域名服务器的结构示意图; 图 19是本发明实施例十二提供的緩存域名服务器中第二更新单元的结 构示意图;  FIG. 17 is a schematic structural diagram of an authorized domain name server according to Embodiment 11 of the present invention; FIG. 18 is a schematic structural diagram of a cached domain name server according to Embodiment 12 of the present invention; FIG. 19 is a cached domain name server according to Embodiment 12 of the present invention; A schematic diagram of the structure of the second update unit;
图 20是本发明实施例十三提供的緩存域名服务器的结构示意图; 图 21是本发明实施例十三提供的緩存域名服务器中删除执行单元的结 构示意图。  FIG. 20 is a schematic structural diagram of a cached domain name server according to Embodiment 13 of the present invention; FIG. 21 is a schematic diagram of a structure of a delete execution unit in a cached domain name server according to Embodiment 13 of the present invention.
具体实施方式  detailed description
下面将结合本发明实施例中的附图, 对本发明实施例中的技术方案进 行清楚、 完整地描述, 显然, 所描述的实施例仅仅是本发明一部分实施例, 而不是全部的实施例。 基于本发明中的实施例, 本领域普通技术人员在没 有做出创造性劳动前提下所获得的所有其他实施例, 都属于本发明保护的 范围。  The technical solutions in the embodiments of the present invention are clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present invention. It is obvious that the described embodiments are only a part of the embodiments of the present invention, but not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention.
本发明提供了一种更新域名系统緩存的方法、 授权域名服务器和緩存 域名服务器。 为了更好的理解本发明的技术方案, 下面结合附图对本发明 提供的实施例进行详细地描述。  The present invention provides a method for updating a domain name system cache, an authorized domain name server, and a cached domain name server. In order to better understand the technical solutions of the present invention, the embodiments provided by the present invention will be described in detail below with reference to the accompanying drawings.
参见图 1 ,图 1是本发明实施例一提供的更新域名系统緩存的方法流程 本发明实施例一提供的更新域名系统緩存的方法包括: Referring to FIG. 1, FIG. 1 is a flowchart of a method for updating a domain name system cache according to Embodiment 1 of the present invention. The method for updating the domain name system cache provided by the first embodiment of the present invention includes:
Al、 在检测到自身緩存中的第一域名解析结果对应的内容服务器发生 故障或负荷超过门限值时, 获取请求解析的域名的第二域名解析结果, 该 请求解析的域名和第一域名解析结果对应, 第二域名解析结果对应的内容 服务器的工作状态正常。  If the content server corresponding to the first domain name resolution result in the cache is faulty or the load exceeds the threshold, the second domain name resolution result of the domain name that is requested to be resolved is obtained, and the domain name and the first domain name resolution of the request are resolved. Correspondingly, the working state of the content server corresponding to the second domain name resolution result is normal.
具体的, 授权域名服务器中緩存有第一域名解析结果, 授权域名服务 器在检测到第一域名解析结果对应的内容服务器发生故障、 或负荷超过门 限值时, 获取请求解析的域名的第二域名解析结果。  Specifically, the first domain name resolution result is cached in the authorized domain name server, and the authorized domain name server obtains the second domain name of the domain name that is requested to be resolved when detecting that the content server corresponding to the first domain name resolution result is faulty or the load exceeds the threshold. Analyze the results.
其中, 请求解析的域名和第一域名解析结果对应, 第二域名解析结果 对应的内容服务器的工作状态正常。 其中, 内容服务器的工作状态正常可 以理解为内容服务器当前没有发生故障, 可以正常的为用户终端提供内容 服务。 另外, 内容服务器的负荷的门限可以根据实际情况灵活确定。  The domain name to be parsed corresponds to the first domain name resolution result, and the content server corresponding to the second domain name resolution result is normal. The normal working status of the content server can be understood as that the content server does not currently fail, and the content service can be normally provided for the user terminal. In addition, the threshold of the load of the content server can be flexibly determined according to actual conditions.
A2、向请求解析的域名对应的緩存域名服务器发送域名解析更新消息, 域名解析更新消息中携带上述请求解析的域名, 该域名解析更新消息用于 指示緩存域名服务器将緩存的第一域名解析结果更新为第二域名解析结 果。  A2. The domain name resolution update message is sent to the cached domain name server corresponding to the domain name that is requested to be parsed. The domain name resolution update message carries the domain name of the request resolution, and the domain name resolution update message is used to indicate that the cached domain name server updates the cached first domain name resolution result. Parse the result for the second domain name.
具体的, 授权域名服务器在获取第二域名解析结果之后, 向请求解析 的域名对应的緩存域名服务器发送域名解析更新消息。  Specifically, after obtaining the second domain name resolution result, the authorized domain name server sends a domain name resolution update message to the cached domain name server corresponding to the domain name that is requested to be resolved.
其中, 授权域名服务器可以根据请求解析的域名与緩存域名服务器的 对应关系获取对应的緩存域名服务器的地址。 请求解析的域名对应的緩存 域名服务器均针对该域名向授权域名服务器发送过了域名解析请求。  The authorized domain name server can obtain the address of the corresponding cached domain name server according to the correspondence between the domain name that is requested to be resolved and the cached domain name server. The cache corresponding to the domain name requested for resolution The domain name server has sent a domain name resolution request to the authorized domain name server for the domain name.
需要说明的是, 请求解析的域名可以对应多个緩存域名服务器, 即对 应同一请求解析的域名的多个緩存域名服务器均可以接收到域名解析更新 消息。  It should be noted that the domain name requested to be parsed may correspond to multiple cached domain name servers, that is, multiple cached domain name servers corresponding to the domain name resolved by the same request may receive the domain name resolution update message.
緩存域名服务器将自身緩存中的第一域名解析结果更新为第二域名解 析结果, 可以在后续接收到域名解析请求后, 将緩存的第二域名解析结果 发送给终端, 从而使得终端向第二域名解析结果对应的内容服务器请求内 谷。  The cached domain name server updates the first domain name resolution result in the cache to the second domain name resolution result, and after receiving the domain name resolution request, the cached second domain name resolution result is sent to the terminal, so that the terminal sends the second domain name to the second domain name. The content server requesting the inner valley corresponding to the parsing result.
在本发明实施例提供的更新域名系统緩存的方法可以应用在第一域名 解析结果对应的内容服务器发生故障或负荷超过门限值的场景中, 本发明 实施例通过向緩存域名服务器发送域名解析更新消息, 使得緩存域名服务 器删除自身緩存的第一域名解析结果为第二域名解析结果, 避免向终端返 回错误的第一域名解析结果。 緩存域名服务器在随后接收到终端的域名解 析请求后, 向终端返回第二域名解析结果, 而第二域名解析结果对应的内 容服务器工作状态正常, 终端可以向工作状态正常的内容服务器请求内容。 The method for updating the domain name system cache provided in the embodiment of the present invention may be applied to a scenario in which the content server corresponding to the first domain name resolution result is faulty or the load exceeds a threshold, and the embodiment of the present invention sends the domain name resolution update to the cached domain name server. Message, making the cached domain name service The result of deleting the first domain name resolution of the cache is the second domain name resolution result, and avoids returning the wrong first domain name resolution result to the terminal. After receiving the domain name resolution request of the terminal, the cached domain name server returns the second domain name resolution result to the terminal, and the content server corresponding to the second domain name resolution result is in a normal working state, and the terminal may request content from the content server with normal working status.
参见图 2,本发明实施例一中授权域名服务器在执行向请求解析的域名 对应的緩存域名服务器发送域名解析更新消息的步骤具体可以包括:  Referring to FIG. 2, the step of the domain name server in the first embodiment of the present invention for the domain name server to perform the domain name resolution update message corresponding to the domain name server corresponding to the domain name that is requested to be resolved may include:
Bl、 根据预先保存的对应关系在自身緩存中查找与请求解析的域名对 应的緩存域名服务器的地址。  Bl. Find the address of the cached domain name server corresponding to the domain name requested to be resolved in the cache according to the pre-saved correspondence.
具体的, 授权域名服务器根据预先保存的对应关系, 即请求解析的域 名和緩存域名服务器之间的对应关系, 在自身緩存中查找与请求解析的域 名对应的緩存域名服务器的地址, 获取该緩存域名服务器的 IP地址。  Specifically, the authorized domain name server searches for the address of the cached domain name server corresponding to the domain name requested to be resolved according to the pre-stored correspondence, that is, the correspondence between the domain name to be parsed and the cached domain name server, and obtains the cached domain name. The IP address of the server.
B2、 向查找到的緩存域名服务器发送域名解析更新消息。  B2. Send a domain name resolution update message to the cached domain name server that is found.
具体的, 授权域名服务器根据緩存域名服务器的 IP地址向查找到的緩 存域名服务器发送域名解析更新消息, 以便于接收到更新消息的緩存域名 服务器删除自身緩存的域名解析结果。  Specifically, the authorized domain name server sends a domain name resolution update message to the cached domain name server according to the IP address of the cached domain name server, so that the cached domain name server that receives the update message deletes the cached domain name resolution result.
进一步的, 本发明实施例提供的域名解析更新消息中还包含緩存更新 指示信息和第二域名解析结果。 緩存更新指示信息用于指示緩存域名服务 器将緩存的第一域名解析结果更新为第二域名解析结果。 緩存域名服务器 在接收到域名解析更新消息后, 根据该更新指示信息来删除自身緩存的第 一域名解析结果。 参见图 3 ,图 3是本发明实施例二提供的更新域名系统緩存的方法流程 图。  Further, the domain name resolution update message provided by the embodiment of the present invention further includes cache update indication information and a second domain name resolution result. The cache update indication information is used to instruct the cached domain name server to update the cached first domain name resolution result to the second domain name resolution result. After receiving the domain name resolution update message, the cached domain name server deletes the first domain name resolution result cached by itself according to the update indication information. Referring to FIG. 3, FIG. 3 is a flow chart of a method for updating a domain name system cache according to Embodiment 2 of the present invention.
在本发明实施例中, 终端向緩存域名服务器发送域名解析请求, 该域 名解析请求中携带终端请求解析的域名。 緩存域名服务器向授权域名服务 器发送域名解析请求。  In the embodiment of the present invention, the terminal sends a domain name resolution request to the cached domain name server, where the domain name resolution request carries the domain name that the terminal requests to resolve. The cached domain name server sends a domain name resolution request to the authorized domain name server.
本发明实施例二提供的更新域名系统緩存的方法可以包括:  The method for updating the domain name system cache provided by the second embodiment of the present invention may include:
Cl、 接收緩存域名服务器发送的域名解析请求, 该域名解析请求中包 括请求解析的域名。  Cl, receiving a domain name resolution request sent by the cache name server, and the domain name resolution request includes a domain name requested to be resolved.
具体的, 授权域名服务器接收緩存域名服务器发送的域名解析请求, 该域名解析请求中包括请求解析的域名。 C2、 根据接收到的域名解析请求对请求解析的域名进行解析, 获得第 一域名解析结果。 Specifically, the authorized domain name server receives the domain name resolution request sent by the cached domain name server, and the domain name resolution request includes the domain name requested for resolution. C2. Parse the domain name that is requested to be parsed according to the received domain name resolution request, and obtain the first domain name resolution result.
具体的, 授权域名服务器根据接收到的域名解析请求对请求解析的域 名进行解析, 获得第一域名解析结果。 其中, 第一域名解析结果中包括该 域名对应的内容服务器的地址以及该第一域名解析结果的生存时间。 在本 发明实施例中, 第一域名解析结果的生存时间称为第一生存时间。  Specifically, the authorized domain name server parses the domain name of the request for parsing according to the received domain name resolution request, and obtains the first domain name resolution result. The first domain name resolution result includes the address of the content server corresponding to the domain name and the lifetime of the first domain name resolution result. In the embodiment of the present invention, the lifetime of the first domain name resolution result is referred to as a first lifetime.
C3、 緩存第一域名解析结果和请求解析的域名之间的对应关系, 以及 请求解析的域名和緩存域名服务器之间的对应关系, 向该緩存域名服务器 发送域名解析响应, 该域名解析响应中包括第一域名解析结果和请求解析 的域名。  C3. Cache a correspondence between the first domain name resolution result and the domain name requested to be resolved, and a correspondence between the domain name requested to be resolved and the cache domain name server, and send a domain name resolution response to the cache domain name server, where the domain name resolution response includes The first domain name resolution result and the domain name requested to be resolved.
具体的, 授权域名服务器将第一域名解析结果和请求解析的域名之间 的对应关系、 请求解析的域名和緩存域名服务器之间的对应关系进行緩存。 其中, 授权域名服务器緩存上述对应关系的时间可以根据需要来灵活确定, 例如以秒计或小时来计算。  Specifically, the authorized domain name server caches the correspondence between the first domain name resolution result and the domain name requested to be resolved, the domain name requested to be resolved, and the cache domain name server. The time for authorizing the domain name server to cache the corresponding relationship may be flexibly determined according to requirements, for example, in seconds or hours.
授权域名服务器还根据域名解析请求向緩存域名服务器发送域名解析 响应, 域名解析响应中包括该第一域名解析结果和请求解析的域名。  The authorized domain name server also sends a domain name resolution response to the cached domain name server according to the domain name resolution request. The domain name resolution response includes the first domain name resolution result and the domain name requested to be resolved.
其中, 緩存域名服务器接收到域名解析响应后, 向对应的终端发送第 一域名解析结果, 使终端根据可以根据第一域名解析结果访问对应的内容 服务器。  After receiving the domain name resolution response, the cached domain name server sends the first domain name resolution result to the corresponding terminal, so that the terminal can access the corresponding content server according to the first domain name resolution result.
C4、 在检测到自身緩存中的第一域名解析结果对应的内容服务器发生 故障或负荷超过门限值, 获取请求解析的域名的第二域名解析结果, 该请 求解析的域名和第一域名解析结果对应, 该第二域名解析结果对应的内容 服务器的工作状态正常。  C4. After detecting that the content server corresponding to the first domain name resolution result in the cache is faulty or the load exceeds the threshold, obtaining the second domain name resolution result of the domain name requested for resolution, the domain name and the first domain name resolution result of the request resolution Correspondingly, the working state of the content server corresponding to the second domain name resolution result is normal.
在本发明实施例中, 授权域名服务器在向对应的緩存域名服务器发送 域名解析响应后, 若随后检测到第一域名解析结果对应的内容服务器发生 故障或负荷超过门限值, 则授权域名服务器对请求解析的域名再次进行域 名解析, 获得请求解析的域名的第二域名解析结果, 第二域名解析结果对 应的内容服务器当前的工作状态正常。  In the embodiment of the present invention, after the domain name resolution response is sent to the corresponding cached domain name server, if the content server corresponding to the first domain name resolution result is subsequently detected to be faulty or the load exceeds the threshold, the authorized domain name server authenticates the domain name server. The domain name that is requested to be parsed is again subjected to domain name resolution, and the second domain name resolution result of the domain name requested for resolution is obtained, and the current working state of the content server corresponding to the second domain name resolution result is normal.
C5、向请求解析的域名对应的緩存域名服务器发送域名解析更新消息, 域名解析更新消息中携带上述请求解析的域名, 该域名解析更新消息用于 指示緩存域名服务器将緩存的第一域名解析结果更新为第二域名解析结 果。 C5. Send a domain name resolution update message to the cached domain name server corresponding to the domain name that is requested to be parsed. The domain name resolution update message carries the domain name of the request resolution, and the domain name resolution update message is used to indicate that the cached domain name server updates the cached first domain name resolution result. Analyze the second domain name fruit.
具体的, 授权域名服务器在获取第二域名解析结果之后, 向请求解析 的域名对应的緩存域名服务器发送域名解析更新消息。  Specifically, after obtaining the second domain name resolution result, the authorized domain name server sends a domain name resolution update message to the cached domain name server corresponding to the domain name that is requested to be resolved.
其中, 授权域名服务器可以根据请求解析的域名与緩存域名服务器的 对应关系获取对应的緩存域名服务器的地址。 请求解析的域名对应的緩存 域名服务器均针对该域名向授权域名服务器发送过了域名解析请求。 需要 说明的是, 请求解析的域名可以对应多个緩存域名服务器, 即对应同一请 求解析的域名的多个緩存域名服务器均可以接收到域名解析更新消息。  The authorized domain name server can obtain the address of the corresponding cached domain name server according to the correspondence between the domain name that is requested to be resolved and the cached domain name server. The cache corresponding to the domain name requested for resolution The domain name server has sent a domain name resolution request to the authorized domain name server for the domain name. It should be noted that the domain name for requesting resolution may correspond to multiple cached domain name servers, that is, multiple cached domain name servers corresponding to the domain name resolved by the same request may receive the domain name resolution update message.
在本发明实施例中, 授权域名服务器发送的域名解析更新消息中携带 请求解析的域名 , 域名解析更新消息用于指示緩存域名服务器将緩存的第 一域名解析结果更新为第二域名解析结果。  In the embodiment of the present invention, the domain name resolution update message sent by the authorized domain name server carries the domain name for request resolution, and the domain name resolution update message is used to indicate that the cached domain name server updates the cached first domain name resolution result to the second domain name resolution result.
緩存域名服务器将自身緩存中的第一域名解析结果更新为第二域名解 析结果, 可以在后续接收到域名解析请求后, 将緩存的第二域名解析结果 发送给终端, 从而使得终端向第二域名解析结果对应的内容服务器请求内 谷。  The cached domain name server updates the first domain name resolution result in the cache to the second domain name resolution result, and after receiving the domain name resolution request, the cached second domain name resolution result is sent to the terminal, so that the terminal sends the second domain name to the second domain name. The content server requesting the inner valley corresponding to the parsing result.
进一步的, 本发明实施例二还可以在第一域名解析结果的第一生存时 间超时后, 自动删除自身緩存中的第一域名解析结果和緩存域名服务器的 地址, 不仅可以节省緩存空间, 还可以提高授权域名服务器的性能。  Further, in the second embodiment of the present invention, after the first lifetime of the first domain name resolution timeout expires, the first domain name resolution result in the cache and the address of the cache domain name server are automatically deleted, which not only saves the cache space, but also can save the cache space. Improve the performance of authorized domain name servers.
在本发明实施例二提供的更新域名系统緩存的方法还可以执行以下步 骤:  The method for updating the domain name system cache provided by the second embodiment of the present invention may further perform the following steps:
C6、 将自身緩存中的第一域名解析结果更新为第二域名解析结果。 具体的, 授权域名服务器还可以在获取与请求解析的域名对应的第二 域名解析结果之后, 将自身緩存中的第一域名解析结果更新为第二域名解 析结果。  C6. Update the first domain name resolution result in the cache to the second domain name resolution result. Specifically, the authorized domain name server may further update the first domain name resolution result in the cache to the second domain name resolution result after obtaining the second domain name resolution result corresponding to the domain name requested to be resolved.
需要说明的是,上述步骤 C5和步骤 C6之间的执行顺序是时隙无关的, 其先后执行顺序不构成对本发明实施例的限制。  It should be noted that the order of execution between the foregoing steps C5 and C6 is slot-independent, and the sequential execution order does not limit the embodiment of the present invention.
本发明实施例一、 二提供的更新域名系统緩存的方法中, 授权域名服 务器检测到域名解析结果对应的内容服务器发生故障可以采用如下方式: In the method for updating the domain name system cache provided by the first and second embodiments of the present invention, the authorized domain name server detects that the content server corresponding to the domain name resolution result is faulty, and may adopt the following manner:
1 )接收到域名解析结果对应的内容服务器发送的故障上报消息, 则判 断内容服务器发生故障。 1) Upon receiving the fault report message sent by the content server corresponding to the domain name resolution result, it is determined that the content server is faulty.
具体的, 授权域名服务器在接收到第一域名解析结果对应的内容服务 器发送的故障上报消息, 则判断该内容服务器发生故障。 Specifically, the authorized domain name server receives the content service corresponding to the first domain name resolution result. If the fault report message is sent by the device, it is determined that the content server is faulty.
2 )在预置时间内未接收到域名解析结果对应的内容服务器发送的状态 上才艮消息, 判断内容服务器发生故障。  2) The status message sent by the content server corresponding to the domain name resolution result is not received within the preset time, and the content server is determined to be faulty.
具体的, 授权域名服务器在预置时间内未接收到第一域名解析结果对 应的内容服务器发送的状态上报消息, 则判断内容服务器发生故障。 其中, 预置时间可以根据具体的内容服务器来确定。  Specifically, if the authorized domain name server does not receive the status report message sent by the content server corresponding to the first domain name resolution result within the preset time, it is determined that the content server is faulty. The preset time can be determined according to a specific content server.
需要指出的是, 以上仅给出两种可能的状态获取方式, 授权域名服务 器获知内容服务器的是否发生故障还可以有其他的实现方式。 参见图 4,图 4是本发明实施例三提供的更新域名系统緩存的方法的流 程图。  It should be pointed out that only two possible state acquisition methods are given above, and the authorization domain name server can learn whether the content server is faulty or not. Referring to FIG. 4, FIG. 4 is a flow chart of a method for updating a domain name system cache according to Embodiment 3 of the present invention.
本发明实施例三提供的更新域名系统緩存的方法主要包括:  The method for updating the domain name system cache provided by the third embodiment of the present invention mainly includes:
Dl、 在检测到自身緩存中的第一域名解析结果对应的内容服务器发生 故障或负荷超过门限值时, 生成域名解析结果删除消息, 该域名解析结果 删除消息用于删除緩存域名服务器中緩存的第一域名解析结果, 该域名解 析结果删除消息中携带请求解析的域名, 第一域名解析结果和请求解析的 域名对应。  If the content server corresponding to the first domain name resolution result in the cache is faulty or the load exceeds the threshold, the domain name resolution result deletion message is generated, and the domain name resolution result deletion message is used to delete the cached cached domain name server. As a result of the first domain name resolution, the domain name resolution result deletion message carries the domain name requested for resolution, and the first domain name resolution result corresponds to the domain name requested to be resolved.
具体的, 授权域名服务器緩存有第一域名解析结果, 授权域名服务器 在检测到第一域名解析结果对应的内容服务器发生故障或负荷超过门限值 时, 则生成域名解析结果删除消息, 域名解析结果删除消息用于删除緩存 域名服务器中緩存的第一域名解析结果。 其中, 域名解析结果删除消息中 携带请求解析的域名, 緩存的第一域名解析结果和请求解析的域名之间存 在对应关系。  Specifically, the authorized domain name server caches the first domain name resolution result, and the authorized domain name server generates a domain name resolution result deletion message when the content server corresponding to the first domain name resolution result is faulty or the load exceeds the threshold, and the domain name resolution result is generated. The delete message is used to delete the first domain name resolution result cached in the cached domain name server. The domain name resolution result deletion message carries the domain name requested for resolution, and the cached first domain name resolution result and the domain name requested to be resolved have a corresponding relationship.
D2、 向緩存域名服务器发送域名解析结果删除消息, 以便于该緩存域 名服务器删除自身緩存中的第一域名解析结果, 緩存域名服务器和请求解 析的域名对应。  D2: Send a domain name resolution result deletion message to the cache domain name server, so that the cache domain name server deletes the first domain name resolution result in the cache, and the cache domain name server corresponds to the domain name requested to be parsed.
具体的, 授权域名服务器在生成域名解析结果删除消息后, 向请求解 析的域名对应的緩存域名服务器发送该消息。 需要指出的是, 请求解析的 域名可以对应多个緩存域名服务器。  Specifically, after the domain name resolution result deletion message is generated, the authorized domain name server sends the message to the cached domain name server corresponding to the domain name that is requested to be analyzed. It should be noted that the domain name requested for resolution can correspond to multiple cached domain name servers.
緩存域名服务器在接收到域名解析结果删除消息后, 将删除自身緩存 中的与请求解析的域名对应的第一域名解析结果。 緩存域名服务器在删除 自身緩存中的第一域名解析结果之后, 可以在后续接收到域名解析请求后, 重新向授权域名服务器请求域名解析结果, 进而获得正确的域名解析结果。 After receiving the domain name resolution result deletion message, the cached domain name server deletes the first domain name resolution result corresponding to the domain name requested for resolution in the cache. Cache domain name server is deleting After the first domain name resolution result is obtained in the cache, the domain name resolution result can be requested again from the authorized domain name server after receiving the domain name resolution request, and the correct domain name resolution result is obtained.
在本发明实施例提供的更新域名系统緩存的方法可以应用在第一域名 解析结果对应的内容服务器发生故障或负荷高于预设门限的场景中, 本发 明实施例通过向緩存域名服务器发送域名解析结果删除消息, 使得緩存域 名服务器删除緩存的第一域名解析结果, 避免向终端返回错误的第一域名 解析结果。 緩存域名服务器在随后接收到终端的域名解析请求后, 重新向 授权域名服务器请求正确的域名解析结果, 将正确的域名解析结果发送给 緩存域名服务器, 进而使得终端可以向正确的内容服务器请求内容。  The method for updating the domain name system cache provided by the embodiment of the present invention may be applied to a scenario in which the content server corresponding to the first domain name resolution result is faulty or the load is higher than a preset threshold, and the embodiment of the present invention sends the domain name resolution to the cached domain name server. As a result, the message is deleted, so that the cached domain name server deletes the cached first domain name resolution result, and avoids returning the wrong first domain name resolution result to the terminal. After receiving the domain name resolution request of the terminal, the cached domain name server re-requests the correct domain name resolution result to the authorized domain name server, and sends the correct domain name resolution result to the cached domain name server, so that the terminal can request the content from the correct content server.
参见图 5,本发明实施例三中授权域名服务器在执行向緩存域名服务器 发送域名解析结果删除消息的步骤(步骤 D2 )具体可以包括:  Referring to FIG. 5, in the third embodiment of the present invention, the step of the domain name server performing the domain name resolution result deletion message sent to the cache domain name server (step D2) may specifically include:
El、 根据预先保存的对应关系在自身緩存中查找与请求解析的域名对 应的緩存域名服务器的地址。  El searches for the address of the cached domain name server corresponding to the domain name requested to be resolved in the cache according to the pre-saved correspondence.
具体的, 授权域名服务器根据预先保存的对应关系, 即第一域名解析 结果和请求解析的域名之间的对应关系、 请求解析的域名和緩存域名服务 器之间的对应关系, 在自身緩存中查找与第一域名解析结果对应的緩存域 名服务器的地址, 获取该緩存域名服务器的 IP地址。  Specifically, the authorized domain name server searches and searches in the cache according to the pre-stored correspondence, that is, the correspondence between the first domain name resolution result and the domain name requested to be resolved, the domain name requested to be resolved, and the cached domain name server. The address of the cached domain name server corresponding to the first domain name resolution result, and the IP address of the cached domain name server is obtained.
E2、 向查找到的緩存域名服务器发送域名解析结果删除消息。  E2. Send a domain name resolution result deletion message to the found cached domain name server.
具体的, 授权域名服务器根据緩存域名服务器的 IP地址向查找到的緩 存域名服务器发送域名结果删除消息, 以便于接收到该删除消息的緩存域 名服务器删除自身緩存的与请求解析的域名对应的第一域名解析结果。 参见图 6,图 6是本发明实施例四提供的更新域名系统緩存的方法流程 图。  Specifically, the authorized domain name server sends a domain name result deletion message to the cached domain name server that is found according to the IP address of the cached domain name server, so that the cached domain name server that receives the deleted message deletes the first cached domain name corresponding to the domain name that is requested to be resolved. Domain name resolution results. Referring to FIG. 6, FIG. 6 is a flow chart of a method for updating a domain name system cache according to Embodiment 4 of the present invention.
在本发明实施例中, 终端向緩存域名服务器发送域名解析请求, 该域 名解析请求中携带请求解析的域名。 緩存域名服务器向授权域名服务器发 送域名解析请求。  In the embodiment of the present invention, the terminal sends a domain name resolution request to the cached domain name server, where the domain name resolution request carries the domain name requested for resolution. The cached domain name server sends a domain name resolution request to the authorized domain name server.
本发明实施例四提供的更新域名系统緩存的方法可以包括:  The method for updating the domain name system cache provided by the fourth embodiment of the present invention may include:
Fl、 接收緩存域名服务器发送的域名解析请求, 该域名解析请求中包 括请求解析的域名。  Fl. Receive a domain name resolution request sent by a cached domain name server, where the domain name resolution request includes a domain name requested to be resolved.
具体的, 授权域名服务器接收緩存域名服务器发送的域名解析请求, 该域名解析请求中包括请求解析的域名。 Specifically, the authorized domain name server receives the domain name resolution request sent by the cached domain name server, The domain name resolution request includes the domain name requested to be resolved.
F2、 根据该域名解析请求对请求解析的域名进行解析, 获得第一域名 解析结果。  F2. Parse the domain name that is requested to be parsed according to the domain name resolution request, and obtain the first domain name parsing result.
具体的, 授权域名服务器根据接收到的域名解析请求对请求解析的域 名进行解析, 获得第一域名解析结果。 其中, 第一域名解析结果中包括该 域名对应的内容服务器的地址以及该第一域名解析结果的生存时间。 在本 发明实施例中, 第一域名解析结果的生存时间称为第一生存时间。  Specifically, the authorized domain name server parses the domain name of the request for parsing according to the received domain name resolution request, and obtains the first domain name resolution result. The first domain name resolution result includes the address of the content server corresponding to the domain name and the lifetime of the first domain name resolution result. In the embodiment of the present invention, the lifetime of the first domain name resolution result is referred to as a first lifetime.
F3、 緩存该第一域名解析结果和请求解析的域名之间的对应关系、 以 及请求解析的域名和该緩存域名服务器之间的对应关系, 向该緩存域名服 务器发送域名解析响应, 该域名解析响应中包括第一域名解析结果和请求 解析的域名。  F3. Cache a correspondence between the first domain name resolution result and the domain name requested to be resolved, and a correspondence between the domain name requested to be resolved and the cached domain name server, and send a domain name resolution response to the cache domain name server, where the domain name resolution response is It includes the first domain name resolution result and the domain name requested for resolution.
具体的, 授权域名服务器将第一域名解析结果和请求解析的域名之间 的对应关系、 请求解析的域名和发送域名解析请求的緩存域名服务器之间 的对应关系进行緩存。 其中, 授权域名服务器緩存上述对应关系的时间可 以根据需要来灵活确定, 例如以秒计或小时来计算。 本发明实施例通过緩 存上述对应关系, 可以在检测到自身緩存中的域名解析结果对应的内容服 务器发生故障时, 根据緩存的对应关系获取对应的緩存域名服务器的地址, 以便于更新该緩存域名服务器中緩存的域名解析结果。  Specifically, the authorized domain name server caches the correspondence between the first domain name resolution result and the domain name requested to be resolved, the domain name requested to be resolved, and the cache domain name server that sends the domain name resolution request. The time at which the authorized domain name server caches the corresponding relationship may be flexibly determined according to needs, for example, in seconds or hours. When the content server corresponding to the domain name resolution result in the cache is faulty, the embodiment of the present invention obtains the address of the corresponding cached domain name server according to the cached correspondence, so as to update the cached domain name server. The cached domain name resolution result.
授权域名服务器还根据域名解析请求向緩存域名服务器发送域名解析 响应, 域名解析响应中包括该第一域名解析结果和请求解析的域名。  The authorized domain name server also sends a domain name resolution response to the cached domain name server according to the domain name resolution request. The domain name resolution response includes the first domain name resolution result and the domain name requested to be resolved.
其中, 緩存域名服务器接收到域名解析响应后, 向对应的终端发送第 一域名解析结果, 终端根据第一域名解析结果访问对应的内容服务器。  After receiving the domain name resolution response, the cached domain name server sends the first domain name resolution result to the corresponding terminal, and the terminal accesses the corresponding content server according to the first domain name resolution result.
F4、 在检测到第一域名解析结果对应的内容服务器发生故障或负荷超 过门限值, 生成域名解析结果删除消息, 该域名解析结果删除消息用于删 除緩存域名服务器中携带的第一域名解析结果, 域名解析结果删除消息中 携带请求解析的域名, 该第一域名解析结果和请求解析的域名对应。  If the content server corresponding to the first domain name resolution result is faulty or the load exceeds the threshold, the domain name resolution result deletion message is generated, and the domain name resolution result deletion message is used to delete the first domain name resolution result carried in the cache domain name server. The domain name resolution result deletion message carries the domain name requested for resolution, and the first domain name resolution result corresponds to the domain name requested to be resolved.
其中, 域名解析结果删除消息用于删除緩存域名服务器中携带的第一 域名解析结果。 域名解析结果删除消息中携带请求解析的域名, 緩存的第 一域名解析结果和请求解析的域名之间存在对应关系。  The domain name resolution result deletion message is used to delete the first domain name resolution result carried in the cached domain name server. The domain name resolution result deletion message carries the domain name of the request resolution, and there is a correspondence between the cached first domain name resolution result and the domain name requested to be resolved.
F5、 向该緩存域名服务器发送域名解析结果删除消息, 以便于该緩存 域名服务器删除自身緩存中的第一域名解析结果, 该緩存域名服务器和请 求解析的域名对应。 F5. Send a domain name resolution result deletion message to the cached domain name server, so that the cached domain name server deletes the first domain name resolution result in the cache, the cached domain name server and the request The domain name corresponding to the parsing is required.
具体的, 授权域名服务器可以生成域名解析结果删除消息后, 向请求 解析的域名对应的緩存域名服务器发送该消息。 需要指出的是, 请求解析 的域名可以对应多个緩存域名服务器, 授权域名服务器可以向多个緩存域 名服务器发送域名解析结果删除消息, 进而使得多个緩存域名服务器删除 自身緩存中的第一域名解析结果。  Specifically, after the domain name resolution result deletion message is generated, the authorized domain name server sends the message to the cached domain name server corresponding to the domain name that is requested to be resolved. It should be noted that the domain name requested for resolution may correspond to multiple cached domain name servers, and the authorized domain name server may send a domain name resolution result deletion message to multiple cached domain name servers, thereby causing multiple cached domain name servers to delete the first domain name resolution in the cache. result.
緩存域名服务器在接收到域名解析结果删除消息后, 将删除自身緩存 中的与请求解析的域名对应的第一域名解析结果。 緩存域名服务器在删除 自身緩存中的第一域名解析结果之后, 可以在后续接收到终端针对该请求 解析的域名解析请求后, 重新向授权域名服务器请求域名解析结果, 进而 获得正确的域名解析结果。  After receiving the domain name resolution result deletion message, the cached domain name server deletes the first domain name resolution result corresponding to the domain name requested for resolution in the cache. After deleting the first domain name resolution result in the cache, the cached domain name server may request the domain name resolution result from the authorized domain name server after receiving the domain name resolution request for the request, and obtain the correct domain name resolution result.
本发明实施例三、 四提供的更新域名系统緩存的方法中, 授权域名服 务器检测到域名解析结果对应的内容服务器发生故障可以采用如下方式: In the method for updating the domain name system cache provided by the third and fourth embodiments of the present invention, the authorized domain name server detects that the content server corresponding to the domain name resolution result is faulty, and may adopt the following manner:
1 )接收到域名解析结果对应的内容服务器发送的故障上报消息, 则判 断内容服务器发生故障。 1) Upon receiving the fault report message sent by the content server corresponding to the domain name resolution result, it is determined that the content server is faulty.
具体的, 授权域名服务器在接收到第一域名解析结果对应的内容服务 器发送的故障上报消息, 则判断该内容服务器发生故障。  Specifically, the authorized domain name server receives the fault report message sent by the content server corresponding to the first domain name resolution result, and determines that the content server is faulty.
2 )在预置时间内未接收到域名解析结果对应的内容服务器发送的状态 上才艮消息, 判断内容服务器发生故障。  2) The status message sent by the content server corresponding to the domain name resolution result is not received within the preset time, and the content server is determined to be faulty.
具体的, 授权域名服务器在预置时间内未接收到第一域名解析结果对 应的内容服务器发送的状态上报消息, 则判断内容服务器发生故障。 其中, 预置时间可以根据具体的内容服务器来确定。  Specifically, if the authorized domain name server does not receive the status report message sent by the content server corresponding to the first domain name resolution result within the preset time, it is determined that the content server is faulty. The preset time can be determined according to a specific content server.
需要指出的是, 以上仅给出两种可能的获取方式, 授权域名服务器获 知内容服务器的是否发生故障还可以有其他的实现方式。  It should be pointed out that only two possible acquisition methods are given above, and the authorization domain name server can learn whether the content server is faulty or not.
以上从授权域名服务器一侧描述了本发明实施例提供的更新系统緩存 的方法, 下面从域名緩存服务器一侧来描述本发明实施例提供的更新系统 緩存的方法。 参见图 7,图 7是本发明实施例五提供的更新域名系统緩存的方法的流 程图。  The method for updating the system cache provided by the embodiment of the present invention is described above from the side of the authorized domain name server. The method for updating the system cache provided by the embodiment of the present invention is described below from the domain name cache server side. Referring to FIG. 7, FIG. 7 is a flow chart of a method for updating a domain name system cache according to Embodiment 5 of the present invention.
在本发明实施例五中, 緩存域名服务器的自身緩存中包括请求解析的 域名以及该域名对应的第一域名解析结果。 授权域名服务器在需要删除自 身緩存域名服务中緩存的域名解析结果时, 例如检测到第一域名解析结果 对应的内容服务器发生故障或负荷高于预设门限, 则向緩存域名服务器发 送域名解析更新消息。 本发明实施例五提供的更新域名系统緩存的方法可 以包括: In the fifth embodiment of the present invention, the cache of the cached domain name server includes request parsing. The domain name and the first domain name resolution result corresponding to the domain name. The authorized domain name server sends a domain name resolution update message to the cached domain name server when it is required to delete the domain name resolution result cached in the cached domain name service, for example, if the content server corresponding to the first domain name resolution result is faulty or the load is higher than the preset threshold. . The method for updating the domain name system cache provided by the fifth embodiment of the present invention may include:
Gl、 接收授权域名服务器发送的域名解析更新消息, 该域名解析更新 消息用于指示緩存域名服务器将緩存的第一域名解析结果更新为第二域名 解析结果, 该域名解析更新消息中携带请求解析的域名。  Gl. Receive a domain name resolution update message sent by the authorized domain name server, where the domain name resolution update message is used to indicate that the cached domain name server updates the cached first domain name resolution result to the second domain name resolution result, where the domain name resolution update message carries the request resolution domain name.
具体的, 緩存域名服务器接收授权域名服务器发送的域名解析更新消 息, 该域名解析更新消息用于指示緩存域名服务器将緩存的第一域名解析 结果更新为第二域名解析结果, 域名解析更新消息中携带请求解析的域名。  Specifically, the cache domain name server receives the domain name resolution update message sent by the authorized domain name server, and the domain name resolution update message is used to indicate that the cached domain name server updates the cached first domain name resolution result to the second domain name resolution result, and the domain name resolution update message is carried in the domain name resolution update message. The domain name requested to be resolved.
其中, 緩存域名服务器可以在自身緩存中根据该请求解析的域名查找 到需要更新的第一域名解析结果。  The cached domain name server can find the first domain name resolution result that needs to be updated according to the domain name parsed by the request in its own cache.
G2、 将自身緩存中第一域名解析结果更新为第二域名解析结果, 该第 一域名解析结果和请求解析的域名对应。  G2: The first domain name resolution result in the cache is updated to the second domain name resolution result, and the first domain name resolution result corresponds to the domain name requested to be resolved.
具体的 , 緩存域名服务器根据更新指示信息将緩存中与请求解析的域 名对应的第一域名解析结果更新为第二域名解析结果。  Specifically, the cached domain name server updates the first domain name resolution result corresponding to the domain name to be resolved in the cache to the second domain name resolution result according to the update indication information.
在本发明实施例中, 緩存域名服务器通过将自身緩存中与请求解析的 域名对应的第一域名解析结果更新为第二域名解析结果, 可以在随后接收 到域名解析请求后, 将更新的域名解析结果, 即第二域名解析结果向终端 发送。 和现有技术相比, 本发明实施例通过删除自身緩存中的域名解析结 果, 可以避免终端向发生故障的内容服务器请求内容, 进一步使得终端向 当前可用的内容服务器请求内容。  In the embodiment of the present invention, the cached domain name server updates the first domain name resolution result corresponding to the domain name that is requested to be parsed in the cache to the second domain name resolution result, and may analyze the updated domain name after receiving the domain name resolution request. As a result, the second domain name resolution result is sent to the terminal. Compared with the prior art, the embodiment of the present invention can prevent the terminal from requesting content from the failed content server by deleting the domain name resolution result in the self cache, and further causes the terminal to request content from the currently available content server.
进一步的, 緩存域名服务器中緩存的第二域名解析结果中还包括生存 时间, 第二域名解析结果的生存时间在本发明实施例中称为第二生存时间 , 则本发明实施例还可以包括:  Further, the second domain name resolution result cached in the cached domain name server further includes a time-to-live, and the survival time of the second domain name resolution result is referred to as a second time-to-live time in the embodiment of the present invention.
G3、 在第二生存时间超时后, 删除自身緩存中的第二域名解析结果。 本发明实施例通过删除超过生存时间的第二域名解析结果, 不仅可以 节约緩存域名服务器的緩存资源, 还可以使得终端获得较新的域名解析结 果。  G3. After the second survival time expires, the second domain name resolution result in the cache is deleted. By deleting the second domain name resolution result that exceeds the lifetime, the embodiment of the present invention can not only save the cached resource of the cached domain name server, but also enable the terminal to obtain a newer domain name resolution result.
参见图 8,本发明实施例五中緩存域名服务器将自身緩存中的第一域名 解析结果更新为第二域名解析结果的过程(上述步骤 G2 ), 具体可以为: Hl、 根据预先保存的对应关系在自身緩存中查找与请求解析的域名对 应的第一域名解析结果。 Referring to FIG. 8, in the fifth embodiment of the present invention, the cached domain name server caches the first domain name in its own cache. The process of updating the parsing result to the second domain name parsing result (the above step G2) may be: H1. Searching, in the cache, the first domain name parsing result corresponding to the domain name requested for parsing according to the pre-stored correspondence.
具体的, 緩存域名服务器根据预先保存的对应关系, 即请求解析的域 名和第一域名解析结果之间的对应关系, 在自身緩存中查找与请求解析的 域名对应的第一域名解析结果。  Specifically, the cached domain name server searches for the first domain name resolution result corresponding to the domain name to be resolved in the cache according to the pre-stored correspondence, that is, the correspondence between the domain name to be resolved and the first domain name resolution result.
其中, 緩存域名服务器中预先保存有请求解析的域名和第一域名解析 结果之间的对应关系。 緩存域名服务器可以在接收到授权域名服务器发送 的域名解析响应之后, 预先保存域名解析响应中的第一域名解析结果和请 求解析的域名之间的对应关系。  The cache domain name server pre-stores the correspondence between the domain name for request resolution and the first domain name resolution result. After receiving the domain name resolution response sent by the authorized domain name server, the cached domain name server pre-stores the correspondence between the first domain name resolution result in the domain name resolution response and the domain name resolved by the request.
H2、 将查找到的第一域名解析结果更新为第二域名解析结果。  H2: Update the first domain name resolution result that is found to the second domain name resolution result.
具体的, 緩存域名服务器将查找到的第一域名解析结果更新为第二域 名解析结果。  Specifically, the cached domain name server updates the first domain name resolution result found to the second domain name resolution result.
参见图 9,图 9是本发明实施例六提供的更新域名系统緩存的方法的流 程图。  Referring to FIG. 9, FIG. 9 is a flow chart of a method for updating a domain name system cache according to Embodiment 6 of the present invention.
在本发明实施例六中, 緩存域名服务器的自身緩存中包括请求解析的 域名以及该域名对应的第一域名解析结果。 授权域名服务器在需要删除自 身緩存域名服务器中緩存的域名解析结果时, 例如检测到该第一域名解析 结果对应的内容服务器发生故障或负荷高于预设门限, 则向緩存域名服务 器发送域名解析结果删除消息。 本发明实施例六提供的更新域名系统緩存 的方法可以包括:  In the sixth embodiment of the present invention, the cache of the cached domain name server includes the domain name to be resolved and the first domain name resolution result corresponding to the domain name. When the domain name resolution server caches the domain name resolution result of the cached domain name server, for example, if the content server corresponding to the first domain name resolution result is faulty or the load is higher than the preset threshold, the domain name resolution result is sent to the cached domain name server. Delete the message. The method for updating the domain name system cache provided by the sixth embodiment of the present invention may include:
Jl、接收授权域名服务器发送的域名解析结果删除消息,该域名解析结 果删除消息中携带请求解析的域名, 该域名解析结果删除消息用于删除緩 存域名服务器中携带的第一域名解析结果, 该第一域名解析结果和请求解 析的域名对应。  The domain name resolution result deletion message sent by the authorized domain name server is received, and the domain name resolution result deletion message carries the domain name of the request resolution, and the domain name resolution result deletion message is used to delete the first domain name resolution result carried in the cache domain name server, A domain name resolution result corresponds to the domain name requested to be resolved.
具体的, 緩存域名服务器接收授权域名服务器发送的域名解析结果删 除消息, 该域名解析结果删除消息中携带请求解析的域名, 域名解析结果 删除消息用于删除緩存域名服务器中携带的第一域名解析结果, 第一域名 解析结果和请求解析的域名对应。  Specifically, the cached domain name server receives the domain name resolution result deletion message sent by the authorized domain name server, and the domain name resolution result deletion message carries the domain name of the request resolution, and the domain name resolution result deletion message is used to delete the first domain name resolution result carried in the cache domain name server. The first domain name resolution result corresponds to the domain name requested to be resolved.
J2、 删除自身緩存中与请求解析的域名对应的第一域名解析结果。 具体的, 緩存域名服务器根据该域名解析结果删除信息从緩存中删除 与请求解析的域名对应的第一域名解析结果。 J2: Delete the first domain name resolution result corresponding to the domain name requested for resolution in the cache. Specifically, the cached domain name server deletes the information from the cache according to the domain name resolution result deletion information. The first domain name resolution result corresponding to the domain name requested to be resolved.
在本发明实施例中, 若第一域名解析结果对应的内容服务器发生故障 或负荷超过预设门限, 緩存域名服务器通过删除自身緩存中与该请求解析 的域名对应的第一域名解析结果, 从而在随后接收到域名解析请求后, 判 断緩存中不存在对应的域名解析结果, 则重新向授权域名服务器请求域名 解析结果, 即向授权域名服务器发送域名解析请求, 进而从授权域名服务 器获得更新的域名解析结果, 緩存域名服务器则将更新的域名解析结果向 对应的终端发送。  In the embodiment of the present invention, if the content server corresponding to the first domain name resolution result is faulty or the load exceeds a preset threshold, the cached domain name server deletes the first domain name resolution result corresponding to the domain name resolved by the request in the cache. After receiving the domain name resolution request, it is determined that the corresponding domain name resolution result does not exist in the cache, and the domain name resolution result is requested again from the authorized domain name server, that is, the domain name resolution request is sent to the authorized domain name server, and the updated domain name resolution is obtained from the authorized domain name server. As a result, the cached domain name server sends the updated domain name resolution result to the corresponding terminal.
与现有技术相比, 本发明实施例可以避免向终端发送存在故障或负荷 超过门限的内容服务器的地址, 可以避免终端向发生故障或负荷超过门限 的内容服务器请求内容, 相反可以使得终端向当前可用的内容服务器请求 内容。  Compared with the prior art, the embodiment of the present invention can avoid sending an address of a content server that has a fault or a load exceeding a threshold to the terminal, and can prevent the terminal from requesting content from a content server that has a fault or a load exceeding a threshold. The content server available to request content.
进一步的, 在本发明实施例六提供的更新域名系统緩存的方法中, 緩 存域名服务器删除自身緩存中与请求解析的域名对应的第一域名解析结果 的步骤(步骤 J2 ) 可以通过将请求解析的域名对应的第一域名解析结果的 生存时间修改为 0, 即将第一生存时间修改为 0, 緩存域名服务器将自动删 除该第一域名解析结果。  Further, in the method for updating the domain name system cache provided by the sixth embodiment of the present invention, the step of deleting the first domain name resolution result corresponding to the domain name requested to be resolved in the cache name server by the cache domain name server (step J2) may be performed by parsing the request The lifetime of the first domain name resolution corresponding to the domain name is changed to 0, and the first lifetime is changed to 0. The cached domain name server automatically deletes the first domain name resolution result.
参见图 10, 本发明实施例六中緩存域名服务器删除自身緩存中与请求 解析的域名对应的第一域名解析结果的过程(上述步骤 F2 ), 具体可以为: Referring to FIG. 10, in the sixth embodiment of the present invention, the cache domain name server deletes the first domain name resolution result corresponding to the domain name that is requested to be resolved in the cache (step F2), which may be:
Ll、 根据预先保存的对应关系在自身緩存中查找与请求解析的域名对 应的第一域名解析结果。 Ll. Search for the first domain name resolution result corresponding to the domain name requested to be resolved in the cache according to the pre-saved correspondence.
具体的, 緩存域名服务器根据预先保存的对应关系, 即请求解析的域 名和第一域名解析结果之间的对应关系, 在自身緩存中查找与请求解析的 域名对应的第一域名解析结果。  Specifically, the cached domain name server searches for the first domain name resolution result corresponding to the domain name to be resolved in the cache according to the pre-stored correspondence, that is, the correspondence between the domain name to be resolved and the first domain name resolution result.
其中, 緩存域名服务器中预先保存有请求解析的域名和第一域名解析 结果之间的对应关系。 緩存域名服务器可以在接收到授权域名服务器发送 的域名解析响应之后, 预先保存域名解析响应中的第一域名解析结果和请 求解析的域名之间的对应关系。  The cache domain name server pre-stores the correspondence between the domain name for request resolution and the first domain name resolution result. After receiving the domain name resolution response sent by the authorized domain name server, the cached domain name server pre-stores the correspondence between the first domain name resolution result in the domain name resolution response and the domain name resolved by the request.
L2、 将查找到的第一域名解析结果删除。  L2. Delete the first domain name resolution result that is found.
具体的 , 緩存域名服务器将查找到的第一域名解析结果删除。  Specifically, the cached domain name server deletes the first domain name resolution result that is found.
以上对本发明实施例提供的更新域名系统緩存的方法进行了详细描 述, 为更详细的理解本发明实施例, 下面给出本发明实施例更新域名系统 緩存的方法的具体应用场景。 参见图 11 , 图 11是本发明实施例七提供的更新域名系统緩存的方法的 应用场景图。 The method for updating the domain name system cache provided by the embodiment of the present invention is described in detail above. For a more detailed understanding of the embodiments of the present invention, a specific application scenario of the method for updating the cache of the domain name system in the embodiment of the present invention is given below. Referring to FIG. 11, FIG. 11 is an application scenario diagram of a method for updating a domain name system cache according to Embodiment 7 of the present invention.
该实施例中, 某内容提供商(域名为 www.abc.com )在某个区域部署 2 台内容服务器 Serverl 和 Server2, 授权域名服务器负责管理 Serverl 和 Server2的状态, Serverl和 Server2在工作正常的情况下, 周期性向授权域 名服务器发送状态上报消息。 Local DNS为该区域的緩存域名服务器, 该区 域中存在一些用户终端 , 例如 UE1和 UE2。  In this embodiment, a content provider (domain name www.abc.com) deploys two content servers Server1 and Server2 in a certain area, and the authorized domain name server is responsible for managing the status of Server1 and Server2, and Serverl and Server2 are working normally. The status report message is sent to the authorized name server periodically. Local DNS is the cached domain name server in the area, and there are some user terminals in the area, such as UE1 and UE2.
本发明实施例七提供的更新域名系统緩存的方法主要包括:  The method for updating the domain name system cache provided by the seventh embodiment of the present invention mainly includes:
SI、 Local DNS接收 UE1发送的域名解析请求。  The SI and Local DNS receive the domain name resolution request sent by UE1.
在本发明实施例七中, UE1 发送的域名解析请求中携带请求解析的域 名 www. abc . com和终端的地址。  In the seventh embodiment of the present invention, the domain name resolution request sent by the UE1 carries the domain name of the request resolution www.abc.com and the address of the terminal.
52、 Local DNS向授权域名服务器发送域名解析请求。  52. Local DNS sends a domain name resolution request to the authorized domain name server.
具体的, Local DNS在本地没有緩存该域名 www.abc.com对应的域名 解析结果时, 向授权域名服务器发送域名解析请求, 该域名解析请求中携 带请求解析的域名 www.abc.com和緩存域名服务器的地址。 其中, 緩存域 名服务器的地址可以为緩存域名服务器的 IP地址。  Specifically, when the local DNS does not cache the domain name resolution result corresponding to the domain name www.abc.com, the local DNS sends a domain name resolution request to the authorized domain name server, where the domain name resolution request carries the domain name www.abc.com and the cached domain name. The address of the server. The address of the cache domain name server may be the IP address of the cached domain name server.
53、 授权域名服务器根据域名解析请求进行域名解析, 获得第一域名 解析结果。  53. The authorized domain name server performs domain name resolution according to the domain name resolution request, and obtains the first domain name parsing result.
具体的, 授权域名服务器可以查找与请求解析的域名对应的第一域名 解析结果, 第一域名解析结果中包括内容服务器的地址。 在本发明实施例 中, 当 Serverl工作正常, 即可以为用户终端提供内容服务时, 第一域名解 析结果中包括 Serverl的地址 ipl以及第一域名解析结果的生存时间。  Specifically, the authorized domain name server may search for the first domain name resolution result corresponding to the domain name that is requested to be resolved, and the first domain name resolution result includes the address of the content server. In the embodiment of the present invention, when the server 1 is working properly, that is, the content service can be provided for the user terminal, the first domain name resolution result includes the address ipl of the server1 and the lifetime of the first domain name resolution result.
54、 授权域名服务器緩存第一域名解析结果和请求解析的域名之间的 对应关系、 Local DNS的地址和请求解析的域名之间的对应关系,并向 Local DNS发送域名解析响应。  54. The authorized domain name server caches the correspondence between the first domain name resolution result and the domain name requested to be resolved, the correspondence between the local DNS address and the domain name requested to be resolved, and sends a domain name resolution response to the Local DNS.
具体的, 授权域名服务器根据接收到的域名解析请求向 Local DNS发 送域名解析响应, 该域名解析响应中携带第一域名解析结果。  Specifically, the authorized domain name server sends a domain name resolution response to the local DNS according to the received domain name resolution request, and the domain name resolution response carries the first domain name resolution result.
授权域名服务器在自身緩存第一域名解析结果和请求解析的域名之间 的对应关系、 请求解析的域名和请求域名解析的緩存域名服务器之间的对 应关系。在本发明实施例中,授权域名服务器在自身緩存域名 www.abc.com 和 Local DNS的地址之间的对应关系、 以及域名 www.abc.com和第一域名 解析结果之间的对应关系。 The authorized domain name server caches the first domain name resolution result and the domain name requested to be resolved by itself. Correspondence between the corresponding relationship, the domain name requested to be resolved, and the cached domain name server requesting domain name resolution. In the embodiment of the present invention, the correspondence between the domain name server www.abc.com and the local DNS address and the correspondence between the domain name www.abc.com and the first domain name resolution result are authorized by the domain name server.
55、 授权域名服务器向 Local DNS发送域名解析响应。  55. Authorize the domain name server to send a domain name resolution response to the Local DNS.
具体的, 授权域名服务器根据域名解析请求向 Local DNS发送域名解 析响应, 其中携带第一域名解析结果。  Specifically, the authorized domain name server sends a domain name resolution response to the local DNS according to the domain name resolution request, where the first domain name resolution result is carried.
56、 Local DNS接收域名解析响应, 緩存第一域名解析结果。  56. The local DNS receives the domain name resolution response, and caches the first domain name resolution result.
57、 Local DNS向 UE1发送域名解析响应, 其中携带第一域名解析结 果。  The local DNS sends a domain name resolution response to the UE1, which carries the first domain name resolution result.
58、 UE1根据第一域名解析结果向内容服务器 Server 1请求内容。 S9-S10、授权域名服务器检测到 Server 1发生故障,获取第二域名解析 结果。  58. The UE1 requests content from the content server Server 1 according to the first domain name resolution result. On the S9-S10, the authorized domain name server detects that the server 1 is faulty and obtains the second domain name resolution result.
具体的,授权域名服务器接收到 Server 1发送的故障上报消息,或预置 时间内接收不到 Server 1的状态上报消息后判断 Serverl故障, 获取第二域 名解析结果。 在本发明实施例中, 授权域名服务器在未接收到 Server 2发 送的故障上报消息或在预置时间内接收到 Server 2发送的状态上报消息,则 判断 Server 2的状态正常,获取 Server2的 IP地址。第二域名解析结果中包 括 server 2的 IP地址以及第二生存时间。  Specifically, the authorized domain name server receives the fault report message sent by the server 1, or fails to receive the status report message of the server 1 in the preset time period, and then determines that the server 1 is faulty, and obtains the second domain name resolution result. In the embodiment of the present invention, the authorized domain name server does not receive the fault report message sent by the server 2 or receives the status report message sent by the server 2 within the preset time, and then determines that the status of the server 2 is normal, and obtains the IP address of the server 2. . The second domain name resolution result includes the IP address of server 2 and the second lifetime.
S 11、授权域名服务器将自身緩存中与 www.abc.com对应的第一域名解 析结果更新为第二域名解析结果。  S11. The authorized domain name server updates the first domain name resolution result corresponding to www.abc.com in the cache to the second domain name resolution result.
本发明实施例七中授权域名服务器查找自身緩存中 www.abc.com对应 的第一域名解析结果, 将第一域名解析结果更新为第二域名解析结果, 具 体包括将第一域名解析结果中的 Serverl的地址更新为 Server 2的地址, 并 将第一域名解析结果的生存时间 (即第一生存时间) 更新为第二域名解析 结果的生存时间 (即第二生存时间)。  In the seventh embodiment of the present invention, the domain name server is authorized to search for the first domain name resolution result corresponding to www.abc.com in the cache, and the first domain name resolution result is updated to the second domain name resolution result, which specifically includes the first domain name resolution result. The address of Server1 is updated to the address of Server 2, and the lifetime of the first domain name resolution result (ie, the first lifetime) is updated to the lifetime of the second domain name resolution result (ie, the second lifetime).
S12、 授权域名服务器向 Local DNS发送域名解析更新消息, 域名解析 更新消息中包含緩存更新指示信息、 第二域名解析结果以及域名 www.abc.com。  S12. The authorized domain name server sends a domain name resolution update message to the local DNS, and the domain name resolution update message includes cache update indication information, a second domain name resolution result, and a domain name www.abc.com.
具体的, 域名解析更新消息可以是本发明实施例新增的消息类型, 该 消息中包含緩存更新指示信息、 第二域名解析结果和域名 www.abc.com。 其中, 第二域名解析结果中包括 Server 2的地址、 以及 Server 2的地址 的生存时间 (第二生存时间)。 Specifically, the domain name resolution update message may be a new message type in the embodiment of the present invention, where the message includes cache update indication information, a second domain name resolution result, and a domain name www.abc.com. The second domain name resolution result includes the address of the server 2 and the lifetime of the address of the server 2 (second lifetime).
513、 Local DNS接收域名解析更新消息, 将緩存中与 Serverl对应的 第一域名解析结果更新为第二域名解析结果。  513. The local DNS receives the domain name resolution update message, and updates the first domain name resolution result corresponding to the server1 in the cache to the second domain name resolution result.
在本发明实施例中, Local DNS将緩存中与域名 www.abc.com对应的 第一域名解析结果更新为第二域名解析结果。 更新过程具体包括将将第一 域名解析结果中的 Serverl的地址更新为 Server 2的地址, 并将第一域名解 析结果的生存时间 (即第一生存时间) 更新为第二域名解析结果的生存时 间 (即第二生存时间)。  In the embodiment of the present invention, the local DNS updates the first domain name resolution result corresponding to the domain name www.abc.com in the cache to the second domain name resolution result. The update process specifically includes updating the address of Server1 in the first domain name resolution result to the address of Server 2, and updating the lifetime of the first domain name resolution result (that is, the first lifetime) to the survival time of the second domain name resolution result. (ie the second survival time).
其中, Local DNS在接收到域名解析更新消息后,还可对该更新消息的 合法性进行认证, 例如, 对发送方的 IP地址进行认证, 是否与上次发送域 名解析响应的源 IP地址一致。 授权域名服务器还可以同时携带根据一定密 钥生成的认证码, 密钥和使用的加密算法可以在域名解析响应消息中预先 返回给 Local DNS。 Local DNS接收到域名解析更新消息后, 根据事先获取 的密码和加密算法, 重新计算认证码, 判断接收到的认证码和计算得到的 认证码是否一致, 若一致, 则认证通过, 根据域名解析更新消息中的指示 信息删除自身緩存的第一域名解析结果。  After receiving the domain name resolution update message, the local DNS can also authenticate the validity of the update message. For example, the IP address of the sender is authenticated, and is consistent with the source IP address of the last domain name resolution response. The authorized domain name server can also carry the authentication code generated according to a certain key. The key and the encryption algorithm used can be returned to the Local DNS in advance in the domain name resolution response message. After receiving the domain name resolution update message, the local DNS recalculates the authentication code according to the previously obtained password and encryption algorithm, and determines whether the received authentication code and the calculated authentication code are consistent. If they are consistent, the authentication is passed, and the domain name is updated according to the domain name. The indication information in the message deletes the first domain name resolution result of the cache.
本发明实施例通过增加对域名解析更新消息的合法性认证, 可以增强 域名系统的安全性。  The embodiment of the present invention can enhance the security of the domain name system by increasing the legality authentication of the domain name resolution update message.
在本发明实施例七中, UE2可以向 Local DNS请求域名解析。  In the seventh embodiment of the present invention, UE2 may request domain name resolution from Local DNS.
514、 Local DNS接收 UE2发送的域名解析请求。  514. The Local DNS receives the domain name resolution request sent by the UE2.
在本发明实施例中, UE2发送的域名解析请求中携带请求解析的域名 www.abc.com。  In the embodiment of the present invention, the domain name resolution request sent by the UE2 carries the domain name www.abc.com requested for resolution.
S 15、 Local DNS在自身緩存中获取该域名的解析结果, 向 UE2返回域 名解析响应, 其中携带 Server 2的地址。  S15. The local DNS obtains the parsing result of the domain name in its own cache, and returns a domain name resolution response to the UE2, where the address of the server 2 is carried.
其中, Local DNS在自身緩存中查找与域名 www.abc.com对应的域名 解析结果,在本发明实施例中为第二域名解析结果,其中包含 Server 2的地 址。  The local DNS searches for the domain name resolution result corresponding to the domain name www.abc.com in the cache. In the embodiment of the present invention, the second domain name resolution result includes the address of the server 2.
S 16、 UE2根据第二域名解析结果向内容服务器 Server 2请求内容。 在本发明实施例中, Server的工作状态正常, UE2可以向 Server 2请求 所需的内容。 在本发明实施例中, Local DNS和授权域名服务器在 TTL超时后删除 自身緩存中的域名解析结果。 Local DNS在删除域名解析结果后, 若再次接 收到域名解析请求后, 此时緩存中不存在该域名解析结果则, 向授权域名 服务器发送域名解析请求, 授权域名服务器则根据域名解析请求进行域名 解析, 返回域名解析的结果, 并对域名解析的结果进行緩存。 Local DNS接 收到域名解析结果后, 在本地进行緩存该域名解析结果, 并返回域名解析 结果给请求的用户终端。 S16. The UE2 requests content from the content server Server 2 according to the second domain name parsing result. In the embodiment of the present invention, the working state of the server is normal, and the UE2 can request the required content from the server 2. In the embodiment of the present invention, the local DNS and the authorized domain name server delete the domain name resolution result in the cache after the TTL expires. After the local DNS deletes the domain name resolution result, if the domain name resolution request is received again, the domain name resolution result is not generated in the cache, and the domain name resolution request is sent to the authorized domain name server, and the authorized domain name server performs domain name resolution according to the domain name resolution request. , returns the result of domain name resolution, and caches the results of domain name resolution. After receiving the domain name resolution result, the local DNS caches the domain name resolution result locally, and returns the domain name resolution result to the requested user terminal.
本发明实施例七提供的更新域名系统緩存的方法可以在仍使用原 TTL 机制基础上, 及时更新 Local DNS上緩存的域名解析的结果, 避免终端请 求内容服务失败或服务延迟。  The method for updating the domain name system cache provided by the seventh embodiment of the present invention can update the result of the domain name resolution cached on the Local DNS on the basis of the original TTL mechanism, so as to avoid the terminal requesting the content service failure or the service delay.
以上对本发明实施例提供的更新域名系统緩存的方法进行了详细说 明,。 参见图 12,图 12是本发明实施例八提供的授权域名服务器的结构示意 图。  The method for updating the domain name system cache provided by the embodiment of the present invention is described in detail above. Referring to FIG. 12, FIG. 12 is a schematic structural diagram of an authorized domain name server according to Embodiment 8 of the present invention.
本发明实施例八提供的授权域名服务器包括:  The authorized domain name server provided in Embodiment 8 of the present invention includes:
解析结果获取单元 110,用于在检测到自身緩存中的第一域名解析结果 对应的内容服务器发生故障或负荷超过门限值时, 获取请求解析的域名的 第二域名解析结果, 该请求解析的域名和该第一域名解析结果对应, 该第 二域名解析结果对应的内容服务器的工作状态正常;  The parsing result obtaining unit 110 is configured to obtain a second domain name parsing result of the domain name requested to be parsed when the content server corresponding to the first domain name parsing result in the self cache is faulty or the load exceeds a threshold, and the request parsing is performed. The domain name is corresponding to the first domain name resolution result, and the working state of the content server corresponding to the second domain name resolution result is normal;
更新消息发送单元 120,用于向请求解析的域名对应的緩存域名服务器 发送域名解析更新消息, 该域名解析更新消息中携带请求解析的域名, 该 域名解析更新消息用于指示该緩存域名服务器将緩存的第一域名解析结果 更新为第二域名解析结果。  The update message sending unit 120 is configured to send a domain name resolution update message to the cached domain name server corresponding to the domain name that is requested to be parsed, where the domain name resolution update message carries the domain name requested for resolution, and the domain name resolution update message is used to indicate that the cached domain name server is to be cached. The first domain name resolution result is updated to the second domain name resolution result.
其中, 本发明实施例八提供的授权域名服务器可以使用在前述对应的 更新域名系统緩存的方法实施例一中, 详情参见上述实施例一的描述。 本 发明实施例提供的授权域名服务器通过向緩存域名服务器发送域名解析更 新消息, 使得緩存域名服务器删除自身緩存的第一域名解析结果为第二域 名解析结果, 避免向终端返回错误的第一域名解析结果。 緩存域名服务器 在随后接收到终端的域名解析请求后, 向终端返回第二域名解析结果, 而 第二域名解析结果对应的内容服务器工作状态正常, 终端可以向工作状态 正常的内容服务器请求内容。 The authorization domain name server provided in Embodiment 8 of the present invention can be used in the foregoing Embodiment 1 of the method for updating the domain name system cache. For details, refer to the description of Embodiment 1 above. The authorized domain name server provided by the embodiment of the present invention sends a domain name resolution update message to the cached domain name server, so that the cached domain name server deletes the first domain name resolution result of the cached domain name as the second domain name resolution result, and avoids returning the wrong first domain name resolution to the terminal. result. After receiving the domain name resolution request of the terminal, the cached domain name server returns a second domain name resolution result to the terminal, and The content server corresponding to the second domain name resolution result is in a normal working state, and the terminal may request content from the content server with a normal working state.
本发明实施例八提供的授权域名服务器还可以包括:  The authorized domain name server provided in the eighth embodiment of the present invention may further include:
第一更新单元 130,用于在上述解析结果获取单元 110获取请求解析的 域名的第二域名解析结果之后, 将自身緩存中的第一域名解析结果更新为 第二域名解析结果。 参见图 13 ,图 13是本发明实施例九提供的授权域名服务器的结构示意 图。  The first update unit 130 is configured to update the first domain name resolution result in the cache to the second domain name resolution result after the parsing result obtaining unit 110 obtains the second domain name resolution result of the domain name requested to be parsed. Referring to FIG. 13, FIG. 13 is a schematic structural diagram of an authorized domain name server according to Embodiment 9 of the present invention.
本发明实施例九提供的授权域名服务器包括:  The authorized domain name server provided in Embodiment 9 of the present invention includes:
第一接收单元 210, 用于接收緩存域名服务器发送的域名解析请求, 该 域名解析请求中包括请求解析的域名;  The first receiving unit 210 is configured to receive a domain name resolution request sent by the cached domain name server, where the domain name resolution request includes a domain name that is requested to be parsed;
域名解析单元 220,用于根据该域名解析请求对请求解析的域名进行解 析, 获得第一域名解析结果;  The domain name resolution unit 220 is configured to parse the domain name that is requested to be parsed according to the domain name resolution request, and obtain the first domain name resolution result;
緩存单元 230 ,用于緩存该第一域名解析结果和请求解析的域名之间的 对应关系、 以及请求解析的域名和该緩存域名服务器之间的对应关系; 解析响应发送单元 240, 用于向该緩存域名服务器发送域名解析响应, 该域名解析响应中包括上述第一域名解析结果和上述请求解析的域名; 解析结果获取单元 250,用于在检测到自身緩存中的第一域名解析结果 对应的内容服务器发生故障或负荷超过门限值时, 获取请求解析的域名的 第二域名解析结果, 请求解析的域名和上述第一域名解析结果对应, 该第 二域名解析结果对应的内容服务器的工作状态正常;  The cache unit 230 is configured to cache a correspondence between the first domain name resolution result and the domain name requested to be resolved, and a correspondence between the domain name requested to be resolved and the cache domain name server. The parsing response sending unit 240 is configured to The cached domain name server sends a domain name resolution response, and the domain name resolution response includes the first domain name resolution result and the domain name of the request resolution. The analysis result obtaining unit 250 is configured to detect the content corresponding to the first domain name resolution result in the cache. If the server is faulty or the load exceeds the threshold, the second domain name resolution result of the domain name to be resolved is obtained, and the domain name to be resolved is corresponding to the first domain name resolution result, and the content server corresponding to the second domain name resolution result is working normally. ;
更新消息发送单元 260,用于向请求解析的域名对应的緩存域名服务器 发送域名解析更新消息, 该域名解析更新消息中携带上述请求解析的域名, 该域名解析更新消息用于指示该緩存域名服务器将緩存的第一域名解析结 果更新为第二域名解析结果。  The update message sending unit 260 is configured to send a domain name resolution update message to the cached domain name server corresponding to the domain name that is requested to be parsed, where the domain name resolution update message carries the domain name of the request resolution, and the domain name resolution update message is used to indicate that the cached domain name server will The cached first domain name resolution result is updated to the second domain name resolution result.
其中, 本发明实施例九提供的授权域名服务器可以使用在前述对应的 更新域名系统緩存的方法实施例二中, 详情参见上述实施例二的描述。  The authorized domain name server provided in the ninth embodiment of the present invention can be used in the foregoing method 2 of the method for updating the domain name system cache. For details, refer to the description of the second embodiment.
进一步的, 本发明实施例九提供的授权域名服务器还包括: 第一更新单元 270,用于在解析结果获取单元 250获取请求解析的域名 的第二域名解析结果之后, 将自身緩存中的第一域名解析结果更新为第二 域名解析结果。 Further, the authorized domain name server provided in Embodiment 9 of the present invention further includes: The first update unit 270 is configured to update the first domain name resolution result in the self cache to the second domain name resolution result after the parsing result obtaining unit 250 obtains the second domain name resolution result of the domain name requested to be parsed.
参见图 14,图 14是本发明实施例九提供的授权域名服务器中更新消息 发送单元的结构示意图。  Referring to FIG. 14, FIG. 14 is a schematic structural diagram of an update message sending unit in an authorized domain name server according to Embodiment 9 of the present invention.
本发明实施例九提供的授权域名服务器中更新消息发送单元 260 可以 包括:  The update message sending unit 260 in the authorized domain name server provided in the ninth embodiment of the present invention may include:
第一查找模块 261 ,用于根据预先保存的对应关系在自身緩存中查找与 请求解析的域名对应的緩存域名服务器的地址;  The first searching module 261 is configured to search, in the cache, the address of the cached domain name server corresponding to the domain name requested to be parsed according to the pre-saved correspondence relationship;
更新消息发送模块 262 ,用于向查找到的緩存域名服务器发送域名解析 更新消息, 该域名解析更新消息中携带请求解析的域名, 该域名解析更新 消息用于指示该緩存域名服务器将緩存的第一域名解析结果更新为上述第 二域名解析结果。  The update message sending module 262 is configured to send a domain name resolution update message to the cached domain name server, where the domain name resolution update message carries the domain name requested for resolution, and the domain name resolution update message is used to indicate that the cached domain name server will cache the first The domain name resolution result is updated to the second domain name resolution result.
需要指出的是, 本发明实施例八提供的更新消息发送单元 120 的具体 结构和实施例九中的更新消息发送单元 260 的具体结构相同, 这里不再详 细描述。 参见 15 ,图 15是本发明实施例十提供的授权域名服务器的结构示意图。 本发明实施例十提供的授权域名服务器可以包括:  It should be noted that the specific structure of the update message sending unit 120 provided in the eighth embodiment of the present invention is the same as the specific structure of the update message sending unit 260 in the ninth embodiment, and will not be described in detail herein. Referring to FIG. 15, FIG. 15 is a schematic structural diagram of an authorized domain name server according to Embodiment 10 of the present invention. The authorized domain name server provided in Embodiment 10 of the present invention may include:
删除消息生成单元 310,用于在检测到自身緩存中的第一域名解析结果 对应的内容服务器发生故障或负荷超过门限值时, 生成域名解析结果删除 消息, 该域名解析结果删除消息用于删除緩存域名服务器中携带的第一域 名解析结果, 该域名解析结果删除消息中携带请求解析的域名, 请求解析 的域名和上述第一域名解析结果对应;  The deletion message generating unit 310 is configured to generate a domain name resolution result deletion message when the content server corresponding to the first domain name resolution result in the self-cache is faulty or the load exceeds a threshold, and the domain name resolution result deletion message is used for deleting The first domain name resolution result carried in the cached domain name server, where the domain name resolution result deletion message carries the domain name requested for resolution, and the domain name to be resolved corresponds to the first domain name resolution result;
删除消息发送单元 320,用于向该緩存域名服务器发送该域名解析结果 删除消息, 以便于该緩存域名服务器删除自身緩存中的第一域名解析结果, 该该緩存域名服务器和上述请求解析的域名对应。  The deletion message sending unit 320 is configured to send the domain name resolution result deletion message to the cached domain name server, so that the cached domain name server deletes the first domain name resolution result in the cache, and the cached domain name server corresponds to the domain name of the request resolution. .
其中, 本发明实施例十提供的授权域名服务器可以使用在前述对应的 更新域名系统緩存的方法实施例三中, 详情参见上述实施例三的描述。 本 发明实施例提供的授权域名服务器通过向緩存域名服务器发送域名解析结 果删除消息, 使得緩存域名服务器删除緩存的第一域名解析结果, 避免向 终端返回错误的第一域名解析结果。 緩存域名服务器在随后接收到终端的 域名解析请求后, 重新向授权域名服务器请求正确的域名解析结果, 将正 确的域名解析结果发送给緩存域名服务器, 进而使得终端可以向正确的内 容服务器请求内容。 The authorization domain name server provided in the tenth embodiment of the present invention can be used in the foregoing third embodiment of the method for updating the domain name system cache. For details, refer to the description of the third embodiment. The authorized domain name server according to the embodiment of the present invention sends a domain name resolution result deletion message to the cached domain name server, so that the cached domain name server deletes the cached first domain name resolution result, and avoids The terminal returns the wrong first domain name resolution result. After receiving the domain name resolution request of the terminal, the cached domain name server re-requests the correct domain name resolution result to the authorized domain name server, and sends the correct domain name resolution result to the cached domain name server, so that the terminal can request the content from the correct content server.
参见图 16,图 16是本发明实施例十提供的授权域名服务器中删除消息 发送单元的结构示意图。  Referring to FIG. 16, FIG. 16 is a schematic structural diagram of a deletion message sending unit in an authorized domain name server according to Embodiment 10 of the present invention.
本发明实施例十提供的授权域名服务器中删除消息发送单元 320具体 可以包括:  The deletion message sending unit 320 in the authorized domain name server provided by the tenth embodiment of the present invention may specifically include:
第二查找模块 321 ,用于根据预先保存的对应关系在自身緩存中查找与 请求解析的域名对应的緩存域名服务器的地址;  The second searching module 321 is configured to search, in the cache, the address of the cached domain name server corresponding to the domain name requested to be parsed according to the pre-saved correspondence relationship;
删除消息发送模块 322 ,用于向查找到的緩存域名服务器发送域名解析 结果删除消息, 以便于该緩存域名服务器删除自身緩存中的第一域名解析 结果, 该緩存域名服务器和请求解析的域名对应。 参见图 17,图 17是本发明实施例十一提供的授权域名服务器的结构示 意图。  The delete message sending module 322 is configured to send a domain name resolution result deletion message to the cached domain name server, so that the cached domain name server deletes the first domain name resolution result in the cache, and the cached domain name server corresponds to the domain name requested to be resolved. Referring to FIG. 17, FIG. 17 is a schematic diagram showing the structure of an authorized domain name server according to Embodiment 11 of the present invention.
本发明实施例十一提供的授权域名服务器可以包括:  The authorized domain name server provided in Embodiment 11 of the present invention may include:
第一接收单元 410, 用于接收緩存域名服务器发送的域名解析请求, 该 域名解析请求中包括请求解析的域名;  The first receiving unit 410 is configured to receive a domain name resolution request sent by the cached domain name server, where the domain name resolution request includes a domain name that is requested to be parsed;
域名解析单元 420,用于根据该域名解析请求对请求解析的域名进行解 析, 获得第一域名解析结果;  The domain name resolution unit 420 is configured to parse the domain name that is requested to be parsed according to the domain name resolution request, and obtain the first domain name resolution result;
緩存单元 430,用于緩存第一域名解析结果和请求解析的域名之间的对 应关系、 以及请求解析的域名和该緩存域名服务器之间的对应关系;  The cache unit 430 is configured to cache a correspondence between the first domain name resolution result and the domain name requested to be parsed, and a correspondence between the domain name requested to be resolved and the cache domain name server;
解析响应发送单元 440, 用于向该緩存域名服务器发送域名解析响应, 该域名解析响应中包括上述第一域名解析结果和上述请求解析的域名。  The analytic response sending unit 440 is configured to send a domain name resolution response to the cached domain name server, where the domain name resolution response includes the first domain name resolution result and the domain name of the request resolution.
删除消息生成单元 450,用于在检测到自身緩存中的第一域名解析结果 对应的内容服务器发生故障或负荷超过门限值时, 生成域名解析结果删除 消息, 该域名解析结果删除消息用于删除緩存域名服务器中携带的第一域 名解析结果, 该域名解析结果删除消息中携带请求解析的域名, 请求解析 的域名和第一域名解析结果对应; 删除消息发送单元 460,用于向该緩存域名服务器发送该域名解析结果 删除消息, 以便于该緩存域名服务器删除自身緩存中的第一域名解析结果, 该緩存域名服务器和上述请求解析的域名对应。 The deletion message generating unit 450 is configured to generate a domain name resolution result deletion message when the content server corresponding to the first domain name resolution result in the self-cache is faulty or the load exceeds a threshold, and the domain name resolution result deletion message is used for deleting The first domain name resolution result carried in the cached domain name server, where the domain name resolution result deletion message carries the domain name requested for resolution, and the domain name to be resolved corresponds to the first domain name resolution result; The deletion message sending unit 460 is configured to send the domain name resolution result deletion message to the cached domain name server, so that the cached domain name server deletes the first domain name resolution result in the cache, and the cached domain name server corresponds to the domain name requested to be resolved.
其中, 本发明实施例十一提供的授权域名服务器可以使用在前述对应 的更新域名系统緩存的方法实施例四中, 详情参见上述实施例四的描述。  The authorization domain name server provided in the eleventh embodiment of the present invention can be used in the foregoing method 4 of the method for updating the domain name system cache. For details, refer to the description of the fourth embodiment.
需要指出的是, 本发明实施例十一提供的删除消息发送单元 460的具 体结构和实施例十中的删除消息发送单元 320的具体结构相同, 这里不再 详细描述。 参见图 18,图 18是本发明实施例十二提供的緩存域名服务器的结构示 意图。  It should be noted that the specific structure of the delete message sending unit 460 provided in the eleventh embodiment of the present invention is the same as the specific structure of the delete message sending unit 320 in the tenth embodiment, and will not be described in detail herein. Referring to FIG. 18, FIG. 18 is a schematic structural diagram of a cached domain name server according to Embodiment 12 of the present invention.
本发明实施例十二提供的緩存域名服务器包括:  The cached domain name server provided in Embodiment 12 of the present invention includes:
更新消息接收单元 510,用于接收授权域名服务器发送的域名解析更新 消息, 该域名解析更新消息用于指示该緩存域名服务器将緩存的第一域名 解析结果更新为上述第二域名解析结果, 该域名解析更新消息中携带请求 解析的域名;  The update message receiving unit 510 is configured to receive a domain name resolution update message sent by the authorized domain name server, where the domain name resolution update message is used to indicate that the cached domain name server updates the cached first domain name resolution result to the second domain name resolution result, and the domain name is Parsing the domain name carrying the request resolution in the update message;
第二更新单元 520,用于将自身緩存中的第一域名解析结果更新为上述 第二域名解析结果, 第一域名解析结果和请求解析的域名对应。  The second update unit 520 is configured to update the first domain name resolution result in the self cache to the second domain name resolution result, where the first domain name resolution result corresponds to the domain name requested to be parsed.
本发明实施例十二提供的緩存域名服务器可以使用在前述对应的更新 域名系统緩存的方法实施例五中, 详情参见上述实施例五的描述。 在本发 明实施例提供的緩存域名服务器通过将自身緩存中与请求解析的域名对应 的第一域名解析结果更新为第二域名解析结果, 可以在随后接收到域名解 析请求后, 将更新的域名解析结果, 即第二域名解析结果向终端发送。 和 现有技术相比, 本发明实施例通过删除自身緩存中的域名解析结果, 可以 避免终端向发生故障的内容服务器请求内容, 进一步使得终端向当前可用 的内容服务器请求内容。  The cached domain name server provided in Embodiment 12 of the present invention can be used in the foregoing Embodiment 5 of the method for updating the domain name system cache. For details, refer to the description of Embodiment 5 above. The cached domain name server provided by the embodiment of the present invention updates the first domain name resolution result corresponding to the domain name to be resolved in the cache to the second domain name resolution result, and may further analyze the updated domain name after receiving the domain name resolution request. As a result, the second domain name resolution result is sent to the terminal. Compared with the prior art, the embodiment of the present invention can prevent the terminal from requesting content from the failed content server by deleting the domain name resolution result in the self cache, and further causes the terminal to request content from the currently available content server.
进一步的, 本发明实施例十二提供的緩存域名服务器还可以进一步包 括:  Further, the cached domain name server provided in Embodiment 12 of the present invention may further include:
超时删除单元 530, 用于在第二生存时间超时后,删除自身緩存中的该 第二域名解析结果。 参见图 19,图 19是本发明实施例十二提供的緩存域名服务器中第二更 新单元的结构示意图。 The timeout deleting unit 530 is configured to delete the second domain name resolution result in the self cache after the second timeout period expires. Referring to FIG. 19, FIG. 19 is a schematic structural diagram of a second update unit in a cached domain name server according to Embodiment 12 of the present invention.
本发明实施例十二提供的緩存域名服务器中第二更新单元 520可以包 括:  The second update unit 520 in the cached domain name server provided in the twelfth embodiment of the present invention may include:
第三查找模块 521 ,用于根据预先保存的对应关系在自身緩存中查找与 请求解析的域名对应的第一域名解析结果, 该第一域名解析结果和上述请 求解析的域名对应;  The third search module 521 is configured to search, in the cache, the first domain name resolution result corresponding to the domain name that is requested to be parsed according to the pre-stored correspondence relationship, where the first domain name resolution result corresponds to the domain name resolved by the request;
緩存更新模块 522,用于将查找到的第一域名解析结果更新为该第二域 名解析结果。 参见图 20,图 20是本发明实施例十三提供的緩存域名服务器的结构示 意图。  The cache update module 522 is configured to update the first domain name resolution result that is found to the second domain name resolution result. Referring to FIG. 20, FIG. 20 is a schematic structural diagram of a cached domain name server according to Embodiment 13 of the present invention.
本发明实施例十三提供的緩存域名服务器包括:  The cached domain name server provided in Embodiment 13 of the present invention includes:
删除消息接收单元 610,用于接收授权域名服务器发送的域名解析结果 删除消息, 该域名解析结果删除消息中携带请求解析的域名, 该域名解析 结果删除消息用于删除緩存域名服务器中携带的第一域名解析结果, 该第 一域名解析结果和上述请求解析的域名对应;  The deletion message receiving unit 610 is configured to receive a domain name resolution result deletion message sent by the authorized domain name server, where the domain name resolution result deletion message carries the domain name requested to be resolved, and the domain name resolution result deletion message is used to delete the first carried in the cache domain name server. The domain name resolution result, the first domain name resolution result corresponding to the domain name of the request resolution;
删除执行单元 620 ,用于删除自身緩存中与请求解析的域名对应的第一 域名解析结果。  The deletion execution unit 620 is configured to delete the first domain name resolution result corresponding to the domain name requested for resolution in the cache.
本发明实施例十三提供的緩存域名服务器可以使用在前述对应的更新 域名系统緩存的方法实施例六中, 详情参见上述实施例六的描述。 本发明 实施例提供的緩存域名服务器通过删除自身緩存中与该请求解析的域名对 应的第一域名解析结果, 从而在随后接收到域名解析请求后, 判断緩存中 不存在对应的域名解析结果, 则重新向授权域名服务器请求域名解析结果, 即向授权域名服务器发送域名解析请求, 进而从授权域名服务器获得更新 的域名解析结果, 緩存域名服务器将更新的域名解析结果向对应的终端发 送。 与现有技术相比, 本发明实施例可以避免向终端发送存在故障或负荷 超过门限的内容服务器的地址, 可以避免终端向发生故障或负荷超过门限 的内容服务器请求内容, 相反可以使得终端向当前可用的内容服务器请求 内容。 参见图 21 ,图 21是本发明实施例十三提供的緩存域名服务器中删除执 行单元的结构示意图。 The cached domain name server provided in the thirteenth embodiment of the present invention can be used in the foregoing sixth embodiment of the method for updating the domain name system cache. For details, refer to the description of the sixth embodiment. The cached domain name server provided by the embodiment of the present invention deletes the first domain name resolution result corresponding to the domain name resolved by the request in the cache, and then determines that the corresponding domain name resolution result does not exist in the cache after receiving the domain name resolution request. The domain name resolution request is sent to the authorized domain name server, and the domain name resolution request is sent to the authorized domain name server, and the updated domain name resolution result is obtained from the authorized domain name server, and the cached domain name server sends the updated domain name resolution result to the corresponding terminal. Compared with the prior art, the embodiment of the present invention can avoid sending an address of a content server that has a fault or a load exceeding a threshold to the terminal, and can prevent the terminal from requesting content from a content server that has a fault or a load exceeding a threshold. The content server available to request content. Referring to FIG. 21, FIG. 21 is a schematic structural diagram of a deletion execution unit in a cached domain name server according to Embodiment 13 of the present invention.
本发明实施例十三提供的緩存域名服务器中删除执行单元 620可以包 括:  The deletion execution unit 620 in the cached domain name server provided in the thirteenth embodiment of the present invention may include:
第四查找模块 621 ,用于根据预先保存的对应关系在自身緩存中查找与 请求解析的域名对应的第一域名解析结果;  The fourth search module 621 is configured to search, in the cache, the first domain name resolution result corresponding to the domain name requested to be parsed according to the pre-stored correspondence relationship;
緩存删除模块 622, 用于将查找到的第一域名解析结果删除。  The cache deletion module 622 is configured to delete the first domain name resolution result that is found.
需要说明的是, 上述緩存域名服务器和授权域名服务器中各单元之间 的信息交互、 执行过程等内容, 由于与本发明方法实施例基于同一构思, 具体内容可参见本发明方法实施例中的叙述, 此处不再赘述。  It should be noted that the information exchange, the execution process, and the like between the cached domain name server and the authorized domain name server are based on the same concept as the method embodiment of the present invention. For details, refer to the description in the method embodiment of the present invention. , will not repeat them here.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流 程, 是可以通过计算机程序来指令相关的硬件来完成, 的程序可存储于计 算机可读取存储介质中, 该程序在执行时, 可包括如上述各方法的实施例 的流程。 其中, 的存储介质可为磁碟、 光盘、 只读存储记忆体(Read-Only A person skilled in the art can understand that all or part of the processes in the above embodiments are implemented by a computer program to instruct related hardware, and the program can be stored in a computer readable storage medium. The flow of an embodiment of the methods as described above may be included. The storage medium can be a disk, a CD, or a read-only memory (Read-Only).
Memory, ROM )或随机存者 i己忆体 ( Random Access Memory, RAM )等。 Memory, ROM) or Random Access Memory (RAM).
以上对本发明实施例提供的更新域名系统緩存的方法和授权域名服 务器、 緩存域名服务器进行了详细介绍, 对于本领域的一般技术人员, 依 据本发明实施例的思想, 在具体实施方式及应用范围上均会有改变之处, 本说明书内容不应理解为对本发明的限制。  The method for updating the domain name system cache and the authorized domain name server and the cached domain name server provided by the embodiment of the present invention are described in detail. For those skilled in the art, according to the idea of the embodiment of the present invention, in the specific implementation manner and application scope There are variations, and the description should not be construed as limiting the invention.

Claims

权利 要求 Rights request
1、 一种更新域名系统緩存的方法, 其特征在于, 包括: A method for updating a domain name system cache, comprising:
在检测到自身緩存中的第一域名解析结果对应的内容服务器发生故障 或负荷超过门限值时, 获取请求解析的域名的第二域名解析结果, 所述请 求解析的域名和所述第一域名解析结果对应, 所述第二域名解析结果对应 的内容服务器的工作状态正常;  If the content server corresponding to the first domain name resolution result in the cache is faulty or the load exceeds the threshold, the second domain name resolution result of the domain name that is requested to be resolved is obtained, and the domain name and the first domain name that are requested to be resolved are obtained. Corresponding to the analysis result, the working state of the content server corresponding to the second domain name resolution result is normal;
向所述请求解析的域名对应的緩存域名服务器发送域名解析更新消 息, 所述域名解析更新消息中携带所述请求解析的域名, 所述域名解析更 新消息用于指示所述緩存域名服务器将緩存的第一域名解析结果更新为所 述第二域名解析结果。  Sending a domain name resolution update message to the cached domain name server corresponding to the domain name that is requested to be parsed, where the domain name resolution update message carries the domain name of the request resolution, and the domain name resolution update message is used to indicate that the cached domain name server is to be cached. The first domain name resolution result is updated to the second domain name resolution result.
2、 根据权利要求 1所述的方法, 其特征在于, 所述在检测到自身緩存 中的第一域名解析结果对应的内容服务器发生故障或负荷超过门限值时之 前, 还包括:  The method according to claim 1, wherein the detecting, before the content server corresponding to the first domain name resolution result in the cache is faulty or the load exceeds the threshold, the method further includes:
接收緩存域名服务器发送的域名解析请求, 所述域名解析请求中包括 请求解析的域名;  Receiving a domain name resolution request sent by the cached domain name server, where the domain name resolution request includes a domain name requested to be resolved;
根据所述域名解析请求对所述请求解析的域名进行解析, 获得第一域 名解析结果;  Parsing the domain name that is parsed by the request according to the domain name resolution request, and obtaining a first domain name resolution result;
緩存所述第一域名解析结果和所述请求解析的域名之间的对应关系、 以及请求解析的域名和所述緩存域名服务器之间的对应关系, 向所述緩存 域名服务器发送域名解析响应, 所述域名解析响应中包括所述第一域名解 析结果和所述请求解析的域名。  Cache a correspondence between the first domain name resolution result and the domain name that is requested to be resolved, and a correspondence between the domain name requested to be resolved and the cached domain name server, and send a domain name resolution response to the cached domain name server. The domain name resolution response includes the first domain name resolution result and the domain name of the request resolution.
3、 根据权利要求 2所述的方法, 其特征在于, 在所述获取请求解析的 域名的第二域名解析结果之后, 还包括:  The method according to claim 2, further comprising: after the obtaining the second domain name resolution result of the domain name that is requested to be parsed,
将自身緩存中的所述第一域名解析结果更新为所述第二域名解析结 果。  Updating the first domain name resolution result in the self cache to the second domain name resolution result.
4、 根据权利要求 1所述的方法, 其特征在于, 所述检测到自身緩存中 的第一域名解析结果对应的内容服务器发生故障, 包括:  The method according to claim 1, wherein the detecting that the content server corresponding to the first domain name resolution result in the cache is faulty comprises:
接收到自身緩存中第一域名解析结果对应的内容服务器发送的故障上 报消息, 或者在预置时间内未接收到所述内容服务器发送的状态上报消息, 则判断所述内容服务器发生故障。 If the fault report message sent by the content server corresponding to the first domain name resolution result in the cache is received, or the status report message sent by the content server is not received within the preset time, the content server is determined to be faulty.
5、 根据权利要求 1所述的方法, 其特征在于, 所述向第一域名解析结 果对应的緩存域名服务器发送域名解析更新消息, 包括: The method according to claim 1, wherein the sending the domain name resolution update message to the cached domain name server corresponding to the first domain name resolution result comprises:
根据预先保存的对应关系在自身緩存中查找与所述请求解析的域名对 应的緩存域名服务器的地址;  Searching, in the cache, the address of the cached domain name server corresponding to the domain name that the request resolves according to the pre-saved correspondence;
向查找到的緩存域名服务器发送域名解析更新消息。  Send a domain name resolution update message to the discovered cached domain name server.
6、 根据权利要求 1到 5任一项所述的方法, 其特征在于,  6. A method according to any one of claims 1 to 5, characterized in that
所述域名解析更新消息中还包含緩存更新指示信息和第二域名解析结 果, 所述緩存更新指示信息用于指示所述緩存域名服务器将緩存的第一域 名解析结果更新为所述第二域名解析结果。  The domain name resolution update message further includes cache update indication information and a second domain name resolution result, where the cache update indication information is used to indicate that the cached domain name server updates the cached first domain name resolution result to the second domain name resolution result.
7、 一种更新域名系统緩存的方法, 其特征在于, 包括:  7. A method for updating a domain name system cache, the method comprising:
在检测到自身緩存中的第一域名解析结果对应的内容服务器发生故障 或负荷超过门限值时, 生成域名解析结果删除消息, 所述域名解析结果删 除消息用于删除緩存域名服务器中的第一域名解析结果, 所述域名解析结 果删除消息中携带请求解析的域名, 所述请求解析的域名和所述第一域名 解析结果对应;  When the content server corresponding to the first domain name resolution result in the cache is faulty or the load exceeds the threshold, the domain name resolution result deletion message is generated, and the domain name resolution result deletion message is used to delete the first in the cache domain name server. The domain name resolution result, the domain name resolution result deletion message carries the domain name requested for resolution, and the domain name of the request resolution corresponds to the first domain name resolution result;
向所述緩存域名服务器发送所述域名解析结果删除消息, 以使所述緩 存域名服务器删除自身緩存中的第一域名解析结果 , 所述緩存域名服务器 和所述请求解析的域名对应。  Sending the domain name resolution result deletion message to the cached domain name server, so that the cached domain name server deletes the first domain name resolution result in the cache, and the cached domain name server corresponds to the domain name of the request resolution.
8、 根据权利要求 7所述的方法, 其特征在于, 在所述检测到自身緩存 中的第一域名解析结果对应的内容服务器发生故障或负荷超过门限值之 前, 还包括:  The method according to claim 7, wherein before the detecting that the content server corresponding to the first domain name resolution result in the self cache fails or the load exceeds a threshold, the method further includes:
接收緩存域名服务器发送的域名解析请求, 所述域名解析请求中包括 请求解析的域名;  Receiving a domain name resolution request sent by the cached domain name server, where the domain name resolution request includes a domain name requested to be resolved;
根据所述域名解析请求对所述请求解析的域名进行解析, 获得第一域 名解析结果;  Parsing the domain name that is parsed by the request according to the domain name resolution request, and obtaining a first domain name resolution result;
緩存所述第一域名解析结果和所述请求解析的域名之间的对应关系、 以及所述请求解析的域名和所述緩存域名服务器之间的对应关系, 向所述 緩存域名服务器发送域名解析响应, 所述域名解析响应中包括所述第一域 名解析结果和所述请求解析的域名。  Cache a correspondence between the first domain name resolution result and the domain name that is requested to be resolved, and a correspondence between the domain name that is requested to be resolved and the cached domain name server, and send a domain name resolution response to the cached domain name server. The domain name resolution response includes the first domain name resolution result and the domain name of the request resolution.
9、 根据权利要求 7所述的方法, 其特征在于, 所述检测到自身緩存中 的第一域名解析结果对应的内容服务器发生故障, 包括: 接收到自身緩存中的第一域名解析结果对应的内容服务器发送的故障 上报消息, 或者在预置时间内未接收到所述内容服务器发送的状态上报消 息, 则判断所述内容服务器发生故障。 The method according to claim 7, wherein the detecting that the content server corresponding to the first domain name resolution result in the cache is faulty comprises: If the fault report message sent by the content server corresponding to the first domain name resolution result in the cache is received, or the status report message sent by the content server is not received within the preset time, the content server is determined to be faulty.
10、 根据权利要求 7所述的方法, 其特征在于, 所述向请求解析的域 名对应的緩存域名服务器发送所述域名解析结果删除消息, 包括:  The method according to claim 7, wherein the sending the domain name resolution result deletion message to the cached domain name server corresponding to the domain name that is requested to be parsed comprises:
根据预先保存的对应关系在自身緩存中查找与所述请求解析的域名对 应的緩存域名服务器的地址;  Searching, in the cache, the address of the cached domain name server corresponding to the domain name that the request resolves according to the pre-saved correspondence;
向查找到的緩存域名服务器发送域名解析结果删除消息。  Send a domain name resolution result deletion message to the found cached domain name server.
11、 一种更新域名系统緩存的方法, 其特征在于, 包括:  11. A method for updating a domain name system cache, the method comprising:
接收授权域名服务器发送的域名解析更新消息, 所述域名解析更新消 息用于指示緩存域名服务器将緩存的第一域名解析结果更新为所述第二域 名解析结果, 所述域名解析更新消息中携带请求解析的域名;  Receiving a domain name resolution update message sent by the authorized domain name server, where the domain name resolution update message is used to indicate that the cached domain name server updates the cached first domain name resolution result to the second domain name resolution result, where the domain name resolution update message carries the request Resolved domain name;
将自身緩存中的第一域名解析结果更新为所述第二域名解析结果, 所 述第一域名解析结果和所述请求解析的域名对应。  And updating the first domain name resolution result in the cache to the second domain name resolution result, where the first domain name resolution result corresponds to the domain name of the request resolution.
12、 根据权利要求 11所述的方法, 其特征在于, 所述第二域名解析结 果中还包括第二生存时间, 所述方法还包括:  The method according to claim 11, wherein the second domain name resolution result further includes a second time to live, the method further comprising:
在所述第二生存时间超时后, 删除自身緩存中的所述第二域名解析结 果。  After the second survival time expires, the second domain name resolution result in the self cache is deleted.
13、 根据权利要求 11所述的方法, 其特征在于, 所述将自身緩存中的 第一域名解析结果更新为所述第二域名解析结果, 包括:  The method according to claim 11, wherein the updating the first domain name resolution result in the self cache to the second domain name resolution result comprises:
根据预先保存的对应关系在自身緩存中查找与请求解析的域名对应的 第一域名解析结果;  Finding a first domain name resolution result corresponding to the domain name requested to be resolved in the cache according to the pre-saved correspondence relationship;
将查找到的第一域名解析结果更新为所述第二域名解析结果。  Updating the first domain name resolution result that is found to the second domain name resolution result.
14、 一种更新域名系统緩存的方法, 其特征在于, 包括:  14. A method for updating a cache of a domain name system, comprising:
接收授权域名服务器发送的域名解析结果删除消息, 所述域名解析结 果删除消息中携带请求解析的域名, 所述域名解析结果删除消息用于删除 緩存域名服务器中携带的第一域名解析结果, 所述第一域名解析结果和所 述请求解析的域名对应;  And receiving the domain name resolution result deletion message sent by the authorized domain name server, where the domain name resolution result deletion message carries the domain name of the request resolution, and the domain name resolution result deletion message is used to delete the first domain name resolution result carried in the cache domain name server, The first domain name resolution result corresponds to the domain name of the request resolution;
删除自身緩存中与所述请求解析的域名对应的第一域名解析结果。 The first domain name resolution result corresponding to the domain name that is requested to be resolved in the cache is deleted.
15、 根据权利要求 14所述的方法, 其特征在于, 所述删除自身緩存中 与请求解析的域名对应的第一域名解析结果, 包括: 根据预先保存的对应关系在自身緩存中查找与请求解析的域名对应的 第一域名解析结果; The method according to claim 14, wherein the deleting the first domain name resolution result corresponding to the domain name requested to be parsed in the self cache includes: Searching, in the cache, the first domain name resolution result corresponding to the domain name requested to be resolved according to the pre-stored correspondence relationship;
将查找到的第一域名解析结果删除。  Delete the first domain name resolution result found.
16、 一种授权域名服务器, 其特征在于, 包括:  16. An authorized domain name server, characterized by comprising:
解析结果获取单元, 用于在检测到自身緩存中的第一域名解析结果对 应的内容服务器发生故障或负荷超过门限值时, 获取请求解析的域名的第 二域名解析结果, 所述请求解析的域名和所述第一域名解析结果对应, 所 述第二域名解析结果对应的内容服务器的工作状态正常;  The parsing result obtaining unit is configured to obtain a second domain name parsing result of the domain name requested to be parsed when the content server corresponding to the first domain name parsing result in the self cache is faulty or the load exceeds a threshold, and the request is parsed The domain name is corresponding to the first domain name resolution result, and the working state of the content server corresponding to the second domain name resolution result is normal;
更新消息发送单元, 用于向所述请求解析的域名对应的緩存域名服务 器发送域名解析更新消息 , 所述域名解析更新消息中携带所述请求解析的 域名 , 所述域名解析更新消息用于指示所述緩存域名服务器将緩存的第一 域名解析结果更新为所述第二域名解析结果。  An update message sending unit, configured to send a domain name resolution update message to the cached domain name server corresponding to the domain name that is requested to be parsed, where the domain name resolution update message carries the domain name that is requested to be parsed, and the domain name resolution update message is used to indicate The cached domain name server updates the cached first domain name resolution result to the second domain name resolution result.
17、 根据权利要求 16所述授权域名服务器, 其特征在于, 还包括: 第一接收单元, 用于接收緩存域名服务器发送的域名解析请求, 所述 域名解析请求中包括请求解析的域名;  The authorization domain name server according to claim 16, further comprising: a first receiving unit, configured to receive a domain name resolution request sent by the cached domain name server, where the domain name resolution request includes a domain name that is requested to be parsed;
域名解析单元, 用于根据所述域名解析请求对所述请求解析的域名进 行解析, 获得第一域名解析结果;  a domain name resolution unit, configured to parse the domain name resolved by the request according to the domain name resolution request, and obtain a first domain name resolution result;
緩存单元, 用于緩存第一域名解析结果和所述请求解析的域名之间的 对应关系、 以及请求解析的域名和所述緩存域名服务器之间的对应关系; 解析响应发送单元, 用于向所述緩存域名服务器发送域名解析响应, 所述域名解析响应中包括所述第一域名解析结果和所述请求解析的域名。  a cache unit, configured to cache a correspondence between the first domain name resolution result and the domain name of the request resolution, and a correspondence between the domain name requested to be resolved and the cached domain name server; and an analysis response sending unit, configured to The cached domain name server sends a domain name resolution response, and the domain name resolution response includes the first domain name resolution result and the domain name of the request resolution.
18、 根据权利要求 16或 17所述的授权域名服务器, 其特征在于, 还 包括:  The authorized domain name server according to claim 16 or 17, further comprising:
第一更新单元, 用于在所述解析结果获取单元获取请求解析的域名的 第二域名解析结果之后, 将自身緩存中的所述第一域名解析结果更新为所 述第二域名解析结果。  The first update unit is configured to update the first domain name resolution result in the self cache to the second domain name resolution result after the parsing result obtaining unit obtains the second domain name resolution result of the domain name requested to be parsed.
19、 根据权利要求 16所述的授权域名服务器, 其特征在于, 所述更新 消息发送单元包括:  The authorized domain name server according to claim 16, wherein the update message sending unit comprises:
第一查找模块, 用于根据预先保存的对应关系在自身緩存中查找与所 述请求解析的域名对应的緩存域名服务器; 更新消息发送模块, 用于向查找到的緩存域名服务器发送域名解析更 新消息, 所述域名解析更新消息中携带所述请求解析的域名, 所述域名解 析更新消息用于指示所述緩存域名服务器将緩存的第一域名解析结果更新 为所述第二域名解析结果。 a first search module, configured to search, in the cache, the cached domain name server corresponding to the domain name that is requested to be parsed according to the pre-saved correspondence relationship; An update message sending module, configured to send a domain name resolution update message to the cached domain name server, where the domain name resolution update message carries the domain name of the request resolution, and the domain name resolution update message is used to indicate that the cached domain name server will The cached first domain name resolution result is updated to the second domain name resolution result.
20、 一种授权域名服务器, 其特征在于, 包括  20. An authorized domain name server, characterized in that
删除消息生成单元, 用于在检测到自身緩存中的第一域名解析结果对 应的内容服务器发生故障或负荷超过门限值时, 生成域名解析结果删除消 息 , 所述域名解析结果删除消息用于删除緩存域名服务器中携带的第一域 名解析结果, 所述域名解析结果删除消息中携带请求解析的域名, 请求解 析的域名和所述第一域名解析结果对应;  And a message generating unit, configured to: when detecting that the content server corresponding to the first domain name resolution result in the cache is faulty or the load exceeds a threshold, generating a domain name resolution result deletion message, where the domain name resolution result deletion message is used for deleting The first domain name resolution result carried in the cached domain name server, where the domain name resolution result deletion message carries the domain name requested for resolution, and the domain name to be resolved corresponds to the first domain name resolution result;
删除消息发送单元, 用于向所述緩存域名服务器发送所述域名解析结 果删除消息, 以使所述緩存域名服务器删除自身緩存中的第一域名解析结 果, 所述緩存域名服务器和所述请求解析的域名对应。  a message sending unit, configured to send the domain name resolution result deletion message to the cached domain name server, so that the cached domain name server deletes a first domain name resolution result in the cache, the cached domain name server, and the request resolution The domain name corresponds.
21、 根据权利要求 20所述的授权域名服务器, 其特征在于, 还包括: 第一接收单元, 用于接收緩存域名服务器发送的域名解析请求, 所述 域名解析请求中包括请求解析的域名;  The authorized domain name server according to claim 20, further comprising: a first receiving unit, configured to receive a domain name resolution request sent by the cached domain name server, where the domain name resolution request includes a domain name that is requested to be parsed;
域名解析单元, 用于根据所述域名解析请求对所述请求解析的域名进 行解析, 获得第一域名解析结果;  a domain name resolution unit, configured to parse the domain name resolved by the request according to the domain name resolution request, and obtain a first domain name resolution result;
緩存单元, 用于緩存第一域名解析结果和所述请求解析的域名之间的 对应关系、 以及请求解析的域名和所述緩存域名服务器之间的对应关系; 解析响应发送单元, 用于向所述緩存域名服务器发送域名解析响应, 所述域名解析响应中包括所述第一域名解析结果和所述请求解析的域名。  a cache unit, configured to cache a correspondence between the first domain name resolution result and the domain name of the request resolution, and a correspondence between the domain name requested to be resolved and the cached domain name server; and an analysis response sending unit, configured to The cached domain name server sends a domain name resolution response, and the domain name resolution response includes the first domain name resolution result and the domain name of the request resolution.
22、 根据权利要求 20所述的授权域名服务器, 其特征在于, 所述删除 消息发送单元包括:  The authorization domain name server according to claim 20, wherein the deletion message sending unit comprises:
第二查找模块, 用于根据预先保存的对应关系在自身緩存中查找与所 述请求解析的域名对应的緩存域名服务器的地址;  a second searching module, configured to search, in the cache, the address of the cached domain name server corresponding to the domain name that is requested to be parsed according to the pre-saved correspondence relationship;
删除消息发送模块, 用于向查找到的緩存域名服务器发送域名解析结 果删除消息, 以使所述緩存域名服务器删除自身緩存中的第一域名解析结 果, 所述緩存域名服务器和所述请求解析的域名对应。  And a message sending module, configured to send a domain name resolution result deletion message to the cached domain name server, so that the cached domain name server deletes the first domain name resolution result in the cache, and the cached domain name server and the request parsing The domain name corresponds.
23、 一种緩存域名服务器, 其特征在于, 包括: 更新消息接收单元, 用于接收授权域名服务器发送的域名解析更新消 息, 所述域名解析更新消息用于指示緩存域名服务器将緩存的第一域名解 析结果更新为所述第二域名解析结果 , 所述域名解析更新消息中携带请求 解析的域名; 23. A cached domain name server, comprising: An update message receiving unit, configured to receive a domain name resolution update message sent by the authorized domain name server, where the domain name resolution update message is used to indicate that the cached domain name server updates the cached first domain name resolution result to the second domain name resolution result, The domain name resolution update message carries the domain name requested for resolution;
第二更新单元, 用于将自身緩存中的第一域名解析结果更新为所述第 二域名解析结果, 所述第一域名解析结果和所述请求解析的域名对应。  The second update unit is configured to update the first domain name resolution result in the cache to the second domain name resolution result, where the first domain name resolution result corresponds to the domain name requested to be resolved.
24、 根据权利要求 23所述的緩存域名服务器, 其特征在于, 所述第二 域名解析结果中还包括第二生存时间, 所述緩存域名服务器还包括:  The cached domain name server according to claim 23, wherein the second domain name resolution result further includes a second lifetime, the cached domain name server further comprising:
超时删除单元, 用于在所述第二生存时间超时后, 删除自身緩存中的 所述第二域名解析结果。  The timeout deleting unit is configured to delete the second domain name resolution result in the self cache after the second timeout period expires.
25、 根据权利要求 23所述的緩存域名服务器, 其特征在于, 所述第二 更新单元包括:  The cached domain name server according to claim 23, wherein the second update unit comprises:
第三查找模块, 用于根据预先保存的对应关系在自身緩存中查找与请 求解析的域名对应的第一域名解析结果, 所述第一域名解析结果和所述请 求解析的域名对应;  a third search module, configured to search, in the cache, the first domain name resolution result corresponding to the domain name that is requested to be resolved according to the pre-stored correspondence, where the first domain name resolution result corresponds to the domain name resolved by the request;
緩存更新模块, 用于将查找到的第一域名解析结果更新为所述第二域 名解析结果。  And a cache update module, configured to update the first domain name resolution result that is found to the second domain name resolution result.
26、 一种緩存域名服务器, 其特征在于, 包括:  26. A cached domain name server, comprising:
删除消息接收单元, 用于接收授权域名服务器发送的域名解析结果删 除消息, 所述域名解析结果删除消息中携带请求解析的域名, 所述域名解 析结果删除消息用于删除緩存域名服务器中携带的第一域名解析结果 , 所 述第一域名解析结果和所述请求解析的域名对应;  The deletion message receiving unit is configured to receive a domain name resolution result deletion message sent by the authorized domain name server, where the domain name resolution result deletion message carries the domain name requested to be resolved, and the domain name resolution result deletion message is used to delete the number carried in the cache domain name server. a domain name resolution result, where the first domain name resolution result corresponds to the domain name of the request resolution;
删除执行单元, 用于删除自身緩存中与所述请求解析的域名对应的第 一域名解析结果。  The deletion execution unit is configured to delete the first domain name resolution result corresponding to the domain name of the request resolution in the cache.
27、 根据权利要求 26所述的緩存域名服务器, 其特征在于, 所述删除 执行单元包括:  The cached domain name server according to claim 26, wherein the deletion execution unit comprises:
第四查找模块, 用于根据预先保存的对应关系在自身緩存中查找与请 求解析的域名对应的第一域名解析结果;  a fourth search module, configured to search, in the cache, the first domain name resolution result corresponding to the domain name that is requested to be resolved according to the pre-stored correspondence relationship;
緩存删除模块, 用于将查找到的第一域名解析结果删除。  The cache deletion module is configured to delete the first domain name resolution result that is found.
PCT/CN2011/083913 2010-12-29 2011-12-14 Domain name system caching method, authorized domain name server and caching domain name server WO2012089013A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201010612278.6 2010-12-29
CN201010612278.6A CN102137174B (en) 2010-12-29 2010-12-29 Method for caching of domain name system, authorized domain name server and cache domain name server

Publications (1)

Publication Number Publication Date
WO2012089013A1 true WO2012089013A1 (en) 2012-07-05

Family

ID=44296827

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2011/083913 WO2012089013A1 (en) 2010-12-29 2011-12-14 Domain name system caching method, authorized domain name server and caching domain name server

Country Status (2)

Country Link
CN (1) CN102137174B (en)
WO (1) WO2012089013A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109639748A (en) * 2017-10-09 2019-04-16 阿里巴巴集团控股有限公司 Buffering updating method, device, system and the domain name system of dns server
CN114143230A (en) * 2020-09-02 2022-03-04 中国移动通信集团安徽有限公司 Method and device for calculating DNS (Domain name Server) resolution time of dual-stack user
CN114157635A (en) * 2020-09-07 2022-03-08 中国移动通信集团湖南有限公司 Domain name back-source method and device for content distribution network, equipment and storage medium

Families Citing this family (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102137174B (en) * 2010-12-29 2013-10-09 华为技术有限公司 Method for caching of domain name system, authorized domain name server and cache domain name server
CN102984286B (en) * 2012-11-14 2015-03-04 上海牙木通讯技术有限公司 Method and device and system of domain name server (DNS) for buffering updating
CN104427011B (en) * 2013-09-02 2019-03-22 中兴通讯股份有限公司 The method and domain name cache server of domain name mapping
CN104639666B (en) * 2013-11-06 2019-04-16 腾讯科技(深圳)有限公司 Method for accessing domain name and device
CN106210158B (en) * 2015-05-04 2020-03-27 阿里巴巴集团控股有限公司 Domain name resolution synchronization method and device
CN104935683A (en) * 2015-06-29 2015-09-23 北京经天科技有限公司 Buffer processing method and device for domain name resolution
CN106331205B (en) * 2015-07-01 2019-02-05 中兴通讯股份有限公司 The centralized management method, apparatus and relevant device of domain name resources record buffer memory
CN106331201A (en) * 2015-07-01 2017-01-11 中兴通讯股份有限公司 Domain name system resource record caching control method and server
CN105245633A (en) * 2015-10-19 2016-01-13 北京奇虎科技有限公司 Safe domain name system and fault handling method
CN106610975A (en) * 2015-10-21 2017-05-03 北京国双科技有限公司 Method and device for updating configuration list of cache server
CN105939399A (en) * 2015-11-30 2016-09-14 杭州迪普科技有限公司 Domain name resolution method and device
CN109451090B (en) * 2018-11-13 2021-08-10 郑州云海信息技术有限公司 Domain name resolution method and device
CN113286016B (en) * 2021-07-20 2021-09-28 中国人民解放军国防科技大学 Method and device for analyzing service range of cache domain name system
CN116382809B (en) * 2023-05-26 2023-10-20 荣耀终端有限公司 Application program starting method and electronic equipment

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060112176A1 (en) * 2000-07-19 2006-05-25 Liu Zaide E Domain name resolution using a distributed DNS network
CN101272407A (en) * 2008-04-28 2008-09-24 杭州华三通信技术有限公司 Caching detecting method, caching detecting device and detection responding device for domain name system
CN101431539A (en) * 2008-12-11 2009-05-13 华为技术有限公司 Domain name resolution method, system and apparatus
CN101465768A (en) * 2009-01-12 2009-06-24 上海及第熊软件科技有限公司 Method and system for implementing website disaster-tolerating and error-tolerating operation
EP2159983A1 (en) * 2008-08-26 2010-03-03 BRITISH TELECOMMUNICATIONS public limited company Content distribution network
CN101895591A (en) * 2010-07-23 2010-11-24 北京邮电大学 Method and domain name server for increasing robustness of credible Internet domain name service
CN102137174A (en) * 2010-12-29 2011-07-27 华为技术有限公司 Method for caching of domain name system, authorized domain name server and cache domain name server

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060112176A1 (en) * 2000-07-19 2006-05-25 Liu Zaide E Domain name resolution using a distributed DNS network
CN101272407A (en) * 2008-04-28 2008-09-24 杭州华三通信技术有限公司 Caching detecting method, caching detecting device and detection responding device for domain name system
EP2159983A1 (en) * 2008-08-26 2010-03-03 BRITISH TELECOMMUNICATIONS public limited company Content distribution network
CN101431539A (en) * 2008-12-11 2009-05-13 华为技术有限公司 Domain name resolution method, system and apparatus
CN101465768A (en) * 2009-01-12 2009-06-24 上海及第熊软件科技有限公司 Method and system for implementing website disaster-tolerating and error-tolerating operation
CN101895591A (en) * 2010-07-23 2010-11-24 北京邮电大学 Method and domain name server for increasing robustness of credible Internet domain name service
CN102137174A (en) * 2010-12-29 2011-07-27 华为技术有限公司 Method for caching of domain name system, authorized domain name server and cache domain name server

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109639748A (en) * 2017-10-09 2019-04-16 阿里巴巴集团控股有限公司 Buffering updating method, device, system and the domain name system of dns server
CN114143230A (en) * 2020-09-02 2022-03-04 中国移动通信集团安徽有限公司 Method and device for calculating DNS (Domain name Server) resolution time of dual-stack user
CN114143230B (en) * 2020-09-02 2023-07-21 中国移动通信集团安徽有限公司 Dual-stack user DNS analysis duration calculation method and device
CN114157635A (en) * 2020-09-07 2022-03-08 中国移动通信集团湖南有限公司 Domain name back-source method and device for content distribution network, equipment and storage medium
CN114157635B (en) * 2020-09-07 2023-08-15 中国移动通信集团湖南有限公司 Domain name back-source method and device for content distribution network, equipment and storage medium

Also Published As

Publication number Publication date
CN102137174B (en) 2013-10-09
CN102137174A (en) 2011-07-27

Similar Documents

Publication Publication Date Title
WO2012089013A1 (en) Domain name system caching method, authorized domain name server and caching domain name server
WO2022057000A1 (en) Data proxy method and system and proxy server
US10785037B2 (en) Managing secure content in a content delivery network
US10158620B2 (en) DNSSEC signing server
US9590946B2 (en) Managing content delivery network service providers
Bush et al. The resource public key infrastructure (RPKI) to router protocol
US7493414B2 (en) Apparatus and methods relating to web browser redirection
US7680954B2 (en) Proxy DNS for web browser request redirection in public hotspot accesses
US8214537B2 (en) Domain name system using dynamic DNS and global address management method for dynamic DNS server
US8892640B2 (en) Access control method and system and access terminal
WO2015027743A1 (en) Domain name resolution method, domain name cache server, and final domain name server
JP2013517726A (en) Method and system for preventing DNS cache poisoning
CN101335626A (en) Multi-stage authentication method and multi-stage authentication system
CN112261172B (en) Service addressing access method, device, system, equipment and medium
WO2022057002A1 (en) Abnormal request processing method and device
CN105407105A (en) Method and system for performing equipment authentication on samba service
CN113691646A (en) Domain name service resource access method, device, electronic equipment and medium
US11658995B1 (en) Methods for dynamically mitigating network attacks and devices thereof
US8996607B1 (en) Identity-based casting of network addresses
Pansa et al. Architecture and protocols for secure LAN by using a software-level certificate and cancellation of ARP protocol
CN112929388A (en) Network identity cross-device application rapid authentication method and system, and user agent device
CN110750290A (en) Software version upgrading method and device based on DNS query
Bush et al. RFC 6810: The Resource Public Key Infrastructure (RPKI) to Router Protocol
CN103491073A (en) Safety communication method based on TLSA protocol in C/S network architecture
CN101478535B (en) Multiple servers mutual operation method oriented to the same customer terminal

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 11852416

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 11852416

Country of ref document: EP

Kind code of ref document: A1