Comparison test method and device, electronic equipment and storage medium
Through the comparison method of drawing naming mapping and recursive algorithms, the comparison and testing of large-scale CLD graphs in nuclear power plants was automatically completed, solving the problems of low manual comparison efficiency and large errors, and achieving efficient and accurate test results.
Patent Information
- Application Number
- CN202411006485.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-25
- Publication Date
- 2024-11-15
AI Technical Summary
In a nuclear power plant, each unit needs to completely compare the control logic diagram (CLD diagram) of about 10,000 pages, resulting in a large amount of work, tester patience and map reading ability to be tested, and it is easy to introduce human errors.
The configuration diagram to be compared and the target CLD diagram is determined by drawing naming mapping relationship, and it is converted into a configuration tree and a CLD tree through normalization. The comparison and test are automatically completed in batches through recursive algorithms.
It greatly reduces the workload of testers, improves the efficiency of comparison and testing, reduces human errors, shortens the test time, and improves the accuracy of comparison and testing.
Smart Images

Figure CN118965018A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of comparison testing, and in particular to a comparison testing method, device, electronic equipment and storage medium. Background Art
[0002] Distributed Control System (DCS) is a data acquisition and processing system and is the first acquisition and output system for industrial field data. In the nuclear power plant information system and DCS, it is most important whether the functions implemented by DCS are consistent with the functions designed by the design institute.
[0003] The control logic diagram (CLD diagram) is a logic diagram generated by the nuclear power design department to achieve specific functions; the DCS needs to be programmed in a configuration way to complete the functions designed by the CLD diagram. The configuration diagram is a diagram generated by the DCS designer by converting the CLD diagram according to the DCS graphical programming language. The existing method is to manually compare the CLD diagram with the configuration diagram, and manually compare the configuration diagram with the CLD on the CLD drawing. Figure 1 The consistent and inconsistent ones are painted in two colors respectively to judge whether the logic of DCS is consistent with the original design.
[0004] The inventors have found that each unit in a nuclear power plant must completely draw all the drawings for verification, and the CLD drawings of each unit are about 10,000 pages. It takes 270 people per day to complete one version of the baseline test. Not only is the workload heavy, but it also tests the patience and drawing-reading ability of the testers, and is very prone to human errors. Summary of the invention
[0005] In this regard, the present application provides a comparison test method, device, electronic equipment and storage medium to solve the problem that each unit in the existing nuclear power plant must completely draw all the drawings for verification. The CLD drawings of each unit are about 10,000 pages. According to the work efficiency of 270 people / day, one version of the baseline test can be completed. Not only is the workload large, but it also tests the patience and reading ability of the testers, and it is very easy to introduce human errors.
[0006] To achieve the above objectives, the embodiments of the present invention provide the following technical solutions:
[0007] The first aspect of the present application discloses a comparison test method, comprising:
[0008] According to the mapping relationship between the drawing names, a configuration diagram to be compared and a target CLD diagram are determined, wherein the configuration diagram to be compared is any one of all the configuration diagrams, and the target CLD diagram is a CLD diagram that needs to be compared for consistency with the configuration diagram to be compared;
[0009] Normalizing the configuration diagram to be compared and the target CLD diagram to obtain a configuration tree corresponding to the configuration diagram to be compared and a CLD tree corresponding to the target CLD diagram;
[0010] The configuration tree and the CLD tree are compared according to a recursive algorithm to obtain a comparison test result.
[0011] Optionally, in the above comparison test method, before determining the configuration diagram to be compared and the target CLD diagram according to the drawing naming mapping relationship, it also includes:
[0012] Determine the configuration file path and CLD drawing file path.
[0013] Optionally, in the above comparison test method, the configuration diagram to be compared and the target CLD diagram are normalized to obtain a configuration tree corresponding to the configuration diagram to be compared and a CLD tree corresponding to the target CLD diagram, including:
[0014] Normalizing the target algorithm block and the target algorithm block pins in the configuration diagram to be compared and the target CLD diagram;
[0015] According to the algorithm block mapping table and the point name conversion rule, the algorithm blocks and the point names in the configuration diagram to be compared are converted to obtain a target comparison configuration diagram;
[0016] The target comparison configuration diagram is abstracted into a tree structure to obtain a configuration tree corresponding to the configuration diagram to be compared, and the target CLD diagram is abstracted into a tree structure to obtain a CLD tree corresponding to the target CLD diagram.
[0017] Optionally, in the above comparison test method, the configuration diagram to be compared and the target CLD diagram are normalized to obtain a configuration tree corresponding to the configuration diagram to be compared and a CLD tree corresponding to the target CLD diagram, including:
[0018] Normalizing the target algorithm block and the target algorithm block pins in the configuration diagram to be compared and the target CLD diagram;
[0019] According to the algorithm block mapping table and the point name conversion rule, the algorithm blocks and point names in the target CLD diagram are converted to obtain the final comparison CLD diagram;
[0020] The configuration diagram to be compared is abstracted into a tree structure to obtain a configuration tree corresponding to the configuration diagram to be compared, and the final comparison CLD diagram is abstracted into a tree structure to obtain a CLD tree corresponding to the target CLD diagram.
[0021] Optionally, in the above comparison test method, after comparing the configuration tree and the CLD tree according to the recursive algorithm, it also includes:
[0022] Determine in real time whether the comparison test end condition is met, the comparison test end condition includes: the current comparison node is a compared node or a leaf node;
[0023] If it is determined that the comparison test end condition is met, the comparison test is stopped.
[0024] Optionally, in the above comparison test method, after comparing the configuration tree and the CLD tree according to the recursive algorithm to obtain the comparison test result, it also includes:
[0025] Marking in the target CLD diagram according to the comparison test result of the configuration diagram to be compared;
[0026] The first part of the target CLD is first identified, the second part of the target CLD is second identified, and the third part of the target CLD is third identified. The first part is the comparison test result characterizing the configuration diagram to be compared and the target CLD. Figure 1 The first mark, the second mark and the third mark have different display colors.
[0027] Optionally, in the above comparison test method, after comparing the configuration tree and the CLD tree according to the recursive algorithm to obtain the comparison test result, it also includes:
[0028] Marking in the configuration diagram to be compared according to the comparison test result of the configuration diagram to be compared;
[0029] The first part of the configuration diagram to be compared is first identified, the second part of the configuration diagram to be compared is second identified, and the third part of the configuration diagram to be compared is third identified, wherein the first part is the comparison test result characterizing the configuration diagram to be compared and the target CLD Figure 1 The first mark, the second mark and the third mark have different display colors.
[0030] The second aspect of the present application discloses a comparison test device, comprising:
[0031] A determination unit, used to determine a configuration diagram to be compared and a target CLD diagram according to a mapping relationship between drawing names, wherein the configuration diagram to be compared is any one of all configuration diagrams, and the target CLD diagram is a CLD diagram that needs to be compared for consistency with the configuration diagram to be compared;
[0032] A normalization unit is used to perform normalization processing on the configuration diagram to be compared and the target CLD diagram to obtain a configuration tree corresponding to the configuration diagram to be compared and a CLD tree corresponding to the target CLD diagram;
[0033] The comparison test unit compares the configuration tree and the CLD tree according to a recursive algorithm to obtain a comparison test result.
[0034] Optionally, in the above comparison test device, it also includes:
[0035] The path determination unit is used to determine the configuration file path and the CLD drawing file path.
[0036] Optionally, in the above comparison test device, the normalization unit is specifically used for:
[0037] Normalizing the target algorithm block and the target algorithm block pins in the configuration diagram to be compared and the target CLD diagram;
[0038] According to the algorithm block mapping table and the point name conversion rule, the algorithm blocks and the point names in the configuration diagram to be compared are converted to obtain a target comparison configuration diagram;
[0039] The target comparison configuration diagram is abstracted into a tree structure to obtain a configuration tree corresponding to the configuration diagram to be compared, and the target CLD diagram is abstracted into a tree structure to obtain a CLD tree corresponding to the target CLD diagram.
[0040] Optionally, in the above comparison test device, the normalization unit is specifically used for:
[0041] Normalizing the target algorithm block and the target algorithm block pins in the configuration diagram to be compared and the target CLD diagram;
[0042] According to the algorithm block mapping table and the point name conversion rule, the algorithm blocks and point names in the target CLD diagram are converted to obtain the final comparison CLD diagram;
[0043] The configuration diagram to be compared is abstracted into a tree structure to obtain a configuration tree corresponding to the configuration diagram to be compared, and the final comparison CLD diagram is abstracted into a tree structure to obtain a CLD tree corresponding to the target CLD diagram.
[0044] Optionally, in the above comparison test device, it also includes:
[0045] A judgment unit, used for judging in real time whether a comparison test end condition is met, wherein the comparison test end condition includes: the current comparison node is a compared node or a leaf node;
[0046] The stopping unit is used to stop the comparison test if it is determined that the comparison test end condition is met.
[0047] Optionally, in the above comparison test device, it also includes:
[0048] A first identification unit, used for identifying in the target CLD diagram according to the comparison test result of the configuration diagram to be compared;
[0049] The first part of the target CLD is first identified, the second part of the target CLD is second identified, and the third part of the target CLD is third identified. The first part is the comparison test result characterizing the configuration diagram to be compared and the target CLD. Figure 1 The first mark, the second mark and the third mark have different display colors.
[0050] Optionally, in the above comparison test device, it also includes:
[0051] A second identification unit, used for marking in the configuration diagram to be compared according to the comparison test result of the configuration diagram to be compared;
[0052] The first part of the configuration diagram to be compared is first identified, the second part of the configuration diagram to be compared is second identified, and the third part of the configuration diagram to be compared is third identified, wherein the first part is the comparison test result characterizing the configuration diagram to be compared and the target CLD Figure 1 The first mark, the second mark and the third mark have different display colors.
[0053] The third aspect of the present application discloses an electronic device, including: a memory and a processor;
[0054] Wherein, the memory is used to store computer programs;
[0055] The processor is used to execute the computer program, specifically to implement the comparison test method as described in any one of the items disclosed in the first aspect.
[0056] The fourth aspect of the present application discloses a computer storage medium for storing a computer program. When the computer program is executed, it is specifically used to implement the comparison test method as described in any one of the items disclosed in the first aspect.
[0057] The present invention provides a comparison test method, comprising: determining a configuration diagram to be compared and a target CLD diagram according to a mapping relationship of drawing names, wherein the configuration diagram to be compared is any one of all configuration diagrams, and the target CLD diagram is a CLD diagram that needs to be compared for consistency with the configuration diagram to be compared; normalizing the configuration diagram to be compared and the target CLD diagram to obtain a configuration tree corresponding to the configuration diagram to be compared and a CLD tree corresponding to the target CLD diagram; comparing the configuration tree and the CLD tree according to a recursive algorithm to obtain a comparison test result of the configuration diagram to be compared, and being able to use computer technology to perform automatic batch comparison tests, thereby solving the problem that each unit in an existing nuclear power plant must completely draw all drawings for verification, and each unit has about 10,000 pages of CLD drawings, and one version of baseline testing can be completed at a work efficiency of 270 people / day, which not only has a large workload but also tests the patience and drawing reading ability of test personnel, and is very likely to introduce the problem of human error. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0059] Figure 1 A flowchart of a comparison test method provided for this application;
[0060] Figure 2 An example diagram of the operation logic of the NOT gate algorithm block provided in an embodiment of the present application;
[0061] Figure 3 An example diagram of the operation logic of the pin negation of an algorithm block provided in an embodiment of the present application;
[0062] Figure 4 A CLD diagram provided in an embodiment of the present application;
[0063] Figure 5 A configuration diagram designed and implemented according to a CLD diagram provided in an embodiment of the present application;
[0064] Figure 6An example diagram of CLD primitive attributes provided in an embodiment of the present application;
[0065] Figure 7 A comparison test flow chart provided for an embodiment of the present application;
[0066] Figure 8 A CLD diagram with a closed feedback loop provided in an embodiment of the present application;
[0067] Fig. 9 and Fig.10 Flowcharts of two comparison test methods provided in the embodiments of the present application;
[0068] Fig.11 A CLD diagram for comparing test results provided in an embodiment of the present application;
[0069] Fig.12 A CLD diagram of artificial smearing comparison provided in an embodiment of the present application;
[0070] Fig.13 A structural diagram of a comparison test device provided in an embodiment of the present application;
[0071] Fig.14 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0072] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0073] First of all, it should be noted that the configuration in this application refers to the graphical programming language of DCS. To complete the functions designed by the CLD diagram, the DCS needs to be programmed in a configuration way. The configuration is compiled into executable code and downloaded to the DCS for execution, thereby completing the functions required by the CLD diagram.
[0074] The inventors have found that in order to ensure the correctness of the DCS function, a series of tests and verifications are required. The correctness of non-safety application software is one of the important items. The existing method to confirm the correctness of non-safety DCS application software is to manually compare the CLD drawings and configuration diagrams to determine whether the logic of the DCS is consistent with the original design. This mainly relies on the participation of test and verification personnel. The analytical ability of the test and verification personnel determines whether the test and verification completely and correctly covers the design intent. Relying on the technical ability of personnel is prone to human errors; and as one of the most complex systems in the industrial field, DCS has a huge number of input and output logics, many logical combinations, and a huge workload. It is also a great test of the endurance and physical strength of the test and verification technicians, so defects may be missed.
[0075] Based on this, the present application provides an embodiment that provides a comparison test method, device, electronic equipment and storage medium to solve the problem that each unit in the existing nuclear power plant must completely draw all the drawings for verification. The CLD drawings of each unit are about 10,000 pages. According to the work efficiency, 270 people / day are required to complete one version of the baseline test. Not only is the workload large, but it also tests the patience and reading ability of the testers, and it is very easy to introduce human errors.
[0076] See also Figure 1 , the comparison test method mainly includes the following steps:
[0077] S101. Determine the configuration drawing to be compared and the target CLD drawing according to the mapping relationship of drawing names.
[0078] The configuration diagram to be compared is any one of all configuration diagrams, and the target CLD diagram is a CLD diagram that needs to be compared for consistency with the configuration diagram to be compared.
[0079] In actual application, the CLD given by the design institute Figure 1 It is usually a common drawing for a type of power station; the drawings of each subsystem are usually distinguished by numbers. For example, the first drawing in the RIC subsystem is usually named RIC001, the second drawing is usually named RIC002...; similarly, the first drawing in the APG subsystem is usually named APG001, the second drawing is usually named APG002...
[0080] Since the configuration diagram is generated by the DCS designer by converting the CLD diagram according to the graphical programming language of the DCS, the DCS designer will follow certain naming rules during the conversion process. Among them, the naming of the configuration diagram converted from the CLD diagram generally adds the abbreviation of the nuclear power plant name and the unit number to the CLD diagram name. For example, the RIC001 configuration diagram of the No. 1 unit of a certain nuclear power plant is named MMRIC001; MM is the abbreviation of a certain nuclear power plant, and 001 represents unit 1.
[0081] Combined with the above, it can be seen that there is a certain mapping relationship between the naming of the configuration diagram and the CLD diagram in the DCS. Through the drawing naming mapping relationship between the configuration diagram and the CLD diagram, the CLD diagram corresponding to each configuration diagram can be found, and the configuration diagram corresponding to each CLD diagram can also be found. Specifically, after the configuration diagram to be compared is determined, the CLD that needs to be compared with the configuration diagram to be compared can be found according to the drawing naming mapping relationship to determine the target CLD diagram.
[0082] In some embodiments, the configuration diagram can be in XML format, and the CLD diagram can be in Visio format; of course, it is not limited to this, the CLD diagram can be in other formats, such as PDF, etc., and the configuration diagram can also be in other formats; it can be determined according to the application environment and user needs, and it is all within the protection scope of this application.
[0083] In some embodiments, before executing step S101 and determining the configuration drawing to be compared and the target CLD drawing according to the drawing naming mapping relationship, the comparison test method may further include step S201:
[0084] S201, determine the configuration file path and the CLD drawing file path.
[0085] Among them, the configuration file path is the path for storing configuration diagrams, and the CLD drawing file path is the path for storing CLD diagrams; all configuration diagrams in the DCS can be obtained according to the configuration file path, and all CLD diagrams can be obtained through the CLD drawing file path.
[0086] In practical applications, the configuration file path and the CLD drawing file path are generally pre-configured. During the comparison test, the configuration drawing to be compared and the target CLD drawing can be determined based on the configuration file path and the CLD drawing file path and according to the drawing naming mapping relationship.
[0087] S102 , normalizing the configuration graph to be compared and the target CLD graph to obtain a configuration tree corresponding to the configuration graph to be compared and a CLD tree corresponding to the target CLD graph.
[0088] In practical applications, for the configuration diagram to be compared and the target CLD diagram without the target algorithm block and the target algorithm block pin, the algorithm block mapping table and the dot-name conversion rule can be used to normalize the configuration diagram to be compared and the target CLD diagram. For the configuration diagram to be compared and the target CLD diagram with the target algorithm block and the target algorithm block pin, the target algorithm block and the target algorithm block pin can be normalized first, and then the algorithm block mapping table and the dot-name conversion rule can be used to normalize the configuration diagram to be compared and the target CLD diagram.
[0089] Among them, the target algorithm block can be an algorithm block with the same operation logic as the algorithm block pin, and the target algorithm pin can be the pin name with the same operation logic as the algorithm block; exemplarily, the target algorithm block can be a NOT gate algorithm block, and the target algorithm pin can be a NOT algorithm pin.
[0090] Specifically, in the process of normalizing the configuration diagram to be compared and the target CLD diagram, the variable naming rules of the DCS configuration design can be used to convert the point names of the CLD diagram into DCS point names to solve the point name class normalization; the same algorithm block mapping file of the DCS configuration tool software is used to normalize the CLD diagram algorithm block name to the DCS algorithm block name; and vice versa.
[0091] In some embodiments, the specific process of executing step S102, normalizing the configuration diagram to be compared and the target CLD diagram, and obtaining the configuration tree corresponding to the configuration diagram to be compared and the CLD tree corresponding to the target CLD diagram is as follows, mainly including steps S701 to S703:
[0092] S701 , normalize the target algorithm blocks and target algorithm block pins in the configuration diagram to be compared and the target CLD diagram.
[0093] Among them, the target algorithm block can be an algorithm block with the same operation logic as the algorithm block pin, and the target algorithm pin can be the pin name with the same operation logic as the algorithm block; exemplarily, the target algorithm block can be a NOT gate algorithm block, and the target algorithm pin can be a NOT algorithm pin.
[0094] The purpose of this application is to compare the consistency of the configuration diagram and the CLD diagram. Since there are differences in the data structures of the configuration diagram and the CLD diagram, in order to improve the comparison coverage and reduce the workload of manual review caused by misjudgment, the data structures of the two should be made as unified as possible. However, in specific applications, the CLD diagram designer may add a negation symbol to the algorithm block pin of the CLD diagram, or may connect a negation gate algorithm block; similarly, the configuration diagram also has the above situation, such as Figure 2 and Figure 3 As shown, the operation logics of the two are the same. In view of the different representations of the same operation logic in the CLD diagram and the configuration diagram, the comparison test method provided in this application can normalize the target algorithm block and the target algorithm block pins with the same operation logic separately, and express the two using the same data structure.
[0095] Specifically, taking the target algorithm pin as the NOT algorithm pin and the target algorithm block as the NOT gate algorithm block as an example, the NOT gate algorithm block can be deleted, and at the same time, the NOT symbol can be marked on each algorithm block pin connected to the NOT gate algorithm block to set them as NOT algorithm pins; or all the NOT algorithm pins can be deleted, and at the same time, the NOT algorithm pins to be deleted can be added with the NOT gate algorithm block; in this way, during the comparison test process, misjudgment caused by the same operation logic but different data structures can be avoided.
[0096] It can be understood that the target algorithm blocks and target algorithm block pins in the configuration diagram to be compared and the target CLD diagram can be normalized in the above manner to improve the comparison coverage and reduce the manual review workload caused by misjudgment.
[0097] S702 : According to the algorithm block mapping table and the point name conversion rule, the algorithm blocks and point names in the configuration diagram to be compared are converted to obtain a target comparison configuration diagram.
[0098] In practical applications, the algorithm block mapping table and the roll call conversion rules are usually pre-configured. The algorithm block mapping table includes the algorithm block mapping relationship between the configuration diagram and the CLD diagram, and the roll call conversion rules include the roll call conversion rules between the configuration diagram and the CLD diagram.
[0099] In specific applications, after normalizing the target algorithm blocks and target algorithm block pins in the configuration diagram to be compared and the target CLD diagram, the algorithm blocks in the configuration diagram to be compared can be converted according to the algorithm block mapping table, and the point names in the configuration diagram to be compared can be converted according to the point name conversion rules to obtain the target comparison configuration diagram.
[0100] S703 , abstracting the target comparison configuration diagram into a tree structure to obtain a configuration tree corresponding to the configuration diagram to be compared, and abstracting the target CLD diagram into a tree structure to obtain a CLD tree corresponding to the target CLD diagram.
[0101] In practical applications, the up-and-down relationship of the connections in the target comparison configuration diagram can be abstracted into a tree structure to obtain the configuration tree corresponding to the configuration diagram to be compared; similarly, the up-and-down relationship of the connections in the target CLD diagram can be abstracted into a tree structure to obtain the CLD tree corresponding to the target CLD diagram.
[0102] Specifically, the algorithm blocks and the input-output relationship of the algorithm blocks of the target comparison configuration diagram can be determined, and a tree structure can be constructed according to the algorithm blocks and the input-output relationship of the algorithm blocks to obtain the configuration tree corresponding to the configuration diagram to be compared. Since there are three types of algorithm blocks in the target comparison configuration diagram, namely, input variable type algorithm blocks, output variable type algorithm blocks, and input-output variable type algorithm blocks. Therefore, the algorithm block of the output variable type can be used as the root node of the tree structure, and the nodes under each root node can be determined according to the input-output relationship of the algorithm block, and finally the input variable type algorithm block can be used as a leaf node.
[0103] Similarly, the algorithm blocks and the input-output relationship of the algorithm blocks of the target CLD diagram can be determined, and a tree structure can be constructed based on the algorithm blocks and the input-output relationship of the algorithm blocks to obtain the configuration tree corresponding to the target CLD diagram. Since there are three types of algorithm blocks in the target CLD diagram, namely, input variable type algorithm blocks, output variable type algorithm blocks, and input-output variable type algorithm blocks. Therefore, the output variable type algorithm block can be used as the root node of the tree structure, and the nodes under each root node can be determined based on the input-output relationship of the algorithm block, and finally the input variable type algorithm block can be used as a leaf node.
[0104] In some embodiments, the specific process of executing step S102, normalizing the configuration diagram to be compared and the target CLD diagram, and obtaining the configuration tree corresponding to the configuration diagram to be compared and the CLD tree corresponding to the target CLD diagram is as follows, mainly including steps S801 to S803:
[0105] S801 , normalize the target algorithm blocks and target algorithm block pins in the configuration diagram to be compared and the target CLD diagram.
[0106] It should be noted that the implementation principle of step S801, normalizing the target algorithm blocks and target algorithm block pins in the compared configuration diagram and the target CLD diagram, is the same as that of step S701, and they can be referred to each other and will not be described one by one.
[0107] Among them, the target algorithm block can be an algorithm block with the same operation logic as the algorithm block pin, and the target algorithm pin can be the pin name with the same operation logic as the algorithm block; exemplarily, the target algorithm block can be a NOT gate algorithm block, and the target algorithm pin can be a NOT algorithm pin.
[0108] It can be understood that the target algorithm blocks and target algorithm block pins in the configuration diagram to be compared and the target CLD diagram can be normalized to improve the comparison coverage and reduce the manual review workload caused by misjudgment.
[0109] S802: According to the algorithm block mapping table and the point name conversion rule, the algorithm blocks and point names in the target CLD diagram are converted to obtain the final comparison CLD diagram.
[0110] It should be noted that the relevant descriptions about the algorithm block mapping table and the roll call conversion rules can be found in the above embodiments, which will not be repeated here.
[0111] In specific applications, after normalizing the target algorithm blocks and target algorithm block pins in the compared configuration diagram and the target CLD diagram, the algorithm blocks in the target CLD diagram can be converted according to the algorithm block mapping table, and the point names in the target CLD diagram can be converted according to the point name conversion rules to obtain the final compared CLD diagram.
[0112] S803 , abstracting the configuration diagram to be compared into a tree structure to obtain a configuration tree corresponding to the configuration diagram to be compared, and abstracting the final compared CLD diagram into a tree structure to obtain a CLD tree corresponding to the target CLD diagram.
[0113] In practical applications, the up-and-down relationship of the connections in the configuration diagram to be compared can be abstracted into a tree structure to obtain the configuration tree corresponding to the configuration diagram to be compared; similarly, the up-and-down relationship of the connections in the final comparison CLD diagram can be abstracted into a tree structure to obtain the CLD tree corresponding to the target CLD diagram.
[0114] Specifically, the algorithm blocks and the input-output relationship of the algorithm blocks of the configuration diagram to be compared can be determined, and a tree structure can be constructed according to the algorithm blocks and the input-output relationship of the algorithm blocks to obtain the configuration tree corresponding to the configuration diagram to be compared. Since there are three types of algorithm blocks in the configuration diagram to be compared, namely, input variable type algorithm blocks, output variable type algorithm blocks, and input-output variable type algorithm blocks. Therefore, the algorithm block of the output variable type can be used as the root node of the tree structure, and the nodes under each root node can be determined according to the input-output relationship of the algorithm block, and finally the input variable type algorithm block can be used as a leaf node.
[0115] Similarly, the algorithm blocks and the input-output relationship of the algorithm blocks of the final comparison CLD diagram can be determined, and a tree structure can be constructed based on the algorithm blocks and the input-output relationship of the algorithm blocks to obtain the configuration tree corresponding to the target CLD diagram. Since there are three types of algorithm blocks in the final comparison CLD diagram, namely, input variable type algorithm blocks, output variable type algorithm blocks, and input-output variable type algorithm blocks. Therefore, the algorithm block of the output variable type can be used as the root node of the tree structure, and the nodes under each root node can be determined based on the input-output relationship of the algorithm block, and finally the input variable type algorithm block can be used as a leaf node.
[0116] It should be noted that since the target comparison configuration diagram is obtained by converting the algorithm blocks in the configuration diagram to be compared according to the algorithm block mapping table and converting the dot names in the configuration diagram to be compared according to the dot name conversion rules, the data structure of the algorithm blocks and dot names in the target comparison configuration diagram is consistent with that of the target CLD diagram, and the comparison test results of the configuration diagram to be compared can be obtained by comparing the target comparison configuration diagram with the target CLD diagram; similarly, the final comparison CLD diagram is obtained by converting the algorithm blocks in the target CLD diagram according to the algorithm block mapping table and converting the dot names in the target CLD diagram according to the dot name conversion rules, so the data structure of the algorithm blocks and dot names in the final comparison CLD diagram is consistent with that of the configuration diagram to be compared, and the comparison test results of the configuration diagram to be compared can be obtained by comparing the final comparison CLD diagram with the configuration diagram to be compared.
[0117] In combination with the above, it can be understood that the configuration tree corresponding to the configuration diagram to be compared and the CLD tree corresponding to the target CLD diagram may exist in the following two situations:
[0118] Case 1: The configuration tree corresponding to the configuration diagram to be compared is obtained by abstracting the target comparison configuration diagram into a tree structure. The CLD tree corresponding to the target CLD diagram is obtained by abstracting the target CLD diagram into a tree structure. The target comparison configuration diagram is obtained by first normalizing the target algorithm blocks and target algorithm block pins in the configuration diagram to be compared, and then converting the algorithm blocks and dot names in the configuration diagram to be compared according to the algorithm block mapping table and dot name conversion rules.
[0119] Case 2: The CLD tree corresponding to the target CLD diagram is obtained by abstracting the final comparison CLD diagram into a tree structure. The configuration tree corresponding to the configuration diagram to be compared is obtained by abstracting the configuration diagram to be compared into a tree structure. The final comparison CLD diagram is obtained by first normalizing the target algorithm blocks and target algorithm block pins in the target CLD diagram, and then converting the algorithm blocks and dot names in the target CLD diagram according to the algorithm block mapping table and dot name conversion rules.
[0120] Combination Figure 4 The CLD diagram and Figure 5 The configuration diagram designed and implemented according to the CLD diagram is shown. The structure of the CLD diagram is the input part, the algorithm block and the output part from left to right. Among them, the input part and the output part can be called roll call. The configuration diagram is a drawing style presented on the computer configuration software. In actual application, the background data of the configuration diagram can be expressed in XML format.
[0121] Comparing the two diagrams, we can see that the basic structure of the configuration diagram is the same as that of the CLD diagram, but the expression of the algorithm block and the roll call are obviously different. Strong computing power and fast processing speed are the advantages of modern computers, and the differences in algorithm blocks and roll calls can be clarified by sorting out the conversion rules, and the consistency comparison of the configuration diagram and the CLD diagram can be achieved through computers.
[0122] For example, the conversion rules of the configuration diagram and the CLD diagram can be shown in Table 1-1:
[0123]
[0124]
[0125] Among them, %Prefix is the abbreviation of the project name, %System represents the subsystem, and the variables starting with Prop. are the primitive properties of the CLD primitive, which express the information of the primitive.
[0126] For example, taking the "DI_Link" of the CLD primitive in Table 1-1 as an example, assuming that %System is DCL and Prop.Text is SH.9009, the corresponding CLD primitive properties can be as follows: Figure 6 shown.
[0127] Exemplarily, the algorithm block mapping table between the configuration diagram and the CLD diagram may be as follows:
[0128]
[0129]
[0130] Among them, ModuleName is the name of the algorithm block in the CLD diagram, FDName is the name of the algorithm block in the configuration diagram, PortName is the pin name of the algorithm block in the CLD diagram, and Target is the pin name of the algorithm block in the configuration diagram.
[0131] It should be noted that if the CLD diagram is in PDF format, the CLD diagram can be scanned by image recognition to generate a CLD tree of interrelated variables, points, lines, algorithm blocks, etc., to compare with the data structure abstracted from the configuration diagram.
[0132] S103 . Compare the configuration tree and the CLD tree according to a recursive algorithm to obtain a comparison test result.
[0133] In practical applications, after determining the configuration tree corresponding to the configuration diagram to be compared and the CLD tree corresponding to the target CLD diagram, a recursive algorithm can be used to traverse from root to leaf to compare each node and edge in the configuration tree corresponding to the configuration diagram to be compared with each node and edge in the CLD tree corresponding to the target CLD diagram to obtain the comparison test results.
[0134] For example, taking the CLD diagram (Visio format) and the corresponding configuration diagram (XML format) of a certain project as an example, the actual comparison test flow chart is as follows: Figure 7 As shown, it mainly includes:
[0135] The CLD tree construction process corresponding to the CLD diagram can be: read the CLD diagram in Visio format, and construct a structural CLD tree according to the upper and lower relationships of the connections. Among them, constructing a structural CLD tree according to the upper and lower relationships of the connections can specifically include: first normalizing the target algorithm blocks and target algorithm block pins in the CLD diagram, and then constructing the CLD diagram into a tree structure according to the point name conversion rules and the algorithm block mapping table. That is, the tree structure data can be established according to the order of the algorithm blocks and the connection status of the algorithm block pins,
[0136] The configuration tree construction process corresponding to the configuration diagram can be: reading the configuration diagram in XML format, and constructing the configuration tree according to the upper and lower relationships of the connections. Specifically, constructing the configuration tree according to the upper and lower relationships of the connections can include: first normalizing the target algorithm block and the target algorithm block pins in the configuration diagram, and then constructing the configuration diagram into a tree structure.
[0137] The specific comparison between the CLD tree and the configuration tree is as follows: determine whether there are unread CLD roots in the CLD tree. If it is determined that there are unread CLD roots in the CLD tree, read a CLD tree root from the CLD tree to determine whether the corresponding configuration root is found in the configuration tree; if it is determined that the corresponding configuration root is found in the configuration tree, determine whether the variable name or the algorithm block type is consistent; if it is determined that the variable name or the algorithm block type is consistent, determine whether there are still unread input pins in the CLD tree; if it is determined that there are still unread input pins in the CLD tree, read the input pin of an algorithm block in the CLD tree to determine whether the corresponding algorithm block in the configuration tree has the same input pin; if so, determine whether there is a parent node in the CLD tree; if it is determined that there is a parent node in the CLD tree, visit the parent node and continue to compare in the same way.
[0138] Among them, if it is determined that the corresponding configuration root is not found in the configuration tree, then the identification is wrong (that is, the comparison result is inconsistent), and the step of determining whether there is an unread CLD root in the CLD tree is returned. If it is determined that the variable name or the algorithm block type is inconsistent, the step of identifying the error is returned. If it is determined that there is no unread input pin in the CLD tree, then the identification is correct, and the step of determining whether there is a parent node in the CLD tree is returned. If it is determined that the corresponding algorithm block in the configuration tree does not have the same input pin, then the pin is marked incorrectly, and the step of determining whether there is still an unread input pin in the CLD tree is returned until the CLD tree is traversed.
[0139] Specifically, the comparison test ends under the condition that: it is determined that there is no unread CLD root in the CLD tree, or it is determined that there is no parent node in the CLD tree.
[0140] It should be noted that the above is only a comparison test flowchart in the actual application of this application. It can be modified in specific applications based on actual conditions. As long as the implementation principle is the same as that of this application, it is within the protection scope of this application.
[0141] Based on the above principle, the comparison test method provided in this embodiment includes: determining the configuration diagram to be compared and the target CLD diagram according to the mapping relationship of the drawing naming, wherein the configuration diagram to be compared is any one of all the configuration diagrams, and the target CLD diagram is a CLD diagram that needs to be compared with the configuration diagram to be compared for consistency; normalizing the configuration diagram to be compared and the target CLD diagram to obtain a configuration tree corresponding to the configuration diagram to be compared and a CLD tree corresponding to the target CLD diagram; comparing the configuration tree and the CLD tree according to a recursive algorithm to obtain a comparison test result, and being able to use computer technology to perform automatic batch comparison tests, greatly reducing the workload of testers, improving the comparison test efficiency, and reducing human errors, that is, solving the problem that each unit in the existing nuclear power plant must completely draw all the drawings for verification, and each unit has about 10,000 pages of CLD drawings. According to the work efficiency of 270 people / day, one version of the baseline test can be completed, which not only has a large workload but also tests the patience and reading ability of the testers, and is very easy to introduce human errors.
[0142] It should be noted that the comparison test method provided in this application has a fast comparison speed. The drawings of a unit can be completed in a few hours. Combined with the manual review time, it can save 80% of the test time compared with manual testing. As the rules are continuously improved and the algorithm block mapping table is continuously enriched, the comparison test time will be further improved.
[0143] It is worth noting that the comparison test method provided in this application has good execution repeatability. As long as the drawing naming mapping relationship, algorithm block mapping table and roll call conversion rules are perfect, and the engineering design personnel configure the specifications, the comparison test can be guaranteed to be correct and the introduction of human error can be reduced. In addition, the comparison test method can be fully automatic and unattended operation, and it is easy to regress the test whether the design party or the configuration party changes. Finally, the algorithm block mapping table and roll call conversion rules can be parameterized in the form of files, which can adapt to a variety of configuration software and quickly adapt to different types of piles and different projects.
[0144] On the basis of the above, optionally, the comparison test method provided in another embodiment of the present application may further include steps S401 and S402 after comparing the configuration tree and the CLD tree according to the recursive algorithm:
[0145] S401, determining in real time whether a comparison test end condition is met.
[0146] Among them, the comparison test end conditions include: the current participating comparison node is a compared node or a leaf node.
[0147] In actual applications, when comparing the configuration tree and the CLD tree according to the recursive algorithm, the nodes that have participated in the comparison can be recorded as compared nodes, and whether the comparison test end condition is met can be determined by real-time determination of whether the current comparison node is a compared node. Specifically, if it is determined that the current comparison node is a compared node, it means that a repeated comparison has occurred, and it can be determined that the comparison test end condition is met.
[0148] In addition, it is also possible to determine whether the comparison test end condition is met by determining in real time whether the current comparison node is a leaf node. Specifically, if it is determined that the current comparison node is a leaf node, it means that the comparison of the configuration tree and the CLD tree has reached the boundary of the configuration tree and the CLD tree, and it can also be determined that the comparison test end condition is met.
[0149] If it is determined that the comparison test end condition is met, step S402 is executed:
[0150] S402: Stop the comparison test.
[0151] In practical applications, due to the existence of closed-loop feedback loops in the drawings, such as Figure 8 As shown, it is possible to determine in real time whether the comparison test end condition is met. When it is determined that the comparison test end condition is met, the comparison test is stopped to avoid wireless cyclic comparison along the loop, which causes a waste of resources.
[0152] Specifically, in the case of closed-loop feedback loops in the drawings, the method of recording the compared algorithm blocks during comparison can be adopted. When the compared algorithm blocks are encountered again, the last algorithm block on the ring is connected and no recursive comparison is performed, thus avoiding infinite loop comparison along the loop. The last algorithm block on the ring is the last algorithm block before the visited algorithm block is encountered.
[0153] In this embodiment, whether the comparison test end condition is met can be determined in real time. When it is determined that the comparison test end condition is met, the comparison test can be stopped to reduce resource waste caused by repeated comparisons.
[0154] On the basis of the above, optionally, in another embodiment of the present application, a comparison test method is provided. In S103, the configuration tree and the CLD tree are compared according to a recursive algorithm to obtain a comparison test result. Fig. 9 , may further include step S501:
[0155] S501 . Mark in the target CLD diagram according to the comparison test result of the configuration diagram to be compared.
[0156] Among them, the first part of the target CLD is first identified, the second part of the target CLD is second identified, and the third part of the target CLD is third identified; the first part is the comparison test result characterizing the configuration diagram to be compared and the target CLD Figure 1 The first part is the part that is consistent, the second part is the part where the comparison test result represents that the configuration diagram to be compared and the target CLD diagram are inconsistent, and the third part is the part where the comparison test result represents that the configuration diagram to be compared cannot match the target CLD diagram. The display colors of the first logo, the second logo and the third logo are different.
[0157] Specifically, the part of the comparison test result indicating that the configuration diagram to be compared cannot match the target CLD diagram may be a part that does not exist in the configuration diagram to be compared but exists in the target CLD diagram.
[0158] Exemplarily, according to the comparison test results of the configuration diagram to be compared, the example diagram marked in the target CLD diagram can be as follows: Fig.11 As shown. Fig.12 The manually compared and smeared CLD drawings are shown. In this application, the example diagram marked in the target CLD diagram according to the comparison test results of the configuration diagram to be compared can more intuitively reflect the differences between the two and is more convenient for relevant personnel to review.
[0159] In practical applications, the configuration tree and the CLD tree are compared according to a recursive algorithm to obtain the comparison test result of the configuration diagram to be compared, and then the comparison test result can be marked in the target CLD diagram. Fig.11, the comparison test results can be used to represent the configuration diagram to be compared and the target CLD Figure 1 The consistent parts are painted green, the parts where the comparison test results indicate that the configuration diagram to be compared and the target CLD diagram are inconsistent are painted red, and the parts where the comparison test results indicate that the configuration diagram to be compared cannot match the target CLD diagram are marked with colors; in addition, the questionable parts can also be marked with specific identification boxes for subsequent manual review.
[0160] It should be noted that in practice, the comparison test results can also be processed and stored in an Excel report for easy recording, archiving and viewing; at the same time, some intermediate data and log data generated during the comparison process can be used to analyze the pattern of error occurrence, standardize the design process, and promote the standardization of front-end input. Among them, the intermediate data and log data can be the data stored in the Excel report.
[0161] It can be understood that the present application can produce record files for comparison test results, store them in the result directory for easy viewing, and analyze the patterns of error occurrence based on the data in the result directory, which can standardize the design process and promote the standardization of front-end input.
[0162] In some embodiments, after executing step S501 and marking the target CLD diagram according to the comparison test result of the configuration diagram to be compared, the marked target CLD diagram can also be stored in a designated folder according to the marking result. Specifically, if the marking result indicates that the target CLD diagram is completely consistent with the configuration diagram to be compared, that is, the marked target CLD diagram has a first mark, then the corresponding marked target CLD diagram can be stored in a first designated folder; if the marking result indicates that the target CLD diagram is not completely consistent with the configuration diagram to be compared, that is, the marked target CLD diagram has a second mark or a third mark in addition to the first mark, then the corresponding marked target CLD diagram can be stored in a second designated folder.
[0163] In practical applications, the target CLD graphs identified are stored in separate disks according to the identification types of the target CLD graphs. According to different storage paths, the target CLD graphs identified with large consistency differences can be checked in particular, thereby further improving the efficiency of the comparison test and ensuring the accuracy of the comparison test.
[0164] On the basis of the above, optionally, in another embodiment of the present application, a comparison test method is provided. In S103, the configuration tree and the CLD tree are compared according to a recursive algorithm to obtain a comparison test result. Fig.10 , may further include step S601:
[0165] S601 . Marking the configuration diagram to be compared according to the comparison test result of the configuration diagram to be compared.
[0166] Among them, the first part of the configuration diagram to be compared is first marked, the second part of the configuration diagram to be compared is second marked, and the third part of the configuration diagram to be compared is third marked. The first part is the comparison test result characterizing the configuration diagram to be compared and the target CLD Figure 1 The first part is the part that is consistent, the second part is the part where the comparison test result represents that the configuration diagram to be compared and the target CLD diagram are inconsistent, and the third part is the part where the comparison test result represents that the configuration diagram to be compared cannot match the target CLD diagram. The display colors of the first logo, the second logo and the third logo are different.
[0167] Specifically, the part of the comparison test result indicating that the configuration diagram to be compared cannot match the target CLD diagram may be a part that does not exist in the target CLD diagram but exists in the configuration diagram to be compared.
[0168] In practical applications, the configuration tree and the CLD tree are compared according to a recursive algorithm to obtain the comparison test result of the configuration diagram to be compared, and then the comparison test result can be marked in the configuration diagram to be compared. Figure 1 The consistent parts are painted green, the parts where the comparison test results indicate that the configuration diagram to be compared and the target CLD diagram are inconsistent are painted red, and the parts where the comparison test results indicate that the configuration diagram to be compared cannot match the target CLD diagram are marked with colors; in addition, the questionable parts can also be marked with specific identification boxes for subsequent manual review.
[0169] It should be noted that in practice, the comparison test results can also be processed and stored in an Excel report for easy recording, archiving and viewing; at the same time, some intermediate data and log data generated during the comparison process can be used to analyze the pattern of error occurrence, standardize the design process, and promote the standardization of front-end input. Among them, the intermediate data and log data can be the data stored in the Excel report.
[0170] It can be understood that the present application can produce record files for comparison test results, store them in the result directory for easy viewing, and analyze the patterns of error occurrence based on the data in the result directory, which can standardize the design process and promote the standardization of front-end input.
[0171] In some embodiments, after executing step S601 and marking the configuration diagram to be compared according to the comparison test result of the configuration diagram to be compared, the marked configuration diagram to be compared can also be placed in a designated folder for storage according to the marking result. Specifically, if the marking result indicates that the target CLD diagram is completely consistent with the configuration diagram to be compared, that is, the marked configuration diagram to be compared has a first mark, then the corresponding marked target CLD diagram can be placed in a third designated folder for storage; if the marking result indicates that the target CLD diagram is not completely consistent with the configuration diagram to be compared, that is, the marked configuration diagram to be compared has a second mark or a third mark in addition to the first mark, then the corresponding marked configuration diagram to be compared can be placed in a fourth designated folder for storage.
[0172] In practical applications, the identified configuration diagrams to be compared are stored in separate disks according to the identification types of the identified configuration diagrams. According to different storage paths, the identified configuration diagrams to be compared with those with large consistency differences can be checked in particular, thereby further improving the efficiency of the comparison test and ensuring the accuracy of the comparison test.
[0173] Optionally, another embodiment of the present application further provides a comparison test device, see Fig.13 , the comparison test device may include:
[0174] The determination unit 101 is used to determine the configuration diagram to be compared and the target CLD diagram according to the mapping relationship of the drawing names, wherein the configuration diagram to be compared is any one of all the configuration diagrams, and the target CLD diagram is a CLD diagram that needs to be compared for consistency with the configuration diagram to be compared;
[0175] A normalization unit 102 is used to perform normalization processing on the configuration diagram to be compared and the target CLD diagram to obtain a configuration tree corresponding to the configuration diagram to be compared and a CLD tree corresponding to the target CLD diagram;
[0176] The comparison test unit 103 compares the configuration tree and the CLD tree according to a recursive algorithm to obtain a comparison test result.
[0177] In some embodiments, the comparison test device further comprises:
[0178] The path determination unit is used to determine the configuration file path and the CLD drawing file path.
[0179] In some embodiments, the normalization unit 102 is used to perform normalization processing on the configuration diagram to be compared and the target CLD diagram to obtain the configuration tree corresponding to the configuration diagram to be compared and the CLD tree corresponding to the target CLD diagram, specifically for:
[0180] Normalizing the target algorithm block and the target algorithm block pins in the configuration diagram to be compared and the target CLD diagram;
[0181] According to the algorithm block mapping table and the point name conversion rule, the algorithm blocks and the point names in the configuration diagram to be compared are converted to obtain a target comparison configuration diagram;
[0182] The target comparison configuration diagram is abstracted into a tree structure to obtain a configuration tree corresponding to the configuration diagram to be compared, and the target CLD diagram is abstracted into a tree structure to obtain a CLD tree corresponding to the target CLD diagram.
[0183] In some embodiments, the normalization unit 102 is used to perform normalization processing on the configuration diagram to be compared and the target CLD diagram to obtain the configuration tree corresponding to the configuration diagram to be compared and the CLD tree corresponding to the target CLD diagram, specifically for:
[0184] Normalizing the target algorithm block and the target algorithm block pins in the configuration diagram to be compared and the target CLD diagram;
[0185] According to the algorithm block mapping table and the point name conversion rule, the algorithm blocks and point names in the target CLD diagram are converted to obtain the final comparison CLD diagram;
[0186] The configuration diagram to be compared is abstracted into a tree structure to obtain a configuration tree corresponding to the configuration diagram to be compared, and the final comparison CLD diagram is abstracted into a tree structure to obtain a CLD tree corresponding to the target CLD diagram.
[0187] In some embodiments, the comparison test device further comprises:
[0188] A judgment unit, used for judging in real time whether a comparison test end condition is met, wherein the comparison test end condition includes: the current comparison node is a compared node or a leaf node;
[0189] The stopping unit is used to stop the comparison test if it is determined that the comparison test end condition is met.
[0190] In some embodiments, the comparison test device further comprises:
[0191] A first identification unit, used for identifying in the target CLD diagram according to the comparison test result of the configuration diagram to be compared;
[0192] The first part of the target CLD is first identified, the second part of the target CLD is second identified, and the third part of the target CLD is third identified. The first part is the comparison test result characterizing the configuration diagram to be compared and the target CLD. Figure 1The first mark, the second mark and the third mark have different display colors.
[0193] In some embodiments, the comparison test device further comprises:
[0194] A second identification unit, used for marking in the configuration diagram to be compared according to the comparison test result of the configuration diagram to be compared;
[0195] The first part of the configuration diagram to be compared is first identified, the second part of the configuration diagram to be compared is second identified, and the third part of the configuration diagram to be compared is third identified, wherein the first part is the comparison test result characterizing the configuration diagram to be compared and the target CLD Figure 1 The first mark, the second mark and the third mark have different display colors.
[0196] The comparison test device provided in this embodiment may include: a determination unit 101 is used to determine a configuration diagram to be compared and a target CLD diagram according to a mapping relationship between drawing names, wherein the configuration diagram to be compared is any one of all configuration diagrams, and the target CLD diagram is a CLD diagram that needs to be compared with the configuration diagram to be compared for consistency; a normalization unit 102 is used to perform normalization processing on the configuration diagram to be compared and the target CLD diagram to obtain a configuration tree corresponding to the configuration diagram to be compared and a CLD tree corresponding to the target CLD diagram; a comparison test unit 103 performs normalization processing on the configuration tree and the target CLD diagram according to a recursive algorithm; The CLD trees are compared to obtain comparison test results, and computer technology can be used to perform automatic batch comparison tests, which greatly reduces the workload of testers, improves the efficiency of comparison tests, and reduces human errors. That is, it solves the problem that each unit in the existing nuclear power plant must completely draw all the drawings for verification. The CLD drawings of each unit are about 10,000 pages, and one version of the baseline test can be completed at a work efficiency of 270 people per day. Not only is the workload large, but it also tests the patience and drawing reading ability of the testers, and is very likely to introduce human errors.
[0197] It should be noted that, for the relevant description of each unit in the comparison test device, reference can be made to the corresponding method embodiments described above, and they will not be described one by one here.
[0198] Optionally, another embodiment of the present application further provides a computer storage medium for storing a computer program, which, when executed, is specifically used to implement the comparison test method provided in any embodiment of the present application.
[0199] It should be noted that, for the relevant description of the comparison test method, please refer to the above embodiment, which will not be repeated here.
[0200] Optionally, another embodiment of the present application further provides an electronic device, such as Fig.14 As shown, the electronic device includes a memory 601 and a processor 602 .
[0201] Wherein, the memory 601 is used to store computer programs;
[0202] The processor 602 is used to execute a computer program, specifically to implement the comparison test method provided in any embodiment of the present application.
[0203] It should be noted that, for the relevant description of the comparison test method, reference can also be made to the above embodiment, which will not be repeated here.
[0204] The features recorded in the various embodiments in this specification can be replaced or combined with each other, and the same and similar parts between the various embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system or system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. The system and system embodiments described above are only schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without creative work. Professionals can also further realize that the units and algorithm steps of each example described in combination with the embodiments disclosed in this article can be implemented in electronic hardware, computer software or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to the function. Whether these functions are executed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0205] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
[0206] It should also be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
Claims
1. A comparison test method, characterized in that: include: According to the mapping relationship between the drawing names, a configuration diagram to be compared and a target CLD diagram are determined, wherein the configuration diagram to be compared is any one of all the configuration diagrams, and the target CLD diagram is a CLD diagram that needs to be compared for consistency with the configuration diagram to be compared; Normalizing the configuration diagram to be compared and the target CLD diagram to obtain a configuration tree corresponding to the configuration diagram to be compared and a CLD tree corresponding to the target CLD diagram; The configuration tree and the CLD tree are compared according to a recursive algorithm to obtain a comparison test result.
2. The comparison test method according to claim 1, characterized in that: Before determining the configuration diagram to be compared and the target CLD diagram according to the mapping relationship of the drawing naming, it also includes: Determine the configuration file path and CLD drawing file path.
3. The comparison test method according to claim 1, characterized in that: Normalizing the configuration diagram to be compared and the target CLD diagram to obtain a configuration tree corresponding to the configuration diagram to be compared and a CLD tree corresponding to the target CLD diagram, including: Normalizing the target algorithm block and the target algorithm block pins in the configuration diagram to be compared and the target CLD diagram; According to the algorithm block mapping table and the point name conversion rule, the algorithm blocks and the point names in the configuration diagram to be compared are converted to obtain a target comparison configuration diagram; The target comparison configuration diagram is abstracted into a tree structure to obtain a configuration tree corresponding to the configuration diagram to be compared, and the target CLD diagram is abstracted into a tree structure to obtain a CLD tree corresponding to the target CLD diagram.
4. The comparison test method according to claim 1, characterized in that: Normalizing the configuration diagram to be compared and the target CLD diagram to obtain a configuration tree corresponding to the configuration diagram to be compared and a CLD tree corresponding to the target CLD diagram, including: Normalizing the target algorithm block and the target algorithm block pins in the configuration diagram to be compared and the target CLD diagram; According to the algorithm block mapping table and the point name conversion rule, the algorithm blocks and point names in the target CLD diagram are converted to obtain the final comparison CLD diagram; The configuration diagram to be compared is abstracted into a tree structure to obtain a configuration tree corresponding to the configuration diagram to be compared, and the final comparison CLD diagram is abstracted into a tree structure to obtain a CLD tree corresponding to the target CLD diagram.
5. The comparison test method according to claim 1, characterized in that: After comparing the configuration tree and the CLD tree according to the recursive algorithm, the method further includes: Determine in real time whether the comparison test end condition is met, wherein the comparison test end condition includes: the current comparison node is a compared node or a leaf node; If it is determined that the comparison test end condition is met, the comparison test is stopped.
6. The comparison test method according to claim 1, characterized in that: After comparing the configuration tree and the CLD tree according to the recursive algorithm to obtain a comparison test result, the method further includes: Marking in the target CLD diagram according to the comparison test result of the configuration diagram to be compared; Among them, the first part of the target CLD is first marked, the second part of the target CLD diagram is second marked, and the third part of the target CLD diagram is third marked, the first part is the part where the comparison test result represents that the configuration diagram to be compared and the target CLD diagram are consistent, the second part is the part where the comparison test result represents that the configuration diagram to be compared and the target CLD diagram are inconsistent, and the third part is the part where the comparison test result represents that the configuration diagram to be compared cannot match the target CLD diagram, and the display colors of the first mark, the second mark and the third mark are different.
7. The comparison test method according to claim 1, characterized in that: After comparing the configuration tree and the CLD tree according to the recursive algorithm to obtain a comparison test result, the method further includes: Marking in the configuration diagram to be compared according to the comparison test result of the configuration diagram to be compared; Among them, the first part of the configuration diagram to be compared is subjected to the first identification, the second part of the configuration diagram to be compared is subjected to the second identification, and the third part of the configuration diagram to be compared is subjected to the third identification, the first part is the part of the configuration diagram to be compared and the target CLD diagram represented by the comparison test result, the second part is the part of the configuration diagram to be compared and the target CLD diagram represented by the comparison test result, and the third part is the part of the configuration diagram to be compared and the target CLD diagram represented by the comparison test result. The display colors of the first identification, the second identification and the third identification are different.
8. A comparison test device, characterized in that: include: A determination unit, used to determine a configuration diagram to be compared and a target CLD diagram according to a mapping relationship between drawing names, wherein the configuration diagram to be compared is any one of all configuration diagrams, and the target CLD diagram is a CLD diagram that needs to be compared for consistency with the configuration diagram to be compared; A normalization unit is used to perform normalization processing on the configuration diagram to be compared and the target CLD diagram to obtain a configuration tree corresponding to the configuration diagram to be compared and a CLD tree corresponding to the target CLD diagram; The comparison test unit compares the configuration tree and the CLD tree according to a recursive algorithm to obtain a comparison test result.
9. An electronic device, characterized in that: include: Memory and processor; Wherein, the memory is used to store computer programs; The processor is used to execute the computer program, specifically to implement the comparison test method as described in any one of claims 1-7.
10. A computer storage medium, characterized in that: Used to store a computer program, which, when executed, is specifically used to implement the comparison test method as described in any one of claims 1 to 7.
Citation Information
Cited By
Nuclear security level DCS system engineering application software logic comparison method and device
CN120973650A
Method and apparatus for comparing engineering application software logic of nuclear safety class dcs systems
CN120973650B
