CN113163023A - Domain name management method, device, medium and electronic equipment - Google Patents

Domain name management method, device, medium and electronic equipment Download PDF

Info

Publication number
CN113163023A
CN113163023A CN202110218226.9A CN202110218226A CN113163023A CN 113163023 A CN113163023 A CN 113163023A CN 202110218226 A CN202110218226 A CN 202110218226A CN 113163023 A CN113163023 A CN 113163023A
Authority
CN
China
Prior art keywords
configuration file
domain name
local
information
control system
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110218226.9A
Other languages
Chinese (zh)
Other versions
CN113163023B (en
Inventor
赵志强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing CHJ Automotive Information Technology Co Ltd
Original Assignee
Beijing CHJ Automotive Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing CHJ Automotive Information Technology Co Ltd filed Critical Beijing CHJ Automotive Information Technology Co Ltd
Priority to CN202110218226.9A priority Critical patent/CN113163023B/en
Publication of CN113163023A publication Critical patent/CN113163023A/en
Application granted granted Critical
Publication of CN113163023B publication Critical patent/CN113163023B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/30Managing network names, e.g. use of aliases or nicknames
    • H04L61/3015Name registration, generation or assignment
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/09Mapping addresses
    • H04L61/10Mapping addresses of different types
    • H04L61/103Mapping addresses of different types across network layers, e.g. resolution of network layer into physical layer addresses or address resolution protocol [ARP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/30Managing network names, e.g. use of aliases or nicknames
    • H04L61/3015Name registration, generation or assignment
    • H04L61/3025Domain name generation or assignment
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/2866Architectures; Arrangements
    • H04L67/30Profiles

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The disclosure provides a domain name management method, a domain name management device, a domain name management medium and electronic equipment. The method converts domain name resolution information in a database into a configuration file special for local DNS service, and synchronously updates the configuration file to a local version control system. The access pressure and the analytic faults caused by the adoption of the database are avoided, and the operation efficiency of the DNS service is ensured. Meanwhile, the convenience of database management is utilized, and a user can manage domain name resolution information stored in the database through the DNS management platform.

Description

Domain name management method, device, medium and electronic equipment
Technical Field
The present disclosure relates to the field of domain name management, and in particular, to a domain name management method, apparatus, medium, and electronic device.
Background
A Domain Name System (DNS, for short) is a service of the Internet, and is a distributed database that maps Domain names and Internet Protocol addresses (IP addresses, for short) to each other, and can convert Domain Name information into corresponding IP Address information, so that a user can conveniently get rid of complicated IP Address strings and access a website through Domain Name information.
Currently, data calls are typically made between systems within an enterprise using DNS services. The Domain Name Service (BIND) of the Berkeley Internet, a Dynamic Load Zone (DLZ) plug-in and a MySQL database are often used as DNS management platforms, BIND is open source code software for realizing DNS Service, can provide functions of bidirectional analysis, forwarding, sub-Domain authorization and view, is the DNS Service software which is widely used in the world, and at present, BIND is adopted in more than half of DNS services in the Internet field. DLZ is a plug-in of BIND, supports the record of DNS service to be stored in MySQL database, and manages the domain name resolution data through DLZ plug-in and MySQL database.
However, when a DNS service request is obtained, BIND needs to query the MySQL database through the DLZ plug-in, and storing domain name resolution data by using the database faces the problem of database pressure caused by querying the database, which often causes resolution failure, lowers the performance of the DNS service, and reduces the operating efficiency of the DNS service.
Disclosure of Invention
An object of the present disclosure is to provide a domain name management method, apparatus, medium, and electronic device, which can solve at least one of the above-mentioned technical problems. The specific scheme is as follows:
according to a specific implementation manner of the present disclosure, in a first aspect, the present disclosure provides a domain name management method, including:
acquiring domain name resolution information from a domain name management data set;
generating a first configuration file based on the domain name resolution information, wherein the first configuration file is used for domain name resolution of local domain name system service;
and synchronously updating the first configuration file to a local version control system.
Optionally, the synchronously updating the first configuration file to the local version control system includes:
acquiring a local cache directory of the local version control system;
acquiring a second configuration file updated last time from the local cache directory;
judging whether the first configuration file and the second configuration file have distinguishing information or not;
and if so, synchronously updating the second configuration file by utilizing the first configuration file.
Optionally, the determining whether the first configuration file and the second configuration file have the distinguishing information includes:
respectively opening the first configuration file and the second configuration file;
and judging whether the distinguishing information exists in the information of the same file line of the first configuration file and the second configuration file.
Optionally, after the determining whether the first configuration file and the second configuration file have the distinguishing information, the method further includes:
and if the first configuration file exists, acquiring the distinguishing information, and storing the distinguishing information and the first configuration file into a local temporary storage area of the local version control system.
Optionally, after the storing the difference information and the first configuration file into the local temporary storage area of the local version control system, the method further includes:
generating a unique value based on the distinguishing information;
storing the distinguishing information and the unique value in a local version library of the local version control system.
Optionally, after the synchronous updating of the first configuration file to the local version control system, the method further includes:
and when the local domain name system service belongs to a distributed domain name system service and the distributed domain name system service adopts a multi-master mode, storing the configuration information in the first configuration file into a code warehouse of the local version control system under a local master branch.
Optionally, after the storing the configuration information in the first configuration file into a code warehouse of the local version control system under the local master branch when the local domain name system service belongs to the distributed domain name system service and the distributed domain name system service adopts a multi-master mode, the method further includes:
and pushing the configuration information to a code warehouse of a version control system under a remote master branch.
Optionally, the method further includes:
when the local domain name system service belongs to the distributed domain name system service and the distributed domain name system service adopts a multi-master mode, pulling updated configuration information from a code warehouse of a version control system under a preset remote master branch;
and generating a third configuration file based on the configuration information, wherein the third configuration file is used for domain name resolution of the local domain name system service.
Optionally, when the local domain name system service belongs to a distributed domain name system service and the distributed domain name system service adopts a multi-master mode, after the updated configuration information is pulled from a code warehouse of a version control system under a preset remote master branch, the method further includes:
and storing the configuration information into a code warehouse of the local version control system under the branch of the local master.
Optionally, after the generating the first configuration file based on the domain name resolution information, the method further includes:
and saving the first configuration file to an access directory of the local domain name system service.
According to a second aspect, the present disclosure provides a domain name management apparatus, including:
the acquisition unit is used for acquiring domain name resolution information from the domain name management data set;
a first generating unit, configured to generate a first configuration file based on the domain name resolution information, where the first configuration file is used for domain name resolution of a local domain name system service;
and the updating unit is used for synchronously updating the first configuration file to a local version control system.
Optionally, the update unit includes:
the first obtaining subunit is configured to obtain a local cache directory of the local version control system;
the second obtaining subunit is configured to obtain a second configuration file updated last time from the local cache directory;
the first judging subunit is configured to judge whether there is distinguishing information between the first configuration file and the second configuration file;
and the updating subunit is used for synchronously updating the second configuration file by using the first configuration file if the second configuration file exists.
Optionally, the first determining subunit includes:
a file opening subunit, configured to open the first configuration file and the second configuration file, respectively;
and the second judging subunit is used for judging whether the distinguishing information exists in the information of the same file row of the first configuration file and the second configuration file.
Optionally, the updating unit further includes:
and the temporary storage subunit is used for acquiring the distinguishing information and storing the distinguishing information and the first configuration file into a local temporary storage area of the local version control system if the distinguishing information exists.
Optionally, the updating unit further includes:
a unique value generating subunit configured to generate a unique value based on the discrimination information;
a saving subunit, configured to save the difference information and the unique value in a local version library of the local version control system.
Optionally, the apparatus further comprises:
and the first storage unit is used for storing the configuration information in the first configuration file into a code warehouse of the local version control system under a local master branch when the local domain name system service belongs to the distributed domain name system service and the distributed domain name system service adopts a multi-master mode.
Optionally, the apparatus further comprises:
and the pushing unit is used for storing the configuration information in the first configuration file into a code warehouse of the local version control system under a local master branch and then pushing the configuration information into a code warehouse of a version control system under a remote master branch when the local domain name system service belongs to the distributed domain name system service and the distributed domain name system service adopts a multi-master mode.
Optionally, the apparatus further comprises:
the system comprises a pulling unit, a storage unit and a processing unit, wherein the pulling unit is used for pulling updated configuration information from a code warehouse of a version control system under a preset remote master branch when the local domain name system service belongs to a distributed domain name system service and the distributed domain name system service adopts a multi-master mode;
a second generating unit, configured to generate a third configuration file based on the configuration information, where the third configuration file is used for domain name resolution of the local domain name system service.
Optionally, the apparatus further comprises:
and the second storage unit is used for pulling updated configuration information from a code warehouse of the version control system under a preset remote master branch and then storing the configuration information into the code warehouse of the local version control system under a local master branch when the local domain name system service belongs to the distributed domain name system service and the distributed domain name system service adopts a multi-master mode.
Optionally, the apparatus further comprises:
and a third storing unit, configured to store the first configuration file into an access directory of the local domain name system service after generating the first configuration file based on the domain name resolution information.
According to a third aspect, there is provided a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements a data recovery method as defined in any one of the first aspects.
According to a fourth aspect thereof, the present disclosure provides an electronic device, comprising: one or more processors; storage means for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement the data recovery method of any of the first aspects.
Compared with the prior art, the scheme of the embodiment of the disclosure at least has the following beneficial effects:
the method and the system convert domain name resolution information in the database into a configuration file special for local DNS service, and synchronously update the configuration file into a local version control system. The access pressure and the analytic faults caused by the adoption of the database are avoided, and the operation efficiency of the DNS service is ensured. Meanwhile, the convenience of database management is utilized, and a user can manage domain name resolution information stored in the database through the DNS management platform.
Drawings
The above and other features, advantages and aspects of various embodiments of the present disclosure will become more apparent by referring to the following detailed description when taken in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numbers refer to the same or similar elements. It should be understood that the drawings are schematic and that elements and elements are not necessarily drawn to scale. In the drawings:
fig. 1 shows a flow diagram of a domain name management method according to an embodiment of the present disclosure;
fig. 2 shows a flow diagram of a domain name management method according to an embodiment of the present disclosure;
fig. 3 shows a block diagram of elements of a domain name management apparatus according to an embodiment of the present disclosure;
fig. 4 shows an electronic device connection structure schematic according to an embodiment of the present disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but rather are provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the disclosure are for illustration purposes only and are not intended to limit the scope of the disclosure.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order, and/or performed in parallel. Moreover, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
Alternative embodiments of the present disclosure are described in detail below with reference to the accompanying drawings.
The first embodiment provided by the present disclosure, namely, an embodiment of a domain name management method.
The embodiments of the present disclosure will be described in detail below with reference to fig. 1 and 2.
Step S101, obtaining domain name resolution information from a domain name management data set.
The domain name resolution information is used for converting the domain name information into corresponding IP address information. The domain name resolution information at least comprises the mapping relation between the IP address information and the domain name information.
Currently, many applications employ databases to store domain name resolution information. For example, in the case where the BIND, DLZ plug-in and MySQL database are used as DNS management platforms, the MySQL database is used as a domain name management data set, and domain name resolution information is stored; the user can check the domain name resolution information in the MySQL database through the BIND server in the DNS management platform, can perform operation (such as addition, deletion and modification) aiming at the domain name resolution information, and records the operation information (such as addition information, deletion information and modification information) into a log file of the MySQL database, so that the problems of later inquiry, audit and troubleshooting are facilitated; the DNS management platform transmits the edited domain name resolution information to a cmdb _ DNS _ table of the MySQL database through a program interface written by python language, wherein the domain name resolution information is transmitted in a JSON format; the cmdb _ dns _ table structure is referenced as follows:
CREATE TABLE`cmdb_dns_table`(
`id`int(11)NOT NULL AUTO_INCREMENT,
which view the views 'belong to, must be controlled by the view',
zone 'to which the zone' of the "" zone 'varchar (255) DEFAULT NULL COMMENT' belongs,
"dname" varchar (255) DEFAULT NULL COMMENT' domain name to resolve,
"ttl ' int (11) DEFAULT '86400' COMMENT ' Life cycle ',
"rdtype" varchar (255) DEFAULT NULL COMMENT 'record type, A CNAME MX',
the address ' to which the data ' varchar (255) DEFAULT NULL COMMENT ' resolves,
next update ' varchar (55) DEFAULT '10000001' measure ' next update time ',
"last _ update ' varchar (55) DEFAULT '10000000' COMMENT ' latest update time ',
change _ type int (11) DEFAULT '0' COMMENT 'update type, 0 newly added, 1 updated',
"sole 'varchar (35) DEFAULT NULL COMMENT' records the user's unique name',
the "" locked "" int (1) DEFAULT '0' COMMENT '0 is unlocked, 1 is locked',
`groups`varchar(1000)DEFAULT NULL,
`comm`varchar(300)DEFAULT NULL,
PRIMARY KEY(`id`),
KEY`views_zone_idx_dns`(`views`,`zone`)
)ENGINE=InnoDB AUTO_INCREMENT=6005DEFAULT CHARSET=utf8。
whether domain name resolution information in a domain name management data set is expected information or not can be determined in a preview window of a DNS management platform, and if the domain name resolution information is the expected information, subsequent operation is carried out.
The embodiment of the disclosure utilizes the convenience of domain name management data set management, and a user can manage domain name resolution information in a domain name management data set through a DNS management platform.
Step S102, generating a first configuration file based on the domain name resolution information.
The first configuration file is used for domain name resolution of local domain name system service, and the structure of the first configuration file can refer to the structure of the cmdb _ dns _ table.
The embodiment of the disclosure provides the first configuration file capable of being locally accessed for the local DNS service, so as to locally provide domain name resolution information, avoid access pressure and resolution failure caused by adopting a database, and ensure the operating efficiency of the DNS service.
Optionally, after the first configuration file is generated based on the domain name resolution information, the method further includes the following steps:
step S102-1, the first configuration file is stored in an access directory of a local domain name system service.
The access directory of the local DNS service is a dedicated directory for the local DNS service, and the local DNS service can acquire domain name resolution information through a configuration file in the access directory. For example, in the linux system, the access directory of the local DNS service is "/dev/shm".
Step S103, the first configuration file is synchronously updated to a local version control system.
The local version control system is a version management tool in a DNS management platform, is used for storing and tracking the modification history of directories (or folders) and files, and can effectively and quickly realize the version management of various-scale projects, such as GIT and SVN; the GIT is an open-source distributed version control system, the SVN is also an open-source version control system, and the efficient management of a branch management system is adopted, namely the system is used for developing the same project by multiple persons to realize shared resources and finally centralized management; the BIND service can directly acquire the information of the configuration file through the GIT or the SVN.
Optionally, the step of synchronously updating the first configuration file to the local version control system includes the following steps:
and step S103-1, acquiring a local cache directory of the local version control system.
In general, a local version control system, includes: the system comprises a local state tree, a local version library, a local temporary storage area and a local cache directory. The local cache directory is dedicated to storing configuration files. The local version control system can embody the state and the information of the configuration file in the local cache directory in the state tree in the working area, can automatically monitor the state tree, and submits the change information in the state tree and the updated configuration file to the local temporary storage area.
And step S103-2, acquiring the second configuration file updated last time from the local cache directory.
The second configuration file is the configuration file that was last updated into the local version control system.
Step S103-3, judging whether the first configuration file and the second configuration file have different information.
Specifically, the method comprises the following steps:
step S103-3-1, respectively opening the first configuration file and the second configuration file.
Step S103-3-2, judging whether the distinguishing information exists in the information of the same file row of the first configuration file and the second configuration file.
For example, the sixth line of information is read from the first configuration file, and the sixth line of information is also read from the second configuration file, so as to determine whether the two lines of information have the distinguishing information.
During judgment, the information of each row in the two configuration files does not need to be compared and judged, and the existence of the distinguishing information can be determined only by identifying that one corresponding row is different in the judgment process.
And step S103-4, if the configuration file exists, the second configuration file is synchronously updated by using the first configuration file.
I.e. the content of the second profile is updated to the content of the first profile. The update may be performed by means of a copy overlay.
For example, in a program generated by adopting a Python programming language, whether the first configuration file and the second configuration file have the distinguishing information can be automatically judged through an rsync command of a linux system.
Further, after the determining whether the first configuration file and the second configuration file have the distinguishing information, the method further includes the following steps:
and step S103-5, if the difference information exists, acquiring the difference information, and storing the difference information and the first configuration file into a local temporary storage area of the local version control system.
For example, the local version control system is subordinate to the GIT, and can embody the state and information of the second configuration file in the local cache directory in a state tree in the working area, and the GIT can automatically monitor the state tree; by adopting the git add code adding command, the change information (namely the distinguishing information) in the state tree and the updated second configuration file can be submitted to the local temporary storage area.
And step S103-6, generating a unique value based on the distinguishing information.
Step S103-7, storing the distinguishing information and the unique value in a local version library of the local version control system.
For example, in GIT, the difference information can be used to generate a unique value (i.e. a 40-bit hash value) by the GIT commit command, which is equivalent to a snapshot for ensuring the integrity and authenticity of the difference information; for example, in the version rollback process, the distinguishing information of each version is obtained in a reverse order, a hash value is generated based on the distinguishing information of each version, the hash value is compared with the hash value stored in the local version library, if the two values are the same, the distinguishing information can be determined to be real and complete, and if the two values are different, the distinguishing information is modified, namely the distinguishing information is incomplete or untrue; the git commit command also saves the discriminative information and hash value into the local version repository of the local version control system.
Further, after the synchronous update of the first configuration file to the local version control system, the method further includes the following steps:
step S111, when the local domain name system service belongs to a distributed domain name system service and the distributed domain name system service adopts a multi-master mode, storing the configuration information in the first configuration file into a code warehouse of the local version control system under a local master branch.
As described in fig. 2, the local domain name system service is subordinate to the distributed domain name system service, and the distributed domain name system service employs a multi-master schema. It will be appreciated that a plurality of domain name system services are included in the distributed domain name system service, of which the local domain name system service is one. Each domain name system service works on a master server. Each master server manages one master branch as one master node. A version controller is included in each master branch. All master nodes have the same role, and all client requests are transmitted to the master server. In the conventional master/slave mode, the client requests are first transmitted to the slave server, and then transmitted to the master server by the slave server for configuration synchronization. The distributed domain name management server does not have the middle link of a slave server, so that the domain name management efficiency is improved.
Further, after the storing the configuration information in the first configuration file into a code warehouse of the local version control system under the local master branch when the local domain name system service belongs to the distributed domain name system service and the distributed domain name system service adopts the multi-master mode, the method further includes:
and step S121, pushing the configuration information to a code warehouse of the version control system under the branch of the remote master.
For example, as shown in fig. 2, in the GIT, the push task can be completed by a GIT push command, for example, the GIT push format is: git push < remote host name > < local branch name > < remote branch name >, then git push origin master: the reference/for/master is to push the configuration information of the local master branch to the code warehouse of the corresponding master branch (e.g., master branch 1, master branch 2, and master branch 3) in the remote server origin.
In another embodiment, the domain name management method further includes the steps of:
step S131, when the local domain name system service belongs to the distributed domain name system service and the distributed domain name system service adopts a multi-master mode, the updated configuration information is pulled from a code warehouse of the version control system under a preset remote master branch.
For example, as shown in FIG. 2, the preset remote master branch is master branch 3; the DNS management platform utilizes a Secure Shell protocol (SSh for short) to pull configuration information of a code warehouse in a master branch 3 of a preset remote server; for example, in GIT, a GIT pull command can complete the pull.
Step S132, generating a third configuration file based on the configuration information, where the third configuration file is used for domain name resolution of the local domain name system service.
Further, when the local domain name system service belongs to a distributed domain name system service and the distributed domain name system service adopts a multi-master mode, after the updated configuration information is pulled from a code warehouse of a version control system under a preset remote master branch, the method further includes the following steps:
step S133, storing the configuration information to a code warehouse of the local version control system under the local master branch.
Meanwhile, a third configuration file is stored in an access directory of the local domain name system service; and synchronously updating the configuration files in the local cache directory of the distributed version control system by utilizing the first configuration file. Thereby ensuring the integrity of the local configuration information.
In the distributed DNS service, the embodiment of generating the configuration file for the local DNS service and pushing the configuration file to other DNS services is provided, the embodiment of pulling the configuration file from other DNS services to update the configuration file of the local DNS service is also provided, and various schemes for managing domain names are provided for the distributed DNS service.
After synchronous updating, the DNS reload operation of the configuration file for each DNS service can be completed by using a DNS reload command provided by the DNS management platform, so that the configuration information in the updated configuration file becomes effective.
After the configuration information in the updated configuration file is validated, the domain name resolution information, e.g., the dig @ DNS service address www.xx.com (resolved domain name), is verified through a dig command line tool provided by the linux system.
The embodiment of the disclosure converts domain name resolution information in a database into a configuration file special for local DNS service, and synchronously updates the configuration file into a local version control system. The access pressure and the analytic faults caused by the adoption of the database are avoided, and the operation efficiency of the DNS service is ensured. Meanwhile, the convenience of database management is utilized, and a user can manage domain name resolution information stored in the database through the DNS management platform.
Corresponding to the first embodiment provided by the present disclosure, the present disclosure also provides a second embodiment, that is, a domain name management apparatus. Since the second embodiment is basically similar to the first embodiment, the description is simple, and the relevant portions should be referred to the corresponding description of the first embodiment. The device embodiments described below are merely illustrative.
Fig. 3 illustrates an embodiment of a domain name management apparatus provided by the present disclosure.
As shown in fig. 3, the present disclosure provides a domain name management apparatus including:
an obtaining unit 301, configured to obtain domain name resolution information from a domain name management data set;
a first generating unit 302, configured to generate a first configuration file based on the domain name resolution information, where the first configuration file is used for domain name resolution of a local domain name system service;
an updating unit 303, configured to update the first configuration file to a local version control system synchronously.
Optionally, the updating unit 303 includes:
the first obtaining subunit is configured to obtain a local cache directory of the local version control system;
the second obtaining subunit is configured to obtain a second configuration file updated last time from the local cache directory;
the first judging subunit is configured to judge whether there is distinguishing information between the first configuration file and the second configuration file;
and the updating subunit is used for synchronously updating the second configuration file by using the first configuration file if the second configuration file exists.
Optionally, the first determining subunit includes:
a file opening subunit, configured to open the first configuration file and the second configuration file, respectively;
and the second judging subunit is used for judging whether the distinguishing information exists in the information of the same file row of the first configuration file and the second configuration file.
Optionally, the updating unit 303 further includes:
and the temporary storage subunit is used for acquiring the distinguishing information and storing the distinguishing information and the first configuration file into a local temporary storage area of the local version control system if the distinguishing information exists.
Optionally, the updating unit 303 further includes:
a unique value generating subunit configured to generate a unique value based on the discrimination information;
a saving subunit, configured to save the difference information and the unique value in a local version library of the local version control system.
Optionally, the apparatus further comprises:
and the first storage unit is used for storing the configuration information in the first configuration file into a code warehouse of the local version control system under a local master branch when the local domain name system service belongs to the distributed domain name system service and the distributed domain name system service adopts a multi-master mode.
Optionally, the apparatus further comprises:
and the pushing unit is used for storing the configuration information in the first configuration file into a code warehouse of the local version control system under a local master branch and then pushing the configuration information into a code warehouse of a version control system under a remote master branch when the local domain name system service belongs to the distributed domain name system service and the distributed domain name system service adopts a multi-master mode.
Optionally, the apparatus further comprises:
the system comprises a pulling unit, a storage unit and a processing unit, wherein the pulling unit is used for pulling updated configuration information from a code warehouse of a version control system under a preset remote master branch when the local domain name system service belongs to a distributed domain name system service and the distributed domain name system service adopts a multi-master mode;
a second generating unit, configured to generate a third configuration file based on the configuration information, where the third configuration file is used for domain name resolution of the local domain name system service.
Optionally, the apparatus further comprises:
and the second storage unit is used for pulling updated configuration information from a code warehouse of the version control system under a preset remote master branch and then storing the configuration information into the code warehouse of the local version control system under a local master branch when the local domain name system service belongs to the distributed domain name system service and the distributed domain name system service adopts a multi-master mode.
Optionally, the apparatus further comprises:
and a third storing unit, configured to store the first configuration file into an access directory of the local domain name system service after generating the first configuration file based on the domain name resolution information.
The embodiment of the disclosure converts domain name resolution information in a database into a configuration file special for local DNS service, and synchronously updates the configuration file into a local version control system. The access pressure and the analytic faults caused by the adoption of the database are avoided, and the operation efficiency of the DNS service is ensured. Meanwhile, the convenience of database management is utilized, and a user can manage domain name resolution information stored in the database through the DNS management platform.
The present disclosure provides a third embodiment, that is, an electronic device, where the electronic device is used in a domain name management method, and the electronic device includes: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the one processor to cause the at least one processor to perform the domain name management method according to the first embodiment.
The fourth embodiment provides a computer storage medium, where computer-executable instructions are stored, and the computer-executable instructions may execute the domain name management method as described in the first embodiment.
Referring now to FIG. 4, shown is a schematic diagram of an electronic device suitable for use in implementing embodiments of the present disclosure. The terminal device in the embodiments of the present disclosure may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a vehicle terminal (e.g., a car navigation terminal), and the like, and a stationary terminal such as a digital TV, a desktop computer, and the like. The electronic device shown in fig. 4 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 4, the electronic device may include a processing means (e.g., a central processing unit, a graphics processor, etc.) 401 that may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)402 or a program loaded from a storage means 408 into a Random Access Memory (RAM) 403. In the RAM 403, various programs and data necessary for the operation of the electronic apparatus are also stored. The processing device 401, the ROM 402, and the RAM 403 are connected to each other via a bus 404. An input/output (I/O) interface 405 is also connected to bus 404.
Generally, the following devices may be connected to the I/O interface 405: input devices 406 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; an output device 407 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 408 including, for example, tape, hard disk, etc.; and a communication device 409. The communication means 409 may allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. While fig. 4 illustrates an electronic device having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a non-transitory computer readable medium, the computer program containing program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication device 409, or from the storage device 408, or from the ROM 402. The computer program performs the above-described functions defined in the methods of the embodiments of the present disclosure when executed by the processing device 401.
It should be noted that the computer readable medium in the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
In some embodiments, the clients, servers may communicate using any currently known or future developed network Protocol, such as HTTP (HyperText Transfer Protocol), and may interconnect with any form or medium of digital data communication (e.g., a communications network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.
Computer program code for carrying out operations for the present disclosure may be written in any combination of one or more programming languages, including but not limited to an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present disclosure may be implemented by software or hardware. Where the name of an element does not in some cases constitute a limitation on the element itself.
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), systems on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the disclosure herein is not limited to the particular combination of features described above, but also encompasses other embodiments in which any combination of the features described above or their equivalents does not depart from the spirit of the disclosure. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.
Further, while operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limitations on the scope of the disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.

Claims (17)

1. A method for domain name management, comprising:
acquiring domain name resolution information from a domain name management data set;
generating a first configuration file based on the domain name resolution information, wherein the first configuration file is used for domain name resolution of local domain name system service;
and synchronously updating the first configuration file to a local version control system.
2. The method of claim 1, wherein the synchronously updating the first configuration file to a local version control system comprises:
acquiring a local cache directory of the local version control system;
acquiring a second configuration file updated last time from the local cache directory;
judging whether the first configuration file and the second configuration file have distinguishing information or not;
and if so, synchronously updating the second configuration file by utilizing the first configuration file.
3. The method of claim 2, wherein the determining whether the first profile and the second profile have distinguishing information comprises:
respectively opening the first configuration file and the second configuration file;
and judging whether the distinguishing information exists in the information of the same file line of the first configuration file and the second configuration file.
4. The method according to claim 2, wherein after said determining whether there is distinguishing information between the first configuration file and the second configuration file, further comprising:
and if the first configuration file exists, acquiring the distinguishing information, and storing the distinguishing information and the first configuration file into a local temporary storage area of the local version control system.
5. The method of claim 4, further comprising, after saving the distinguishing information and the first configuration file to a local staging area of the local version control system:
generating a unique value based on the distinguishing information;
storing the distinguishing information and the unique value in a local version library of the local version control system.
6. The method of claim 1, further comprising, after said synchronously updating said first configuration file into a local version control system:
and when the local domain name system service belongs to a distributed domain name system service and the distributed domain name system service adopts a multi-master mode, storing the configuration information in the first configuration file into a code warehouse of the local version control system under a local master branch.
7. The method according to claim 6, wherein after saving the configuration information in the first configuration file to a code repository of the local version control system under a local master branch when the local domain name system service is subordinate to a distributed domain name system service and the distributed domain name system service adopts a multi-master mode, the method further comprises:
and pushing the configuration information to a code warehouse of a version control system under a remote master branch.
8. The method of claim 1, further comprising:
when the local domain name system service belongs to the distributed domain name system service and the distributed domain name system service adopts a multi-master mode, pulling updated configuration information from a code warehouse of a version control system under a preset remote master branch;
and generating a third configuration file based on the configuration information, wherein the third configuration file is used for domain name resolution of the local domain name system service.
9. The method according to claim 8, wherein after the pulling the updated configuration information from the code repository of the version control system under the preset remote master branch when the local domain name system service is subordinate to the distributed domain name system service and the distributed domain name system service adopts the multi-master mode, the method further comprises:
and storing the configuration information into a code warehouse of the local version control system under the branch of the local master.
10. The method of claim 1, after the generating a first configuration file based on the domain name resolution information, further comprising:
and saving the first configuration file to an access directory of the local domain name system service.
11. A domain name management apparatus, comprising:
the acquisition unit is used for acquiring domain name resolution information from the domain name management data set;
a first generating unit, configured to generate a first configuration file based on the domain name resolution information, where the first configuration file is used for domain name resolution of a local domain name system service;
and the updating unit is used for synchronously updating the first configuration file to a local version control system.
12. The apparatus of claim 11, wherein the updating unit comprises:
the first obtaining subunit is configured to obtain a local cache directory of the local version control system;
the second obtaining subunit is configured to obtain a second configuration file updated last time from the local cache directory;
the first judging subunit is configured to judge whether there is distinguishing information between the first configuration file and the second configuration file;
and the updating subunit is used for synchronously updating the second configuration file by using the first configuration file if the second configuration file exists.
13. The apparatus of claim 12, wherein the first determining subunit comprises:
a file opening subunit, configured to open the first configuration file and the second configuration file, respectively;
and the second judging subunit is used for judging whether the distinguishing information exists in the information of the same file row of the first configuration file and the second configuration file.
14. The apparatus of claim 12, wherein the updating unit further comprises:
and the temporary storage subunit is used for acquiring the distinguishing information and storing the distinguishing information and the first configuration file into a local temporary storage area of the local version control system if the distinguishing information exists.
15. The apparatus of claim 14, wherein the updating unit further comprises:
a unique value generating subunit configured to generate a unique value based on the discrimination information;
a saving subunit, configured to save the difference information and the unique value in a local version library of the local version control system.
16. A computer-readable storage medium, on which a computer program is stored, which program, when being executed by a processor, carries out the method according to any one of claims 1 to 10.
17. An electronic device, comprising:
one or more processors;
storage means for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to carry out the method of any one of claims 1 to 10.
CN202110218226.9A 2021-02-26 2021-02-26 Domain name management method, device, medium and electronic equipment Active CN113163023B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110218226.9A CN113163023B (en) 2021-02-26 2021-02-26 Domain name management method, device, medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110218226.9A CN113163023B (en) 2021-02-26 2021-02-26 Domain name management method, device, medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN113163023A true CN113163023A (en) 2021-07-23
CN113163023B CN113163023B (en) 2023-02-21

Family

ID=76883991

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110218226.9A Active CN113163023B (en) 2021-02-26 2021-02-26 Domain name management method, device, medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN113163023B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113660359A (en) * 2021-08-25 2021-11-16 北京搜房科技发展有限公司 Management method and device for domain name resolution record, storage medium and electronic equipment
CN114221935A (en) * 2021-12-17 2022-03-22 北京爱学习博乐教育科技有限公司 DNS management system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110238814A1 (en) * 2002-02-08 2011-09-29 William Pitts Method for creating global distributed namespace
CN106464745A (en) * 2015-06-30 2017-02-22 华为技术有限公司 Dns server, client and data synchronization method
CN108322542A (en) * 2018-02-12 2018-07-24 广州市贝聊信息科技有限公司 Data-updating method, system, device and computer readable storage medium
CN108551495A (en) * 2018-07-26 2018-09-18 杭州云缔盟科技有限公司 A kind of method for accessing domain name not using DNS Protocol or similar agreement

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110238814A1 (en) * 2002-02-08 2011-09-29 William Pitts Method for creating global distributed namespace
CN106464745A (en) * 2015-06-30 2017-02-22 华为技术有限公司 Dns server, client and data synchronization method
CN108322542A (en) * 2018-02-12 2018-07-24 广州市贝聊信息科技有限公司 Data-updating method, system, device and computer readable storage medium
CN108551495A (en) * 2018-07-26 2018-09-18 杭州云缔盟科技有限公司 A kind of method for accessing domain name not using DNS Protocol or similar agreement

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113660359A (en) * 2021-08-25 2021-11-16 北京搜房科技发展有限公司 Management method and device for domain name resolution record, storage medium and electronic equipment
CN113660359B (en) * 2021-08-25 2024-01-19 北京搜房科技发展有限公司 Domain name resolution record management method and device, storage medium and electronic equipment
CN114221935A (en) * 2021-12-17 2022-03-22 北京爱学习博乐教育科技有限公司 DNS management system
CN114221935B (en) * 2021-12-17 2023-12-19 北京爱学习博乐教育科技有限公司 DNS management system

Also Published As

Publication number Publication date
CN113163023B (en) 2023-02-21

Similar Documents

Publication Publication Date Title
US8667031B2 (en) Reuse of shared metadata across applications via URL protocol
US11036754B2 (en) Database table conversion
US10423342B1 (en) Scaling events for hosting hierarchical data structures
KR101376916B1 (en) Techniques to perform gradual upgrades
US20160092493A1 (en) Executing map-reduce jobs with named data
US20060106879A1 (en) Conflict resolution in a synchronization framework
US20170161291A1 (en) Database table conversion
CN113163023B (en) Domain name management method, device, medium and electronic equipment
US20100088271A1 (en) Hsm two-way orphan reconciliation for extremely large file systems
WO2019047976A1 (en) Network file management method, terminal and computer readable storage medium
US20210089538A1 (en) Processing data of a database system
US20130054639A1 (en) Globally unique identification of directory server changelog records
US10956140B2 (en) Software installation through an overlay file system
CN111818145B (en) File transmission method, device, system, equipment and storage medium
CN112948409A (en) Data processing method and device, electronic equipment and storage medium
US20230089710A1 (en) Data request server code and configuration file deployment
CN112947992B (en) Code version management method and device
CN112162987A (en) Data processing method, device, equipment and storage medium
CN111782614B (en) Data access method, device, equipment and storage medium
CN110795495A (en) Data processing method and device, electronic equipment and computer readable medium
CA3089289C (en) System and methods for loading objects from hash chains
WO2022206254A1 (en) So file repairing method and apparatus, device, and storage medium
US11645238B2 (en) Notifying a cache file system of changes to files in a source file system served from the cache file system
CN115098469A (en) Database migration method and device, electronic equipment and readable storage medium
CN114090124A (en) Data processing method, data processing device, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant