A domain name resolution data synchronization method, device, and equipment, and a storage medium

By using an automated domain name resolution data synchronization method, the problems of low synchronization efficiency and poor accuracy between self-built domain name systems and public cloud domain name systems have been solved, achieving efficient and accurate data synchronization without human intervention.

CN122293633APending Publication Date: 2026-06-26TENCENT TECHNOLOGY (SHENZHEN) CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
TENCENT TECHNOLOGY (SHENZHEN) CO LTD
Filing Date
2024-12-26
Publication Date
2026-06-26

AI Technical Summary

Technical Problem

In existing technologies, the synchronization of resolution data between a self-built domain name system and a public cloud domain name system requires manual intervention, which is costly, inefficient, and inaccurate.

Method used

In response to changes in DNS resolution data, the system automatically identifies the target server from multiple servers, retrieves the resolution data, converts its format, compares the data, and generates a synchronization update task to achieve automated synchronization.

Benefits of technology

It eliminates the need for manual intervention, reducing costs, improving the accuracy and efficiency of synchronization, and decreasing the amount of data processed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122293633A_ABST
    Figure CN122293633A_ABST
Patent Text Reader

Abstract

This application discloses a method, apparatus, device, and storage medium for synchronizing domain name resolution data. In response to a change event in the resolution data of a first domain name system, a target server is determined from multiple servers in the first domain name system. First resolution data is then retrieved from the target server. Next, existing second resolution data in a second domain name system to which the resolution data needs to be synchronized is queried, and the target format used by the second resolution data is determined. The first resolution data is then converted according to the target format to obtain third resolution data. For the third resolution data, it is compared with the existing second resolution data in the second domain name system to obtain a comparison result. Based on the comparison result, a synchronization update task for the second resolution data is generated and sent to the second domain name system for execution. This application can improve the accuracy and efficiency of domain name resolution data synchronization. The technical solution of this application can be widely applied in the field of data synchronization technology.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data synchronization technology, and in particular to a method, apparatus, device and storage medium for synchronizing domain name resolution data. Background Technology

[0002] With the rapid development of information technology, related services have gradually become integrated into people's lives. Among them, DNS (Domain Name System) is an internet service. As a distributed database that maps domain names to network addresses, it enables people to access internet services more conveniently. The main function of the DNS is to convert input domain names into corresponding network addresses so that computers can communicate. Currently, some individuals or organizations have built their own DNS systems, which can meet relevant customized needs and facilitate performance optimization.

[0003] In related technologies, to improve the stability of self-built domain name systems, it's common practice to synchronize related domain name resolution data to a public cloud domain name system provided by a cloud service provider. This allows for data backup and reduces losses due to unexpected domain name service failures. Currently, the strategy for synchronizing resolution data involves exporting the data from the self-built domain name system and then importing it into the public cloud domain name system. This approach requires manual intervention, synchronizing large amounts of resolution data each time, resulting in high application costs, low synchronization efficiency, and poor accuracy. Summary of the Invention

[0004] This application provides a method, apparatus, device, and storage medium for synchronizing domain name resolution data, which can reduce the amount of data processing during domain name resolution data synchronization, reduce costs, and improve processing efficiency and accuracy.

[0005] One aspect of this application provides a method for synchronizing domain name resolution data, the method comprising:

[0006] In response to a data resolution change event in the first domain name system, the target server is determined from multiple servers in the first domain name system;

[0007] Retrieve the first parsed data from the target server;

[0008] Query the second DNS records in the second domain name system and the target format used by the second DNS records. Convert the first DNS records according to the target format to obtain the third DNS records.

[0009] The second and third parsed data are compared to obtain the comparison result;

[0010] Based on the comparison results, a synchronization update task for the second parsed data is generated, and the synchronization update task is sent to the second domain name system for execution.

[0011] On the other hand, embodiments of this application provide a domain name resolution data synchronization device, the device comprising:

[0012] A response unit is used to determine the target server from multiple servers in the first domain name system in response to a data resolution change event in the first domain name system.

[0013] A fetch unit is used to fetch first parsed data from the target server;

[0014] The conversion unit is used to query the second resolved data in the second domain name system and the target format used by the second resolved data, and convert the first resolved data according to the target format to obtain the third resolved data;

[0015] The comparison unit is used to compare the second parsed data and the third parsed data to obtain the comparison result;

[0016] An execution unit is configured to generate a synchronization update task for the second parsed data based on the comparison result, and send the synchronization update task to the second domain name system for execution.

[0017] Optionally, in some embodiments, the synchronization device further includes a generation unit, the generation unit being used for:

[0018] Receive business messages sent by the first server of the first domain name system;

[0019] Authenticate the first server;

[0020] If the first server authenticates successfully, the type of the business message is identified;

[0021] If the business message is a parsed data change message, the parsed data change event is triggered.

[0022] Optionally, in some embodiments, the generation unit is specifically used for:

[0023] Retrieve a pre-established list of notification servers;

[0024] Query the first server in the list of notification servers;

[0025] If the first server is in the list of notification servers, it is determined that the first server has passed authentication;

[0026] If the first server is not in the list of notification servers, it is determined that the first server failed authentication.

[0027] Optionally, in some embodiments, the synchronization device further includes a generation unit, the generation unit being used for:

[0028] Query the cumulative time elapsed since the last detected and parsed data change message;

[0029] If the accumulated duration reaches a preset duration threshold, detect whether there is a data resolution change message in the first domain name system;

[0030] If a DNS resolution change message exists in the first domain name system, the DNS resolution change event is triggered, and the accumulated duration is reset to zero.

[0031] Optionally, in some embodiments, the response unit is specifically used for:

[0032] The target server is randomly selected from multiple servers in the first domain name system;

[0033] Alternatively, obtain the server list of the first domain name system, query the second server in the server list that was previously identified as the target server, and identify the next server of the first server as the target server for this time.

[0034] Optionally, in some embodiments, the response unit is specifically used for:

[0035] Detect the network environment parameters of each server in the first domain name system;

[0036] Based on the network environment parameters, determine the network quality score for each of the servers;

[0037] Based on the network quality score, the servers are sorted, and the server with the highest network quality score is determined as the target server.

[0038] Optionally, in some embodiments, the response unit is specifically used for:

[0039] The throughput, round-trip time, and packet loss rate of the server are detected during a predetermined transmission period.

[0040] The network quality score of the server is determined based on the throughput, the round-trip time, and the packet loss rate.

[0041] Optionally, in some embodiments, the pull unit is specifically used for:

[0042] Query the initial authorization record of the target server;

[0043] Based on the initial authorization record, determine the first version number of the first parsed data on the target server;

[0044] Query the second version number of the second parsed data;

[0045] If the first version number is greater than the second version number, pull the first parsed data from the target server.

[0046] Optionally, in some embodiments, the second parsed data includes multiple first records, and the third parsed data includes multiple second records; the comparison unit is specifically used for:

[0047] The first record is processed to obtain the first identifier information corresponding to the first record, and the second record is processed to obtain the second identifier information corresponding to the second record;

[0048] Based on the first identification information and the second identification information, each of the first record and the second record is compared to obtain the comparison result.

[0049] Optionally, in some embodiments, the comparison unit is specifically used for:

[0050] The characters in the first record are concatenated to obtain the first identifier information corresponding to the first record;

[0051] Alternatively, the first record can be hashed to obtain the first identifier information corresponding to the first record;

[0052] Alternatively, a digest calculation can be performed on the first record to obtain the first identifier information corresponding to the first record.

[0053] Optionally, in some embodiments, the execution unit is specifically used for:

[0054] The synchronous update task is split into several sub-tasks;

[0055] The subtasks are divided into multiple task sets, and each task set is imported into a thread queue of the second domain name system for execution.

[0056] On the other hand, embodiments of this application provide an electronic device, including a processor and a memory;

[0057] The memory is used to store computer programs;

[0058] The processor executes the computer program to implement the aforementioned method for synchronizing domain name resolution data.

[0059] On the other hand, embodiments of this application provide a computer-readable storage medium storing a computer program that is executed by a processor to implement the aforementioned method for synchronizing domain name resolution data.

[0060] On the other hand, embodiments of this application also provide a computer program product, which includes a computer program stored in a computer-readable storage medium. The processor of a computer device reads the computer program from the computer-readable storage medium and executes the computer program, causing the computer device to perform the aforementioned method for synchronizing domain name resolution data.

