×

Electronic device and method for DNS processing

  • US 9,866,448 B2
  • Filed: 02/05/2013
  • Issued: 01/09/2018
  • Est. Priority Date: 09/18/2012
  • Status: Active Grant
First Claim
Patent Images

1. A method for a Domain Name System (DNS) processing between a DNS server and an electronic device, wherein the electronic device comprises a processor and a local DNS cache, and the method is executed by the processor of the electronic device, comprising:

  • receiving a DNS query from an application;

    generating and storing a plurality of time-to-live (TTL) values corresponding to a first entry in the local DNS cache based on a first response which is provided by the DNS server, wherein each of the TTL values respectively corresponds to one of a plurality of operating states of the electronic device;

    identifying a current operating state of the electronic device, wherein the current operating state is one of the plurality of operating states of the electronic device;

    identifying a TTL value corresponding to the identified current operating state of the electronic device, wherein the identified TTL value is one of the plurality of TTL values;

    determining whether to remove the first entry from the local DNS cache in the electronic device or not according to the identified TTL value corresponding to the identified current operating state of the electronic device;

    if the first entry is determined not to be removed, returning a result to the DNS query according to the first entry in the local DNS cache,if the first entry is determined to be removed, sending the DNS query to the DNS server;

    receiving a second response to the sent DNS query from the DNS server; and

    adding a second entry into the local DNS cache according to the second response, and returning a result of the DNS query to the application according to the received second response,wherein the step of determining whether to remove the first entry from the local DNS cache or not comprises;

    calculating a first expiration time of the first entry in the local DNS cache according to the identified TTL value corresponding to the identified current operating state of the electronic device, wherein the first expiration time of the entry corresponds to the identified current operating state of the electronic device;

    determining whether a current time is later than the first expiration time of the entry; and

    removing the first entry from the local DNS cache if the current time is later than the first expiration time of the entry.

View all claims
  • 1 Assignment
Timeline View
Assignment View
    ×
    ×