Logic multiplexing method and device for industrial control program

By responding to template modification operations in industrial control programs and filtering and updating associated control logic instances from the instance database, the inefficiency of existing technologies is solved, enabling accurate synchronous updates of complex logic and improving maintenance efficiency.

CN121348939APending Publication Date: 2026-01-16SUPCON TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511503479.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-21
Publication Date
2026-01-16

AI Technical Summary

Technical Problem

Existing logic reuse methods for industrial control programs are inefficient and make it difficult to accurately update complex control logic, especially in distributed control systems where manual modifications are required one by one.

Method used

In response to a modification operation of the control logic template, control logic instances associated with the modified control logic template are selected from the instance database, and these instances are updated according to the new control logic to establish the association between the template and the instances, ensuring synchronous modification.

Benefits of technology

This approach improves efficiency while ensuring accurate updates of complex control logic, reducing manual adjustments and enhancing maintenance efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121348939A_ABST
    Figure CN121348939A_ABST
Patent Text Reader

Abstract

The invention discloses a logic multiplexing method and device for an industrial control program, and the method comprises the steps: screening out a control logic instance associated with a modified control logic template from an instance database in response to the modification operation of the control logic template; acquiring control logic from the modified control logic template; and for each control logic instance, updating the control logic instance according to the control logic to obtain an updated control logic instance. When the control logic template is modified, control logic instances associated with the modified template can be screened out, and the instances are updated according to new control logic. Therefore, all the associated control logic instances can be synchronously modified, and manual one-by-one adjustment is not needed, so that the efficiency is improved, and meanwhile, the accurate updating of the complex control logic is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of automation control, and in particular to a logic reuse method and device for industrial control programs. BACKGROUND

[0002] In modern industrial automation, especially in the development process of distributed control systems, many control logics are repeatedly present. Although these logics are different in different application scenarios, most of the changes are limited to the adjustment of physical I / O points, device parameters and control strategies. Due to the repeatability of these control logics, developers usually reuse existing codes to reduce the development workload.

[0003] Currently, the logic reuse method for industrial control programs usually relies on "copy and paste". Developers copy the existing control logic to a new location and then manually modify part of the content as needed. However, when the control logic needs to be modified, the developer must manually modify all the copied parts one by one, and modifying one place may require adjustment in multiple locations. This not only is inefficient, but also is difficult to accurately update complex control logics. SUMMARY

[0004] The present application provides a logic reuse method and device for industrial control programs, aiming to improve efficiency while ensuring accurate updating of complex control logics.

[0005] To achieve the above-mentioned purpose, the present application provides the following technical solutions:

[0006] The first aspect of the present application provides a logic reuse method for industrial control programs, comprising:

[0007] In response to a modification operation of a control logic template, filtering out control logic instances associated with the modified control logic template from an instance database;

[0008] Obtaining control logic from the modified control logic template;

[0009] For each control logic instance, updating the control logic instance according to the control logic to obtain an updated control logic instance.

[0010] Optionally, it further comprises:

[0011] Encapsulating a logic control strategy as an initial logic control template;

[0012] Defining input and output interfaces of the initial logic control template;

[0013] After the input and output interfaces are defined, configuring initial parameters of the initial logic control template;

[0014] determining the initial logic control template with the completed parameter configuration as a logic control template and storing the logic control template into a template library.

[0015] Optionally, after the initial logic control template with the completed parameter configuration is determined as a logic control template and stored into the template library, the method further comprises:

[0016] when the logic control template in the template library is detected to be invoked, creating a control logic instance corresponding to the logic control template;

[0017] adding an identifier to the control logic instance;

[0018] after the adding of the identifier is completed, establishing an association between the control logic instance and the logic control template;

[0019] storing the control logic instance and the association between the control logic instance and the logic control template into an instance database.

[0020] Optionally, the updating of the control logic instance according to the control logic to obtain an updated control logic instance comprises:

[0021] detecting whether the control logic is an initial parameter control logic;

[0022] if the control logic is the initial parameter control logic, adding the control logic into the control logic instance to obtain an updated control logic instance;

[0023] if the control logic is not the initial parameter control logic, replacing the initial control logic in the control logic instance with the control logic to obtain an updated control logic instance.

