CN-122019362-A - Nuclear power DCS picture automatic test method and device based on communication protocol
Abstract
The application provides a nuclear power DCS picture automatic test method and device based on a communication protocol, and relates to the field of nuclear power DCS test. The method comprises the steps of loading a test case, loading various template XML files used for automatic testing of a nuclear power DCS picture, starting the nuclear power DCS picture test through a first specified instruction, executing the test case in a test state of the nuclear power DCS picture, calling a pre-established picture test interface to obtain state data of a dynamic object, packaging the state data of the dynamic object of the picture test interface through a preset communication protocol, analyzing the obtained state data of the dynamic object according to the preset communication protocol, and comparing an analysis result with a required state of the test case to generate a test report. It can be seen that the two-layer-based picture test interface in the embodiment of the application realizes automatic test, is used for replacing manual or image recognition-based test, and solves the problems of complicated manual work and low image recognition rate.
Inventors
- LI YONG
- ZHAO CHANG
- ZHOU YIFU
- LI CHAOLI
- ZHANG LIN
- ZHAO LIANGYU
- CUI ZEPENG
- CAI LEI
- LIU JIAN
- JI PENGFEI
Assignees
- 中核控制系统工程有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20251223
Claims (10)
- 1. The nuclear power DCS picture automatic test method based on the communication protocol is characterized by comprising the following steps of: loading a test case; loading various template XML files used for automatic testing of a nuclear power DCS picture, wherein the various template XML files comprise marks of dynamic objects of two layers of the nuclear power DCS, and the dynamic objects of the two layers of the nuclear power DCS are displayed through the nuclear power DCS picture; Starting nuclear power DCS picture test through a first specified instruction; executing a test case under the test state of a nuclear power DCS picture, and calling a pre-established picture test interface to acquire the state data of a 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 acquired state data of the dynamic object according to the preset communication protocol, and comparing the analysis result with the required state of the test case to generate a test report.
- 2. The method of claim 1, wherein the status data of the dynamic object includes one or more of color, coordinates, size, font size, text content, and visibility information.
- 3. The method of claim 1, wherein each type of template XML file comprises a figure Fu Moban XML file, and the pre-established picture test interface comprises a figure-character two-layer interface; under the test state of the nuclear power DCS picture, executing the test case, and calling a pre-established picture test interface to acquire the state data of the dynamic object, wherein the method comprises the following steps: Executing the test case under the test state of the nuclear power DCS picture, analyzing the picture Fu Moban XML file, extracting the icon dynamic object and generating the calling parameter of the icon dynamic object; And calling the icon two-layer interface based on the calling parameters of the icon dynamic object to acquire the state data of the icon dynamic object.
- 4. The method of claim 3, wherein executing the test case in the test state of the nuclear DCS screen, parsing the map Fu Moban XML file, extracting the icon dynamic object, and generating the call parameters of the icon dynamic object, comprises: And in the test state of the nuclear power DCS picture, executing a test case, simulating two layers to send control commands to one layer through a nuclear power DCS operator station, analyzing a map Fu Moban XML file, extracting a graphical dynamic object, and generating calling parameters of the graphical dynamic object.
- 5. The method of claim 1, wherein each type of template XML file includes an object operation menu (ook) template XML file, and the pre-established picture test interface includes an ook two-layer interface; under the test state of the nuclear power DCS picture, executing the test case, and calling a pre-established picture test interface to acquire the state data of the dynamic object, wherein the method comprises the following steps: executing the test case under the test state of the nuclear power DCS picture, analyzing the OOM template XML file, extracting the OOM dynamic object and generating the calling parameters of the OOM dynamic object; And calling an OOM two-layer interface based on the calling parameters of the OOM dynamic object to acquire the state data of the OOM dynamic object.
- 6. The method of claim 5, wherein executing the test case, parsing the ook template XML file, extracting the ook dynamic object, generating the call parameters of the ook dynamic object in the test state of the nuclear DCS frame, comprises: and executing the test case under the test state of the nuclear power DCS picture, calling a nuclear power DCS operator station, simulating and executing the OOM, analyzing the OOM template XML file, extracting the OOM dynamic object, and generating calling parameters of the OOM dynamic object.
- 7. The method of claim 1, wherein each type of template XML file includes an object data frame ODD template XML file, and the pre-established frame test interface includes an ODD two-layer interface; under the test state of the nuclear power DCS picture, executing the test case, and calling a pre-established picture test interface to acquire the state data of the dynamic object, wherein the method comprises the following steps: Executing a test case under the test state of the nuclear power DCS picture, analyzing an ODD template XML file, extracting an ODD dynamic object and generating calling parameters of the ODD dynamic object; and calling an ODD two-layer interface based on the calling parameters of the ODD dynamic object to acquire the state data of the ODD dynamic object.
- 8. The method of claim 7, wherein executing the test case, parsing the ODD template XML file, extracting the ODD dynamic object, and generating the call parameters of the ODD dynamic object in the test state of the nuclear DCS screen, comprises: and executing the test case under the test state of the nuclear power DCS picture, calling the nuclear power DCS operator station, simulating and executing the ODD, analyzing an ODD template XML file, extracting an ODD dynamic object, and generating calling parameters of the ODD dynamic object.
- 9. The method of claim 1, wherein after generating the test report, the method further comprises: and closing the nuclear power DCS picture test by a second specified instruction, and closing the picture test interface.
- 10. Nuclear power DCS picture automatic testing device based on communication protocol, characterized by that, the device includes: The loading unit is used for loading the test cases; the loading unit is used for loading various template XML files used for automatically testing the nuclear power DCS picture, wherein the various template XML files comprise the marks of dynamic objects of the nuclear power DCS two layers, and the dynamic objects of the nuclear power DCS two layers are displayed through the nuclear power DCS picture; The automatic test unit is used for starting nuclear power DCS picture test through a first specified instruction, executing a test case in a test state of a nuclear power DCS picture, calling a pre-established picture test interface to acquire state data of a dynamic object, packaging the state data of the dynamic object of the picture test interface through a preset communication protocol, analyzing the acquired state data of the dynamic object according to the preset communication protocol, and comparing an analysis result with a required state of the test case to generate a test report.
Description
Nuclear power DCS picture automatic test method and device based on communication protocol Technical Field The application relates to the field of nuclear power DCS testing, in particular to a nuclear power DCS picture automatic testing method and device based on a communication protocol. Background Nuclear power DCS (Distributed Control System ) is regarded as the "brain" and "neural center" of a nuclear power plant, and plays a vital role in nuclear safety as the core of operation control. Therefore, the nuclear power DCS industrial detection has the characteristics of high safety and reliability requirements, comprehensive test coverage requirements, traceable quality records and the like. The testing quality of the nuclear power DCS two-layer picture directly influences the stability of the nuclear power DCS, and is one of important guarantee components of nuclear power safety. The nuclear power DCS two layers can also be called a monitoring layer or a man-machine interface layer, are responsible for graphical display and operation interaction, and are interfaces for interaction between operators and the DCS. The nuclear DCS also includes a zero layer, which may also be referred to as a field device layer, which involves physical devices or basic services to interact directly with process variables, and a control layer, which may also be referred to as a control layer, which is responsible for processing real-time control logic, executing commands, and monitoring process states. The conventional nuclear power DCS two-layer picture test generally adopts an image processing method, the test quality and accuracy of the conventional nuclear power DCS two-layer picture test often depend on the design of an image processing algorithm, and the problems of multiple manual point selection, mutual interference between test and operation states, manual confirmation of test conclusion and the like exist. When special fonts or similar fonts such as 0 or o are processed, the problem of insufficient recognition precision often occurs, a large amount of manual secondary confirmation work exists, and the test quality and efficiency are seriously affected. Therefore, there is a need to solve this technical problem. Disclosure of Invention The present application has been made in view of the above problems, and it is an object of the present application to provide a method and apparatus for automatically testing a nuclear power DCS screen based on a communication protocol that overcomes or at least partially solves the above problems. The technical scheme is as follows: In a first aspect, a method for automatically testing a nuclear power DCS image based on a communication protocol is provided, the method comprising: loading a test case; loading various template XML files used for automatic testing of a nuclear power DCS picture, wherein the various template XML files comprise marks of dynamic objects of two layers of the nuclear power DCS, and the dynamic objects of the two layers of the nuclear power DCS are displayed through the nuclear power DCS picture; Starting nuclear power DCS picture test through a first specified instruction; executing a test case under the test state of a nuclear power DCS picture, and calling a pre-established picture test interface to acquire the state data of a 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 acquired state data of the dynamic object according to the preset communication protocol, and comparing the analysis result with the required state of the test case to generate a test report. In one possible implementation, the state data of the dynamic object includes one or more of color, coordinates, size, font size, text content, visibility information. In one possible implementation, various template XML files comprise figure Fu Moban XML files, and the pre-established picture test interface comprises an icon two-layer interface; under the test state of the nuclear power DCS picture, executing the test case, and calling a pre-established picture test interface to acquire the state data of the dynamic object, wherein the method comprises the following steps: Executing the test case under the test state of the nuclear power DCS picture, analyzing the picture Fu Moban XML file, extracting the icon dynamic object and generating the calling parameter of the icon dynamic object; And calling the icon two-layer interface based on the calling parameters of the icon dynamic object to acquire the state data of the icon dynamic object. In one possible implementation manner, in a test state of a nuclear DCS screen, executing a test case, parsing a map Fu Moban XML file, extracting an icon dynamic object, and generating call parameters of the icon dynamic object, including: And in the test state of the nuclear power DCS picture, executing a test case, simulating two layers to send con