Localized domain name resolution and caching method, system, device and medium based on smart TV IPTV soft terminal service

By adopting localized domain name resolution and caching methods in the smart TV IPTV soft terminal, the problem that IPTV soft terminal applications cannot switch with one click during disaster recovery switching is solved, and the rapid effect of emergency disaster recovery and efficient domain name resolution is achieved, and the user experience is improved.

CN119788929APending Publication Date: 2025-04-08JIANGSU HAOBAI INFORMATION SERVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411747550.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-02
Publication Date
2025-04-08

AI Technical Summary

Technical Problem

In smart TV, IPTV soft terminal applications cannot switch with one click during disaster recovery switching, and domain name resolution does not support multi-node adaptation, resulting in long service interruption and affecting user experience.

Method used

The localized domain name resolution and cache method is adopted, and by configuring the main and backup DNS server node and local memory LruCache, the DNS request of the IPTV soft terminal is intercepted, the DNS resolution policy is reconstructed, and the domain name resolution results are read from the local cache first. If not, the remote resolution request will be initiated in the order of the main and backup DNS.

Benefits of technology

It realizes one-click switching between emergency disaster recovery of IPTV soft terminals in smart TVs, reduces business interruption time, improves domain name resolution efficiency and user experience, and avoids the risk of single point of failure.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119788929A_ABST
    Figure CN119788929A_ABST
Patent Text Reader

Abstract

The present invention discloses a localized domain name resolution and caching method, system, device and medium based on smart TV IPTV soft terminal service, belonging to the field of smart TV technology. The present invention intercepts DNS requests through application, rewrites domain name resolution strategy, manages storage, retrieval and update of domain name cache through Zygote incubation process, and autonomously controls domain name cache update cycle through application, aiming to improve domain name resolution efficiency, reduce resolution delay, and quickly take effect when domain name IP switching is done by business system main and standby disaster recovery, thereby enhancing user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of smart televisions, and in particular relates to a localized domain name resolution and caching method, system, device and medium based on a smart television IPTV soft terminal service. Background Art

[0002] IPTV: Interactive Internet Television is a new technology that utilizes broadband cable television networks, integrates the Internet, multimedia, communications and other technologies, and provides home users with a variety of interactive services including digital television.

[0003] Soft terminal: usually refers to the terminal functions implemented on the computing device through software, without relying on dedicated hardware terminals. It can include various uses, such as network communication, media playback, and remote access. In IPTV (Internet Protocol Television), the function of soft terminal application is particularly important because it involves the reception and display of streaming media.

[0004] DNS: Domain Name System, Domain Name System, is a basic service of the Internet. Its main function is to convert human-readable domain names (such as www.example.com) into machine-readable IP addresses (such as 192.0.2.1)

[0005] Active-standby disaster recovery: is a fault-tolerance and disaster recovery strategy that ensures that the system can automatically or manually switch to the standby system when the primary system fails, minimizing business interruption time and data loss.

[0006] IPTV services are carried by the service management platform, EPG, capability platform, CDN and other systems. Each service system has a corresponding cluster and is configured with a domain name corresponding to the requested service. In order to ensure that the system corresponding to the cluster IP pointed to by the domain name can quickly switch the main system to the backup system in the event of a failure or disaster, the operation and maintenance personnel will manually perform IP primary and backup switching in the domain name system to ensure service continuity and minimize service interruption time.

[0007] Jiangsu IPTV services are currently running in two forms: set-top boxes and soft terminals. When IPTV services are running on hard terminal set-top boxes, and the IPTV service system domain name points to the IP and a primary / standby switch occurs, the set-top box can be restarted. After the hardware system restarts, the DNS local cache will be cleared, and the DNS server needs to be queried again to obtain the latest domain name resolution results. The restart of the set-top box will invalidate the resolution IP record in the cache, and the client uses the latest domain name resolution IP to request services, ensuring that the primary / standby switch takes effect immediately.

[0008] The soft terminal runs in the smart TV terminal system in the form of an APP. The DNS cache mechanism of each brand of TV manufacturer is different. Some manufacturers' terminals cache DNS information in local memory, while some manufacturers' devices cache DNS information in the system hosts file or store it in other persistent ways. The soft terminal application relies on the hardware system DNS cache refresh cycle. After the server domain name points to the IP emergency switch, the soft terminal app still reads the DNS cache IP resolution address that has not been refreshed. The active and standby disaster recovery operation cannot take effect quickly, resulting in a long service interruption time, affecting user use and causing customer complaints.

