Controller bus fast update method, device and storage medium

By establishing interchangeable running and backup directories in the controller, the system can determine the initial release of configuration products and changes in bus configuration, enabling rapid updates to the controller bus. This solves the problem of long interruption times in traditional methods and improves system stability.

CN120144500BActive Publication Date: 2026-01-27NR ELECTRIC CO LTD +2
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510199689.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-02-24
Publication Date
2026-01-27
Estimated Expiration
2045-02-24

AI Technical Summary

Technical Problem

Traditional controller bus update methods result in long bus operation interruption times, affecting the stability of the control system.

Method used

The system employs interchangeable running and backup directories. By determining whether the configuration output issued by the configuration tool is the first issuance and whether the bus configuration has changed, the output is stored in different directories. A backup memory area is created when necessary to enable rapid updates to the bus configuration.

Benefits of technology

This effectively reduces the switching time for bus configuration updates and improves the operational stability of the control system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120144500B_ABST
    Figure CN120144500B_ABST
Patent Text Reader

Abstract

The application discloses a controller bus quick updating method, equipment and storage medium. The method comprises the following steps: establishing mutually switchable running directories and backup directories; when the configuration is updated, storing the configuration product issued into the backup directories; judging whether the bus configuration in the directories changes or not; if the bus configuration does not change, stopping the bus running, not releasing the running memory area, only switching the backup directories into the running directories, and then continuing to periodically schedule the bus running in the running memory area; if the bus configuration changes, loading the bus configuration of the backup directories to create a backup memory area, stopping the bus running, releasing the running memory area, directly switching the backup memory area into the running memory area, and then periodically scheduling the bus running. The application can realize the running switching of the bus by only establishing two mutually backup directories and memory areas, compared with the single memory area, can effectively reduce the switching time, especially when the bus configuration is not updated during the configuration updating, can further reduce the switching time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of industrial automation control, and particularly relates to the logic configuration and debugging process in industrial process control systems. Background Technology

[0002] In the field of industrial process control, to enhance functional versatility and improve applicability, controllers are compatible with various bus protocols such as Modbus TCP, Modbus RTU, IEC61850, and proprietary buses to achieve data exchange and communication with third-party devices. During the controller logic configuration creation and debugging process, configuration updates are involved, including bus updates. The traditional controller bus update method involves the controller receiving configuration products from the configuration tool and storing them in the configuration product directory. After the current cycle scheduling of the bus runtime memory area ends, the cycle scheduling of the bus runtime memory area is stopped, the bus runtime memory area is released, and the bus configuration from the unique configuration product directory is loaded to create a new runtime memory area for cycle scheduling again. Figure 1 As shown.

[0003] In certain application scenarios, such as when a user configuration defect is detected during controller operation and an immediate configuration update is required, the traditional controller bus update method results in a prolonged bus operation interruption. This increases the risk of logic errors during controller operation and significantly impacts the stability of the control system. Therefore, a new controller bus update method is needed to address the problem of long bus operation interruptions during configuration updates using traditional methods. Summary of the Invention

[0004] The technical problem to be solved by the present invention is to overcome the problems and defects of long bus operation interruption time during traditional controller bus updates, which affect the stability of the control system, and to provide a method, device and storage medium for fast controller bus updates.

[0005] The first aspect of the present invention provides a method for fast update of a controller bus, comprising the following steps:

[0006] Establish interchangeable running and backup directories;

[0007] When the configuration is updated, if the preset conditions are met, the configuration artifacts issued by the configuration tool will be stored in the backup directory.

[0008] Determine if the bus configuration in the backup directory has changed. If it has changed, load the configuration artifacts of the backup directory to create a bus configuration backup memory area.

[0009] Determine whether a backup memory area was created in the previous steps. If a backup memory area was created, switch the backup memory area to the bus running memory area.

[0010] Switch between the running directory and the backup directory, start periodic scheduling of the running memory area using the bus, synchronize the configuration products of the running directory to the backup directory, and wait for the reconfiguration update.

[0011] Preferably, the preset conditions include: determining whether it is the first time the configuration tool has issued a configuration product; if it is the first time the configuration tool has issued a configuration product, then the configuration product issued by the configuration tool is stored in the running directory; if it is not the first time the configuration tool has issued a configuration product, then the configuration product issued by the configuration tool is stored in the backup directory.

[0012] Preferably, determining whether it is the first time the configuration tool has issued a configuration product includes: during the power-on initialization process, the controller loads the configuration product from the running directory. If there is no configuration product in the running directory, the first-time configuration receiving flag is set to 1; if there is a configuration product in the running directory, the first-time configuration receiving flag is set to 0.

