A method, apparatus, medium, and device for batch distribution of DNS resolution configuration information.

By determining the target configuration version in the DNS server and automatically distributing the latest information, the problem of low efficiency in distributing DNS resolution configuration information is solved, thus improving configuration efficiency and consistency.

CN116319331BActive Publication Date: 2025-11-14BEIJING TIANCHI NETWORK CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202310267379.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-14
Publication Date
2025-11-14
Estimated Expiration
2043-03-14

AI Technical Summary

Technical Problem

In the realm of private DNS servers, the distribution of DNS resolution configuration information is inefficient, resulting in high manpower and time costs, especially when configuring multiple DNS servers.

Method used

By obtaining the DNS resolution configuration information to be distributed and the target service identifier, the target configuration version is determined and added to the database. The configuration version reported by the client is compared and authenticated, and the latest version of the configuration information is automatically distributed to the DNS server.

Benefits of technology

It improves the efficiency of distributing DNS resolution configuration information, reduces manpower costs, and ensures the consistency and up-to-dateness of DNS server configuration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116319331B_ABST
    Figure CN116319331B_ABST
Patent Text Reader

Abstract

This application relates to a method, apparatus, medium, and device for batch distribution of DNS resolution configuration information. The method includes: obtaining DNS resolution configuration information to be distributed and a corresponding target service identifier; determining a target configuration version corresponding to the DNS resolution configuration information to be distributed based on the target service identifier, and adding the DNS resolution configuration information to be distributed and the target configuration version to a database; receiving reported configuration versions corresponding to the target service identifier sent by each client; if the reported configuration version is lower than the target configuration version in the database, then distributing the DNS resolution configuration information to be distributed corresponding to the target configuration version to the corresponding client, wherein the client is a client corresponding to a DNS server, and the client is used to configure the corresponding DNS server based on the DNS resolution configuration information to be distributed. This application has the effect of improving the efficiency of DNS resolution configuration information distribution.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technology, specifically to a method, apparatus, medium, and device for batch distribution of DNS resolution configuration information. Background Technology

[0002] A Domain Name Server (DNS) is a server that translates domain names into their corresponding IP addresses. Currently, in the realm of private DNS servers, the resolution of A records—that is, DNS resolution configuration information—where an A record points a domain name to an IP address, is all manually configured and modified. However, when configuring a large number of DNS servers, this consumes significant manpower and time, resulting in low efficiency in distributing DNS resolution configuration information to private DNS servers. Summary of the Invention

[0003] To improve the efficiency of distributing DNS resolution configuration information, this application provides a method, apparatus, medium, and device for batch distribution of DNS resolution configuration information.

[0004] The first aspect of this application provides a method for batch distribution of DNS resolution configuration information, specifically including:

[0005] Obtain the DNS resolution configuration information to be distributed and the corresponding target service identifier;

[0006] Based on the target service identifier, determine the target configuration version corresponding to the DNS resolution configuration information to be issued, and add the DNS resolution configuration information to be issued and the target configuration version to the database;

[0007] The system receives the reported configuration version corresponding to the target service identifier sent by each client. If the reported configuration version is lower than the target configuration version in the database, the system sends the DNS resolution configuration information to be sent corresponding to the target configuration version to the corresponding client. The client is the client corresponding to the DNS server, and the client is used to configure the corresponding DNS server based on the DNS resolution configuration information to be sent.

[0008] By adopting the above technical solution, after obtaining the DNS resolution configuration information to be issued by the user to various DNS servers and the corresponding target service identifier, the target configuration version of this DNS resolution configuration information to be issued is re-determined based on the target service identifier before being officially issued to each DNS server. This involves iteratively updating the configuration version of this DNS resolution configuration information. After determining the target configuration version of this DNS resolution configuration information to be issued, the information and its corresponding target configuration version are added to the database for easy retrieval of the latest configuration version from the database and issuance to the DNS servers. Next, the server receives the reported configuration version from the clients corresponding to each DNS server. If the reported configuration version is lower than the target configuration version, it indicates that the DNS resolution configuration information in this DNS server is not the latest version. Therefore, the server automatically issues the DNS resolution configuration information to be issued corresponding to the target configuration version to the clients corresponding to this DNS server, enabling the clients to automatically configure the DNS server, thereby improving the efficiency of DNS resolution configuration information issuance.

[0009] Optionally, obtaining the DNS resolution configuration information to be distributed and the corresponding target service identifier specifically includes:

[0010] Receive input operation commands;

[0011] If the operation instruction is a configuration retrieval instruction, then obtain the target service identifier to be retrieved, and retrieve the latest configuration version of the DNS resolution configuration information corresponding to the target service identifier from the database according to the target service identifier;

[0012] If the input configuration modification instruction is received, the DNS resolution configuration information of the latest configuration version is modified to obtain the DNS resolution configuration information to be issued; or, if the input configuration modification instruction is not received, the DNS resolution configuration information of the latest configuration version is determined as the DNS resolution configuration information to be issued.

[0013] If the operation instruction is a new service instruction, a corresponding target service identifier is generated, and the DNS resolution configuration information submitted by the user terminal is obtained, and the DNS resolution configuration information submitted by the user terminal is determined as the DNS resolution configuration information to be issued.

[0014] By adopting the above technical solution, if the DNS resolution configuration information in the DNS server needs to be modified, upon receiving the configuration retrieval instruction from the user terminal, the system retrieves the latest version of the DNS resolution configuration information from the database according to the target service identifier corresponding to the DNS resolution configuration information to be modified, and modifies the latest version of the DNS resolution configuration information according to the configuration modification instruction to obtain the DNS resolution configuration information to be issued. If the received instruction is not a configuration modification instruction but a new service instruction, it means that the DNS resolution configuration information to be issued is for a completely new service identifier. Then, the system generates the target service identifier corresponding to this new service and determines the DNS resolution configuration information transferred by the user terminal as the DNS resolution configuration information to be issued, thereby facilitating the subsequent assignment of a completely new configuration version to the corresponding configuration operations.

