Method and apparatus for comparing engineering application software logic of nuclear safety class dcs systems

By comparing the logic of nuclear safety-grade DCS system engineering application software using graph theory, the difficulty of identifying logical differences between different units or versions was solved, improving the efficiency and accuracy of comparison and reducing design errors.

CN120973650BActive Publication Date: 2026-01-27NUCLEAR POWER INSTITUTE OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511492265.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-10-20
Publication Date
2026-01-27
Estimated Expiration
2045-10-20

AI Technical Summary

Technical Problem

In nuclear power plants, it is difficult to identify the differences in the logical design of nuclear safety-grade DCS system engineering application software between different units or different versions. Manual verification is time-consuming and inaccurate, while image recognition technology has low cost-effectiveness.

Method used

The underlying data of engineering application software is abstracted into a directed graph using graph theory methods, merged into an initial directed graph, simplified into a simplified directed graph, and connected components are calculated. Mapping relationships are established, path differences are found, inconsistent nodes are recorded, and comparison results are displayed.

Benefits of technology

It improves the efficiency and accuracy of logical comparison, reduces the workload of designers, reduces design errors, avoids human error, and simplifies the problem of misidentification of changes in the position of drawing elements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120973650B_ABST
    Figure CN120973650B_ABST
Patent Text Reader

Abstract

The application discloses a kind of nuclear safety grade DCS system engineering application software logic comparison method and device, it is related to nuclear power technical field, the underlying data in engineering application software is based on in the present application, the logic comparison of different units or different versions of engineering application software is realized, a large number of false positives caused by comparison based on image recognition technology is solved, the misidentification problem caused by the large displacement of the element position in drawing is eliminated, and it is also unnecessary to train through artificial intelligence big model, the workload of designer is reduced, the misidentification of comparison result caused by different algorithm modules used by different designers and different design styles is eliminated, work efficiency and work quality are greatly improved, and logic error caused by human error is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of nuclear power technology, specifically to a method and apparatus for logical comparison of engineering application software in nuclear safety-grade DCS systems. Background Technology

[0002] The reactor protection system is one of the most important safety guarantees in a nuclear power plant. The nuclear safety-grade DCS is a crucial component of the reactor protection system, primarily responsible for the safe shutdown and accident mitigation in emergency situations. The nuclear safety-grade DCS ensures the safe shutdown of the reactor in emergencies and prevents further escalation by monitoring various reactor parameters in real time and performing complex logical calculations. The accuracy and reliability of this process directly depend on the algorithmic logic design of the engineering application software of the nuclear safety-grade DCS.

[0003] Currently, a project in the same phase usually includes two units. The latter unit is often a replica of the former unit. The two units have completely identical logical functions, but due to different designers and design methods, the specific form of the logic displayed on the graphical screen is also different. Sometimes, the algorithm logic design of the former unit may be correct, but the algorithm logic design of the latter unit may be incorrect.

[0004] Since the algorithm logic design of a single generator unit may involve more than 4,000 pages of graphical interfaces, with numerous logics and algorithms and complex functions, manual verification is not only time-consuming but also cannot guarantee a high degree of accuracy. Furthermore, because the specific forms in which the logic is represented on the graphical interfaces are quite diverse, using image recognition technology would inevitably require the introduction and training of artificial intelligence models, resulting in low cost-effectiveness. Summary of the Invention

[0005] To achieve low-cost and rapid identification of differences in engineering application software logic between different units or between different versions of the same unit, this application proposes a method and apparatus for comparing engineering application software logic in nuclear safety-grade DCS systems.

[0006] This application is achieved through the following technical solution:

[0007] A method for logically comparing engineering application software in a nuclear safety-grade DCS system, comprising:

[0008] Read the underlying data of the engineering application software, and abstract the logical model in the underlying data into several directed graphs according to the correct logical flow order based on graph theory;

[0009] Read the node attributes in the directed graph and merge all the directed graphs of the engineering application software into an initial directed graph;

[0010] The logical attributes and logical node structures of each node are obtained from the initial directed graph, and the formation rules of multiple types of logical node structures are abstracted. According to the formation rules, specific logical node structures are merged into fixed graph node structures to generate a simplified directed graph of the engineering application software.

[0011] Calculate all connected components of the simplified directed graphs of the two engineering application software programs to be compared, and establish the mapping relationship between all connected components of the two engineering application software programs based on the structure of each connected component and the node attributes, and record the connected components without mapping relationship.

[0012] Find the unqueried starting point in the baseline connected component, and search for nodes sequentially from the starting point until the ending point is found. Record the path from the starting point to the ending point, and continue in this manner until the paths of all starting points in the baseline connected component are recorded. Among them, one connected component in a pair of connected components with a mapping relationship is used as the baseline connected component, and the other connected component is used as the comparison connected component.

[0013] Based on each branch path of the baseline connected component, query all input and output nodes and node attributes of the nodes in the branch path in turn, and compare them with the query results of the corresponding nodes of the comparison connected component. Record the inconsistent nodes in all branch paths, and compare and record the inconsistent nodes in all connected components in a loop.

