Disclosure of Invention
The invention aims to solve the technical problems that the prior art adopts a manual operation mode to set forced data, and when batch data are processed, a great amount of mechanical labor exists for operators due to extremely high step repetition rate, so that the efficiency is low; in this case, the management and setting of the forced data is a very time-consuming and labor-consuming operation, which not only increases labor cost, but also brings unexpected risks to the operation of the whole system due to human errors introduced by the high operation repetition rate.
The invention forcibly analyzes the core function variables of the engineer station software of the DCS platform of the nuclear power plant, and obtains good user experience under the condition of both processing data and improving the working efficiency based on the current situation of repeated operation when the operation and the verification of batch data are required to be processed. The invention aims to provide an automatic setting method, device and equipment based on DCS system forced data, which can automatically realize batch operation of the whole forced process in engineer station software of a nuclear power plant DCS platform, solve the problems of frequent operation of operators and higher cost, and greatly reduce the maintenance cost of the system; on the other hand, the intervention of subjective factors of operators in the process of processing logic is shielded, and the problem of easy error introduction is solved.
The invention is realized by the following technical scheme:
 In a first aspect, the invention provides an automated setting method based on forced data of a DCS system, which is applied to an engineer station of a DCS platform of a nuclear power plant to automatically set the forced data; the method comprises the following steps:
 Acquiring a signal for establishing connection between an engineer station and a control station/transmission station, and establishing connection between a background of the engineer station and the control station/transmission station according to the signal for establishing connection;
 After connection is established, the control station/transmission station sends all data to the engineer station in real time, and the engineer station performs analysis and verification on the received data to obtain analysis and verification data; the analysis and verification data are sent to a foreground interface of an engineer station;
 acquiring a variable forcing command of a user, forcing the variable according to the variable forcing command, and performing data interaction between forced data and a control station/transmission station, wherein a background of an engineer station sends forced variables focused by the user to a foreground interface of the engineer station from all data; the foreground of the engineer station updates the received data to the monitoring table in real time;
 Setting variable data of the forced variable, performing data verification on the set variable data, and updating the variable data after the data verification to a monitoring table; the variable forced scene is saved, and forced variable data at a certain moment is saved by exporting a specified path.
Further, according to the connection establishment signal, connection is established between the background of the engineer station and the control station/transmission station, and if connection establishment is abnormal, a window is flicked to prompt error information.
Further, before the connection is established between the background of the engineer station and the control station/transmission station, the engineer station adopts an MVC model, separates the engineer station interface from the engineer station data by rewriting the Qt model and the view component, updates the data seen in the view component, and does not update the data within the view visible range.
Further, the engineer station interface is reflected by an interface display end, the engineer station data is reflected by a data processing end, and the two ends are not interfered with each other; the interface display end is used for displaying the data on an engineer interface and finishing the interactive operation of all the data and the user; the data processing terminal is responsible for data analysis, storage, analysis and instruction distribution data processing operation;
 the interface display end and the data processing end form a working mode which is not interfered and matched with each other, so that the efficiency and the stability of system operation are improved.
Further, the parsing verification includes:
 Checking whether the first four byte letters in the data packet header of the data are consistent with preset letters;
 checking whether the cyclic redundancy calculation value CRC of the actual content after data analysis is consistent with the cyclic redundancy check value CRC in the data;
 Checking whether the data content length is the same as the recording length in the data head;
 And checking whether the station number and the station type recorded in the data are consistent with the station number and the station type of the current station.
Further, the step of variable forcing includes:
 Acquiring a variable forcing command of a user, selecting a variable range to be forced according to the variable forcing command, and writing data of the variable range to be forced into a data storage area;
 the compiling module of the engineer station compiles the data of the range of the variables to be forced and the operation logic of the data to be forced to generate an executable program; the compiling process is to allocate a forced storage area for the variable to be forced;
 The mandatory module of the engineer station inputs mandatory data values in batches and issues the mandatory data values and the executable program to an operation program data inlet of the control station/transmission station through the communication module;
 According to the forced data value input by the operation program data entry, the control station/transmission station correspondingly writes the forced data value into the forced storage area;
 According to an executable program input by an operation program data entry, a control station/transmission station operates the executable program, calls different assignment drivers according to a forced sign of the variable to be forced, assigns values for the variable to be forced, and takes the values as output values;
 the control station/transmission station feeds the output value back to the engineer station through the communication module, so that batch forcing of variables to be forced is realized.
Further, the variables to be forced are variables except for the intermediate variables to be forced in the variable configuration group;
 The attributes of the intermediate variables to be forced comprise an intermediate variable name, a variable name to be forced, a data type (the data type comprises an analog type analog with a quality bit, a switching value type binary with a quality bit and an enumeration type mulripe with a quality bit) and a forced flag (kcg _pool);
 the names of the intermediate variable name, the variable name to be forced and the forced sign default to the same name and are provided with different suffixes; when the method is modified, only the intermediate variable name can be modified, and the names of the variable name to be forced and the forced mark are automatically modified.
Further, the method further comprises the steps of importing forced variable data, selecting a variable forced scene at a certain moment under a specified path, performing calculation extraction and data verification on the forced variable data under the variable forced scene, and loading the verified data into a display form.
Further, setting variable data of the forced variable, performing data verification on the set variable data, and updating the variable data after the data verification to a monitoring table; the variable data after data verification is encrypted and packed and then is downloaded to a lower computer (namely a control station).
Specifically, the data encryption is to adopt a national encryption algorithm SM4 for encryption storage; the encrypted data is decrypted and judged during downloading, and the data is sent to a communication group packet after verification; the communication group packet is encrypted by adopting a mode of SM2+openssl+SM3 of a national encryption algorithm, and the lower computer decrypts and executes forced action after receiving the data.
In a second aspect, the present invention further provides an automatic setting device based on DCS system forced data, which supports the automatic setting method based on DCS system forced data; the device comprises:
 the inter-station connection unit in the DCD system is used for acquiring signals for establishing connection between the engineer station and the control station/transmission station, and establishing connection between the background of the engineer station and the control station/transmission station according to the signals for establishing connection;
 the real-time data interaction and analysis verification unit is used for sending all data to the engineer station in real time after connection is established, and the engineer station performs analysis verification on the received data to obtain analysis verified data; the analysis and verification data are sent to a foreground interface of an engineer station;
 The variable forcing unit is used for acquiring a variable forcing command of a user, forcing the variable to interact with the control station/transmission station according to the variable forcing command, and sending the forced variable focused by the user to a foreground interface of the engineer station from all data by a background of the engineer station; the foreground of the engineer station updates the received data to the monitoring table in real time;
 The variable data setting and checking unit is used for setting the variable data of the forced variable, checking the set variable data, and updating the variable data after the data checking to a monitoring table;
 and the forced scene storage unit is used for storing the variable forced scene set by the variable data setting and checking unit and storing the forced variable data at a certain moment by exporting a specified path.
In a third aspect, the present invention further provides a computer device, including a memory, a processor, and a computer program stored in the memory and capable of running on the processor, where the processor implements the DCS-system-based forced data automatic setting method when executing the computer program.
In a fourth aspect, the present invention further provides a computer readable storage medium, where a computer program is stored, where the computer program, when executed by a processor, implements the DCS system forced data based automatic setting method.
Compared with the prior art, the invention has the following advantages and beneficial effects:
 1. the invention forcibly analyzes the core function variables of the engineer station software of the DCS platform of the nuclear power plant, and obtains good user experience under the condition of both processing data and improving the working efficiency based on the current situation of repeated operation when the operation and the verification of batch data are required to be processed. On one hand, the invention can automatically realize batch operation of the whole forced process in the engineer station software of the DCS platform of the nuclear power plant, solves the problems of frequent operation of operators and higher cost, and greatly reduces the maintenance cost of the system; on the other hand, the intervention of subjective factors of operators in the process of processing logic is shielded, and the problem of easy error introduction is solved.
