Nuclear power DCS picture automatic test method and device based on communication protocol

By using a communication protocol-based automated testing method for nuclear power DCS screens, dynamic object status data is parsed using XML files and preset communication protocols. This solves the problem of cumbersome manual verification in traditional testing and achieves efficient and reliable automated testing.

CN122019362APending Publication Date: 2026-05-12CHINA NUCLEAR CONTROL SYST ENG
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHINA NUCLEAR CONTROL SYST ENG
Filing Date
2025-12-23
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

Traditional nuclear power DCS two-layer screen testing relies on image processing algorithms, which suffer from insufficient recognition accuracy, leading to cumbersome manual verification work and affecting test quality and efficiency.

Method used

An automated testing method for nuclear power DCS screens based on communication protocols is adopted. By loading test cases and XML files, the method uses a preset communication protocol to parse the status data of dynamic objects and generate test reports, replacing manual and image recognition testing.

Benefits of technology

Automated testing has been achieved, which has improved the reliability, comprehensiveness and precision of testing, reduced tedious manual work, and enhanced the flexibility and maintainability of testing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122019362A_ABST
    Figure CN122019362A_ABST
Patent Text Reader

Abstract

The invention provides a nuclear power DCS picture automatic testing method and device based on a communication protocol, and relates to the field of nuclear power DCS testing. The method comprises the following steps: loading a test case; various template XML files used for nuclear power DCS picture automatic testing are loaded; starting a nuclear power DCS picture test through the first specified instruction; in the test state of the nuclear power DCS picture, executing the test case, and calling a pre-established picture test interface to obtain state data of the dynamic object; wherein the state data of the dynamic object of the picture test interface is packaged through a preset communication protocol; and analyzing the obtained state data of the dynamic object according to a preset communication protocol, comparing an analysis result with a required state of the test case, and generating a test report. It can be seen that automatic testing is achieved on the basis of the two-layer picture testing interface, manual testing or testing based on image recognition is replaced, and the problems that manual operation is complex and the image recognition rate is low are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of nuclear power DCS testing, and in particular to an automatic testing method and apparatus for nuclear power DCS screens based on a communication protocol. Background Technology

[0002] The Distributed Control System (DCS) of a nuclear power plant is considered its "brain" and "nerve center," playing a crucial role in nuclear safety as the core of operation and control. Therefore, nuclear power DCS industry testing is characterized by high safety and reliability requirements, comprehensive test coverage, and traceable quality records. The testing quality of the second-layer interface of the nuclear power DCS directly affects its stability and is a vital component of nuclear power safety. Here, the second layer of the nuclear power DCS can also be called the monitoring layer or human-machine interface layer, responsible for graphical display and operational interaction, serving as the interface between the operator and the DCS. The nuclear power DCS also includes a zero layer and a first layer. The zero layer, also known as the field equipment layer, involves physical equipment or basic services and directly interacts with process variables; the first layer, also known as the control layer, is responsible for handling real-time control logic, executing commands, and monitoring process status.

[0003] Traditional nuclear power plant DCS two-layer screen testing typically employs image processing methods. The quality and accuracy of these methods heavily rely on the design of the image processing algorithms, and suffer from issues such as excessive manual selection, interference between testing and operational states, and the need for manual verification of test conclusions. When processing special fonts or similar shapes such as "0" or "o," insufficient recognition accuracy often occurs, requiring significant manual secondary verification, severely impacting test quality and efficiency. Therefore, it is imperative to solve this technical problem. Summary of the Invention

[0004] In view of the above problems, this application is made to provide an automatic testing method and apparatus for nuclear power plant DCS screens based on a communication protocol, which overcomes or at least partially solves the above problems. The technical solution is as follows: Firstly, an automatic testing method for nuclear power plant DCS screens based on a communication protocol is provided, the method comprising: Load test cases; Load various template XML files used for automatic testing of nuclear power DCS screens. Among them, various template XML files include the identifiers of dynamic objects in the second layer of nuclear power DCS. The dynamic objects in the second layer of nuclear power DCS are displayed through the nuclear power DCS screen. The nuclear power plant DCS screen test is initiated by the first specified command; In the test state of the nuclear power DCS screen, test cases are executed, and a pre-established screen test interface is called to obtain the status data of dynamic objects; wherein, the status data of the dynamic objects in the screen test interface is packaged through a preset communication protocol. The state data of the dynamic object is parsed and obtained according to the preset communication protocol. The parsing results are compared with the required state of the test case to generate a test report.