[0014] In some implementations, it also includes:

[0015] Based on the drawing information obtained from the underlying data parsing of the engineering application software, the corresponding design drawings are obtained, and the design drawings are marked according to the comparison results and displayed on the human-computer interaction interface.

[0016] In some implementations, the step of reading the underlying data of the engineering application software and abstracting the logical model in the underlying data into several directed graphs based on graph theory includes:

[0017] The underlying data of the engineering application software is read and parsed to obtain element information related to the application software logic in the design drawings. The element information includes drawing information, variable information, symbol information, logic information, and logical connection relationships.

[0018] Based on graph theory, the obtained variable information, symbol information, and logical information are abstracted into different nodes, and relevant attributes are assigned to the nodes. The connection relationship between each node is constructed according to the obtained logical connection relationship, and the application software algorithm logic of different design drawings is converted into corresponding directed graphs.

[0019] In some implementations, during the creation of the directed graph, the input and output attributes of the nodes are used to determine whether the direction of their connections is consistent with the direction of the logical flow. If they are inconsistent, the directions need to be adjusted to be consistent.

[0020] In some implementations, the process of forming the simplified directed graph includes:

[0021] Based on the logical attributes and logical node structure of each node in the initial directed graph, search for AND / OR logic algorithm blocks of the same type that are connected in sequence.

[0022] Determine if a group of sequentially connected algorithm blocks has multiple outputs. If not, start from the first algorithm block of the same type in this group of sequentially connected algorithm blocks and continue to the first output of the subsequent connected algorithm blocks of the same type, and logically merge these algorithm blocks into the same node.

[0023] Iterate through all the searched algorithm block groups and merge the algorithm block groups that meet the conditions at the logical level in the same way as in the previous step.

[0024] In some implementations, after recording all paths in the reference connected component, it is also necessary to:

[0025] Search for and delete duplicate path information, keeping only the different branch paths.

[0026] In some implementations, after recording inconsistent nodes across all branch paths, it is also necessary to:

[0027] The system searches for and removes duplicate node information, resulting in a deduplicated comparison result.

[0028] On the other hand, this application also proposes a logic comparison device for nuclear safety-grade DCS system engineering application software, comprising:

[0029] The graphical module is used to read the underlying data of the engineering application software and abstract the logical model in the underlying data into several directed graphs based on graph theory in the correct logical flow order.

[0030] The merging module is used to read the node attributes in the directed graph and merge all the directed graphs of the engineering application software into an initial directed graph;

[0031] The simplification module is used to obtain the logical attributes and logical node structures of each node from the initial directed graph, and abstract the formation rules of multiple types of logical node structures. According to the formation rules, specific logical node structures are merged into fixed graph node structures to generate the simplified directed graph of the engineering application software.

[0032] The mapping module is used to calculate all connected components of the simplified directed graphs of the two engineering application software to be compared, and to establish the mapping relationship between all connected components of the two engineering application software according to the structure of each connected component and the node attributes, and to record the connected components without mapping relationship.

[0033] The path search module is used to find the unqueried starting point in the baseline connected component, and search for nodes sequentially from the starting point until the ending point is found, and record the path from the starting point to the ending point, and continue in sequence until the paths of all starting points in the baseline connected component are recorded; wherein, one of the connected components in a pair of connected components with a mapping relationship is used as the baseline connected component, and the other connected component is used as the comparison connected component.

[0034] In addition, a path comparison module is used to sequentially query all input and output nodes and node attributes of nodes in each branch path of the baseline connected component, compare them with the query results of the corresponding nodes of the comparison connected component, record the inconsistent nodes in all branch paths, and cyclically compare and record the inconsistent nodes in all connected components.

[0035] In some implementations, it also includes:

[0036] The display module is used to obtain the corresponding design drawings based on the drawing information obtained by parsing the underlying data of the engineering application software, mark the design drawings according to the comparison results, and display them on the human-computer interaction interface.

[0037] In some implementations, the graphical module includes:

[0038] The parsing unit is used to read the underlying data of the engineering application software and parse the element information related to the application software logic in the design drawings. The element information includes drawing information, variable information, symbol information, logic information, and logical connection relationships.

[0039] In addition, abstract units are used to abstract the obtained variable information, symbol information and logical information into different nodes based on graph theory, and to assign relevant attributes to the nodes. The connection relationship of each node is constructed according to the obtained logical connection relationship, and the application software algorithm logic of different design drawings is converted into the corresponding directed graphs.

[0040] In some implementations, the graphical module further includes:

[0041] The verification unit is used to determine whether the connection direction of a node is consistent with the logical flow direction by using the input and output attributes of the node during the creation process of the directed graph. If they are inconsistent, the direction needs to be adjusted to be consistent.

[0042] In some implementations, the simplification module includes:

[0043] The search unit is used to search for AND / OR logic algorithm blocks of the same type that are connected sequentially, based on the logical attributes and logical node structure of each node in the initial directed graph.

[0044] The merging unit is used to determine whether a group of sequentially connected algorithm blocks has multiple outputs. If not, it logically merges the first algorithm block of the same type in this group of sequentially connected algorithm blocks into the same node, up to the first output of the subsequent connected algorithm blocks of the same type.

[0045] In addition, there is a traversal unit, which is used to traverse all the searched algorithm block groups and perform logical merging processing on the algorithm block groups that meet the conditions in the previous step.

[0046] This application proposes a method for comparing the logic of engineering application software in nuclear safety-grade DCS systems. Based on the underlying data in the engineering application software, it enables logical comparison of engineering application software from different units or different versions. This solves the problem of numerous false alarms caused by comparison based on image recognition technology, eliminates misidentification caused by large displacements of elements in drawings, and eliminates the need for training with large artificial intelligence models, thus reducing the workload of designers. It also eliminates misidentification of comparison results caused by different algorithm modules and design styles used by different designers, significantly improving work efficiency and quality, and avoiding logical errors caused by human error. This application has been used in nuclear power DCS supply projects. In practical applications, it compares the control logic of two different units or two versions of the same project using underlying engineering data. It is convenient, fast, and simple to use, greatly reducing inconsistencies between units or different versions, and reducing the number of design errors.

[0047] Correspondingly, the nuclear safety-grade DCS system engineering application software logic comparison device proposed in this application also possesses the same technical effects as described above. Attached Figure Description

[0048] The accompanying drawings, which are included to provide a further understanding of the embodiments of this application and form part of this application, do not constitute a limitation on the embodiments of this application. In the drawings:

[0049] Figure 1 This is a schematic diagram of the comparison method proposed in the embodiments of this application;

[0050] Figure 2 A partial schematic diagram illustrating the comparison results of two engineering application software algorithm logics in an embodiment of this application.

[0051] Figure 3This is a block diagram illustrating the principle of the comparative device proposed in the embodiments of this application;

[0052] Figure 4 This is a schematic diagram of the comparative system architecture proposed in the embodiments of this application;

[0053] Figure 5 This is a schematic diagram of the electronic device proposed in the embodiments of this application;

[0054] Figure 6 This is a schematic diagram of a computer-readable storage medium proposed in an embodiment of this application;

[0055] Figure reference numerals and corresponding component names:

[0056] 200 - Comparison device; 201 - Graphical module; 202 - Merging module; 203 - Simplification module; 204 - Mapping module; 205 - Path search module; 206 - Path comparison module; 207 - Display module; 300 - Comparison system; 301 - Input device; 302 - Output device; 303 - Processor A; 304 - Memory A; 400 - Electronic device; 410 - Memory B; 420 - Processor B; 411 - Computer program A; 500 - Computer-readable storage medium; 511 - Computer program B. Detailed Implementation

[0057] In the following, the terms “comprising” or “may include” as used in the various embodiments of this application indicate the presence of a function, operation, or element of the invention and do not limit the addition of one or more functions, operations, or elements. Furthermore, as used in the various embodiments of this application, the terms “comprising,” “having,” and their cognates are intended only to indicate a specific feature, number, step, operation, element, component, or combination of the foregoing and should not be construed as primarily excluding the presence of one or more other features, numbers, steps, operations, elements, components, or combinations of the foregoing, or adding one or more combinations of the foregoing.

[0058] In various embodiments of this application, the expression "or" or "at least one of A and / or B" includes any combination or all combinations of the words listed simultaneously. For example, the expression "A or B" or "at least one of A and / or B" may include A, may include B, or may include both A and B.

[0059] The terms used in the various embodiments of this application (such as "first," "second," etc.) may modify various constituent elements in the various embodiments, but do not limit the corresponding constituent elements. For example, the above terms do not limit the order and / or importance of the elements. The above terms are only used for the purpose of distinguishing one element from other elements. For example, a first user device and a second user device refer to different user devices, although both are user devices. For example, without departing from the scope of the various embodiments of this application, a first element may be referred to as a second element, and similarly, a second element may be referred to as a first element.

[0060] It should be noted that if a description is made of "connecting" one component to another, then the first component can be directly connected to the second component, and a third component can be "connected" between the first and second components. Conversely, when a component is "directly connected" to another component, it can be understood that there is no third component between the first and second components.

[0061] The terminology used in the various embodiments of this application is for the purpose of describing particular embodiments only and is not intended to limit the various embodiments of this application. As used herein, the singular form is intended to include the plural form as well, unless the context clearly indicates otherwise. Unless otherwise defined, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art to which the various embodiments of this application pertain. The terms (such as those defined in a generally used dictionary) are to be interpreted as having the same meaning as in the context of the relevant technical field and are not to be interpreted as having an idealized or overly formal meaning, unless clearly defined in the various embodiments of this application.

[0062] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the embodiments and accompanying drawings. The illustrative embodiments and descriptions of this application are only for explaining this application and are not intended to limit this application.

[0063] This application provides an embodiment of a logic comparison method for engineering application software in a nuclear safety-grade DCS system, such as... Figure 1 As shown, the method proposed in this application includes the following steps:

[0064] Step 110: Read the underlying data of the engineering application software and abstract the logical model in the underlying data into several directed graphs according to the correct logical flow order based on graph theory; it can be understood that the underlying data of the engineering application software is in XML format.

[0065] Step 120: Read the node attributes in the directed graph and merge all the directed graphs of the engineering application software into an initial directed graph;

[0066] Step 130: Obtain the logical attributes and logical node structures of each node from the initial directed graph, and abstract the formation rules of multiple types of logical node structures. According to the formation rules, merge specific logical node structures into fixed graph node structures to generate a simplified directed graph of the engineering application software.

[0067] Step 140: Calculate all connected components of the simplified directed graphs of the two engineering application software to be compared, and establish the mapping relationship between all connected components of the two engineering application software according to the structure of each connected component and the node attributes, and record the connected components without mapping relationship.

[0068] Step 150: Find the unqueried starting point in the baseline connected component. Based on the depth-first search algorithm, search for nodes sequentially from the starting point until the ending point is found. Record the path. Repeat this process until the paths of all starting points in the baseline connected component have been recorded. In this process, one of the connected components in a pair of connected components with a mapping relationship is used as the baseline connected component, and the other connected component is used as the comparison connected component.

[0069] Step 160: Based on each branch path of the baseline connected component, query all input and output nodes and attributes of the nodes in the branch path in turn, and compare them with the query results of the corresponding nodes of the comparison connected component, and record the inconsistent nodes in all branch paths; cyclically compare and record the inconsistent nodes in all connected components.

[0070] Optionally, the method proposed in this application embodiment further includes:

[0071] Step 170: Based on the drawing information obtained from the underlying data parsing of the engineering application software, the corresponding design drawings are acquired and marked on the design drawings according to the comparison results. These marks are then displayed on the human-computer interaction interface for easy viewing by the user. Figure 2 The diagram shown is a partial representation of the algorithm comparison results for a certain engineering application software. It is understood that the comparison results include not only path node comparisons but also connected components without mapping relationships.

[0072] Optionally, step 110 in this embodiment is implemented as follows:

[0073] First, read the underlying data of the engineering application software and parse it to obtain the element information related to the application software logic in the design drawings, including but not limited to drawing information, variable information, static interface symbol information, logic information, and logical connection relationships.

[0074] Then, based on graph theory, the obtained variable information, symbol information, and logical information are abstracted into different nodes, and relevant attributes (such as names) are assigned to the nodes. The connection relationship between each node is constructed according to the obtained logical connection relationship, thereby converting the application software algorithm logic of different design drawings into corresponding directed graphs.

[0075] Meanwhile, during the creation of a directed graph, the input and output attributes of the nodes are used to determine whether the direction of the connection is consistent with the logical flow. If they are inconsistent, the direction needs to be adjusted to be consistent to avoid the problem of the connection direction being opposite to the logical flow direction due to the designer's mistake during the drawing process.

[0076] In step 120 of this embodiment, variable information with mapping relationships (i.e., identical) is searched, and the connection relationships are merged. The variable nodes in the directed graph corresponding to the logic diagram of each page of the engineering application software are traversed, and the variable name attribute of the node is read. If two directed graphs have variable nodes with the same variable name attribute, the two directed graphs are connected through this variable node, and the variable nodes in the two directed graphs are merged into one node. For example, if directed graph A involves variable S, and directed graph B also involves variable S, then directed graphs A and B can be merged together based on variable S while ensuring the correct logical relationship. Following this principle, thousands of directed graphs can be merged into an initial directed graph with hundreds of thousands of nodes and connection relationships.

[0077] Optionally, in step 130 of this embodiment, the directed graph formation process is simplified as follows:

[0078] Based on the logical attributes and logical node structure of each node in the initial directed graph, search for logical / or logical algorithm blocks (i.e. specific logical node structures with the same logical function) that are of the same type and connected in sequence.

[0079] Determine whether a group of sequentially connected algorithm blocks has multiple outputs. If there are no multiple outputs, start from the first algorithm block of the same type in this group of sequentially connected algorithm blocks and end with the first output of the subsequent connected algorithm blocks of the same type, and logically merge these algorithm blocks into the same node.

[0080] Iterate through all the searched algorithm block groups and merge the algorithm block groups that meet the conditions at the logical level in the same way as in the previous step.

