A method and apparatus for multivariate coercion and state preservation based on a forced variable allocation table
By using a mandatory variable configuration table, mandatory variables are divided into input and output types for processing, which solves the problem of excessive memory consumption in traditional methods and achieves stable operation of the controller.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NR ELECTRIC CO LTD
- Filing Date
- 2023-06-20
- Publication Date
- 2026-04-21
AI Technical Summary
Traditional signal forced processing methods consume a lot of memory resources in industrial process control, affecting the stability of the controller. This poses a safety hazard, especially in low-cost controllers where memory space is limited.
A multivariate coercion and state preservation method based on a coercion variable configuration table is adopted. By receiving and parsing the coercion variable configuration table, the coercion variables are divided into input and output types and processed in the corresponding queues. Coercion tasks are performed on only a small number of coercion variables, reducing memory consumption.
It effectively reduces controller memory consumption, ensures stable operation of controllers with limited memory space, and avoids the security risks of excessive memory usage.
Smart Images

Figure CN116795056B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of industrial process control, and more specifically, to a method and apparatus for multivariate coercion and state maintenance based on a coercive variable configuration table. Background Technology
[0002] In industrial process control, I / O modules acquire a large number of analog and digital input / output signals. During logic configuration and debugging, it's necessary to force some of these signals. Traditional methods for signal forcing involve adding a forcing flag and a forcing value variable to each channel signal and storing all signals in memory. However, the number of input / output points in a controller is enormous, while the number requiring forcing is relatively small. Using this traditional method consumes significant memory resources and risks affecting the controller's stable operation.
[0003] In cost-control applications, low-cost controllers are often chosen. However, low-cost controllers have relatively small memory spaces. The memory space allocated to forced variables may not be enough to store the forced flags and forced values of all measurement points, or the remaining memory space may be small even if it can accommodate all measurement points. This can lead to a security risk of excessive memory usage during controller operation, significantly impacting the stability of the controller.
[0004] Therefore, a new method for handling forced variables is needed to solve the problem of excessive memory consumption in traditional methods.
[0005] The information disclosed in the background section is only intended to enhance the understanding of the background of this application, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention
[0006] To address at least one of the aforementioned problems, this application proposes a method and apparatus for multivariate coercion and state maintenance based on a coercive variable configuration table.
[0007] According to a first aspect of this application, a multivariate coercion and state preservation method based on a coercive variable configuration table is proposed. The multivariate coercion and state preservation method includes: receiving a coercive variable configuration table and determining whether the coercive variable configuration table has been updated; if the coercive variable configuration table has been updated, parsing the coercive variable configuration table; and performing a coercion task according to the coercive variable configuration table.
[0008] According to some embodiments, parsing the mandatory variable configuration table when it is updated includes: classifying the mandatory variables into input types or output types according to the data types of the mandatory variables in the mandatory variable configuration table; and pushing the information of each mandatory variable into the corresponding input mandatory queue or output mandatory queue according to the type of the mandatory variable.
[0009] According to some embodiments, the information of the forced variable includes point name, point index information, forced value data type, and forced value; wherein, the point name is the label of the forced variable.
[0010] According to some embodiments, the step of executing the forced task according to the forced variable configuration table includes: executing the forced input variable task, including: obtaining the original input data table; determining the original data corresponding to each forced variable in the input forced queue from the original input data table; verifying each forced variable with the corresponding original data; if the verification between the forced variable and the corresponding original data is successful, replacing the corresponding original data with the corresponding forced variable, and rewriting the channel where the replaced original data is located as a forced state, so as to obtain the processed input data table.
[0011] According to some embodiments, the step of executing the forced task according to the forced variable configuration table includes: executing the forced output variable task, including: obtaining an output data table; determining the original data corresponding to each forced variable in the output forced queue from the output data table; verifying each forced variable with the corresponding original data; if the forced variable and the corresponding original data are successfully verified, replacing the corresponding original data with the corresponding forced variable, and rewriting the channel where the replaced original data is located as a forced state.
[0012] According to some embodiments, the step of verifying each forced variable with the corresponding original data includes: verifying the data type and point name of the forced variable with the data type and point name of the corresponding original data; if the data type and point name of the forced variable are consistent with the data type and point name of the corresponding original data, the verification between the forced variable and the corresponding original data is successful.
[0013] According to some embodiments, the method further includes: performing logical algorithm operations on the processed input data table to calculate an output data table.
[0014] According to some embodiments, the method further includes: if the forced variable configuration table is not updated, maintaining the state of the forced task executed in the previous cycle, and executing the forced task according to the forced variable configuration table of the previous cycle.
[0015] According to a second aspect of this application, a multivariate coercion and state maintenance device based on a coercive variable configuration table is proposed. The multivariate coercion and state maintenance device includes: a judgment unit, configured to receive a coercive variable configuration table and determine whether the coercive variable configuration table is updated; a parsing unit, configured to parse the coercive variable configuration table if it is updated; and an execution unit, configured to execute a coercion task according to the coercive variable configuration table.
[0016] According to a third aspect of this application, an electronic device is provided, comprising: one or more processors; a memory for storing one or more programs; and, when the one or more programs are executed by the one or more processors, causing the one or more processors to perform the method as described in any one aspect of the first application.
[0017] According to a fourth aspect of this application, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the method described in any of the first aspects.
[0018] This application proposes a method and apparatus for multivariate forcing and state maintenance based on a forced variable configuration table. It only requires forcing the input and output variables in the forced variable configuration table, which accounts for only a small part of the total number of input and output variables in the controller. This effectively reduces the memory consumption of the controller and ensures the stable operation of the controller with a small memory space.
[0019] It should be understood that the above general description and the following detailed description are merely exemplary and do not limit this application. Attached Figure Description
[0020] The above and other objects, features, and advantages of this application will become more apparent from the detailed description of exemplary embodiments with reference to the accompanying drawings. The drawings described below are merely some embodiments of this application and are not intended to limit the scope of this application.
[0021] Figure 1 A flowchart illustrating a multivariate coercion and state preservation method based on a coercion variable configuration table is shown as an exemplary embodiment.
[0022] Figure 2 A schematic structural diagram of a mandatory variable configuration table is shown in an exemplary embodiment;
[0023] Figure 3 A schematic diagram of a multivariate coercion and state preservation device based on a coercion variable configuration table is shown as an exemplary embodiment;
[0024] Figure 4 This diagram illustrates the structure of an electronic device provided in this application. Detailed Implementation
[0025] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in many forms and should not be construed as limited to the embodiments set forth herein; rather, they are provided so that this application will be thorough and complete, and will fully convey the concept of the exemplary embodiments to those skilled in the art. The same reference numerals in the drawings denote the same or similar parts, and therefore repeated descriptions of them will be omitted.
[0026] The described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. Numerous specific details are provided in the following description to give a full understanding of embodiments of this disclosure. However, those skilled in the art will recognize that the technical solutions of this disclosure can be practiced without one or more of these specific details, or other methods, components, materials, devices, etc. In these cases, well-known structures, methods, devices, implementations, materials, or operations will not be shown or described in detail.
[0027] The flowcharts shown in the accompanying drawings are merely illustrative and do not necessarily include all content and operations / steps, nor do they necessarily need to be performed in the described order. For example, some operations / steps can be broken down, while others can be combined or partially combined; therefore, the actual execution order may change depending on the specific circumstances.
[0028] The terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or apparatuses.
[0029] Those skilled in the art will understand that the accompanying drawings are merely schematic diagrams of exemplary embodiments, and the modules or processes in the drawings are not necessarily necessary for implementing this application, and therefore cannot be used to limit the scope of protection of this application.
[0030] Figure 1 A flowchart of a multivariate coercion and state preservation method based on a coercion variable configuration table is shown as an exemplary embodiment. The multivariate coercion and state preservation method includes steps S101-S104.
[0031] In step S101, the mandatory variable configuration table is received, and it is determined whether the mandatory variable configuration table has been updated.
[0032] According to the example embodiment, the controller receives the mandatory variable configuration table sent by the host computer and determines whether the host computer has updated the sent mandatory variable configuration table.
[0033] If the host computer updates the mandatory variable configuration table, proceed to step S102.
[0034] If the host computer has not updated the configuration table, the state of the previous cycle is maintained and the process jumps to step S103. That is, the state of executing the forced task in the previous cycle is maintained, and the forced task is executed according to the forced variable configuration table of the previous cycle.
[0035] In step S102, if the forced variable configuration table is updated, the forced variable configuration table is parsed.
[0036] According to the example embodiment, parsing the mandatory variable configuration table includes classifying the mandatory variables into input or output types based on the data type of the mandatory variables in the mandatory variable configuration table, allocating corresponding memory space according to the type and number of mandatory variables, and sequentially pushing the mandatory variable information into the corresponding mandatory queues, namely the input mandatory queue and the output mandatory queue.
[0037] According to the example embodiment, the information of the mandatory variable includes the point name, point index information, mandatory value data type, and mandatory value. The point name is the KKS tag of the mandatory variable. The schematic structure of the mandatory variable configuration table is as follows: Figure 2 As shown.
[0038] In step S103, the forced task is executed according to the forced variable configuration table.
[0039] According to the example embodiment, performing a forced task based on the forced variable configuration table includes steps S1031 and S1032.
[0040] In step S1031, the task of forcing input variables is performed.
[0041] According to an example embodiment, performing the forced input variable task includes: the controller obtaining a table of raw input data from the I / O station.
[0042] The controller determines the original data corresponding to each mandatory variable in the input mandatory queue from the original input data table. For example, it finds the original input data corresponding to a mandatory variable based on the page number and secondary index provided by each mandatory variable in the mandatory input queue.
[0043] Each forced variable is validated against its corresponding original data. If the validation is successful, the corresponding original data is replaced with the forced variable, and the channel containing that original data is set to forced state. The processed input data table is then obtained.
[0044] According to some embodiments, verification refers to comparing the data type and name of the forced variable with the data type and name of the corresponding original data. If the data type and name of the forced variable match the data type and name of the corresponding original data, the verification between the forced variable and the corresponding original data is successful.
[0045] In step S1032, the task of forcing the output variable is executed.
[0046] According to the example embodiment, performing the forced output variable task includes: obtaining the output data table calculated by the controller based on the input data table in the previous cycle; and determining the original data corresponding to each forced variable in the output forced queue from the output data table.
[0047] Each forced variable is validated against its corresponding original data. If the validation is successful, the corresponding original data is replaced with the forced variable, and the channel containing that original data is set to forced status. The processed output data table is then sent to the I / O station.
[0048] In step S104, logical algorithm operations are performed based on the processed input data table to calculate the output data table.
[0049] According to the example embodiment, the controller performs logical algorithm operations based on the processed input data table to calculate the output data table to be used in the next cycle.
[0050] For example, in the nth cycle, the host computer updates the forced variable configuration table to a. n The original input data table is A n Then in the mandatory variable configuration table a n After the forced variables of the input type are pushed into the input forced queue, the forced variables in the input forced queue are compared with the original input data table A. n The corresponding original data in the table is validated. If the validation is successful, the forced variable configuration table a is... n The forced variable of the input type replaces the original input data table A n The corresponding original data in the table is used to obtain the processed input data table A. n '.
[0051] The controller will enforce variable configuration table a n The forced variables of the output type are pushed into the output forced queue, and the forced variables in the output forced queue are matched with the output data table B. n-1 Perform a validation. If the validation is successful, replace the forced variable in the forced queue with the output data table B. n-1 The corresponding data in the table is used to obtain the processed output data table B. n-1 ', and then distribute it to the I / O station.
[0052] The controller uses input data table A n Perform logical algorithm operations to calculate and obtain the output data table B. n .
[0053] In the (n+1)th cycle, the host computer updates the forced variable configuration table to a. n+1 The original input data table is A n+1 In the mandatory variable configuration table a n+1 After the forced variables of the input type are pushed into the input forced queue, the forced variables in the input forced queue are compared with the original input data table A. n+1 The corresponding original data in the table is validated. If the validation is successful, the variable configuration table a is forced to be updated. n+1 The forced variable of the input type replaces the original input data table A n+1 The corresponding original data is used to obtain the processed input data table A. n+1 '.
[0054] The controller will enforce variable configuration table a n+1 The forced variables of the output type are pushed into the output forced queue, and the forced variables in the output forced queue are matched with the output data table B. n Perform a validation. If the validation is successful, replace the forced variable in the forced queue with the output data table B. n The corresponding data in the table is used to obtain the processed output data table B. n ', and then distribute it to the I / O station.
[0055] The controller uses input data table A n+1 Perform logical algorithm operations to calculate and obtain the output data table B. n+1 .
[0056] For example, in the (n+1)th cycle, the host computer did not update the mandatory variable configuration table, and it was still 'a'. n The original input data table is A n+1 The forced variables from the previous cycle's input forced queue, i.e., in forced variable configuration table a, are... n The input type of the forced variable in the table is related to the original input data table A. n+1 The corresponding original data in the table is validated. If the validation is successful, the variable configuration table a is forced to be updated. n The forced variable of the input type replaces the original input data table A n+1 The corresponding original data is used to obtain the processed input data table A. n+1 '.
[0057] The controller will force the forced variables in the forced queue of the previous cycle's output, i.e., the forced variable configuration table is a. n The forced variable of the output type, and the output data table Bn Perform validation. If validation is successful, force variable configuration table a. n The forced variable substitution of the output type in output data table B n The corresponding data in the table is used to obtain the processed output data table B. n ', and then distribute it to the I / O station.
[0058] The controller uses input data table A n+1 Perform logical algorithm operations to calculate and obtain the output data table B. n+1 .
[0059] This application proposes a multivariate coercion and state preservation method based on a coercion variable configuration table. The coercion task includes executing a coercion input variable task and executing a coercion output variable task. The coercion task is executed once per task cycle. It only needs to coerce the input variables and output variables in the coercion variable configuration table. It accounts for only a small part of the total number of input and output variables in the controller, effectively reducing the controller's memory consumption and ensuring the stable operation of the controller with a small memory space.
[0060] Figure 3 A schematic diagram of a multivariate coercion and state maintenance device based on a coercion variable configuration table is shown as an exemplary embodiment.
[0061] like Figure 3 As shown, the multivariable coercion and state maintenance device 30 includes a judgment unit 301, a parsing unit 302, and an execution unit 303.
[0062] Judgment unit 301 is used to receive the forced variable configuration table sent by the host computer and determine whether the forced variable configuration table has been updated.
[0063] Parsing unit 302 is used to parse the mandatory variable configuration table when the mandatory variable configuration table is updated.
[0064] According to the example embodiment, parsing the mandatory variable configuration table includes classifying the mandatory variables into input or output types based on their data types. Then, based on the type and number of mandatory variables, corresponding memory space is allocated, and the mandatory variable information is sequentially pushed into the corresponding mandatory queue.
[0065] According to the example embodiment, the information of the forced variable includes the point name, point index information, forced value data type, and forced value. The point name is the KKS tag of the forced variable.
[0066] The execution unit 303 is used to perform mandatory tasks according to the mandatory variable configuration table, including executing mandatory input variable tasks and executing mandatory output variable tasks.
[0067] The task of executing forced input variables includes: obtaining the raw input data table from the I / O station; determining the raw data corresponding to each forced variable in the forced input queue from the raw input data table; validating each forced variable against its corresponding raw data; and, if the verification between the forced variable and its corresponding raw data is successful, replacing the corresponding raw data with the forced variable and overwriting the channel containing that raw data as the forced state. This process yields the processed input data table.
[0068] The task of enforcing output variables includes: retrieving the output data table calculated from the input data table in the previous round; determining the original data corresponding to each forced variable in the output forced queue from the output data table; validating each forced variable against its corresponding original data; if the verification between the forced variable and its corresponding original data is successful, replacing the corresponding original data with the forced variable, and rewriting the channel containing that original data as the forced state; and sending the processed output data table to the I / O station.
[0069] The execution unit 303 is also used to perform logical algorithm operations based on the processed input data table to calculate the output data table.
[0070] Figure 4 This diagram illustrates the structure of an electronic device provided in this application.
[0071] See Figure 4 , Figure 4 An electronic device is provided, including a processor and a memory. The memory stores computer instructions, which, when executed by the processor, cause the processor to perform the computer instructions to achieve the following: Figure 1 The method and its detailed scheme are shown.
[0072] It should be understood that the above-described device embodiments are merely illustrative, and the device disclosed in this invention can be implemented in other ways. For example, the division of units / modules in the above embodiments is only a logical functional division, and there may be other division methods in actual implementation. For example, multiple units, modules, or components may be combined, integrated into another system, or some features may be ignored or not executed.
[0073] Furthermore, unless otherwise specified, the functional units / modules in the various embodiments of the present invention can be integrated into one unit / module, or each unit / module can exist physically separately, or two or more units / modules can be integrated together. The integrated units / modules described above can be implemented in hardware or as software program modules.
[0074] When integrated units / modules are implemented in hardware, the hardware can be digital circuits, analog circuits, etc. The physical implementation of the hardware structure includes, but is not limited to, transistors, memristors, etc. Unless otherwise specified, the processor or chip can be any suitable hardware processor, such as a CPU, GPU, FPGA, DSP, and ASIC, etc. Unless otherwise specified, on-chip cache, off-chip memory, and storage can be any suitable magnetic or magneto-optical storage medium, such as Resistive Random Access Memory (RRAM), Dynamic Random Access Memory (DRAM), Static Random Access Memory (SRAM), Enhanced Dynamic Random Access Memory (EDRAM), High-Bandwidth Memory (HBM), Hybrid Memory Cube (HMC), etc.
[0075] If the integrated unit / module is implemented as a software program module and sold or used as an independent product, it can be stored in a computer-readable storage device (CMD). Based on this understanding, the technical solution of this invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments disclosed herein. The aforementioned memory includes various media capable of storing program code, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard drive, magnetic disk, or optical disk.
[0076] 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 1 The method and its detailed scheme are shown.
[0077] It should be clearly understood that this application describes how specific examples are formed and used, but this application is not limited to any details of these examples. Rather, based on the teachings of the disclosure of this application, these principles can be applied to many other embodiments.
[0078] Furthermore, it should be noted that the above figures are merely illustrative representations of the processes included in the method according to exemplary embodiments of this application, and are not intended to be limiting. It is readily understood that the processes shown in the above figures do not indicate or limit the temporal order of these processes. Additionally, it is readily understood that these processes may be executed synchronously or asynchronously, for example, in multiple modules.
[0079] Exemplary embodiments of this application have been specifically shown and described above. It should be understood that this application is not limited to the detailed structures, arrangements, or implementation methods described herein; rather, this application is intended to cover various modifications and equivalent arrangements contained within the spirit and scope of the appended claims.
Claims
1. A method for multivariate coercion and state preservation based on a coercive variable allocation table, characterized in that, The multivariate coercion and state preservation method includes: Receive the mandatory variable configuration table and determine whether the mandatory variable configuration table has been updated; In the event that the mandatory variable configuration table is updated, parsing the mandatory variable configuration table includes: Based on the data type of the mandatory variables in the mandatory variable configuration table, the mandatory variables are divided into input type or output type; Based on the type of the forced variable, push the information of each forced variable into the corresponding input forced queue or output forced queue; If the mandatory variable configuration table is not updated, maintain the state of the mandatory task executed in the previous cycle, and execute the mandatory task according to the mandatory variable configuration table of the previous cycle; Execute the mandatory task according to the mandatory variable configuration table, including: Performing tasks that force input variables includes: Obtain the original input data table; Determine the original data corresponding to each forced variable in the input forced queue from the original input data table; Verify each of the forced variables against the corresponding original data; If the forced variable and the corresponding original data are successfully verified, the corresponding original data is replaced with the corresponding forced variable, and the channel where the replaced original data is located is rewritten to the forced state to obtain the processed input data table. Performing tasks that force variable output includes: Obtain the output data table; Determine the original data corresponding to each forced variable in the output forced queue from the output data table; Verify each of the forced variables against the corresponding original data; If the forced variable and the corresponding original data are successfully verified, the corresponding original data is replaced with the corresponding forced variable, and the channel where the replaced original data is located is rewritten to the forced state.
2. The multivariate coercion and state preservation method as described in claim 1, characterized in that, The information of the forced variable includes point name, point index information, forced value data type, and forced value; The point name is the label of the forced variable.
3. The multivariable coercion and state preservation method as described in claim 1, characterized in that, The step of verifying each forced variable with its corresponding original data includes: Verify the data type and point name of the forced variable against the data type and point name of the corresponding original data; If the data type and name of the forced variable are consistent with the data type and name of the corresponding original data, the forced variable and the corresponding original data are successfully verified.
4. The multivariable coercion and state preservation method as described in claim 1, characterized in that, Also includes: Based on the processed input data table, logical algorithm operations are performed to calculate the output data table.
5. A multivariate coercion and state maintenance device based on a coercive variable allocation table, characterized in that, The multivariable coercion and state preservation device is used to perform the multivariable coercion and state preservation method as described in any one of claims 1-4, and the multivariable coercion and state preservation device includes: The judgment unit is used to receive the mandatory variable configuration table and determine whether the mandatory variable configuration table has been updated. The parsing unit is used to parse the mandatory variable configuration table when the mandatory variable configuration table is updated. An execution unit is used to execute a forced task according to the forced variable configuration table.
6. An electronic device, characterized in that, include: One or more processors; Memory, used to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors perform the method as described in any one of claims 1-4.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1-4.
Citation Information
Patent Citations
Variable compulsion method and system suitable for nuclear power station equipment
CN112530615A
Automatic setting method, device and equipment based on mandatory data of DCS (Distributed Control System)
CN115202299A