[0061] The embodiments of this application include at least the following beneficial effects: This application provides a method, apparatus, device, and storage medium for synchronizing domain name resolution data. In response to a change event in the resolution data of a first domain name system, this application automatically triggers the execution of a synchronization task for the resolution data of the domain name system. It determines a target server from multiple servers in the first domain name system, then retrieves first resolution data from the target server. Next, it queries existing second resolution data in a second domain name system to which the resolution data needs to be synchronized, determines the target format used by the second resolution data, and converts the format of the first resolution data according to the target format to obtain third resolution data. For the third resolution data, it compares it with existing second resolution data in the second domain name system to obtain a comparison result. Based on the comparison result, a synchronization update task for the second resolution data is generated and sent to the second domain name system for execution. This application can automate the synchronization of domain name resolution data without manual intervention, reducing application costs and improving synchronization accuracy. Moreover, during the synchronization process, selecting and determining the synchronization update task based on existing second resolution data in the second domain name system can reduce the data processing volume during domain name resolution data synchronization and improve processing efficiency. Attached Figure Description

[0062] The accompanying drawings are used to provide a further understanding of the technical solutions of this application and constitute a part of the specification. They are used together with the embodiments of this application to explain the technical solutions of this application and do not constitute a limitation on the technical solutions of this application.

[0063] Figure 1 This is a diagram illustrating the backup of DNS resolution data in a self-built domain name system in related technologies.

[0064] Figure 2 This is a system architecture diagram of the domain name resolution data synchronization method provided in the embodiments of this application;

[0065] Figure 3 This is a schematic diagram illustrating a method of providing streaming media services via a content delivery network, as provided in an embodiment of this application.

[0066] Figure 4 This is a flowchart illustrating a method for synchronizing domain name resolution data provided in an embodiment of this application.

[0067] Figure 5 This is a schematic diagram of a process for generating parsed data change events provided in an embodiment of this application;

[0068] Figure 6 This is a schematic diagram of another process for generating parsed data change events provided in an embodiment of this application;

[0069] Figure 7 This is a schematic diagram of a process for determining a target server provided in an embodiment of this application;

[0070] Figure 8 This is a schematic diagram of an application system for a domain name resolution data synchronization method provided in this application embodiment;

[0071] Figure 9 This is a schematic diagram illustrating the working principle of a message processing module provided in an embodiment of this application;

[0072] Figure 10 This is a schematic diagram illustrating the working principle of a recording processing module provided in an embodiment of this application;

[0073] Figure 11 This is a schematic diagram illustrating the working principle of a queue processing module provided in an embodiment of this application;

[0074] Figure 12 This is a structural block diagram of a domain name resolution data synchronization device provided in the embodiments of this application;

[0075] Figure 13 This is a structural block diagram of an electronic device provided in an embodiment of this application. Detailed Implementation

[0076] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0077] It is understood that the terms “first,” “second,” etc., used in this application may be used to describe various concepts herein, but unless otherwise stated, these concepts are not limited by these terms. These terms are used only to distinguish one concept from another.

[0078] As used in this application, the terms "at least one", "multiple", "each", "any", etc., "at least one" includes one, two or more, "multiple" includes two or more, "each" refers to each of the corresponding multiples, and "any" refers to any one of the multiples.

[0079] Before providing a further detailed description of the embodiments of this application, the nouns and terms used in the embodiments of this application are explained, and the nouns and terms used in the embodiments of this application shall be interpreted as follows:

[0080] 1) A domain name is a hierarchical character identifier used to identify and locate computers on the Internet. Simply put, a domain name is the name of a specific computer or group of computers on the Internet, used to uniquely identify that computer or group of computers. A domain name typically consists of multiple parts separated by dots. From right to left, each part represents a different level, such as the top-level domain, second-level domains, and subdomains. For example, "www.example.com" is a domain name where ".com" is the top-level domain, "example" is the second-level domain, and "www" is the subdomain.

[0081] 2) DNS (Domain Name System) is a service of the Internet. As a distributed database that maps domain names to network addresses, it makes it easier for people to access the Internet.

[0082] 3) IPv4 (Internet Protocol version 4), the fourth version of the Internet Protocol, is a widely used network layer protocol.

[0083] 4) IPv6 (Internet Protocol version 6), the sixth version of the Internet Protocol, was designed to solve the problem of IPv4 address exhaustion. IPv6 uses a 128-bit address format, which can provide a virtually unlimited number of Internet Protocol addresses, greatly expanding the address space.

[0084] 5) CSV (Comma-Separated Values) is a simple file format used to store tabular data, including numbers and text. Each row represents a data record, with fields separated by commas.

[0085] 6) XML (eXtensible Markup Language) is a markup language used to define the structure and content of documents. XML documents consist of data enclosed in tags, support nested structures, and are well-suited for describing complex hierarchical data.

[0086] 7) JSON (JavaScript Object Notation) is a lightweight data interchange format that is easy for humans to read and write, and also easy for machines to parse and generate.

[0087] 8) HTML (HyperText Markup Language) is a language format that can be used to store and transmit data, especially network-related data.

[0088] 9) MD5 (Message-Digest Algorithm 5) is a digest algorithm that can take input of arbitrary length and generate a fixed-length value of 128 bits (16 bytes).

[0089] 10) The XFR (Zone Transfer) protocol is a mechanism in the DNS (Domain Name System) used to transfer the entire zone file between DNS servers.

[0090] With the rapid development of information technology, related services have gradually become integrated into people's lives. Among them, DNS (Domain Name System) is an internet service. As a distributed database that maps domain names to network addresses, it enables people to access internet services more conveniently. The main function of the Domain Name System is to convert the input domain name into the corresponding network address so that computers can communicate.

[0091] In a Domain Name System (DNS), multiple servers are typically configured to collaborate and provide efficient, reliable, and redundant domain name resolution services; these servers are collectively referred to as DNS servers. For example, a DNS system may include top-level domain (TLD) servers, authoritative name servers, caching name servers, recursive name servers, and secondary name servers. TLD servers manage specific top-level domains (e.g., .com, .org, .net) and provide information on authoritative name servers pointing to second-level domains (e.g., example.com). Authoritative name servers store the actual DNS records for a specific domain and directly respond to DNS query requests. Caching name servers do not directly manage any domains but cache DNS records obtained from other DNS servers to improve query speed and reduce the burden on authoritative name servers. Recursive name servers are used by clients (e.g., computers, routers) to initiate DNS queries; they traverse the domain name hierarchy, starting from the root servers, progressively searching and returning the final DNS record. Secondary name servers provide redundancy and load balancing services. Of course, it is understood that other types of servers may also be included in a DNS system; this application does not limit the specific categories.

[0092] In the Domain Name System (DNS), multiple servers can store various types of data. Among this data is DNS resolution data. This resolution data is the information provided by DNS servers in response to query requests, primarily used to translate readable domain names into Internet Protocol (IP) addresses used in computer network communication.

[0093] Generally, Domain Name Systems (DNS) are established by Internet Service Providers (ISPs) to provide domain name resolution services. Currently, some individuals or organizations also build their own DNS systems (referred to as self-built DNS systems). Compared to DNS systems built by third parties such as ISPs, self-built DNS systems can avoid the collection and analysis of related online access behavior, thus promoting privacy protection. Furthermore, self-built DNS systems can be flexibly configured according to needs, supporting the setting of specific access methods or filtering of malicious websites to meet customized requirements. They also reduce reliance on external services, facilitating performance optimization.

[0094] In related technologies, refer to Figure 1 , Figure 1 This diagram illustrates a method for backing up DNS resolution data in a self-built domain name system. For example... Figure 1As shown, to improve the stability of a self-built domain name system, it's common practice to synchronize its related domain name resolution data to a public cloud domain name system provided by a cloud service provider. This allows for data backup and reduces losses due to unexpected domain name service failures. Currently, the strategy for synchronizing resolution data involves exporting the data from the self-built domain name system and then importing it into the public cloud domain name system. This approach requires manual intervention, synchronizing large amounts of resolution data each time, resulting in high application costs, low synchronization efficiency, and poor accuracy.

[0095] In view of this, this application provides a method, apparatus, device, and storage medium for synchronizing domain name resolution data. In response to a change event in the resolution data of a first domain name system, this application automatically triggers and executes a synchronization task for the resolution data of the domain name system. It determines a target server from multiple servers in the first domain name system, then retrieves the first resolution data from the target server. Next, it queries the existing second resolution data in the second domain name system to which the resolution data needs to be synchronized, determines the target format used by the second resolution data, and converts the format of the first resolution data according to the target format to obtain third resolution data. For the third resolution data, it compares it with the existing second resolution data in the second domain name system to obtain a comparison result. Based on the comparison result, a synchronization update task for the second resolution data is generated and sent to the second domain name system for execution. This application can automate the synchronization of domain name resolution data without manual intervention, reducing application costs and improving synchronization accuracy. Moreover, during the synchronization process, selecting and determining the synchronization update task based on the existing second resolution data in the second domain name system can reduce the data processing volume during domain name resolution data synchronization and improve processing efficiency.

[0096] System architecture and scenario description used in the embodiments of this application