[0005] In one possible implementation, the state data of a dynamic object includes one or more of the following: color, coordinates, size, font size, text content, and visibility information.

[0006] In one possible implementation, various template XML files include icon template XML files, and the pre-established screen test interface includes a icon second-level interface; In the test state of the nuclear power plant DCS screen, test cases are executed, and a pre-established screen test interface is called to obtain the status data of dynamic objects, including: In the test state of the nuclear power DCS screen, test cases are executed, the icon template XML file is parsed, the icon dynamic object is extracted, and the calling parameters of the icon dynamic object are generated. Call the second-level interface of the icon based on the call parameters of the icon dynamic object to obtain the state data of the icon dynamic object.

[0007] In one possible implementation, under the test state of the nuclear power plant DCS screen, test cases are executed, the icon template XML file is parsed, the icon dynamic object is extracted, and the calling parameters of the icon dynamic object are generated, including: In the test state of the nuclear power DCS screen, test cases are executed. The nuclear power DCS operator station simulates sending control commands from the second layer to the first layer, parses the symbol template XML file, extracts the symbol dynamic object, and generates the calling parameters of the symbol dynamic object.

[0008] In one possible implementation, various template XML files include an object operation menu OOM template XML file, and the pre-established screen test interface includes an OOM second-level interface; In the test state of the nuclear power plant DCS screen, test cases are executed, and a pre-established screen test interface is called to obtain the status data of dynamic objects, including: In the test state of the nuclear power DCS screen, test cases are executed, OOM template XML files are parsed, OOM dynamic objects are extracted, and call parameters of OOM dynamic objects are generated. The OOM dynamic object's call parameters are used to call the OOM second-layer interface to obtain the OOM dynamic object's state data.

[0009] In one possible implementation, under the test state of the nuclear power plant DCS screen, test cases are executed, the OOM template XML file is parsed, the OOM dynamic object is extracted, and the calling parameters of the OOM dynamic object are generated, including: In the test state of the nuclear power plant DCS screen, test cases are executed, the nuclear power plant DCS operator station is called, OOM is simulated, the OOM template XML file is parsed, the OOM dynamic object is extracted, and the calling parameters of the OOM dynamic object are generated.

[0010] In one possible implementation, various template XML files include object data screen ODD template XML files, and the pre-established screen test interface includes ODD second-level interface; In the test state of the nuclear power plant DCS screen, test cases are executed, and a pre-established screen test interface is called to obtain the status data of dynamic objects, including: In the test state of the nuclear power DCS screen, test cases are executed, ODD template XML files are parsed, ODD dynamic objects are extracted, and calling parameters of ODD dynamic objects are generated. The ODD dynamic object's second-level interface is invoked based on the call parameters of the ODD dynamic object to obtain the state data of the ODD dynamic object.

[0011] In one possible implementation, under the test state of the nuclear power plant DCS screen, test cases are executed, the ODD template XML file is parsed, the ODD dynamic object is extracted, and the calling parameters of the ODD dynamic object are generated, including: In the test state of the nuclear power DCS screen, test cases are executed, the nuclear power DCS operator station is invoked, ODD is simulated, the ODD template XML file is parsed, the ODD dynamic object is extracted, and the calling parameters of the ODD dynamic object are generated.

[0012] In one possible implementation, after generating the test report, the method further includes: The nuclear power DCS screen test is shut down by the second specified command, and the screen test interface is also shut down.

[0013] Secondly, an automatic testing device for nuclear power plant DCS screens based on a communication protocol is provided, the device comprising: The loading unit is used to load test cases; The loading unit is used to load various template XML files used for automatic testing of nuclear power DCS screens. Among them, the various template XML files include the identifiers of dynamic objects in the second layer of nuclear power DCS. The dynamic objects in the second layer of nuclear power DCS are displayed through the nuclear power DCS screen. An automated testing unit is used to initiate nuclear power DCS screen testing via a first specified instruction; in the test state of the nuclear power DCS screen, it executes test cases and calls a pre-established screen test interface to obtain the status data of dynamic objects; wherein, the status data of the dynamic objects in the screen test interface is packaged through a preset communication protocol; the obtained status data of the dynamic objects is parsed according to the preset communication protocol, the parsing result is compared with the required status of the test cases, and a test report is generated.

[0014] Using the above technical solution, the embodiments of this application provide an automatic testing method and apparatus for nuclear power DCS screens based on communication protocols. The method loads test cases; loads various template XML files used for automatic testing of nuclear power DCS screens, wherein each template XML file includes the identifier of a dynamic object in the second layer of the nuclear power DCS, and the dynamic object in the second layer of the nuclear power DCS is displayed on the nuclear power DCS screen; initiates nuclear power DCS screen testing through a first specified instruction; in the test state of the nuclear power DCS screen, executes test cases, and calls a pre-established screen testing interface to obtain the status data of the dynamic objects; wherein the status data of the dynamic objects in the screen testing interface is packaged through a preset communication protocol; the obtained status data of the dynamic objects is parsed according to the preset communication protocol, and the parsing result is compared with the required status of the test cases to generate a test report. It can be seen that the embodiments of this application achieve automated testing based on a second-layer screen testing interface, replacing manual or image recognition-based testing, and solving the problems of cumbersome manual testing and low image recognition rates. Attached Figure Description

[0015] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the description of the embodiments of this application will be briefly introduced below.

[0016] Figure 1 A flowchart of an automatic testing method for nuclear power plant DCS screens based on a communication protocol, provided in an embodiment of this application, is shown. Figure 2 A flowchart of an automatic testing method for nuclear power plant DCS screens based on a communication protocol, according to another embodiment of this application, is shown. Figure 3 A two-layer operation flowchart provided in an embodiment of this application is shown; Figure 4 A structural diagram of an automatic testing device for nuclear power DCS screens based on a communication protocol, provided in an embodiment of this application, is shown. Detailed Implementation

[0017] Exemplary embodiments of the present application will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present application are shown in the drawings, it should be understood that the present application may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this application will be thorough and complete, and will fully convey the scope of the present application to those skilled in the art.

[0018] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such use can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the term "comprising" and its variations should be interpreted as open-ended terms meaning "including but not limited to."

[0019] To address the aforementioned technical problems, embodiments of this application provide an automatic testing method for nuclear power plant DCS screens based on a communication protocol, such as... Figure 1 As shown, the automatic testing method for nuclear power DCS screens based on communication protocols may include the following steps S101 to S105: Step S101: Load the test cases.

[0020] Step S102: Load various template XML files used for automatic testing of nuclear power DCS screen. Among them, various template XML files include the identifiers of dynamic objects in the second layer of nuclear power DCS. The dynamic objects in the second layer of nuclear power DCS are displayed through the nuclear power DCS screen. Here, XML stands for extensible markup language, which is a markup language used for storing and transmitting data.

[0021] Step S103: Start the nuclear power DCS screen test by using the first specified command.

[0022] Step S104: In the test state of the nuclear power DCS screen, execute test cases and call the pre-established screen test interface to obtain the status data of dynamic objects; wherein, the status data of the dynamic objects in the screen test interface is packaged through a preset communication protocol.

[0023] Step S105: Parse the obtained dynamic object status data according to the preset communication protocol, compare the parsing result with the required status of the test case, and generate a test report.

[0024] This embodiment implements automated testing based on a two-layer screen testing interface, replacing manual or image recognition-based testing, thus solving the problems of tedious manual testing and low image recognition rates. Furthermore, this embodiment, based on XML templates and standardized communication interfaces, ensures a loosely coupled relationship between the testing system and DCS screen elements. When new dynamic objects are added to the DCS screen or existing objects are modified, typically only the XML template file needs to be updated, without rewriting numerous test scripts or retraining the image recognition model. This design significantly improves the flexibility and maintainability of the testing framework, enabling rapid adaptation to system changes.