[0013] When the first configuration flag is set to 1, the controller receives the configuration product issued by the configuration tool. This is the first issuance. The first issued configuration product is stored in the current running directory, and then the first configuration flag is set to 0.

[0014] When the initial configuration flag is 0, the controller receives a configuration product from the configuration tool. If this is not the first time the configuration product has been received, the configuration product will be stored in the current backup directory.

[0015] Preferably, if the configuration tool issues configuration products for the first time, it no longer checks whether the bus configuration has changed. After loading the bus configuration products in the configuration products of the running directory and creating the bus running memory area, it starts periodically scheduling the bus running. It does not create a bus configuration backup memory area. Finally, it synchronizes the configuration products of the running directory to the backup directory and waits for the next configuration update.

[0016] Preferably, determining whether to create a backup memory area based on the determination result, after checking whether the bus configuration in the backup directory has changed, includes:

[0017] If the bus configuration in the backup directory remains unchanged, there is no need to load the configuration artifacts of the backup directory to create a bus configuration backup memory area.

[0018] If the bus configuration in the backup directory changes, the configuration artifacts of the backup directory need to be loaded to create a bus configuration backup memory area.

[0019] Preferably, the step of determining whether a backup memory area has been created in a previous step, and if so, switching the backup memory area to a bus running memory area, includes:

[0020] If a backup memory area is created, the bus running memory area needs to be released;

[0021] If no backup memory area is created, there is no need to release the bus running memory area.

[0022] Preferably, after determining whether a backup memory area has been created in the previous step, the system waits for the current cycle scheduling of the bus running memory area to end and then stops the cycle scheduling of the bus running memory area.

[0023] If the bus running memory area is released, the created backup memory area must be directly switched to the bus running memory area.

[0024] If the bus runtime memory area is not released, it will continue to be used.

[0025] Preferably, the running directory and the backup directory are two folders that alternately store configuration products and serve as backups for each other. The running directory stores the configuration products corresponding to the running memory area bus configuration. The backup directory is synchronized during operation and stores the same configuration products as the running directory. When the configuration tool issues a new configuration product, the backup directory stores that new configuration product. When the backup directory is switched to the running directory, the previous running directory is also switched to the backup directory accordingly.

[0026] A second aspect of the present invention provides an electronic device, including: a processor and a memory storing computer instructions that, when executed by the processor, cause the processor to perform the controller bus fast update method.

[0027] A third aspect of the present invention provides a non-transient computer storage medium storing a computer program that, when executed by multiple processors, causes the processors to execute the controller bus fast update method.

[0028] Compared with the prior art, the beneficial effects of the present invention include at least the following: only two mutually backup directories need to be established to switch the storage of new configuration products and two mutually backup memory areas need to be established to realize the operation switching of the bus. Compared with the bus operation switching of a single memory area, the switching time can be effectively reduced. In particular, when the configuration is updated, the bus configuration is not updated, which can further reduce the switching time. Attached Figure Description

[0029] Figure 1 This is a schematic diagram of the bus configuration loading process for a single memory area in the prior art;

[0030] Figure 2 This is a flowchart illustrating the method of the present invention;

[0031] Figure 3 This is a schematic diagram of the implementation process of the method of the present invention;

[0032] Figure 4This is a schematic diagram of the bus operation of the periodically scheduled memory area according to the present invention;

[0033] Figure 5 This is a schematic diagram of the structure of an electronic device provided by the present invention. Detailed Implementation

[0034] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.

[0035] Embodiment 1 of the present invention provides a method for fast update of a controller bus, the method comprising:

[0036] Establish a switchable running directory and backup directory. When the configuration is updated, the configuration artifacts issued by the configuration tool are stored in the backup directory. It is then determined whether the bus configuration has changed and different bus configuration loading processes are initiated. If there is no change, bus operation is stopped, the bus running memory area is not released, and the backup directory is simply switched to the running directory before the bus operation continues to be periodically scheduled in the bus running memory area. If there is a change, the bus configuration in the backup directory is loaded to create a backup memory area, bus operation is stopped, the bus running memory area is released, and the backup memory area is directly switched to the bus running memory area before the bus operation is periodically scheduled.

[0037] The most prominent substantive features of this invention and the significant progress it brings to the prior art include at least the following: the method of rapidly updating the controller bus only requires the establishment of two mutually backup directories and memory areas to achieve bus operation switching. Compared with the bus operation switching achieved by a single memory area, it can effectively reduce the switching time. In particular, the bus configuration is not updated during configuration updates, which can further reduce the switching time.