[0015] Optionally, the database includes a configuration version and corresponding DNS resolution configuration information. The configuration version includes a service identifier and a configuration version number. The step of determining the target configuration version corresponding to the DNS resolution configuration information to be distributed based on the target service identifier, and adding the DNS resolution configuration information to be distributed and the target configuration version to the database, specifically includes:

[0016] Obtain the initial configuration version number corresponding to the DNS resolution configuration information to be issued;

[0017] Increment the initial configuration version number by 1 to obtain the latest configuration version number corresponding to the DNS resolution configuration information to be issued;

[0018] The target service identifier corresponding to the DNS resolution configuration information to be issued is combined with the latest configuration version number to obtain the target configuration version corresponding to the DNS resolution configuration information to be issued, and the DNS resolution configuration information to be issued and the target configuration version are added to the database.

[0019] By adopting the above technical solution, after the DNS resolution configuration information to be distributed and the corresponding target service identifier are determined, the initial configuration version number corresponding to this DNS resolution configuration information to be distributed is further obtained. Then, the initial configuration version number is incremented by 1, and the configuration version number is iterated to obtain the latest configuration version number corresponding to this DNS resolution configuration information to be distributed. Finally, the target service identifier of this DNS resolution configuration information to be distributed is combined with the latest configuration version number to obtain the target configuration version corresponding to this DNS resolution configuration information to be distributed, thereby realizing the update of the configuration version of the configuration information corresponding to the target service identifier. At the same time, this DNS resolution configuration information to be distributed and the corresponding target configuration version are added to the database, thereby enabling effective management of configuration versions and facilitating the rapid and unified distribution of the latest configuration version of DNS resolution configuration information in the future.

[0020] Optionally, the step of receiving the reported configuration version corresponding to the target service identifier sent by each client, if the reported configuration version is lower than the target configuration version in the database, then sending the DNS resolution configuration information to be sent corresponding to the target configuration version to the corresponding client, specifically including:

[0021] Receive the reported configuration version corresponding to the target service identifier sent by each client, and receive the user identifier, key and last distribution completion status sent by each client;

[0022] The client is authenticated based on the user identifier and the key.

[0023] If the identity authentication is successful, the previous distribution completion status is verified. After the verification is successful, the reported configuration version is compared with the target configuration version in the database.

[0024] If the reported configuration version is less than the target configuration version in the database, then the DNS resolution configuration information corresponding to the target configuration version is sent to the corresponding client.

[0025] By adopting the above technical solution, after the target configuration version of the DNS resolution configuration information to be distributed is determined, the system receives the reported configuration version of the target service identifier sent by each client, as well as the client's own user identifier, key, and last distribution completion status. First, the client's identity is authenticated by comparing the user identifier and key with preset fields. If the comparisons match, the client is authenticated. Next, the client's last distribution completion status is verified to check whether the last distribution configuration was completed. If the verification passes, it means that the client's last distribution configuration was completed. Then, the reported configuration version is compared with the target configuration version. If the client's reported configuration version is lower than the target configuration version, it means that the client's current DNS resolution configuration information needs to be updated. Then, the DNS resolution configuration information to be distributed corresponding to the target configuration version is sent to the corresponding client, and the client configures the DNS server, thereby enabling the latest DNS resolution configuration information to be quickly distributed to the corresponding DNS server.

[0026] Optionally, the completion status of the previous distribution is verified, specifically including:

[0027] If the previous distribution completion status is incomplete, then obtain the configuration version of the previous distribution;

[0028] The DNS resolution configuration information corresponding to the previously issued configuration version is sent to the client until the status of the previous issuance is completed, then the verification is confirmed to be successful.

[0029] If the previous delivery completion status is "completed", then the verification is considered successful.

[0030] By employing the above technical solution, during the verification of the previous completion status, if the client sends a "not completed" status, it indicates that the DNS resolution configuration information previously received by the client was not fully configured on the DNS server. Therefore, the configuration version previously sent to the client is retrieved from the database, and the corresponding DNS resolution configuration information is resent to the client. The client then reconfigures the corresponding DNS server until the configuration is complete, and then the configuration versions are compared. If the previous completion status is "completed," it means that the previously sent DNS resolution configuration information has been fully configured on the DNS server, and the configuration versions are directly compared. This helps ensure the integrity of each DNS resolution configuration information being configured on the DNS server.

[0031] Optionally, the step of receiving the reported configuration version corresponding to the target service identifier sent by each client, if the reported configuration version is lower than the target configuration version in the database, then sending the DNS resolution configuration information to be sent corresponding to the target configuration version to the corresponding client, specifically including:

[0032] The system receives the reported configuration version corresponding to the target service identifier sent by each client. If the number of reported configuration versions exceeds the number threshold, the system obtains the last delivery completion status of each client. Based on the last delivery completion status, the system divides each client into a first queue and a second queue. The first queue includes clients whose last delivery completion status is "completed" and the second queue includes clients whose last delivery completion status is "incomplete".

[0033] If the reported configuration version of the client in the first queue is lower than the target configuration version, then the DNS resolution configuration information to be sent to the corresponding client corresponding to the target configuration version is sent.

[0034] After the distribution to the clients in the first queue is completed, the distribution priority of the clients in the second queue is determined, and the previous distribution completion status of the clients is checked in descending order of the distribution priority. If the reported configuration version of the client that passed the check is lower than the target configuration version, the DNS resolution configuration information to be distributed corresponding to the target configuration version is distributed to the corresponding client.

[0035] By adopting the above technical solution, if a large number of configuration versions are received and the server's processing load is heavy, clients whose last configuration distribution status was "completed" are placed in the first queue for priority configuration distribution. Clients whose last configuration distribution status was "incomplete" are placed in the second queue, and their configurations are distributed only after the clients in the first queue have completed their distributions. After the clients in the first queue have completed their distributions, the distribution priority of the clients in the second queue is determined. Higher priority clients are processed first for verification of their last configuration distribution status and for distribution. This ensures that when there are many distribution tasks, clients with shorter processing times are prioritized, thereby improving the efficiency of DNS resolution configuration information distribution.