[0025] This application provides a possible implementation method where the state data of dynamic objects includes one or more of the following: color, coordinates, size, font size, text content, and visibility information. In this way, by performing multi-dimensional and quantifiable precise detection of the state of screen elements, the reliability, comprehensiveness, and refinement of automated testing are fundamentally improved.

[0026] This application embodiment provides a possible implementation method. Various template XML files include icon template XML files. The pre-established screen test interface includes a two-layer icon interface, namely, an interface for reading the status information of basic graphics such as line segments, polylines, rectangles, polygons, and text that constitute the icons. In step S104, under the test state of the nuclear power DCS screen, test cases are executed, and the pre-established screen test interface is called to obtain the status data of dynamic objects. Specifically, this may include the following steps A1 and A2: Step A1: In the test state of the nuclear power DCS screen, execute the test cases, parse the icon template XML file, extract the icon dynamic object, and generate the calling parameters of the icon dynamic object; Step A2: Call the second-level interface of the icon based on the call parameters of the icon dynamic object to obtain the state data of the icon dynamic object.

[0027] This embodiment can separate test data from logic, externalize the definition (identifier, attribute) of screen elements into XML template, so that the test framework does not depend on the specific screen design, improving flexibility and maintainability; and achieve precise data-driven testing, directly and accurately obtaining the underlying state data of the symbols (such as color, text, coordinates, etc.) through programmatic interfaces, making the test results more reliable and covering non-visual attributes.

[0028] This application embodiment provides a possible implementation method. In step A1, under the test state of the nuclear power DCS screen, test cases are executed, the icon template XML file is parsed, the icon dynamic object is extracted, and the calling parameters of the icon dynamic object are generated. Specifically, step A1-1 can be adopted: Step A1-1: In the test state of the nuclear power DCS screen, execute the test case, simulate the second layer sending control commands to the first layer through the nuclear power DCS operator station, parse the symbol template XML file, extract the symbol dynamic object, and generate the calling parameters of the symbol dynamic object.

[0029] This embodiment implements closed-loop testing, simulating the complete logic of "operation-issuance-change of field equipment status-screen update" to verify end-to-end system behavior; and, by directly acquiring data through communication protocols, it accurately verifies attributes such as color, text, and coordinates, avoiding human error.

[0030] This application provides a possible implementation method, in which various template XML files include OOM (Object Operation Menu) template XML files, and the pre-established screen test interface includes an OOM second-layer interface, namely, an interface for reading the status information of text, icons, buttons, etc. constituting the OOM, and an interface for operating operable objects such as buttons; in step S104, under the test state of the nuclear power DCS screen, test cases are executed, and the pre-established screen test interface is called to obtain the status data of dynamic objects, which may specifically include the following steps B1 and B2: Step B1: In the test state of the nuclear power DCS screen, execute the test cases, parse the OOM template XML file, extract the OOM dynamic object, and generate the calling parameters of the OOM dynamic object; Step B2: Call the OOM second-layer interface based on the call parameters of the OOM dynamic object to obtain the state data of the OOM dynamic object.

[0031] This embodiment, through the testing technique of parsing OOM template XML files and calling standardized two-layer interfaces, is an important automation practice in the field of nuclear power DCS engineering. It solves key problems such as accurate positioning, efficient verification and continuous maintenance in dynamic object testing through interface abstraction, data-driven approach and automated execution. The ultimate goal is to ensure the high reliability and safety of the nuclear power DCS human-machine interface.

[0032] This application provides a possible implementation method. In step B1, under the test state of the nuclear power DCS screen, test cases are executed, the OOM template XML file is parsed, the OOM dynamic object is extracted, and the calling parameters of the OOM dynamic object are generated. Specifically, step B1-1 can be adopted: Step B1-1: In the test state of the nuclear power DCS screen, execute the test case, call the nuclear power DCS operator station, simulate the execution of OOM, parse the OOM template XML file, extract the OOM dynamic object, and generate the calling parameters of the OOM dynamic object.

[0033] This embodiment introduces the call to the nuclear power DCS operator station during testing to simulate the execution of OOM (Out of Memory) errors. This technical solution combines the automated advantages of OOM template parsing with the testing depth of the real operating environment. It achieves a leap from static parsing to dynamic verification. Its core value lies in discovering defects at the integration and interaction levels earlier, more realistically, and more efficiently, providing an important guarantee for the high reliability of the nuclear power DCS human-machine interface.