[0038] Embodiment 2 of the present invention provides a method for fast update of a controller bus, the method comprising:

[0039] Create two directories, A and B, which serve as backups for each other. Directory A acts as the running directory, while directory B acts as the backup directory. The running and backup directories can switch between each other; when directory A is the running directory, directory B is the backup directory, and vice versa. Thus, directories A and B act as backups for each other. For example, but not limited to, initially designating directory A as the running directory and directory B as the backup directory.

[0040] The configuration artifacts initially issued by the configuration tool are stored in directory A, which is initially designated as the running directory. After loading the bus configuration artifacts in directory A to create the bus running memory area, the bus running is periodically scheduled. Finally, the configuration artifacts in directory A, which is currently the running directory, are synchronized to directory B, which is the backup directory, and await the next configuration update.

[0041] When the configuration is updated, the new configuration product issued by the configuration tool is stored in directory B, which is currently used as the backup directory. Before loading the bus configuration in the configuration product of directory B, it is first determined whether the bus configuration of directory B has changed compared with the bus configuration of the bus running memory area.

[0042] If there are no changes, wait for the current cycle scheduling to end and then stop the cycle scheduling operation of the bus running memory area. Do not release the bus running memory area, but only switch the running directory from directory A to directory B and continue the cycle scheduling operation in the bus running memory area. At the same time, synchronize the configuration products of the running directory to the backup directory.

[0043] If there are any changes, load the bus configuration of backup directory B to create a backup memory area, then wait for the end of this cycle of scheduling to stop the cycle of scheduling of the bus running memory area, release the bus running memory area, directly switch the backup memory area to the running memory area, switch the backup directory to the running directory, start the cycle of scheduling of the bus, and at the same time synchronize the configuration products of directory B to directory A.

[0044] It is understandable that when the configuration is updated again, the bus operation will be switched in the same way as above, and the operating directory will be switched from directory B to directory A. At this time, directory B becomes the backup directory again. Therefore, directory A and directory B are backups of each other.

[0045] like Figure 2 As shown, Embodiment 3 of the present invention provides a method for fast update of the controller bus, the method comprising:

[0046] Step 1: Create two directories that serve as backups for each other, one as the running directory and the other as the backup directory. The running directory and the backup directory can be switched between each other.

[0047] Specifically, two directories, A and B, are created to serve as backups for each other. The two directories are used as the running directory and the backup directory, respectively. The running directory and the backup directory can be switched between each other. When directory A is used as the running directory, directory B is the backup directory. When directory A is switched to the backup directory, directory B is switched to the running directory. Thus, directory A and directory B serve as backups for each other.

[0048] Initially, either directory A or directory B is designated as the running directory, and the other as the backup directory. For clarity, but not limitation, directory A is initially designated as the running directory, and directory B as the backup directory.

[0049] Step 2: When the configuration is updated, the controller receives the configuration artifacts issued by the configuration tool and stores them in the backup directory.

[0050] The process of receiving configuration artifacts from the configuration tool requires determining whether it is the first time the tool has issued such artifacts. If it is the first time, the configuration artifacts are stored in the running directory; otherwise, they are stored in the backup directory. Specifically, this includes:

[0051] a) During the power-on initialization process, the controller loads configuration products from the running directory. If there are no configuration products in the running directory, the first configuration reception flag is set to 1. It can be understood that in step 1, the initially specified directory A is the running directory. Therefore, during the power-on initialization process, the controller loads configuration products from directory A. If there are no configuration products in directory A, the first configuration reception flag is set to 1; if there are configuration products in directory A, the first configuration reception flag is set to 0.

[0052] b) When the first received configuration flag is 1, the controller receives the configuration product issued by the configuration tool. This is the first issuance. The first issued configuration product is stored in directory A, which is currently the running directory, and then the first received configuration flag is set to 0.

[0053] c) When the initial configuration flag is 0, the controller receives a configuration product issued by the configuration tool. If this is not the first issuance, the configuration product will be stored in directory B, which is currently used as a backup directory.

[0054] Step 3: Determine if there have been any changes to the bus configuration and decide whether to create a backup memory area.

[0055] If the configuration tool issues a configuration product for the first time, the configuration product is stored in directory A, which is currently the running directory. It no longer checks whether the bus configuration has changed. After loading the bus configuration product in the configuration product of directory A and creating the bus running memory area, it starts to periodically schedule the bus operation. It does not create a bus configuration backup memory area for the time being. Finally, it jumps to step 5 to synchronize the configuration product of directory A to directory B, which is the backup directory.

[0056] If the configuration tool is not being issued for the first time, continue to check if the bus configuration has changed:

[0057] a) If there are no changes, there is no need to load the current directory B configuration artifact used as the backup directory to create a bus configuration backup memory area;

[0058] b) If there are any changes, the configuration artifacts of directory B, which is currently used as the backup directory, need to be loaded to create a bus configuration backup memory area.

[0059] Step 4: Determine whether a backup memory area has been created, determine whether to release the bus running memory area, and then start different bus configuration loading processes.

[0060] Step 4.1: As described in Step 4 above, determine whether a backup memory area has been created. Determining whether a backup memory area has been created and whether the bus running memory area needs to be released includes:

[0061] a) If a backup memory area has been created, the bus running memory area needs to be released;

[0062] b) If no backup memory area is created, there is no need to release the bus running memory area.

[0063] Step 4.2: As described in Step 4 above, to initiate different bus configuration loading processes, it is necessary to determine whether the bus runtime memory area has been released.

[0064] a) If the bus running memory area is released, the created backup memory area must be directly switched to the bus running memory area;

[0065] b) If the bus running memory area is not released, the bus running memory area will continue to be used.

[0066] Step 4.3: As described in Step 4 above, start different bus configuration loading processes, including switching directory B, which is currently the backup directory, to the running directory, and switching directory A, which is currently the running directory, to the backup directory.

[0067] Step 5: Synchronize the configuration artifacts of the running directory to the backup directory.

[0068] As mentioned in step 5 above, the running directory and the backup directory are two folders that alternately store configuration products and serve as backups for each other. The running directory stores the configuration products corresponding to the running memory area bus configuration. The backup directory is synchronized during operation and stores the same configuration products as the running directory. When the configuration tool issues a new configuration product, the backup directory will store the new configuration product. When the backup directory is switched to the running directory, the previous running directory will also be switched to the backup directory accordingly.

[0069] It is understood that Example 3 uses the initial specified directory A as the running directory and directory B as the backup directory as an example. However, it is only an example and not a limiting implementation. If the initial specified directory B is the running directory and directory A is the backup directory, the same principle applies as described in Example 3. Only directories A and B can be interchanged in the subsequent steps of this example.

[0070] like Figure 3 As shown, Embodiment 4 of the present invention provides a method for fast update of the controller bus, the method comprising:

[0071] Step S101: Create directory A and directory B in the manner disclosed in Example 3, and determine whether the configuration tool is issuing configuration products for the first time. If it is issuing for the first time, proceed to step S102; otherwise, proceed to step S103.

[0072] Step S102: Store the configuration product in directory A, which is currently the running directory. After loading the bus configuration product in directory A to create the bus running memory area, jump to step S111 to start the periodic scheduling of bus operation.

[0073] Step S103: Store the configuration product in directory B, which is currently used as the backup directory.

[0074] It is understood that steps S101 to S103 are exemplarily described with the current running directory as directory A and the backup directory as directory B; if the current running directory is B, then the backup directory is A, simply by swapping the letters A and B.

[0075] Step S104: Determine whether the bus configuration in the configuration product issued by the configuration tool has changed. If it has changed, proceed to step S105. If it has not changed, there is no need to create a backup memory area, and proceed to step S106.

[0076] Step S105: Load bus configuration and create backup memory area.

[0077] Step S106: Wait for the current cycle scheduling of the bus running memory area to end.

[0078] Step S107: Stop the periodic scheduling of the bus running memory area. If a backup memory area was created by loading the bus configuration in step S105, continue to step S108; otherwise, jump to step S110.

[0079] Step S108: Release the bus running memory area.

[0080] Step S109: The created backup memory area is directly switched to the running memory area.

[0081] Step S110: Switch directory B, which is currently the backup directory, to the running directory, and switch directory A, which is currently the running directory, to the backup directory.

[0082] Step S111: A new round of cycle scheduling begins in the bus running memory area. The bus running process in the cycle scheduling running memory area is as follows: Figure 4 As shown, the process includes: after the periodic scheduling starts, reading all bus inputs, calculating the user configuration program, writing all bus outputs, and ending the periodic scheduling.

[0083] Step S112: Synchronize the configuration output of the running directory to the backup directory.

[0084] Figure 5 The diagram illustrates a structure of an electronic device according to Embodiment 5 of the present invention. The electronic device includes a processor and a memory. The memory stores computer instructions. When the processor executes the computer instructions, it causes the processor to execute the computer instructions to achieve the following: Figure 2 The diagram illustrates a rapid update method and detailed scheme for the controller bus, and the data exchange between devices via the communication module.