[0097] Figure 2 This is a system architecture diagram of a domain name resolution data synchronization method provided in this application embodiment, which includes terminal device 240, Internet 230, gateway 220, backend server 210, etc.

[0098] In this embodiment, the terminal device 240 may include various forms such as a desktop computer, laptop computer, PDA (personal digital assistant), mobile phone, vehicle terminal, home theater terminal, and dedicated terminal. Furthermore, it can be a single device or a collection of multiple devices. The terminal device 240 can communicate with the Internet 230 via wired or wireless means to exchange data.

[0099] A backend server 210 refers to a computer system that can provide certain services to terminal devices 240. Compared to ordinary terminal devices 240, backend servers 210 have higher requirements in terms of stability, security, and performance. A backend server 210 can be a single high-performance computer in a network platform, a cluster of multiple high-performance computers, a portion of a single high-performance computer (e.g., a virtual machine), or a combination of portions of multiple high-performance computers (e.g., virtual machines).

[0100] Gateway 220, also known as an internetwork connector or protocol converter, is a computer system or device that acts as a translator, enabling network interconnection at the transport layer. It bridges the gap between two systems using different communication protocols, data formats, languages, or even completely different architectures. Gateways can also provide filtering and security functions. Messages sent from terminal device 240 to backend server 210 are forwarded to the corresponding backend server 210 via gateway 220. Messages sent from backend server 210 to terminal device 240 are also forwarded to the corresponding terminal device 240 via gateway 220.

[0101] The backend server 210 can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms.

[0102] The domain name resolution data synchronization method provided in this application embodiment can be executed on the terminal device 240 side, or on the backend server 210 side, or the domain name resolution data synchronization can be achieved based on the data transmission between the terminal device 240 and the backend server 210. This application does not limit this.

[0103] Of course, it is understood that the implementation environment corresponding to the method in the embodiments of this application is not limited to that of the implementation environment. Figure 2 As shown, those skilled in the art can flexibly select the specific implementation environment according to actual needs, and this application does not impose any restrictions on this.

[0104] The domain name resolution data synchronization method provided in this application embodiment can be executed in various scenarios, and the following is an exemplary description of it.

[0105] (I) Scenarios for Streaming Media Applications

[0106] The method provided in this application embodiment can be applied to streaming media application scenarios.

[0107] Currently, with the continuous development of information technology, numerous streaming media applications have emerged. Streaming media is a technology that continuously transmits audio and video content over a network, allowing terminal devices to begin playing media files before the data is fully downloaded. Streaming media scenarios typically involve real-time or near-real-time content delivery, which can include online video, live audio broadcasts, IPTV, distance learning courses, live game streaming, video conferencing, and more.

[0108] The domain name resolution data synchronization method provided in this embodiment can be applied in streaming media scenarios. Please refer to... Figure 3 , Figure 3 This application illustrates a schematic diagram of the system architecture of a streaming media service provided in an embodiment of the present application, such as... Figure 3 As shown, streaming media content providers can use a CDN (Content Delivery Network) to distribute streaming media content, which involves caching relevant business data on various nodes of the CDN. When someone wants to access a streaming media resource, the nearest node will respond to the request and send the streaming media resource to the relevant terminal device for playback and display.

[0109] In this scenario, after an object's request is sent, it is transmitted to the Domain Name System (DNS). The DNS can redirect the request to the nearest CDN node based on the object's geographical location, thereby reducing latency and improving loading speed. The DNS can use the method described in this embodiment to perform synchronous data backup. Thus, even if the DNS fails, recovery can be achieved based on the synchronously backed-up data, improving the stability of the streaming media service.

[0110] (II) Online shopping scenarios

[0111] Currently, online shopping is widely popular. E-commerce websites typically contain a large number of product images, videos, and related documents. Shoppers can log in to these websites to make purchases. A good e-commerce website should have high-performance data transmission capabilities and reliable data storage capabilities.

[0112] The method described in this embodiment can be applied to online shopping scenarios. For example, the web address of an e-commerce website can be resolved based on the domain name system described in this embodiment to provide corresponding domain name services. The method described in this embodiment can improve the stability and reliability of domain name services, thereby enhancing the shopping experience.

[0113] General Description of Embodiments in this Application

[0114] Please refer to Figure 4 , Figure 4A flowchart illustrating a domain name resolution data synchronization method provided in an embodiment of this application is shown. Figure 4 As shown, a method for synchronizing domain name resolution data according to an embodiment of this application includes, but is not limited to, the following steps:

[0115] Step 410: In response to the DNS resolution data change event of the first domain name system, determine the target server from multiple servers in the first domain name system;

[0116] Step 420: Retrieve the first parsed data from the target server;

[0117] Step 430: Query the second DNS resolution data in the second domain name system and the target format used by the second DNS resolution data. Convert the first DNS resolution data according to the target format to obtain the third DNS resolution data.

[0118] Step 440: Compare the second and third parsed data to obtain the comparison results;

[0119] Step 450: Based on the comparison results, generate a synchronization update task for the second parsed data and send the synchronization update task to the second domain name system for execution.

[0120] This application provides a method for synchronizing domain name resolution data. This method can automate the synchronization of domain name resolution data without manual intervention, thereby reducing application costs and improving synchronization accuracy. Moreover, during the synchronization process, the synchronization update task is determined by filtering based on the existing second resolution data in the second domain name system, which can reduce the amount of data processing during the synchronization of domain name resolution data and improve processing efficiency.

[0121] The technical solution provided in this application is mainly applied to the synchronization of domain name resolution data between domain name systems. Specifically, it can be applied to scenarios where domain name resolution data from a self-built domain name system is synchronized to a public cloud domain name system. In this application, the domain name system requiring synchronization of domain name resolution data is denoted as the first domain name system, and the domain name system to which the data is synchronized is denoted as the second domain name system. For example, in a scenario involving a self-built domain name system and a public cloud domain name system, the self-built domain name system can be used as the first domain name system, and the public cloud domain name system can be used as the second domain name system. Of course, the first and second domain name systems in this application can also be other domain name systems, and are not limited to the case of a self-built domain name system and a public cloud domain name system; this application does not impose any restrictions on this.

[0122] In this embodiment of the application, the number of the first domain name system and the second domain name system can be one or more.

[0123] In this embodiment of the application, the first domain name system stores relevant resolution data. The specific types of resolution data include various types, and a piece of resolution data is generally referred to as a record.

[0124] For example, in some embodiments, the resolved data may include A records, AAAA records, CNAME records, MX records, NS records, TR records, TXT records, SRV records, and SOA records. Among these, the A record is the most common DNS record type, used to map a domain name to an IPv4 address. For example, when accessing the domain name `www.example.com`, the DNS server returns an A record, such as `93.184.216.34`. The AAAA record is similar to the A record but is used for IPv6 addresses. With the increasing prevalence of IPv6, more and more websites are beginning to support this record type. A CNAME record is a canonical name record, used to specify that one domain name is an alias for another domain name. For example, `blog.example.com` could be a CNAME record pointing to `www.example.com`. An MX record is a mail exchange record, used to specify the mail server responsible for handling emails for a specific domain. A domain name can have multiple MX records, each with a priority value; a lower value indicates higher priority. An NS record is a name server record, used to specify which DNS servers are responsible for DNS queries for a particular domain. For example, the NS record for `example.com` might point to both `ns1.example.com` and `ns2.example.com`. A PTR record is a pointer record used for reverse DNS lookups, mapping Internet Protocol addresses back to domain names. This is crucial for mail servers to verify the sender's identity. A TXT record is a text record used to store arbitrary textual information about the domain name. An SRV record is a service record used to specify the location of a server providing a particular service, typically containing the service type, protocol, port number, and target hostname. An SOA record is a start-of-authority record containing basic information about the domain, such as the primary name server, administrator email address, and sequence number. Of course, the records in the resolved data are not limited to the above examples, and this application does not impose any restrictions on them.

[0125] Understandably, the various records in the DNS resolution data collectively form the foundation of the DNS system, ensuring the efficient and reliable operation of various services on the Internet. When a device attempts to access a website, the DNS resolution process uses these records to find the correct Internet Protocol address, thereby establishing a network connection.

[0126] In this application's embodiments, the resolved data within the Domain Name System (DNS) may change. For example, in some embodiments, when the Internet Protocol address (IP address) of a website or service server changes, it may be necessary to update the A or AAAA records in the DNS to point to the new IP address. In some embodiments, new services may appear under certain domains, requiring the addition of new subdomains, or services under certain domains may be shut down, requiring the deletion of the corresponding subdomains. In some embodiments, to improve website access speed and availability, multiple DNS servers may be used to distribute requests. In this case, load balancing can be achieved by modifying DNS settings, such as adjusting CNAME records to point to different servers. Therefore, the resolved data within each DNS system is not static.

