Controller control logic function comparison method, device, equipment and storage medium

By acquiring the characteristic values ​​of the controller's output function blocks and their superior function blocks, generating an index table, and performing control logic function matching, the problem of fast and accurate comparison of controller logic configuration differences in DCS software is solved, enabling fast and accurate comparison of the logic functions of different controllers.

CN116820041BActive Publication Date: 2026-01-09XIAN THERMAL POWER RES INST CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310467473.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-26
Publication Date
2026-01-09
Estimated Expiration
2043-04-26

AI Technical Summary

Technical Problem

Existing DCS software suffers from matching failures when comparing the operational logic configuration differences of different controllers, due to inconsistencies in function block names or different page numbers/page names. This makes it difficult to achieve fast and accurate comparison of control logic functions.

Method used

By acquiring the characteristic values ​​of the controller's output function blocks and their parent function blocks, control logic comparison is performed based on the characteristic values, an index table is generated, and fast and accurate control logic function matching is achieved.

Benefits of technology

It enables fast and accurate comparison of the control logic functions of different controllers, and solves the matching failure problem when the function block names are inconsistent or the page numbers/page names are different.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116820041B_ABST
    Figure CN116820041B_ABST
Patent Text Reader

Abstract

The application discloses a comparison method, device and equipment for controller control logic functions and a storage medium. The method comprises the following steps: acquiring an output function block of each controller in multiple controllers and identification information corresponding to the output function block; generating a characteristic value of the output function block based on the identification information corresponding to the output function block; acquiring a superior function block of the output function block and generating a characteristic value of the superior function block based on the characteristic value of the output function block; wherein the superior function block of the output function block is a function block located upstream of the output function block; comparing the control logic of the multiple controllers based on the characteristic values of the function blocks in each controller to obtain a comparison result of the control logic of the multiple controllers. Through the technical scheme, the control logic functions of different controllers can be quickly and accurately compared.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of industrial process control, and in particular to a comparison method, device and equipment of controller control logic function and a storage medium. BACKGROUND

[0002] In related technologies, the basic form of input-operation logic-output is generally adopted by DCS (Distributed Control System) software to complete control functions, and the operation logic part is formed by combining multiple function blocks to form a controller. When the operation logic configuration difference in different DCS needs to be compared and analyzed, the logic blocks with the same function block name in the same configuration page in different DCS are compared. Although this method has high processing efficiency, when the function block names in the operation logic configuration of different DCS are inconsistent, or the page numbers or page names of the logic blocks are different, it will lead to matching failure. SUMMARY

[0003] The present application provides a comparison method, device, electronic equipment and storage medium of controller control logic function. The control logic functions of different controllers can be quickly and accurately compared.

[0004] In a first aspect, the present application provides a comparison method of controller control logic function, including: obtaining an output function block of each of a plurality of controllers and identification information corresponding to the output function block; generating a feature value of the output function block based on the identification information corresponding to the output function block; obtaining a superior function block of the output function block and generating a feature value of the superior function block based on the feature value of the output function block; wherein the superior function block of the output function block is a function block located upstream of the output function block; comparing the control logics of the plurality of controllers based on the feature values of the function blocks in each of the controllers to obtain a comparison result of the control logics of the plurality of controllers.

[0005] In this technical solution, the superior function block of the output function block can be obtained based on the output function block of each of the plurality of controllers, and the feature value of the superior function block can be generated based on the feature value of the output function block, so that the control logics of the plurality of controllers are compared based on the feature values of the function blocks in the controllers. The control logic functions of different controllers can be quickly and accurately compared.

[0006] In an implementation, the step of obtaining the upper function block of the output function block and generating the characteristic value of the upper function block based on the characteristic value of the output function block comprises: step S1, obtaining a first input pin of the output function block and corresponding first connection information; step S2, determining a first target pin connected with a first function block from the first input pin based on the first connection information; step S3, determining the first function block as an upper function block and generating the characteristic value of the first function block based on the identification information of the first target pin and the characteristic value of the output function block; step S4, obtaining a second input pin of the upper function block and corresponding second connection information; if there is a second target pin connected with a second function block in the second input pin, determining whether the second function block has been determined as an upper function block; if there is no second target pin connected with a second function block in the second input pin, exiting the flow; step S6, if the second function block has not been determined as an upper function block, generating the characteristic value of the second function block based on the identification information of the second target pin and the characteristic value of the upper function block and determining the second function block as a new upper function block; if the second function block has been determined as an upper function block, exiting the flow; step S7, returning to execute the step S4.