[0036] Optionally, determining the delivery priority of clients in the second queue specifically includes:

[0037] Count the number of times the client in the second queue failed to complete its last delivery completion status in history;

[0038] The distribution priority of clients in the second queue is determined based on the number of times each task is incomplete; the more times a task is incomplete, the lower the distribution priority.

[0039] By adopting the above technical solution, after the client in the first queue completes the distribution, the system considers the number of times each client failed to complete the distribution in its previous history. A higher number of failures indicates that the client frequently encountered issues where previously distributed DNS resolution configuration information was not fully configured in the DNS server, resulting in poor configuration performance and longer processing times for subsequent distributions. Therefore, the client is assigned a lower distribution priority. Determining distribution priority in this way helps improve the efficiency of DNS resolution configuration information distribution.

[0040] A second aspect of this application provides a device for batch distribution of DNS resolution configuration information, specifically including:

[0041] The configuration acquisition module is used to obtain the DNS resolution configuration information to be issued and the corresponding target service identifier;

[0042] The version determination module is used to determine the target configuration version corresponding to the DNS resolution configuration information to be issued based on the target service identifier, and add the DNS resolution configuration information to be issued and the target configuration version to the database;

[0043] The configuration delivery module is used to receive the reported configuration version corresponding to the target service identifier sent by each client. If the reported configuration version is lower than the target configuration version in the database, the module will send the DNS resolution configuration information to be delivered corresponding to the target configuration version to the corresponding client. The client is the client corresponding to the DNS server. The client is used to configure the corresponding DNS server based on the DNS resolution configuration information to be delivered.

[0044] By adopting the above technical solution, after the configuration acquisition module obtains the DNS resolution configuration information to be distributed and the corresponding target service identifier, the version determination module determines the target configuration version of the DNS resolution configuration information to be distributed based on the target service identifier and the initial configuration version number of the DNS resolution configuration information to be distributed. The DNS resolution configuration information to be distributed and the corresponding target configuration version are then added to the database. Finally, the configuration distribution module receives the reported configuration version corresponding to the target service identifier sent by each client. If the reported configuration version is lower than the target configuration version, the DNS resolution configuration information to be distributed corresponding to the target configuration version is sent to the corresponding client. This achieves fast and unified distribution of DNS resolution configuration information and improves the efficiency of DNS resolution configuration information distribution.

[0045] In summary, this application includes at least one of the following beneficial technical effects:

[0046] After determining the target configuration version for the DNS resolution configuration information to be distributed, this information and its corresponding target version are added to the database. This facilitates the subsequent retrieval of the latest configuration version from the database and its distribution to the DNS server. Next, the server receives the reported configuration versions from the clients corresponding to each DNS server. If the reported configuration version is lower than the target version, it indicates that the DNS resolution configuration information on this DNS server is not the latest version. Therefore, the server automatically distributes the DNS resolution configuration information corresponding to the target version to the clients corresponding to this DNS server, enabling the clients to automatically configure the DNS server and thus improving the efficiency of DNS resolution configuration information distribution. Attached Figure Description

[0047] Figure 1 This is a flowchart illustrating a method for batch distribution of DNS resolution configuration information provided in an embodiment of this application;

[0048] Figure 2 This is a flowchart illustrating another method for batch distribution of DNS resolution configuration information provided in an embodiment of this application;

[0049] Figure 3 This is a schematic diagram of a data format for a target configuration version provided in an embodiment of this application;

[0050] Figure 4 This is a schematic diagram of a DNS resolution configuration information distribution process provided in an embodiment of this application;

[0051] Figure 5 This is a flowchart illustrating another method for batch distribution of DNS resolution configuration information provided in this application embodiment;

[0052] Figure 6 This is a schematic diagram of a device for batch distribution of DNS resolution configuration information provided in an embodiment of this application.

[0053] Explanation of the attached diagram labels: 11. Configuration acquisition module; 12. Version determination module; 13. Configuration distribution module. Detailed Implementation

[0054] To enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments.

[0055] In the description of the embodiments in this application, words such as "illustrative," "for example," or "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design described as "illustrative," "for example," or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or designs. Rather, the use of words such as "illustrative," "for example," or "for example" is intended to present the relevant concepts in a specific manner.

[0056] See Figure 1 This application discloses a flowchart illustrating a method for batch distribution of DNS resolution configuration information. This method can be implemented using a computer program or run on a device for batch distribution of DNS resolution configuration information based on the von Neumann architecture. The computer program can be integrated into an application or run as a standalone utility application, specifically including:

[0057] S101: Obtain the DNS resolution configuration information to be issued and the corresponding target service identifier.

[0058] In one feasible implementation, the input operation command is received;

[0059] If the operation command is a configuration retrieval command, then obtain the target service identifier to be retrieved, and retrieve the latest configuration version of the DNS resolution configuration information corresponding to the target service identifier from the database based on the target service identifier;

[0060] If the input configuration modification command is received, the DNS resolution configuration information of the latest configuration version is modified to obtain the DNS resolution configuration information to be issued; or, if the input configuration modification command is not received, the DNS resolution configuration information of the latest configuration version is determined as the DNS resolution configuration information to be issued.

[0061] If the operation instruction is a new service instruction, a corresponding target service identifier is generated, and the DNS resolution configuration information submitted by the user terminal is obtained. The DNS resolution configuration information submitted by the user terminal is then identified as the DNS resolution configuration information to be issued.

[0062] Specifically, the DNS resolution configuration information to be distributed refers to the DNS resolution configuration information prepared by technical personnel for distribution to various DNS servers. In other embodiments, the DNS resolution configuration information to be distributed may also be the DNS resolution configuration information obtained after technical personnel have performed configuration operations such as adding, deleting, and modifying settings. DNS resolution configuration information refers to DNS resolution records, or A record resolutions of DNS servers. An A (Address) record is used to specify the IP address corresponding to a hostname (or domain name). Users can point the website server under that domain name to their own web server. In other words, the A record is the server's IP address; binding a domain name to an A record tells the DNS to direct users to the server corresponding to the A record set in the DNS when the domain name is entered.