[0081] Optionally, in step 140 of this embodiment, by calculating connected components, the simplified directed graph is divided into multiple subgraphs according to logical connection relationships. By establishing mapping relationships between subgraphs, a large number of invalid comparisons are reduced, comparison efficiency is improved, and subsequent result comparison and verification are facilitated. It can be understood that the mapping relationship established in step 140 between all connected components of the two engineering application software programs to be compared involves matching the connected components of the two programs and establishing a mapping relationship between the matched components. If no match is found, there is a surface inconsistency, and the connected components without a mapping relationship are directly recorded in the comparison results. Afterwards, only the nodes of the two connected components with a mapping relationship need to be compared to find the places where the surfaces match but the nodes are inconsistent. This avoids the need to compare all nodes in the entire directed graph, greatly reducing the workload of comparison analysis and improving comparison efficiency.

[0082] Optionally, in step 150 of this embodiment, after recording all paths in the reference connected component, the following further steps are required:

[0083] The system searches for and deletes duplicate path information, retaining only the different branch paths, thus avoiding information redundancy that could affect search efficiency.

[0084] Optionally, in step 160 of this embodiment, after recording inconsistent nodes in all branch paths, the following further steps are required:

[0085] The system searches for and removes duplicate node information, resulting in a deduplicated comparison result.

[0086] The method proposed in this application first uses graph theory to convert the application software algorithm logic of the design drawings into a corresponding directed graph. Considering the influence of different design styles in engineering practice, specific logical structures with commonalities are simplified, thereby reducing the complexity of graph comparison. Then, a mapping relationship is established between all connected components of the two engineering application software programs. Based on this, nodes with mapping relationships are searched and compared in each group of connected components with mapping relationships, thus completing the comparison of the engineering application software algorithm logic. This method solves the problem of numerous misidentifications in traditional image comparison techniques and is insensitive to changes in the position and structure of elements in the drawings. It focuses only on signal information and logical implementation methods without requiring training through large artificial intelligence models. This not only significantly reduces the workload of designers but also greatly improves the detection rate of logical inconsistencies without additional costs, demonstrating high engineering application value in practical applications.

[0087] This application also proposes a logic comparison device for nuclear safety-grade DCS system engineering application software, such as... Figure 3 As shown, the comparison device 200 includes:

[0088] The graphical module 201 is used to read the underlying data of the engineering application software and, based on graph theory, abstract the logical model in the underlying data into several directed graphs in the correct logical flow order. The specific abstraction process is as described in step 110 above, and will not be repeated here.

[0089] The merging module 202 is used to read the node attributes in the directed graph and merge all the directed graphs of the engineering application software into an initial directed graph. The specific merging method is as described in step 120 above, and will not be repeated here.

[0090] The simplification module 203 is used to obtain the logical attributes and logical node structures of each node from the initial directed graph, and abstract the formation rules of multiple types of logical node structures. According to the formation rules, specific logical node structures are merged into fixed graph node structures, thereby generating a simplified directed graph for the engineering application software. The specific merging and simplification process is as described in step 130, and will not be repeated here.

[0091] The mapping module 204 is used to calculate all connected components of the simplified directed graphs of the two engineering application software programs to be compared, and to establish the mapping relationship between all connected components of the two engineering application software programs based on the structure and node attributes of each connected component, and to record connected components without mapping relationship. The specific implementation process is as described in step 140 above, and will not be repeated here.

[0092] The path search module 205 is used to find unqueried starting points in the baseline connected component. Based on a depth-first search algorithm, it searches for nodes sequentially from this starting point until the endpoint is found, recording the path. This process is repeated until all paths from all starting points in the baseline connected component have been recorded. One connected component in a pair of connected components with a mapping relationship is used as the baseline connected component, and the other is used as the comparison connected component. The specific path search process is as described in step 150 above and will not be repeated here.

[0093] Additionally, the path comparison module 206 is used to sequentially query all input and output nodes and attributes of nodes in each branch path of the baseline connected component, and compare them with the query results of the corresponding nodes of the comparison connected component, recording the inconsistent nodes in all branch paths; and cyclically comparing and recording the inconsistent nodes in all connected components. The specific path node comparison process is as described in step 160 above, and will not be repeated here.

[0094] Optionally, the comparison device 200 proposed in this application embodiment further includes:

[0095] The display module 207 is used to obtain the corresponding design drawings based on the drawing information obtained from the underlying data parsing of the engineering application software, mark the design drawings according to the comparison results, and display them on the human-computer interaction interface so that users can view the comparison results.

[0096] Optionally, the graphical module 201 in this embodiment includes:

[0097] The parsing unit is used to read the underlying data of the engineering application software and parse the element information related to the application software logic in the design drawings, including but not limited to drawing information, variable information, static interface symbol information, logic information, and logical connection relationships.

[0098] In addition, abstract units are used to abstract the obtained variable information, symbol information, and logical information into different nodes based on graph theory, and to assign relevant attributes (such as names) to the nodes. The connection relationships of each node are constructed according to the obtained logical connection relationships, thereby converting the application software algorithm logic of different design drawings into corresponding directed graphs.

[0099] Optionally, the graphical module 201 in this embodiment further includes:

[0100] The verification unit is used during the creation of a directed graph to determine whether the direction of the connection between nodes is consistent with the logical flow method based on the input and output attributes of the nodes. If they are inconsistent, the direction needs to be adjusted to be consistent to avoid the problem of the connection direction being opposite to the logical flow direction due to the designer's mistake during the drawing process.

[0101] Optionally, the simplified module 203 in this embodiment includes:

[0102] The search unit is used to search for logical / or logical algorithm blocks of the same type (with the same logical function) that are connected sequentially, based on the logical attributes and logical node structure of each node in the initial directed graph.

[0103] The merging unit is used to determine whether a group of sequentially connected algorithm blocks has multiple outputs. If there are no multiple outputs, the algorithm blocks are logically merged into the same node, starting from the first algorithm block of the same type in this group of sequentially connected algorithm blocks and ending at the first output of the subsequent connected algorithm blocks of the same type.

[0104] In addition, there is a traversal unit, which is used to traverse all the searched algorithm block groups and call the merging unit to perform logical merging processing on the algorithm block groups that meet the conditions in turn.

[0105] Optionally, the path search module 205 in this embodiment is further configured to perform the following steps:

[0106] After recording all paths in the connected components, it is also necessary to:

[0107] Based on all paths of each connected component in the record, duplicate path information is searched and deleted, and only different branch paths are retained, thereby avoiding information redundancy that affects search efficiency.

[0108] Optionally, the path comparison module 206 in this embodiment is further configured to perform the following steps:

[0109] After recording the inconsistent nodes in all branch paths, it is also necessary to:

[0110] After identifying nodes with inconsistent branch paths in the records, duplicate node information is searched and deleted, resulting in a deduplicated comparison result.

[0111] This application also proposes a logic comparison system for nuclear safety-grade DCS system engineering application software, such as... Figure 4 As shown, the comparative system 300 proposed in this application embodiment includes:

[0112] The system comprises an input device 301, an output device 302, a processor A303, and a memory A304; wherein the number of processors A303 and memory A304 can be one or more. Figure 4 The following description uses a processor A303 and a memory A304 as an example. The input device 301, output device 302, processor A303, and memory A304 can be connected via a bus or other means. Figure 4 Taking the example of a connection between China and Israel via a bus.

[0113] Specifically, by calling the operation instructions stored in memory A304, processor A303 executes the following steps:

[0114] Read the underlying data of the engineering application software, and abstract the logical model in the underlying data into several directed graphs according to the correct logical flow order based on graph theory;

[0115] Read the node attributes in the directed graph and merge all the directed graphs of the engineering application software into an initial directed graph;

[0116] The logical attributes and logical node structures of each node are obtained from the initial directed graph, and the formation rules of multiple types of logical node structures are abstracted. Based on the formation rules, specific logical node structures are merged into fixed graph node structures, thereby generating a simplified directed graph for the engineering application software.

[0117] Calculate all connected components of the simplified directed graphs of the two engineering application software programs to be compared, and establish the mapping relationship between all connected components of the two engineering application software programs based on the structure of each connected component and the node attributes, and record the connected components without mapping relationship.

[0118] Find the unqueried starting point in the baseline connected component, and search for nodes sequentially from the starting point using a depth-first search algorithm until the ending point is found. Record the path, and repeat until the paths of all starting points in the baseline connected component have been recorded. Among them, one of the connected components in a pair of connected components with a mapping relationship is used as the baseline connected component, and the other connected component is used as the comparison connected component.

[0119] Based on each branch path of the baseline connected component, query all input and output nodes and attributes of the nodes in the branch path in turn, and compare them with the query results of the corresponding nodes of the comparison connected component, and record the inconsistent nodes in all branch paths; cyclically compare and record the inconsistent nodes in all connected components.

[0120] Optionally, by calling the operation instructions stored in memory A304, processor A303 is also used to execute any of the embodiments in the corresponding examples of the above comparison methods.

[0121] This application also proposes an electronic device 400, such as... Figure 5 As shown, the electronic device 400 includes: a memory B410, a processor B420, and a computer program A411 stored in the memory B410 and executable on the processor B420. When the processor B420 executes the computer program A411, it performs the following steps:

[0122] Read the underlying data of the engineering application software, and abstract the logical model in the underlying data into several directed graphs according to the correct logical flow order based on graph theory;

[0123] Read the node attributes in the directed graph and merge all the directed graphs of the engineering application software into an initial directed graph;

[0124] The logical attributes and logical node structures of each node are obtained from the initial directed graph, and the formation rules of multiple types of logical node structures are abstracted. Based on the formation rules, specific logical node structures are merged into fixed graph node structures, thereby generating a simplified directed graph for the engineering application software.

[0125] Calculate all connected components of the simplified directed graphs of the two engineering application software programs to be compared, and establish the mapping relationship between all connected components of the two engineering application software programs based on the structure of each connected component and the node attributes, and record the connected components without mapping relationship.