[0024] Optionally, after the control logic is obtained from the modified control logic template, the method further comprises:

[0025] obtaining a general control logic of the control logic template;

[0026] detecting whether the control logic is the general control logic;

[0027] if the control logic is the general control logic, performing the step of updating the control logic instance according to the control logic to obtain an updated control logic instance for each control logic instance;

[0028] if the control logic is not the general control logic, after the association between the control logic template and the control logic instance is disconnected, modifying the control logic instance according to the control logic.

[0029] The second aspect of the present application provides a logic multiplexing device of an industrial control program, comprising:

[0030] a screening unit configured to screen, in response to a modification operation of the control logic template, a control logic instance associated with the modified control logic template from a database of instances;

[0031] an obtaining unit configured to obtain control logic from the modified control logic template;

[0032] an updating unit configured to, for each of the control logic instances, update the control logic instance according to the control logic, to obtain an updated control logic instance.

[0033] Optionally, the logic multiplexing device further comprises:

[0034] a packaging unit configured to package the logic control strategy as an initial logic control template;

[0035] a defining unit configured to define an input interface and an output interface of the initial logic control template;

[0036] a configuring unit configured to, after the definition of the input interface and the output interface is completed, configure initial parameters of the initial logic control template;

[0037] a storage unit configured to determine the initial logic control template after the parameter configuration is completed as a logic control template, and store the logic control template into a template library.

[0038] Optionally, the logic multiplexing device further comprises:

[0039] a creating unit configured to, when detecting that the logic control template in the template library is invoked, create a control logic instance corresponding to the logic control template;

[0040] an adding unit configured to add an identifier to the control logic instance;

[0041] an establishing unit configured to, after the addition of the identifier is completed, establish an association between the control logic instance and the logic control template;

[0042] a target storage unit configured to store the control logic instance and the association between the control logic instance and the logic control template into a database of instances.

[0043] Optionally, the updating unit comprises:

[0044] a detecting subunit configured to detect whether the control logic is initial parameter control logic;

[0045] Add a subunit, which is used to add the control logic to the control logic instance if the control logic is the control logic of the initial parameters, so as to obtain an updated control logic instance;

[0046] The replacement subunit is used to replace the initial control logic in the control logic instance with the control logic if the control logic is not the control logic of the initial parameter, so as to obtain an updated control logic instance.

[0047] Optional, also includes:

[0048] The logic acquisition unit is used to acquire the general control logic of the control logic template;

[0049] A logic detection unit is used to detect whether the control logic is the general control logic;

[0050] An execution unit is configured to, if the control logic is the general control logic, execute the step of updating the control logic instance according to the control logic for each control logic instance to obtain the updated control logic instance;

[0051] The modification unit is used to, if the control logic is not the general control logic, disconnect the association between the control logic template and the control logic instance, and then modify the control logic instance according to the control logic.

[0052] The technical solution provided in this application, in response to a modification operation of the control logic template, filters out control logic instances associated with the modified control logic template from the instance database; obtains the control logic from the modified control logic template; and updates each control logic instance according to the control logic to obtain the updated control logic instance. When the control logic template is modified, it filters out control logic instances associated with the modified template and updates these instances according to the new control logic. In this way, all associated control logic instances are modified synchronously, eliminating the need for manual adjustments one by one, thereby improving efficiency while ensuring accurate updates of complex control logic. Attached Figure Description

[0053] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0054] Figure 1 A flowchart illustrating a logic reuse method for an industrial control program provided in this application embodiment;

[0055] Figure 2 A flowchart illustrating another logic reuse method for an industrial control program provided in this application embodiment;

[0056] Figure 3 A schematic diagram illustrating the basic steps of industrial control program logic reuse provided in this application embodiment;

[0057] Figure 4 This is a schematic diagram of the architecture of a logic multiplexing device for an industrial control program provided in an embodiment of this application. Detailed Implementation

[0058] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0059] In this application, the terms "comprising," "including," or any other variations thereof are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0060] like Figure 1 The diagram shown is a flowchart of a logic reuse method for an industrial control program provided in an embodiment of this application, including the following steps:

[0061] S101: In response to the modification operation of the control logic template, filter out the control logic instances associated with the modified control logic template from the instance database.

[0062] Understandably, during the lifecycle of an industrial control program, modifications to the original control logic template may be necessary for process optimization or fault repair. For example, a defect might be found in a limiting logic within the "PID control template," requiring adjustment. When developers modify and save the "PID control template," the system will respond to this modification by selecting control logic instances associated with the modified template from the instance database.

[0063] Specifically, by comparing the parameter information (such as the template file version number, timestamp, or content hash value) of the original control logic template and the control logic template itself, it is determined whether the original control logic template has been modified. If the parameter information of the original control logic template and the control logic template is inconsistent, it is determined that the original control logic template has been modified. In response to the modification operation of the control logic template, the control logic instance associated with the modified control logic template is selected from the instance database. If the parameter information of the original control logic template and the control logic template is consistent, it is determined that the original control logic template has not been modified.

[0064] Optionally, before step S101, a logic control template corresponding to the logic control strategy needs to be created first. By establishing a unified control template, subsequent modifications can be more easily made on the basis of the existing framework, reducing repetitive work and improving code maintainability. Therefore, this application embodiment provides a logic control template construction method, including processes A1 to A4.

[0065] A1: Encapsulate the logic control strategy into an initial logic control template.

[0066] Among them, the logic control strategy is a general and reusable control strategy. For example, a typical PID control loop (i.e., a logic control strategy) can be encapsulated into a "PID control template" (i.e., an initial logic control template).

[0067] A2: Define the input and output interfaces of the initial logic control template.

[0068] The input interface is responsible for receiving external data, while the output interface is responsible for returning the template results to the external system.

[0069] For example, inputs such as setpoints and process values ​​are received through the input interface of the PID control template, and outputs such as control quantities are sent through the input interface of the PID control template.

[0070] A3: After the input and output interfaces are defined, configure the initial parameters of the initial logic control template.

[0071] For example, the initial parameters of a PID control template include, but are not limited to, the proportional coefficient Kp, integral time Ti, derivative time Td, range, and dead zone.

[0072] A4: The initial logic control template with completed parameter configuration is identified as the logic control template and stored in the template library.

[0073] Understandably, the initial logic control template with completed parameter configuration is designated as the logic control template. This template not only contains the core logic code but also defines the input and output interfaces, as well as the initial parameters. The logic control template is stored in the template library in a specific file format (such as XML, JSON, proprietary binary format, etc.).

[0074] It should be noted that processes A1 through A4 can be completed using specialized graphical programming tools or text editors.

[0075] Optionally, after process A4, it is also necessary to establish the association between the control logic template and the control logic instance. When the control logic template is modified, the relevant control logic instance will be automatically updated synchronously. This reduces the tedious work of manually modifying each instance and improves maintenance efficiency. Therefore, in another embodiment of this application, a method for establishing the association is provided, including processes B1 to B4.

[0076] B1: When a logic control template in the template library is detected to be invoked, a control logic instance corresponding to the logic control template is created.

[0077] Understandably, when a logic control strategy is required in a specific industrial control program (such as a DCS configuration project), a corresponding control logic template can be selected from the template library. At this point, the system will detect that a logic control template in the template library has been invoked and create a control logic instance corresponding to that template.

[0078] For example, in a system containing multiple PID control loops, developers can select the "PID control template" multiple times, creating an independent "PID control instance" each time it is selected. In other words, each time the "PID control template" is invoked, a control logic instance corresponding to the logic control template is created.

[0079] B2: Add an identifier for the control logic instance.

[0080] Understandably, each time a logic control template in the template library is called, a corresponding control logic instance is created. If it is called ten times, then ten control logic instances need to be created, and each control logic instance is assigned a unique identifier.

[0081] For example, the "PID control template" in the template library is called twice to create two "PID control instances". Unique identifiers are assigned to the two "PID control instances" as "PID_Loop_Motor1" and "PID_Loop_Heater2" respectively.

[0082] B3: After the identifier is added, establish the association between the control logic instance and the logic control template.

[0083] Once the identifier is added, an association is established between the control logic instance and the logic control template. This association can be achieved by referencing the template ID or file path, or by maintaining a parent-child relationship chain in the internal data structure.

[0084] B4: Store the control logic instance and the association between the control logic instance and the logic control template in the instance database.

[0085] It should be noted that after storing the control logic instances and their associations with the logic control templates in the instance database, you can store the instance-specific parameters for each control logic instance independently in the instance database. For example, the Kp, Ti, and Td parameters of "PID_Loop_Motor1" may be different from those of "PID_Loop_Heater2".

[0086] S102: Obtain the control logic from the modified control logic template.

[0087] It is understandable that the control logic is obtained from the modified control logic template so that the corresponding control logic instance can be updated subsequently based on the control logic.

[0088] S103: For each control logic instance, update the control logic instance according to the control logic to obtain the updated control logic instance.

[0089] It is understandable that updating the control logic instance based on the control logic means synchronizing the control logic to the instance so that it can be updated accordingly.

[0090] Optionally, in another embodiment of this application, the specific implementation process of step S103 includes processes C1 to C3.

[0091] C1: Control logic that detects whether the control logic is the initial parameter control logic.

[0092] If the control logic is the control logic with initial parameters, then process C2 is executed; if the control logic is not the control logic with initial parameters, then process C3 is executed.

[0093] It is understandable that the control logic for detecting whether it is the control logic of the initial parameter is the logic for detecting whether the control logic is a configuration parameter (i.e., the initial parameter) specific to the control logic instance. If it is, then process C2 is executed; if not, then process C3 is executed.

[0094] C2: Add the control logic to the control logic instance to obtain the updated control logic instance.

[0095] It is understandable that if the control logic is the logic with configuration parameters unique to the control logic instance, then it is only necessary to add the control logic to the control logic instance to ensure that updates to the core logic of the control logic instance will not overwrite the initial parameter settings.

[0096] In addition, if these parameters (i.e., unique configuration parameters) are part of the control logic and conflicting modifications occur, the user should be prompted for confirmation to avoid unnecessary misoperation.

[0097] C3: Replace the initial control logic in the control logic instance with the new control logic to obtain the updated control logic instance.

[0098] In summary, when a control logic template is modified, the control logic instances associated with the modified template are selected, and these instances are updated according to the new control logic. In this way, all associated control logic instances are modified synchronously, eliminating the need for manual adjustments one by one. This improves efficiency while ensuring accurate updates of complex control logic.

[0099] like Figure 2 The diagram shown is a flowchart of another logic reuse method for an industrial control program provided in this application embodiment, including the following steps:

[0100] S201: In response to the modification operation of the control logic template, filter out the control logic instances associated with the modified control logic template from the instance database.

[0101] It should be noted that the specific implementation of step S201 can be referred to step S101 accordingly, and will not be repeated here.

[0102] S202: Obtain the control logic from the modified control logic template.

[0103] It should be noted that the specific implementation of step S202 can be referred to step S102 accordingly, and will not be repeated here.

[0104] S203: Obtain the general control logic of the control logic template.

[0105] For example, the general control logic of the control logic template "PID_Loop_Motor3" is PID control.

[0106] S204: Detect whether the control logic is general control logic.

[0107] If the control logic is general control logic, then execute step S205; if the control logic is not general control logic, then execute step S206.

[0108] Understandably, in certain special cases, some control logic instances may require highly customized modifications, deviating from the template's generality. Therefore, it is necessary to detect whether the control logic is general control logic.

[0109] For example, the general control logic of the control logic template "PID_Loop_Motor3" is PID control, and the control logic is unconventional fault diagnosis and processing logic. However, this control logic is not suitable to be included in the general control logic (i.e., the control logic is not general control logic). In this case, step S206 is executed.

[0110] S205: For each control logic instance, update the control logic instance according to the control logic to obtain the updated control logic instance.

[0111] It should be noted that the specific implementation of step S205 can be referred to step S103 accordingly, and will not be repeated here.

[0112] S206: After disconnecting the association between the control logic template and the control logic instance, modify the control logic instance according to the control logic.