2. According to the invention, the engineer station is used for data interaction with the control station/transmission station, the forced interface automatically displays the real forced data in the control station/transmission station, rather than reading off-line data from local for display, so that the value of the available data is ensured; introducing an MVC mode into the software of the DCS system of the nuclear power plant, so that the design of a software interface with a forced function has high maintainability; by combining the characteristics of a DCS system of the nuclear power plant, a deterministic forced data format is strictly defined, and the consistency of data in the whole design flow is ensured; adopting a strict data filtering and detecting mechanism, starting from a data source, and ensuring the correctness of forced data downloaded into a control station/transmission station from each link; the scene saving and loading technology is adopted in the variable forced software of the DCS system of the nuclear power plant, so that the rapid forced scene recording and loading function is provided, the value of the software in the application of the nuclear power plant is improved, and the maintenance cost of the DCS system is greatly saved.
Detailed Description
For the purpose of making apparent the objects, technical solutions and advantages of the present invention, the present invention will be further described in detail with reference to the following examples and the accompanying drawings, wherein the exemplary embodiments of the present invention and the descriptions thereof are for illustrating the present invention only and are not to be construed as limiting the present invention.
Example 1
The forced data is set by adopting a manual operation mode based on the prior art, and when batch data are processed, a great amount of mechanical labor exists for operators due to extremely high step repetition rate, so that the efficiency is low; in this case, the management and setting of the forced data is a very time-consuming and labor-consuming operation, which not only increases labor cost, but also brings unexpected risks to the operation of the whole system due to human errors introduced by the high operation repetition rate.
The invention forcibly analyzes the core function variables of the engineer station software of the DCS platform of the nuclear power plant, and obtains good user experience under the condition of both processing data and improving the working efficiency based on the current situation of repeated operation when the operation and the verification of batch data are required to be processed. On one hand, the invention can automatically realize batch operation of the whole forced process in the engineer station software of the DCS platform of the nuclear power plant, solves the problems of frequent operation of operators and higher cost, and greatly reduces the maintenance cost of the system; on the other hand, the intervention of subjective factors of operators in the process of processing logic is shielded, and the problem of easy error introduction is solved.
As shown in fig. 1, 3 to 8, the method for automatically setting the forced data based on the DCS system is applied to an engineer station of a DCS platform of a nuclear power plant to automatically set the forced data; the method comprises the following steps:
 acquiring a signal for establishing connection between an engineer station and a control station/transmission station, and establishing connection between a background of the engineer station (namely a background in fig. 1) and the control station/transmission station (namely a lower computer in fig. 1) according to the signal for establishing connection;
 After connection is established, the control station/transmission station sends all data to the engineer station in real time, and the engineer station performs analysis and verification on the received data to obtain analysis and verification data; the analysis and verification data are sent to a foreground interface of an engineer station;
 acquiring a variable forcing command of a user, forcing the variable according to the variable forcing command, performing data interaction between forced data and a control station/transmission station (namely a lower computer in fig. 1), and transmitting forced variables focused by the user from all data to a foreground interface of the engineer station by a background of the engineer station; the foreground of the engineer station updates the received data to the monitoring table in real time;
 Setting variable data of the forced variable, performing data verification on the set variable data, and updating the variable data after the data verification to a monitoring table; the variable forced scene is saved, and forced variable data at a certain moment is saved by exporting a specified path.
In this embodiment, according to the connection establishment signal, connection is established between the background of the engineer station (i.e. the background in fig. 1) and the control station/transmission station (i.e. the lower computer in fig. 1), and if the connection is established abnormally, a window is flicked to prompt error information.
In this embodiment, before the connection is established between the background of the engineer station (i.e., the background in fig. 1) and the control station/transmission station (i.e., the lower computer in fig. 1), the engineer station adopts the MVC model, separates the engineer station interface from the engineer station data by rewriting the Qt model and the view component, updates the data seen in the view component, and does not update the data within the view visible range.
In this embodiment, the engineer station interface is reflected by an interface display end, the engineer station data is reflected by a data processing end, and the two ends do not interfere with each other; the interface display end is used for displaying the data on an engineer interface and finishing the interactive operation of all the data and the user; the data processing terminal is responsible for data analysis, storage, analysis and instruction distribution data processing operation;
 the interface display end and the data processing end form a working mode which is not interfered and matched with each other, so that the efficiency and the stability of system operation are improved.
In this embodiment, the parsing verification includes:
 Checking whether the first four byte letters in the data packet header of the data are consistent with preset letters;
 checking whether the cyclic redundancy calculation value CRC of the actual content after data analysis is consistent with the cyclic redundancy check value CRC in the data;
 Checking whether the data content length is the same as the recording length in the data head;
 And checking whether the station number and the station type recorded in the data are consistent with the station number and the station type of the current station.
In this embodiment, the step of forcing the variable includes:
 Acquiring a variable forcing command of a user, selecting a variable range to be forced according to the variable forcing command, and writing data of the variable range to be forced into a data storage area;
 the compiling module of the engineer station compiles the data of the range of the variables to be forced and the operation logic of the data to be forced to generate an executable program; the compiling process is to allocate a forced storage area for the variable to be forced;
 The mandatory module of the engineer station inputs mandatory data values in batches and issues the mandatory data values and the executable program to an operation program data inlet of the control station/transmission station through the communication module;
 According to the forced data value input by the operation program data entry, the control station/transmission station correspondingly writes the forced data value into the forced storage area;
 According to an executable program input by an operation program data entry, a control station/transmission station operates the executable program, calls different assignment drivers according to a forced sign of the variable to be forced, assigns values for the variable to be forced, and takes the values as output values;
 the control station/transmission station feeds the output value back to the engineer station through the communication module, so that batch forcing of variables to be forced is realized.
A block flow diagram of variable forcing between an engineer station and a control/transfer station is shown in fig. 3.
In this embodiment, the variables to be forced are variables except for the intermediate variables to be forced in the variable configuration group;
 The attributes of the intermediate variables to be forced comprise an intermediate variable name, a variable name to be forced, a data type (the data type comprises an analog type analog with a quality bit, a switching value type binary with a quality bit and an enumeration type mulripe with a quality bit) and a forced flag (kcg _pool);
 the names of the intermediate variable name, the variable name to be forced and the forced sign default to the same name and are provided with different suffixes; when the method is modified, only the intermediate variable name can be modified, and the names of the variable name to be forced and the forced mark are automatically modified.
