[go: up one dir, main page]

CN115842803B - File processing method, device and system - Google Patents

File processing method, device and system Download PDF

Info

Publication number
CN115842803B
CN115842803B CN202211329502.XA CN202211329502A CN115842803B CN 115842803 B CN115842803 B CN 115842803B CN 202211329502 A CN202211329502 A CN 202211329502A CN 115842803 B CN115842803 B CN 115842803B
Authority
CN
China
Prior art keywords
domain name
modification information
target
name modification
coroutine
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.)
Active
Application number
CN202211329502.XA
Other languages
Chinese (zh)
Other versions
CN115842803A (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.)
Sina Technology China Co Ltd
Original Assignee
Sina Technology China 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 Sina Technology China Co Ltd filed Critical Sina Technology China Co Ltd
Priority to CN202211329502.XA priority Critical patent/CN115842803B/en
Publication of CN115842803A publication Critical patent/CN115842803A/en
Application granted granted Critical
Publication of CN115842803B publication Critical patent/CN115842803B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本申请实施例提供了一种文件处理方法、装置及系统,该方法包括:获取与目标节点对应的至少一个域名修改信息;启动第一目标协程;利用所述第一目标协程对所述至少一个域名修改信息进行同步处理,所述同步处理包括对各所述域名修改信息同时进行处理,并生成与各所述域名修改信息对应的配置文件。

An embodiment of the present application provides a file processing method, device and system, the method comprising: obtaining at least one domain name modification information corresponding to a target node; starting a first target coroutine; using the first target coroutine to synchronously process 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.

Description