[0085] Embodiment 6 of this application also provides a non-transitory computer storage medium storing a computer program, which, when executed by multiple processors, causes the processors to perform actions such as... Figure 2 The diagram illustrates a rapid update method for the controller bus and a detailed scheme.

[0086] It should be emphasized that the examples described in this invention are illustrative rather than limiting. Therefore, this invention is not limited to the examples described in the specific embodiments. Any other embodiments derived by those skilled in the art based on the technical solutions of this invention, without departing from the spirit and scope of this invention, whether modifications or substitutions, are also within the protection scope of this invention.

Claims

1. A method for fast update of a controller bus, characterized in that, Includes the following steps: Establish interchangeable running and backup directories; When the configuration is updated, if the preset conditions are met, the configuration artifacts issued by the configuration tool will be stored in the backup directory. The preset conditions include: determining whether it is the first time the configuration tool has issued a configuration product; if it is the first time the configuration tool has issued a configuration product, then the configuration product issued by the configuration tool is stored in the running directory; if it is not the first time the configuration tool has issued a configuration product, then the configuration product issued by the configuration tool is stored in the backup directory. Determine if the bus configuration in the backup directory has changed. If it has changed, load the configuration artifacts of the backup directory to create a bus configuration backup memory area. Determine whether a backup memory area was created in the previous steps. If a backup memory area was created, switch the backup memory area to the bus running memory area. Switch between the running directory and the backup directory, start periodic scheduling of the running memory area using the bus, synchronize the configuration products of the running directory to the backup directory, and wait for the reconfiguration update.

2. The controller bus fast update method as described in claim 1, characterized in that: The determination of whether it is the first time the configuration tool has issued a configuration product includes: during the power-on initialization process, the controller loads the configuration product from the running directory. If there is no configuration product in the running directory, the first configuration received flag is set to 1; if there is a configuration product in the running directory, the first configuration received flag is set to 0. When the first configuration flag is set to 1, the controller receives the configuration product issued by the configuration tool. This is the first issuance. The first issued configuration product is stored in the current running directory, and then the first configuration flag is set to 0. When the initial configuration flag is 0, the controller receives a configuration product from the configuration tool. If this is not the first time the configuration product has been received, the configuration product will be stored in the current backup directory.

3. The controller bus fast update method as described in claim 2, characterized in that: If the configuration tool issues configuration products for the first time, it will no longer check whether the bus configuration has changed. After loading the bus configuration products in the configuration products in the running directory and creating the bus running memory area, it will start periodically scheduling the bus running. It will not create a bus configuration backup memory area. Finally, it will synchronize the configuration products in the running directory to the backup directory and wait for the next configuration update.

4. A controller bus fast update method as described in any one of claims 1 to 2, characterized in that: The step of determining whether the bus configuration in the backup directory has changed, and determining whether to create a backup memory area based on the determination result, includes: If the bus configuration in the backup directory remains unchanged, there is no need to load the configuration artifacts of the backup directory to create a bus configuration backup memory area. If the bus configuration in the backup directory changes, the configuration artifacts of the backup directory need to be loaded to create a bus configuration backup memory area.

5. The controller bus fast update method as described in claim 4, characterized in that: The determination of whether a backup memory area was created in a previous step, and if so, the switching of the backup memory area to the bus running memory area, includes: If a backup memory area is created, the bus running memory area needs to be released; If no backup memory area is created, there is no need to release the bus running memory area.

6. The controller bus fast update method as described in claim 5, characterized in that: After determining whether a backup memory area has been created in the previous step, wait for the current cycle scheduling of the bus running memory area to end, and then stop the cycle scheduling of the bus running memory area. If the bus running memory area is released, the created backup memory area must be directly switched to the bus running memory area. If the bus runtime memory area is not released, it will continue to be used.

7. The controller bus fast update method as described in claim 1, characterized in that: The running directory and the backup directory are two folders that alternately store configuration products and serve as backups for each other. The running directory stores the configuration products corresponding to the running memory area bus configuration. The backup directory is synchronized during operation and stores the same configuration products as the running directory. When the configuration tool issues a new configuration product, the backup directory stores that new configuration product. When the backup directory is switched to the running directory, the previous running directory is also switched to the backup directory accordingly.

8. An electronic device, characterized in that, include: The processor and memory store computer instructions that, when executed by the processor, cause the processor to perform the controller bus fast update method according to any one of claims 1-7.

9. A non-transient computer storage medium storing a computer program that, when executed by a plurality of processors, causes the processors to perform the controller bus fast update method according to any one of claims 1-7.

Citation Information

Patent Citations

  • System updating method, device and computer readable memory medium

    CN107273139A

  • Configuration management method of mimicry industrial controller

    CN112486737A