[0034] This application provides a possible implementation method, in which various template XML files include ODD (Object Data Display) template XML files, and a pre-established screen test interface includes an ODD second-layer interface, that is, an interface for reading the status information of the text, etc., constituting the ODD; in step S104, under the test state of the nuclear power DCS screen, test cases are executed, and the pre-established screen test interface is called to obtain the status data of dynamic objects, which may specifically include the following steps C1 and C2: Step C1: In the test state of the nuclear power DCS screen, execute the test cases, parse the ODD template XML file, extract the ODD dynamic object, and generate the calling parameters of the ODD dynamic object; Step C2: Based on the call parameters of the ODD dynamic object, call the ODD second-layer interface to obtain the state data of the ODD dynamic object.

[0035] This embodiment standardizes screen design information (such as the location, type, and data source of dynamic objects) in an XML file, enabling the test program to automatically parse and identify it; and, through a low-level interface designed specifically for testing, it directly obtains the real-time internal state data of dynamic objects, rather than relying on indirect methods such as image recognition.

[0036] This application embodiment provides a possible implementation method. In step C1, under the test state of the nuclear power DCS screen, test cases are executed, the ODD template XML file is parsed, the ODD dynamic object is extracted, and the calling parameters of the ODD dynamic object are generated. Specifically, step C1-1 can be adopted: Step C1-1: In the test state of the nuclear power DCS screen, execute the test case, call the nuclear power DCS operator station, simulate the execution of ODD, parse the ODD template XML file, extract the ODD dynamic object, and generate the calling parameters of the ODD dynamic object.

[0037] This embodiment improves the realism and coverage of the test by simulating the real environment and parsing standard templates, while also automating and standardizing the testing process. This makes the visual testing of high-safety and high-complexity systems such as nuclear power plant DCS more efficient, reliable and safe.

[0038] This application embodiment provides a possible implementation method. After generating the test report in step S105, it may further include the following step D1: Step D1: The nuclear power DCS screen test is shut down by the second specified instruction, and the screen test interface is closed.

[0039] This embodiment formally switches the nuclear power DCS from the test state back to the normal operation state, ensuring that all interfaces and functions return to normal mode and preventing residual test configurations from having a potential impact on subsequent operations.

[0040] The above introduces Figure 1 The embodiments shown have various implementation methods for each stage. The automatic testing method for nuclear power DCS screen based on communication protocol of this application will be further explained below through specific embodiments.

[0041] Figure 2 A flowchart illustrating an automated testing method for nuclear power plant DCS screens based on a communication protocol, according to another embodiment of this application, is shown. See also... Figure 2 The process includes loading test cases; loading XML files (various templates used in the test); parsing task steps; executing them sequentially according to task requirements: level 0 operations, level 1 operations, level 2 operations, and calculating service operations; then calculating the task results; determining whether to continue the task; if yes, returning to the parsed task steps; otherwise, ending the test and generating a test report.

[0042] Figure 3 A two-layer operation flowchart provided in an embodiment of this application is shown. See also... Figure 3 The process includes: starting the second-level operation; determining the operation type; if it is a symbol operation, parsing the symbol template XML file, extracting the symbol's key objects to generate call parameters, calling the symbol's second-level interface to obtain the result, and restoring the result state based on the symbol's key objects; if it is an OOM operation, parsing the OOM template XML file, extracting the OOM's key objects to generate call parameters, calling the OOM's second-level interface to obtain the result, and restoring the result state based on the OOM's key objects; if it is an ODD operation, parsing the ODD template XML file, extracting the ODD's key objects to generate call parameters, calling the ODD's second-level interface to obtain the result, and restoring the result state based on the ODD's key objects; and returning the result after the second-level operation ends.

[0043] (a) Interfaces required for the second-level process screen function.

[0044] The second-level interfaces used include icons, OOM, and access interfaces for internal objects of ODD.

[0045] The icon interface is an interface for reading the status information of basic graphics such as line segments, polylines, rectangles, polygons, and text that make up icons.

[0046] The OOM interface is an interface for reading the state information of text, icons, buttons, etc. that constitute the OOM, as well as an interface for operating on operable objects such as buttons.