[0007] In an implementation, the step of comparing the control logics of the plurality of controllers based on the characteristic values of the function blocks in each of the controllers and obtaining the control logic comparison result of the plurality of controllers comprises: obtaining a first target function block of a first controller among the plurality of controllers; obtaining a second target function block of a second controller among the plurality of controllers based on the characteristic value of the first target function block; comparing the related information of the first target function block and the related information of the second target function block to obtain a comparison result; repeating the above steps until all function blocks in the first controller are traversed to obtain the control logic comparison result of the plurality of controllers.

[0008] In the technical solution, the upper function block of the output function block can be obtained based on the output function block of each of the plurality of controllers, the characteristic value of the upper function block is generated based on the characteristic value of the output function block, the function blocks with the same characteristic value in the plurality of controllers are obtained and compared to obtain the control logic comparison result of the plurality of controllers. The control logics of different controllers can be quickly and accurately compared.

[0009] In an optional implementation, the related information comprises an output value and / or a parameter value of the function block.

[0010] In an implementation manner, the method further comprises: taking the output function block of each controller as an index entry, and taking the identification information corresponding to the output function block as an index value of the index entry, to generate an index table corresponding to each controller.

[0011] In a second aspect, the embodiments of the present application provide a comparison device for controlling logic functions of controllers, comprising: an obtaining module, configured to obtain an output function block of each controller in a plurality of controllers and identification information corresponding to the output function block; a generating module, configured to generate a feature value of the output function block based on the identification information corresponding to the output function block; a processing module, configured to obtain a superior function block of the output function block, and generate a feature value of the superior function block based on the feature value of the output function block; wherein the superior function block of the output function block is a function block located upstream of the output function block; and a comparison module, configured to compare control logics of the plurality of controllers based on the feature values of the function blocks in each controller, to obtain a comparison result of the control logics of the plurality of controllers.

[0012] In an implementation manner, the processing module is specifically configured to: in step S1, obtain a first input pin of the output function block and corresponding first connection information; in step S2, determine a first target pin connected with a first function block from the first input pin based on the first connection information; in step S3, determine the first function block as a superior function block, and generate a feature value of the first function block based on the identification information of the first target pin and the feature value of the output function block; in step S4, obtain a second input pin of the superior function block and corresponding second connection information; if there is a second target pin connected with a second function block in the second input pin, determine whether the second function block has been determined as a superior function block; if there is no second target pin connected with a second function block in the second input pin, exit the flow; in step S6, if the second function block has not been determined as a superior function block, generate a feature value of the second function block based on the identification information of the second target pin and the feature value of the superior function block, and determine the second function block as a new superior function block; if the second function block has been determined as a superior function block, exit the flow; and in step S7, return to execute the step S4.

[0013] In an implementation manner, the comparison module is specifically configured to: acquire a first target function block of a first controller in the plurality of controllers; acquire a second target function block of a second controller in the plurality of controllers based on a characteristic value of the first target function block; compare related information of the first target function block and related information of the second target function block to acquire a comparison result; and repeat the above steps until all function blocks in the first controller are traversed to acquire a control logic comparison result of the plurality of controllers.

[0014] In an optional implementation manner, the related information includes an output value and / or a parameter value of a function block.

[0015] In an implementation manner, the generation module is further configured to: generate an index table corresponding to each of the controllers by taking the output function block of each of the controllers as an index entry and taking the identification information corresponding to the output function block as an index value of the index entry.

[0016] In a third aspect, an embodiment of the present application provides an electronic device, including: at least one processor; and a memory connected with the at least one processor in communication; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the comparison method of the control logic function of the controller as described in the first aspect.

[0017] In a fourth aspect, an embodiment of the present application provides a computer readable storage medium, configured to store instructions, when the instructions are executed, enabling the method as described in the first aspect to be implemented.

[0018] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, when the computer program is executed by a processor, enabling steps of the comparison method of the control logic function of the controller as described in the first aspect to be implemented.

[0019] It should be understood that the content described in this section is not intended to identify key or important features of the embodiments of the application, nor is it used to limit the scope of the application. Other features of the application will become apparent from the following description. BRIEF DESCRIPTION OF DRAWINGS