[0127] In this embodiment of the application, when performing domain name resolution data synchronization, the first domain name system is the domain name system whose domain name resolution data needs to be synchronized. In order to accurately determine when to perform the data synchronization task, the status of the first domain name system can be detected. Specifically, data change events occurring in the first domain name system can be detected. When a data change event occurs in the first domain name system, it indicates that the resolution data within it has changed, and it is very likely that domain name resolution data synchronization is required.

[0128] In step 410, upon detecting a change event in the DNS resolution data of the first domain name system, a response can be initiated. This involves determining, from among multiple servers in the first domain name system, the server responsible for executing the DNS resolution data synchronization task. In this embodiment, this server is referred to as the target server. In this embodiment, the target server can be a server storing all the DNS resolution data within the first domain name system, such as an authoritative domain name server. However, this application does not limit the specific type of target server.

[0129] In this application, there are several ways to determine the target server. For example, in some embodiments, servers that can provide full parsing data can be first aggregated, and then one server can be randomly selected from these servers as the target server.

[0130] In step 420, after the target server is determined, parsed data can be retrieved from the target server. In this embodiment of the application, the parsed data retrieved from the target server is referred to as the first parsed data.

[0131] Specifically, in some embodiments of this application, when retrieving the first parsed data from the target server, a regional transfer technique can be used. Based on this technique, files containing the parsed data from the target server can be copied to a specified location. This allows for the batch retrieval of the first parsed data from the target server. In some embodiments, a relevant application programming interface (API) can be used to retrieve the first parsed data. For example, an API key or other authentication credentials can be registered and obtained, and a request using a relevant protocol can be made to the target server's API to retrieve the first parsed data.

[0132] It should be noted that, in this embodiment of the application, when retrieving the first parsed data from the target server, the full amount of parsed data can be retrieved as the first parsed data, or a portion of the parsed data that has changed can be retrieved based on a parsed data change event. In this embodiment of the application, there is no limitation on the amount of the first parsed data.

[0133] In step 430, the resolved data in the second domain name system can be queried and denoted as the second resolved data. Furthermore, the format used by the second resolved data can be determined; in this embodiment, it is denoted as the target format.

[0134] Specifically, in this application embodiment, the data resolved in the domain name system can use various formats.

[0135] For example, in some embodiments, the Domain Name System (DNS) may use a text format to store the resolved data, such as CSV (Comma-Separated Values) or TXT format; in some embodiments, the DNS may use a markup language format to store the resolved data, such as XML (eXtensible Markup Language), JSON (JavaScript Object Notation), or HTML (HyperText Markup Language); in other embodiments, the DNS may use a binary format or a database format to store the resolved data, and this application does not impose any limitations on this.

[0136] It is understandable that different domain name systems may use different formats for their resolved data. In this embodiment, the target format of the resolved data used by the second domain name system may be different from that of the first resolved data. Therefore, if the target format used by the first resolved data is different from that used by the second resolved data, it can be converted to the target format. In this embodiment, the data obtained by converting the first resolved data to the target format is denoted as the third resolved data.

[0137] It should be noted that, in this embodiment of the application, the format conversion of the first resolved data is not only to facilitate the subsequent storage of the resolved data by the second domain name system, but also to facilitate the comparison of the first resolved data in the first domain name system and the existing second resolved data in the second domain name system.

[0138] In step 440, after converting the first parsed data to obtain the third parsed data, the second and third parsed data can be compared to obtain a comparison result. Here, comparing the second and third parsed data mainly aims to determine the differences between them. For example, in some embodiments, if related parsed data is added to the first domain name system, the third parsed data will contain more of this parsed data than the second parsed data; in some embodiments, if related parsed data is deleted from the first domain name system, the second parsed data will contain more of this parsed data than the third parsed data. Of course, the difference between the second and third parsed data is not limited to the amount of data. In other embodiments, the second and third parsed data may contain the same record, but the specific content of the record has been slightly modified. This application does not impose any restrictions on this.

[0139] By comparing the second and third analytical data, the differences between them can be determined, and the comparison results can be obtained. This application does not limit the specific differences included in the comparison results.

[0140] In step 450, based on the comparison results, a synchronization update task for the second parsed data can be generated. For example, in some embodiments, the comparison results may include content that appears in the third parsed data but not in the second parsed data. In this case, a synchronization update task can be generated for this content, which can be used to add the extra parts of the third parsed data to the second domain name system. In some embodiments, the comparison results may include content that appears in the second parsed data but not in the third parsed data. In this case, a synchronization update task can be generated for this content, which can be used to delete the extra parts of the second parsed data from the second domain name system. Of course, the specific type of synchronization update task in this application embodiment is not limited to this, and this application does not impose any restrictions on it.

[0141] After generating the synchronization update task, it can be sent to the second domain name system for execution. By executing the synchronization update task, the second domain name system can synchronize the first domain name resolution data in the first domain name system to its local machine, thereby achieving backup of the first resolution data.

[0142] It is understood that the domain name resolution data synchronization method provided in this application embodiment automatically triggers the execution of a domain name system resolution data synchronization task in response to a resolution data change event in the first domain name system. It determines a target server from multiple servers in the first domain name system, then pulls the first resolution data from the target server. Next, it queries the existing second resolution data in the second domain name system to which the resolution data needs to be synchronized, determines the target format used by the second resolution data, and performs format conversion on the first resolution data according to the target format to obtain the third resolution data. For the third resolution data, it compares it with the existing second resolution data in the second domain name system to obtain the comparison result. Based on the comparison result, it generates a synchronization update task for the second resolution data and sends it to the second domain name system for execution. This application can automate the synchronization of domain name resolution data without manual intervention, reducing application costs and improving synchronization accuracy. Moreover, by selecting and determining the synchronization update task based on the existing second resolution data in the second domain name system during the synchronization process, it can reduce the data processing volume during domain name resolution data synchronization and improve processing efficiency.

[0143] Specifically, in some embodiments, reference is made to Figure 5 Data change events are generated by parsing the following steps:

[0144] Step 510: Receive the business message sent by the first server of the first domain name system;

[0145] Step 520: Authenticate the first server;

[0146] Step 530: If the first server authentication is successful, identify the type of the business message;

[0147] Step 540: If the business message is a parsed data change message, trigger the generation of a parsed data change event.

[0148] In this application embodiment, the parsed data change event can be passively triggered in some embodiments. For example, the first domain name system may include some notification servers, which can be used to report relevant business messages occurring in the first domain name system. The types of business messages can include various types, such as query log messages, error report messages, attack detection messages, parsed data change messages, etc. Reporting relevant business messages by the notification servers helps to understand the health status of the first domain name system, facilitating performance optimization and troubleshooting.

[0149] For the first domain name system, a business message can be received from one of its servers. In this embodiment, this server is referred to as the first server. The first server can be any server within the first domain name system, and this application does not impose any restrictions on this. After receiving a business message from the first server, the first server can be authenticated. The purpose of authenticating the first server is to determine whether the source of the business message is legitimate. If the first server passes the authentication, it means that the business message is legitimate and can be further processed. Conversely, if the first server fails the authentication, it means that the business message is illegitimate. In this case, the business message sent by the first server can be discarded, and the authentication result can be fed back to the first server.

[0150] In this embodiment, if the first server passes authentication, it can further process the business message. Specifically, for the application scenario of this application, it can be determined whether the business message type belongs to the type of parsing data change message. If the business message belongs to the type of parsing data change message, it means that a change has occurred in the parsing data in the first domain name system. At this time, a parsing data change event can be triggered to further trigger the execution of the parsing data synchronization task. Conversely, if the business message does not belong to the type of parsing data change message, the business message can be discarded, and the next business message can be processed.

[0151] Specifically, in some embodiments, authenticating the first server includes:

[0152] Retrieve a pre-established list of notification servers;

[0153] Search for the first server in the notification server list;

[0154] If the first server is in the list of notification servers, confirm that the first server has passed authentication;

[0155] If the first server is not in the list of notification servers, it is determined that the first server failed authentication.

[0156] In this embodiment, for the first domain name system, a notification server list can be established in advance. This list records the relevant information of notification servers in each first domain name system that can perform business message reporting tasks. For example, each server in the first domain name system can be assigned a unique identifier, with different identifiers for different servers. Then, the legitimate notification servers in each first domain name system can be recorded, their corresponding identifiers obtained, and the list compiled to generate the notification server list. Of course, in this embodiment, the notification server list can also use other methods to record legitimate notification servers, and this application does not limit this.

[0157] When authenticating the first server, a pre-established list of notification servers can be obtained. Then, the first server can be queried from the notification server list. For example, as in the previous embodiment where each legitimate notification server is recorded using numbered information, the numbered information of the first server can be obtained. A query can then be performed in the notification server list. If the corresponding number is found, it means the first server is in the notification server list; otherwise, it means the first server is not in the notification server list.