[0063] A business identifier, or business ID, possesses characteristics such as global uniqueness, short length, information security, high availability, and low latency. Short length improves query efficiency. High availability and low latency refer to the fast response time of business ID generation, its ability to withstand high concurrency, and sufficiently low latency. In this embodiment, each business identifier corresponds to a type of DNS resolution configuration information. The corresponding DNS resolution configuration information can be identified through the business identifier and distinguished from other DNS resolution configuration information. It should be noted that each business identifier may correspond to multiple configuration versions of the same type of DNS resolution configuration information.

[0064] One feasible way to obtain the DNS resolution configuration information to be issued and the corresponding target service identifier is as follows: A graphical interface is provided to technicians through a pre-built human-computer interaction module. This graphical interface is used by technicians to configure the service identifier and submit the DNS resolution configuration information, which is then displayed on a terminal. In other embodiments, it can also be displayed on a touch screen. The human-computer interaction module is a program module designed using a hypertext preprocessor (PHP, Personal HomePage). After the server receives an externally input operation command, if the command is a new service command, indicating that the technician has added entirely new DNS resolution configuration information, the server will randomly generate an 18-bit ASCII code in the format aaaaaaaaa-bbbb-cccc, which will serve as the target service identifier for this new service. Then, the server receives the externally input DNS resolution configuration information, i.e., the DNS resolution configuration information to be issued, and finally obtains the DNS resolution configuration information to be issued and the corresponding target service identifier.

[0065] If the operation command is a configuration retrieval / modification command, meaning the technician inputs the target service identifier of an existing service via a terminal or touchscreen, the server, upon receiving the target service identifier, retrieves the latest DNS resolution configuration information corresponding to this target service identifier from the database and displays it on the terminal or touchscreen. If the server then receives the input configuration modification command, it means the technician has modified the DNS resolution configuration information of the existing service. Therefore, according to the configuration modification command, the latest configuration version of the DNS resolution configuration information is modified to obtain the DNS resolution configuration information to be issued. If the server does not receive the input configuration modification command, it means the technician has not modified the retrieved latest configuration version of the DNS resolution configuration information, but rather restored it. Therefore, the latest configuration version of the DNS resolution configuration information is directly used as the DNS resolution configuration information to be issued.

[0066] S102: Based on the target service identifier, determine the target configuration version corresponding to the DNS resolution configuration information to be issued, and add the DNS resolution configuration information to be issued and the target configuration version to the database.

[0067] Specifically, after determining the DNS resolution configuration information to be issued and the corresponding target service identifier, it is necessary to reconfigure the DNS resolution configuration information to be issued, i.e., the target configuration version. One configuration version corresponds to one DNS resolution configuration information. The configuration version consists of a service identifier and a configuration version number. The database includes configuration versions and corresponding DNS resolution configuration information. If the target service identifier already exists in the database, the configuration version number of the highest configuration version in the database is obtained, a preset value is added to the configuration version number to obtain the latest configuration version number, and finally, the target service identifier and the latest configuration version number are combined to obtain the target configuration version corresponding to the DNS resolution configuration information to be issued. In this embodiment, the preset value can be 1; in other embodiments, the preset value can be other positive integers. After the target configuration version is determined, the DNS resolution configuration information to be issued and the target configuration version are added to the database. It should be noted that for each configuration operation (addition, deletion, modification, etc.), the configuration version of the DNS resolution configuration information after the operation is redefined and stored in the database, thereby facilitating subsequent backtracking and quickly finding configuration versions that have not been issued or incomplete, or configuration versions that need to be restored. In addition, the target configuration version of DNS resolution configuration information to be issued can be determined at one time, or the target configuration version of DNS resolution configuration information to be issued for multiple different service identifiers can be determined at one time.

[0068] S103: Receive the reported configuration version corresponding to the target service identifier sent by each client. If the reported configuration version is lower than the target configuration version in the database, send the DNS resolution configuration information to be sent to the corresponding client corresponding to the target configuration version. The client is the client corresponding to the DNS server. The client is used to configure the corresponding DNS server based on the DNS resolution configuration information to be sent.

[0069] Specifically, after the target configuration version of the DNS resolution configuration information to be issued is determined, the client corresponding to each DNS server receives the reported configuration version. The reported configuration version is the configuration version of the DNS resolution configuration information currently configured by the DNS server, and the corresponding service identifier is consistent with the target service identifier of the DNS resolution configuration information to be issued.

[0070] After receiving the reported configuration versions from each client, the reported configuration version is compared with the target configuration version that matches the business identifier in the database. If the reported configuration version is lower than the target configuration version, it means that the DNS resolution configuration information in the DNS server corresponding to this client is not the latest version. The DNS resolution configuration information to be distributed needs to be distributed to this client. The client then configures the DNS resolution configuration information to be distributed to the corresponding DNS server, thereby quickly and uniformly distributing the latest DNS resolution configuration information to the DNS server, which better ensures the consistency of DNS server configuration.

[0071] It should be noted that in this embodiment, the reported configuration versions sent by each client can be the same service identifier, while in other embodiments, they can be different service identifiers.

[0072] See Figure 2 This application discloses a flowchart illustrating another method for batch distribution of DNS resolution configuration information. This method can be implemented using a computer program or run on a batch distribution device for DNS resolution configuration information based on the von Neumann architecture. The computer program can be integrated into an application or run as a standalone utility application, specifically including:

[0073] S201: Obtain the DNS resolution configuration information to be issued and the corresponding target service identifier.

[0074] For details, please refer to step S101, which will not be repeated here.

[0075] S202: Obtain the initial configuration version number corresponding to the DNS resolution configuration information to be issued.

[0076] S203: Increment the initial configuration version number by 1 to obtain the latest configuration version number corresponding to the DNS resolution configuration information to be issued.