[0020] The accompanying drawings are used to better understand the present application, and do not constitute limitations on the present application. Among them:

[0021] Figure 1 is a schematic diagram of a comparison method of a control logic function of a controller provided by an embodiment of the present application;

[0022] Figure 2 is a schematic diagram of an acquisition process of a superordinate function block provided by an embodiment of the present application;

[0023] Figure 3 is a schematic diagram of a superordinate function block acquisition scheme provided by an embodiment of the present application;

[0024] Figure 4 is a schematic diagram of a comparison method for a controller control logic function provided by an embodiment of the present application;

[0025] Figure 5 is a schematic diagram of a comparison method for a controller function block provided by an embodiment of the present application;

[0026] Figure 6 is a schematic diagram of a comparison apparatus for a controller control logic function provided by an embodiment of the present application;

[0027] Figure 7 is a schematic block diagram of an example electronic device that can be used to implement embodiments of the present application. DETAILED DESCRIPTION

[0028] Exemplary embodiments of the present application are described herein with reference to the accompanying drawings, which are meant to be exemplary and not limiting. Therefore, it should be recognized that many modifications and changes can be made to the embodiments described herein without departing from the spirit and scope of the present application. Also, for the sake of brevity and clarity, descriptions of well-known functions and constructions are omitted from the following description.

[0029] In the description of the present application, unless otherwise stated, " / " means or, for example, A / B can mean A or B; "and / or" herein is merely a description of the relationship between the associated objects, which means that there can be three relationships, for example, A and / or B, which means that there are three cases: A alone, A and B together, and B alone. The first, second, and other various numbers involved in the present application are only for the convenience of description and do not limit the scope of the embodiments of the present application, nor do they represent the order of precedence.

[0030] Please refer to Figure 1 , Figure 1 is a schematic diagram of a comparison method for a controller control logic function provided by an embodiment of the present application. As shown in Figure 1 , the method can include but is not limited to the following steps:

[0031] Step S101: Obtain the output function block of each controller in the plurality of controllers and the identification information corresponding to the output function block.

[0032] In the embodiments of the present application, the plurality of controllers described above can be two controllers.

[0033] For example, the output function block of each controller in the plurality of controllers to be compared in the control logic is acquired, and the identification information corresponding to each output function block is acquired.

[0034] In the embodiments of the present application, the identification information corresponding to each output function block can be an output point name corresponding to each output function block. The output function block includes at least one of a switching value output function block, an analog output function block, a structure output function block, and a network intermediate point output function block.

[0035] In step S102, a feature value of the output function block is generated based on the identification information corresponding to the output function block.

[0036] For example, the identification information corresponding to each output function block is taken as the feature value corresponding to the output function block.

[0037] In step S103, a superior function block of the output function block is acquired, and a feature value of the superior function block is generated based on the feature value of the output function block.

[0038] In the embodiments of the present application, the superior function block of the output function block is a function block located upstream of the output function block.

[0039] For example, the superior function block located upstream of the output function block in the operation logic configuration is acquired, and the feature value of the superior function block corresponding to the output function block is set based on the feature value of the output function block.

[0040] In step S104, the control logic of the plurality of controllers is compared based on the feature values of the function blocks in each controller, and a comparison result of the control logic of the plurality of controllers is acquired.

[0041] For example, the function blocks with the same or similar operation logic in the function blocks in the plurality of controllers are acquired based on the feature values of the function blocks in each controller, and the function blocks with the same or similar operation logic are compared to compare the control logic of the plurality of controllers, and a comparison result of the control logic of the plurality of controllers is acquired.

[0042] By implementing the embodiments of the present application, the superior function block of the output function block in each controller in the plurality of controllers can be acquired based on the output function block, and the feature value of the superior function block is generated based on the feature value of the output function block, so that the control logic of the plurality of controllers is compared based on the feature values of the function blocks in the controller. The control logic functions of different controllers can be quickly and accurately compared.

[0043] Please refer to Figure 2 , Figure 2A schematic diagram of an acquisition process of a superior function block is provided in the embodiments of the present application. It can be understood that the following method can be used to acquire the corresponding superior function block for each output function block in each controller. As shown in Figure 2 The method can include, but is not limited to, the following steps:

[0044] Step S201: Acquire the first input pin of the output function block and the corresponding first connection information.

