Method, device, equipment and storage medium for updating domain name system configuration information
By establishing a communication connection between the DNS server and the DNS scheduling center and directly sending the latest DNS configuration information, the problem of the time-consuming update method of existing DNS configuration is solved, and fast and efficient DNS configuration updates are achieved to ensure the accuracy and speed of domain name resolution.
Patent Information
- Application Number
- CN202311297324.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-08
- Publication Date
- 2025-04-08
AI Technical Summary
The existing DNS configuration update method takes a long time and is inefficient, affecting the accuracy and speed of domain name resolution.
By establishing a communication connection between the DNS server and the DNS scheduler center, the latest DNS configuration information is directly sent to the DNS server, avoiding disk operations such as generating, packaging, transmitting and decompressing configuration files.
It significantly improves the update speed of DNS configuration information, improves the accuracy and speed of domain name resolution, and reduces the use of DNS scheduling center and DNS server resources.
Smart Images

Figure CN119788636A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of computer technology, and in particular to a method, apparatus, device and storage medium for updating domain name system configuration information. Background Art
[0002] There are a large number of computers and servers on the Internet, and each device has a unique IP address. However, IP addresses are not easy to remember, so domain names are used to access and remember resources. DNS (Domain Name System) is the phone book of the Internet, which is used to convert user-readable domain names into computer-recognizable IP addresses. For example, when a user enters the domain name www.example.com in a browser, the DNS system resolves the domain name into an IP address such as 192.168.1.1, and sends the resolution result to the browser, which then accesses the corresponding server based on the resolution result.
[0003] When you need to change the DNS scheduling policy, you need to modify the DNS configuration information, for example, change the resolution result of the domain name www.example.com from 192.168.1.1 to 192.168.1.2. The current DNS configuration update process mainly includes: the operator modifies the configuration information on the DNS scheduling operation page and sends the configuration information to the DNS scheduling center. The DNS scheduling center converts the configuration information into a configuration file, packages the configuration file to obtain a packaged file, and sends the packaged configuration file to the DNS server. The DNS server decompresses the packaged configuration file, and then copies the decompressed configuration file to the DNS service process to update the DNS configuration information.
[0004] From the above, it can be seen that the current DNS configuration update method is time-consuming and inefficient. Summary of the invention
[0005] The present application provides a method, device, equipment and storage medium for updating domain name system configuration information, which can improve the updating speed of DNS configuration information.
[0006] In a first aspect, the present application provides a method for updating domain name system configuration information, which is applied to a domain name system DNS server, and the method comprises:
[0007] Establish a communication connection with the DNS dispatch center;
[0008] Receiving, through the communication connection, the latest DNS configuration information sent by the DNS scheduling center when detecting that the DNS configuration information is updated, wherein the latest DNS configuration information includes the updated DNS configuration information, and the DNS configuration information includes a mapping relationship between a domain name and an IP address;
[0009] Based on the latest DNS configuration information, the existing DNS configuration information in the DNS server is updated.
[0010] In a second aspect, the present application provides a method for updating domain name system configuration information, which is applied to a domain name system DNS scheduling center, and the method includes:
[0011] Establish a communication connection with the DNS server;
[0012] When a DNS configuration information update is detected, the latest DNS configuration information is sent to the DNS server through the communication connection, so that the DNS server updates the DNS configuration information in the DNS server based on the latest DNS configuration information, the latest DNS configuration information includes the updated DNS configuration information, and the DNS configuration information includes a mapping relationship between the domain name and the IP address.
[0013] In a third aspect, the present application provides a domain name system configuration information device, which is applied to a domain name system DNS server, and the device includes:
[0014] A communication module, used to establish a communication connection with a DNS scheduling center;
[0015] A transceiver module, configured to receive, through the communication connection, the latest DNS configuration information sent by the DNS scheduling center when detecting that the DNS configuration information is updated, wherein the latest DNS configuration information includes the updated DNS configuration information, and the DNS configuration information includes a mapping relationship between a domain name and an IP address;
[0016] The updating module is used to update the existing DNS configuration information in the DNS server based on the latest DNS configuration information.
[0017] In some embodiments, the transceiver module is specifically used to send an update request to the DNS scheduling center through the communication connection, and the update request is used to request the latest DNS configuration information; through the communication connection, the latest DNS configuration information sent by the DNS scheduling center is received, and the latest DNS configuration information is sent by the DNS scheduling center based on the update request when it detects that the DNS configuration information is updated.
[0018] In some embodiments, the transceiver module is specifically used to periodically send the update request to the DNS scheduling center through the communication connection.
[0019] In some embodiments, if the communication connection is a full-duplex communication connection, the transceiver module is specifically used to receive, through the communication connection, the latest DNS configuration information that the DNS scheduling center actively sends to the DNS server when it detects that the DNS configuration information is updated.
[0020] In some embodiments, the DNS server includes a DNS service process and a communication module, which is specifically used to start the DNS service process and control the DNS service process to establish the communication connection with the DNS scheduling center;
[0021] The transceiver module is specifically used to control the DNS service process to receive the latest DNS configuration information sent by the DNS scheduling center through the communication connection when the DNS configuration information is detected to be updated;
[0022] The update module is specifically used to control the DNS service process to update the existing DNS configuration information of the DNS service process based on the latest DNS configuration information.
[0023] In some embodiments, the DNS server includes a DNS service process and an update module, which is specifically used to control the DNS service process to load the latest DNS configuration information received by the DNS server; and control the DNS service process to update the existing DNS configuration information of the DNS service process based on the latest DNS configuration information.
[0024] In some embodiments, the update module is specifically used to update the IP address corresponding to the i-th domain name in the updated DNS configuration information to a new IP address corresponding to the i-th domain name in the updated DNS configuration information if the DNS service process includes the IP address corresponding to the i-th domain name, where i is a positive integer; if the DNS service process does not include the IP address corresponding to the i-th domain name, then add the i-th domain name in the updated DNS configuration information and the IP address corresponding to the i-th domain name to the DNS service process.
[0025] In some embodiments, the DNS service process includes a cache module and an update module, and is further used to update the DNS configuration information cached in the cache module based on the latest DNS configuration information.
[0026] In some embodiments, the update module is specifically used to determine whether the updated DNS configuration information includes a new IP address corresponding to the j-th domain name cached in the cache module, where j is a positive integer; if the updated DNS configuration information includes the new IP address of the j-th domain name, then the IP address corresponding to the j-th domain name in the cache module is deleted, or the IP address corresponding to the j-th domain name in the cache module is updated to the new IP address.
[0027] In some embodiments, the communication module is specifically used to receive the routing information of the DNS scheduling center sent periodically by the routing system; and establish the communication connection with the DNS scheduling center based on the routing information.
[0028] In some embodiments, the communication connection is a communication connection based on the WebScoket protocol.
[0029] In a third aspect, an embodiment of the present application provides a device for updating domain name system configuration information, which is applied to a domain name system DNS scheduling center, and the device includes:
[0030] A communication module, used to establish a communication connection with a DNS server;
[0031] The transceiver module is used to send the latest DNS configuration information to the DNS server through the communication connection when detecting that the DNS configuration information is updated, so that the DNS server updates the DNS configuration information in the DNS server based on the latest DNS configuration information, wherein the latest DNS configuration information includes the updated DNS configuration information, and the DNS configuration information includes the mapping relationship between the domain name and the IP address.
[0032] In some embodiments, the transceiver module is specifically used to receive an update request sent by the DNS server through the communication connection, and the update request is used to request the latest DNS configuration information; based on the update request, when it is detected that the DNS configuration information is updated, the latest DNS configuration information is sent to the DNS server.
[0033] In some embodiments, the transceiver module is specifically used to periodically receive the update request sent by the DNS server through the communication connection.
[0034] In some embodiments, if the communication connection is a full-duplex communication connection, the transceiver module 22 is specifically configured to actively send the latest DNS configuration information to the DNS server through the communication connection when it is detected that the DNS configuration information is updated.
[0035] In some embodiments, the DNS server includes a DNS service process, and a communication module 21 is specifically used to establish the communication connection with the DNS service process;
[0036] The transceiver unit is specifically used to send the latest DNS configuration information to the DNS service process through the communication connection.
[0037] In a fifth aspect, an electronic device is provided, comprising a processor and a memory, wherein the memory is used to store a computer program, and the processor is used to call and run the computer program stored in the memory to execute the method in the first aspect or the second aspect and its implementation manners.
[0038] In a sixth aspect, a chip is provided for implementing the method in any aspect of the first aspect or its respective implementations. Specifically, the chip includes: a processor for calling and running a computer program from a memory, so that a device equipped with the chip executes the method in the first aspect or the second aspect and its respective implementations.
[0039] In a seventh aspect, a computer-readable storage medium is provided for storing a computer program, wherein the computer program enables a computer to execute the method in the above-mentioned first aspect or second aspect and its various implementation methods.
[0040] In an eighth aspect, a computer program product is provided, comprising computer program instructions, wherein the computer program instructions enable a computer to execute the method in the above-mentioned first aspect or second aspect and its respective implementation manners.
[0041] In a ninth aspect, a computer program is provided, which, when executed on a computer, enables the computer to execute the method in the first aspect or the second aspect and its respective implementation manners.
[0042] In summary, the embodiment of the present application establishes a communication connection between the DNS server and the DNS scheduling center directly, so that the DNS scheduling center can directly send the latest DNS configuration information to the DNS server through the communication connection. The DNS server updates the existing DNS configuration information in the DNS server based on the latest DNS configuration information. In other words, the DNS scheduling center in the embodiment of the present application can send the latest DNS configuration information to the DNS server through the communication connection, so that the update process of the DNS configuration information is implemented in the memory, eliminating the need for the DNS scheduling center to perform disk operations such as generating configuration files, packaging configuration files, and transmitting configuration files, and eliminating the need for the DNS server to perform disk operations such as decompressing configuration files and copying configuration files, thereby greatly improving the update efficiency of the DNS configuration information, and thereby ensuring the accuracy and speed of domain name resolution during the update of the DNS configuration information. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0044] Figure 1 A schematic diagram for updating the existing DNS configuration information;
[0045] Figure 2 A schematic diagram of an implementation environment involved in an embodiment of the present application;
[0046] Figure 3 This is an optional structural diagram of a distributed system provided by an embodiment of the present invention applied to a blockchain system;
[0047] Figure 4 is an optional schematic diagram of a block structure provided by an embodiment of the present invention;
[0048] Figure 5 A flowchart of a method for updating domain name system configuration information provided in an embodiment of the present application;
[0049] Figure 6 A schematic diagram for updating DNS configuration information;
[0050] Figure 7 A schematic diagram of the existing DNS service process;
[0051] Figure 8 A schematic diagram of a DNS service process involved in an embodiment of the present application;
[0052] Fig. 9 A flowchart of a method for updating domain name system configuration information provided in an embodiment of the present application;
[0053] Fig.10 A schematic diagram of updating DNS configuration information involved in an embodiment of the present application;
[0054] Fig.11 A flowchart of a method for updating domain name system configuration information provided in an embodiment of the present application;
[0055] Fig.12 is a schematic block diagram of a device for updating domain name system configuration information provided by an embodiment of the present application;
[0056] Fig.13 is a schematic block diagram of a device for updating domain name system configuration information provided by an embodiment of the present application;
[0057] Fig.14 It is a schematic block diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0058] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0059] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application described here can be implemented in a sequence other than those illustrated or described here. In an embodiment of the present invention, "B corresponding to A" means that B is associated with A. In one implementation, B can be determined according to A. However, it should also be understood that determining B according to A does not mean determining B only according to A, but can also determine B according to A and / or other information. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or server that includes a series of steps or units does not have to be limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices. In the description of the present application, unless otherwise specified, "multiple" refers to two or more than two.
[0060] The technical solution proposed in this application can be applied to technical fields such as cloud computing, distributed systems, blockchain, and domain name system to improve the efficiency of DNS configuration updates, thereby improving the accuracy and speed of domain name resolution.
[0061] The working principle of DNS is to query the IP address corresponding to the domain name entered by the user based on the mapping relationship between domain names and IP addresses. For example, when a user enters a domain name in the browser, the system will first query the local cache. If the corresponding record does not exist in the cache, it will send a request to the DNS server to obtain the IP address corresponding to the domain name. The DNS server will perform recursive or iterative queries based on the hierarchical structure of the domain name until the corresponding IP address is found, and return the result to the browser.
[0062] In some cases, the mapping relationship between domain names and IP addresses in the DNS configuration information is modified. For example, the IP address corresponding to a domain name is modified, or a newly added domain name and IP address are added to the DNS configuration information. In this case, the DNS configuration information needs to be updated.
[0063] For example, Figure 1 As shown, the current DNS configuration information update process mainly includes the following steps: First, the operator modifies the DNS configuration information on the DNS scheduling operation page, such as modifying the IP address corresponding to the domain name, or adding a new domain name and IP address. Then, the operator saves the updated configuration information and sends the updated configuration information to the DNS scheduling center. The DNS scheduling center generates a configuration file based on the received configuration information, and packages the generated configuration file to obtain a packaged file. Then, the packaged configuration file is sent to the DNS server. The DNS server decompresses the DNS configuration file sent by the DNS scheduling center, and copies the decompressed configuration file to the configuration file directory of the DNS service process. The DNS service process loads the configuration file to complete the modification of the scheduling policy.
[0064] The DNS configuration information is very large, and the packaged configuration file is usually tens of MB in size. The current solution is to send a complete packaged file each time, and the operations of generating configuration files, packaging configuration files, transferring configuration files, decompressing configuration files, and copying configuration files are all time-consuming disk operations, which makes the update of DNS configuration information very time-consuming, usually reaching the minute level. Since the current update of DNS configuration information is time-consuming, if the DNS server receives a domain name resolution request during the process of updating the DNS configuration information, there will be the following two situations. The first is that when the DNS server performs domain name resolution based on the unupdated DNS configuration information, there may be an inaccurate domain name resolution problem. The second is that if the DNS server uses the updated DNS configuration information for domain name resolution, it is necessary to wait until the DNS configuration information is updated before performing domain name resolution, and there is a problem of domain name resolution delay. It can be seen from this that the update speed of the DNS configuration information directly affects the effect of domain name resolution, so how to improve the update speed of the DNS configuration information is a technical problem that needs to be solved in this field.
[0065] In order to solve the above technical problems, the DNS server in the embodiment of the present application directly establishes a communication connection with the DNS scheduling center, so that the DNS scheduling center can directly send the latest DNS configuration information to the DNS server through the communication connection. The DNS server updates the existing DNS configuration information in the DNS server based on the latest DNS configuration information. In other words, the DNS scheduling center in the embodiment of the present application can send the latest DNS configuration information to the DNS server through the communication connection, eliminating many time-consuming disk operations such as generating configuration files, packaging configuration files, transmitting configuration files, decompressing configuration files, and copying configuration files, thereby greatly improving the update efficiency of the DNS configuration information, and thus ensuring the accuracy and speed of domain name resolution during the update of the DNS configuration information.
[0066] The implementation environment of the embodiments of the present application is introduced below.
[0067] Figure 2 1 is a schematic diagram of an implementation environment involved in an embodiment of the present application, including a DNS server 101 and a DNS scheduling center 102. Figure 2 As shown, the DNS server 101 is connected to the DNS scheduling center 102 in communication, and the two can communicate directly through the network. The DNS server 101 is connected to multiple terminal devices 103 in communication.
[0068] In the embodiment of the present application, the DNS server stores DNS configuration information, which includes the mapping relationship between the domain name and the IP address. The DNS server can receive a domain name resolution request sent by the client (or browser) on the terminal device 103. The DNS server queries the IP address corresponding to the domain name to be resolved in the domain name resolution request based on the stored DNS configuration information. This process is called domain name resolution. Then, the DNS server sends the resolution result (i.e., the IP address corresponding to the domain name to be resolved) to the terminal device 103, so that the client (browser) on the terminal device 103 can access the corresponding device based on the IP address corresponding to the domain name.
[0069] The embodiments of the present application mainly relate to the updating process of DNS configuration information. Specifically, in order to improve the updating speed of DNS configuration information, the embodiments of the present application establish a communication connection between the DNS server and the DNS scheduling center. In this way, the DNS scheduling center does not need to generate a configuration file from the new configuration information and package the configuration file, but directly sends the latest DNS configuration information directly to the DNS server through the communication connection. After the DNS server receives the latest DNS configuration information through the communication connection, it directly updates the existing DNS configuration information stored by itself without the need to perform disk operations such as decompressing and copying the configuration file, thereby greatly improving the updating speed of the DNS configuration information.
[0070] In some embodiments, the DNS server 101 involved in the embodiments of the present application may be one or more. When there are multiple servers, there are at least two servers for providing different services, and / or there are at least two servers for providing the same service, such as providing the same service in a load balancing manner, which is not limited in the embodiments of the present application. Among them, the above-mentioned server can be an independent physical server, or 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 communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. The DNS server 101 can also become a node of the blockchain.
[0071] In one example, if the DNS server 101 of the embodiment of the present application is a node in the blockchain system, Figure 3 As shown, Figure 3 This is an optional structural diagram of a blockchain system involved in the embodiment of the present application, which is formed by multiple nodes (any form of electronic equipment in the access network, such as servers and user terminals), and a point-to-point network is formed between the nodes. The point-to-point protocol is an application layer protocol running on the Transmission Control Protocol (TCP). In a distributed system, any machine such as a server or a terminal can join and become a node. The node includes a hardware layer, an intermediate layer, an operating system layer, and an application layer.
[0072] See also Figure 3 The functions of each node in the blockchain system shown include: routing function, which is a basic function of the node and is used to support communication between nodes. In addition to the routing function, the node can also have an application function. Among them, the application is used to be deployed in the blockchain, implement specific services according to actual business needs, record data related to the implementation of the function to form record data, carry a digital signature in the record data to indicate the source of the task data, and send the record data to other nodes in the blockchain system for other nodes to add the record data to the temporary block when the source and integrity of the record data are successfully verified.
[0073] For example, the services implemented by the application include: wallets, shared ledgers, smart contracts, and blockchains. Among them, the wallet is used to provide the function of conducting electronic currency transactions, including initiating transactions (that is, sending the transaction record of the current transaction to other nodes in the blockchain system. After other nodes successfully verify, as a response to acknowledging the validity of the transaction, the record data of the transaction is stored in a temporary block of the blockchain; of course, the wallet also supports querying the remaining electronic currency in the electronic currency address. The shared ledger is used to provide functions such as storage, query, and modification of account data. The record data of the operation on the account data is sent to other nodes in the blockchain system. After other nodes verify that it is valid, as a response to acknowledging the validity of the account data, the record data is stored in a temporary block, and a confirmation can also be sent to the node that initiated the operation. Smart Smart contracts are computerized protocols that can execute the terms of a contract. They are implemented by deploying code on a shared ledger that is executed when certain conditions are met. The code is used to complete automated transactions based on actual business needs, such as querying the logistics status of the goods purchased by the buyer, and transferring the buyer's electronic currency to the merchant's address after the buyer signs for the goods. Of course, smart contracts are not limited to executing contracts for transactions, but can also execute contracts for processing received information. Blockchain includes a series of blocks that are connected to each other in the order of their generation. Once a new block is added to the blockchain, it will not be removed. The block records the record data submitted by the nodes in the blockchain system.
[0074] See also Figure 4 , Figure 4 This is an optional schematic diagram of the block structure provided by the embodiment of the present application. Each block includes the hash value of the transaction record stored in this block (the hash value of this block) and the hash value of the previous block. Each block is connected by the hash value to form a blockchain. In addition, the block can also include information such as the timestamp when the block was generated. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains relevant information for verifying the validity of its information (anti-counterfeiting) and generating the next block.
[0075] It should be noted that the implementation environment of the embodiments of the present application includes but is not limited to Figure 2 shown.
[0076] The technical solutions of the embodiments of the present application are described in detail below through some embodiments. The following embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments.
[0077] Figure 5A flowchart of a method for updating domain name system configuration information provided by an embodiment of the present application. Figure 5 As shown, the method for updating the domain name system configuration information in the embodiment of the present application includes the following steps:
[0078] S101. A DNS server establishes a communication connection with a DNS scheduling center.
[0079] In an embodiment of the present application, the DNS server stores DNS configuration information, which includes a mapping relationship between a domain name and an IP address.
[0080] For example, the DNS configuration information is shown in Table 1:
[0081] Table 1
[0082] domain name IP address www.x1x2x3.com A1 www.x4x5x6.com A2 …… ……
[0083] During the domain name resolution (also called domain name query), the user enters the domain name in the browser or client, and the browser or client queries the local cache to see if there is an IP address corresponding to the domain name. If not, the browser or client sends a domain name query request to the DNS server, which includes the domain name entered by the user. The DNS server queries the IP address corresponding to the domain name in the saved DNS configuration information, and then sends the IP address to the browser or client, so that the browser or client can access the corresponding device based on the IP address corresponding to the domain name.
[0084] If the DNS configuration information is updated, the DNS configuration information stored in the DNS server needs to be updated.
[0085] As can be seen from the above, the existing method for updating DNS configuration information requires executing many time-consuming disk operations such as generating configuration files, packaging configuration files, transmitting configuration files, decompressing configuration files, and copying configuration files, which makes the updating efficiency of DNS configuration information low.
[0086] In the embodiment of the present application, in order to improve the update speed of the DNS configuration information, Figure 6 As shown, a communication connection is established between the DNS server and the DNS scheduling center. At this time, the DNS scheduling center does not need to generate a configuration file from the new configuration information and perform disk operations such as packaging the configuration file. Instead, it directly sends the latest DNS configuration information under the DNS scheduling operation platform to the DNS server through the communication connection. After the DNS server receives the latest DNS configuration information through the communication connection, it can directly update the existing DNS configuration information saved by itself without the need to perform disk operations such as decompressing and copying the configuration file, thereby greatly improving the update speed of the DNS configuration information.
[0087] The embodiment of the present application does not limit the type of communication connection between the DNS server and the DNS scheduling center.
[0088] In some embodiments, the communication connection between the DNS server and the DNS scheduling center can be a short connection, for example, the DNS server and the DNS scheduling center establish a short connection based on the UDP protocol. Optionally, in an embodiment of the present application, the DNS server and the DNS scheduling center may need to establish multiple short connections.
[0089] In one example, the DNS server may intermittently send a short connection request to the DNS scheduling center. The DNS scheduling center establishes a short connection with the DNS server based on the short connection request, and sends the new DNS configuration information to the DNS server through the short connection.
[0090] In another example, the DNS scheduling center can send a short connection request to the DNS server. For example, the DNS scheduling center sends a short connection request to the DNS server each time it detects that the DNS configuration information is updated. The DNS server establishes a short connection with the DNS scheduling center based on the short connection request. The DNS scheduling center sends the new DNS configuration information to the DNS server through the short connection.
[0091] In some embodiments, the communication connection between the DNS server and the DNS scheduling center can be a long connection, for example, the DNS server and the DNS scheduling center establish a long connection based on the TCP protocol. That is, in the embodiment of the present application, after the DNS server and the DNS scheduling center establish a long connection once, the DNS scheduling center can send multiple new DNS configuration information to the DNS server through the long connection.
[0092] In one example, when the DNS server is powered on, it sends a persistent connection request to the DNS scheduling center. Based on the persistent connection request, the DNS scheduling center establishes a persistent connection with the DNS server and sends new DNS configuration information to the DNS server through the persistent connection.
[0093] In another example, the DNS scheduling center can send a persistent connection request to the DNS server. For example, when the DNS scheduling center detects that the DNS configuration information is updated for the first time, the DNS scheduling center sends a persistent connection request to the DNS server. The DNS server establishes a persistent connection with the DNS scheduling center based on the persistent connection request. The DNS scheduling center sends the new DNS configuration information to the DNS server through the persistent connection.
[0094] In some embodiments, the communication connection between the DNS server and the DNS scheduling center is a full-duplex connection, that is, after the DNS server is connected to the DNS scheduling center, the DNS server can send data to the DNS scheduling center, and the DNS scheduling center can also send data to the DNS server.
[0095] In some embodiments, the DNS server of the embodiment of the present application establishes a communication connection with the DNS dispatch center based on the WebScoket protocol. Among them, WebScoket is an application layer protocol, defined on the TCP / IP protocol stack, and the URI of the WebScoket connection server begins with "ws" or "wss". The WebScoket protocol is divided into two parts, namely the handshake phase and the data communication phase.
[0096] The following uses the WebScoket protocol as an example to introduce the process of establishing a communication connection between the DNS server and the DNS scheduling center (i.e., the handshake process).
[0097] First, the DNS server sends a TCP message to the DNS scheduling center. The TCP message includes SYN, indicating that the DNS server wants to establish a connection with the DNS scheduling center.
[0098] After receiving the TCP message sent by the DNS server, the DNS scheduling center returns a message to the DNS server, which carries the SYN and ACK flags to inquire whether the DNS server is ready.
[0099] The DNS server responds to the DNS scheduling center with an ACK again, indicating that the DNS server is ready.
[0100] After the above three-way handshake, the DNS server and the DNS scheduling center establish a communication connection and can carry out subsequent data transmission.
[0101] In some embodiments, the DNS server includes a communication module, and the DNS server establishes a communication connection with the DNS scheduling center through the communication module.
[0102] In some embodiments, the DNS server of the embodiments of the present application includes a DNS service process, and the DNS server controls the DNS service process to establish a communication connection with the DNS scheduling center.
[0103] The embodiment of the present application does not limit the specific type of the DNS service process included in the DNS server. The DNS service process is used to provide DNS services, such as storage, management, domain name query and other services of DNS configuration information.
[0104] In one example, the DNS service process is a bind process.
[0105] For example, take the bind process in the DNS service process as an example. Figure 7 As shown, the existing bind process includes a transmission control module, a name resolution module, a cache module, a configuration management module and a record management module.
[0106] Among them, the Transport Control Module is responsible for handling the transport layer details of the DNS protocol, such as TCP / UDP connection management, data packet fragmentation and reassembly, etc. For example, receiving a DNS query request (also called a domain name resolution request) sent by a user, which includes a domain name to be resolved (also called a domain name to be queried).
[0107] Name Resolution Module: Responsible for parsing DNS query requests and responses and performing DNS resolution operations. For example, the DNS query request received by the transmission control module is parsed to obtain the domain name to be resolved included in the DNS query request.
[0108] Configuration Management Module: Responsible for providing interfaces related to managing DNS servers, such as configuration file parsing, logging, and performance statistics.
[0109] Cache Module: Responsible for storing records of recently accessed DNS configuration information to improve resolution speed and performance.
[0110] Record Management Module: Responsible for managing the storage and retrieval of DNS records, including operations such as adding, deleting, and modifying DNS records.
[0111] like Figure 7 As shown, in the actual domain name resolution (or domain name query) process, the transmission control module receives the DNS query request entered by the user on the client (or browser), and resolves the DNS query request to obtain the domain name to be queried. Then, the DNS resolution module is responsible for the corresponding domain name resolution based on the domain name to be queried, that is, it is responsible for querying the IP address corresponding to the domain name to be queried. The domain name resolution process includes: first querying the cache module, if there is no hit in the cache module, that is, the IP address corresponding to the domain name to be queried is not included, then querying the configuration module for the IP address corresponding to the domain name to be queried. Finally, the transmission control module sends the resolution result of the domain name, that is, the IP address corresponding to the domain name to be queried, to the client (or browser). At the same time, the record management module records the complete process of this resolution.
[0112] From the above, it can be seen that the DNS server implements DNS resolution and management by starting the DNS service process in memory.
[0113] During the update process of the existing DNS configuration information, after the DNS scheduling center receives the updated configuration information, it generates a configuration file from the updated configuration information, then packages the configuration file, and then sends the packaged configuration file to the DNS server. Next, the DNS server decompresses the packaged configuration file to obtain the updated configuration information, and then copies the decompressed configuration information to the configuration file directory of the DNS service process. Finally, the DNS service process is notified to load the configuration information from the configuration file directory. The DNS service process loads the configuration information and updates the existing DNS configuration information in the configuration management module based on the loaded configuration information, completing the modification of the scheduling strategy.
[0114] It can be seen that in the current DNS configuration information update process, the DNS scheduling center and the DNS server have to perform time-consuming disk operations such as generating configuration files, packaging configuration files, transferring configuration files, decompressing configuration files, and copying configuration files. Finally, the configuration information copied to the configuration file directory is loaded by the DNS service process, making the entire DNS configuration information update process very time-consuming and inefficient, and the effect of domain name resolution is poor.
[0115] In order to solve this technical problem, in some embodiments, the DNS server can start the DNS service process and control the DNS service process to establish a communication connection with the DNS scheduling center. In this way, the DNS scheduling center can directly send the latest DNS configuration information to the DNS service process through the communication connection, and the DNS scheduling center does not need to perform time-consuming disk operations such as generating configuration files, packaging configuration files, and transmitting configuration files. At the same time, the DNS server does not need to perform time-consuming disk operations such as decompressing configuration files and copying configuration files, thereby greatly improving the update speed of DNS configuration information, reducing the occupation of DNS scheduling center and DNS server resources by the update of DNS configuration information, and thus saving equipment resources.
[0116] In some embodiments, in order to facilitate the establishment of a communication connection between the DNS service process and the DNS server, such as Figure 8 As shown, the DNS service process of the embodiment of the present application includes a communication connection module, which is used to establish a communication connection with the DNS server.
[0117] For example, if the communication connection between the DNS scheduling center and the DNS server in the embodiment of the present application is a communication connection based on the WebScoket protocol, then the above Figure 8The communication module in is a WebScoket module. The DNS service process proposes a communication connection based on the WebScoket protocol with the DNS scheduling center through the WebScoket module. Optionally, a WebScoket module is also added to the DNS scheduling center of the embodiment of the present application, so that the DNS scheduling center establishes a communication connection based on the WebScoket protocol with the WebScoket module in the DNS service process through the WebScoket module.
[0118] In the embodiment of the present application, after the DNS server establishes a communication connection with the DNS scheduling center based on the above steps, the following step S102 is executed.
[0119] S102: When the DNS scheduling center detects that the DNS configuration information is updated, the DNS scheduling center sends the latest DNS configuration information to the DNS server through the communication connection.
[0120] The latest DNS configuration information includes updated DNS configuration information, and the DNS configuration information includes a mapping relationship between a domain name and an IP address.
[0121] In the embodiment of the present application, after the DNS server establishes a communication connection with the DNS scheduling center, when the DNS scheduling center detects that the DNS configuration information is updated, it can directly send the latest DNS configuration information to the DNS server through the communication connection. This eliminates the need to perform time-consuming disk operations such as generating configuration files, packaging configuration files, transmitting configuration files, decompressing configuration files, and copying configuration files, thereby greatly improving the update speed of the DNS configuration information.
[0122] The following is an introduction to the specific process of the DNS scheduling center sending the latest DNS configuration information to the DNS server through a communication connection.
[0123] In the embodiment of the present application, the specific manner in which the DNS scheduling center sends the latest DNS configuration information to the DNS server through the communication connection includes at least the following:
[0124] Method 1: Send the latest DNS configuration information through the following steps S102-A1 and S102-A2:
[0125] S102-A1. The DNS server sends an update request to the DNS scheduling center through a communication connection, where the update request is used to request the latest DNS configuration information;
[0126] S102-A2: When it is detected that the DNS configuration information is updated, the latest DNS configuration information is sent to the DNS server through the communication connection.
[0127] The latest DNS configuration information includes updated DNS configuration information, wherein the DNS configuration information includes a mapping relationship between a domain name and an IP address.
[0128] In the first implementation method, the DNS server sends an update request to the DNS scheduling center through the communication connection with the DNS scheduling center, and the update request is used to request the latest DNS configuration information. After the DNS scheduling center receives the update request sent by the DSN server, the DNS scheduling center detects whether the DNS configuration information has been updated. That is, the DNS scheduling center compares the DNS configuration information currently saved by the DNS scheduling center with the DNS configuration that the DNS scheduling center last sent to the DNS server. If the DNS configuration information currently saved by the DNS scheduling center is inconsistent with the DNS configuration that the DNS scheduling center last sent to the DNS server, it means that the DNS configuration information has been updated. At this time, the DNS scheduling center directly sends the latest DNS configuration information to the DNS server for updating through the communication connection with the DNS server.
[0129] If the DNS configuration information currently saved by the DNS scheduling center is consistent with the DNS configuration that the DNS scheduling center last sent to the DNS server, it means that the DNS configuration information has not been updated. At this time, the DNS scheduling center does not send configuration information to the DNS server. For example, the DNS scheduling center sends a response message to the DNS server, and the response message is used to indicate that the DNS configuration information has not been updated. For another example, after the DNS scheduling center receives the update request sent by the DNS server, it does not send any response information to the DNS server, which means that the DNS configuration information has not been updated.
[0130] The embodiment of the present application does not limit the triggering conditions for the DNS server to send an update request to the DNS scheduling center.
[0131] In some embodiments, upon receiving a domain name query request from a user, the DNS server sends an update request to the DNS scheduling center. After receiving the update request sent by the DNS server, the DNS scheduling center detects whether the DNS configuration information has been updated. If the DNS scheduling center detects that the DNS configuration information has been updated, the latest DNS configuration information is sent to the DNS server. In this way, the DNS server performs domain name resolution based on the latest DNS configuration information, which can improve the accuracy of domain name resolution. In addition, in an embodiment of the present application, the DNS server is connected in communication with the DNS scheduling center, and the DNS scheduling center can quickly send the latest DNS configuration information to the DNS server through the communication connection, thereby improving the accuracy of domain name resolution without increasing the time of domain name resolution, thereby improving the effect of domain name resolution.
[0132] In some embodiments, the DNS server periodically sends an update request to the DNS scheduling center through a communication connection. In this way, the DNS scheduling center can send the latest updated configuration information to the DNS server in a timely manner based on the update request periodically sent by the DNS server. For example, the periodic time for the DNS server to send an update request to the DNS scheduling center is 10 minutes. When the first 10 minutes arrive, the DNS server sends an update request to the DNS scheduling center. Based on the update request, the DNS scheduling center detects that the DNS configuration information has not been updated in the first 10 minutes, and then does not send the DNS configuration information to the DNS server. When the second 10 minutes arrive, the DNS server sends an update request to the DNS scheduling center again. After receiving the update request, the DNS scheduling center detects that the DNS configuration information has been updated in the second 10 minutes, and then sends the latest DNS configuration information to the DNS server through the communication connection, so that the DNS server completes the update of the DNS configuration information based on the latest DNS configuration information.
[0133] Mode 2: If the communication connection is a full-duplex communication connection, the latest DNS configuration information is sent through the following step S102-B:
[0134] S102-B, when the DNS scheduling center detects that the DNS configuration information is updated, it actively sends the latest DNS configuration information to the DNS server through the communication connection.
[0135] In the second method, if the communication connection between the DNS server and the DNS scheduling center is a full-duplex communication connection, the DNS server can send data to the DNS scheduling center at any time, and the DNS scheduling center can also send data to the DNS server at any time. Based on this, in order to improve the update efficiency of the DNS configuration information and the number of communications between the DNS server and the DNS scheduling center, the DNS scheduling center will actively send the latest DNS configuration information to the DNS server when it detects that the DNS configuration information is updated, so that the DNS server can obtain the updated DNS configuration information in time, further improving the update speed of the DNS configuration information.
[0136] In some embodiments, if the DNS server includes a communication module, the DNS server establishes a communication connection with the DNS scheduling center through the communication module, and through the communication connection, the DNS scheduling center sends the latest DNS configuration information to the DNS scheduling center.
[0137] In some embodiments, the DNS server includes a DNS service process, and the DNS service process includes a communication module. The DNS server can control the DNS service process to establish a communication connection with the DNS scheduling center through the communication module. Based on this, the DNS scheduling center can directly send the latest DNS configuration information to the DNS service process through the communication connection.
[0138] S103: The DNS server updates the existing DNS configuration information in the DNS server based on the latest DNS configuration information.
[0139] In the embodiment of the present application, the DNS scheduling center establishes a communication connection with the DNS server, so that when the DNS scheduling center detects that the DNS configuration information is updated, the latest DNS configuration information is directly sent to the DNS scheduling center through the communication connection with the DNS server. Then, the DNS server updates the existing DNS configuration information in the DNS server based on the received latest DNS configuration information.
[0140] In the embodiment of the present application, the latest DNS configuration information includes the latest updated DNS configuration information.
[0141] In some embodiments, the latest DNS configuration information only includes updated DNS configuration information, and does not include unupdated DNS configuration information. This can reduce the amount of data transmission between the DNS scheduling center and the DNS server, thereby increasing the speed at which the DNS scheduling center sends the latest DNS configuration information to the DNS server through the communication connection, and further increasing the update speed of the DNS configuration information.
[0142] In this embodiment, if the latest DNS configuration information only includes updated DNS configuration information and does not include unupdated DNS configuration information, the DNS server can update the existing DNS configuration information included in the DNS server based on the updated DNS configuration information.
[0143] Specifically, for the i-th domain name in the updated DNS configuration information, if the DNS server includes the IP address corresponding to the i-th domain name, the IP address corresponding to the i-th domain name in the DNS server is updated to the new IP address corresponding to the i-th domain name in the updated DNS configuration information, where i is a positive integer; if the DNS server does not include the IP address corresponding to the i-th domain name, the i-th domain name in the updated DNS configuration information and the IP address corresponding to the i-th domain name are added to the DNS server.
[0144] For example, assume that the updated DNS configuration information is as shown in Table 2:
[0145] Table 2
[0146]
[0147]
[0148] Assume that the DNS scheduling center sends the latest DNS configuration information to the DNS server through the communication connection, and the updated DNS configuration information included in it is shown in Table 2. Assume that the existing configuration information included in the DNS server is shown in Table 1. It can be seen from the above Tables 1 and 2 that the IP address of the domain name "www.x1x2x3.com" is updated from A1 to A11, so the DNS server updates the IP address of the domain name "www.x1x2x3.com" saved from A1 to A11. The IP address of the domain name "www.x4x5x6.com" is updated from A2 to A12, so the DNS server updates the IP address of the domain name "www.x4x5x6.com" saved from A2 to A12. If the domain name "www.x7x8x9.com" in Table 2 does not exist in Table 1, it means that the domain name "www.x7x8x9.com" is a new domain name. At this time, the DNS scheduling center uses the domain name "www.x7x8x9.com" and the IP address "A6" corresponding to the domain name as new configuration information and directly adds it to the existing DNS configuration information in the DNS server.
[0149] In some embodiments, the latest DNS configuration information sent by the DNS scheduling center includes not only the updated DNS configuration information, but also the unupdated DNS configuration information. In other words, the latest DNS configuration information includes the current complete DNS configuration information. Based on this, the DNS server can directly use the latest DNS configuration information to replace the existing DNS configuration information stored by itself, and the entire update process is simple.
[0150] In some embodiments, the DNS server of the embodiment of the present application includes a DNS service process, and the DNS service process is used to manage DNS configuration information. At this time, the DNS server controls the DNS service process to update the existing DNS configuration information of the DNS service process based on the latest DNS configuration information.
[0151] In the embodiment of the present application, the DNS server controls the DNS service process based on the latest DNS configuration information, and the specific manner in which the DNS configuration information already exists in the DNS service process includes at least the following manners:
[0152] Mode 1: If the DNS server controls the DNS service process to communicate with the DNS scheduling center, the DNS scheduling center directly sends the latest DNS configuration information to the DNS service process through the communication connection with the DNS service process. At this time, the above S103 includes the following step S103-A:
[0153] S103-A, the DNS server controls the DNS service process to update the existing DNS configuration information of the DNS service process based on the latest DNS configuration information.
[0154] In this mode 1, since the DNS scheduling center is directly connected to the DNS service process, the latest DNS configuration information is directly sent to the DNS service process. Therefore, the DNS service process can directly update the existing DNS configuration information stored in the DNS service process based on the latest DNS configuration information received.
[0155] For example, Figure 8 As shown, the DNS service process includes a configuration management module, in which DNS configuration information is stored. When the DNS service process receives the latest DNS configuration information sent by the DNS scheduling center, it uses the latest DNS configuration information to update the existing DNS configuration information stored in the configuration management module.
[0156] For example, for the i-th domain name in the updated DNS configuration information, if the DNS service process includes the IP address corresponding to the i-th domain name, the IP address corresponding to the i-th domain name in the DNS service process is updated to the new IP address corresponding to the i-th domain name in the updated DNS configuration information, where i is a positive integer. If the DNS service process does not include the IP address corresponding to the i-th domain name, the i-th domain name in the updated DNS configuration information and the IP address corresponding to the i-th domain name are added to the DNS service process.
[0157] In this method 1, the DNS scheduling center communicates directly with the DNS service process, so that when the DNS scheduling center detects that the DNS configuration information is updated, it can directly send the latest DNS configuration information to the DNS service process for updating through the communication connection between the DNS service process and the DNS service process. In this method 1, the update process of the DNS configuration information is completed in the memory, eliminating the need for many time-consuming disk operations such as generating configuration files, packaging configuration files, transmitting configuration files, decompressing configuration files, and copying configuration files, greatly shortening the update speed of the DNS configuration information.
[0158] Mode 2, if the DNS server is connected to the DNS scheduling center through communication, and the DNS scheduling center sends the latest DNS configuration information to the DNS server through the communication connection, then the above S103 includes the following steps S103-B1 and S103-B2:
[0159] S103-B1, the DNS server controls the DNS service process to load the latest DNS configuration information received by the DNS server;
[0160] S103-B2, the DNS server controls the DNS service process to update the existing DNS configuration information of the DNS service process based on the latest DNS configuration information.
[0161] In this mode 2, the DNS server includes a communication module, and the DNS server is directly connected to the DNS scheduling center through the communication module. In this way, the DNS scheduling center can send the latest DNS configuration information to the DNS server. At this time, the latest DNS configuration information is stored in the DNS server, for example, in the memory of the DNS server. Then, the DNS server notifies the DNS service process in the DNS server to load the latest DNS configuration information, and controls the DNS service process to update the existing DNS configuration information in the DNS service process based on the latest DNS configuration information.
[0162] For example, for the i-th domain name in the updated DNS configuration information, if the DNS service process includes the IP address corresponding to the i-th domain name, the IP address corresponding to the i-th domain name in the DNS service process is updated to the new IP address corresponding to the i-th domain name in the updated DNS configuration information, where i is a positive integer. If the DNS service process does not include the IP address corresponding to the i-th domain name, the i-th domain name in the updated DNS configuration information and the IP address corresponding to the i-th domain name are added to the DNS service process.
[0163] In some embodiments, Figure 8 As shown, the DNS service process includes a cache module, which stores records of recently accessed DNS configuration information. In this way, during the domain name query process, when the DNS service process receives a domain name query request from a user, it first queries the cache module for the IP address corresponding to the domain name entered by the user. If the IP address corresponding to the domain name entered by the user is not found in the cache module, the DNS configuration information stored in the configuration management module in the DNS service process is queried for the IP address corresponding to the domain name entered by the user, and the queried IP address is then sent to the user.
[0164] Based on this, in an embodiment of the present application, the DNS server also updates the DNS configuration information cached in the cache module based on the latest DNS configuration information.
[0165] The embodiment of the present application does not limit the specific manner in which the DNS server updates the DNS configuration information cached in the cache module based on the latest DNS configuration information.
[0166] In a possible implementation, after receiving the latest DNS configuration information, the DNS server controls the DNS service process to directly delete all DNS configuration information cached in the cache module.
[0167] In a possible implementation, after receiving the latest DNS configuration information, the DNS server controls the DNS service process to directly delete the updated configuration information in the DNS configuration information cached by the cache module. Specifically, the IP address corresponding to each domain name cached in the cache module is compared with the IP address corresponding to the domain name included in the updated DNS configuration information. If it is determined that the IP address corresponding to the domain name cached in the cache module is different from the IP address corresponding to the domain name in the updated DNS configuration information, the IP address corresponding to the domain name in the cache module is directly deleted. Exemplarily, for the j-th domain name cached in the cache module, it is determined whether the updated DNS configuration information includes a new IP address corresponding to the j-th domain name, where j is a positive integer; if the updated DNS configuration information includes a new IP address for the j-th domain name, the IP address corresponding to the j-th domain name in the cache module is deleted. For example, the cache module includes the domain name "www.x1x2x3.com" whose IP address is A1. The latest DNS configuration information is shown in Table 2 above. The IP address of the domain name "www.x1x2x3.com" is A11. It can be seen that the IP address of the domain name "www.x1x2x3.com" has been updated. Therefore, the domain name "www.x1x2x3.com" in the cache module and the IP address A1 corresponding to the domain name are deleted.
[0168] In a possible implementation, after receiving the latest DNS configuration information, the DNS server controls the DNS service process to update the updated configuration information in the DNS configuration information cached by the cache module. Specifically, the IP address corresponding to each domain name cached in the cache module is compared with the IP address corresponding to the domain name included in the updated DNS configuration information. If it is determined that the IP address corresponding to the domain name cached in the cache module is different from the IP address corresponding to the domain name in the updated DNS configuration information, the IP address corresponding to the domain name in the cache module is updated to the latest IP address. Exemplarily, for the jth domain name cached in the cache module, it is determined whether the updated DNS configuration information includes a new IP address corresponding to the jth domain name, where j is a positive integer; if the updated DNS configuration information includes a new IP address for the jth domain name, the IP address corresponding to the jth domain name in the cache module is updated to the new IP address. For example, the IP address of the domain name "www.x1x2x3.com" included in the cache module is A1, and the latest DNS configuration information is shown in Table 2 above. The IP address of the domain name "www.x1x2x3.com" is A11. It can be seen that the IP address of the domain name "www.x1x2x3.com" has been updated, so the IP address of the domain name "www.x1x2x3.com" in the cache module is updated from A1 to A11.
[0169] The method for updating the DNS configuration information provided in the embodiment of the present application is to establish a communication connection between the DNS server and the DNS scheduling center directly, so that the DNS scheduling center can directly send the latest DNS configuration information to the DNS server through the communication connection. The DNS server updates the existing DNS configuration information in the DNS server based on the latest DNS configuration information. In other words, in the embodiment of the present application, the DNS scheduling center can send the latest DNS configuration information to the DNS server through the communication connection, eliminating many time-consuming disk operations such as generating configuration files, packaging configuration files, transmitting configuration files, decompressing configuration files, and copying configuration files, thereby greatly improving the updating efficiency of the DNS configuration information, and thus ensuring the accuracy and speed of domain name resolution during the DNS configuration information update.
[0170] The above is an overall introduction to the method for updating the domain name system configuration information provided by the embodiment of the present application. The following is a further introduction to the method for updating the domain name system configuration information provided by the embodiment of the present application through a specific embodiment.
[0171] Fig. 9 A flowchart of a method for updating domain name system configuration information provided by an embodiment of the present application is shown in FIG. Fig. 9 As shown, including:
[0172] S201, the routing system sends the routing information of the DNS scheduling center to the DNS server regularly.
[0173] S202: The DNS server establishes a communication connection with the DNS scheduling center based on the routing information.
[0174] like Fig.10 As shown, in the embodiment of the present application, the routing system periodically sends the routing information of the DNS scheduling center to the DNS server. The DNS server establishes a communication connection with the DNS scheduling center based on the routing information.
[0175] The embodiment of the present application does not limit the type of communication connection between the DNS server and the DNS scheduling center.
[0176] In some embodiments, the communication connection between the DNS server and the DNS scheduling center can be a short connection.
[0177] In one example, the DNS server may intermittently send a short connection request to the DNS scheduling center. The DNS scheduling center establishes a short connection with the DNS server based on the short connection request, and sends the new DNS configuration information to the DNS server through the short connection.
[0178] In another example, the DNS scheduling center can send a short connection request to the DNS server. For example, the DNS scheduling center sends a short connection request to the DNS server each time it detects that the DNS configuration information is updated. The DNS server establishes a short connection with the DNS scheduling center based on the short connection request. The DNS scheduling center sends the new DNS configuration information to the DNS server through the short connection.
[0179] In some embodiments, the communication connection between the DNS server and the DNS scheduling center can be a long connection, for example, the DNS server and the DNS scheduling center establish a long connection based on the TCP protocol. That is, in the embodiment of the present application, after the DNS server and the DNS scheduling center establish a long connection once, the DNS scheduling center can send multiple new DNS configuration information to the DNS server through the long connection.
[0180] In one example, when the DNS server is powered on, it sends a persistent connection request to the DNS scheduling center. Based on the persistent connection request, the DNS scheduling center establishes a persistent connection with the DNS server and sends new DNS configuration information to the DNS server through the persistent connection.
[0181] In another example, the DNS scheduling center can send a persistent connection request to the DNS server. For example, when the DNS scheduling center detects that the DNS configuration information is updated for the first time, the DNS scheduling center sends a persistent connection request to the DNS server. The DNS server establishes a persistent connection with the DNS scheduling center based on the persistent connection request. The DNS scheduling center sends the new DNS configuration information to the DNS server through the persistent connection.
[0182] In some embodiments, the communication connection between the DNS server and the DNS scheduling center is a full-duplex connection, that is, after the DNS server is connected to the DNS scheduling center, the DNS server can send data to the DNS scheduling center, and the DNS scheduling center can also send data to the DNS server.
[0183] In an embodiment of the present application, the routing system periodically sends the routing information of the DNS scheduling center to the DNS server, thereby ensuring that the DNS server can obtain the routing information of the DNS scheduling center in a timely and accurate manner, and then establish a reliable communication connection with the DNS scheduling center based on the routing information.
[0184] The specific implementation method of the above S202 is basically consistent with the specific implementation process of the above S101, and reference may be made to the description of the above embodiment.
[0185] S203: The DNS server sends an update request to the DNS scheduling center through a communication connection.
[0186] The update request is used to request the latest DNS configuration information.
[0187] For example, the DNS scheduling center periodically sends an update request to the DNS scheduling center through a communication connection.
[0188] S204: Based on the update request, when the DNS scheduling center detects that the DNS configuration information is updated, the DNS scheduling center sends the latest DNS configuration information to the DNS server through the communication connection.
[0189] In an embodiment of the present application, the DNS scheduling center passively sends DNS configuration information to the DNS server. Specifically, the DNS server sends an update request to the DNS scheduling center through a communication connection. When the DNS scheduling center receives the update request sent by the DNS server, it detects whether the DNS scheduling information stored in the DNS scheduling center has been updated. Specifically, the DNS configuration information currently stored in the DNS scheduling center is compared with the DNS configuration information last sent to the DNS server by the DNS scheduling center. If the DNS configuration information currently stored in the DNS scheduling center is consistent with the DNS configuration information last sent to the DNS server by the DNS scheduling center, it means that the DNS configuration information has not been updated, and the DNS scheduling center does not send the DNS configuration information to the DNS server.
[0190] If the DNS configuration information currently saved by the DNS scheduling center is inconsistent with the DNS configuration information last sent by the DNS scheduling center to the DNS server, it means that the DNS configuration information is updated, and the DNS scheduling center sends the latest DNS configuration information to the DNS server through the communication connection.
[0191] S205: The DNS server updates the existing DNS configuration information in the DNS server based on the latest DNS configuration information.
[0192] In the embodiment of the present application, the latest DNS configuration information includes the latest updated DNS configuration information.
[0193] In some embodiments, the latest DNS configuration information only includes updated DNS configuration information, and does not include unupdated DNS configuration information. This can reduce the amount of data transmission between the DNS scheduling center and the DNS server, thereby increasing the speed at which the DNS scheduling center sends the latest DNS configuration information to the DNS server through the communication connection, and further increasing the update speed of the DNS configuration information.
[0194] In this embodiment, if the latest DNS configuration information only includes updated DNS configuration information and does not include unupdated DNS configuration information, the DNS server can update the existing DNS configuration information included in the DNS server based on the updated DNS configuration information.
[0195] Specifically, for the i-th domain name in the updated DNS configuration information, if the DNS service process includes the IP address corresponding to the i-th domain name, the IP address corresponding to the i-th domain name in the DNS server is updated to the new IP address corresponding to the i-th domain name in the updated DNS configuration information, where i is a positive integer. If the DNS server does not include the IP address corresponding to the i-th domain name, the i-th domain name in the updated DNS configuration information and the IP address corresponding to the i-th domain name are added to the DNS service process.
[0196] In some embodiments, the latest DNS configuration information sent by the DNS scheduling center includes not only the updated DNS configuration information, but also the unupdated DNS configuration information. In other words, the latest DNS configuration information includes the current complete DNS configuration information. Based on this, the DNS server can directly use the latest DNS configuration information to replace the existing DNS configuration information stored by itself, and the entire update process is simple.
[0197] In some embodiments, the DNS server of the embodiment of the present application includes a primary DNS server and a secondary DNS server. When the primary DNS server fails, the secondary DNS server takes over the work of the primary DNS server and performs DNS configuration information management, such as domain name resolution.
[0198] In one example, the primary DNS server is connected to the DNS scheduling center in communication, the primary DNS server is connected to the secondary DNS server in communication, and the secondary DNS server is not connected to the DNS scheduling center in communication. In this way, the DNS scheduling center can directly send the latest DNS configuration information to the primary DNS server through the communication connection with the primary DNS server. Then, the primary DNS server sends the received latest DNS configuration information to the secondary DNS server through the communication connection with the secondary DNS server.
[0199] In one example, the DNS scheduling center is communicated with the DNS primary server and the DNS secondary server respectively, so that the DNS scheduling center can send the latest DNS configuration information to the DNS primary server through the communication connection with the DNS primary server, and send the latest DNS configuration information to the DNS secondary server through the communication connection with the DNS secondary server.
[0200] In some embodiments, in the embodiments of the present application, the DNS server includes a root domain name server, a top-level domain name server, a second-level domain name server, a third-level domain name server, and the like. When querying a domain name (i.e., domain name resolution), the query is performed by recursive query. For example, the client first queries the IP address corresponding to the domain name to be resolved in the local DNS cache. If it is not found, the local DNS server is queried for the IP address corresponding to the domain name to be resolved. If the local DNS server does not include the IP address corresponding to the domain name to be resolved, the local DNS server seeks help from the root domain name server, and the root domain name server returns the IP address of the top-level domain name server that may know the IP address corresponding to the domain name to be resolved. In this way, the local DNS server accesses the top-level domain name server based on the IP address of the top-level domain name server. The top-level domain name server returns the IP address of the second-level domain name server that may know the IP address corresponding to the domain name to be resolved based on the locally stored DNS configuration information. In this way, the local DNS server accesses the second-level domain name server based on the IP address of the second-level domain name server. The second-level domain name server returns the IP address of the third-level domain name server that may know the IP address corresponding to the domain name to be resolved based on the locally stored DNS configuration information. In this way, the local DNS server accesses the third-level domain name server based on the IP address of the third-level domain name server. The third-level domain name server queries the IP address corresponding to the domain name to be resolved based on the DNS configuration information stored locally, and sends the queried IP address corresponding to the domain name to be resolved to the local DNS server. The local DNS server then sends the IP address corresponding to the domain name to be resolved to the client.
[0201] In this embodiment, it can be obtained that the DNS configuration information stored in DNS servers of different levels is different. For example, the top-level domain name server stores the DNS configuration information corresponding to the top-level domain names such as "cn, com, net, edu", for example, the top-level domain name server stores the IP address of the device corresponding to the top-level domain name cn. The second-level domain name server stores the DNS configuration information corresponding to the second-level domain names such as "edu.cn, com.cn". Therefore, in an embodiment of the present application, the DNS scheduling center can send the latest DNS configuration information corresponding to domain names of different levels to the corresponding DNS servers. For example, if the IP address corresponding to the top-level domain name cn is updated, the updated IP address corresponding to the top-level domain name cn is sent to the top-level domain name server as the new DNS configuration information.
[0202] Based on this, in a possible implementation of the embodiment of the present application, the DNS scheduling center communicates with DNS servers of different levels respectively. In this way, when the DNS scheduling center detects that the DNS configuration information is updated, the updated DNS configuration information is sent to the corresponding DNS server, and the latest DNS configuration information is not sent to the server that is not related to the updated DNS configuration information, so as to save communication resources.
[0203] In another possible implementation of the embodiment of the present application, when the DNS configuration information is detected to be updated, the DNS scheduling center determines the DNS servers related to the currently updated DNS configuration information, and then establishes communication connections with these related DNS servers. Then, based on the communication connection, the updated DNS configuration information is sent to the related DNS servers.
[0204] The method for updating the DNS configuration information provided in the embodiment of the present application is to establish a communication connection between the DNS server and the DNS scheduling center directly, so that the DNS scheduling center can directly send the latest DNS configuration information to the DNS server through the communication connection. The DNS server updates the existing DNS configuration information in the DNS server based on the latest DNS configuration information. In other words, the DNS scheduling center in the embodiment of the present application can send the latest DNS configuration information to the DNS server through the communication connection, so that the updating process of the DNS configuration information is implemented in the memory, eliminating the need for the DNS scheduling center to perform disk operations such as generating configuration files, packaging configuration files, and transmitting configuration files, and eliminating the need for the DNS server to perform disk operations such as decompressing configuration files and copying configuration files, thereby greatly improving the updating efficiency of the DNS configuration information, and thereby ensuring the accuracy and speed of domain name resolution during the update of the DNS configuration information.
[0205] Fig.11 The flowchart of the method for updating the DNS configuration information provided by an embodiment of the present application is as follows. In this embodiment, the method for updating the DNS configuration information of the embodiment of the present application is introduced by taking the communication connection based on the WebScoket protocol as an example. Fig.11 As shown, the method of the embodiment of the present application includes the following steps:
[0206] S301, the routing system sends the routing information of the DNS scheduling center to the DNS server at a regular interval.
[0207] S302, the DNS server controls the DNS service process based on the routing information and establishes a communication connection based on the WebScoket protocol with the DNS scheduling center.
[0208] like Fig.10As shown, in the embodiment of the present application, the routing system sends the routing information of the DNS scheduling center to the DNS server at a regular interval. The DNS server controls the DNS service process to establish a communication connection based on the WebScoket protocol with the DNS scheduling center based on the routing information.
[0209] In some embodiments, the communication connection between the DNS service process and the DNS scheduling center based on the WebScoket protocol can be a long connection, for example, the DNS service process and the DNS scheduling center establish a long connection based on the TCP protocol. That is, in the embodiment of the present application, after the DNS service process and the DNS scheduling center establish a long connection once, the DNS scheduling center can send multiple new DNS configuration information to the DNS service process through the long connection.
[0210] In one example, when the DNS server is powered on, it sends a persistent connection request to the DNS scheduling center. Based on the persistent connection request, the DNS scheduling center establishes a persistent connection with the DNS service process and sends new DNS configuration information to the DNS service process through the persistent connection.
[0211] In another example, the DNS scheduling center can send a persistent connection request to the DNS service process. For example, when the DNS scheduling center detects that the DNS configuration information is updated for the first time, the DNS scheduling center sends a persistent connection request to the DNS service process. The DNS service process establishes a persistent connection with the DNS scheduling center based on the persistent connection request. The DNS scheduling center sends the new DNS configuration information to the DNS service process through the persistent connection.
[0212] In some embodiments, the communication connection between the DNS service process and the DNS scheduling center based on the WebScoket protocol is a full-duplex connection, that is, after the DNS service process and the DNS scheduling center, the DNS service process can send data to the DNS scheduling center, and the DNS scheduling center can also send data to the DNS service process.
[0213] In an embodiment of the present application, the routing system periodically sends the routing information of the DNS scheduling center to the DNS service process, thereby ensuring that the DNS service process can obtain the routing information of the DNS scheduling center in a timely and accurate manner, and then based on the routing information, establish a reliable communication connection based on the WebScoket protocol with the DNS scheduling center.
[0214] The specific implementation method of the above S302 is basically consistent with the specific implementation process of the above S101, and reference may be made to the description of the above embodiment.
[0215] S303, the DNS server controls the DNS service process to send an update request to the DNS scheduling center through a communication connection based on the WebScoket protocol.
[0216] The update request is used to request the latest DNS configuration information.
[0217] For example, the DNS scheduling center periodically sends an update request to the DNS scheduling center through a communication connection based on the WebScoket protocol.
[0218] S304. Based on the update request, when the DNS scheduling center detects that the DNS configuration information is updated, it sends the latest DNS configuration information to the DNS service process through a communication connection based on the WebScoket protocol.
[0219] In an embodiment of the present application, the DNS scheduling center passively sends DNS configuration information to the DNS service process. Specifically, the DNS service process sends an update request to the DNS scheduling center through a communication connection based on the WebScoket protocol. When the DNS scheduling center receives the update request sent by the DNS service process, it detects whether the DNS scheduling information saved by the DNS scheduling center has been updated. Specifically, the DNS configuration information currently saved by the DNS scheduling center is compared with the DNS configuration information last sent by the DNS scheduling center to the DNS service process. If the DNS configuration information currently saved by the DNS scheduling center is consistent with the DNS configuration information last sent by the DNS scheduling center to the DNS service process, it means that the DNS configuration information has not been updated, and the DNS scheduling center does not send the DNS configuration information to the DNS service process.
[0220] If the DNS configuration information currently saved by the DNS scheduling center is inconsistent with the DNS configuration information last sent to the DNS service process by the DNS scheduling center, it means that the DNS configuration information has been updated. The DNS scheduling center then sends the latest DNS configuration information to the DNS service process via a communication connection based on the WebScoket protocol.
[0221] S305: The DNS server controls the DNS service process to update the existing DNS configuration information in the DNS service process based on the latest DNS configuration information.
[0222] In the embodiment of the present application, the latest DNS configuration information includes the latest updated DNS configuration information.
[0223] In some embodiments, the latest DNS configuration information only includes updated DNS configuration information, and does not include unupdated DNS configuration information. This can reduce the amount of data transmission between the DNS scheduling center and the DNS service process, thereby increasing the speed at which the DNS scheduling center sends the latest DNS configuration information to the DNS service process through a communication connection based on the WebScoket protocol, further increasing the update speed of the DNS configuration information.
[0224] In this embodiment, if the latest DNS configuration information only includes updated DNS configuration information and does not include unupdated DNS configuration information, the DNS service process can update the existing DNS configuration information included in the DNS service process based on the updated DNS configuration information.
[0225] Specifically, for the i-th domain name in the updated DNS configuration information, if the DNS service process includes the IP address corresponding to the i-th domain name, the IP address corresponding to the i-th domain name in the DNS service process is updated to the new IP address corresponding to the i-th domain name in the updated DNS configuration information, where i is a positive integer. If the DNS service process does not include the IP address corresponding to the i-th domain name, the i-th domain name in the updated DNS configuration information and the IP address corresponding to the i-th domain name are added to the DNS service process.
[0226] In some embodiments, the latest DNS configuration information sent by the DNS scheduling center includes not only the updated DNS configuration information, but also the unupdated DNS configuration information. In other words, the latest DNS configuration information includes the current complete DNS configuration information. Based on this, the DNS service process can directly use the latest DNS configuration information to replace the existing DNS configuration information stored by itself, and the entire update process is simple.
[0227] The specific implementation process of the above S305 can refer to the specific implementation process of the above S103, which will not be repeated here.
[0228] S306: The DNS server controls the DNS service process to update the DNS configuration information cached in the cache module based on the latest DNS configuration information.
[0229] In some embodiments, the DNS service process includes a cache module. When the DNS service process receives the latest DNS configuration information sent by the DNS scheduling center, it updates the DNS configuration information saved by the configuration management module in the DNS service process based on the latest DNS configuration information, and also updates the DNS configuration information cached in the cache module.
[0230] For example, the DNS server determines whether the updated DNS configuration information includes a new IP address corresponding to the j-th domain name cached in the cache module, where j is a positive integer. If the updated DNS configuration information includes a new IP address for the j-th domain name, the DNS server deletes the IP address corresponding to the j-th domain name in the cache module, or updates the IP address corresponding to the j-th domain name in the cache module to the new IP address.
[0231] The method for updating the DNS configuration information provided in the embodiment of the present application is to establish a communication connection based on the WebScoket protocol between the DNS service process and the DNS scheduling center directly, so that the DNS scheduling center can directly send the latest DNS configuration information to the DNS service process through the communication connection based on the WebScoket protocol. The DNS service process updates the existing DNS configuration information in the DNS service process based on the latest DNS configuration information. That is to say, in the embodiment of the present application, the DNS scheduling center can send the latest DNS configuration information to the DNS service process through the communication connection based on the WebScoket protocol, so that the updating process of the DNS configuration information is implemented in the memory, eliminating the need for the DNS scheduling center to perform disk operations such as generating configuration files, packaging configuration files, and transmitting configuration files, and eliminating the need for the DNS service process to perform disk operations such as decompressing configuration files and copying configuration files, thereby greatly improving the updating efficiency of the DNS configuration information, and thereby ensuring the accuracy and speed of domain name resolution during the update of the DNS configuration information.
[0232] Combination of the above Figures 5 to 11 , describes in detail the embodiment of the method for updating the domain name system configuration information of the present application, and the following is combined with Fig.10 , describe in detail the device embodiments of the present application.
[0233] Fig.12 1 is a schematic block diagram of a device for updating domain name system configuration information provided by an embodiment of the present application. The device 10 can be applied to a domain name system DNS server.
[0234] like Fig.12 As shown, the domain name system configuration information device 10 includes:
[0235] The communication module 11 is used to establish a communication connection with the DNS scheduling center;
[0236] The transceiver module 12 is used to receive, through the communication connection, the latest DNS configuration information sent by the DNS scheduling center when detecting that the DNS configuration information is updated, wherein the latest DNS configuration information includes the updated DNS configuration information, and the DNS configuration information includes a mapping relationship between a domain name and an IP address;
[0237] The updating module 13 is used to update the existing DNS configuration information in the DNS server based on the latest DNS configuration information.
[0238] In some embodiments, the transceiver module 12 is specifically used to send an update request to the DNS scheduling center through the communication connection, and the update request is used to request the latest DNS configuration information; receive the latest DNS configuration information sent by the DNS scheduling center through the communication connection, and the latest DNS configuration information is sent by the DNS scheduling center based on the update request when it detects that the DNS configuration information is updated.
[0239] In some embodiments, the transceiver module 12 is specifically configured to periodically send the update request to the DNS scheduling center via the communication connection.
[0240] In some embodiments, if the communication connection is a full-duplex communication connection, the transceiver module 12 is specifically used to receive, through the communication connection, the latest DNS configuration information that the DNS scheduling center actively sends to the DNS server when it detects that the DNS configuration information is updated.
[0241] In some embodiments, the DNS server includes a DNS service process, and a communication module 11 is specifically used to start the DNS service process and control the DNS service process to establish the communication connection with the DNS scheduling center;
[0242] The transceiver module 12 is specifically used to control the DNS service process to receive the latest DNS configuration information sent by the DNS scheduling center through the communication connection when the DNS configuration information is detected to be updated;
[0243] The updating module 13 is specifically used to control the DNS service process to update the existing DNS configuration information of the DNS service process based on the latest DNS configuration information.
[0244] In some embodiments, the DNS server includes a DNS service process, and an update module 13 is specifically used to control the DNS service process to load the latest DNS configuration information received by the DNS server; and control the DNS service process to update the existing DNS configuration information of the DNS service process based on the latest DNS configuration information.
[0245] In some embodiments, the update module 13 is specifically used to update the IP address corresponding to the i-th domain name in the updated DNS configuration information to a new IP address corresponding to the i-th domain name in the updated DNS configuration information if the DNS service process includes the IP address corresponding to the i-th domain name, where i is a positive integer; if the DNS service process does not include the IP address corresponding to the i-th domain name, then add the i-th domain name in the updated DNS configuration information and the IP address corresponding to the i-th domain name to the DNS service process.
[0246] In some embodiments, the DNS service process includes a cache module, and the update module 13 is also used to update the DNS configuration information cached in the cache module based on the latest DNS configuration information.
[0247] In some embodiments, the update module 13 is specifically used to determine whether the updated DNS configuration information includes a new IP address corresponding to the j-th domain name cached in the cache module, where j is a positive integer; if the updated DNS configuration information includes the new IP address of the j-th domain name, the IP address corresponding to the j-th domain name in the cache module is deleted, or the IP address corresponding to the j-th domain name in the cache module is updated to the new IP address.
[0248] In some embodiments, the communication module 11 is specifically used to receive the routing information of the DNS scheduling center sent periodically by the routing system; and establish the communication connection with the DNS scheduling center based on the routing information.
[0249] In some embodiments, the communication connection is a communication connection based on the WebScoket protocol.
[0250] It should be understood that the device embodiment and the method embodiment may correspond to each other, and similar descriptions may refer to the method embodiment. To avoid repetition, they will not be described here. Specifically, Fig.12 The device shown can execute the above-mentioned embodiment of updating the domain name system configuration information on the DNS server side, and the aforementioned and other operations and / or functions of each module in the device are respectively for implementing the method embodiments corresponding to the DNS server, which will not be repeated here for the sake of brevity.
[0251] Fig.13 This is a schematic block diagram of a device for updating domain name system configuration information provided by an embodiment of the present application. The device 11 is applied to a DNS scheduling center.
[0252] like Fig.13As shown, the device 20 for updating the domain name system configuration information includes:
[0253] Communication module 21, used to establish a communication connection with a DNS server;
[0254] The transceiver module 22 is used to send the latest DNS configuration information to the DNS server through the communication connection when a DNS configuration information update is detected, so that the DNS server updates the DNS configuration information in the DNS server based on the latest DNS configuration information, wherein the latest DNS configuration information includes the updated DNS configuration information, and the DNS configuration information includes a mapping relationship between a domain name and an IP address.
[0255] In some embodiments, the transceiver module 22 is specifically used to receive an update request sent by the DNS server through the communication connection, and the update request is used to request the latest DNS configuration information; based on the update request, when it is detected that the DNS configuration information is updated, the latest DNS configuration information is sent to the DNS server.
[0256] In some embodiments, the transceiver module 22 is specifically configured to periodically receive the update request sent by the DNS server through the communication connection.
[0257] In some embodiments, if the communication connection is a full-duplex communication connection, the transceiver module 22 is specifically configured to actively send the latest DNS configuration information to the DNS server through the communication connection when it is detected that the DNS configuration information is updated.
[0258] In some embodiments, the DNS server includes a DNS service process, and a communication module 21 is specifically used to establish the communication connection with the DNS service process;
[0259] The transceiver unit 22 is specifically configured to send the latest DNS configuration information to the DNS service process via the communication connection.
[0260] It should be understood that the device embodiment and the method embodiment may correspond to each other, and similar descriptions may refer to the method embodiment. To avoid repetition, they will not be described here. Specifically, Fig.13 The device shown can execute the above-mentioned domain name system configuration information updating method embodiment, and the aforementioned and other operations and / or functions of each module in the device are respectively for implementing the method embodiments corresponding to the DNS scheduling center, which will not be repeated here for the sake of brevity.
[0261] The above describes the device of the embodiment of the present application from the perspective of the functional module in conjunction with the accompanying drawings. It should be understood that the functional module can be implemented in hardware form, can be implemented by instructions in software form, and can also be implemented by a combination of hardware and software modules. Specifically, the steps of the method embodiment in the embodiment of the present application can be completed by the hardware integrated logic circuit and / or software form instructions in the processor, and the steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware decoding processor to perform, or a combination of hardware and software modules in the decoding processor to perform. Optionally, the software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, an electrically erasable programmable memory, a register, etc. The storage medium is located in a memory, and the processor reads the information in the memory, and completes the steps in the above method embodiment in conjunction with its hardware.
[0262] Fig.14 is a schematic block diagram of an electronic device provided in an embodiment of the present application, Fig.14 The electronic device may be the above-mentioned DNS server or DNS dispatch center.
[0263] like Fig.14 As shown, the electronic device 30 may include:
[0264] The memory 31 and the processor 32, the memory 31 is used to store the computer program 33 and transmit the program code 33 to the processor 32. In other words, the processor 32 can call and run the computer program 33 from the memory 31 to implement the method in the embodiment of the present application.
[0265] For example, the processor 32 may be configured to execute the steps in the above method according to the instructions in the computer program 33 .
[0266] In some embodiments of the present application, the processor 32 may include but is not limited to:
[0267] General-purpose processor, digital signal processor (DSP), application-specific integrated circuit (ASIC), field programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, etc.
[0268] In some embodiments of the present application, the memory 31 includes but is not limited to:
[0269] Volatile memory and / or non-volatile memory. Among them, the non-volatile memory can be read-only memory (ROM), programmable ROM (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM) or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM), and direct RAM bus random access memory (DR RAM).
[0270] In some embodiments of the present application, the computer program 33 may be divided into one or more modules, which are stored in the memory 31 and executed by the processor 32 to complete the method for recording pages provided by the present application. The one or more modules may be a series of computer program instruction segments capable of completing specific functions, and the instruction segments are used to describe the execution process of the computer program 33 in the electronic device.
[0271] like Fig.14 As shown, the electronic device 30 may further include:
[0272] The transceiver 34 may be connected to the processor 32 or the memory 31 .
[0273] The processor 32 may control the transceiver 34 to communicate with other devices, specifically, to send information or data to other devices, or to receive information or data sent by other devices. The transceiver 34 may include a transmitter and a receiver. The transceiver 34 may further include an antenna, and the number of antennas may be one or more.
[0274] It should be understood that the various components in the electronic device 30 are connected via a bus system, wherein the bus system includes not only a data bus but also a power bus, a control bus and a status signal bus.
[0275] According to one aspect of the present application, a computer storage medium is provided, on which a computer program is stored, and when the computer program is executed by a computer, the computer can perform the method of the above method embodiment. In other words, the present application embodiment also provides a computer program product containing instructions, and when the instructions are executed by a computer, the computer can perform the method of the above method embodiment.
[0276] According to another aspect of the present application, a computer program product or computer program is provided, the computer program product or computer program includes computer instructions, the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the method of the above method embodiment.
[0277] In other words, when implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website site, a computer, a server, or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (digital subscriber line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server, or data center. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or a data center that includes one or more available media integrated. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a digital video disc (digital video disc, DVD)), or a semiconductor medium (e.g., a solid state drive (solid state disk, SSD)), etc.
[0278] Those of ordinary skill in the art will appreciate that the modules and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0279] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the module is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.
[0280] The modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. For example, each functional module in each embodiment of the present application may be integrated into a processing module, or each module may exist physically separately, or two or more modules may be integrated into one module.
[0281] The above contents are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A method for updating domain name system configuration information, characterized in that: Applied to a domain name system DNS server, the method comprises: Establish a communication connection with the DNS dispatch center; Receiving, through the communication connection, the latest DNS configuration information sent by the DNS scheduling center when detecting that the DNS configuration information is updated, wherein the latest DNS configuration information includes the updated DNS configuration information, and the DNS configuration information includes a mapping relationship between a domain name and an IP address; Based on the latest DNS configuration information, the existing DNS configuration information in the DNS server is updated.
2. The method according to claim 1, characterized in that The receiving, through the communication connection, the latest DNS configuration information sent by the DNS scheduling center when detecting that the DNS configuration information is updated, includes: Sending an update request to the DNS scheduling center via the communication connection, wherein the update request is used to request the latest DNS configuration information; The latest DNS configuration information sent by the DNS scheduling center is received through the communication connection. The latest DNS configuration information is sent by the DNS scheduling center based on the update request when it is detected that the DNS configuration information is updated.
3. The method according to claim 2, characterized in that The sending of the update request to the DNS scheduling center through the communication connection includes: The update request is periodically sent to the DNS scheduling center through the communication connection.
4. The method according to claim 1, characterized in that: If the communication connection is a full-duplex communication connection, the receiving, through the communication connection, the latest DNS configuration information sent by the DNS scheduling center when detecting that the DNS configuration information is updated, includes: The latest DNS configuration information is received through the communication connection. The DNS scheduling center actively sends the latest DNS configuration information to the DNS server when detecting that the DNS configuration information is updated.
5. The method according to claim 1, characterized in that The DNS server includes a DNS service process, The establishing of the communication connection with the DNS scheduling center includes: starting a DNS service process, and controlling the DNS service process to establish the communication connection with the DNS scheduling center; The receiving, through the communication connection, the latest DNS configuration information sent by the DNS scheduling center when detecting that the DNS configuration information is updated, comprises: controlling the DNS service process to receive, through the communication connection, the latest DNS configuration information sent by the DNS scheduling center when detecting that the DNS configuration information is updated; The updating of the DNS configuration information in the DNS server based on the latest DNS configuration information includes: controlling the DNS service process to update the existing DNS configuration information of the DNS service process based on the latest DNS configuration information.
6. The method according to claim 1, characterized in that The DNS server includes a DNS service process, and the updating of the DNS configuration information in the DNS server based on the latest DNS configuration information includes: Controlling the DNS service process to load the latest DNS configuration information received by the DNS server; The DNS service process is controlled to update the existing DNS configuration information of the DNS service process based on the latest DNS configuration information.
7. The method according to claim 5 or 6, characterized in that: The controlling the DNS service process to update the existing DNS configuration information of the DNS service process based on the latest DNS configuration information includes: For the i-th domain name in the updated DNS configuration information, if the DNS service process includes the IP address corresponding to the i-th domain name, then the IP address corresponding to the i-th domain name in the DNS service process is updated to the new IP address corresponding to the i-th domain name in the updated DNS configuration information, where i is a positive integer; If the DNS service process does not include the IP address corresponding to the ith domain name, the ith domain name and the IP address corresponding to the ith domain name in the updated DNS configuration information are added to the DNS service process.
8. The method according to claim 5 or 6, characterized in that: The DNS service process includes a cache module, and the method further includes: Based on the latest DNS configuration information, the DNS configuration information cached in the cache module is updated.
9. The method according to claim 8, characterized in that The updating of the DNS configuration information cached in the cache module based on the latest DNS configuration information includes: For the j-th domain name cached in the cache module, determining whether the updated DNS configuration information includes a new IP address corresponding to the j-th domain name, where j is a positive integer; If the updated DNS configuration information includes the new IP address of the j-th domain name, the IP address corresponding to the j-th domain name in the cache module is deleted, or the IP address corresponding to the j-th domain name in the cache module is updated to the new IP address.
10. The method according to any one of claims 1 to 4, characterized in that: The establishing of the communication connection with the DNS scheduling center includes: Receiving routing information of the DNS scheduling center sent regularly by the routing system; Based on the routing information, the communication connection is established with the DNS scheduling center.
11. The method according to any one of claims 1 to 4, characterized in that: The communication connection is a communication connection based on the WebScoket protocol.
12. A method for updating domain name system configuration information, characterized in that: Applied to a domain name system DNS scheduling center, the method includes: Establish a communication connection with the DNS server; When a DNS configuration information update is detected, the latest DNS configuration information is sent to the DNS server through the communication connection, so that the DNS server updates the DNS configuration information in the DNS server based on the latest DNS configuration information, the latest DNS configuration information includes the updated DNS configuration information, and the DNS configuration information includes a mapping relationship between the domain name and the IP address.
13. The method according to claim 12, characterized in that The sending the latest DNS configuration information to the DNS service process through the communication connection includes: Receiving, via the communication connection, an update request sent by the DNS server, wherein the update request is used to request the latest DNS configuration information; Based on the update request, when it is detected that the DNS configuration information is updated, the latest DNS configuration information is sent to the DNS server through the communication connection.
14. The method according to claim 13, characterized in that The receiving, through the communication connection, an update request sent by the DNS server, comprises: The update request sent by the DNS server is periodically received through the communication connection.
15. The method according to claim 12, characterized in that If the communication connection is a full-duplex communication connection, sending the latest DNS configuration information to the DNS server through the communication connection includes: When it is detected that the DNS configuration information is updated, the latest DNS configuration information is actively sent to the DNS server through the communication connection.
16. The method according to claim 12, characterized in that The DNS server includes a DNS service process, The establishing of a communication connection with the DNS server comprises: establishing the communication connection with the DNS service process; The sending the latest DNS configuration information to the DNS server through the communication connection includes: sending the latest DNS configuration information to the DNS service process through the communication connection.
17. A device for updating domain name system configuration information, characterized in that: Applied to a domain name system DNS server, the device comprises: A communication module, used to establish a communication connection with a DNS scheduling center; A transceiver module, configured to receive, through the communication connection, the latest DNS configuration information sent by the DNS scheduling center when detecting that the DNS configuration information is updated, wherein the latest DNS configuration information includes the updated DNS configuration information, and the DNS configuration information includes a mapping relationship between a domain name and an IP address; The updating module is used to update the existing DNS configuration information in the DNS server based on the latest DNS configuration information.
18. A device for updating domain name system configuration information, characterized in that: Applied to a domain name system DNS scheduling center, the device comprises: A communication module, used to establish a communication connection with a DNS server; The transceiver module is used to send the latest DNS configuration information to the DNS server through the communication connection when detecting that the DNS configuration information is updated, so that the DNS server updates the DNS configuration information in the DNS server based on the latest DNS configuration information, wherein the latest DNS configuration information includes the updated DNS configuration information, and the DNS configuration information includes the mapping relationship between the domain name and the IP address.
19. An electronic device comprising a processor and a memory; The memory is used to store computer programs; The processor is configured to execute the computer program to implement the method according to any one of claims 1 to 11 or 12 to 16.
20. A computer-readable storage medium, characterized in that: For storing computer programs; The computer program enables a computer to execute the method according to any one of claims 1 to 11 or 12 to 16 above.