[0077] Specifically, after determining the DNS resolution configuration information to be issued and the corresponding target service identifier, if the target service identifier is a service identifier that does not exist in the database, it means that the corresponding DNS resolution configuration information to be issued is a brand new DNS resolution configuration information added by the technical personnel. In this case, the initial configuration version number of the DNS resolution configuration information to be issued is 1. If the target service identifier is a service identifier that already exists in the database, then the version number of the highest configuration version corresponding to the target service identifier in the database is extracted and determined as the initial configuration version number of the DNS resolution configuration information to be issued.

[0078] Once the initial configuration version number of the DNS resolution configuration information to be issued is determined, incrementing the initial configuration version number by 1 will yield the latest configuration version number corresponding to the DNS resolution configuration information to be issued. For example, if the highest configuration version number corresponding to the target service identifier in the current database is N, which is the initial configuration version number, then the latest configuration version number of the corresponding DNS resolution configuration information to be issued will be N+1.

[0079] S204: Combine the target service identifier corresponding to the DNS resolution configuration information to be issued with the latest configuration version number to obtain the target configuration version corresponding to the DNS resolution configuration information to be issued, and add the DNS resolution configuration information to be issued and the target configuration version to the database.

[0080] Specifically, such as Figure 3 As shown, since the configuration version includes a configuration version number and a service identifier, after the latest configuration version number is determined, the target service identifier corresponding to the DNS resolution configuration information to be issued is combined with the latest configuration version number to obtain the target configuration version. The combination method can be: connecting the target service identifier and the latest configuration version number with an underscore, i.e., target service identifier_N+1. In other embodiments, a comma or a plus sign can also be used to connect the target service identifier and the latest configuration version number. Finally, the target configuration version and the DNS resolution configuration information to be issued are added to the database.

[0081] For example, if the target service identifier for the DNS resolution configuration information A to be issued is 11112222-3333-2345, and the latest configuration version number is 10, then the target configuration version is: target service identifier_latest configuration version number, i.e., 11112222-3333-2345_10. Therefore, when added to the database, it would be: 11112222-3333-2345_10 and A.

[0082] S205: Receive the reported configuration version corresponding to the target service identifier sent by each client, and receive the user identifier, key and last distribution completion status sent by each client.

[0083] S206: Authentication of each client is performed based on the user identifier and key.

[0084] Specifically, such as Figure 4As shown, after adding the DNS resolution configuration information to be distributed and the target configuration version to the database, the server will receive configuration distribution requests from the clients corresponding to each DNS server. It will also receive the reported configuration version corresponding to the same target service identifier from each client, the user identifier and key of each client, and the status of the last distribution completion. The user identifier is manually set by technical personnel through the client, and the key is automatically generated by the client. The user identifier is compared with the corresponding string in the server, and the key is compared with the corresponding string in the server to authenticate the client and determine whether access to the server is authorized.

[0085] S207: If the identity authentication is successful, the previous distribution completion status will be verified. After the verification is successful, the reported configuration version will be compared with the target configuration version in the database.

[0086] In one feasible implementation, if the previous distribution completion status was incomplete, then the configuration version of the previous distribution is retrieved;

[0087] The DNS resolution configuration information corresponding to the previously issued configuration version is sent to the client. The verification is considered successful once the status of the previous issuance is completed.

[0088] If the previous distribution completion status was "completed", then the verification is considered successful.

[0089] Specifically, the user identifier is compared with the corresponding string in the server, and the key is compared with the corresponding string in the server. If both match, it means that the client's authentication is successful and access to the server is authorized. Then, the completion status of the last distribution is verified. If the previous distribution completion status was "completed" or "incomplete," it means that the DNS resolution configuration information previously distributed to this client has been configured in the corresponding DNS server. Then, the current configuration version of the DNS server (the reported configuration version) is directly compared with the target configuration version of the same target service identifier to determine if the reported configuration version is the latest version.

[0090] If the previous completion status was "incomplete," it means that the DNS resolution configuration information previously sent to this client was not configured on the corresponding DNS server. Therefore, the system retrieves the previously sent configuration version from the database, matches it with the corresponding DNS resolution configuration information, and resends the DNS resolution configuration information corresponding to the previously sent configuration version to this client. The client then reconfigures this DNS resolution information on the corresponding DNS server. Once the previous completion status is updated to "completed," the verification is considered successful. Finally, the reported configuration version is compared with the target configuration version.

[0091] S208: If the reported configuration version is less than the target configuration version in the database, then send the DNS resolution configuration information to be sent for the target configuration version to the corresponding client.

[0092] For details, please refer to step S103, which will not be repeated here.

[0093] See Figure 5 This application discloses a flowchart illustrating another method for batch distribution of DNS resolution configuration information. This method can be implemented using a computer program or run on a batch distribution device for DNS resolution configuration information based on the von Neumann architecture. The computer program can be integrated into an application or run as a standalone utility application, specifically including:

[0094] S301: Obtain the DNS resolution configuration information to be issued and the corresponding target service identifier.

[0095] S302: Based on the target service identifier, determine the target configuration version corresponding to the DNS resolution configuration information to be issued, and add the DNS resolution configuration information to be issued and the target configuration version to the database.

[0096] S303: Receive the reported configuration version corresponding to the target service identifier sent by each client. If the number of reported configuration versions exceeds the threshold, obtain the last distribution completion status of each client. Based on the last distribution completion status, divide each client into a first queue and a second queue. The first queue includes clients whose last distribution completion status is "completed" and the second queue includes clients whose last distribution completion status is "incomplete".

[0097] Specifically, after adding the DNS resolution configuration information to be distributed and the target configuration version to the database, the number of configuration versions reported by clients corresponding to each DNS server is counted. If the number of reported configuration versions exceeds a threshold, it indicates that many clients are requesting distribution from the server, resulting in high pressure on the server for configuration distribution. Therefore, the previous distribution completion status sent by each client is determined. Clients with a previous distribution completion status are placed in the first queue for priority distribution of DNS resolution configuration information. Clients with a previous distribution completion status that is not yet complete are placed in the second queue, waiting for clients in the first queue to complete their distribution before processing the distribution for clients in the second queue. When there are many distribution requests, the distribution requests from clients whose previous distribution was completed are processed first, thereby improving the efficiency of DNS resolution configuration information distribution.