[0045] For example, acquire all the input pins to which the output function block belongs as the first input pin, and acquire the first connection information corresponding to the first input pin.

[0046] Step S202: Determine the first target pin connected with the first function block from the first input pin based on the first connection information.

[0047] For example, based on the first connection information, determine whether the first input pin is connected with other function blocks, determine the first input pin connected with other function blocks as the first target pin, and determine the function block connected with the first target pin as the first function block.

[0048] It can be understood that in the embodiments of the present application, the first target pin can be one or more, and the number of the first function blocks is the same as the number of the first pins.

[0049] Step S203: Determine the first function block as the superior function block, and generate the characteristic value of the first function block based on the identification information of the first target pin and the characteristic value of the output function block.

[0050] For example, determine the first function block as the superior function block, and take the identification information of the first target pin and the characteristic value of the output function block as the characteristic value of the first function block.

[0051] In the embodiments of the present application, the identification information of the first target pin can be the pin number of the first target pin.

[0052] Step S204: Acquire the second input pin of the superior function block and the corresponding second connection information.

[0053] For example, acquire the input pin to which each superior function block belongs as the second input pin, and acquire the second connection information corresponding to the second input pin.

[0054] Step S205: If the second target pin connected with the second function block exists in the second input pin, determine whether the second function block has been determined as the superior function block; if the second target pin connected with the second function block does not exist in the second input pin, exit the process.

[0055] As an example, it is determined whether the second input pin to which each upper function block belongs is connected with a second function block based on the second connection information of the second input pin to which each upper function block belongs, respectively, and if the second input pin is connected with a second function block, it is determined whether the second function block has been determined as an upper function block.

[0056] As another example, it is determined whether the second input pin to which each upper function block belongs is connected with a second function block based on the second connection information, and if the second input pin to which an upper function block belongs is not connected with a second function block, it is determined that the upper function block has no new upper function block, and the upper function block obtaining process of the branch of the upper function block is exited.

[0057] It can be understood that each time a new upper function block is determined, the new upper function block and the corresponding lower function block can be taken as a new branch, and it can be determined for each branch whether the branch has a new upper function block, and if the branch has no new upper function block, it can be determined that all upper function blocks of the branch have been determined.

[0058] Step S206: If the second function block is not determined as an upper function block, a characteristic value of the second function block is generated based on the identification information of the second target pin and the characteristic value of the upper function block, and the second function block is determined as a new upper function block; if the second function block has been determined as an upper function block, the process is exited.

[0059] As an example, if there is a second function block that has not been determined as an upper function block, a characteristic value of the second function block is generated based on the identification information of the second target pin and the characteristic value of the upper function block, and the second function block is determined as a new upper function block.

[0060] As another example, if the second function block has been determined as an upper function block through the completed process, it is determined that the upper function block has no new upper function block, and the upper function block obtaining process of the branch corresponding to the upper function block is exited.

[0061] In the embodiments of the present application, the identification information of the second target pin can be a pin number of the second target pin.

[0062] It can be understood that each time a second function block is determined, it can be determined whether the second function block has been determined as an upper function block in other branches of the upper function block obtaining process corresponding to the input function block, or has been determined as an upper function block in the upper function block obtaining process corresponding to other output function blocks of the same controller.

[0063] Step S207: Return to execute step S204.

[0064] For example, the second function block is taken as a new first function block, and the execution step S4 is returned until all the parent function blocks of all branches corresponding to the output function block are determined, and the parent function block acquisition process of the output function block is exited. The above process is executed based on another output function block which has not executed the parent function block acquisition process.

[0065] By implementing the embodiment of the application, the output function block is taken as a basis for recursive query, so that the feature values corresponding to the function blocks in the controller are set, and the control logic of different controllers is compared based on the feature values.

[0066] Please refer to Figure 3 , Figure 3 is a schematic diagram of a parent function block acquisition scheme provided by the embodiment of the application, as shown in Figure 3 , first, all the output function blocks in the controller are retrieved and acquired, and the feature values of the output function blocks are recorded as BlkOut[i], and BlkOut[i] is the output point name corresponding to each output function block; then, all the parent function blocks of the output function blocks are found through the connection line or intermediate transmission, and the feature values of the parent function blocks of the output function blocks are recorded as BlkOut[i]_In[j], and In[j] is the pin number of the pin connected to the parent function block in the output function block; then, the parent function blocks are continuously found upwards, and the feature values of the new parent function blocks found are recorded as BlkOut[i]_In[j]_In[k], and In[k] is the pin number of the pin connected to the new parent function block in the original parent function block. At the same time, the recursive condition is judged in the finding process, that is, when there is no parent function block, or the new found function block has been marked as a parent function block, it is judged that all the parent function blocks of the output function block have been processed; then, the above steps are repeated until the feature value generation of all the function blocks in the controller is completed.