File processing method, device and system
Technical Field
The present invention relates to the field of internet technologies, and in particular, to a method, an apparatus, and a system for processing a file.
Background
The computer Domain name system (Domain NAME SYSTEM, DNS) is composed of a Domain name resolver and a Domain name server, which refers to a server that holds the Domain names and corresponding internet protocol addresses (Internet Protocol Address, IP) of all hosts in the network and has a function of converting the Domain names into IP addresses.
In some scenarios, the domain name needs to be modified and a configuration file is generated 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 a plurality of script files with front and back execution sequences and generate the configuration file according to the modified domain name. Thus, too many script files are not easy to manage and the modification of domain names and the generation of configuration files are inefficient.
Disclosure of Invention
The embodiment of the application aims to provide a file processing method, device and system, which are used for solving the problem of low efficiency of generating configuration files.
In order to solve the technical problems, the embodiment of the application is realized as follows:
In a first aspect, an embodiment of the present application provides a file processing method, including obtaining at least one domain name modification information corresponding to a target node, starting a first target cooperative procedure, and performing synchronization processing on the at least one domain name modification information by using the first target cooperative procedure, where the synchronization processing includes processing each domain name modification information simultaneously, and generating a configuration file corresponding to each domain name modification information.
In a second aspect, an embodiment of the present application provides a file processing apparatus, where the file processing apparatus includes an obtaining module configured to obtain at least one domain name modification information corresponding to a target node, a starting module configured to start a first target cooperative procedure, and a processing module configured to perform synchronization processing on the at least one domain name modification information by using the first target cooperative procedure, where the synchronization processing includes processing each domain name modification information simultaneously, and generating a configuration file corresponding to each domain name modification information.
In a third aspect, an embodiment of the present application provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete communication with each other through the bus, where the memory is configured to store a computer program, and where the processor is configured to execute the program stored in the memory, to implement the steps as described in the first aspect.
In a fourth aspect, embodiments of the present application provide a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the method steps according to the first aspect.
In a fifth aspect, an embodiment of the present application provides a chip, the chip including a processor and a communication interface, the communication interface being coupled to the processor, the processor being configured to execute a program or instructions to implement the method steps according to the first aspect.
In a sixth aspect, an embodiment of the present application provides a file processing system, including a front end module, performing domain name modification on the front end module, a distributed key value pair storage system and a relational database, where 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 modified domain name modification information, and a DNS server, which is connected to the distributed key value pair storage system and the relational database, respectively, and is used to perform the steps of acquiring at least one domain name modification information corresponding to a target node, starting a first target protocol, performing synchronization processing on the at least one domain name modification information by using the first target protocol, where the synchronization processing includes processing each domain name modification information at the same time, and generating a configuration file corresponding to each domain name modification information, and the relational database is also used to store a generation state of the configuration file.
According to the technical scheme provided by the embodiment of the application, the configuration file generating tasks of the domain name modification information can be simultaneously executed in batches by starting the first target cooperative program, the task of generating the configuration file by each domain name modification information is used as an independent operation unit, the operation success or failure of each task does not determine the operation of other tasks, the plurality of domain name modification information is simultaneously processed by the first target cooperative program, the configuration file corresponding to each domain name modification information is generated, and the generation efficiency of the configuration file is improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments described in the present application, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
Fig. 1A and fig. 1B are schematic structural diagrams of a file processing system according to an embodiment of the present application;
FIG. 2 is a schematic flow chart of a file processing method according to an embodiment of the present application;
FIG. 3 is a schematic diagram of a functional module of a document processing device according to an embodiment of the present application;
Fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The embodiment of the application aims to provide a file processing method, device and system, which improve the efficiency of generating configuration files.
In order to make the technical solution of the present application better understood by those skilled in the art, the technical solution of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, shall fall within the scope of the application.
As described above, in some scenarios, it is required to modify a domain name and generate a profile for the domain name after modification, where the process of modifying the domain name and generating the profile modifies the domain name through a plurality of script files having a front-back execution order and generates the profile according to the domain name after modification. For example, the process of completing a domain name modification may be that the user stores the modified domain name information in the database through a front end or application program interface (Application Program Interface, API), then uses a background_task.php script to scan the modified domain name information in the database at regular time and determine the task of generating a configuration file for the domain name information, then calls an API (e.g. read.php) provided by a Web DNS server, then webDNS calls a dns_export.php script to check and export the configuration file, and finally calls a web_dnsreload.php to push the configuration file to the DNS server. Therefore, too many script files are not easy to manage, the domain name modification and configuration file generation are performed in a serial mode among scripts, only one task is completed, the next task can be performed, and the configuration file generation efficiency is low. In addition, the generated history configuration files can only be manually managed, such as compressed, deleted and the like, so that the management efficiency of the history configuration files is low, and in addition, the security of loading the configuration files is low, and the risk of being tampered exists.
In order to solve the above technical problems, embodiments of the present application provide a method, an apparatus, and a system for processing a file, and the method, the apparatus, and the system for processing a file provided by the embodiments of the present application are described in detail below with reference to the accompanying drawings.
Referring to fig. 1A, fig. 1A is a schematic structural diagram of a file processing system 100 according to an embodiment of the present application, a front end module 101 performs domain name modification externally through the front end module 101, and specifically, performing domain name modification externally through the front end module 101 may be performing domain name modification by a user through a front end and an API in the front end module 101.
The front-end module 101 is respectively connected with the distributed key value pair storage system 102 and the relational database 103, and the distributed key value pair storage system 102 and the relational database 103 are both used for storing the modified domain name modification information.
The DNS server 104 is connected to the distributed key value pair storage system 102 and the relational database 103, and is used for executing the steps of the file processing method, namely, acquiring at least one domain name modification information corresponding to a target node, starting a first target cooperative program, and performing synchronous processing on the at least one domain name modification information by utilizing the first target cooperative program, wherein the synchronous processing comprises the steps of simultaneously processing all the domain name modification information and generating a configuration file corresponding to all the domain name modification information. The relational database 103 is further configured to store a generation status of the configuration file.
Specifically, as shown in fig. 1B, the front-end module 101 includes a front-end and an API, a distributed key value pair storage system 102 (etcd), a relational database 103 (mysql), and a DNS server 104, etc., a profile generator (agent) is deployed on the DNS server 104, and the DNS server 104 includes a task center taskcenter.
The user can modify the domain name through the front end and the API, write the modified domain name modification information into the distributed key value pair storage system 102 (etcd) and the relational database 103 (mysql), after the agent deployed on the DNS server 104 monitors the task of having the domain name modification information on the etcd, generate a configuration file by using the domain name modification information and can call the component powerDNS provided by the DNS server 104 to take effect on the generated configuration file, finally the agent can transmit the generation state of the configuration file to the taskcenter center of the DNS server 104, and write the generation state of the configuration file into the relational database (mysql) by the taskcenter center, thereby completing the modification of the domain name in the DNS server 104 and the generation process of the configuration file. The generation state of the configuration file may include domain name modification information (modified domain name information) and the like.
The file processing method mentioned in fig. 1A and fig. 1B is further described in detail below with reference to fig. 2, and as shown in fig. 2, an embodiment of the present application provides a file processing method, where an execution body of the method may be a server, where the server may be an independent server or a server cluster formed by a plurality of servers. The file processing method specifically includes the following steps S201 to S205:
in step S201, at least one domain name modification information corresponding to the target node is acquired.
Specifically, the target node may be a DNS server of the deployment agent, and corresponds to one DNS server, where the DNS server corresponds to a plurality of domain name information, and after at least one domain name information on the DNS server is modified, the domain name modification information is obtained, where the domain name modification information refers to the modified domain name information. Therefore, when at least one piece of domain name modification information corresponding to the target node is acquired, all the domain name information on the target node can be monitored, and when at least one piece of domain name information is changed, the changed domain name information is used as domain name modification information.
Further, before acquiring the at least one domain name modification information corresponding to the target node, the method further comprises acquiring node information of the target node, wherein the node information comprises a plurality of domain name information on the target node, and acquiring the at least one domain name modification information corresponding to the target node comprises monitoring a node state of the target node and the plurality of domain name information, and acquiring domain name modification information with domain name information changed from the plurality of domain name information under the condition that the node state is in a normal working state.
Specifically, the node information refers to all domain name information on the DNS server, all domain name information on the DNS server is stored in the distributed key value pair storage system (etcd), the agent deployed on the DNS server acquires all domain name information of the DNS server from the distributed key value pair storage system (etcd), then the agent deployed on the DNS server starts to monitor the node state of the DNS server, the node state of the etcd and the domain name information on the DNS server in the distributed key value pair storage system (etcd), and if the state of the DNS server is a normal working state and domain name change information exists in the domain name information, the domain name information which is changed is taken as domain name modification information. The node state refers to a normal working state and an abnormal state (such as failure, offline and the like) of the DNS server or the etcd, the domain name change information on the DNS server refers to domain name modification information for modifying a domain name of the DNS server, and the domain name modification information refers to domain name information after modification. Further, in order to secure the domain name modification information and domain name information stored in the distributed key value pair storage system (etcd), the domain name modification information and domain name information may be stored in an encrypted manner.
In step S203, a first target coroutine is started.
Specifically, the first target coroutine is a process of processing the domain name modification information to generate a configuration file corresponding to the domain name modification information, and the first target coroutine may load the generated configuration file.
In step S205, at least one domain name modification information is synchronized using the first target coroutine.
The synchronization processing comprises the steps of processing the domain name modification information simultaneously and generating configuration files corresponding to the domain name modification information.
Specifically, the first target coroutine may be a agent-initiated profile generation loader deployed on a DNS server for processing domain name modification information pulled from a distributed key value pair storage system (etcd), generating a profile, and loading the profile. If the domain name modification information pulled from the distributed key value pair storage system (etcd) is encrypted, the first target cooperative program firstly decrypts and verifies the pulled domain name modification information, specifically, the integrity, accuracy and consistency of the domain name modification information can be verified, and then the verified domain name modification information is utilized to generate a configuration file and load the configuration file. Therefore, by checking the domain name modification information, the safety and reliability of the domain name modification information are ensured, and the domain name modification information is prevented from being tampered.
Further, when there are multiple domain name modification information, the method adopted in the related art is to call a series of script files with sequential execution order to process domain name modification information in sequence to generate a configuration file, that is, only after a configuration file is generated for one domain name modification information by a series of script files with sequential execution order, the next domain name modification information can be continuously processed to generate the configuration file, so that the generation efficiency of the configuration file is lower. In the embodiment of the application, the configuration file generating tasks of the domain name modification information can be simultaneously executed in batches by starting the first target cooperative program, the task of generating the configuration file by each domain name modification information is used as an independent operation unit, the success or failure of the operation of each task can not determine the operation of other tasks, the plurality of domain name modification information are simultaneously processed by the first target cooperative program, the configuration file corresponding to each domain name modification information is generated, and the generation efficiency of the configuration file is improved.
In one possible implementation, the synchronizing of the at least one domain name modification information by the first target cooperative program includes determining a domain name corresponding to the at least one domain name modification information, merging the plurality of first domain name modification information corresponding to the same domain name into a first processing task if the same domain name corresponds to the plurality of first domain name modification information, wherein the domain name modification information except the first domain name modification information in the at least one domain name modification information is second domain name modification information, one second domain name modification information corresponds to one second processing task, and synchronizing the first processing tasks and the second processing tasks by the first target cooperative program.
Specifically, for tasks in the same batch, the tasks in the same domain name can be combined, that is, when a plurality of domain name modification information exists in the same domain name, the plurality of domain name modification information in the same domain name is combined, so that a plurality of tasks for generating configuration files are combined into one processing task, the amount of tasks which can be processed by the first target cooperative process in unit time is more, the time consumed for processing the tasks in the same batch is less, and the generation efficiency of the configuration files is further improved. For example, in the tasks of the same batch, a plurality of domain name modification information is corresponding to the domain name a, a plurality of domain name modification information is corresponding to the domain name B, the plurality of domain name modification information under the domain name a is combined, so that a plurality of tasks generating configuration files of the domain name a are combined into one processing task, a plurality of domain name modification information under the domain name B is combined, so that a plurality of tasks generating configuration files of the domain name B are combined into one processing task, and the two combined processing tasks are processed by the first target cooperative program, so that the amount of tasks which can be processed by the first target cooperative program in unit time is more.
According to the technical scheme disclosed by the embodiment of the application, the configuration file generation tasks of the domain name modification information can be simultaneously executed in batches by starting the first target cooperative program, the task of generating the configuration file by each domain name modification information is used as an independent operation unit, the success or failure of the operation of each task does not determine the operation of other tasks, the plurality of domain name modification information are simultaneously processed by the first target cooperative program, the configuration file corresponding to each domain name modification information is generated, and the generation efficiency of the configuration file is improved.
In one possible implementation, after the first target cooperative program is started, the method further comprises the steps of starting a second target cooperative program, and processing the history configuration file by utilizing the second target cooperative program, wherein the processing comprises at least one of compression and deletion.
Specifically, the second target coroutine may be an agent-initiated pwonerDNS log processor deployed on a DNS server, for which the user may compress, delete, etc. the historically effective configuration files at custom time intervals. That is, after the second target coroutine is started, the configuration files effective in the history are periodically compressed, deleted and the like at the user-defined time interval, so that manual operation is not needed, and the management and processing efficiency of the history configuration files is improved.
In one possible implementation, after the first target cooperative program is started, the method further comprises starting a third target cooperative program, and after the at least one domain name modification information is synchronously processed by the first target cooperative program, the method further comprises sending the generation state of the configuration file to a target database by the third target cooperative program.
Specifically, the third target coroutine is a agent-initiated heartbeat transmitter deployed on the DNS server for maintaining communication with the DNS server's task center tasckcenter, and the generated state of the configuration file is sent and stored in the above-mentioned relational database (mysql) through the DNS server's task center tasckcenter. The generation state of the configuration file includes, but is not limited to, whether the configuration file is successfully generated, domain name modification information, and the like.
In one possible implementation, after the first target cooperative program is started, the method further comprises starting a fourth target cooperative program, and sending an error log file generated by the detection target node by using the fourth target cooperative program.
Specifically, the fourth target coroutine may be a log scanner started by the agent deployed on the DNS server, where the log scanner informs the user of the detected error log file generated on the DNS server in a short message and/or mail manner, so that the user can know the working state of the DNS server in time, and can sense in time.
In one possible implementation manner, after the synchronization processing is performed on the at least one domain name modification information by using the first target protocol, the method further comprises generating a first version number corresponding to the target node, wherein the first version number corresponds to first domain name data, acquiring a second version number of the target node when the node state of the target node is abnormal, the second version number corresponds to second domain name data, acquiring domain name increment data between the second domain name data and the first domain name data when the second version number is greater than the first version number, and acquiring domain name total data of the target node when the second version number is less than the first version number.
Specifically, after each time the agent deployed on the DNS server successfully completes loading the configuration file corresponding to the domain name modification information, a local version number (first version number) is locally generated, when the DNS server fails (node state is abnormal) or the etcd fails to cause the agent deployed on the DNS server to be in a disconnection with the etcd or an unexpected failure process is terminated, the agent can be restarted again, the current version number (second version number) of the etcd corresponding to the local version number and the target node can be directly compared, if the current version number is greater than the local version number, the local data can be changed only for incremental data, and if the current version number is less than the local version number, the local data can be changed for full data. Further, it should be noted that, in order to avoid the problem of data failure caused by excessively long version number time, a certain preset time limit (for example, 1 hour) may 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 local data may be changed for the incremental data, and 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 local data may be changed by pulling the full amount of data. Therefore, when the agent deployed on the DNS server is restarted, whether the incremental data or the full data is pulled according to different conditions can be selected, and the restarting efficiency of the agent on the DNS server is improved.
According to the file processing method provided by the above embodiment, based on the same technical concept, the embodiment of the present application further provides a file processing device, and fig. 3 is a schematic diagram of module components of the file processing device provided by the embodiment of the present application, where the file processing device is configured to execute the file processing method described in the above embodiment, and as shown in fig. 3, the file processing device 300 includes an obtaining module 301 configured to obtain at least one domain name modification information corresponding to a target node, a starting module 302 configured to start a first target protocol, and a processing module 303 configured to perform synchronization processing on the at least one domain name modification information by using the first target protocol, where the synchronization processing includes processing each domain name modification information simultaneously, and generating a configuration file corresponding to each domain name modification information.
According to the technical scheme disclosed by the embodiment of the application, the configuration file generation tasks of the domain name modification information can be simultaneously executed in batches by starting the first target cooperative program, the task of generating the configuration file by each domain name modification information is used as an independent operation unit, the success or failure of the operation of each task does not determine the operation of other tasks, the plurality of domain name modification information are simultaneously processed by the first target cooperative program, the configuration file corresponding to each domain name modification information is generated, and the generation efficiency of the configuration file is improved.
In a possible implementation manner, the obtaining module 301 is further configured to obtain node information of the target node, where the node information includes a plurality of domain name information on the target node, monitor a node state of the target node and the plurality of domain name information, and obtain domain name modification information that changes domain name information from the plurality of domain name information when the node state is in a normal working state.
In one possible implementation, the starting module 302 is further configured to start the second target cooperative distance, and the processing module 303 is further configured to process the history configuration file by using the second target cooperative distance, where the processing includes at least one of compression and deletion.
In a possible implementation, the starting module 302 is further configured to start a third target protocol, and the processing module 303 is further configured to send the generated state of the configuration file to the target database by using the third target protocol.
In a possible implementation, the starting module 302 is further configured to start a fourth target cooperative program, and the processing module 303 is further configured to send, by using the fourth target cooperative program, an error log file generated by the detection target node.
In one possible implementation manner, the processing module 303 is further configured to determine a domain name corresponding to at least one domain name modification information, combine the plurality of first domain name modification information corresponding to the same domain name into one first processing task in the case that the same domain name corresponds to the plurality of first domain name modification information, and combine the domain name modification information except the first domain name modification information in the at least one domain name modification information into one second processing task in the at least one domain name modification information, wherein the one second domain name modification information corresponds to the one second processing task, and perform synchronous processing on each first processing task and each second processing task by using the first target protocol.
In a possible implementation manner, the processing module 303 is further configured to generate a first version number corresponding to the target node, where the first version number corresponds to first domain name data, obtain a second version number of the target node when the node state of the target node is abnormal, where the second version number corresponds to second domain name data, obtain domain name incremental data between the second domain name data and the first domain name data when the second version number is greater than the first version number, and obtain domain name full-size data of the target node when the second version number is less than the first version number.
The file processing device provided by the embodiment of the present application can implement each process in the embodiment corresponding to the file processing method, and in order to avoid repetition, a detailed description is omitted here.
It should be noted that, the file processing device provided by the embodiment of the present application and the file processing method provided by the embodiment of the present application are based on the same inventive concept and have the same technical effects, so that the implementation of the embodiment may refer to the implementation of the foregoing file processing method, and the repetition is omitted.
According to the file processing method provided by the above embodiment, based on the same technical concept, the embodiment of the present application further provides an electronic device, where the electronic device is configured to execute the file processing method described above, and fig. 4 is a schematic structural diagram of an electronic device implementing each embodiment of the present application, as shown in fig. 4. The electronic device may vary considerably in configuration or performance and may include one or more processors 401 and memory 402, where the memory 402 may store one or more stored applications or data. Wherein the memory 402 may be transient storage or persistent storage. The application programs stored in memory 402 may include one or more modules (not shown), each of which may include a series of computer-executable instructions for use in an electronic device. Still further, the processor 401 may be arranged to communicate with the memory 402 and execute a series of computer executable instructions in the memory 402 on an 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/output interfaces 405, and one or more keyboards 406.
In this embodiment, the electronic device includes a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete communication with each other through the bus, the memory is configured to store a computer program, and the processor is configured to execute the program stored in the memory, to implement the steps described in the foregoing method embodiments.
It should be noted that, the electronic device provided by the embodiment of the present application and the file processing method provided by the embodiment of the present application are based on the same inventive concept and have the same technical effects, so the implementation of the embodiment may refer to the implementation of the foregoing file processing method, and the repetition is omitted.
The embodiments of the present application provide a computer readable storage medium having a computer program stored thereon, which when executed by a processor, implements the steps as described in the method embodiments above.
It should be noted that, the computer readable storage medium provided by the embodiment of the present application and the file processing method provided by the embodiment of the present application are based on the same inventive concept and have the same technical effects, so that the implementation of the embodiment may refer to the implementation of the foregoing file processing method, and the repetition is omitted.
In a specific embodiment, the embodiment of the application provides a chip, which includes a processor and a communication interface, where the communication interface is coupled to the processor, and the processor is configured to execute a program or instructions to implement the steps described in the above method embodiment.
It should be noted that, the chip provided by the embodiment of the present application and the file processing method provided by the embodiment of the present application are based on the same inventive concept and have the same technical effects, so the implementation of the embodiment may refer to the implementation of the foregoing file processing method, and the repetition is not repeated.
It will be apparent to those skilled in the art that embodiments of the present invention may be provided as a method, apparatus, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In one typical configuration, the electronic device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, etc., such as Read Only Memory (ROM) or flash memory (flashRAM). Memory is an example of computer-readable media.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer 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 disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transitorymedia), such as modulated data signals and carrier waves.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises an element.
It will be apparent to those skilled in the art that embodiments of the present application may be provided as a method, apparatus, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The foregoing is merely exemplary of the present application and is not intended to limit the present application. Various modifications and variations of the present application will be apparent to those skilled in the art. Any modification, equivalent replacement, improvement, etc. which come within the spirit and principles of the application are to be included in the scope of the claims of the present application.