[0126] Find the unqueried starting point in the baseline connected component, and search for nodes sequentially from the starting point using a depth-first search algorithm until the ending point is found. Record the path, and repeat until the paths of all starting points in the baseline connected component have been recorded. Among them, one of the connected components in a pair of connected components with a mapping relationship is used as the baseline connected component, and the other connected component is used as the comparison connected component.

[0127] Based on each branch path of the baseline connected component, query all input and output nodes and attributes of the nodes in the branch path in turn, and compare them with the query results of the corresponding nodes of the comparison connected component, and record the inconsistent nodes in all branch paths; cyclically compare and record the inconsistent nodes in all connected components.

[0128] Optionally, when processor B420 executes computer program A411, it can implement any of the embodiments in the corresponding examples of the above-described comparative methods.

[0129] It should be noted that the electronic device proposed in this application embodiment is a device used to implement the above comparison method. Therefore, based on the above comparison method proposed in this application embodiment, those skilled in the art can understand the specific implementation method and various variations of the electronic device in this application embodiment. Therefore, how the electronic device specifically implements the above comparison method will not be described in detail here. Any electronic device used by those skilled in the art to implement the above comparison method falls within the scope of protection of this application.

[0130] This application also proposes a computer-readable storage medium 500, such as... Figure 6 As shown, the computer-readable storage medium 500 stores a computer program B511, which, when executed by a processor, performs the following steps:

[0131] Read the underlying data of the engineering application software, and abstract the logical model in the underlying data into several directed graphs according to the correct logical flow order based on graph theory;

[0132] Read the node attributes in the directed graph and merge all the directed graphs of the engineering application software into an initial directed graph;

[0133] The logical attributes and logical node structures of each node are obtained from the initial directed graph, and the formation rules of multiple types of logical node structures are abstracted. Based on the formation rules, specific logical node structures are merged into fixed graph node structures, thereby generating a simplified directed graph for the engineering application software.

[0134] Calculate all connected components of the simplified directed graphs of the two engineering application software programs to be compared, and establish the mapping relationship between all connected components of the two engineering application software programs based on the structure of each connected component and the node attributes, and record the connected components without mapping relationship.

[0135] Find the unqueried starting point in the baseline connected component, and search for nodes sequentially from the starting point using a depth-first search algorithm until the ending point is found. Record the path, and repeat until the paths of all starting points in the baseline connected component have been recorded. Among them, one of the connected components in a pair of connected components with a mapping relationship is used as the baseline connected component, and the other connected component is used as the comparison connected component.

[0136] Based on each branch path of the baseline connected component, query all input and output nodes and attributes of the nodes in the branch path in turn, and compare them with the query results of the corresponding nodes of the comparison connected component, and record the inconsistent nodes in all branch paths; cyclically compare and record the inconsistent nodes in all connected components.

[0137] Optionally, when the computer program B511 is executed by the processor, it can implement any of the embodiments corresponding to the above comparison method.

[0138] It should be noted that the descriptions of each embodiment in the above embodiments have different focuses. For parts that are not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.

[0139] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0140] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0141] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0142] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0143] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of this application. It should be understood that the above description is only a specific embodiment of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.

Claims

1. A method for logical comparison of engineering application software in a nuclear safety-grade DCS system, characterized in that, include: Read the underlying data of the engineering application software, and abstract the logical model in the underlying data into several directed graphs according to the correct logical flow order based on graph theory; Read the node attributes in the directed graph and merge all the directed graphs of the engineering application software into an initial directed graph; The logical attributes and logical node structures of each node are obtained from the initial directed graph, and the formation rules of multiple types of logical node structures are abstracted. According to the formation rules, specific logical node structures are merged into fixed graph node structures to generate a simplified directed graph of the engineering application software. Calculate all connected components of the simplified directed graphs of the two engineering application software programs to be compared, and establish the mapping relationship between all connected components of the two engineering application software programs based on the structure of each connected component and the node attributes, and record the connected components without mapping relationship. Find the unqueried starting point in the baseline connected component, and search for nodes sequentially from the starting point until the ending point is found. Record the path from the starting point to the ending point, and continue in this manner until the paths of all starting points in the baseline connected component are recorded. Among them, one connected component in a pair of connected components with a mapping relationship is used as the baseline connected component, and the other connected component is used as the comparison connected component. Based on each branch path of the baseline connected component, query all input and output nodes and node attributes of the nodes in the branch path in turn, and compare them with the query results of the corresponding nodes of the comparison connected component. Record the inconsistent nodes in all branch paths, and compare and record the inconsistent nodes in all connected components in a loop. The process of reading the underlying data of engineering application software and abstracting the logical model in the underlying data into several directed graphs based on graph theory includes: The underlying data of the engineering application software is read and parsed to obtain element information related to the application software logic in the design drawings. The element information includes drawing information, variable information, symbol information, logic information, and logical connection relationships. Based on graph theory, the obtained variable information, symbol information and logical information are abstracted into different nodes, and relevant attributes are assigned to the nodes. The connection relationship of each node is constructed according to the obtained logical connection relationship, and the application software algorithm logic of different design drawings is converted into corresponding directed graphs. During the creation of the directed graph, the input and output attributes of the nodes are used to determine whether the direction of their connection is consistent with the direction of the logical flow. If they are inconsistent, the direction needs to be adjusted to be consistent. The process of forming the simplified directed graph includes: Based on the logical attributes and logical node structure of each node in the initial directed graph, search for AND / OR logic algorithm blocks of the same type that are connected in sequence. Determine if a group of sequentially connected algorithm blocks has multiple outputs. If not, start from the first algorithm block of the same type in this group of sequentially connected algorithm blocks and continue to the first output of the subsequent connected algorithm blocks of the same type, and logically merge these algorithm blocks into the same node. Iterate through all the searched algorithm block groups and merge the algorithm block groups that meet the conditions at the logical level in the same way as in the previous step.

