Method and device for configuration updating
Through the server communication and connection with the device to be configured, the IP address of the configuration file is automatically determined and downloaded, which solves the problem of low efficiency in manual configuration and updates, and realizes efficient and rapid updates of device configuration.
Patent Information
- Application Number
- CN202311585489.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-24
- Publication Date
- 2025-05-27
AI Technical Summary
In the prior art, equipment configuration updates mainly rely on manual methods, resulting in low configuration update efficiency and it is difficult to update configuration files for each device to be configured efficiently and quickly.
Through the server, the IP address of the target device to be configured is determined based on the configuration file to be updated, and the corresponding configuration file is downloaded for the device to be configured based on the IP address to be configured to automatically update the configuration file.
It improves the efficiency of configuration files, realizes efficient and rapid update of device configuration, reduces manual intervention, and improves the degree of automation of device configuration management.
Smart Images

Figure CN120050171A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of automation, and particularly to a method and apparatus for configuration update. Background Art
[0002] In the field of industrial automation, testing equipment before it is put into use is a necessary step to ensure the quality of the equipment. During the equipment testing process, for different usage scenarios, the configuration of the equipment can be different, so different configuration files are required to configure the equipment. Currently, the configuration of the equipment is mainly updated manually. How to efficiently update the configuration of the equipment is an urgent problem to be solved. Summary of the Invention
[0003] In view of this, the present invention provides a method and apparatus for configuration update, which can efficiently and quickly update the configuration files for each device to be configured.
[0004] On the one hand, an embodiment of the present invention provides a method for configuration update, characterized in that the method is executed by a server communicatively connected to each device to be configured, and the method includes: determining the IP addresses of the corresponding target devices to be configured according to the configuration file to be updated; downloading the corresponding configuration files for the respective target devices to be configured according to the determined IP addresses, so that the respective target devices to be configured perform configuration update according to the corresponding configuration files.
[0005] On the other hand, an embodiment of the present invention provides an apparatus for configuration update, characterized in that the apparatus is applied to a server communicatively connected to each device to be configured, and the apparatus includes: a first determination unit configured to determine the IP addresses of the corresponding target devices to be configured according to the configuration file to be updated; a download unit configured to download the corresponding configuration files for the respective target devices to be configured according to the determined IP addresses, so that the respective target devices to be configured perform configuration update according to the corresponding configuration files.
[0006] On the other hand, an embodiment of the present invention provides a server for configuration update, characterized in that it includes: a memory storing executable code; at least one processor communicatively connected to the memory, wherein the executable code, when executed by the at least one processor, causes the at least one processor to implement the method according to any one of the present invention.
[0007] On the other hand, an embodiment of the present invention provides a machine-readable storage medium storing executable code, and the executable code, when executed, causes a machine to implement the method according to any one of the present invention.
[0008] As can be seen from the above solution, in the embodiments of the present invention, based on the layout mode in which the server is communicatively connected to each device to be configured, the server can address the IP addresses of each device to be configured according to the configuration file, and download the corresponding configuration file for the device to be configured based on the IP address, so as to realize the automatic update of the configuration file, thereby improving the update efficiency of the configuration file. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] The preferred embodiments of the present invention will be described in detail below with reference to the accompanying drawings, so that those of ordinary skill in the art can more clearly understand the above and other features and advantages of the present invention. In the drawings:
[0010] Figure 1 is a schematic diagram showing an example of an application scenario according to an embodiment of the present invention.
[0011] Figure 2 is a schematic flowchart showing an example of a method for configuration update according to an embodiment of the present invention.
[0012] Figure 3a and Figure 3b is a schematic diagram showing different topological structures.
[0013] Figure 4 is a schematic flowchart showing another example of a method for configuration update according to an embodiment of the present invention.
[0014] Figure 5 is a schematic block diagram showing an example of a device for configuration update according to an embodiment of the present invention.
[0015] Figure 6 is a schematic block diagram of a server for configuration update according to an embodiment of the present invention.
[0016] Among them, the reference numerals are as follows:
[0017] 102: Server 104-1: Device to be configured 104-2: Device to be configured
[0018] 104-3: Device to be configured 104-4: Device to be configured 104-5: Device to be configured
[0019] 104-6: Device to be configured 104-21: Device to be configured 104-22: Device to be configured
[0020] 104-32: Device to be configured 104-33: Device to be configured 104-43: Device to be configured
[0021] 104-44: Device to be configured 104-63: Device to be configured 104-64: Device to be configured
[0022] 104 - N: Device to be configured; 202: Determine IP address; 204: Download configuration file
[0023] 402: Determine current configuration file; 404: Determine IP address; 406: Download current configuration file
[0024] 408: Judge; 410: End; 500: Configuration update device
[0025] 502: First determination unit; 504: Download unit; 600: Server
[0026] 602: Memory; 604: Processor; 606: Communication interface
[0027] 608: Bus Detailed implementation manner
[0028] To make the objectives, technical solutions and advantages of the present invention clearer, the following examples are given to further elaborate on the present invention in detail.
[0029] In the industrial field, testing equipment before it is put into use is a necessary step to ensure the quality of the equipment. During the equipment testing process, for different usage scenarios, the configuration of the equipment can be different, thus requiring different configuration files to configure the equipment. Currently, the configuration of the equipment is mainly updated manually.
[0030] In the manual configuration method, it is necessary to manually connect the configuration device storing the configuration file to the device under test through the network interface, and then manually download the configuration file to the device under test. Then, update the configuration file of the next device under test in the same operation manner. This manual update method results in low configuration update efficiency. Therefore, how to efficiently update the configuration of the equipment is an urgent problem to be solved.
[0031] In view of the above, the embodiments of the present invention provide a method and device for configuration update. Based on the layout mode in which the server is communicatively connected to each device to be configured, the server can address the IP addresses of each device to be configured according to the configuration file, and download the corresponding configuration file for the device to be configured based on the IP address, so as to realize the automatic update of the configuration file, thereby improving the update efficiency of the configuration file.
[0032] Figure 1 It is a schematic diagram showing an example of the application scenario according to the embodiment of the present invention.
[0033] As Figure 1As shown, this scenario may include multiple devices to be configured. For example, the devices to be configured are 104-1, 104-2 to 104-N, where N represents a positive integer. The number of devices to be configured can be customized. In different application scenarios, the types of devices to be configured can be different. For example, in a fire protection application scenario, the devices to be configured may include fire controllers. The device types belonging to the same application scenario can be the same or different.
[0034] In one example, the solution of the present invention can be applied to a device testing scenario. In the device testing scenario, before the device is put into use, it is necessary to update and test the configuration of the device to ensure the usability of the device. In the device testing scenario, the devices to be configured may include devices under test (DUTs). In one example, when the usage scenario of the device is a fire protection scenario, the devices under test may include fire controllers. The multiple fire controllers may belong to the same platform and be distributed at different locations to achieve the function of fire control. For example, multiple fire controllers in a building are set on different floors and in different rooms. Each fire controller located in a different position requires different configuration parameters, and the configuration parameters corresponding to each fire controller can be updated through different configuration files.
[0035] In an embodiment of the present invention, the server 102 can be communicatively connected to each device to be configured. In one example, the server 102 can be connected to each device to be configured through a network, and the network can include a local area network, a wide area network, etc., such as an Ethernet network. The communication connection methods can include wireless connection and wired connection, etc. For example, the server 102 can be connected to each device to be configured through a CAN (Controller Area Network) bus.
[0036] In one example, each device to be configured can be communicatively connected to each other. Based on this interconnection relationship, each device to be configured can form a network. This network can be connected to the server through a network (such as a local area network). A network can include devices to be configured in one or more application scenarios.
[0037] The method and device for configuration update provided by the embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0038] Figure 2 is a schematic flowchart showing an example of the method for configuration update according to an embodiment of the present invention. Figure 2 The method shown can be executed by a server communicatively connected to each device to be configured, such as Figure 1 the server 102 in
[0039] As Figure 2As shown, in step 202, the IP addresses of the corresponding target devices to be configured can be determined according to the configuration file to be updated.
[0040] In an embodiment of the present invention, the configuration file to be updated can be pre-stored locally or in other specified storage spaces for updating the configuration parameters of the devices to be configured. In one example, when the configuration file updates the configuration of the devices to be configured in a network, the topology of the network can be changed. For a network, different topologies can be formed without changing the physical connection relationships of the devices to be configured. Taking Figure 3a and 3b as an example, Figure 3a and 3b the networks shown are both composed of 64 devices under test, and the physical connection relationships among the devices under test in this network are the same. However, Figure 3a and 3b show two different topologies.
[0041] In one way of forming a topology by updating the configuration file, the configuration file can be used to configure the master-slave relationships among the devices to be configured in the network, and different master-slave relationships can form different topologies. For two physically connected devices to be configured, each device to be configured can be configured as the master device or the slave device of the other device to be configured.
[0042] Each configuration file can be used to update one or more devices to be configured correspondingly. The configuration file to be updated can update all the devices to be configured or some of the devices to be configured each time. For example, if there are 64 configuration files to be updated, all 64 devices to be configured can be configured and updated. Another example is that if there are 32 configuration files to be updated, only 32 of the 64 devices to be configured can be configured and updated.
[0043] In an embodiment of the present invention, each configuration file to be updated can be applied to at least one device to be configured, that is, the configuration of at least one device to be configured can be updated, and the devices to be configured to which each configuration file is applied can be determined as the target devices to be configured. In the present invention, the devices to be configured corresponding to the configuration file refer to the devices to be configured to which the configuration file is applied. After each configuration file is generated, the object to which the configuration file is applied can be determined. Therefore, the target devices to be configured corresponding to each configuration file can be determined according to the configuration file.
[0044] In a certain way, each configuration file may include the identifier of the device to be configured corresponding to the configuration file, and each identifier can be used to represent the corresponding device to be configured. Thus, the corresponding target device to be configured can be determined through the identifier in the configuration file, and then the IP addresses of each target device to be configured can be obtained.
[0045] In an example, the identifiers in each configuration file may include IP addresses, that is, each configuration file may include the IP address of the device to be configured corresponding to the configuration file. Thus, the IP addresses of the corresponding target devices to be configured can be determined according to the IP addresses included in the configuration file to be updated. In addition, each configuration file may also include the gateway information of the corresponding device to be configured.
[0046] In an example, each device to be configured may be configured with a unique IP address, so that the corresponding device to be configured can be uniquely determined according to the IP address.
[0047] In this determination method, each configuration file may only include one IP address. In this way, each configuration file only performs configuration update for one device to be configured. In addition, each configuration file may also include multiple IP addresses, so that each configuration file can be applied to multiple devices to be configured.
[0048] In the above method, the IP address in the configuration file can not only be used to determine the corresponding device to be configured, but also provide an address and a channel for downloading the configuration file.
[0049] In another determination method, a configuration tool may be set up. The configuration tool may be software capable of performing configuration update operations and can be installed in a hardware device or system. For example, it can be installed in a server or other hardware devices.
[0050] The server can call the configuration tool to perform configuration update operations, including the operations in steps 202 and 204. In an example, the server and the configuration tool can be connected through a Socket. In another example, the configuration tool is equipped with an API (Application Programming Interface) for calling, so that the server can start the configuration tool by calling the API of the configuration tool.
[0051] In the above method, based on the set configuration tool, the solution provided by the present invention can be executed through a call method, and the feature that the configuration tool can be called improves the flexibility of executing the configuration update solution.
[0052] In an example of the present invention, a corresponding configuration file can be generated according to the configuration requirements of the device to be configured whose configuration file needs to be updated according to the current needs, and the generated configuration file is used as the configuration file to be updated. In this example, each generated configuration file will be applied to the subsequent configuration update operation.
[0053] In another example, several configuration files can be stored in advance. Among the stored configuration files, some configuration files (for example, some or all of them) can be applied to the subsequent configuration update operation, and some configuration files will be used only after multiple rounds of configuration update operations. Therefore, when performing a configuration update operation each time, the configuration files required for this round of configuration update operation can be screened out from the stored configuration files first, that is, the configuration files to be updated. Therefore, the configuration files to be updated can be some of the stored configuration files.
[0054] In one screening method, the configuration files to be updated can be determined from the stored configuration files according to the input configuration file characterization information. The configuration file characterization information can be manually input to the server and can be used to uniquely determine the configuration file. The configuration file characterization information can include at least one of a configuration file identifier, a storage address, etc. The configuration file identifier and the configuration file can have a one-to-one correspondence relationship. When the storage address of the configuration file is input, the configuration files to be updated in the storage space can be uniquely determined according to each storage address.
[0055] In this example, the configuration file characterization information can be used to screen the configuration files to be updated, so that personalized configuration updates can be performed based on different configuration files, and the flexibility of configuration updates for different configuration files and different devices to be configured is improved.
[0056] In an example, in the storage method of the configuration file, each configuration file can be stored independently in the storage space. In another example, multiple configuration files can be stored as a set in the storage space. For example, a configuration file set can be set in the storage space, and each configuration file set can include multiple configuration files. In the configuration file set, each configuration file can correspond to a storage address. In addition, each configuration file can also correspond to the identifier of one or more devices to be configured to which the configuration file is applied.
[0057] In an example, multiple configuration file sets can be set in the storage space, and each configuration file set can be set according to the project type. The configuration files in each configuration file set can be applied to the project to which the configuration file set belongs. Different configuration file sets can include different configuration files and can also include the same configuration files.
[0058] Through a set of configuration files set according to the project type, for each project, the corresponding set of configuration files can be directly selected for configuration update, which improves the convenience of configuration update based on the project type.
[0059] Back to Figure 2 , after determining the IP addresses of the respective target devices to be configured, in step 204, the corresponding configuration files can be downloaded for the respective target devices to be configured according to the determined IP addresses. After each configuration file is downloaded to the local of the corresponding target device to be configured, each target device to be configured can use the local configuration file for configuration update.
[0060] In an embodiment of the present invention, when multiple configuration files need to be downloaded and / or there are multiple target devices to be configured, it can be determined that there are multiple download tasks. Downloading one configuration file to one target device to be configured can be regarded as one download task.
[0061] In one download method, when there are multiple download tasks, the respective download tasks can be executed in parallel. For example, multiple threads can be started to execute the respective download tasks separately. During parallel execution, each configuration file can be downloaded to the corresponding multiple target devices to be configured in parallel, which can improve the download efficiency of the configuration files, and thus overall improve the configuration file update efficiency for the devices to be configured. The parallel method can improve the download efficiency of the configuration files, thereby improving the configuration update efficiency.
[0062] In another download method, when there are multiple download tasks, the respective download tasks can be executed in sequence for each target device to be configured. Only one configuration file can be downloaded and stored locally for each target device to be configured. Thus, according to the order of the respective target devices to be configured, the corresponding configuration file is downloaded for each target device to be configured in sequence until the local of all target devices to be configured obtains the updated configuration file. The order of the respective target devices to be configured can be customized.
[0063] Figure 4 is a schematic flowchart showing another example of a method for configuration update according to an embodiment of the present invention. In Figure 4 In the example shown, there can be multiple configuration files to be updated. In addition, the respective download tasks can be executed separately for the configuration files to be updated.
[0064] As Figure 4 shown, in step 402, the current configuration file can be determined from the unexecuted configuration files to be updated.
[0065] In the first round of loop, the unexecuted configuration files to be updated include all the configuration files to be updated. In one way of determining the current configuration file, a configuration file can be randomly selected from the unexecuted configuration files to be updated as the current configuration file. In another way, the configuration files to be updated can be sorted, and the sorting rules can be customized. Then, the configuration files can be sequentially selected in each round of loop according to the sorting of the configuration files as the current configuration file in each round of loop.
[0066] In step 404, the IP address of the current target device to be configured corresponding to the current configuration file can be determined.
[0067] The current configuration file can determine one or more current target devices to be configured, and thus one or more IP addresses can be correspondingly determined. When the current configuration file determines multiple current target devices to be configured, it means that each current target device to be configured needs to download the current configuration file for configuration update.
[0068] In step 406, the current configuration file can be downloaded for the current target device to be configured according to the determined IP address.
[0069] When there is only one determined IP address, there is also only one current target device to be configured that needs to download the current configuration file. Thus, the current configuration file can be downloaded to the local of the current target device to be configured according to this IP address.
[0070] When there are multiple determined IP addresses, there are also multiple current target devices to be configured that need to download the current configuration file. In this case, the current configuration file can be separately downloaded to each current target device to be configured according to the IP address of each current target device to be configured.
[0071] In one example, the current configuration file can be downloaded for multiple current target devices to be configured in a parallel manner. Each time, the multiple current target devices for the parallel manner can include all or part of the current target devices to be configured. The parallel manner can improve the download efficiency for each configuration file. In another example, for each current target device to be configured, the current configuration file can be downloaded for each current target device to be configured in sequence until the current configuration file is downloaded to all the current target devices to be configured.
[0072] In step 408, it is judged whether all the configuration files to be updated have been downloaded to the corresponding devices to be configured. If so, the operation in step 410 is executed to end the download task for the configuration file; if not, the operation in step 402 is returned to be executed.
[0073] Figure 5It is a schematic block diagram showing an example of a device for configuration update (hereinafter referred to as configuration update device 500) according to an embodiment of the present invention.
[0074] As Figure 5 shown, the configuration update device 500 includes: a first determination unit 502 and a download unit 504.
[0075] The first determination unit 502 is configured to determine the IP addresses of the respective target devices to be configured corresponding to the configuration file to be updated.
[0076] The download unit 504 is configured to download the corresponding configuration file for each target device to be configured according to the determined IP addresses, so that each target device to be configured performs configuration update according to the corresponding configuration file.
[0077] In one example, each configuration file includes the IP address of the corresponding device to be configured, and the first determination unit 502 is further configured to: determine the IP addresses of the respective target devices to be configured corresponding to the IP addresses in the configuration file to be updated.
[0078] In one example, the first determination unit 502 is further configured to: call a configuration tool to execute determining the IP addresses of the respective target devices to be configured corresponding to the configuration file to be updated, wherein the configuration tool is software capable of performing configuration update operations.
[0079] In one example, the configuration update device 500 may further include a second determination unit, which may be configured to determine the configuration file to be updated from the stored configuration files according to the input configuration file characterization information.
[0080] In one example, the configuration update device 500 may further include a third determination unit, which may be configured to determine the current configuration file from the unexecuted configuration files to be updated; the first determination unit 502 may further be configured to determine the IP addresses of the corresponding current target devices to be configured according to the current configuration file; the download unit 504 may further be configured to download the current configuration file for the current target devices to be configured according to the determined IP addresses.
[0081] In one example, the download unit 504 may further be configured to: when there are multiple current target devices to be configured, download the current configuration file to each of the current target devices to be configured respectively according to the IP addresses of each current target device to be configured.
[0082] Figure 6 It is a schematic block diagram of a server for configuration update according to an embodiment of the present invention. For example, the server 600 may correspond to Figure 1 the server 102 in
[0083] As Figure 6 shown, server 600 may include a memory 602 and at least one processor 604. The memory 602 and the at least one processor 604 may be coupled together via a bus 608. The memory 602 may store executable code. When the executable code is executed by the at least one processor 604, it may cause the at least one processor 604 to implement the corresponding processes described above with respect to the method embodiments, which will not be elaborated herein.
[0084] In addition, server 600 may further include other modules, such as a communication interface 606. Server 600 may communicate with other devices installed with configuration tools and each device to be configured (e.g., 104-1) etc. via the communication interface 606. The communication interface 606 may also be connected to the bus 608. Of course, the components that server 600 may include may depend on the specific implementation, which will not be elaborated herein.
[0085] Embodiments of the present invention also provide a machine-readable storage medium. The machine-readable storage medium may store executable code, and when the executable code is executed by the machine, it causes the machine to implement the specific processes described above with respect to updating the configuration file.
[0086] For example, the machine-readable storage medium may include, but is not limited to, random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), static random access memory (SRAM), hard disk, flash memory, and the like.
[0087] The above are only the preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention. In addition, the nouns and pronouns related to people in this patent application are not limited to specific genders.
Claims
1. A method for configuration update, characterized in that, the method is executed by a server communicatively connected to each device to be configured, and the method includes: determining the IP addresses of the corresponding target devices to be configured according to the configuration file to be updated; downloading the corresponding configuration files for the respective target devices to be configured according to the determined IP addresses, so that the respective target devices to be configured perform configuration updates according to the corresponding configuration files.
2. The method according to claim 1, characterized in that, each configuration file includes the IP address of the corresponding device to be configured, determining the IP addresses of the corresponding target devices to be configured according to the configuration file to be updated includes: determining the IP addresses of the corresponding target devices to be configured according to the IP addresses in the configuration file to be updated.
3. The method according to claim 1, characterized in that, determining the IP addresses of the corresponding target devices to be configured according to the configuration file to be updated includes: invoking a configuration tool to execute determining the IP addresses of the corresponding target devices to be configured according to the configuration file to be updated, wherein the configuration tool is software capable of performing configuration update operations.
4. The method according to claim 1, characterized in that, the method further includes: determining the configuration file to be updated from the stored configuration files according to the input configuration file characterization information.
5. The method according to claim 1, characterized in that, there are multiple configuration files to be updated, performing configuration update in the following loop manner until all the configuration files to be updated are downloaded to the corresponding devices to be configured: determining the current configuration file from the unexecuted configuration files to be updated; determining the IP addresses of the corresponding target devices to be configured according to the configuration file to be updated includes: determining the IP address of the corresponding current target device to be configured according to the current configuration file; downloading the corresponding configuration files for the respective target devices to be configured according to the determined IP addresses includes: downloading the current configuration file for the current target device to be configured according to the determined IP address.
6. The method according to claim 5, characterized in that, downloading the current configuration file for the current target device to be configured according to the determined IP address includes: when there are multiple current target devices to be configured, downloading the current configuration file to each of the current target devices to be configured according to the IP addresses of the respective current target devices to be configured.
7. The method according to claim 1, characterized in that, each configuration file is stored in a configuration file set, and each configuration file set is set according to the project type; or, each configuration file is stored independently.
8. The method according to claim 1, characterized in that, the respective devices to be configured form a network and are connected to the server through a local area network, and the configuration file is used to configure the topology of the network.
9. The method according to claim 1, characterized in that, the device to be configured includes a device under test, and the device under test includes a fire controller.
10. A device for configuration update, characterized in that, The device is applied to a server communicatively connected to each device to be configured, and the device includes: A first determination unit configured to determine the IP addresses of corresponding target devices to be configured according to a configuration file to be updated; A download unit configured to download the corresponding configuration file for each of the target devices to be configured according to the determined IP addresses, so that each of the target devices to be configured updates its configuration according to the corresponding configuration file.
11. The device according to claim 10, wherein, each configuration file includes the IP address of the corresponding device to be configured, and the first determination unit is further configured to: Determine the IP addresses of corresponding target devices to be configured according to the IP addresses in the configuration file to be updated.
12. The device according to claim 10, wherein, the first determination unit is further configured to: Invoke a configuration tool to execute the determination of the IP addresses of corresponding target devices to be configured according to the configuration file to be updated, wherein the configuration tool is software capable of performing configuration update operations.
13. The device according to claim 10, wherein, the device further includes: A second determination unit configured to determine the configuration file to be updated from the stored configuration files according to the input configuration file characterization information.
14. The device according to claim 10, wherein, the device further includes: A third determination unit configured to determine the current configuration file from the unexecuted configuration files to be updated; The first determination unit is further configured to determine the IP addresses of corresponding current target devices to be configured according to the current configuration file; The download unit is further configured to download the current configuration file for the current target devices to be configured according to the determined IP addresses.
15. The device according to claim 14, wherein, the download unit is further configured to: When there are multiple current target devices to be configured, download the current configuration file to each of the current target devices to be configured according to the IP addresses of each current target device to be configured.
16. A server for configuration update, wherein, it includes: A memory storing executable code; At least one processor communicatively connected to the memory, wherein the executable code, when executed by the at least one processor, causes the at least one processor to implement the method according to any one of claims 1 to 9.
17. A machine-readable storage medium storing executable code, and the executable code, when executed, causes a machine to implement the method according to any one of claims 1 to 9.