[0158] In this embodiment of the application, if the first server is in the notification server list, it means that it is a legitimate notification server and the authentication can be determined to be successful. If the first server is not in the notification server list, it means that it is not a legitimate notification server and the authentication can be determined to be unsuccessful.

[0159] Specifically, in some embodiments, reference is made to Figure 6 Data change events are generated by parsing the following steps:

[0160] Step 610: Query the cumulative time elapsed since the last time a data change message was detected and parsed;

[0161] Step 620: If the cumulative duration reaches the preset duration threshold, check if there are any data resolution change messages in the first domain name system;

[0162] Step 630: If there is a DNS resolution change message in the first domain name system, trigger the generation of a DNS resolution change event and reset the accumulated duration to zero.

[0163] In some embodiments of this application, the data resolution change event can be actively triggered. For example, for each first domain name system, a scheduled task can be used to actively scan and determine whether a data resolution change message exists in the first domain name system.

[0164] Specifically, in this embodiment, a preset duration threshold can be set. Every preset duration threshold, a check can be performed to determine if a DNS resolution change message exists in the first domain name system. For the current time point, the time point of the last detection of a DNS resolution change message can be queried, denoted as the first time point, and then the cumulative duration from the current time point to the first time point can be determined. If the cumulative duration has not reached the preset duration threshold, the check continues. If the cumulative duration from the current time point to the first time point reaches the preset duration threshold, a check can be performed to determine if a DNS resolution change message exists in the first domain name system. If not, the cumulative duration can be reset to zero, and the process can return to the step of determining the cumulative duration. If a DNS resolution change event exists, a DNS resolution change event can be triggered, and the cumulative duration can also be reset to zero.

[0165] Specifically, in some embodiments, determining the target server from a plurality of servers in the first domain name system includes:

[0166] The target server is randomly selected from multiple servers in the first domain name system;

[0167] Alternatively, obtain the server list of the first domain name system, query the second server in the server list that was previously identified as the target server, and identify the next server after the first server as the target server for this time.

[0168] In this application embodiment, when determining the target server from multiple servers in the first domain name system, in some embodiments, the target server can be randomly determined from the multiple servers in the first domain name system. For example, each server can be assigned a value, and the values ​​corresponding to each server constitute a value range. Then, a random number can be generated within this value range, and the server corresponding to the random number can be determined as the target server.

[0169] In some embodiments, a server list of the first domain name system can also be obtained. Each time a domain name resolution data synchronization task is performed, a target server can be identified, and the position of that identified target server can be recorded. When identifying a target server next time, the next server can be determined from the previous position. For example, at the current moment, when it is necessary to determine a target server, the server that was previously identified as a target server in the server list can be queried; in this embodiment, it is denoted as the second server. Then, the server next to the second server in the server list can be determined as the target server for this current task. In this way, each server can be identified as a target server in turn, which can improve server load balancing and reduce the probability of some servers becoming overloaded.

[0170] Specifically, in some embodiments, reference is made to Figure 7 The target server is determined from multiple servers in the first domain name system, including:

[0171] Step 710: Detect the network environment parameters of each server in the first domain name system;

[0172] Step 720: Determine the network quality score for each server based on network environment parameters;

[0173] Step 730: Sort the servers according to their network quality scores, and determine the server with the highest network quality score as the target server.

[0174] In some embodiments of this application, when determining the target server from multiple servers in the first domain name system, the network environment of the server can also be considered. It is understood that some servers within the first domain name system may have better network environments, facilitating data transmission. Conversely, another server may have a poorer network environment, making data transmission inconvenient.

[0175] Therefore, in this embodiment, network environment parameters of each server can be obtained, and their network quality can be scored to obtain a network quality score. Then, the servers can be sorted according to their quality scores, and the server with the highest network quality score can be determined as the target server. In this way, the server with a better network environment can be quickly identified to perform the task of synchronizing domain name resolution data, which can improve the efficiency of data transmission.

[0176] Specifically, in this embodiment, the network environment parameters of the server can be network QoS information. For example, network environment parameters may include, but are not limited to, parameters such as the server's retransmission rate (retran_ratio), the number of timeout retransmission packets (retransmit_timeout_packets), the number of TLP (Transaction Layer Packet) retransmission packets, the round-trip time (RTT), the maximum window size (max_cwnd), the packet loss rate (loss_rate), and the throughput (goodput). The round-trip time can include types such as minimum round-trip time (min_rtt), smoothed round-trip time (srtt), and maximum round-trip time (max_rtt). These network environment parameters can be determined based on their values ​​at the current time point or the values ​​of a predetermined time period prior to the current time point. Specifically, they can be their respective average values ​​(avg_QoS) or a certain quantile value (i-th_QoS), which is not limited in this application.

[0177] For example, in some embodiments, the server's throughput, round-trip latency, and packet loss rate can be detected within a predetermined transmission period. Based on this data, a comprehensive network quality score for the server can be determined. Specifically, the higher the throughput, the lower the round-trip latency, and the lower the packet loss rate, the higher the server's network quality score; conversely, the lower the throughput, the higher the round-trip latency, and the higher the packet loss rate, the lower the server's network quality score. This application does not limit the specific functional relationship between the network quality score and these indicator parameters.

[0178] Specifically, in some embodiments, retrieving the first parsed data from the target server includes:

[0179] Query the initial authorization record of the target server;

[0180] Based on the initial authorization record, determine the first version number of the first parsed data on the target server;

[0181] Query the second version number of the second parsed data;

[0182] If the first version number is greater than the second version number, retrieve the first parsed data from the target server.

[0183] In this embodiment, in some cases, although a data resolution change event may occur on the first domain name system, no substantial modification may be made to the resolution data. In this case, if the domain name resolution data synchronization task is executed normally, it may lead to unnecessary data processing and waste of computing resources. Therefore, in this embodiment, the version number of the resolution data can be used to further determine whether there has been a change in the resolution data on the first domain name system.

[0184] Specifically, in this embodiment, both the first and second domain name systems can store version number information for the resolved data. Each time the resolved data is updated, the version number is updated accordingly (for example, incremented by 1). For the first domain name system, when a resolved data change event occurs, after determining the target server, the initial authorization record of the target server can be queried. Based on the initial authorization record, the version number of the first resolved data on the target server can be determined; in this embodiment, this is recorded as the first version number. Furthermore, the version number of the second resolved data in the second domain name system can also be queried; in this embodiment, this is recorded as the second version number.

[0185] Understandably, if the first version number and the second version number are the same, it indicates that the first DNS resolution data within the first DNS system has not undergone substantial updates. Therefore, in this case, it is unnecessary to fetch the first DNS resolution data to synchronize the DNS resolution data with the second DNS system. Conversely, if the first version number is greater than the second version number, it indicates that the first DNS resolution data within the first DNS system has undergone substantial updates. Therefore, in this case, the first DNS resolution data can be fetched to synchronize the DNS resolution data with the second DNS system. This reduces unnecessary data processing steps and improves data processing efficiency and usability.

[0186] Specifically, in this embodiment of the application, the second parsed data includes multiple first records, and the third parsed data includes multiple second records; the second parsed data and the third parsed data are compared to obtain a comparison result, including:

[0187] The first record is processed to obtain the first identifier information corresponding to the first record, and the second record is processed to obtain the second identifier information corresponding to the second record;

[0188] Based on the first identification information and the second identification information, each first record and the second record are compared to obtain the comparison result.

[0189] As described above, the resolved data in the Domain Name System can include multiple records. In this embodiment, the record included in the second resolved data is designated as the first record, and the record included in the third resolved data is designated as the second record.

[0190] When comparing the second and third parsed data, the first and second records of each entry can be compared. During the comparison, the first record can be processed to obtain the corresponding identifier information, which is recorded as the first identifier information, and the second record can be processed to obtain the corresponding identifier information, which is recorded as the second identifier information.

[0191] Specifically, if a second record exists that does not match any of the first records, it indicates that the second record is newly added DNS records and needs to be added to the second domain name system. If a first record exists that does not match any of the second records, it indicates that the first record is DNS records that were deleted from the first domain name system and needs to be deleted from the second domain name system. If the first and second records match but are completely identical in content, it may mean that the relevant record has been modified in the first domain name system; in this case, the modification can be synchronized to the second domain name system.

[0192] In this embodiment of the application, by comparing the first record and the second record, the finer granularity of domain name resolution data synchronization can be improved.

[0193] Specifically, in some embodiments, the first record is processed to obtain the first identifier information corresponding to the first record, including any of the following steps:

[0194] The characters in the first record are concatenated to obtain the first identifier information corresponding to the first record;