[0113] For example, disconnecting the association between the "PID_Loop_Motor3" instance and the "PID control template" will transform the control logic instance into an independent control logic block, no longer affected by template updates. Thereafter, any modifications to the "PID control template" will no longer affect "PID_Loop_Motor3". "PID_Loop_Motor3" will retain its state at the time of disconnection and can be modified and maintained completely independently.

[0114] In order to better understand Figure 1 and Figure 2 The content shown is explained below. See also: Figure 3 The diagram illustrates the basic steps of industrial control program logic reuse. Control logic modules are created and stored in a control logic template library. When a control logic template is detected to be called, a corresponding control logic instance is created. When the system detects an update to the control logic template, it filters out control logic instances associated with the modified template from the instance database. If the control logic is general control logic, each control logic instance is updated according to the control logic to obtain the updated instance. If the control logic is not general control logic, the association between the control logic template and the control logic instance is broken, and the instance is modified according to the control logic.

[0115] In addition, logic reuse can be achieved through custom function blocks, domain-specific languages, and advanced code generators.

[0116] In summary, disconnecting the control logic instance from the template provides a high degree of customization and flexibility, allowing specific instances to be modified independently as needed without being affected by template updates. This approach avoids potential interference from template updates, ensures the stability of customized logic, and reduces the complexity of maintenance and modification.

[0117] like Figure 4 The diagram shown is an architectural schematic of a logic multiplexing device for an industrial control program provided in an embodiment of this application. The logic multiplexing device includes a filtering unit 100, an acquisition unit 200, and an update unit 300.

[0118] The filtering unit 100 is used to filter out control logic instances associated with the modified control logic template from the instance database in response to the modification operation of the control logic template.

[0119] Acquisition unit 200 is used to acquire control logic from the modified control logic template.

[0120] The update unit 300 is used to update the control logic instance according to the control logic for each control logic instance, so as to obtain the updated control logic instance.

[0121] Update unit 300, including:

[0122] The detection subunit is used to detect whether the control logic is the control logic with the initial parameters.

[0123] Add a sub-unit to add the control logic to the control logic instance if the control logic is the initial parameter, thus obtaining the updated control logic instance.

[0124] The replacement subunit is used to replace the initial control logic in the control logic instance with the control logic if the control logic is not the initial parameter control logic, thus obtaining the updated control logic instance.

[0125] In summary, when a control logic template is modified, the control logic instances associated with the modified template are selected, and these instances are updated according to the new control logic. In this way, all associated control logic instances are modified synchronously, eliminating the need for manual adjustments one by one. This improves efficiency while ensuring accurate updates of complex control logic.

[0126] Combination Figure 4 The logic multiplexing device, as shown, also includes:

[0127] The encapsulation unit is used to encapsulate the logic control strategy into an initial logic control template.

[0128] Define the unit, which is used to define the input and output interfaces of the initial logic control template.

[0129] The configuration unit is used to configure the initial parameters of the initial logic control template after the input and output interfaces are defined.

[0130] The storage unit is used to determine the initial logic control template with completed parameter configuration as the logic control template and store it in the template library.

[0131] Combination Figure 4 The logic multiplexing device, as shown, also includes:

[0132] The creation unit is used to create a control logic instance corresponding to the logic control template when a logic control template in the template library is detected to be called.

[0133] Add a unit to add an identifier to the control logic instance.

[0134] The creation unit is used to establish the association between the control logic instance and the logic control template after the identifier is added.

[0135] The target storage unit is used to store control logic instances and the association between control logic instances and logic control templates in the instance database.

[0136] Combination Figure 4 The logic multiplexing device, as shown, also includes:

[0137] The logic acquisition unit is used to acquire the general control logic of the control logic template;

[0138] The logic detection unit is used to detect whether the control logic is general-purpose control logic.

[0139] The execution unit is used to perform the step of updating the control logic instance according to the control logic for each control logic instance if the control logic is general control logic, so as to obtain the updated control logic instance.

[0140] The modification unit is used to modify the control logic instance according to the control logic after disconnecting the association between the control logic template and the control logic instance if the control logic is not general control logic.

[0141] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. In particular, for system or system embodiments, since they are fundamentally similar to method embodiments, the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments. The systems and system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. Components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without creative effort.