[0098] S304: If the reported configuration version of a client in the first queue is lower than the target configuration version, then send the DNS resolution configuration information to be sent corresponding to the target configuration version to the corresponding client.

[0099] For details, please refer to step S103, which will not be repeated here.

[0100] S305: After the distribution to the clients in the first queue is completed, the distribution priority of the clients in the second queue is determined, and the previous distribution completion status of the clients is checked in descending order of distribution priority. After the check is passed, if the reported configuration version of the client that passed the check is lower than the target configuration version, the DNS resolution configuration information to be distributed corresponding to the target configuration version is distributed to the corresponding client.

[0101] In one feasible implementation, the number of times a client in the second queue failed to complete its delivery in the previous completion status is counted.

[0102] The priority of each client in the second queue is determined based on the number of incomplete attempts; the more incomplete attempts, the lower the priority.

[0103] Specifically, after the DNS resolution configuration information to be sent to the clients in the first queue is completed, the historical completion status of each client's previous sending is retrieved. The number of times the previous completion status was "incomplete" is counted from this historical record. The more times this "incomplete" status occurs, the worse the DNS server configuration for that client is, and the lower the sending priority. Specifically, the sending priority corresponding to the number of incomplete statuses for each client can be matched using a priority matching table, which includes the number of incomplete statuses and their corresponding sending priorities.

[0104] After determining the distribution priority of clients in the second queue, the corresponding clients are selected sequentially in descending order of distribution priority. The completion status of their previous distribution is verified; that is, the DNS resolution configuration information corresponding to the previously distributed configuration version is retrieved from the database and re-distributed to this client. After distribution, the verification is confirmed to be successful. Then, the reported configuration version of this client is compared with the target configuration version to finally determine whether to distribute the DNS resolution configuration information to this client. For details, please refer to step S103, which will not be repeated here. This method allows for the completion of configuration distribution tasks for more clients within the same time frame, improving distribution efficiency.

[0105] In another feasible implementation, if the verification of the previous configuration completion status of a client fails within the preset number of verifications corresponding to its configuration priority, then the client's configuration priority is moved to the lowest level in the second queue. The configuration priority and the preset number of verifications are correlated; the higher the configuration priority, the more preset verifications are required. For example, if there are 10 configuration priority levels, client A has a configuration priority of 8, so the corresponding preset number of verifications is 3; client B has a configuration priority of 5, so the corresponding preset number of verifications is 1. This effectively improves the configuration distribution efficiency of clients in the second queue.

[0106] In another feasible implementation, a first number of clients with more than a threshold number of incomplete requests is counted. If this first number exceeds the threshold, it indicates that there are many clients in the second queue with poor DNS server configuration performance. In this case, a multi-threaded approach is used to simultaneously process the configuration distribution tasks for a predetermined number of clients in the second queue. Clients that have completed the distribution are removed from the second queue. A second number of clients with more than the threshold number of incomplete requests in the second queue is counted in real time. When this second number drops to the threshold, the predetermined number is reduced, ensuring distribution efficiency while saving computing power. Alternatively, if the total number of clients in the second queue drops to a third number, the predetermined number is reduced. It should be noted that before distributing the DNS resolution configuration information to be distributed, there is a verification process for the completion status of the previous distribution.

[0107] The implementation principle of the batch distribution method for DNS resolution configuration information in this application embodiment is as follows: After obtaining the DNS resolution configuration information to be distributed and the corresponding target service identifier, the target configuration version of the DNS resolution configuration information to be distributed is updated and iteratively determined according to the target service identifier and the initial configuration version number of the DNS resolution configuration information to be distributed. This DNS resolution configuration information to be distributed and the corresponding target configuration version are then added to the database for storage, facilitating subsequent configuration version backtracking and enabling the unified distribution of the latest configuration version of DNS resolution configuration information to each client. Next, the reported configuration version sent by the client corresponding to each DNS server is received. If the reported configuration version is lower than the target configuration version in the database, the corresponding DNS resolution configuration information to be distributed is distributed to the corresponding client, enabling the client to configure the DNS resolution configuration information to be distributed to the corresponding DNS server, thereby achieving automatic distribution of DNS resolution configuration information and improving the efficiency of DNS resolution configuration information distribution.

[0108] The following are embodiments of the apparatus described in this application, which can be used to execute the embodiments of the method described in this application. For details not disclosed in the apparatus embodiments of this application, please refer to the embodiments of the method described in this application.

[0109] Please see Figure 6 This is a schematic diagram of the structure of a batch distribution device for DNS resolution configuration information provided in an embodiment of this application. This batch distribution device for DNS resolution configuration information can be implemented as all or part of a device through software, hardware, or a combination of both. The device 1 includes a configuration acquisition module 11, a version determination module 12, and a configuration distribution module 13.

[0110] Configuration acquisition module 11 is used to acquire the DNS resolution configuration information to be issued and the corresponding target service identifier;

[0111] Version determination module 12 is used to determine the target configuration version corresponding to the DNS resolution configuration information to be issued based on the target service identifier, and add the DNS resolution configuration information to be issued and the target configuration version to the database;

[0112] The configuration distribution module 13 is used to receive the reported configuration version corresponding to the target service identifier sent by each client. If the reported configuration version is lower than the target configuration version in the database, the module distributes the DNS resolution configuration information to be distributed to the corresponding client, which is the client corresponding to the DNS server. The client is used to configure the corresponding DNS server based on the DNS resolution configuration information to be distributed.

[0113] Optionally, the configuration acquisition module 11 is used for:

[0114] Receive input operation commands;

[0115] If the operation command is a configuration retrieval command, then obtain the target service identifier to be retrieved, and retrieve the latest configuration version of the DNS resolution configuration information corresponding to the target service identifier from the database based on the target service identifier;