[0067] In an implementation mode, the function blocks with the same feature values in multiple controllers can be acquired, and the function blocks with the same feature values are compared to acquire the control logic comparison result of the multiple controllers. As an example, please refer to Figure 4 , Figure 4 is a schematic diagram of another control logic function comparison method provided by the embodiment of the application. As shown in Figure 4 , the method can include but is not limited to the following steps:

[0068] Step S401: acquiring the output function block of each controller in multiple controllers and the identification information corresponding to the output function block.

[0069] In the embodiments of the present application, step S401 can be implemented by any of the embodiments of the present application, and the embodiments of the present application do not limit this and will not be repeated here.

[0070] Step S402: generating a feature value of the output function block based on the identification information corresponding to the output function block.

[0071] In the embodiments of the present application, step S402 can be implemented by any of the embodiments of the present application, and the embodiments of the present application do not limit this and will not be repeated here.

[0072] Step S403: obtaining a superior function block of the output function block, and generating a feature value of the superior function block based on the feature value of the output function block.

[0073] In the embodiments of the present application, step S403 can be implemented by any of the embodiments of the present application, and the embodiments of the present application do not limit this and will not be repeated here.

[0074] Step S404: obtaining a first target function block of a first controller in the plurality of controllers.

[0075] For example, any one of the plurality of controllers is obtained as the first controller, and any one of the function blocks in the first controller is obtained as the first target function block.

[0076] Step S405: obtaining a second target function block of a second controller in the plurality of controllers based on the feature value of the first target function block.

[0077] For example, the second target function block in the second controller in the plurality of controllers is obtained based on the feature value of the first target function block.

[0078] In the embodiments of the present application, the second controller is other than the first controller in the plurality of controllers, and the feature value of the second target function block is the same as the feature value of the first target function block; or the similarity between the feature value of the second target function block and the feature value of the first target function block is greater than a preset similarity threshold.

[0079] Step S406: comparing the related information of the first target function block and the related information of the second target function block to obtain a comparison result.

[0080] In the embodiments of the present application, the above-mentioned related information includes the output value and / or the parameter value of the function block.

[0081] As an example, the output value of the first target function block and the output value of the second target function block are compared to obtain a comparison result.

[0082] As another example, the parameter value of the first target function block and the parameter value of the second target function block are compared to obtain a comparison result.

[0083] As yet another example, the output value of the first target function block and the output value of the second target function block are compared, and the parameter value of the first target function block and the parameter value of the second target function block are compared to obtain a comparison result.

[0084] Step S407: The above steps are repeated until all function blocks in the first controller are traversed, and a control logic comparison result of the plurality of controllers is obtained.

[0085] For example, another function block in the first controller which has not been compared is obtained, and the other function block is taken as a new first target function block to execute the above steps until all function blocks in the first controller are selected as the first target function block and the comparison steps are executed, and a control logic comparison result of the plurality of controllers is obtained based on the comparison result of each function block in the first controller.

[0086] By implementing the embodiments of the present application, the upper function block of the output function block can be obtained based on the output function block of each controller in the plurality of controllers, and the characteristic value of the upper function block is generated based on the characteristic value of the output function block, so that the function blocks with the same characteristic value in the plurality of controllers are obtained, and the function blocks with the same characteristic value are compared to obtain a control logic comparison result of the plurality of controllers. The control logic functions of different controllers can be quickly and accurately compared.

[0087] Please refer to Figure 5 , Figure 5 is a schematic diagram of a comparison method of a controller function block provided by an embodiment of the present application. As shown in Figure 5 , first, an arbitrary function block M[i] (i.e., the first target controller) is retrieved from the controller A (i.e., the first controller), and the characteristic value m of the function block M[i] is obtained; then, a function block N[j] with the same characteristic value m is obtained from the controller B, and the input value and the parameter value of the function block M[i] and the function block N[j] are compared, and the difference is recorded; then, the above steps are repeated until all function blocks in the controller A are traversed.