Claims (10)

1.一种文件处理方法,其特征在于, 包括:1. A file processing method, characterized in that it comprises: 获取与目标节点对应的至少一个域名修改信息,所述域名修改信息为被修改后的域名信息;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 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, using the domain name modification information after the verification is completed, generates a configuration file and loads the configuration file. 2.根据权利要求1所述的文件处理方法,其特征在于,在所述获取与目标节点对应的至少一个域名修改信息之前,所述方法还包括: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 comprises: 获取所述目标节点的节点信息,所述节点信息包括所述目标节点上的多个域名信息;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.根据权利要求1所述的文件处理方法,其特征在于,在所述启动第一目标协程之后,所述方法还包括:3. The file processing method according to claim 1, characterized in that after starting the first target coroutine, the method further comprises: 启动第二目标协程;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.根据权利要求1所述的文件处理方法,其特征在于,在所述启动第一目标协程之后,所述方法还包括:4. The file processing method according to claim 1, characterized in that after starting the first target coroutine, the method further comprises: 启动第三目标协程;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.根据权利要求1所述的文件处理方法,其特征在于,在所述启动第一目标协程之后,所述方法还包括:5. The file processing method according to claim 1, characterized in that after starting the first target coroutine, the method further comprises: 启动第四目标协程;Start the fourth target coroutine; 利用所述第四目标协程发送检测所述目标节点时生成的错误日志文件。The error log file generated when the target node is detected is sent using the fourth target coroutine. 6.根据权利要求1所述的文件处理方法,其特征在于,所述利用所述第一目标协程对所述至少一个域名修改信息进行同步处理包括:6. The file processing method according to claim 1, wherein the step of synchronously processing the at least one domain name modification information by using the first target coroutine comprises: 确定所述至少一个域名修改信息对应的域名;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.根据权利要求1所述的文件处理方法,其特征在于,在所述利用所述第一目标协程对所述至少一个域名修改信息进行同步处理之后,所述方法还包括:7. The file processing method according to claim 1, characterized in that after using the first target coroutine to synchronously process the at least one domain name modification information, the method further comprises: 生成与所述目标节点对应的第一版本号,所述第一版本号对应第一域名数据;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.一种文件处理装置,其特征在于,包括:8. A file processing device, comprising: 获取模块,用于获取与目标节点对应的至少一个域名修改信息,所述域名修改信息为被修改后的域名信息;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 generating a configuration file using the domain name modification information after the verification is completed and loading the configuration file. 9.一种文件处理系统,其特征在于,包括:9. 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, 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; DNS服务器,所述DNS服务器分别与所述分布式键值对存储系统和关系型数据库连接,用于执行以下步骤: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 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, using the domain name modification information after the verification is completed, generates a configuration file and loads the configuration file. 10.一种电子设备,其特征在于,包括:10. An electronic device, comprising: 处理器;processor; 用于存储所述处理器可执行指令的存储器;a memory for storing instructions executable by the processor; 其中,所述处理器被配置为执行所述指令,以实现如权利要求1至7中任一项所述的文件处理方法。The processor is configured to execute the instructions to implement the file processing method according to any one of claims 1 to 7.
CN202211329502.XA 2022-10-27 2022-10-27 File processing method, device and system Active CN115842803B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211329502.XA CN115842803B (en) 2022-10-27 2022-10-27 File processing method, device and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211329502.XA CN115842803B (en) 2022-10-27 2022-10-27 File processing method, device and system