[0009] On the other hand, the domain name resolution of the soft terminal system does not support multi-node adaptation. If the configured single-point domain name server fails, the soft terminal application system will become unavailable. Summary of the invention

[0010] The present invention aims at the deficiencies in the prior art, solves the problem that the disaster recovery of IPTV soft terminal applications running in smart televisions cannot be switched with one key, and enables the IPTV soft terminal to align the emergency response capability of IPTV services in set-top boxes. A localized domain name resolution and caching method, system, device and medium based on the IPTV soft terminal service of smart television are provided.

[0011] To achieve the above object, the present invention adopts the following technical solutions:

[0012] A localized domain name resolution and caching method based on a smart TV IPTV soft terminal service comprises the following steps:

[0013] Configure the primary DNS server node and the backup DNS server node;

[0014] Allocate local memory LruCache to cache DNS resolution results;

[0015] When IPTV enters, intercept the IPTV soft terminal DNS request to the IPTV DNS local service and reconstruct the DNS resolution strategy locally;

[0016] The local cache node pointed to by the domain name is read from the local memory LruCache first. If there is no local cache node in the local memory LruCache, a DNS resolution request is created and a remote DNS resolution request is initiated in the order of the primary DNS server node and the backup DNS server node.

[0017] Use the primary DNS server node to obtain the remote DNS resolution result. If the primary DNS server node resolves data abnormally or the resolution times out, use the backup DNS server node to obtain the remote DNS resolution result.

[0018] Generate a structure Record to store the DNS resolution result, and store the structure Record in the local memory LruCache;

[0019] When the resolution request for the same domain name is initiated again, the IPTVDNS local service finds the corresponding structure Record node from the local memory LruCache and returns the cached DNS resolution result;

[0020] When the process terminates, the local memory LruCache performs a clear operation to clear the local cache memory and release the memory space.

[0021] To optimize the above technical solutions, the specific measures taken also include:

[0022] Furthermore, the method for intercepting the IPTV soft terminal DNS request is the InterceptRequest method; the local reconstruction of the DNS resolution strategy is specifically:

[0023] Rewrite the connectToInetAddress through the proxy method, named Proxy.connectToInetAddress, and replace its DnsService with IptvDnsSerivice.

[0024] Furthermore, the specific process of using the primary DNS server node to obtain the remote DNS resolution result is:

[0025] Assign a random number for the remote resolution request, and generate a message identifier based on the random number algorithm to mark the unique code of the remote resolution request;

[0026] Generate a remote request array [QuestionData]; encapsulate the remote request array [QuestionData] into a DatagramPacket request packet, and create a UDP request structure DatagramSocket;

[0027] Send the UDP request structure DatagramSocket to the primary DNS server node via the UDP protocol;

[0028] Allocate a data packet array to receive the UDP response message from the primary DNS server node;

[0029] Parse the UDP response message header, read the message identifier, and compare it with the message identifier in the remote resolution request. If they are consistent, the DNS resolution result is credible;

[0030] Generate IP address by traversing structure Record through displacement algorithm.

[0031] Furthermore, the specific process of using the standby DNS server node to obtain the remote DNS resolution result is:

[0032] Assign a random number for the remote resolution request, and generate a message identifier based on the random number algorithm to mark the unique code of the remote resolution request;

[0033] Generate a remote request array [QuestionData]; encapsulate the remote request array [QuestionData] into a DatagramPacket request packet, and create a UDP request structure DatagramSocket;

[0034] Send the UDP request structure DatagramSocket to the standby DNS server node via the UDP protocol;

[0035] Allocate a data packet array to receive the UDP response message from the backup DNS server node;

[0036] Parse the UDP response message header, read the message identifier, and compare it with the message identifier in the remote resolution request. If they are consistent, the DNS resolution result is credible;

[0037] Generate IP address by traversing structure Record through displacement algorithm.

[0038] The present invention also proposes a localized domain name resolution and caching system based on the smart TV IPTV soft terminal service, comprising: a primary DNS server node, a backup DNS server node, an IPTV soft terminal, an IPTVDNS local service module and an IPTV domain name caching module;

[0039] The primary DNS server node is used to convert domain names and IP addresses;

[0040] The standby DNS server node is used to convert the domain name and IP address when the primary DNS server node fails;

[0041] The IPTV domain name cache module is used to allocate a local memory LruCache to cache the DNS resolution result; generate a structure Record to store the DNS resolution result, and store the structure Record in the local memory LruCache;