[0088] In some embodiments of the present application, the controller B can be a plurality of controllers, so that the function blocks with the same characteristic value m as the function block M[i] can be obtained from each controller B, and compared.

[0089] In some embodiments of the present application, the method further comprises: taking the output function block of each controller as an index entry, and taking the identification information corresponding to the output function block as an index value of the index entry, to generate an index table corresponding to each controller.

[0090] For example, taking the output function block of each controller as an index entry, and taking the identification information corresponding to the output function block as an index value of the index entry corresponding to the output function block, to generate an index table corresponding to each controller, so as to facilitate operation when the upper function block of the output function block is obtained, and the characteristic value of the upper function block is generated based on the characteristic value of the output function block.

[0091] Please refer to Figure 6 , Figure 6 is a schematic diagram of a comparison device for controlling logic functions of controllers provided by an embodiment of the present application. As shown in Figure 6 , the device 600 comprises: an acquisition module 601 configured to acquire an output function block of each controller among a plurality of controllers and identification information corresponding to the output function block; a generation module 602 configured to generate a characteristic value of the output function block based on the identification information corresponding to the output function block; a processing module 603 configured to acquire an upper function block of the output function block, and generate a characteristic value of the upper function block based on the characteristic value of the output function block; and a comparison module 604 configured to, when the upper function block of the output function block is a function block located upstream of the output function block, compare control logics of the plurality of controllers based on the characteristic values of the function blocks in each controller, and acquire a comparison result of the control logics of the plurality of controllers.

[0092] In an implementation manner, the processing module 603 is specifically configured to: step S1: acquire a first input pin of the output function block and corresponding first connection information; step S2: determine a first target pin connected with a first function block from the first input pin based on the first connection information; step S3: determine the first function block as the upper function block, and generate a characteristic value of the first function block based on the identification information of the first target pin and the characteristic value of the output function block; step S4: acquire a second input pin of the upper function block and corresponding second connection information; if there is a second target pin connected with a second function block in the second input pin, determine whether the second function block has been determined as the upper function block; if there is no second target pin connected with a second function block in the second input pin, exit the flow; step S6: if the second function block has not been determined as the upper function block, generate a characteristic value of the second function block based on the identification information of the second target pin and the characteristic value of the upper function block, and determine the second function block as a new upper function block; if the second function block has been determined as the upper function block, exit the flow; and step S7: return to execute step S4.

[0093] In an implementation manner, the comparison module 604 is specifically configured to: acquire a first target function block of a first controller in the plurality of controllers; acquire a second target function block of a second controller in the plurality of controllers based on a characteristic value of the first target function block; compare related information of the first target function block and related information of the second target function block to obtain a comparison result; and repeat the above steps until all function blocks in the first controller are traversed to obtain a control logic comparison result of the plurality of controllers.

[0094] In an optional implementation manner, the related information includes an output value and / or a parameter value of the function block.

[0095] In an implementation manner, the generation module 601 is further configured to: take an output function block of each controller as an index entry, and take identification information corresponding to the output function block as an index value of the index entry to generate an index table corresponding to each controller.

[0096] By means of the device of the embodiments of the present application, the upper function block of the output function block can be acquired based on the output function block of each controller in the plurality of controllers, and the characteristic value of the upper function block can be generated based on the characteristic value of the output function block, so that the control logic of the plurality of controllers can be compared based on the characteristic values of the function blocks in the controllers. The control logic functions of different controllers can be quickly and accurately compared.

[0097] As to the device in the above embodiments, the specific manners in which the modules perform operations have been described in detail in the embodiments of the method, and will not be described in detail here.

[0098] Based on the embodiments of the present application, the present application further provides an electronic device, which comprises: at least one processor; and a memory connected with the at least one processor in communication; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the comparison method of the control logic functions of the controllers according to any one of the preceding embodiments.

[0099] Based on the embodiments of the present application, the present application further provides a computer readable storage medium, wherein computer instructions are used to enable a computer to perform the comparison method of the control logic functions of the controllers according to any one of the preceding embodiments provided by the embodiments of the present application.

[0100] Please refer to Figure 7 For example Figure 7The diagram shown is a schematic block diagram of an example electronic device that can be used to implement embodiments of the present application. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present application described and / or claimed herein.