In this embodiment, the method further includes importing forced variable data, selecting a variable forced scene at a certain moment under a specified path, performing calculation extraction and data verification on the forced variable data under the variable forced scene, and loading the verified data into a display table.
In this embodiment, setting variable data of the forced variable, performing data verification on the set variable data, and updating the variable data after the data verification to a monitoring table; the variable data after data verification is encrypted and packed and then is downloaded to a lower computer (namely a control station).
Specifically, the data encryption is to adopt a national encryption algorithm SM4 for encryption storage; the encrypted data is decrypted and judged during downloading, and the data is sent to a communication group packet after verification; the communication group packet is encrypted by adopting a mode of SM2+openssl+SM3 of a national encryption algorithm, and the lower computer decrypts and executes forced action after receiving the data.
The method disclosed by the invention is used in engineer station software of a nuclear power plant DCS platform, and the specific implementation conditions are as follows:
 Fig. 4 is a schematic diagram of start variable forcing, fig. 5 is a schematic diagram of selecting variables to be forced, fig. 6 is a schematic diagram of setting variable data, fig. 7 is a schematic diagram of saving forcing scenes, and fig. 8 is a schematic diagram of loading forcing scenes.
The invention realizes the automatic setting function of the forced data of the engineer station maintenance module, a user can quickly and effectively carry out forced maintenance on the data in the system through the function, can conveniently check the forced condition of the data in the system, analyze the system, quickly record and load the forced scene at a certain moment in the system, plays the role of debugging and positioning, and meets the maintenance function of on-site staff of the nuclear power plant in the maintenance stage of the power plant. The operation cost of the nuclear power plant is greatly saved, and the reliability and convenience of the operation of the power plant system are improved. The innovation point of the method is that:
 1. The engineer station is used for data interaction with the control station/transmission station, the forced interface automatically displays the real forced data in the control station/transmission station, rather than reading off-line data from local to display, so that the value of the available data is ensured;
 2. Introducing an MVC mode into the software of the DCS system of the nuclear power plant, so that the design of a software interface with a forced function has high maintainability;
 3. by combining the characteristics of a DCS system of the nuclear power plant, a deterministic forced data format is strictly defined, and the consistency of data in the whole design flow is ensured;
 4. Adopting a strict data filtering and detecting mechanism, starting from a data source, and ensuring the correctness of forced data downloaded into a control station/transmission station from each link;
 5. The scene saving and loading technology is adopted in the variable forced software of the DCS system of the nuclear power plant, so that the rapid forced scene recording and loading function is provided, the value of the software in the application of the nuclear power plant is improved, and the maintenance cost of the DCS system is greatly saved.
Example 2
As shown in fig. 2, the difference between the present embodiment and embodiment 1 is that the present embodiment provides an automated setting device based on DCS system forced data, which supports the automated setting method based on DCS system forced data described in embodiment 1; the device comprises:
 the inter-station connection unit in the DCD system is used for acquiring signals for establishing connection between the engineer station and the control station/transmission station, and establishing connection between the background of the engineer station and the control station/transmission station according to the signals for establishing connection;
 the real-time data interaction and analysis verification unit is used for sending all data to the engineer station in real time after connection is established, and the engineer station performs analysis verification on the received data to obtain analysis verified data; the analysis and verification data are sent to a foreground interface of an engineer station;
 The variable forcing unit is used for acquiring a variable forcing command of a user, forcing the variable to interact with the control station/transmission station according to the variable forcing command, and sending the forced variable focused by the user to a foreground interface of the engineer station from all data by a background of the engineer station; the foreground of the engineer station updates the received data to the monitoring table in real time;
 The variable data setting and checking unit is used for setting the variable data of the forced variable, checking the set variable data, and updating the variable data after the data checking to a monitoring table;
 and the forced scene storage unit is used for storing the variable forced scene set by the variable data setting and checking unit and storing the forced variable data at a certain moment by exporting a specified path.
The execution process of each unit is performed according to the steps of the DCS-system-forced-data-based automatic setting method described in embodiment 1, which is not described in detail.
Meanwhile, the invention also provides computer equipment, which comprises a memory, a processor and a computer program stored in the memory and capable of running on the processor, wherein the computer program is executed by the processor to realize the automatic setting method based on the forced data of the DCS system.
Meanwhile, the invention also provides a computer readable storage medium which stores a computer program, and the computer program realizes the automatic setting method based on the forced data of the DCS system when being executed by a processor.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The foregoing description of the embodiments has been provided for the purpose of illustrating the general principles of the invention, and is not meant to limit the scope of the invention, but to limit the invention to the particular embodiments, and any modifications, equivalents, improvements, etc. that fall within the spirit and principles of the invention are intended to be included within the scope of the invention.