[0042] When IPTV enters, the IPTVDNS local service module intercepts the DNS request of the IPTV soft terminal to the IPTVDNS local service module, and reconstructs the DNS resolution strategy locally; the local cache node pointed to by the domain name is read from the local memory LruCache first, if there is no local cache node in the local memory LruCache, a DNS resolution request is created and a remote DNS resolution request is initiated in the order of the primary DNS server node and the backup DNS server node;

[0043] The IPTV soft terminal obtains the remote DNS resolution result from the primary DNS server node. If the resolution data of the primary DNS server node is abnormal or the resolution times out, the remote DNS resolution result is obtained from the backup DNS server node.

[0044] When a resolution request for the same domain name is initiated again, the IPTVDNS local service module finds the corresponding structure Record node from the local memory LruCache and returns the cached DNS resolution result;

[0045] When the process terminates, the local memory LruCache performs a clear operation to clear the local cache memory and release the memory space.

[0046] The present invention also proposes an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the localized domain name resolution and caching method based on the smart TV IPTV soft terminal service as described above is implemented.

[0047] The present invention also provides a computer-readable storage medium storing a computer program, wherein the computer program enables a computer to execute the localized domain name resolution and caching method based on the smart television IPTV soft terminal service as described above.

[0048] The beneficial effects of the present invention are:

[0049] 1. Shield the problem of differentiated domain name resolution cache storage of smart TVs, eliminate the strong dependence of the soft terminal system on the domain name resolution strategy of the TV system, and further expand the adaptability of IPTV soft terminals on brand smart TVs.

[0050] 2. The IPTV soft terminal is aligned with the domain name cache update mechanism of the set-top box IPTV. After the emergency switchover is restarted with one key, the emergency strategies of IPTV in the soft terminal and the set-top box take effect at the same time, accelerating the time of effectiveness;

[0051] 3. Reduce the soft terminal system's dependence on terminal domain name services, improve IPTV soft terminal network stability, improve domain name resolution efficiency, reduce resolution delays, and enhance user experience.

[0052] 4. The domain name resolution server of the soft terminal system adds multi-node adaptation to avoid the risk of single point failure, ensure that the service can be quickly restored when the main domain name server fails, reduce the system unavailability time, and improve the overall processing capacity of the system. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] Figure 1 It is a timing diagram of the localized domain name resolution and caching method based on the smart TV IPTV soft terminal service proposed by the present invention;

[0054] Figure 2 This is an architecture diagram of the localized domain name resolution and caching system based on the smart TV IPTV soft terminal service proposed by the present invention. DETAILED DESCRIPTION

[0055] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0056] Embodiment 1

[0057] The present invention proposes a localized domain name resolution and caching method based on smart TV IPTV soft terminal service, the timing is as follows Figure 1 As shown, the following steps are included:

[0058] Step 1. The IPTV soft terminal system configures the primary and backup DNS nodes, primary: 114.114.114.144, backup: dns.alidns.com / dns-query;

[0059] Step 2: Zygote incubates the process and allocates local memory LruCache to cache DNS resolution result data;

[0060] Step 3: When the IPTV system enters, the domain name request of the IPTV business management platform is intercepted through the InterceptRequest method, and the connectToInetAddress method is rewritten through the proxy method, named Proxy.connectToInetAddress, and its DnsService is replaced with IptvDnsSerivice;

[0061]

[0062] Step 4: The local cache node pointed to by the domain name is read from LruCache first. If there is no local cache node in LruCache, a DnsRequest request model is created in the order of primary and backup DNS nodes to initiate a remote resolution request.

[0063] Step 5: Assign a random number for the remote resolution request, and generate a messageId based on the random number algorithm to mark the unique code of the request;

[0064] Step 6: Generate a remote request 512-byte array [QuestionData], the generation rules are as follows:

[0065]

[0066]

[0067] Step 7: Encapsulate the [QuestionData] array generated above into a DatagramPacket request packet, and create a UDP request structure DatagramSocket;

[0068] Step 8. Send the DatagramPacket to port 53 of the DNS server (114.114.114.114) via UDP protocol.

[0069] Step 9: Allocate a 1500-byte packet array to receive the UDP response message.

[0070] Step 10: Parse the UDP message header, read the int16-bit messageId (message identifier), and compare it with the messageId in the request. If they are consistent, the result is credible and it is considered safe and has not been hijacked or tampered with;

[0071] Step 11, read the int16-bit answer character array from index=6, and traverse it to generate the IP address through the shift algorithm. The algorithm is as follows:

[0072]

[0073]

[0074] Step 12, add 2, +2, +4, +2 to the index offset to obtain the type, clazz, ttl, rdLength and other results, and store the results in the answerArray array;