[0195] Alternatively, hash the first record to obtain the first identifier information corresponding to the first record;

[0196] Alternatively, a digest calculation can be performed on the first record to obtain the first identifier information corresponding to the first record.

[0197] In this application embodiment, when processing the first record and the second record to determine the corresponding identification information, taking the first record as an example, in some embodiments, the characters in the first record can be concatenated to obtain the corresponding first identification information. In some embodiments, a relevant hash algorithm can be used to calculate the hash value of the first record, and the obtained hash value can be used as the first identification information corresponding to the first record. In some embodiments, the first record can also be processed by digest calculation, such as using the MD5 algorithm to obtain the first identification information corresponding to the first record. This application does not limit this.

[0198] Specifically, in some embodiments, sending the synchronization update task to the second domain name system for execution includes:

[0199] The synchronous update task is split into several sub-tasks;

[0200] The subtasks are divided into multiple task sets, and each task set is imported into a thread queue of the second domain name system for execution.

[0201] In this application embodiment, when sending the synchronization update task to the second domain name system for execution, in some embodiments, the synchronization update task can be split into several subtasks. The number of subtasks can be any number of two or more. For each subtask obtained, they can be divided into different task sets, and the number of task sets can also be any number of two or more.

[0202] Next, each task set can be imported into a thread queue of the second domain name system for execution. This allows for the concurrent distribution of synchronization update tasks to the second domain name system, significantly improving the efficiency of domain name resolution data synchronization. In this embodiment, the number of subtasks contained in each task set can be approximately the same, and this application does not impose any restrictions on this.

[0203] The following describes and explains a method for synchronizing domain name resolution data provided in this application embodiment, with reference to specific application examples.

[0204] Please refer to Figure 8 , Figure 8 This illustration shows an application system diagram of a domain name resolution data synchronization method provided in an embodiment of this application. In this embodiment, the method can be executed based on an application system including a configuration management module, a message processing module, a record processing module, and a queue processing module. This application system can communicate with a self-built DNS system (first domain name system). When maintaining and updating resolution data on the self-built domain name system, it will automatically trigger the synchronization of the resolution data to the domain name resolution data of the public cloud domain name system.

[0205] Specifically, in this embodiment, the configuration management module can be used to manage the basic data used in the synchronization process of domain name resolution data. This mainly includes two types of basic data: one is key data, used for authentication during the synchronization process; the other is server data, where servers in the self-built domain name system can be divided into notification servers and other regular servers. Notification servers are used to send resolution data change messages; other regular servers are used to transmit resolution data to the public cloud domain name system.

[0206] Reference Figure 9 , Figure 9This illustration shows a schematic diagram of the working principle of a message processing module provided in an embodiment of this application. In this embodiment, the message processing module's processing flow is triggered in two ways. One is passive triggering, which is triggered by a parsed data change message sent by the notification server and is the primary triggering method; the other is active triggering, which is triggered by a scheduled task actively scanning and is the secondary triggering method. In this embodiment, active triggering serves as a supplement to passive triggering, reusing some of the logic of passive triggering. The steps of passive triggering are mainly described below:

[0207] 1. Maintain and update the resolution data (i.e., the first resolution data) on the server of the self-built DNS system, and notify the server to send a resolution data change message.

[0208] 2. Message Detection: The message processing module detects whether the notification server has sent a message. The notification server will send various messages. It is necessary to identify and parse data change messages, and discard non-parsed data change messages without processing.

[0209] 3. Authentication: Verify the legitimacy of the source of the parsed data change message. If it is a message sent by a notification server configured in the configuration management module, it is allowed to pass; otherwise, the message is discarded and not processed.

[0210] 4. Master Selection: Select a master server (i.e., the target server) to synchronize the domain name resolution data. There are several methods for master selection, including round-robin, random selection, or weighted selection based on various network environment parameters. After selecting a master server, it can be further determined whether synchronization is necessary. This is done by querying the initial authorization record on the master server. The initial authorization record contains the version number (i.e., the first version number) of the resolved data (i.e., the first resolved data) on the master server. If the version number of the resolved data on the master server is greater than the version number (i.e., the second version number) of the resolved data on the public cloud domain name system, then synchronization of the resolved data is required; otherwise, synchronization is not required.

[0211] 5. Data exchange: Pull parsed data from the selected master server via the XFR protocol and verify the validity of the data.

[0212] Reference Figure 10 , Figure 10 This illustration shows a schematic diagram of the working principle of a recording processing module provided in an embodiment of this application. In this embodiment, the output of the message processing module serves as the input of the recording processing module, which is specifically responsible for handling the following tasks:

[0213] 1. Record Conversion: The message processing module takes raw XFR protocol data as input. It needs to convert the raw data into a resolution data format that the public cloud domain name system can process. At the same time, it filters the resolution data types supported by the public cloud domain name system and ignores the resolution data types that are not supported.

[0214] 2. Record Comparison: Compare each record of the converted DNS data with existing data in the public cloud domain name system to identify whether the converted DNS data needs to be updated in the public cloud domain name system. DNS data requiring updates includes new records, modified records, and records that need to be deleted.

[0215] 3. Record Operations: Based on the record comparison results, perform operations on the converted parsed data. If it is a new record, add it to the public cloud domain name system's repository; if it is a modified record, update the repository; if it is a record to be deleted, delete it from the repository.

[0216] Reference Figure 11 , Figure 11 A schematic diagram illustrating the working principle of a queue processing module provided in an embodiment of this application is shown.

[0217] The queue processing module is mainly used for:

[0218] 1. Queue Assembly: Based on the comparison results, the parsed data is assembled one by one into a queue data format supported by the authoritative name server of the public cloud domain name system.

[0219] 2. Queue Distribution: The assembled queue data is distributed in batches to the authoritative name servers of the public cloud domain name system to enable name resolution. To improve distribution speed, a concurrent approach can be used to distribute queue data.

[0220] It is understood that the domain name resolution data synchronization method in this application embodiment can automate the synchronization of domain name resolution data without manual intervention, thereby reducing application costs and improving synchronization accuracy. Moreover, during the synchronization process, the synchronization update task is determined by filtering based on the existing second resolution data in the second domain name system, which can reduce the amount of data processing during the synchronization of domain name resolution data and improve processing efficiency.

[0221] Reference Figure 12 In this embodiment of the application, a domain name resolution data synchronization device is also provided, which includes:

[0222] Response unit 1210 is used to determine the target server from multiple servers in the first domain name system in response to a data resolution change event in the first domain name system;

[0223] Pull unit 1220 is used to pull the first parsed data from the target server;

[0224] The conversion unit 1230 is used to query the second resolution data in the second domain name system and the target format used by the second resolution data, and convert the first resolution data according to the target format to obtain the third resolution data;

[0225] The comparison unit 1240 is used to compare the second and third parsed data to obtain the comparison result;

[0226] The execution unit 1250 is used to generate a synchronization update task for the second parsed data based on the comparison result, and send the synchronization update task to the second domain name system for execution.

[0227] Optionally, in some embodiments, the synchronization device further includes a generation unit, which is used for:

[0228] Receive business messages sent by the first server of the first domain name system;

[0229] Authenticate the first server;

[0230] If the first server authentication is successful, the type of business message is identified;

[0231] If the business message is a parsed data change message, a parsed data change event will be generated.

[0232] Optionally, in some embodiments, the generating unit is specifically used for:

[0233] Retrieve a pre-established list of notification servers;

[0234] Search for the first server in the notification server list;

[0235] If the first server is in the list of notification servers, confirm that the first server has passed authentication;

[0236] If the first server is not in the list of notification servers, it is determined that the first server failed authentication.

[0237] Optionally, in some embodiments, the synchronization device further includes a generation unit, which is used for:

[0238] Query the cumulative time elapsed since the last detected and parsed data change message;

[0239] If the cumulative duration reaches the preset duration threshold, check if there are any data resolution change messages in the first domain name system;

[0240] If there is a DNS record change message in the first domain name system, a DNS record change event is generated, and the accumulated duration is reset to zero.

[0241] Optionally, in some embodiments, the response unit is specifically used for:

[0242] The target server is randomly selected from multiple servers in the first domain name system;

[0243] Alternatively, obtain the server list of the first domain name system, query the second server in the server list that was previously identified as the target server, and identify the next server after the first server as the target server for this time.

[0244] Optionally, in some embodiments, the response unit is specifically used for:

[0245] Detect the network environment parameters of each server in the first domain name system;

[0246] Determine the network quality score for each server based on network environment parameters;

[0247] Based on the network quality score, the servers are sorted, and the server with the highest network quality score is identified as the target server.

[0248] Optionally, in some embodiments, the response unit is specifically used for:

[0249] The server's throughput, round-trip latency, and packet loss rate were monitored during a predetermined transmission period.