2. The method for logical comparison of engineering application software in a nuclear safety-grade DCS system according to claim 1, characterized in that, Also includes: Based on the drawing information obtained from the underlying data parsing of the engineering application software, the corresponding design drawings are obtained, and the design drawings are marked according to the comparison results and displayed on the human-computer interaction interface.

3. The method for logical comparison of engineering application software in a nuclear safety-grade DCS system according to claim 1, characterized in that, After recording all paths in the aforementioned baseline connected component, the following is also required: Search for and delete duplicate path information, keeping only the different branch paths.

4. The method for logical comparison of engineering application software in a nuclear safety-grade DCS system according to claim 1, characterized in that, After recording the inconsistent nodes in all branch paths, it is also necessary to: The system searches for and removes duplicate node information, resulting in a deduplicated comparison result.

5. A logic comparison device for nuclear safety-grade DCS system engineering application software, characterized in that, include: The graphical module is used to read the underlying data of the engineering application software and abstract the logical model in the underlying data into several directed graphs based on graph theory in the correct logical flow order. The merging module is used to read the node attributes in the directed graph and merge all the directed graphs of the engineering application software into an initial directed graph; The simplification module is used to obtain the logical attributes and logical node structures of each node from the initial directed graph, and abstract the formation rules of multiple types of logical node structures. According to the formation rules, specific logical node structures are merged into fixed graph node structures to generate the simplified directed graph of the engineering application software. The mapping module is used to calculate all connected components of the simplified directed graphs of the two engineering application software to be compared, and to establish the mapping relationship between all connected components of the two engineering application software according to the structure of each connected component and the node attributes, and to record the connected components without mapping relationship. The path search module is used to find the unqueried starting point in the baseline connected component, and search for nodes sequentially from the starting point until the ending point is found, and record the path from the starting point to the ending point, and continue in sequence until the paths of all starting points in the baseline connected component are recorded; wherein, one of the connected components in a pair of connected components with a mapping relationship is used as the baseline connected component, and the other connected component is used as the comparison connected component. And, a path comparison module, used to query all input and output nodes and node attributes of nodes in each branch path according to each branch path of the baseline connected component, compare them with the query results of the corresponding nodes of the comparison connected component, record the inconsistent nodes in all branch paths, and cyclically compare and record the inconsistent nodes in all connected components. The graphical module includes: The parsing unit is used to read the underlying data of the engineering application software and parse the element information related to the application software logic in the design drawings. The element information includes drawing information, variable information, symbol information, logic information, and logical connection relationships. In addition, abstract units are used to abstract the obtained variable information, symbol information and logical information into different nodes based on graph theory, and to assign relevant attributes to the nodes. The connection relationship of each node is constructed according to the obtained logical connection relationship, and the application software algorithm logic of different design drawings is converted into the corresponding directed graphs respectively. The graphical module also includes: The verification unit is used to determine whether the connection direction of a node is consistent with the logical flow direction by using the input and output attributes of the node during the creation process of the directed graph. If they are inconsistent, the direction needs to be adjusted to be consistent. The simplification module includes: The search unit is used to search for AND / OR logic algorithm blocks of the same type that are connected sequentially, based on the logical attributes and logical node structure of each node in the initial directed graph. The merging unit is used to determine whether a group of sequentially connected algorithm blocks has multiple outputs. If not, it logically merges the first algorithm block of the same type in this group of sequentially connected algorithm blocks into the same node, up to the first output of the subsequent connected algorithm blocks of the same type. In addition, there is a traversal unit, which is used to traverse all the searched algorithm block groups and perform logical merging processing on the algorithm block groups that meet the conditions in the previous step.

6. The nuclear safety-grade DCS system engineering application software logic comparison device according to claim 5, characterized in that, Also includes: The display module is used to obtain the corresponding design drawings based on the drawing information obtained by parsing the underlying data of the engineering application software, mark the design drawings according to the comparison results, and display them on the human-computer interaction interface.

Citation Information

Patent Citations

  • Node graph difference detection method and device, electronic equipment and storage medium

    CN113419739A

  • Comparison test method and device, electronic equipment and storage medium

    CN118965018A