[0075] Step 13: If the primary DNS server resolves data abnormally or resolves the data in a timeout, repeat steps 5-12 and use the backup DNS server node to obtain the remote resolution result;

[0076] Step 14: Generate a structure Record to store the DNS resolution result data, and store the record structure in the LruCache local cache;

[0077] Step 15: When a request for the same domain name is sent again, the IptvDNS local service finds the corresponding Record node from the LruCache cache and returns the cache result;

[0078] Step 16. The life cycle of LruCache is from the start of the Zygote incubation process pid to the Terminal result. When the process is terminated, LruCache performs the Clear operation to clear the local cache memory and release the memory space.

[0079] Embodiment 2

[0080] The present invention proposes a localized domain name resolution and caching system based on a smart TV IPTV soft terminal service corresponding to the method of the first embodiment, and the overall architecture is as follows: Figure 2 As shown, it includes: a primary DNS server node, a backup DNS server node, an IPTV soft terminal, an IPTVDNS local service module and an IPTV domain name cache module;

[0081] The primary DNS server node is used to convert domain names and IP addresses;

[0082] The standby DNS server node is used to convert the domain name and IP address when the primary DNS server node fails;

[0083] The IPTV domain name cache module is used to allocate a local memory LruCache to cache the DNS resolution result; generate a structure Record to store the DNS resolution result, and store the structure Record in the local memory LruCache;

[0084] When IPTV enters, the IPTVDNS local service module intercepts the DNS request of the IPTV soft terminal to the IPTVDNS local service module, and reconstructs the DNS resolution strategy locally; the local cache node pointed to by the domain name is read from the local memory LruCache first, if there is no local cache node in the local memory LruCache, a DNS resolution request is created and a remote DNS resolution request is initiated in the order of the primary DNS server node and the backup DNS server node;

[0085] The IPTV soft terminal obtains the remote DNS resolution result from the primary DNS server node. If the resolution data of the primary DNS server node is abnormal or the resolution times out, the remote DNS resolution result is obtained from the backup DNS server node.

[0086] When a resolution request for the same domain name is initiated again, the IPTVDNS local service module finds the corresponding structure Record node from the local memory LruCache and returns the cached DNS resolution result;

[0087] When the process terminates, the local memory LruCache performs a clear operation to clear the local cache memory and release the memory space.

[0088] The implementation methods of each module and module function in the system are completely consistent with the steps of the method in Example 1, so they will not be repeated here.

[0089] Embodiment 3

[0090] The present invention proposes an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the localized domain name resolution and caching method based on the smart TV IPTV soft terminal service as described in Example 1 is implemented.

[0091] Embodiment 4

[0092] The present invention provides a computer-readable storage medium storing a computer program, wherein the computer program enables a computer to execute the localized domain name resolution and caching method based on the smart television IPTV soft terminal service as described in the first embodiment.

[0093] Through the above implementation, the present invention can relieve the strong dependence of IPTV soft terminal application on the domain name resolution strategy of the TV system, and reduce the problems caused by system differentiation; restarting the application can realize domain name re-resolution and cache update, reduce waiting time, and improve the real-time and effectiveness of emergency disaster recovery of IPTV soft terminal. Domain name cache can significantly improve the domain name resolution speed of IPTV soft terminal, reduce resolution delay, and enhance user experience. Realizing the local process of domain name cache can avoid each domain name resolution through network request, reduce network dependence, and improve the stability and response speed of IPTV business system.

[0094] In the embodiments disclosed in the present application, the computer storage medium can be a tangible medium that can contain or store a program for use by or in conjunction with an instruction execution system, device or equipment. The computer storage medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the above. More specific examples of computer storage media can include electrical connections based on one or more lines, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above.

[0095] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed in this application can be implemented in electronic hardware or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0096] The above are only preferred embodiments of the present invention, and the protection scope of the present invention is not limited to the above embodiments. All technical solutions under the concept of the present invention belong to the protection scope of the present invention. It should be pointed out that for ordinary technicians in this technical field, some improvements and modifications without departing from the principle of the present invention should be regarded as the protection scope of the present invention.

Claims