[0101] like Figure 7 As shown, device 700 includes a computing unit 701, which can perform various appropriate actions and processes based on a computer program stored in read-only memory (ROM) 702 or a computer program loaded from storage unit 708 into random access memory (RAM) 703. The RAM 703 may also store various programs and data required for the operation of device 700. The computing unit 701, ROM 702, and RAM 703 are interconnected via bus 704. An input / output (I / O) interface 705 is also connected to bus 704.

[0102] Multiple components in device 700 are connected to I / O interface 705, including: input unit 706, such as keyboard, mouse, etc.; output unit 707, such as various types of monitors, speakers, etc.; storage unit 708, such as disk, optical disk, etc.; and communication unit 709, such as network card, modem, wireless transceiver, etc. Communication unit 709 allows device 700 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0103] The computing unit 701 can be various general and / or special purpose processing components with processing and computing capabilities. Some examples of the computing unit 701 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Process (DSP), and any appropriate processor, controller, microcontroller, etc. The computing unit 701 performs various methods and processes described above, such as the controller control logic function comparison method. For example, in some embodiments, the controller control logic function comparison method can be implemented as a computer software program tangibly embodied in a machine-readable medium, such as the storage unit 708. In some embodiments, part or all of the computer program can be loaded and / or installed onto the device 700 via the ROM 702 and / or the communication unit 709. When the computer program is loaded onto the RAM 703 and executed by the computing unit 701, one or more steps of the controller control logic function comparison method described above can be performed. Alternatively, in other embodiments, the computing unit 701 can be configured to perform the controller control logic function comparison method by any other appropriate means, such as by means of firmware.

[0104] Various implementations of the systems and techniques described above herein can be realized in digital electronic circuitry, integrated circuitry, a Field Programmable Gate Array (FPGA), an Application Specific Integrated Circuit (ASIC), an Application Specific Standard Parts (ASSP), a System On Chip (SOC), a Complex Programmable Logic Device (CPLD), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include implementation in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be special or general purpose, coupled to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.

[0105] Program code for carrying out methods of the present application can be written in any combination of one or more programming languages. This program code can be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the program code, when executed by the processor or controller, produces a means for implementing the functions / acts specified in the flowcharts and / or block diagrams. The program code can be retrieved from a machine-readable medium or device and executed by a processor to produce a machine for implementing the functions / acts specified in the flowcharts and / or block diagrams. The program code can be executed as a stand-alone program, or in combination with other program codes, on a machine such as a computer, to produce a machine that can implement the functions / acts specified in the flowcharts and / or block diagrams.

[0106] In the context of the present application, a machine-readable medium can be a tangible medium that can contain or store program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium can include but is not limited to an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of the machine-readable storage medium would include one or more lines of electrical connections, portable computer disks, hard disk drives, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or Flash memory), optical fibers, portable compact disc read-only memories (CD-ROMs), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0107] To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having a display device (e.g., a Cathode Ray Tube (CRT) or Liquid Crystal Display (LCD) monitor) for displaying information to the user and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the computer. Other kinds of devices can be used to provide for interaction with a user as well; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input.

[0108] The systems and techniques described herein can be implemented in a computing system that includes a back end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front end component (e.g., a user computer having a graphical user interface or a Web browser through which a user can interact with an implementation of the systems and techniques described herein), or any combination of such back end, middleware, or front end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), the Internet, and a blockchain network.

[0109] The computer system can include clients and servers. This relationship can be. The servers are generally remote from the users and can be accessed via the Internet using a communication network. The relationship can be a client-server relationship, where the servers are the data servers and the clients are the users' computers. The servers can be cloud servers, also known as cloud computing servers or cloud hosts, which are a host product in the cloud computing service system. The servers can also be servers of a distributed system, or servers combined with a blockchain.

[0110] It should be understood that various forms of flow shown above can be used with orders of steps reordered, steps added, or steps deleted. For example, the steps described in the present application can be performed in parallel, in series, or in a different order, as long as the desired results of the technical solutions of the present application can be achieved, and the present application is not limited herein.

[0111] The above detailed description does not constitute a limitation on the protection scope of the present application. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent replacements, and improvements made within the spirit and principles of the present application should be included in the protection scope of the present application.

Claims