[0047] The ODD interface is an interface for reading the state information of the text that constitutes the ODD.

[0048] (ii) Automated testing process based on Layer 2 interface.

[0049] Automated testing based on Layer 2 interfaces is used to replace manual or image recognition-based testing, solving the problems of tedious manual testing and low image recognition accuracy. It is categorized according to the type of object being tested and the operation method: (1) Obtain the status of the symbol. Based on the symbol type specified in the test case, parse the basic components of the symbol and generate the parameters used to call the interface for its dynamic primitive part. For example, obtain the text of the status indicator part in the symbol; the polygon fill status representing the device in the symbol, etc.

[0050] (2) Manipulating OOM objects. Using the OOM type specified in the test case, parse the OOM template, obtain the operation object ID by the operation object name, and then generate the parameters used to call the interface. Through calling the interface, manipulate instance objects such as buttons. For example, obtain the command button in the OOM and perform a click operation.

[0051] (3) Obtain ODD status. Parse the ODD template using the ODD type specified in the test case, and generate the parameters used to call the interface for its dynamic text portion. For example, obtain the content of the status indicator label text in the ODD, as well as the color of the label text.

[0052] This embodiment can achieve the following technical effects: 1) Efficiency improvement: Batch reading and writing of multiple variables and centralized judgment in the same time slice significantly reduce the process of manual secondary confirmation.

[0053] 2) Accuracy and consistency: Integrated comparison of interface attributes and database values, with rollback to ensure write consistency and reduce missed detections and false judgments.

[0054] 3) Zero manual mapping maintenance: The engineering configuration name is resolved online to the database signal path, avoiding the need to maintain multiple sets of manual reference tables, improving test quality and reducing human error.

[0055] 4) No disruption to the engineering workstation: The window retention mechanism ensures that the engineering workstation can be used and reviewed continuously during the test, and the status is not lost after pause / stop.

[0056] It should be noted that the sequence numbers of the steps in the above embodiments do not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application. In practical applications, all the above possible implementation methods can be arbitrarily combined in a combined manner to form possible embodiments of this application, which will not be described in detail here.

[0057] Based on the automatic testing method for nuclear power DCS screens based on communication protocols provided in the above embodiments, and based on the same inventive concept, this application also provides an automatic testing device for nuclear power DCS screens based on communication protocols.

[0058] Figure 4 This is a structural diagram of an automatic testing device for nuclear power plant DCS screens based on a communication protocol, provided in an embodiment of this application. Figure 4 As shown, the nuclear power DCS screen automatic testing device based on the communication protocol may specifically include a loading unit 410, a loading unit 420, and an automatic testing unit 430.

[0059] Loading unit 410 is used to load test cases; The loading unit 420 is used to load various template XML files used for automatic testing of nuclear power DCS screens. Among them, the various template XML files include the identifiers of dynamic objects in the second layer of nuclear power DCS. The dynamic objects in the second layer of nuclear power DCS are displayed through the nuclear power DCS screen. The automated testing unit 430 is used to initiate nuclear power DCS screen testing via a first specified instruction; in the test state of the nuclear power DCS screen, it executes test cases and calls a pre-established screen test interface to obtain the status data of dynamic objects; wherein, the status data of the dynamic objects in the screen test interface is packaged through a preset communication protocol; the obtained status data of the dynamic objects is parsed according to the preset communication protocol, the parsing result is compared with the required status of the test cases, and a test report is generated.

[0060] This application provides a possible implementation method in which the state data of the dynamic object includes one or more of the following: color, coordinates, size, font size, text content, and visibility information.

[0061] This application embodiment provides a possible implementation, in which various template XML files include icon template XML files, and the pre-established screen test interface includes an icon layer 2 interface; the automated test unit 430 is further used for: In the test state of the nuclear power DCS screen, test cases are executed, the icon template XML file is parsed, the icon dynamic object is extracted, and the calling parameters of the icon dynamic object are generated. Call the second-level interface of the icon based on the call parameters of the icon dynamic object to obtain the state data of the icon dynamic object.

