File processing method, device and system
By starting the first target coroutine and processing multiple domain name modification information concurrently, the problem of low efficiency in domain name modification and configuration file generation in the prior art is solved, and more efficient configuration file generation and management is achieved.
Patent Information
- Application Number
- CN202211329502.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-27
- Publication Date
- 2025-03-07
- Estimated Expiration
- 2042-10-27
AI Technical Summary
In the prior art, the process of modifying domain names and generating configuration files is low in efficiency, too many script files are not easy to manage, and the generation of configuration files is low in efficiency.
By starting the first target coroutine, the configuration file generation task of multiple domain name modification information is implemented in batches. The task of generating configuration files for each domain name modification information is an independent operating unit. The first target coroutine processes the multiple domain name modification information simultaneously to generate configuration files corresponding to the various domain name modification information.
It improves the efficiency of configuration file generation, simplifies the process of domain name modification and configuration file generation, and reduces management complexity.
Smart Images

Figure CN115842803B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of Internet technology, and in particular to a file processing method, device and system. Background Art
[0002] The computer Domain Name System (DNS) is composed of a domain name resolver and a domain name server. A domain name server refers to a server that stores the domain names and corresponding Internet Protocol addresses (IP) of all hosts in the network and has the function of converting domain names into IP addresses.
[0003] In some scenarios, it is necessary to modify the domain name and generate a configuration file for the modified domain name, wherein the process of modifying the domain name and generating the configuration file is to modify the domain name through multiple script files with a sequential execution order and generate the configuration file according to the modified domain name. In this way, too many script files are not only difficult to manage, but also the efficiency of modifying the domain name and generating the configuration file is low. Summary of the invention
[0004] The purpose of the embodiments of the present application is to provide a file processing method, device and system to solve the problem of low efficiency in generating configuration files.
[0005] In order to solve the above technical problems, the embodiments of the present application are implemented as follows:
[0006] In a first aspect, an embodiment of the present application provides a file processing method, comprising: obtaining at least one domain name modification information corresponding to a target node; starting a first target coroutine; and using the first target coroutine to synchronously process the at least one domain name modification information, wherein the synchronous processing includes simultaneously processing each of the domain name modification information and generating a configuration file corresponding to each of the domain name modification information.
[0007] In a second aspect, an embodiment of the present application provides a file processing device, which includes: an acquisition module for acquiring at least one domain name modification information corresponding to a target node; a startup module for starting a first target coroutine; a processing module for using the first target coroutine to synchronously process the at least one domain name modification information, wherein the synchronous processing includes simultaneously processing each of the domain name modification information and generating a configuration file corresponding to each of the domain name modification information.
[0008] In a third aspect, an embodiment of the present application provides an electronic device, comprising a processor, a communication interface, a memory and a communication bus; wherein the processor, the communication interface and the memory communicate with each other through a bus; the memory is used to store computer programs; and the processor is used to execute the programs stored in the memory to implement the steps described in the first aspect.
[0009] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the method steps described in the first aspect are implemented.
[0010] In a fifth aspect, an embodiment of the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the method steps described in the first aspect.
[0011] In a sixth aspect, an embodiment of the present application provides a file processing system, comprising: a front-end module, through which domain name modification is performed externally; a distributed key-value pair storage system and a relational database, the front-end module being connected to the distributed key-value pair storage system and the relational database, respectively, and the distributed key-value pair storage system and the relational database being used to store the modified domain name modification information; a DNS server, the DNS server being connected to the distributed key-value pair storage system and the relational database, respectively, and being used to perform the following steps: obtaining at least one domain name modification information corresponding to a target node; starting a first target coroutine; using the first target coroutine to perform synchronous processing on the at least one domain name modification information, the synchronous processing comprising simultaneously processing each of the domain name modification information, and generating a configuration file corresponding to each of the domain name modification information; the relational database is also used to store the generation status of the configuration file.
[0012] It can be seen from the technical solution provided by the above embodiments of the present application that by starting the first target coroutine, configuration file generation tasks for multiple domain name modification information can be executed concurrently in batches. The task of generating a configuration file for each domain name modification information is used as an independent running unit. The success or failure of the running of each task will not determine the running of other tasks. Multiple domain name modification information are processed simultaneously through the first target coroutine to generate configuration files corresponding to each domain name modification information, thereby improving the efficiency of configuration file generation. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0014] Figure 1A and Figure 1B A schematic diagram of the structure of a file processing system provided in an embodiment of the present application;
[0015] Figure 2 A flowchart of a file processing method provided in an embodiment of the present application;
[0016] Figure 3 A schematic diagram of the functional modules of a file processing device provided in an embodiment of the present application;
[0017] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0018] The purpose of the embodiments of the present application is to provide a file processing method, device and system to improve the efficiency of generating configuration files.
[0019] In order to enable those skilled in the art to better understand the technical solutions in the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0020] As mentioned above, in some scenarios, it is necessary to modify the domain name and generate a configuration file for the modified domain name, wherein the process of modifying the domain name and generating the configuration file is to modify the domain name through multiple script files with a front-to-back execution order and generate the configuration file according to the modified domain name. For example, the process of completing a domain name modification can be to save the modified domain name information to the database through the front end or the application program interface (Application Program Interface, API) for the user, and then use the background_task.php script to regularly scan the modified domain name information in the database and determine the task of generating the configuration file for the domain name information, and then call the API (such as reload.php) provided by the World Wide Web (Web) DNS server, and then the webDNS calls the dns_export.php script to check and export the configuration file, and finally calls web_dnsreload.php to push the configuration file to the DNS server. In this way, too many script files are not only not easy to manage, but also the modification of the domain name and the generation of the configuration file are serially executed between each script, and only one task can be completed before the next task, and the generation efficiency of the configuration file is low. In addition, the generated historical configuration files can only be managed manually, such as compression, deletion, etc. The management efficiency of the historical configuration files is low. In addition, the security of the loaded configuration files is low and there is a risk of tampering.
[0021] In order to solve the above technical problems, an embodiment of the present application provides a file processing method, device and system. The following is a detailed description of a file processing method, device and system provided by an embodiment of the present application in conjunction with the accompanying drawings.
[0022] First, see Figure 1A , Figure 1A A structural diagram of a file processing system 100 disclosed in an embodiment of the present application, a front-end module 101, and a domain name is modified externally through the front-end module 101; specifically, the domain name modification performed externally through the front-end module 101 can be that the user modifies the domain name through the front end and API in the front-end module 101.
[0023] The distributed key-value pair storage system 102 and the relational database 103, the front-end module 101 is connected to the distributed key-value pair storage system 102 and the relational database 103 respectively, and the distributed key-value pair storage system 102 and the relational database 103 are both used to store the modified domain name modification information.
[0024] The DNS server 104 is connected to the distributed key-value pair storage system 102 and the relational database 103 respectively, and is used to execute the following steps of the file processing method: obtaining at least one domain name modification information corresponding to the target node; starting the first target coroutine; using the first target coroutine to synchronously process the at least one domain name modification information, the synchronous processing includes processing each domain name modification information at the same time, and generating a configuration file corresponding to each domain name modification information. The relational database 103 is also used to store the generation status of the configuration file.
[0025] Specifically, if Figure 1B As shown, the front-end module 101 includes a front-end and an API, a distributed key-value storage system 102 (etcd), a relational database 103 (mysql), and a DNS server 104, etc. A configuration file generation program (agent) is deployed on the DNS server 104, and the DNS server 104 includes a task center taskcenter.
[0026] The user can modify the domain name through the front end and API, and write the modified domain name modification information to the distributed key-value pair storage system 102 (etcd) and the relational database 103 (mysql) at the same time. After the agent deployed on the DNS server 104 monitors the task with domain name modification information in etcd, it generates a configuration file using the domain name modification information and can call the component powerDNS provided by the DNS server 104 to make the generated configuration file effective. Finally, the agent can transmit the generation status of the configuration file to the task center of the DNS server 104, and the task center will write the generation status of the configuration file into the relational database (mysql), completing the modification of the domain name in the DNS server 104 and the generation process of the configuration file. Among them, the generation status of the configuration file may include domain name modification information (modified domain name information), etc.
[0027] Combine the following Figure 2 For the above Figure 1A and Figure 1B The mentioned file processing methods are further explained in detail, such as Figure 2 As shown, the embodiment of the present application provides a file processing method, the execution subject of the method can be a server, wherein the server can be an independent server or a server cluster composed of multiple servers. The file processing method can specifically include the following steps S201-S205:
[0028] In step S201, at least one domain name modification information corresponding to a target node is obtained.
[0029] Specifically, the target node can be the DNS server where the agent is deployed, corresponding to a DNS server, which corresponds to multiple domain name information. After at least one domain name information on the DNS server is modified, the domain name modification information is obtained, and the domain name modification information refers to the modified domain name information. Therefore, when obtaining at least one domain name modification information corresponding to the target node, all domain name information on the target node can be monitored, and when at least one domain name information changes, the changed domain name information is used as the domain name modification information.
[0030] Furthermore, before obtaining at least one domain name modification information corresponding to the target node, the method also includes: obtaining node information of the target node, the node information including multiple domain name information on the target node; obtaining at least one domain name modification information corresponding to the target node includes: monitoring the node status and multiple domain name information of the target node, and when the node status is in a normal working state, obtaining the domain name modification information of the domain name information that has changed from the multiple domain name information.
[0031] Specifically, node information refers to all domain name information on the DNS server. All domain name information on the DNS server will be stored in the distributed key-value storage system (etcd). The agent deployed on the DNS server will obtain all domain name information of the DNS server from the distributed key-value storage system (etcd). Then, the agent deployed on the DNS server will start to monitor the node status of the DNS server, the node status of etcd, and the domain name information on the DNS server in the distributed key-value storage system (etcd). If the status of the DNS server is a normal working state, and there is domain name change information in the domain name information, the changed domain name information is used as the domain name modification information. Among them, the node status refers to the normal working state and abnormal state (such as failure, offline, etc.) of the DNS server or etcd, the domain name change information on the DNS server refers to the domain name modification information of the domain name of the DNS server, and the domain name modification information refers to the modified domain name information. Further, in order to ensure the security of the domain name modification information and domain name information stored in the distributed key-value storage system (etcd), the domain name modification information and domain name information can be encrypted and stored.
[0032] In step S203, the first target coroutine is started.
[0033] Specifically, the first target coroutine is a process for processing the above-mentioned domain name modification information to generate a configuration file corresponding to the domain name modification information. In addition, the first target coroutine can also load the generated configuration file.
[0034] In step S205, at least one domain name modification information is synchronously processed using the first target coroutine.
[0035] The synchronous processing includes processing each domain name modification information at the same time and generating a configuration file corresponding to each domain name modification information.
[0036] Specifically, the first target coroutine can be a configuration file generation loader started by an agent deployed on a DNS server, which is used to process the domain name modification information pulled from the distributed key-value storage system (etcd), generate configuration files, and load configuration files. Among them, if the domain name modification information pulled from the distributed key-value storage system (etcd) is encrypted, the first target coroutine first decrypts and verifies the pulled domain name modification information, specifically, it can verify the integrity, accuracy and consistency of the domain name modification information, and then use the domain name modification information after verification to generate a configuration file and load the configuration file. In this way, by verifying the domain name modification information, the security and reliability of the domain name modification information are guaranteed to avoid tampering.
[0037] Furthermore, when there are multiple domain name modification information, the method adopted in the related art is to call a series of script files with a sequential execution order to process the domain name modification information in turn and generate a configuration file. That is to say, only after a configuration file is generated for a domain name modification information through a series of script files with a sequential execution order, can the next domain name modification information be processed to generate a configuration file. In this way, the generation efficiency of the configuration file is low. In the embodiment of the present application, by starting the first target coroutine, the configuration file generation tasks for multiple domain name modification information can be executed in batches at the same time. The task of generating a configuration file for each domain name modification information is used as an independent running unit. The success or failure of the operation of each task will not determine the operation of other tasks. The first target coroutine is used to process multiple domain name modification information at the same time to generate configuration files corresponding to each domain name modification information, thereby improving the generation efficiency of the configuration file.
[0038] In a possible implementation, synchronously processing at least one domain name modification information using the first target coroutine includes: determining a domain name corresponding to at least one domain name modification information; when the same domain name corresponds to multiple first domain name modification information, merging the multiple first domain name modification information corresponding to the same domain name into a first processing task, the domain name modification information other than the first domain name modification information in at least one domain name modification information is the second domain name modification information, and one second domain name modification information corresponds to one second processing task; and synchronously processing each first processing task and each second processing task using the first target coroutine.
[0039] Specifically, for the tasks of the same batch, the tasks under the same domain name can be merged, that is, when there are multiple domain name modification information under the same domain name, the multiple domain name modification information under the same domain name are merged, so that the multiple configuration file generation tasks are merged into one processing task, so that the first target coroutine can process more tasks per unit time, and the time consumed for the processing tasks of the same batch is less, which further improves the efficiency of configuration file generation. For example, for the tasks of the same batch, there are multiple domain name modification information corresponding to domain name A, and there are multiple domain name modification information corresponding to domain name B. The multiple domain name modification information under domain name A is merged, so that the multiple configuration file generation tasks of domain name A are merged into one processing task, and the multiple domain name modification information under domain name B is merged, so that the multiple configuration file generation tasks of domain name B are merged into one processing task, so that the first target coroutine processes these two merged processing tasks, so that the first target coroutine can process more tasks per unit time.
[0040] The technical solution disclosed in the embodiment of the present application can concurrently execute batches of configuration file generation tasks for multiple domain name modification information by starting the first target coroutine. The task of generating a configuration file for each domain name modification information serves as an independent running unit. The success or failure of the running of each task will not determine the running of other tasks. The first target coroutine processes multiple domain name modification information at the same time to generate configuration files corresponding to each domain name modification information, thereby improving the generation efficiency of the configuration files.
[0041] In a possible implementation, after starting the first target coroutine, the method further includes: starting the second target coroutine; and processing the historical configuration file using the second target coroutine, wherein the processing includes at least one of the following: compression; deletion.
[0042] Specifically, the second target coroutine can be the pwonerDNS log processor started by the agent deployed on the DNS server. For this log processor, the user can customize the time interval to compress and delete the historically effective configuration files. In other words, after starting the second target coroutine, the historically effective configuration files are compressed and deleted periodically at the user-defined time interval, without manual operation, which improves the management and processing efficiency of the historical configuration files.
[0043] In one possible implementation, after starting the first target coroutine, the method further includes: starting a third target coroutine; after synchronizing at least one domain name modification information using the first target coroutine, the method further includes: using the third target coroutine to send the generation status of the configuration file to the target database.
[0044] Specifically, the third target coroutine is a heartbeat transmitter started by an agent deployed on the DNS server, which is used to maintain communication with the task center taskcenter of the DNS server, and send and store the configuration file generation status to the above-mentioned relational database (mysql) through the task center taskcenter of the DNS server. The configuration file generation status includes but is not limited to whether the configuration file is successfully generated, domain name modification information, etc.
[0045] In a possible implementation, after starting the first target coroutine, the method further includes: starting a fourth target coroutine; and using the fourth target coroutine to send an error log file generated by the detection target node.
[0046] Specifically, the fourth target coroutine can be a log scanner started by an agent deployed on the DNS server. The log scanner notifies the user of the erroneous log files generated on the detected DNS server by SMS and / or email, so that the user can understand the working status of the DNS server in time and perceive it in time.
[0047] In one possible implementation, after synchronizing at least one domain name modification information using the first target coroutine, the method also includes: generating a first version number corresponding to the target node, the first version number corresponding to the first domain name data; when the node state of the target node is abnormal, obtaining the second version number of the target node, the second version number corresponding to the second domain name data; when the second version number is greater than the first version number, obtaining the domain name incremental data between the second domain name data and the first domain name data; when the second version number is less than the first version number, obtaining the full domain name data of the target node.
[0048] Specifically, after the agent deployed on the DNS server successfully completes the loading and effectiveness of the configuration file corresponding to the domain name modification information, a local version number (first version number) will be generated locally. When the DNS server fails (node status is abnormal) or the above-mentioned etcd fails, causing the agent deployed on the DNS server to lose connection with etcd or the process terminates due to an unexpected failure, when the agent is restarted again, the local version number can be directly compared with the current version number (second version number) of etcd corresponding to the target node. If the current version number is greater than the local version number, only the incremental data can be changed to the local data. If the current version number is less than the local version number, the full data can be changed to the local data. Further, it is worth noting that in order to avoid the problem of data invalidation caused by the version number being too long, a certain preset time limit (such as 1 hour) can be set for the version number. If the current version number is greater than the local version number, and the time limit of the local version number does not exceed the preset time limit, the incremental data can be changed to the local data. If the current version number is greater than the local version number, but the time limit of the local version number exceeds the preset time limit, the full data is pulled to change the local data. In this way, when the agent deployed on the DNS server is restarted, it can choose to pull incremental data or full data according to different situations, which improves the restart efficiency of the agent on the DNS server.
[0049] Corresponding to the file processing method provided in the above embodiment, based on the same technical concept, the embodiment of the present application also provides a file processing device, Figure 3 Schematic diagram of the module composition of the file processing device provided in the embodiment of the present application, wherein the file processing device is used to execute the file processing method described in the above embodiment, such as Figure 3 As shown, the file processing device 300 includes: an acquisition module 301, used to obtain at least one domain name modification information corresponding to the target node; a startup module 302, used to start the first target coroutine; a processing module 303, used to use the first target coroutine to synchronously process at least one domain name modification information, and the synchronous processing includes processing each domain name modification information at the same time and generating a configuration file corresponding to each domain name modification information.
[0050] Through the technical solution disclosed in the embodiment of the present application, by starting the first target coroutine, configuration file generation tasks for multiple domain name modification information can be executed concurrently in batches. The task of generating a configuration file for each domain name modification information is treated as an independent running unit. The success or failure of the running of each task will not determine the running of other tasks. Multiple domain name modification information are processed simultaneously through the first target coroutine to generate configuration files corresponding to each domain name modification information, thereby improving the generation efficiency of the configuration file.
[0051] In a possible implementation, the acquisition module 301 is also used to obtain node information of the target node, the node information includes multiple domain name information on the target node; monitor the node status and multiple domain name information of the target node, and when the node status is in a normal working state, obtain the domain name modification information of the domain name information that has changed from the multiple domain name information.
[0052] In a possible implementation, the startup module 302 is further used to start the second target coroutine, and the processing module 303 is further used to process the historical configuration file using the second target coroutine, and the processing includes at least one of the following: compression; deletion.
[0053] In a possible implementation, the starting module 302 is further used to start the third target coroutine; the processing module 303 is further used to send the generation status of the configuration file to the target database by using the third target coroutine.
[0054] In a possible implementation, the starting module 302 is further used to start the fourth target coroutine; the processing module 303 is further used to send the error log file generated by the detection target node using the fourth target coroutine.
[0055] In a possible implementation, the processing module 303 is also used to determine the domain name corresponding to at least one domain name modification information; when the same domain name corresponds to multiple first domain name modification information, the multiple first domain name modification information corresponding to the same domain name are merged into a first processing task, and the domain name modification information other than the first domain name modification information in at least one domain name modification information is the second domain name modification information, and one second domain name modification information corresponds to one second processing task; and the first target coroutine is used to synchronously process each first processing task and each second processing task.
[0056] In a possible implementation, the processing module 303 is also used to generate a first version number corresponding to the target node, the first version number corresponding to the first domain name data; when the node status of the target node is abnormal, the second version number of the target node is obtained, and the second version number corresponds to the second domain name data; when the second version number is greater than the first version number, the domain name incremental data between the second domain name data and the first domain name data is obtained; when the second version number is less than the first version number, the full domain name data of the target node is obtained.
[0057] The file processing device provided in the embodiment of the present application can implement each process in the embodiment corresponding to the above-mentioned file processing method. To avoid repetition, it will not be described here.
[0058] It should be noted that the file processing device provided in the embodiment of the present application and the file processing method provided in the embodiment of the present application are based on the same inventive concept and have the same technical effect. Therefore, the specific implementation of this embodiment can refer to the implementation of the aforementioned file processing method, and the repeated parts will not be repeated.
[0059] Corresponding to the file processing method provided in the above embodiment, based on the same technical concept, the embodiment of the present application also provides an electronic device, which is used to execute the above file processing method. Figure 4 A schematic diagram of the structure of an electronic device for implementing various embodiments of the present invention is shown in FIG. Figure 4 As shown. The electronic device may have relatively large differences due to different configurations or performances, and may include one or more processors 401 and memory 402, and the memory 402 may store one or more storage applications or data. Among them, the memory 402 can be a short-term storage or a persistent storage. The application stored in the memory 402 may include one or more modules (not shown in the figure), and each module may include a series of computer executable instructions in the electronic device. Furthermore, the processor 401 can be configured to communicate with the memory 402 to execute a series of computer executable instructions in the memory 402 on the electronic device. The electronic device may also include one or more power supplies 403, one or more wired or wireless network interfaces 404, one or more input and output interfaces 405, and one or more keyboards 406.
[0060] In this embodiment, the electronic device includes a processor, a communication interface, a memory and a communication bus; wherein the processor, the communication interface and the memory communicate with each other through the bus; the memory is used to store computer programs; the processor is used to execute the programs stored in the memory to implement the steps described in the above method embodiment.
[0061] It should be noted that the electronic device provided in the embodiment of the present application and the file processing method provided in the embodiment of the present application are based on the same inventive concept and have the same technical effect. Therefore, the specific implementation of this embodiment can refer to the implementation of the aforementioned file processing method, and the repeated parts will not be repeated.
[0062] An embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps described in the above method embodiment are implemented.
[0063] It should be noted that the computer-readable storage medium provided in the embodiment of the present application and the file processing method provided in the embodiment of the present application are based on the same inventive concept and have the same technical effect. Therefore, the specific implementation of this embodiment can refer to the implementation of the aforementioned file processing method, and the repeated parts will not be repeated.
[0064] In a specific embodiment, an embodiment of the present application provides a chip, which includes a processor and a communication interface, the communication interface and the processor are coupled, and the processor is used to run programs or instructions to implement the steps described in the above method embodiment.
[0065] It should be noted that the chip provided in the embodiment of the present application and the file processing method provided in the embodiment of the present application are based on the same inventive concept and have the same technical effect. Therefore, the specific implementation of this embodiment can refer to the implementation of the aforementioned file processing method, and the repeated parts will not be repeated.
[0066] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, devices, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0067] The present invention is described with reference to the flowchart and / or block diagram of the method, device (system), and computer program product according to the embodiment of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the process and / or box in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device produce a device for implementing the functions specified in one process or multiple processes in the flowchart and / or one box or multiple boxes in the block diagram.
[0068] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device that implements the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.
[0069] These computer program instructions may also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, whereby the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.
[0070] In a typical configuration, an electronic device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0071] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0072] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0073] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0074] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, devices or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0075] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.
Claims
1. A file processing method, characterized in that: include: Acquire at least one domain name modification information corresponding to the target node, wherein the domain name modification information is the modified domain name information; Start the first target coroutine; Using the first target coroutine to synchronously process the at least one domain name modification information, the synchronous processing includes simultaneously processing each domain name modification information and generating a configuration file corresponding to each domain name modification information; The first target coroutine is used to process the domain name modification information pulled from the distributed key-value pair storage system, generate a configuration file, and load the configuration file, and the domain name modification information pulled from the distributed key-value pair storage system is encrypted; The step of synchronously processing the at least one domain name modification information by using the first target coroutine and generating a configuration file corresponding to each domain name modification information includes: The first target coroutine decrypts and verifies the pulled domain name modification information, wherein the verification includes verifying the integrity, accuracy and consistency of the domain name modification information; And, generate a configuration file using the domain name modification information after verification and load the configuration file.
2. The file processing method according to claim 1, characterized in that: Before obtaining at least one domain name modification information corresponding to the target node, the method further includes: Acquire node information of the target node, wherein the node information includes information of multiple domain names on the target node; The obtaining of at least one domain name modification information corresponding to the target node includes: The node status of the target node and the multiple domain name information are monitored, and when the node status is in a normal working state, domain name modification information of domain name information changes is obtained from the multiple domain name information.
3. The file processing method according to claim 1, characterized in that: After starting the first target coroutine, the method further includes: Start the second target coroutine; The historical configuration file is processed using the second target coroutine, wherein the processing includes at least one of the following: compression; delete.
4. The file processing method according to claim 1, characterized in that: After starting the first target coroutine, the method further includes: Start the third target coroutine; After the at least one domain name modification information is synchronously processed by the first target coroutine, the method further includes: The generation status of the configuration file is sent to the target database using the third target coroutine.
5. The file processing method according to claim 1, characterized in that: After starting the first target coroutine, the method further includes: Start the fourth target coroutine; The error log file generated when the target node is detected is sent using the fourth target coroutine.
6. The file processing method according to claim 1, characterized in that: The synchronous processing of the at least one domain name modification information by using the first target coroutine includes: Determine a domain name corresponding to the at least one domain name modification information; In the case where the same domain name corresponds to multiple first domain name modification information, the multiple first domain name modification information corresponding to the same domain name are merged into one first processing task, the domain name modification information other than the first domain name modification information in the at least one domain name modification information is the second domain name modification information, and one second domain name modification information corresponds to one second processing task; The first target coroutine is used to synchronously process each of the first processing tasks and each of the second processing tasks.
7. The file processing method according to claim 1, characterized in that: After the at least one domain name modification information is synchronously processed by the first target coroutine, the method further includes: Generate a first version number corresponding to the target node, the first version number corresponding to first domain name data; When the node state of the target node is abnormal, obtaining a second version number of the target node, where the second version number corresponds to second domain name data; When the second version number is greater than the first version number, obtaining domain name increment data between the second domain name data and the first domain name data; When the second version number is smaller than the first version number, the full domain name data of the target node is obtained.
8. A file processing device, characterized in that: include: An acquisition module, used to acquire at least one domain name modification information corresponding to a target node, wherein the domain name modification information is the modified domain name information; A startup module, used to start the first target coroutine; A processing module, configured to synchronously process the at least one domain name modification information using the first target coroutine, wherein the synchronous processing includes simultaneously processing each domain name modification information and generating a configuration file corresponding to each domain name modification information; The first target coroutine is used to process the domain name modification information pulled from the distributed key-value pair storage system, generate a configuration file, and load the configuration file, and the domain name modification information pulled from the distributed key-value pair storage system is encrypted; The processing module is specifically used to decrypt and verify the domain name modification information pulled through the first target coroutine, wherein the verification includes verifying the integrity, accuracy and consistency of the domain name modification information; And, generate a configuration file using the domain name modification information after verification and load the configuration file.
9. A file processing system, characterized in that: include: A front-end module, through which domain name modification is performed externally; A distributed key-value pair storage system and a relational database, wherein the front-end module is connected to the distributed key-value pair storage system and the relational database respectively, and the distributed key-value pair storage system and the relational database are both used to store the modified domain name modification information; A DNS server is connected to the distributed key-value pair storage system and the relational database respectively, and is used to perform the following steps: Acquire at least one domain name modification information corresponding to the target node, wherein the domain name modification information is the modified domain name information; Start the first target coroutine; Using the first target coroutine to synchronously process the at least one domain name modification information, the synchronous processing includes simultaneously processing each domain name modification information and generating a configuration file corresponding to each domain name modification information; The relational database is also used to store the generation status of the configuration file; The first target coroutine is used to process the domain name modification information pulled from the distributed key-value pair storage system, generate a configuration file, and load the configuration file, and the domain name modification information pulled from the distributed key-value pair storage system is encrypted; The step of synchronously processing the at least one domain name modification information by using the first target coroutine and generating a configuration file corresponding to each domain name modification information includes: The first target coroutine decrypts and verifies the pulled domain name modification information, wherein the verification includes verifying the integrity, accuracy and consistency of the domain name modification information; And, generate a configuration file using the domain name modification information after verification and load the configuration file.
10. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the file processing method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Bulk management of registry objects
US20130290269A1