[0142] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.

[0143] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method of logic reuse for an industrial control program, the method comprising: The method comprises the following steps: in response to a modification operation of the control logic template, screening control logic instances associated with the modified control logic template from an instance database; obtaining control logic from the modified control logic template; updating the control logic instances according to the control logic to obtain updated control logic instances.

2. The method of claim 1, wherein, The method further comprises the following steps: encapsulating a logic control strategy as an initial logic control template; defining input interfaces and output interfaces of the initial logic control template; configuring initial parameters of the initial logic control template after the input interfaces and the output interfaces are defined; determining the initial logic control template with the configured parameters as a logic control template and storing the logic control template in a template library.

3. The method of claim 2, wherein, After the step of determining the initial logic control template with the configured parameters as a logic control template and storing the logic control template in a template library, the method further comprises the following steps: when detecting that the logic control template in the template library is called, creating a control logic instance corresponding to the logic control template; adding an identifier to the control logic instance; establishing an association between the control logic instance and the logic control template after the identifier is added; storing the control logic instance and the association between the control logic instance and the logic control template in an instance database.

4. The method of claim 1, wherein, The step of updating the control logic instances according to the control logic to obtain updated control logic instances comprises the following steps: detecting whether the control logic is initial parameter control logic; if the control logic is the initial parameter control logic, adding the control logic to the control logic instance to obtain updated control logic instances; if the control logic is not the initial parameter control logic, replacing initial control logic in the control logic instance with the control logic to obtain updated control logic instances.

5. The method of claim 1, wherein, After the step of obtaining control logic from the modified control logic template, the method further comprises the following steps: obtaining general control logic of the control logic template; detecting whether the control logic is the general control logic; if the control logic is the general control logic, performing the step of updating the control logic instances according to the control logic to obtain updated control logic instances; if the control logic is not the general control logic, disconnecting the association between the control logic template and the control logic instance and modifying the control logic instance according to the control logic.

6. A logic multiplexing apparatus for an industrial control program, characterized by comprising: The method comprises the following steps: a screening unit is configured to screen control logic instances associated with a modified control logic template from an instance database in response to a modification operation of the control logic template; an obtaining unit is configured to obtain control logic from the modified control logic template; an updating unit is configured to update the control logic instances according to the control logic to obtain updated control logic instances.

7. The apparatus of claim 6, wherein, The method further comprises the following steps: an encapsulating unit is configured to encapsulate a logic control strategy as an initial logic control template; a defining unit is configured to define input interfaces and output interfaces of the initial logic control template; a configuring unit is configured to configure initial parameters of the initial logic control template after the input interfaces and the output interfaces are defined. The configuration unit is configured to configure initial parameters of the initial logic control template after definition of the input interface and the output interface is completed. The storage unit is configured to determine the initial logic control template with completed parameter configuration as a logic control template and store the logic control template into a template library.

8. The apparatus of claim 7, wherein, Further comprising: The creation unit is configured to create a control logic instance corresponding to the logic control template when it is detected that the logic control template in the template library is invoked. The adding unit is configured to add an identifier to the control logic instance. The establishment unit is configured to establish an association between the control logic instance and the logic control template after the identifier is added. The target storage unit is configured to store the control logic instance and the association between the control logic instance and the logic control template into an instance database.

9. The apparatus of claim 6, wherein, The updating unit comprises: The detection subunit is configured to detect whether the control logic is initial parameter control logic. The adding subunit is configured to add the control logic to the control logic instance to obtain an updated control logic instance if the control logic is the initial parameter control logic. The replacing subunit is configured to replace initial control logic in the control logic instance with the control logic to obtain an updated control logic instance if the control logic is not the initial parameter control logic.

10. The apparatus of claim 6, wherein, Further comprising: The logic acquisition unit is configured to acquire general control logic of a control logic template. The logic detection unit is configured to detect whether the control logic is the general control logic. The execution unit is configured to execute the step of updating the control logic instance according to the control logic to obtain an updated control logic instance if the control logic is the general control logic. The modification unit is configured to modify the control logic instance according to the control logic after the association between the control logic template and the control logic instance is disconnected if the control logic is not the general control logic.