[0062] This application embodiment provides a possible implementation, wherein the automated testing unit 430 is further configured to: In the test state of the nuclear power DCS screen, test cases are executed. The nuclear power DCS operator station simulates sending control commands from the second layer to the first layer, parses the symbol template XML file, extracts the symbol dynamic object, and generates the calling parameters of the symbol dynamic object.

[0063] This application embodiment provides a possible implementation, in which various template XML files include an object operation menu OOM template XML file, and a pre-established screen test interface includes an OOM layer 2 interface; the automated test unit 430 is further used for: In the test state of the nuclear power DCS screen, test cases are executed, OOM template XML files are parsed, OOM dynamic objects are extracted, and call parameters of OOM dynamic objects are generated. The OOM dynamic object's call parameters are used to call the OOM second-layer interface to obtain the OOM dynamic object's state data.

[0064] This application embodiment provides a possible implementation, wherein the automated testing unit 430 is further configured to: In the test state of the nuclear power plant DCS screen, test cases are executed, the nuclear power plant DCS operator station is called, OOM is simulated, the OOM template XML file is parsed, the OOM dynamic object is extracted, and the calling parameters of the OOM dynamic object are generated.

[0065] This application embodiment provides a possible implementation, in which various template XML files include Object Data Rendering (ODD) template XML files, and a pre-established screen testing interface includes an ODD layer 2 interface; the automated testing unit 430 is further used for: In the test state of the nuclear power DCS screen, test cases are executed, ODD template XML files are parsed, ODD dynamic objects are extracted, and calling parameters of ODD dynamic objects are generated. The ODD dynamic object's second-level interface is invoked based on the call parameters of the ODD dynamic object to obtain the state data of the ODD dynamic object.

[0066] This application embodiment provides a possible implementation, wherein the automated testing unit 430 is further configured to: In the test state of the nuclear power DCS screen, test cases are executed, the nuclear power DCS operator station is invoked, ODD is simulated, the ODD template XML file is parsed, the ODD dynamic object is extracted, and the calling parameters of the ODD dynamic object are generated.

[0067] This application embodiment provides a possible implementation, wherein the automated testing unit 430 is further configured to: After generating the test report, the nuclear power DCS screen test is shut down via the second specified command, and the screen test interface is closed.

[0068] Those skilled in the art will clearly understand that the specific working process of the systems, devices, and modules described above can be referred to the corresponding process in the foregoing method embodiments. For the sake of brevity, it will not be repeated here.

[0069] Those skilled in the art will understand that the technical solution of this application, or all or part of it, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several program instructions to cause an electronic device (e.g., a personal computer, server, or network device) to execute all or part of the steps of the methods described in the embodiments of this application when running the program instructions. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, portable hard drive, read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.

[0070] Alternatively, all or part of the steps of the foregoing method embodiments can be implemented by hardware (such as electronic devices like personal computers, servers, or network devices) associated with program instructions. The program instructions can be stored in a computer-readable storage medium. When the program instructions are executed by the processor of the electronic device, the electronic device executes all or part of the steps of the methods described in the embodiments of this application.

[0071] The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit it. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that within the spirit and principles of this application, modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein; and these modifications or substitutions do not cause the corresponding technical solutions to leave the protection scope of this application.

Claims

1. An automatic testing method for nuclear power plant DCS screens based on a communication protocol, characterized in that, The method includes: Load test cases; Load various template XML files used for automatic testing of nuclear power DCS screens. Among them, various template XML files include the identifiers of dynamic objects in the second layer of nuclear power DCS. The dynamic objects in the second layer of nuclear power DCS are displayed through the nuclear power DCS screen. The nuclear power plant DCS screen test is initiated by the first specified command; In the test state of the nuclear power DCS screen, test cases are executed, and a pre-established screen test interface is called to obtain the status data of dynamic objects; wherein, the status data of the dynamic objects in the screen test interface is packaged through a preset communication protocol. The state data of the dynamic object is parsed and obtained according to the preset communication protocol. The parsing results are compared with the required state of the test case to generate a test report.

2. The method according to claim 1, characterized in that, The state data of dynamic objects includes one or more of the following: color, coordinates, size, font size, text content, and visibility information.

