Configuration data synchronization method and device for multiple devices
By synchronizing the basic configuration of basic configuration in the multi -device network environment and packaging the configuration data as a message, the problem of synchronization data in the existing technologies is too long, and the fast and efficient configuration data synchronization is realized.
Patent Information
- Application Number
- CN202411486453.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-23
- Publication Date
- 2025-01-28
AI Technical Summary
When configuring data synchronization in a multi-device network environment, the existing technology faces the problem of too many configuration items resulting in too long execution time and affecting the user experience. Especially when only some configurations need to be modified, all configuration files still need to be processed. Time-consuming and resource consuming.
By obtaining the configuration change request, the storage configuration data is in memory, and the basic configuration consistency of multiple devices is checked. When passing the consistency check, pack the configuration data as a message and send it to multiple devices for configuration data synchronization.
Without affecting network traffic, quickly applying configuration changes into all devices will greatly reduce the synchronization time, avoiding network failures caused by configuration differences.
Smart Images

Figure CN119383079A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer information processing, and in particular to a configuration data synchronization method and apparatus for multiple devices. Background Art
[0002] With the rapid development of network technology, the scale of networks continues to expand, and the deployment of network equipment has become increasingly complex. At present, the deployment of network equipment in the existing network is usually not a single device, but a cluster or dual-machine redundant system composed of multiple devices. The main purpose of this redundant backup design is to ensure the normal operation of network traffic and avoid service interruption when encountering environmental abnormalities.
[0003] In daily operation and maintenance, when a configuration change is required for a network device, the change is often made on a certain device first. After testing and verification to ensure that these changes will not have a negative impact on the entire network or environment, the changes are synchronized to other redundant devices. Although this incremental synchronization operation method ensures the safety of operation to a certain extent, with the continuous expansion of network scale and the complexity of applications, device configuration has become more and more cumbersome and large. For example, the number of configuration items such as routing tables and packet filtering can reach more than 100,000. In this complex environment, existing incremental synchronization technologies face significant challenges.
[0004] The incremental synchronization function of the existing technology mainly relies on the full synchronization solution, that is, all configuration modules of the current device generate a complete configuration file and send it to other devices. Other redundant devices will identify the differences and apply the changes by comparing the received full configuration file with their own configuration. However, this solution takes too long to execute when there are too many configuration items, affecting the user experience. In particular, when only part of the configuration needs to be modified, the entire configuration file still needs to be processed, which is time-consuming and resource-intensive.
[0005] Therefore, a new method and apparatus for synchronizing configuration data of multiple devices is needed.
[0006] The above information disclosed in the Background section is only for enhancement of understanding of the background of the present application and therefore it may contain information that does not constitute the prior art that is already known to a person of ordinary skill in the art. Summary of the invention
[0007] In view of this, the present application provides a configuration data synchronization method and apparatus for multiple devices, which can quickly apply configuration changes to all devices without affecting network traffic, greatly reducing synchronization time and avoiding network failures caused by configuration differences.
[0008] Other features and advantages of the present application will become apparent from the following detailed description, or may be learned in part by the practice of the present application.
[0009] According to one aspect of the present application, a method for synchronizing configuration data for multiple devices is proposed, the method comprising: obtaining a configuration change request, the configuration change request including configuration data to be changed; storing the configuration data in a memory; checking the basic configuration consistency of multiple devices in a current environment; when the consistency check passes, packaging the configuration data into a message; and sending the message to multiple devices in the current environment, so that the multiple devices synchronize configuration data based on the message.
[0010] In an exemplary embodiment of the present application, it also includes: generating the configuration change request by means of a command line serial port; and / or generating the configuration change request by means of a management page network protocol.
[0011] In an exemplary embodiment of the present application, it also includes: when the consistency check fails, generating full configuration data; sending the full configuration data to multiple devices in the current environment, so that the multiple devices synchronize configuration data.
[0012] In an exemplary embodiment of the present application, obtaining a configuration change request includes: obtaining a network request; and determining whether the network request is a configuration change request based on a keyword or a request type.
[0013] In an exemplary embodiment of the present application, checking the basic configuration consistency of multiple devices in the current environment includes: generating a basic configuration; sending a consistency check request to multiple devices in the current environment; and the device performing a consistency self-check based on its own configuration change record and the basic configuration.
[0014] In an exemplary embodiment of the present application, it also includes: when the configurations of multiple devices in the current environment are consistent, generating the basic configuration; when a configuration change occurs in any device in the current environment, generating a configuration change record.
[0015] In an exemplary embodiment of the present application, packaging the configuration data into a message includes: splicing the configuration data into a message according to the device's own attributes.
[0016] In an exemplary embodiment of the present application, the message is sent to multiple devices in the current environment so that the multiple devices synchronize configuration data based on the message, including: sending the message to multiple devices in the current environment; the devices synchronize configuration based on the configuration data and update the basic configuration.
[0017] In an exemplary embodiment of the present application, it also includes: after the configuration data synchronization is completed, determining whether the synchronization result is normal; when the synchronization result is abnormal, sending the full configuration data to multiple devices in the current environment, so that multiple devices synchronize the configuration data.
[0018] According to one aspect of the present application, a configuration data synchronization device for multiple devices is proposed, and the device includes: a request module, used to obtain a configuration change request, wherein the configuration change request includes configuration data to be changed; a storage module, used to store the configuration data in a memory; a detection module, used to check the basic configuration consistency of multiple devices in the current environment; a packaging module, used to package the configuration data into a message when the consistency check passes; and a synchronization module, used to send the message to multiple devices in the current environment, so that the multiple devices synchronize the configuration data based on the message.
[0019] According to one aspect of the present application, an electronic device is proposed, which includes: one or more processors; a storage device for storing one or more programs; when the one or more programs are executed by the one or more processors, the one or more processors implement the method as described above.
[0020] According to one aspect of the present application, a computer-readable medium is provided, on which a computer program is stored. When the program is executed by a processor, the method described above is implemented.
[0021] According to the configuration data synchronization method and apparatus for multiple devices of the present application, by obtaining a configuration change request, the configuration change request includes configuration data to be changed; storing the configuration data in a memory; checking the basic configuration consistency of multiple devices in the current environment; when the consistency check passes, packaging the configuration data into a message; and sending the message to multiple devices in the current environment, so that the multiple devices synchronize the configuration data based on the message, the configuration change can be quickly applied to all devices without affecting network traffic, thereby greatly reducing the synchronization time and avoiding network failures caused by configuration differences.
[0022] It should be understood that the foregoing general description and the following detailed description are exemplary only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] The above and other objects, features and advantages of the present application will become more apparent by describing in detail the exemplary embodiments thereof with reference to the accompanying drawings. The accompanying drawings described below are only some embodiments of the present application, and it is clear to a person skilled in the art that other accompanying drawings can be obtained from these accompanying drawings without creative effort.
[0024] Figure 1 The present invention is a system block diagram showing a method and apparatus for synchronizing configuration data of multiple devices according to an exemplary embodiment.
[0025] Figure 2 The invention is a flowchart showing a method for synchronizing configuration data of multiple devices according to an exemplary embodiment.
[0026] Figure 3 The present invention is a flowchart of a method for synchronizing configuration data of multiple devices according to another exemplary embodiment.
[0027] Figure 4 The present invention is a flowchart of a method for synchronizing configuration data of multiple devices according to another exemplary embodiment.
[0028] Figure 5 The present invention is a flowchart of a method for synchronizing configuration data of multiple devices according to another exemplary embodiment.
[0029] Figure 6 The invention is a block diagram showing an apparatus for synchronizing configuration data of multiple devices according to an exemplary embodiment.
[0030] Figure 7 It is a block diagram of an electronic device according to an exemplary embodiment.
[0031] Figure 8 It is a block diagram of a computer-readable medium according to an exemplary embodiment. DETAILED DESCRIPTION
[0032] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in many forms and should not be construed as limited to the embodiments set forth herein; rather, these embodiments are provided so that this application will be comprehensive and complete and will fully convey the concepts of the example embodiments to those skilled in the art. The same reference numerals in the figures represent the same or similar parts, and thus their repeated description will be omitted.
[0033] In addition, described feature, structure or characteristic can be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present application. However, those skilled in the art will appreciate that the technical scheme of the present application can be put into practice without one or more of the specific details, or other methods, components, devices, steps, etc. can be adopted. In other cases, known methods, devices, realizations or operations are not shown or described in detail to avoid blurring the various aspects of the application.
[0034] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities may be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.
[0035] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps can be decomposed, and some operations / steps can be combined or partially combined, so the actual execution order may change according to actual conditions.
[0036] It should be understood that although the terms first, second, third, etc. may be used herein to describe various components, these components should not be limited by these terms. These terms are used to distinguish one component from another component. Therefore, the first component discussed below can be referred to as the second component without departing from the teachings of the concepts of the present application. As used herein, the term "and / or" includes any one of the associated listed items and all combinations of one or more.
[0037] Those skilled in the art will appreciate that the drawings are merely schematic diagrams of example embodiments, and the modules or processes in the drawings are not necessarily necessary for implementing the present application, and therefore cannot be used to limit the scope of protection of the present application.
[0038] The technical abbreviations involved in this application are explained as follows:
[0039] Hot standby: Dual-machine state backup, that is, deploying two firewalls, and completing the negotiation of the active and standby states of the firewalls through the Redundancy Device Management Protocol (RDMP). After determining the active and standby firewalls, the active firewall forwards the business, while the standby firewall is in a monitoring state. At the same time, the active firewall will periodically send status information and information that needs to be backed up to the standby firewall. When the active firewall fails, the standby firewall will promptly take over the business on the active firewall.
[0040] Dual-machine host: A device that performs service forwarding in a dual-machine hot standby environment.
[0041] Hot standby: A device in a hot standby environment that is in monitoring mode and ready to take over from the main machine at any time.
[0042] Device cluster: Two or more devices form a device cluster that can support services. Services can be configured synchronously in this device group and achieve high-availability switching.
[0043] Web (World Wide Web) is the global wide area network, also known as the World Wide Web. It is a global, dynamic, interactive, cross-platform distributed graphic information system based on hypertext and HTTP. It is a network service built on the Internet, providing a graphical, easy-to-access, intuitive interface for viewers to find and browse information on the Internet. The documents and hyperlinks organize the information nodes on the Internet into an interconnected mesh structure.
[0044] HTTP is a standard for client and server requests and responses (TCP). HTTP messages are text-oriented and are divided into two categories: request messages and response messages. Because the configuration is mainly aimed at request messages, this article mainly introduces request messages.
[0045] The http request message consists of four parts: request line, message header, blank line, and request body.
[0046] (1) Request line: The request line consists of the request method field, URL field, and HTTP protocol version field, which are separated by spaces, for example: GET / index.html HTTP / 1.1.
[0047] (2) Message header: The request header consists of key / value pairs, one pair per line. The key and value are separated by a colon: ". The request header informs the server of the request information about the client.
[0048] (3) Blank line: There is a blank line after the last request header, which sends a carriage return and line feed character to notify the server that the request header ends.
[0049] (4) Request body: Request data is not used in the GET method, but in the POST method. The POST method is suitable for situations where the client needs to fill in a form. The most commonly used request headers related to the request data are Content-Type and Content-Length.
[0050] Command line: A service program running on a device that provides functions such as parsing and executing commands.
[0051] Command: A command is a string expression formed by combining "keywords" and "parameters" in a certain order. Keywords refer to fixed words that are used to indicate the specific meaning of subsequent parameters. Parameters refer to variable configuration parameters. For example: no ip address 192.168.0.1 / 16, where no, ip, and address are all keywords, and 192.168.0.1 / 16 is a parameter.
[0052] Figure 1 The present invention is a system block diagram showing a method and apparatus for synchronizing configuration data of multiple devices according to an exemplary embodiment.
[0053] like Figure 1 As shown, the system architecture 10 may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0054] Users can use terminal devices 101 , 102 , 103 to interact with server 105 via network 104 to receive or send configurations, etc.
[0055] The server 105 may be a server that provides various services, for example, a background management server that provides support for the terminal devices 101, 102, 103. The background management server may send configuration data to the terminal device.
[0056] In the process of the background management server sending configuration data to the terminal device, in order to improve the efficiency of network device configuration synchronization, reduce operation time and improve user experience, this application adopts an incremental synchronization mechanism. When the device configuration changes, the system first saves the changes to the cache area. After all modifications are completed, only the modified configuration data is synchronized to other redundant devices, avoiding the inefficiency caused by full synchronization.
[0057] Figure 2 The flowchart of a method for synchronizing configuration data of multiple devices according to an exemplary embodiment is shown. The method 20 for synchronizing configuration data of multiple devices describes the specific operations of changing and synchronizing the configuration of network devices in a cluster or dual-machine environment, and at least includes steps S202 to S210.
[0058] like Figure 2 As shown, in S202, a configuration change request is obtained, wherein the configuration change request includes configuration data to be changed. A network request is obtained; and whether the network request is a configuration change request is determined based on a keyword or a request type. The network request can be parsed to determine whether the request is a configuration change request based on a keyword or a request type.
[0059] In one embodiment, the method further includes generating the configuration change request by means of a command line serial port; and / or generating the configuration change request by means of a management page network protocol.
[0060] More specifically, a configuration change request may be generated through a command line interface (such as SSH, Telnet, or a serial port). A change request may also be generated through a network protocol such as HTTP / HTTPS, for example, when a user performs configuration operations through a Web management interface.
[0061] In S204, the configuration data is stored in a memory. More specifically, the configuration data is stored in a memory of a device to be configured.
[0062] In S206, the basic configuration consistency of multiple devices in the current environment is checked. For example, a basic configuration may be generated; a consistency check request may be sent to multiple devices in the current environment; and the device performs a consistency self-check based on its own configuration change record and the basic configuration.
[0063] In one embodiment, the method further includes: generating the basic configuration when the configurations of multiple devices in the current environment are consistent; and generating a configuration change record when a configuration change occurs to any device in the current environment.
[0064] In S208, when the consistency check passes, the configuration data is packaged into a message. The configuration data can be spliced into a message according to the device's own attributes. The configuration data can be spliced into a message format suitable for each device according to the attributes and requirements of the device, so as to be synchronously transmitted between devices.
[0065] In one embodiment, the method further includes: generating full configuration data when the consistency check fails; and sending the full configuration data to multiple devices in the current environment so that the multiple devices synchronize configuration data.
[0066] In S210, the message is sent to multiple devices in the current environment, so that the multiple devices synchronize configuration data based on the message. The message can be sent to multiple devices in the current environment; the devices synchronize configuration based on the configuration data and update basic configuration.
[0067] In one embodiment, after the configuration data synchronization is completed, it is determined whether the synchronization result is normal; when the synchronization result is abnormal, the full amount of configuration data is sent to multiple devices in the current environment, so that the multiple devices perform configuration data synchronization.
[0068] By checking the consistency of device configurations first and then performing incremental or full synchronization, the consistency and security of device configurations in a cluster or dual-machine environment are ensured. Incremental synchronization can greatly improve synchronization efficiency while ensuring the security of configuration data; in abnormal situations, full synchronization ensures the consistency and reliability of device configurations.
[0069] According to the configuration data synchronization method for multiple devices of the present application, a configuration change request is obtained, wherein the configuration change request includes configuration data to be changed; the configuration data is stored in a memory; the basic configuration consistency of multiple devices in the current environment is checked; when the consistency check passes, the configuration data is packaged into a message; the message is sent to multiple devices in the current environment, so that the multiple devices synchronize the configuration data based on the message, and the configuration change can be quickly applied to all devices without affecting network traffic, thereby greatly reducing the synchronization time and avoiding network failures caused by configuration differences.
[0070] It should be clearly understood that the present application describes how to form and use specific examples, but the principles of the present application are not limited to any details of these examples. On the contrary, based on the teaching of the content disclosed in the present application, these principles can be applied to many other embodiments.
[0071] Figure 3 This is a flowchart of a configuration data synchronization method for multiple devices according to another exemplary embodiment. When data changes occur in a device, data changes can be made through pages (http, https), api (json), snmp (udp), netconf, serial port (command line), ssh (tcp), telnet, etc. Different methods transmit data to the device through different protocols, and the device needs to have a corresponding background service process to parse and process data of different protocols. Figure 3 The process 30 shown is an exemplary process of performing data changes in an HTTP manner.
[0072] like Figure 3 As shown, in S302, a web request is received.
[0073] In S304, whether it is a configuration change request. Determine the message type. For static resource files, the system will detect whether the request is a configuration change request. In the existing Conplat platform, most GET requests are considered non-configuration change requests, and only a small number of POST requests are considered configuration change requests. If the request is a configuration change and requires synchronization, the system will start the incremental save process.
[0074] In S306, whether it is necessary to record the incremental configuration.
[0075] In S308, the request flow is processed normally.
[0076] In S310, the message header is parsed. If it needs to be saved, the header field of the HTTP request can be parsed first to extract relevant data so as to perform splicing processing in the subsequent synchronization process.
[0077] In S312, whether to upload the file.
[0078] In S314, the file is parsed. The message body of the request is differentiated and processed according to the data type. The message body of the text type will be parsed directly, while for the uploaded file type, the system needs to parse not only the message body but also the file content.
[0079] In S316, the message body is parsed.
[0080] In S318, the message header data and the message body are recorded. Finally, all parsed data will be stored in the memory to prepare for subsequent incremental synchronization operations.
[0081] Figure 4 The present invention is a flowchart of a method for synchronizing configuration data of multiple devices according to another exemplary embodiment. Figure 4 The process 40 shown is an exemplary process of performing data changes in a command line manner.
[0082] like Figure 4 As shown, in S402, the command line receives an execution command.
[0083] In S404, whether it is a configuration change command. The command line sends the instruction to the command line processing process through the serial port, SSH, Telnet, etc. First, the system determines whether the command is a configuration change command in the framework process. During the command line registration process, a specific keyword is used to identify the configuration change command that needs to be synchronized. When the command is received, if the keyword is matched, the system starts the incremental save process.
[0084] In S406, the process is synchronized.
[0085] In S408, whether it is necessary to record the incremental configuration.
[0086] In S410, the complete command line stack is parsed. It is determined whether the incremental configuration data needs to be saved, which depends on the specific networking requirements. If it needs to be saved, the system will parse the complete stack and command content of the command. After the parsing is successful, the parsed data will be stored in the memory for subsequent synchronization.
[0087] In S412, the actual execution command is parsed.
[0088] In S414, the command stack and the actual command are recorded.
[0089] In S416, the command is executed.
[0090] Figure 5 The present invention is a flowchart of a method for synchronizing configuration data of multiple devices according to another exemplary embodiment. Figure 5 The process 50 shown is for Figure 2 Detailed description of the process shown.
[0091] like Figure 5 As shown, in S502, incremental synchronization is performed.
[0092] In S504, the synchronization flag is checked to confirm whether incremental synchronization or full synchronization is currently being performed.
[0093] In S506, a prompt message is returned, which may be "Configuration is being synchronized".
[0094] In S508, consistency check. Before performing incremental synchronization, it is necessary to ensure that other devices in the cluster or dual-machine environment are consistent with the basic configuration of the current device. The basic configuration is generated when all device configurations are consistent at a certain moment, and the last configuration modification time is recorded. When the configuration in the environment changes, the system will execute the configuration change recording process.
[0095] In S510, a prompt message is returned, which may be "Configuration is inconsistent, use full synchronization to synchronize configuration." Before performing incremental synchronization, it is necessary to send a check request to confirm whether the devices in the cluster or dual-machine environment are consistent with the basic configuration. If the configurations of other devices are consistent with the basic configuration, the system will synchronize the currently recorded incremental configurations to these devices and accept feedback on the synchronization results. When an exception occurs during the synchronization process, the system will issue a prompt.
[0096] If it is found that the configuration of other devices has also changed, incremental synchronization cannot continue and the system will enable full synchronization to ensure data consistency and integrity.
[0097] In S512, the messages are spliced and the incremental configurations are synchronized in sequence. When the data is packaged into messages and sent to the cluster or dual-machine device, the system distinguishes the message format according to the data type. The header field, command stack information, and data part of the message are spliced according to the needs of the device, and then sent to other devices one by one, and feedback is received to confirm the success or failure of synchronization.
[0098] In S514, the synchronization result is obtained.
[0099] To ensure data integrity, if the configuration of other devices is detected to be inconsistent with the basic configuration during incremental synchronization, the system will prompt the configuration change and require full synchronization to continue. In actual operation, considering memory limitations and execution time, the system will also check the number of newly added configurations. When the number of newly added configurations exceeds the set threshold, it will automatically switch to full synchronization.
[0100] In addition, when the device restarts, the incremental configuration in the memory will be lost, so the system will perform a full synchronization after the restart to ensure the integrity of data synchronization.
[0101] Those skilled in the art will appreciate that all or part of the steps for implementing the above embodiments are implemented as a computer program executed by a CPU. When the computer program is executed by the CPU, the above functions defined by the above method provided in the present application are executed. The program may be stored in a computer-readable storage medium, which may be a read-only memory, a disk, or an optical disk, etc.
[0102] In addition, it should be noted that the above figures are only schematic illustrations of the processes included in the method according to the exemplary embodiments of the present application, and are not intended to be limiting. It is easy to understand that the processes shown in the above figures do not indicate or limit the time sequence of these processes. In addition, it is also easy to understand that these processes can be performed synchronously or asynchronously, for example, in multiple modules.
[0103] In the scenario of processing more than 200,000 configurations, the method in this application has significantly improved efficiency compared to the traditional solution. For example, when synchronizing 500 configurations, the old method takes about 7 minutes, while the method in this application only takes 2.5 seconds, which greatly reduces the execution time.
[0104] The present application provides a method for implementing incremental configuration synchronization in a cluster, dual-machine or other redundant deployment environment, which can effectively avoid the time consumption and resource occupation during full synchronization and improve synchronization efficiency.
[0105] It can identify configuration changes caused by multiple protocols (such as HTTP, SSH, SNMP, etc.) and save relevant change information to ensure that all valid configuration modifications are covered during data synchronization. When the configuration of other devices is consistent with the basic configuration, this application can synchronize the incremental part of this device compared to the basic configuration to other devices, and can ensure the synchronization timing of incremental data to avoid configuration conflicts. When it is detected that the configuration of other devices is inconsistent with the basic configuration, the number of configuration changes exceeds the set threshold, or the device restarts, the technology of this application supports overwriting the configuration of other devices through full synchronization to ensure data integrity and consistency.
[0106] This application can implement an efficient and reliable incremental and full configuration synchronization mechanism in a complex network environment, optimizing the device management and maintenance process.
[0107] The following is an embodiment of the device of the present application, which can be used to execute the embodiment of the method of the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the embodiment of the method of the present application.
[0108] Figure 6FIG. 1 is a block diagram of a configuration data synchronization apparatus for multiple devices according to another exemplary embodiment. Figure 6 As shown, the configuration data synchronization apparatus 60 for multiple devices includes: a request module 602 , a storage module 604 , a detection module 606 , a packaging module 608 , and a synchronization module 610 .
[0109] The request module 602 is used to obtain a configuration change request, which includes configuration data to be changed. The request module 602 is also used to obtain a network request; and determine whether the network request is a configuration change request based on a keyword or a request type.
[0110] The storage module 604 is used to store the configuration data in the memory;
[0111] The detection module 606 is used to check the basic configuration consistency of multiple devices in the current environment; the detection module 606 is also used to generate a basic configuration; send a consistency check request to multiple devices in the current environment; the device performs consistency self-check based on its own configuration change record and the basic configuration.
[0112] The packaging module 608 is used to package the configuration data into a message when the consistency check passes; the packaging module 608 is also used to splice the configuration data into a message according to the device's own attributes.
[0113] The synchronization module 610 is used to send the message to multiple devices in the current environment so that the multiple devices synchronize configuration data based on the message. The synchronization module 610 is also used to send the message to multiple devices in the current environment; the devices synchronize configuration based on the configuration data and update the basic configuration.
[0114] The synchronization module 610 is also used to generate full configuration data when the consistency check fails; send the full configuration data to multiple devices in the current environment so that the multiple devices synchronize the configuration data. The synchronization module 610 is also used to determine whether the synchronization result is normal after the configuration data synchronization is completed; when the synchronization result is abnormal, send the full configuration data to multiple devices in the current environment so that the multiple devices synchronize the configuration data.
[0115] According to the configuration data synchronization device for multiple devices of the present application, by obtaining a configuration change request, the configuration change request includes the configuration data to be changed; storing the configuration data in a memory; checking the basic configuration consistency of multiple devices in the current environment; when the consistency check passes, packaging the configuration data into a message; sending the message to multiple devices in the current environment, so that the multiple devices synchronize the configuration data based on the message, the configuration change can be quickly applied to all devices without affecting network traffic, thereby greatly reducing the synchronization time and avoiding network failures caused by configuration differences.
[0116] Figure 7 It is a block diagram of an electronic device according to an exemplary embodiment.
[0117] Refer to the following Figure 7 hereinafter describes an electronic device 700 according to this embodiment of the present application. Figure 7 The electronic device 700 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0118] like Figure 7 As shown, the electronic device 700 is in the form of a general computing device. The components of the electronic device 700 may include, but are not limited to: at least one processing unit 710, at least one storage unit 720, a bus 730 connecting different system components (including the storage unit 720 and the processing unit 710), a display unit 740, etc.
[0119] The storage unit stores a program code, which can be executed by the processing unit 710, so that the processing unit 710 performs the steps described in this specification according to various exemplary embodiments of the present application. For example, the processing unit 710 can perform the following steps: Figure 2 , Figure 3 , Figure 4 , Figure 5 Follow the steps shown in .
[0120] The storage unit 720 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 7201 and / or a cache memory unit 7202 , and may further include a read-only memory unit (ROM) 7203 .
[0121] The storage unit 720 may also include a program / utility 7204 having a set (at least one) of program modules 7205, such program modules 7205 including but not limited to: an operating system, one or more application programs, other program modules and program data, each of which or some combination may include the implementation of a network environment.
[0122] Bus 730 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
[0123] The electronic device 700 may also communicate with one or more external devices 700' (e.g., keyboards, pointing devices, Bluetooth devices, etc.) to enable a user to communicate with the electronic device 700, and / or any device (e.g., routers, modems, etc.) that the electronic device 700 can communicate with one or more other computing devices. Such communication may be performed via an input / output (I / O) interface 750. In addition, the electronic device 700 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 760. The network adapter 760 may communicate with other modules of the electronic device 700 via a bus 730. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 700, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0124] Through the above description of the implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by combining software with necessary hardware. Figure 8 As shown, the technical solution according to the implementation mode of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes a number of instructions to enable a computing device (which can be a personal computer, a server, or a network device, etc.) to execute the above method according to the implementation mode of the present application.
[0125] The software product may be any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, a system, device or component of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination thereof. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.
[0126] The computer readable storage medium may include a data signal propagated in a baseband or as part of a carrier wave, wherein a readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The readable storage medium may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by an instruction execution system, an apparatus, or a device or used in combination with it. The program code contained on the readable storage medium may be transmitted with any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the above.
[0127] Program code for performing the operations of the present application may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., using an Internet service provider to connect through the Internet).
[0128] The above-mentioned computer-readable medium carries one or more programs. When the above-mentioned one or more programs are executed by a device, the computer-readable medium implements the following functions: obtaining a configuration change request, wherein the configuration change request includes configuration data to be changed; storing the configuration data in a memory; checking the basic configuration consistency of multiple devices in the current environment; when the consistency check passes, packaging the configuration data into a message; and sending the message to multiple devices in the current environment so that the multiple devices synchronize configuration data based on the message.
[0129] Those skilled in the art will appreciate that the above modules can be distributed in the device according to the description of the embodiment, or can be changed accordingly and only used in one or more devices different from the embodiment. The modules of the above embodiments can be combined into one module, or further divided into multiple sub-modules.
[0130] Through the description of the above embodiments, it is easy for those skilled in the art to understand that the example embodiments described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the embodiment of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the method according to the embodiment of the present application.
[0131] The exemplary embodiments of the present application are specifically shown and described above. It should be understood that the present application is not limited to the detailed structures, configurations or implementations described herein; on the contrary, the present application is intended to cover various modifications and equivalent configurations included in the spirit and scope of the appended claims.
Claims
1. A method for synchronizing configuration data of multiple devices, characterized in that: include: Obtaining a configuration change request, wherein the configuration change request includes configuration data to be changed; storing the configuration data in a memory; Check the basic configuration consistency of multiple devices in the current environment; When the consistency check passes, packaging the configuration data into a message; The message is sent to multiple devices in the current environment, so that the multiple devices synchronize configuration data based on the message.
2. The method according to claim 1, characterized in that Also includes: Generate the configuration change request by means of a command line serial port; and / or The configuration change request is generated by means of a management page network protocol.
3. The method according to claim 1, characterized in that Also includes: When the consistency check fails, generate full configuration data; The full configuration data is sent to multiple devices in the current environment so that the multiple devices can synchronize configuration data.
4. The method according to claim 1, characterized in that Get configuration change requests, including: Get network request; Determine whether the network request is a configuration change request based on a keyword or a request type.
5. The method according to claim 1, characterized in that Check the basic configuration consistency of multiple devices in the current environment, including: Generate basic configuration; Send consistency check requests to multiple devices in the current environment; The device performs a consistency self-check based on its own configuration change record and the basic configuration.
6. The method according to claim 5, characterized in that Also includes: When the configurations of multiple devices in the current environment are consistent, generating the basic configuration; When a configuration change occurs on any device in the current environment, a configuration change record is generated.
7. The method according to claim 1, characterized in that Packing the configuration data into a message includes: The configuration data is spliced into a message according to the device's own attributes.
8. The method according to claim 1, characterized in that Sending the message to multiple devices in the current environment so that the multiple devices synchronize configuration data based on the message includes: Sending the message to multiple devices in the current environment; The device performs configuration synchronization based on the configuration data and updates the basic configuration.
9. The method according to claim 1, characterized in that Also includes: After the configuration data synchronization is completed, determine whether the synchronization result is normal; When the synchronization result is abnormal, the full configuration data is sent to multiple devices in the current environment so that the configuration data of the multiple devices are synchronized.
10. A configuration data synchronization device for multiple devices, characterized in that: include: A request module, used to obtain a configuration change request, wherein the configuration change request includes configuration data to be changed; A storage module, used for storing the configuration data in a memory; The detection module is used to check the basic configuration consistency of multiple devices in the current environment; A packaging module, used for packaging the configuration data into a message when the consistency check passes; The synchronization module is used to send the message to multiple devices in the current environment, so that the multiple devices synchronize configuration data based on the message.