Disclosure of Invention
The technical problem to be solved by the present invention is to provide a method for realizing unidirectional transmission of dosage data of a nuclear power plant from a management network to an industrial network, aiming at the defect that the management network in the prior art cannot effectively transmit data to the industrial network.
The technical scheme adopted by the invention for solving the technical problems is as follows: a method for realizing unidirectional transmission of dosage data of a nuclear power plant from a management network to an industrial network is constructed, and the method comprises the following steps:
s1: the management network encodes the RWP information according to a preset rule to form a TXT format file, transmits the TXT format file to the industrial network through a unidirectional transmission module, and stores the TXT format file in a specified file directory;
s2: after receiving the TXT format file through a first internal interface server, the industrial network reads the TXT format file under the file designated directory according to the time sequence and judges whether the TXT format file is legal or not;
s3: and if the TXT format file is legal, decoding the TXT format file, processing the corresponding task state according to decoding information, and writing the processed data into the nuclear power plant access control system of the industrial network.
Preferably, the method for realizing unidirectional transmission of nuclear power plant dosage data from a management network to an industrial network according to the present invention, the determining whether the TXT format file is legal in step S2 includes:
judging whether the TXT format file contains EOF ending characters or not;
if not, reading the next TXT format file from the specified file directory; if yes, judging whether the first line of the TXT format file is legal or not.
Preferably, the method for realizing unidirectional transmission of nuclear power plant dosage data from a management network to an industrial network according to the present invention, the determining whether the first line of the TXT format file is legal includes:
judging whether the identifiers and the content arrangement sequence of the TXT format files are legal or not;
if so, the first operation of the TXT format file is legal;
if not, returning a corresponding error code or invalid new task state or invalid logic state, not storing the content of the TXT format file into the nuclear power plant access control system, and classifying the file into a first folder.
Preferably, in the method for realizing unidirectional transmission of dosage data of a nuclear power plant from a management network to an industrial network, the identifier includes: the separator is $, the field value is empty, the space is reserved, and the text ending identifier is line feed;
the content arrangement sequence of the TXT format file is as follows: task code, version number, description information, threshold information, work order state, nuclear power plant information and end symbol.
Preferably, in the method for realizing unidirectional transmission of nuclear power plant dosage data from a management network to an industrial network according to the present invention, the decoding of the valid TXT format file in step S3 includes:
and decoding the legal TXT format file to obtain a task code, a version number, description information, threshold information and a work order state of the corresponding task.
Preferably, in the method for realizing unidirectional transmission of dosage data of the nuclear power plant from the management network to the industrial network,
judging whether the task code exists or not;
if the task code exists, judging whether the version number of the task code exists or not;
and if the version number of the task code exists, processing the task according to the work order state, recording the processed information in a processing log, and classifying the file into a second folder.
Preferably, the method for realizing unidirectional transmission of dosage data of a nuclear power plant from a management network to an industrial network according to the invention, wherein the processing of the task according to the work order state comprises:
if the work order state is suspension, suspending a current task in the nuclear power plant access control system;
if the work order state is failure, updating the deadline of the current task in the nuclear power plant access control system to the current time, and suspending the current task;
and if the work order state is effective, updating the threshold information, the task name and the work order state of the corresponding task code in the nuclear power plant access control system.
Preferably, the method for realizing the unidirectional transmission of the dosage data of the nuclear power plant from the management network to the industrial network,
if the version number of the task code does not exist, judging whether the work order state is legal or not;
if the work order state is legal, updating the deadline time of the previous version to the current time, suspending the current task, writing the task code and threshold information into the nuclear power plant access control system, recording the processed information in a processing log, and classifying files into the second folder;
and if the work order state is illegal, returning a corresponding error code or invalid new task state or invalid logic state, wherein the content of the TXT format file is not stored in the nuclear power plant access control system, and classifying the file into a first folder.
Preferably, the method for realizing the unidirectional transmission of the dosage data of the nuclear power plant from the management network to the industrial network,
if the task code does not exist, judging whether the work order state is legal or not;
if the work order state is legal, writing the task code and the threshold value information into the nuclear power plant access control system, recording the processed information into a processing log, and classifying files into the second folder;
and if the work order state is illegal, returning a corresponding error code or invalid new task state or invalid logic state, wherein the content of the TXT format file is not stored in the nuclear power plant access control system, and classifying the file into a first folder.
Preferably, in the method for realizing unidirectional transmission of nuclear power plant dosage data from a management network to an industrial network, the TXT format file includes: RWP number, version number, description information, threshold value information, work order state, power plant information and end symbol.
The method for realizing the unidirectional transmission of the dosage data of the nuclear power plant from the management network to the industrial network has the following beneficial effects: the method comprises the following steps: the management network encodes the RWP information according to a preset rule to form a TXT format file, transmits the TXT format file to the industrial network through a unidirectional transmission module, and stores the TXT format file in a specified file directory; after receiving the TXT format file through the first internal interface server, the industrial network reads the TXT format file under the file designated directory according to the time sequence and judges whether the TXT format file is legal or not; and if the TXT format file is legal, decoding the TXT format file, processing the corresponding task state according to the decoding information, and writing the processed data into a nuclear power plant access control system of the industrial network. By implementing the method, the one-way data transmission and updating from the industrial network to the management network are realized, so that the work orders can be finely classified on the nuclear power plant access control system, the corresponding work orders are generated more pertinently according to the actual use condition on site, and the dosage statistics is more accurate and finer.
Detailed Description
For a more clear understanding of the technical features, objects and effects of the present invention, embodiments of the present invention will now be described in detail with reference to the accompanying drawings.
The management system of the nuclear power station is divided into a management network and an industrial network, and the two networks are physically isolated networks in consideration of the safety of the nuclear power station, and information transmission between the two networks can only be unidirectional transmission and can only transmit TXT format files. The embodiment solves the problem of realizing unidirectional transmission of dosage data of the nuclear power plant from a management network to an industrial network, and the network structure applied by the method comprises the following steps: the system comprises a management network, an industrial network and a one-way transmission module for connecting the management network and the industrial network. And at one side of the management network, the RWP information is encoded according to a preset rule, written into a TXT format file, transmitted through a unidirectional transmission module, transmitted to the industrial network and stored in a specified file directory. The method comprises the steps that a first internal interface server is arranged on one side of an industrial network and used for receiving TXT format files transmitted by a one-way transmission module, an interface service program screening data is designed on the first internal interface server, the received TXT format files are analyzed and logically judged, the processed files are stored in a specific historical folder under a shared path, and standard format files which can be directly written into a database of a nuclear power plant access control system (KZC) of the industrial network are screened out. The data meeting the system judgment logic can automatically decode the standard format file, write the standard format file into a nuclear power plant access control system database, and generate RWP codes corresponding to the TXT format file contents and corresponding threshold information in the database.
As shown in fig. 1-2, is a preferred embodiment of the present invention.
FIG. 1 is a schematic flow chart of a method for implementing unidirectional transmission of nuclear power plant dosage data from a management network to an industrial network according to an embodiment; fig. 2 is a schematic logic judgment flow diagram of the method for realizing unidirectional transmission of nuclear power plant dosage data from the management network to the industrial network according to the embodiment.
Specifically, the embodiment discloses a method for realizing unidirectional transmission of dosage data of a nuclear power plant from a management network to an industrial network, which comprises the following steps:
step S1: the management network encodes the RWP information according to a preset rule to form a TXT format file, transmits the TXT format file to the industrial network through the unidirectional transmission module, and stores the TXT format file in a specified file directory. And at one side of the management network, the RWP information is encoded according to a preset rule, written into a TXT format file, transmitted through a unidirectional transmission module, transmitted to the industrial network and stored in a specified file directory. A first internal interface server is arranged at one side of the industrial network and is used for receiving the TXT format file transmitted by the unidirectional transmission module; the unidirectional transmission module is used for limiting the data transmission direction and monitoring the format of transmission data, the management network is connected with and transmits TXT format data to the industrial network through the unidirectional transmission module, and the unidirectional transmission module monitors the data transmission process, so that the transmission process is ensured to be in accordance with relevant regulations and is stable and reliable.
Preferably, in the method for realizing unidirectional transmission of nuclear power plant dosage data from the management network to the industrial network according to the embodiment, the TXT format file includes: RWP number, version number, description information, threshold value information, work order state, power plant information and end symbol.
The RWP originally refers to a radiation work license, the RWP system is also referred to as the whole RWP system after the system is developed, and the RWP system uses a card with a bar code and is used for field scanning of a nuclear power plant. The RWP information refers to encoded information in TXT format text transmitted from the production management workflow system of the management network, for example: "1003307 $00$ test for RWPCrationlei $1.3200$8.00$ CANCEL $ O $1010 EOF" belongs to the RWP text encoding.
Step S2: after receiving the TXT format file through the first internal interface server, the industrial network reads the TXT format file under the file designated directory according to the time sequence and judges whether the TXT format file is legal or not.
Specifically, in the method for realizing unidirectional transmission of nuclear power plant dosage data from the management network to the industrial network according to this embodiment, the step S2 of judging whether the TXT format file is legal includes:
judging whether the TXT format file contains EOF ending characters: judging whether the content end of the TXT format file contains an EOF ending character, wherein the ending character is used for judging whether the transmitted file is ended normally, if not, the file is not processed, and an error code is returned from an interface program interface at the industrial network side; if the content is normal, further judging whether the content of the first line is legal.
If the TXT format file does not contain the EOF ending character, reading the next TXT format file from the specified file directory; if the TXT format file contains the EOF ending character, whether the first line of the TXT format file is legal or not is judged.
Further, the method for realizing unidirectional transmission of nuclear power plant dosage data from a management network to an industrial network according to the embodiment of the present invention judges whether a first line of a TXT format file is legal, including:
judging whether the content arrangement sequence of the identifier and the TXT format file is legal or not;
A. judging the legality of the identifier: the separator in the TXT format file is marked with a $ symbol, the field value is empty, the separator is replaced with empty if the RWP description has $ so as to avoid recognition error, the TXT text ending mark is a line feed, and the third field RWP description of a new line is marked with 'EOF', and the judgment of 'EOF' in the judgment condition is judged in the first step.
B. Judging the validity of the content arrangement sequence of the TXT format file: the content arrangement sequence of the TXT format file is as follows: task code, version number, description information, threshold information, work order state, nuclear power plant information and end symbol. The task codes, the version numbers, the description information, the threshold value information, the work order state, the power plant information and the end symbols are arranged in sequence, the length and the character type of each field content meet requirements, and otherwise, the TXT format file is judged to be an illegal file. In fig. 2, "task code + version number" is the RWP number, and when the description information, i.e., the work content, corresponding to the same task code is identical, different version numbers can be corresponded, because when the work content needs to be adjusted, the low-version task is upgraded, and the information such as the threshold information and the work order state of the low-version task is changed, so as to meet the field work requirement.
And if the identifier and the content arrangement sequence of the TXT format file are legal, the first line of the TXT format file is legal.
If the identifier or/and the content arrangement sequence of the TXT format file is/are illegal, returning a corresponding error code or invalid logic state of the introduced new task state, and classifying the TXT format file into a first folder without storing the content of the TXT format file into the nuclear power plant access control system. Preferably, in this embodiment, the first folder is an error folder for storing an error file, and the second folder is a correct folder for storing a correct file.
Step S3: and if the TXT format file is legal, decoding the TXT format file, processing the corresponding task state according to the decoding information, and writing the processed data into a nuclear power plant access control system of the industrial network.
Specifically, in the method for realizing unidirectional transmission of nuclear power plant dosage data from the management network to the industrial network according to this embodiment, decoding the legal TXT format file in step S3 includes:
and decoding the legal TXT format file to obtain a task code, a version number, description information, threshold information and a work order state of the corresponding task.
Further, in the method for realizing unidirectional transmission of dosage data of the nuclear power plant from the management network to the industrial network,
judging whether the task code exists or not;
if the task code exists, further judging whether the version number of the task code exists; preferably, the task code in this embodiment is 7 bits.
And if the version number of the task code exists, processing the task according to the work order state, recording the processed information in a processing log, and classifying the file into a second folder. Preferably, the version number of the task code in this embodiment is 9 bits.
Preferably, the method for realizing unidirectional transmission of nuclear power plant dosage data from a management network to an industrial network according to the embodiment processes tasks according to the work order state, and includes three conditions:
the first state: if the work order state is suspension, suspending the current task in the nuclear power plant access control system; and (3) task suspension: task suspension means that the task state changes from an "active state" to a "suspended state" and when the task is suspended, the staff using the task code cannot enter the control area of the nuclear power plant, but when the task is recovered to be active, the staff can continue to work using the task code.
And a second state: if the work order state is failure, updating the deadline of the current task in the access control system of the nuclear power plant to the current time, and suspending the current task;
and a third state: and if the work order state is effective, updating the threshold information, the task name and the work order state of the corresponding task code in the nuclear power plant access control system.
In addition, in the method for realizing unidirectional transmission of dosage data of the nuclear power plant from the management network to the industrial network according to the embodiment, in the step of judging whether the version number of the task code exists, another situation exists:
if the version number of the task code does not exist, judging whether the work order state is legal or not;
a1. if the work order state is legal, the return value is as follows: 0. updating the deadline time of the previous version to the current time, suspending the current task, writing the task code and threshold information into an access control system of the nuclear power plant, recording the processed information in a processing log, and classifying files into a second folder;
a2. if the work order state is illegal, returning a corresponding Error Code or invalid logic state of the introduced new task state (Error Code: DB1) or invalid logic state (Error Code: DB2), wherein the content of the TXT format file is not stored in the nuclear power plant access control system and is classified into a first folder.
Further, in the method for realizing unidirectional transmission of dosage data of a nuclear power plant from a management network to an industrial network according to the embodiment, in the step of judging whether the task code exists, another condition exists:
if the task code does not exist, judging whether the work order state is legal or not;
b1. if the work order state is legal, the return value is as follows: 0. writing the task code and the threshold value information into an access control system of the nuclear power plant, recording the processed information into a processing log, and classifying files into a second folder;
b2. if the work order state is illegal, returning a corresponding error code or invalid new task state or invalid logic state, not storing the content of the TXT format file into the nuclear power plant access control system, and classifying the file into a first folder.
Through the steps, processing of one TXT format file is completed, and then the next TXT format file is read from the specified file directory.
The invention provides a framework design method for data unidirectional transmission, which realizes cross-system information transmission through special coding and decoding, and realizes unidirectional data transmission and updating from an industrial network to a management network through implementing the method, so that work orders can be finely classified on an access control system of a nuclear power plant, corresponding work orders are generated according to actual field use conditions in a more targeted manner, and dosage statistics is more accurate and finer.
The above embodiments are merely illustrative of the technical ideas and features of the present invention, and are intended to enable those skilled in the art to understand the contents of the present invention and implement the present invention, and not to limit the scope of the present invention. All equivalent changes and modifications made within the scope of the claims of the present invention should be covered by the claims of the present invention.