[0116] If the input configuration modification command is received, the DNS resolution configuration information of the latest configuration version is modified to obtain the DNS resolution configuration information to be issued; or, if the input configuration modification command is not received, the DNS resolution configuration information of the latest configuration version is determined as the DNS resolution configuration information to be issued.

[0117] If the operation instruction is a new service instruction, a corresponding target service identifier is generated, and the DNS resolution configuration information submitted by the user terminal is obtained. The DNS resolution configuration information submitted by the user terminal is then identified as the DNS resolution configuration information to be issued.

[0118] Optional, version determination module 12, specifically used for:

[0119] Obtain the initial configuration version number corresponding to the DNS resolution configuration information to be distributed;

[0120] Increment the initial configuration version number by 1 to obtain the latest configuration version number corresponding to the DNS resolution configuration information to be issued;

[0121] The target service identifier corresponding to the DNS resolution configuration information to be issued is combined with the latest configuration version number to obtain the target configuration version corresponding to the DNS resolution configuration information to be issued, and the DNS resolution configuration information to be issued and the target configuration version are added to the database.

[0122] Optionally, configure module 13, specifically for:

[0123] Receive the reported configuration version corresponding to the target service identifier sent by each client, and receive the user identifier, key and last distribution completion status sent by each client;

[0124] Each client is authenticated based on its user ID and key.

[0125] If the identity authentication is successful, the status of the previous distribution will be verified. After the verification is successful, the reported configuration version will be compared with the target configuration version in the database.

[0126] If the reported configuration version is lower than the target configuration version in the database, the DNS resolution configuration information corresponding to the target configuration version will be sent to the corresponding client.

[0127] Optionally, the configuration distribution module 13 is also used for:

[0128] If the previous distribution completion status was incomplete, then retrieve the configuration version from the previous distribution;

[0129] The DNS resolution configuration information corresponding to the previously issued configuration version is sent to the client. The verification is considered successful once the status of the previous issuance is completed.

[0130] If the previous distribution completion status was "completed", then the verification is considered successful.

[0131] Optionally, the configuration distribution module 13 is also used for:

[0132] Receive the reported configuration version corresponding to the target service identifier sent by each client. If the number of reported configuration versions exceeds the threshold, obtain the last distribution completion status of each client. Based on the last distribution completion status, divide each client into a first queue and a second queue. The first queue includes clients whose last distribution completion status is "completed" and the second queue includes clients whose last distribution completion status is "incomplete".

[0133] If the reported configuration version of the client in the first queue is lower than the target configuration version, the DNS resolution configuration information corresponding to the target configuration version will be sent to the corresponding client.

[0134] After the distribution to the clients in the first queue is completed, the distribution priority of the clients in the second queue is determined, and the previous distribution completion status of the clients is checked in descending order of distribution priority. After the check passes, if the reported configuration version of the client that passed the check is lower than the target configuration version, the DNS resolution configuration information to be distributed corresponding to the target configuration version is distributed to the corresponding client.

[0135] Optionally, the configuration distribution module 13 is also used for:

[0136] Count the number of times the client in the second queue failed to complete its last delivery completion status in history;

[0137] The priority of each client in the second queue is determined based on the number of incomplete attempts; the more incomplete attempts, the lower the priority.

[0138] It should be noted that the above-described embodiment of the batch distribution device for DNS resolution configuration information, when executing the batch distribution method for DNS resolution configuration information, only illustrates the division of the above functional modules. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. Furthermore, the above-described embodiment of the batch distribution device for DNS resolution configuration information and the embodiment of the batch distribution method for DNS resolution configuration information belong to the same concept, and their implementation process is detailed in the method embodiment, which will not be repeated here.

[0139] This application also discloses a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it employs a method for batch distribution of DNS resolution configuration information as described in the above embodiments.

[0140] The computer program can be stored in a computer-readable medium. The computer program includes computer program code, which can be in the form of source code, object code, executable file, or certain middleware. The computer-readable medium includes any entity or device capable of carrying computer program code, recording media, USB flash drive, portable hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the computer-readable medium includes, but is not limited to, the above-mentioned components.

[0141] The method for batch distribution of DNS resolution configuration information according to the above embodiments is stored in the computer-readable storage medium and loaded and executed on the processor to facilitate the storage and application of the above method.

[0142] This application also discloses an electronic device in which a computer program is stored in a computer-readable storage medium. When the computer program is loaded and executed by a processor, the above-mentioned method for batch distribution of DNS resolution configuration information is used.

[0143] The electronic device can be a desktop computer, a laptop computer, or a cloud server, and the electronic device includes, but is not limited to, a processor and a memory. For example, the electronic device may also include input / output devices, network access devices, and buses.

[0144] The processor can be a central processing unit (CPU). Of course, depending on the actual use, it can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), off-the-shelf programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor, etc., and this application does not limit it.

[0145] The memory can be an internal storage unit of an electronic device, such as a hard disk or RAM, or an external storage device, such as a plug-in hard disk, smart memory card (SMC), secure digital card (SD), or flash memory card (FC) equipped on the electronic device. Furthermore, the memory can be a combination of an internal storage unit and an external storage device. The memory is used to store computer programs and other programs and data required by the electronic device. The memory can also be used to temporarily store data that has been output or will be output. This application does not limit this.

[0146] In this electronic device, the method for batch distribution of DNS resolution configuration information according to the above embodiment is stored in the memory of the electronic device and loaded and executed on the processor of the electronic device for convenient use.

[0147] The foregoing description is merely an exemplary embodiment of this disclosure and should not be construed as limiting the scope of this disclosure. Any equivalent changes and modifications made in accordance with the teachings of this disclosure shall still fall within the scope of this disclosure. Other embodiments of this disclosure will be readily apparent to those skilled in the art upon consideration of the specification and practice of the disclosure herein. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not described herein. The specification and embodiments are to be considered exemplary only, and the scope and spirit of this disclosure are defined by the claims.

Claims