[0250] The network quality score of the server is determined based on throughput, round-trip latency, and packet loss rate.

[0251] Optionally, in some embodiments, the pull unit is specifically used for:

[0252] Query the initial authorization record of the target server;

[0253] Based on the initial authorization record, determine the first version number of the first parsed data on the target server;

[0254] Query the second version number of the second parsed data;

[0255] If the first version number is greater than the second version number, retrieve the first parsed data from the target server.

[0256] Optionally, in some embodiments, the second parsed data includes multiple first records, and the third parsed data includes multiple second records; the comparison unit is specifically used for:

[0257] The first record is processed to obtain the first identifier information corresponding to the first record, and the second record is processed to obtain the second identifier information corresponding to the second record;

[0258] Based on the first identification information and the second identification information, each first record and the second record are compared to obtain the comparison result.

[0259] Optionally, in some embodiments, the comparison unit is specifically used for:

[0260] The characters in the first record are concatenated to obtain the first identifier information corresponding to the first record;

[0261] Alternatively, hash the first record to obtain the first identifier information corresponding to the first record;

[0262] Alternatively, a digest calculation can be performed on the first record to obtain the first identifier information corresponding to the first record.

[0263] Optionally, in some embodiments, the execution unit is specifically used for:

[0264] The synchronous update task is split into several sub-tasks;

[0265] The subtasks are divided into multiple task sets, and each task set is imported into a thread queue of the second domain name system for execution.

[0266] It is understandable that, such as Figure 4 The content of the domain name resolution data synchronization method embodiment shown is applicable to the domain name resolution data synchronization device embodiment. The specific functions implemented by the domain name resolution data synchronization device embodiment are the same as those shown in the example. Figure 4 The method for synchronizing domain name resolution data shown is the same as the embodiment described above, and the beneficial effects achieved are the same as those described above. Figure 4 The beneficial effects achieved by the domain name resolution data synchronization method shown in the embodiment are also the same.

[0267] This application also discloses an electronic device, including:

[0268] At least one processor;

[0269] At least one memory for storing at least one program;

[0270] When at least one program is executed by at least one processor, such that at least one processor implements as Figure 4 The example shown illustrates a method for synchronizing domain name resolution data.

[0271] The electronic device in the embodiments of this application may be a terminal device, a computer device, or a server device.

[0272] For example, refer to Figure 13 , Figure 13 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Taking a terminal device as an example, Figure 13 In this context, the electronic device 1300 may include an RF (Radio Frequency) circuit 1310, a memory 1320 including one or more computer-readable storage media, an input unit 1330, a display unit 1340, a sensor 1350, an audio circuit 1360, a short-range wireless transmission module 1370, a processor 1380 including one or more processing cores, and a power supply 1390, among other components. Those skilled in the art will understand that... Figure 13 The device structure shown does not constitute a limitation on the terminal device and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0273] RF circuit 1310 can be used for receiving and transmitting signals during information transmission or calls. Specifically, it receives downlink information from the base station and hands it over to one or more processors 1380 for processing; additionally, it transmits uplink data to the base station. Typically, RF circuit 1310 includes, but is not limited to, an antenna, at least one amplifier, a tuner, one or more oscillators, a SIM card, a transceiver, a coupler, an LNA (Low Noise Amplifier), a duplexer, etc. Furthermore, RF circuit 1310 can also communicate wirelessly with networks and other devices. Wireless communication can use any communication standard or protocol, including but not limited to GSM (Global System for Mobile communication), GPRS (General Packet Radio Service), CDMA (Code Division Multiple Access), WCDMA (Wideband Code Division Multiple Access), LTE (Long Term Evolution), email, SMS (Short Messaging Service), etc.

[0274] Memory 1320 can be used to store software programs and modules (or units). Processor 1380 executes various functional applications and data processing by running the software programs and modules (or units) stored in memory 1320. Memory 1320 may primarily include a program storage area and a data storage area. The program storage area may store the operating system, application programs required for at least one function (such as sound playback function, image playback function, etc.); the data storage area may store data created based on the use of electronic device 1300 (such as audio data, telephone directory, etc.). Furthermore, memory 1320 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, memory 1320 may also include a memory controller to provide access to memory 1320 for processor 1380 and input unit 1330. Although Figure 13 The RF circuit 1310 is shown, but it is understood that it is not a necessary component of the electronic device 1300 and can be omitted as needed without changing the nature of the invention.

[0275] The input unit 1330 can be used to receive input digital or character information, and to generate keyboard, mouse, joystick, optical, or trackball signal inputs related to object settings and function control. Specifically, the input unit 1330 may include a touch-sensitive surface 1331 and other input devices 1332. The touch-sensitive surface 1331, also known as a touch display screen or touchpad, can collect touch operations on or near the object (such as operations performed by the object using a finger, stylus, or any suitable object or accessory on or near the touch-sensitive surface 1331), and drive the corresponding connection device according to a pre-set program. Optionally, the touch-sensitive surface 1331 may include two parts: a touch detection device and a touch controller. The touch detection device detects the touch position of the object and the signal generated by the touch operation, and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device, converts it into touch point coordinates, sends it to the processor 1380, and can receive and execute instructions from the processor 1380. In addition, the touch-sensitive surface 1331 can be implemented using various types such as resistive, capacitive, infrared, and surface acoustic wave. Besides the touch-sensitive surface 1331, the input unit 1330 may also include other input devices 1332. Specifically, other input devices 1332 may include, but are not limited to, one or more of the following: a physical keyboard, function keys (such as volume control buttons, power buttons, etc.), a trackball, a mouse, and a joystick.

[0276] Display unit 1340 can be used to display information input by an object or information provided to an object, as well as various graphical object interfaces for controlling electronic device 1300. These graphical object interfaces can be composed of graphics, text, icons, video, and any combination thereof. Display unit 1340 may include display panel 1341, optionally configured as LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode), etc. Further, touch-sensitive surface 1331 may cover display panel 1341. When touch-sensitive surface 1331 detects a touch operation on or near it, it transmits the information to processor 1380 to determine the type of touch event. Subsequently, processor 1380 provides corresponding visual output on display panel 1341 according to the type of touch event. Although in Figure 13 In this embodiment, the touch-sensitive surface 1331 and the display panel 1341 are implemented as two separate components to realize input and output functions. However, in some embodiments, the touch-sensitive surface 1331 and the display panel 1341 can be integrated to realize input and output functions.

[0277] The electronic device 1300 may also include at least one sensor 1350, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor. The ambient light sensor can adjust the brightness of the display panel 1341 according to the ambient light level, and the proximity sensor can turn off the display panel 1341 or the backlight when the electronic device 1300 is moved to the ear. As a type of motion sensor, a gravity acceleration sensor can detect the magnitude of acceleration in various directions (generally three axes). When stationary, it can detect the magnitude and direction of gravity and can be used for applications that recognize the phone's posture (such as landscape / portrait switching, related games, magnetometer posture calibration), vibration recognition-related functions (such as pedometers, taps), etc. Other sensors that the electronic device 1300 may be equipped with, such as gyroscopes, barometers, hygrometers, thermometers, and infrared sensors, will not be described in detail here.

[0278] Audio circuitry 1360, speaker 1361, and microphone 1362 provide an audio interface between the device and electronic device 1300. Audio circuitry 1360 converts received audio data into electrical signals and transmits them to speaker 1361, where speaker 1361 converts them into sound signals for output. Conversely, microphone 1362 converts collected sound signals into electrical signals, which are then received by audio circuitry 1360, converted back into audio data, processed by processor 1380, and transmitted via RF circuitry 1310 to another electronic device, or output to memory 1320 for further processing. Audio circuitry 1360 may also include an earphone jack to facilitate communication between external headphones and electronic device 1300.

[0279] The short-range wireless transmission module 1370 can be a WIFI (wireless fidelity) module, Bluetooth module, or infrared module, etc. The electronic device 1300 can transmit information with wireless transmission modules on other devices via the short-range wireless transmission module 1370.

[0280] Processor 1380 is the control center of electronic device 1300. It connects various parts of the device via various interfaces and lines, and performs various functions and processes data of electronic device 1300 by running or executing software programs or modules stored in memory 1320 and calling data stored in memory 1320, thereby providing overall control of the device. Optionally, processor 1380 may include one or more processing cores; optionally, processor 1380 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the aforementioned modem processor may also not be integrated into processor 1380.

[0281] Electronic device 1300 also includes a power supply 1390 (such as a battery) for supplying power to various components. Optionally, the power supply 1390 can be logically connected to the processor 1380 through a power management system, thereby enabling functions such as managing charging, discharging, and power consumption through the power management system. The power supply 1390 may also include one or more DC or AC power supplies, recharging systems, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components.

[0282] Although not shown, the electronic device 1300 may also include a camera, Bluetooth module, etc., which will not be described in detail here.