1. A comparison method of a controller control logic function, characterized by, The method comprises: obtaining an output function block of each of a plurality of controllers and identification information corresponding to the output function block; generating a feature value of the output function block based on the identification information corresponding to the output function block; obtaining a superior function block of the output function block and generating a feature value of the superior function block based on the feature value of the output function block; wherein the superior function block of the output function block is a function block located upstream of the output function block; comparing control logics of the plurality of controllers based on the feature values of the function blocks in each of the controllers to obtain a control logic comparison result of the plurality of controllers; the step of obtaining the superior function block of the output function block and generating the feature value of the superior function block based on the feature value of the output function block comprises: step S1: obtaining a first input pin of the output function block and corresponding first connection information; step S2: determining a first target pin connected with a first function block from the first input pin based on the first connection information; step S3: determining the first function block as a superior function block and generating a feature value of the first function block based on the identification information of the first target pin and the feature value of the output function block; step S4: obtaining a second input pin of the superior function block and corresponding second connection information; step S5: if there is a second target pin connected with a second function block in the second input pin, determining whether the second function block has been determined as a superior function block; if there is no second target pin connected with a second function block in the second input pin, exiting the process; step S6: if the second function block has not been determined as a superior function block, generating a feature value of the second function block based on the identification information of the second target pin and the feature value of the superior function block and determining the second function block as a new superior function block; if the second function block has been determined as a superior function block, exiting the process; step S7: returning to execute the step S4; the step of comparing the control logics of the plurality of controllers based on the feature values of the function blocks in each of the controllers to obtain a control logic comparison result of the plurality of controllers comprises: obtaining a first target function block of a first controller among the plurality of controllers; obtaining a second target function block of a second controller among the plurality of controllers based on the feature value of the first target function block; comparing related information of the first target function block and related information of the second target function block to obtain a comparison result; repeating the above steps until all function blocks in the first controller are traversed to obtain a control logic comparison result of the plurality of controllers.

2. The method of claim 1, wherein, The related information comprises an output value and / or a parameter value of a function block.

3. The method of claim 1, wherein, The method further comprises: generating an index table corresponding to each of the controllers by taking the output function block of each of the controllers as an index entry and taking the identification information corresponding to the output function block as an index value of the index entry.

4. A comparison device for a controller control logic function, characterized by The method comprises: The acquisition module is configured to acquire an output function block of each of the plurality of controllers and identification information corresponding to the output function block; The generation module is configured to generate a feature value of the output function block based on the identification information corresponding to the output function block; The processing module is configured to acquire a superior function block of the output function block and generate a feature value of the superior function block based on the feature value of the output function block; wherein the superior function block of the output function block is a function block located upstream of the output function block; The comparison module is configured to compare control logics of the plurality of controllers based on the feature values of the function blocks in each of the plurality of controllers, and acquire a control logic comparison result of the plurality of controllers. The processing module is specifically configured to: Step S1: acquire a first input pin of the output function block and corresponding first connection information; Step S2: determine a first target pin connected with a first function block from the first input pin based on the first connection information; Step S3: determine the first function block as a superior function block, and generate a feature value of the first function block based on identification information of the first target pin and the feature value of the output function block; Step S4: acquire a second input pin of the superior function block and corresponding second connection information; Step S5: if there is a second target pin connected with a second function block in the second input pin, determine whether the second function block has been determined as a superior function block; if there is no second target pin connected with a second function block in the second input pin, exit the process; Step S6: if the second function block has not been determined as a superior function block, generate a feature value of the second function block based on identification information of the second target pin and the feature value of the superior function block, and determine the second function block as a new superior function block; if the second function block has been determined as a superior function block, exit the process; Step S7: return to execute the step S4; The comparison module is specifically configured to: acquire a first target function block of a first controller among the plurality of controllers; acquire a second target function block of a second controller among the plurality of controllers based on a feature value of the first target function block; compare related information of the first target function block and related information of the second target function block to acquire a comparison result; repeat the above steps until all function blocks in the first controller are traversed to acquire a control logic comparison result of the plurality of controllers.

5. An electronic device, comprising: comprise: at least one processor; and a memory connected in communication with the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the comparison method of the control logic function of the controller according to any one of claims 1 to 3.

6. A computer readable storage medium storing instructions, the instructions comprising: When the instructions are executed, the method according to any one of claims 1 to 3 is implemented.

Citation Information

Patent Citations

  • Split-range control method and device, computer readable and writable storage medium and processor

    CN115562082A

  • State control device, control method, and program

    WO2013146395A1