1. A method for batch distribution of DNS resolution configuration information, characterized in that, The method includes: Obtain the DNS resolution configuration information to be distributed and the corresponding target service identifier; Based on the target service identifier, determine the target configuration version corresponding to the DNS resolution configuration information to be issued, and add the DNS resolution configuration information to be issued and the target configuration version to the database; The system receives the reported configuration version corresponding to the target service identifier sent by each client. If the reported configuration version is lower than the target configuration version in the database, it sends the DNS resolution configuration information to be sent corresponding to the target configuration version to the corresponding client. This includes: receiving the reported configuration version corresponding to the target service identifier sent by each client; if the number of reported configuration versions exceeds a threshold, obtaining the previous sending completion status of each client; and dividing each client into a first queue and a second queue based on the previous sending completion status. The first queue includes clients whose previous sending completion status is "completed" and the second queue includes clients whose previous sending completion status is "incomplete". If the reported configuration version of the client in the first queue is lower than the target configuration version, then the DNS resolution configuration information to be sent to the corresponding client corresponding to the target configuration version is sent. After the distribution to the clients in the first queue is completed, the distribution priority of the clients in the second queue is determined, and the previous distribution completion status of the clients is checked in descending order of the distribution priority. If the reported configuration version of the client that passed the check is lower than the target configuration version, the DNS resolution configuration information to be distributed corresponding to the target configuration version is distributed to the corresponding client. The client is the client corresponding to the DNS server, and the client is used to configure the corresponding DNS server based on the DNS resolution configuration information to be issued.

2. The method for batch distribution of DNS resolution configuration information according to claim 1, characterized in that, The process of obtaining the DNS resolution configuration information to be distributed and the corresponding target service identifier specifically includes: Receive input operation commands; If the operation instruction is a configuration retrieval instruction, then obtain the target service identifier to be retrieved, and retrieve the latest configuration version of the DNS resolution configuration information corresponding to the target service identifier from the database according to the target service identifier; If the input configuration modification instruction is received, the DNS resolution configuration information of the latest configuration version is modified to obtain the DNS resolution configuration information to be issued; or, if the input configuration modification instruction is not received, the DNS resolution configuration information of the latest configuration version is determined as the DNS resolution configuration information to be issued. If the operation instruction is a new service instruction, a corresponding target service identifier is generated, and the DNS resolution configuration information submitted by the user terminal is obtained. The DNS resolution configuration information submitted by the user terminal is then determined as the DNS resolution configuration information to be issued.

3. The method for batch distribution of DNS resolution configuration information according to claim 2, characterized in that, The database includes a configuration version and corresponding DNS resolution configuration information. The configuration version includes a service identifier and a configuration version number. The step of determining the target configuration version corresponding to the DNS resolution configuration information to be distributed based on the target service identifier, and adding the DNS resolution configuration information to be distributed and the target configuration version to the database, specifically includes: Obtain the initial configuration version number corresponding to the DNS resolution configuration information to be issued; Increment the initial configuration version number by 1 to obtain the latest configuration version number corresponding to the DNS resolution configuration information to be issued; The target service identifier corresponding to the DNS resolution configuration information to be issued is combined with the latest configuration version number to obtain the target configuration version corresponding to the DNS resolution configuration information to be issued, and the DNS resolution configuration information to be issued and the target configuration version are added to the database.

4. The method for batch distribution of DNS resolution configuration information according to claim 1, characterized in that, The step involves receiving the reported configuration version corresponding to the target service identifier sent by each client. If the reported configuration version is lower than the target configuration version in the database, then the step sends the DNS resolution configuration information to be sent corresponding to the target configuration version to the corresponding client, specifically including: Receive the reported configuration version corresponding to the target service identifier sent by each client, and receive the user identifier, key and last distribution completion status sent by each client; The client is authenticated based on the user identifier and the key. If the identity authentication is successful, the previous distribution completion status is verified. After the verification is successful, the reported configuration version is compared with the target configuration version in the database. If the reported configuration version is less than the target configuration version in the database, then the DNS resolution configuration information corresponding to the target configuration version is sent to the corresponding client.

5. The method for batch distribution of DNS resolution configuration information according to claim 4, characterized in that, The verification of the previous delivery completion status specifically includes: If the previous distribution completion status is incomplete, then obtain the configuration version of the previous distribution; The DNS resolution configuration information corresponding to the previously issued configuration version is sent to the client until the status of the previous issuance is completed, then the verification is confirmed to be successful. If the previous delivery completion status is "completed", then the verification is considered successful.

6. The method for batch distribution of DNS resolution configuration information according to claim 1, characterized in that, Determining the delivery priority of clients in the second queue specifically includes: Count the number of times the client in the second queue failed to complete its last delivery completion status in history; The distribution priority of clients in the second queue is determined based on the number of times each task is incomplete; the more times a task is incomplete, the lower the distribution priority.

7. A device for batch distribution of DNS resolution configuration information, used to implement the method for batch distribution of DNS resolution configuration information according to any one of claims 1 to 6, characterized in that, include: The configuration acquisition module (11) is used to acquire the DNS resolution configuration information to be issued and the corresponding target service identifier; Version determination module (12) is used to determine the target configuration version corresponding to the DNS resolution configuration information to be issued according to the target service identifier, and add the DNS resolution configuration information to be issued and the target configuration version to the database; The configuration distribution module (13) is used to receive the reported configuration version corresponding to the target service identifier sent by each client. If the reported configuration version is lower than the target configuration version in the database, the module distributes the DNS resolution configuration information to be distributed corresponding to the target configuration version to the corresponding client. The client is the client corresponding to the DNS server. The client is used to configure the corresponding DNS server based on the DNS resolution configuration information to be distributed.

8. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is loaded and executed by the processor, it implements the method of any one of claims 1-6.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and capable of running on the processor, characterized in that, When the processor loads and executes the computer program, it implements the method of any one of claims 1-6.

Citation Information

Patent Citations

  • Client updating control method and device, storage medium and server

    CN111736876A