1. A localized domain name resolution and caching method based on smart TV IPTV soft terminal service, characterized in that: The following steps are involved: Configure the primary DNS server node and the backup DNS server node; Allocate local memory LruCache to cache DNS resolution results; When IPTV enters, intercept the IPTV soft terminal DNS request to the IPTVDNS local service and reconstruct the DNS resolution strategy locally; The local cache node pointed to by the domain name is read from the local memory LruCache first. If there is no local cache node in the local memory LruCache, a DNS resolution request is created and a remote DNS resolution request is initiated in the order of the primary DNS server node and the backup DNS server node. Use the primary DNS server node to obtain the remote DNS resolution result. If the primary DNS server node resolves data abnormally or the resolution times out, use the backup DNS server node to obtain the remote DNS resolution result. Generate a structure Record to store the DNS resolution result, and store the structure Record in the local memory LruCache; When the resolution request for the same domain name is initiated again, the IPTVDNS local service finds the corresponding structure Record node from the local memory LruCache and returns the cached DNS resolution result; When the process terminates, the local memory LruCache performs a clear operation to clear the local cache memory and release the memory space.

2. The localized domain name resolution and caching method based on the smart TV IPTV soft terminal service as claimed in claim 1, characterized in that: The method for intercepting the IPTV soft terminal DNS request is the InterceptRequest method; the local reconstruction of the DNS resolution strategy is specifically: Rewrite the connectToInetAddress through the proxy method, named Proxy.connectToInetAddress, and replace its DnsService with IptvDnsSerivice.

3. The localized domain name resolution and caching method based on the smart TV IPTV soft terminal service as claimed in claim 1, characterized in that: The specific process of using the primary DNS server node to obtain the remote DNS resolution result is as follows: Assign a random number for the remote resolution request, and generate a message identifier based on the random number algorithm to mark the unique code of the remote resolution request; Generate remote request array [QuestionData]; Encapsulate the remote request array [QuestionData] into a DatagramPacket request packet and create a UDP request structure DatagramSocket; Send the UDP request structure DatagramSocket to the primary DNS server node via the UDP protocol; Allocate a data packet array to receive the UDP response message from the primary DNS server node; Parse the UDP response message header, read the message identifier, and compare it with the message identifier in the remote resolution request. If they are consistent, the DNS resolution result is credible; Generate IP address by traversing structure Record through displacement algorithm.

4. The localized domain name resolution and caching method based on the smart TV IPTV soft terminal service as claimed in claim 1, characterized in that: The specific process of using the standby DNS server node to obtain the remote DNS resolution result is as follows: Assign a random number for the remote resolution request, and generate a message identifier based on the random number algorithm to mark the unique code of the remote resolution request; Generate remote request array [QuestionData]; Encapsulate the remote request array [QuestionData] into a DatagramPacket request packet and create a UDP request structure DatagramSocket; Send the UDP request structure DatagramSocket to the backup DNS server node through the UDP protocol; Allocate a data packet array to receive the UDP response message from the backup DNS server node; Parse the UDP response message header, read the message identifier, and compare it with the message identifier in the remote resolution request. If they are consistent, the DNS resolution result is credible; Generate IP address by traversing structure Record through displacement algorithm.

5. A localized domain name resolution and caching system based on smart TV IPTV soft terminal service, characterized in that: include: Primary DNS server node, backup DNS server node, IPTV soft terminal, IPTVDNS local service module and IPTV domain name cache module; The primary DNS server node is used to convert domain names and IP addresses; The standby DNS server node is used to convert the domain name and IP address when the primary DNS server node fails; The IPTV domain name cache module is used to allocate local memory LruCache to cache DNS resolution results; Generate a structure Record to store the DNS resolution result, and store the structure Record in the local memory LruCache; When IPTV enters, the IPTVDNS local service module intercepts the DNS request of the IPTV soft terminal to the IPTV DNS local service module and reconstructs the DNS resolution strategy locally; The local cache node pointed to by the domain name is read from the local memory LruCache first. If there is no local cache node in the local memory LruCache, a DNS resolution request is created and a remote DNS resolution request is initiated in the order of the primary DNS server node and the backup DNS server node. The IPTV soft terminal obtains the remote DNS resolution result from the primary DNS server node. If the resolution data of the primary DNS server node is abnormal or the resolution times out, the remote DNS resolution result is obtained from the backup DNS server node. When a resolution request for the same domain name is initiated again, the IPTV DNS local service module finds the corresponding structure Record node from the local memory LruCache and returns the cached DNS resolution result; When the process terminates, the local memory LruCache performs a clear operation to clear the local cache memory and release the memory space.

6. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the localized domain name resolution and caching method based on the smart TV IPTV soft terminal service as described in any one of claims 1 to 4 is implemented.

7. A computer-readable storage medium storing a computer program, characterized in that: The computer program enables the computer to execute the localized domain name resolution and caching method based on the smart TV IPTV soft terminal service as described in any one of claims 1-4.