[0283] This application also discloses a computer-readable storage medium storing a processor-executable program, which, when executed by a processor, is used to implement, for example... Figure 4 The example shown illustrates a method for synchronizing domain name resolution data.

[0284] Understandable, Figure 4 The content of the domain name resolution data synchronization method embodiments shown are all applicable to the embodiments of this computer-readable storage medium. The specific functions implemented by the embodiments of this computer-readable storage medium are the same as those shown in the embodiments. Figure 4 The method for synchronizing domain name resolution data shown is the same as the embodiment, and the beneficial effects achieved are the same. Figure 4 The beneficial effects achieved by the domain name resolution data synchronization method shown in the embodiment are also the same.

[0285] This application also discloses a computer program product or computer program, which includes computer instructions stored in the aforementioned computer-readable storage medium. Figure 13 The processor of the illustrated electronic device can read the computer instructions from the aforementioned computer-readable storage medium, and the processor executes the computer instructions, causing the computer device to perform... Figure 4 The example shown illustrates a method for synchronizing domain name resolution data.

[0286] Understandable, Figure 4 The content of the domain name resolution data synchronization method embodiments shown are all applicable to this computer program product or computer program embodiment. The specific functions implemented by this computer program product or computer program embodiment are the same as those shown in the embodiments. Figure 4 The method for synchronizing domain name resolution data shown is the same as the embodiment, and the beneficial effects achieved are the same. Figure 4 The beneficial effects achieved by the domain name resolution data synchronization method shown in the embodiment are also the same.

[0287] In some alternative embodiments, the functions / operations mentioned in the block diagrams may not occur in the order shown in the operation diagrams. For example, depending on the functions / operations involved, two consecutively shown blocks may actually be executed substantially simultaneously, or the blocks may sometimes be executed in reverse order. Furthermore, the embodiments presented and described in the flowcharts of this application are provided by way of example to provide a more comprehensive understanding of the technology. The disclosed methods are not limited to the operations and logic flows presented herein. Alternative embodiments are contemplated in which the order of various operations is changed and sub-operations described as part of a larger operation are executed independently.

[0288] Furthermore, although this application is described in the context of functional modules, it should be understood that, unless otherwise stated to the contrary, one or more of the functions and / or features may be integrated into a single physical device and / or software module, or one or more functions and / or features may be implemented in a separate physical device or software module. It is also understood that a detailed discussion of the actual implementation of each module is unnecessary for understanding this application. Rather, given the properties, functions, and internal relationships of the various functional modules in the apparatus disclosed herein, the actual implementation of the module will be understood within the scope of conventional technology for an engineer. Therefore, those skilled in the art can implement the application set forth in the claims using ordinary techniques without excessive experimentation. It is also understood that the specific concepts disclosed are merely illustrative and not intended to limit the scope of this application, which is determined by the full scope of the appended claims and their equivalents.

[0289] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0290] In this application embodiment, the terms "module" or "unit" refer to a computer program or part of a computer program that has a predetermined function and works with other related parts to achieve a predetermined goal, and can be implemented wholly or partially using software, hardware (such as processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units. Furthermore, each module or unit can be part of an overall module or unit that includes the functionality of that module or unit.

[0291] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable storage medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable storage medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device.

[0292] It should be understood that various parts of this application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.

[0293] In the foregoing description of this specification, the references to terms such as "one embodiment," "another embodiment," or "some embodiments," etc., indicate that a specific feature, structure, material, or characteristic described in connection with an embodiment or example is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0294] Although embodiments of this application have been shown and described, those skilled in the art will understand that various changes, modifications, substitutions and variations can be made to these embodiments without departing from the principles and spirit of this application, the scope of which is defined by the claims and their equivalents.

[0295] The above is a detailed description of the preferred embodiments of this application, but this application is not limited to the embodiments. Those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of this application, and these equivalent modifications or substitutions are all included within the scope defined by the claims of this application.

Claims

1. A method for synchronizing domain name resolution data, characterized in that, The method includes: In response to a data resolution change event in the first domain name system, the target server is determined from multiple servers in the first domain name system; Retrieve the first parsed data from the target server; Query the second DNS records in the second domain name system and the target format used by the second DNS records. Convert the first DNS records according to the target format to obtain the third DNS records. The second and third parsed data are compared to obtain the comparison result; Based on the comparison results, a synchronization update task for the second parsed data is generated, and the synchronization update task is sent to the second domain name system for execution.

2. The method for synchronizing domain name resolution data according to claim 1, characterized in that, The parsed data change event is generated through the following steps: Receive business messages sent by the first server of the first domain name system; Authenticate the first server; If the first server authenticates successfully, the type of the business message is identified; If the business message is a parsed data change message, the parsed data change event is triggered.

3. The method for synchronizing domain name resolution data according to claim 2, characterized in that, The authentication of the first server includes: Retrieve a pre-established list of notification servers; Query the first server in the list of notification servers; If the first server is in the list of notification servers, it is determined that the first server has passed authentication; If the first server is not in the list of notification servers, it is determined that the first server failed authentication.

4. The method for synchronizing domain name resolution data according to claim 1, characterized in that, The parsed data change event is generated through the following steps: Query the cumulative time elapsed since the last detected and parsed data change message; If the accumulated duration reaches a preset duration threshold, detect whether there is a data resolution change message in the first domain name system; If a DNS resolution change message exists in the first domain name system, the DNS resolution change event is triggered, and the accumulated duration is reset to zero.

5. The method for synchronizing domain name resolution data according to claim 1, characterized in that, The step of determining the target server from multiple servers in the first domain name system includes: The target server is randomly selected from multiple servers in the first domain name system; Alternatively, obtain the server list of the first domain name system, query the second server in the server list that was previously identified as the target server, and identify the next server of the first server as the target server for this time.

6. The method for synchronizing domain name resolution data according to claim 1, characterized in that, The step of determining the target server from multiple servers in the first domain name system includes: Detect the network environment parameters of each server in the first domain name system; Based on the network environment parameters, determine the network quality score for each of the servers; Based on the network quality score, the servers are sorted, and the server with the highest network quality score is determined as the target server.

7. The method for synchronizing domain name resolution data according to claim 6, characterized in that, The step of determining the network quality score for each server based on the network environment parameters includes: The throughput, round-trip time, and packet loss rate of the server are detected during a predetermined transmission period. The network quality score of the server is determined based on the throughput, the round-trip time, and the packet loss rate.

8. The method for synchronizing domain name resolution data according to any one of claims 1-7, characterized in that, The step of retrieving the first parsed data from the target server includes: Query the initial authorization record of the target server; Based on the initial authorization record, determine the first version number of the first parsed data on the target server; Query the second version number of the second parsed data; If the first version number is greater than the second version number, pull the first parsed data from the target server.

9. The method for synchronizing domain name resolution data according to claim 1, characterized in that, The second parsed data includes multiple first records, and the third parsed data includes multiple second records; the comparison of the second parsed data and the third parsed data to obtain the comparison result includes: The first record is processed to obtain the first identifier information corresponding to the first record, and the second record is processed to obtain the second identifier information corresponding to the second record; Based on the first identification information and the second identification information, each of the first record and the second record is compared to obtain the comparison result.

10. The method for synchronizing domain name resolution data according to claim 9, characterized in that, The step of processing the first record to obtain the first identifier information corresponding to the first record includes any of the following steps: The characters in the first record are concatenated to obtain the first identifier information corresponding to the first record; Alternatively, the first record can be hashed to obtain the first identifier information corresponding to the first record; Alternatively, a digest calculation can be performed on the first record to obtain the first identifier information corresponding to the first record.

11. The method for synchronizing domain name resolution data according to claim 1, characterized in that, Sending the synchronization update task to the second domain name system for execution includes: The synchronous update task is split into several sub-tasks; The subtasks are divided into multiple task sets, and each task set is imported into a thread queue of the second domain name system for execution.

12. A device for synchronizing domain name resolution data, characterized in that, The device includes: A response unit is used to determine the target server from multiple servers in the first domain name system in response to a data resolution change event in the first domain name system. A fetch unit is used to fetch first parsed data from the target server; The conversion unit is used to query the second resolved data in the second domain name system and the target format used by the second resolved data, and convert the first resolved data according to the target format to obtain the third resolved data; The comparison unit is used to compare the second parsed data and the third parsed data to obtain the comparison result; An execution unit is configured to generate a synchronization update task for the second parsed data based on the comparison result, and send the synchronization update task to the second domain name system for execution.

13. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the method for synchronizing domain name resolution data as described in any one of claims 1 to 11.

14. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the method for synchronizing domain name resolution data as described in any one of claims 1 to 11.

15. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the method for synchronizing domain name resolution data as described in any one of claims 1 to 11.