3. The method according to claim 1, characterized in that, Various template XML files include icon template XML files, and the pre-established screen test interface includes icon second-level interface; In the test state of the nuclear power plant DCS screen, test cases are executed, and a pre-established screen test interface is called to obtain the status data of dynamic objects, including: In the test state of the nuclear power DCS screen, test cases are executed, the icon template XML file is parsed, the icon dynamic object is extracted, and the calling parameters of the icon dynamic object are generated. Call the second-level interface of the icon based on the call parameters of the icon dynamic object to obtain the state data of the icon dynamic object.

4. The method according to claim 3, characterized in that, In the test state of the nuclear power plant DCS screen, test cases are executed, the icon template XML file is parsed, the icon dynamic object is extracted, and the calling parameters of the icon dynamic object are generated, including: In the test state of the nuclear power DCS screen, test cases are executed. The nuclear power DCS operator station simulates sending control commands from the second layer to the first layer, parses the symbol template XML file, extracts the symbol dynamic object, and generates the calling parameters of the symbol dynamic object.

5. The method according to claim 1, characterized in that, Various template XML files include object operation menu OOM template XML files, and pre-established screen test interfaces include OOM layer 2 interfaces; In the test state of the nuclear power plant DCS screen, test cases are executed, and a pre-established screen test interface is called to obtain the status data of dynamic objects, including: In the test state of the nuclear power DCS screen, test cases are executed, OOM template XML files are parsed, OOM dynamic objects are extracted, and call parameters of OOM dynamic objects are generated. The OOM dynamic object's call parameters are used to call the OOM second-layer interface to obtain the OOM dynamic object's state data.

6. The method according to claim 5, characterized in that, In the test state of the nuclear power plant DCS screen, test cases are executed, the OOM template XML file is parsed, the OOM dynamic object is extracted, and the calling parameters of the OOM dynamic object are generated, including: In the test state of the nuclear power plant DCS screen, test cases are executed, the nuclear power plant DCS operator station is called, OOM is simulated, the OOM template XML file is parsed, the OOM dynamic object is extracted, and the calling parameters of the OOM dynamic object are generated.

7. The method according to claim 1, characterized in that, Various template XML files include Object Data Page (ODD) template XML files, and pre-established screen test interfaces include ODD layer 2 interfaces; In the test state of the nuclear power plant DCS screen, test cases are executed, and a pre-established screen test interface is called to obtain the status data of dynamic objects, including: In the test state of the nuclear power DCS screen, test cases are executed, ODD template XML files are parsed, ODD dynamic objects are extracted, and calling parameters of ODD dynamic objects are generated. The ODD dynamic object's second-level interface is invoked based on the call parameters of the ODD dynamic object to obtain the state data of the ODD dynamic object.

8. The method according to claim 7, characterized in that, In the test state of the nuclear power plant DCS screen, test cases are executed, the ODD template XML file is parsed, the ODD dynamic object is extracted, and the calling parameters of the ODD dynamic object are generated, including: In the test state of the nuclear power DCS screen, test cases are executed, the nuclear power DCS operator station is invoked, ODD is simulated, the ODD template XML file is parsed, the ODD dynamic object is extracted, and the calling parameters of the ODD dynamic object are generated.

9. The method according to claim 1, characterized in that, After generating the test report, the method further includes: The nuclear power DCS screen test is shut down by the second specified command, and the screen test interface is also shut down.

10. An automatic testing device for nuclear power plant DCS screens based on a communication protocol, characterized in that, The device includes: The loading unit is used to load test cases; The loading unit is used to load various template XML files used for automatic testing of nuclear power DCS screens. Among them, the various template XML files include the identifiers of dynamic objects in the second layer of nuclear power DCS. The dynamic objects in the second layer of nuclear power DCS are displayed through the nuclear power DCS screen. An automated testing unit is used to initiate nuclear power DCS screen testing via a first specified instruction; in the test state of the nuclear power DCS screen, it executes test cases and calls a pre-established screen test interface to obtain the status data of dynamic objects; wherein, the status data of the dynamic objects in the screen test interface is packaged through a preset communication protocol; the obtained status data of the dynamic objects is parsed according to the preset communication protocol, the parsing result is compared with the required status of the test cases, and a test report is generated.