Publications (2)

Publication Number Publication Date
CN115842803A CN115842803A (en) 2023-03-24
CN115842803B true CN115842803B (en) 2025-03-07

Family

ID=85576582

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211329502.XA Active CN115842803B (en) 2022-10-27 2022-10-27 File processing method, device and system

Country Status (1)

Country Link
CN (1) CN115842803B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116614470A (en) * 2023-03-21 2023-08-18 新浪技术(中国)有限公司 Domain name modification method, system, electronic equipment and storage medium
CN116527693A (en) * 2023-04-07 2023-08-01 济南浪潮数据技术有限公司 Method, system, equipment and storage medium for accessing file storage system into domain

Family Cites Families (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2658218A1 (en) * 2012-04-27 2013-10-30 Verisign, Inc. Bulk management of registry objects
CN102902558B (en) * 2012-09-11 2016-05-11 新浪网技术(中国)有限公司 Project script file upgrades system and method, script file merges method and apparatus
US20160110436A1 (en) * 2014-10-21 2016-04-21 Bank Of America Corporation Redundant data integration platform
CN104461578B (en) * 2014-12-26 2018-09-11 广州品唯软件有限公司 The automatic merging method of code and system
CN106210159B (en) * 2015-05-07 2019-12-13 阿里巴巴集团控股有限公司 Domain name resolution method and device
CN105069074B (en) * 2015-07-30 2018-11-20 江苏天联信息科技发展有限公司 policy configuration file processing method, device and system
CN106506729B (en) * 2017-01-11 2019-11-19 中国互联网络信息中心 DNS policy analysis method and device based on DNS view
CN108540583B (en) * 2018-01-30 2022-02-25 北京三快在线科技有限公司 Domain name issuing method and device in CDN system and electronic equipment
CN110457010B (en) * 2019-08-12 2023-08-22 网易(杭州)网络有限公司 Method and device for batch changing task list based on collaboration platform
US20210119871A1 (en) * 2019-10-21 2021-04-22 Citrix Systems, Inc. Proxy configuration for multiple networks
CN113032035B (en) * 2019-12-24 2022-07-12 Oppo广东移动通信有限公司 Configuration file processing method and device and electronic equipment
CN112054941B (en) * 2020-09-07 2023-03-24 平安科技(深圳)有限公司 Automatic testing method, device and equipment for private domain name and storage medium
CN113660359B (en) * 2021-08-25 2024-01-19 北京搜房科技发展有限公司 Domain name resolution record management method and device, storage medium and electronic equipment
CN114070844B (en) * 2021-11-05 2024-05-14 统信软件技术有限公司 File downloading method and device, computing equipment and storage medium

Also Published As

Publication number Publication date
CN115842803A (en) 2023-03-24

Similar Documents

Publication Publication Date Title
CN111124755B (en) Fault recovery method and device for cluster nodes, electronic equipment and storage medium
CN110825420B (en) Method, device, equipment and storage medium for updating configuration parameters of distributed cluster
CN110489421B (en) Data storage method, apparatus, computer readable storage medium and computer device
US20200134163A1 (en) Monitoring device components using distributed ledger
CN115842803B (en) File processing method, device and system
CN111339551B (en) Data verification method and related device and equipment
CN110555041A (en) Data processing method, data processing device, computer equipment and storage medium
CN102708150A (en) Method, device and system for asynchronously copying data
CN109462507B (en) Configuration updating method, device and system and electronic equipment
WO2019204429A1 (en) Backup and restore validation
CN110990190A (en) Distributed file lock fault processing method, system, terminal and storage medium
CN115114112A (en) Data synchronization method and device
CN104765652A (en) Data backup and data recovery method and device
CN113094211A (en) Backup data processing method and device
US10613922B2 (en) Synchronously generating diagnostic data
CN113268278A (en) Configuration verification synchronization method and device, electronic device and storage medium
CN119946041A (en) File transmission method, device, electronic device, and storage medium
WO2021012562A1 (en) Blockchain data cleaning method and apparatus, computer device, and storage medium
CN115334000B (en) Data transmission method, device, equipment and medium based on multi-control storage system
CN114301777A (en) Configuration data update method, device, system and non-volatile storage medium
CN108255906B (en) Data additional recording method and device
CN115292314B (en) Sequence number generation method, device, computer equipment and storage medium
CN111966532A (en) Database management method and device, electronic equipment and medium
CN116015666B (en) Method and device for generating proxy certificate, storage medium and electronic equipment
CN110633164B (en) Message-oriented middleware fault recovery method and device

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