CN115185900A - Downloading method for time sequence data real-time calculation algorithm - Google Patents

Downloading method for time sequence data real-time calculation algorithm Download PDF

Info

Publication number
CN115185900A
CN115185900A CN202210553056.4A CN202210553056A CN115185900A CN 115185900 A CN115185900 A CN 115185900A CN 202210553056 A CN202210553056 A CN 202210553056A CN 115185900 A CN115185900 A CN 115185900A
Authority
CN
China
Prior art keywords
data
file
code file
configuration file
compliance check
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210553056.4A
Other languages
Chinese (zh)
Inventor
徐奎
张大志
何栓
景应刚
方华建
杨强
巩超
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Nuclear Power Operation Technology Corp Ltd
Original Assignee
China Nuclear Power Operation Technology Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Nuclear Power Operation Technology Corp Ltd filed Critical China Nuclear Power Operation Technology Corp Ltd
Priority to CN202210553056.4A priority Critical patent/CN115185900A/en
Publication of CN115185900A publication Critical patent/CN115185900A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Systems or methods specially adapted for specific business sectors, e.g. utilities or tourism
    • G06Q50/06Electricity, gas or water supply

Abstract

The invention belongs to the technical field of nuclear power station control, and particularly relates to a time sequence data real-time calculation algorithm downloading method. The method comprises the following steps: s1: acquiring a configuration file and converting the configuration file into a source code file; s2: performing data compliance check and logic compliance check on the source code file, and if the source code file passes the check, turning to step S3; s3: format conversion, converting the source code file into a target code file by checking; s4: and forming function call, and converting the target code file into a dynamic link library file. The beneficial effects are that: in the downloading process, the particularity of the configuration file of the nuclear power plant is combined, and data compliance check and logic compliance check are specially set so as to ensure that the dynamic link library file formed after the configuration file is converted is correct.

Description

Downloading method for time sequence data real-time calculation algorithm
Technical Field
The invention belongs to the technical field of nuclear power station control, and particularly relates to a time sequence data real-time calculation algorithm downloading method.
Background
The configuration file refers to special software for data acquisition and process control, which is a software platform and a development environment at the level of a monitoring layer of an automatic control system, uses a flexible configuration mode, and provides a general-level software tool for quickly constructing a monitoring function of the industrial automatic control system for a user. The configuration file is generated by an algorithm configuration tool or a text editor, in the field of nuclear power, an algorithm engineer generates a corresponding configuration file through the algorithm configuration tool or the text editor after confirming requirements (for example, background periodic calculation is needed for equipment state calculation, alarm calculation, working condition calculation and the like) according to nuclear power plant logic, and due to the particularity of the nuclear power plant, the configuration file in the nuclear power plant is a graphic description file which cannot be identified and directly called by a system, so an algorithm downloading method needs to be provided to solve the problems.
Disclosure of Invention
The invention aims to provide a time sequence data real-time calculation algorithm downloading method which is used for enabling configuration files in a power plant to be dynamic link library files formed after downloading operation so as to form files capable of being directly called, and the files can be directly called after periodic calculation or non-periodic calculation is executed.
The technical scheme of the invention is as follows: a time sequence data real-time calculation algorithm downloading method comprises the following steps:
s1: acquiring a configuration file and converting the configuration file into a source code file, wherein the configuration file is a graphic description file;
s2: performing data compliance check and logic compliance check on the source code file, and if the source code file passes the check, turning to step S3; the data compliance check is used for judging whether the graphic data in the source code file is correct or not; the logic compliance check is used for judging whether logic data in the source code file are correct or not;
s3: format conversion, converting the source code file into a target code file by checking;
s4: and forming function call, and converting the target code file into a dynamic link library file.
The data compliance check in the step S2 comprises the following steps:
s21: judging whether the group of graphic data to be detected has a corresponding point configuration file, wherein the point configuration file is preset, and if the corresponding point configuration file is not found, judging that the group of graphic data is undefined and reports an error to the outside; if yes, the step S22 is carried out;
s22: judging whether key attributes are met, wherein the key attributes comprise one or more combinations of data types, lengths, value ranges, ranges and the like, and are stored in a point configuration file; if the graphic data pass the detection, judging the next group of data until all the graphic data pass the detection, and judging that the configuration file data pass the data compliance check; if any group of data fails the detection, the configuration file data is judged not to pass the data compliance check.
The logic compliance check in step S2 includes, but is not limited to, the following types of checks, and if one or more of the following conditions exist in the logic data to be checked, it is determined that the group of logic data fails to pass the logic compliance check, and an error is reported to the outside; if the logic data to be checked does not have any one of the following situations, judging that the group of logic data passes through the logic compliance check;
a) Program calls have dead loops;
b) The module has undefined inputs or outputs;
c) Input and output direction errors;
d) Whether a program entry exists;
e) The input pins of the algorithm module should not be subject to ambiguity.
In step S3, the source code file is converted into the target code file by the fscan or CSCAN tool.
And step S4, carrying out function call by a Linker tool, and linking the target code file and the static library to generate a dynamic link library file.
The invention has the beneficial effects that: the configuration file is generated by an algorithm configuration tool or a text editor, an algorithm engineer generates a corresponding configuration file through the algorithm configuration tool or the text editor after confirming requirements (for example, equipment state calculation, alarm calculation, working condition calculation and the like which need background periodic calculation) according to logic of the nuclear power plant, and the configuration file in the nuclear power plant is a graphic description file which cannot be identified by a system and is directly called, so that the configuration file needs to be downloaded through the algorithm downloading method shown by the invention, the downloading tool receives downloading instructions from the offline configuration tool, and the configuration file and the executable file generated by the algorithm configuration tool or the text editor are copied to the local through a network file system, the configuration file is analyzed, and downloading operation is executed. The downloading tool compiles the configuration file into a dynamic link library file by combining an application function program extracted from the function library by a user and a platform program, and downloads the dynamic link library file into a corresponding algorithm running environment so as to be used for directly calling a corresponding file subsequently according to needs and executing periodic calculation or non-periodic calculation. In the downloading process, the particularity of the configuration file of the nuclear power plant is combined, and data compliance check and logic compliance check are specially set so as to ensure that the dynamic link library file formed after the configuration file is converted is correct.
Detailed Description
The present invention will be described in further detail with reference to specific examples.
The invention discloses an algorithm downloading method, which comprises the following steps
S1, acquiring a configuration file and converting the configuration file into a source code file, wherein the configuration file is a graphic description file;
s2, carrying out data compliance check and logic compliance check on the source code file, and if the source code file passes the check, turning to the step S3; the data compliance check is used for judging whether the graphic data in the source code file is correct or not; the logical compliance check is used to determine whether the logical data in the source code file is correct
S3, converting the source code file into an object code file by checking,
and S4, forming function call and converting the target code file into a dynamic link library file.
The configuration file is generated by an algorithm configuration tool or a text editor, an algorithm engineer generates a corresponding configuration file through the algorithm configuration tool or the text editor after confirming requirements (such as equipment state calculation, alarm calculation, working condition calculation and the like which need background periodic calculation) according to logic of the nuclear power plant, and the configuration file in the nuclear power plant is a graphic description file which cannot be identified by a system and can not be directly called, so that the configuration file needs to be downloaded through the algorithm downloading method disclosed by the invention. The downloading tool compiles the configuration file into a dynamic link library file by combining an application function program extracted from the function library by a user and a platform program, and downloads the dynamic link library file into a corresponding algorithm running environment so as to be used for directly calling a corresponding file subsequently according to needs and executing periodic calculation or non-periodic calculation.
Due to the particularity of the nuclear power configuration file and the fact that the algorithm configuration file is generated by an algorithm configuration engineer through manual editing by using a configuration tool, grammatical or logic errors of the generated algorithm may occur due to the professional level of the algorithm configuration engineer or accidental omission and the like in the configuration process, and therefore data and logic need to be checked. In step S2, the data compliance check and the logic compliance check are performed to ensure that the data in the configuration file is correct, and the data and the logic compliance check may be performed simultaneously or sequentially, which is not limited in the present application.
As a preferable scheme, in this embodiment, the data compliance check includes the following steps:
s21, judging whether the group of graphic data to be detected has a corresponding point configuration file, wherein the point configuration file is preset, and if the corresponding point configuration file is not found, judging that the group of graphic data is undefined and reports an error; if yes, the step S22 is carried out;
s22, judging whether key attributes are met, wherein the key attributes comprise one or more combinations of data types, lengths, value ranges, ranges and the like, and are stored in a point configuration file; if the graphic data pass the detection, switching to the judgment of the next group of data until all the graphic data pass the detection, and judging that the configuration file data pass the data compliance inspection; if any group of data fails to pass the detection, the configuration file data is judged to fail the data compliance check.
As a preferred solution, in this embodiment, the logic compliance check includes, but is not limited to, the following type of check, and if one or more of the following conditions exists in the logic data to be checked, it is determined that the group of logic data fails the logic compliance check, and an error is reported; and if the logic data to be checked does not have any condition, judging that the group of logic data passes the logic compliance check.
a) Program calls have dead loops;
b) Module presence undefined input or output
c) Input/output direction error
d) Whether or not a program entry exists
e) The input pins of the algorithm module should not exhibit any ambiguity
In this embodiment, the source code file is in one or more formats such as cpp, h file, etc., the object code file is in obj format, and the format of the source code file cannot be recognized and used by the system, so that it needs to be converted into a format that can be finally and directly called and executed by the system.
After the target code file is obtained, the target code file needs to be further processed and converted into a binary code file which can be directly copied into a memory and can be operated without any change. In this embodiment, step S4 performs function call via a Linker tool, and links the target code file and the static library to generate a dynamic link library file.
Further, according to different application scenarios and application requirements, the dynamic link library file in this embodiment is in an exe format or an so format, where if periodic calculation is performed, the dynamic link library file is in the exe format, and if non-periodic calculation is performed, the dynamic link library file is in the so format.

Claims (7)

1. A time sequence data real-time calculation algorithm downloading method is characterized by comprising the following steps:
s1: acquiring a configuration file and converting the configuration file into a source code file, wherein the configuration file is a graphic description file;
s2: performing data compliance check and logic compliance check on the source code file, and if the source code file passes the check, turning to step S3;
s3: format conversion, converting the source code file into a target code file by checking;
s4: and forming function call, and converting the target code file into a dynamic link library file.
2. The downloading method of time series data real-time computing algorithm as claimed in claim 1, wherein the data compliance check in step S2 is used to determine whether the graphic data in the source code file is correct; the logical compliance check is used to determine whether the logical data in the source code file is correct.
3. The method for downloading time series data real-time calculation algorithm according to claim 2, wherein the data compliance check in step S2 comprises the steps of:
s21: judging whether the group of graphic data to be detected has a corresponding point configuration file, wherein the point configuration file is preset, and if the corresponding point configuration file is not found, judging that the group of graphic data is undefined and reports an error to the outside; if yes, the process proceeds to step S22.
4. The method for downloading time series data real-time calculation algorithm according to claim 3, wherein the data compliance check in step S2 comprises the following steps:
s22: judging whether key attributes are met, wherein the key attributes comprise one or more combinations of data types, lengths, value ranges, ranges and the like, and are stored in a point configuration file; if the graphic data pass the detection, switching to the judgment of the next group of data until all the graphic data pass the detection, and judging that the configuration file data pass the data compliance inspection; if any group of data fails to pass the detection, the configuration file data is judged to fail the data compliance check.
5. The method for downloading time series data real-time calculation algorithm according to claim 1, wherein the logical compliance check in step S2 includes, but is not limited to, the following type of check, if there are one or more of the following conditions in the logical data to be checked, it is determined that the group of logical data fails the logical compliance check, and an error is reported; if the logic data to be checked does not have any one of the following situations, judging that the group of logic data passes through the logic compliance check;
a) Program calls have dead loops;
b) Module presence undefined input or output;
c) Input and output direction errors;
d) Whether a program entry exists;
e) The input pins of the algorithm module should not be subject to ambiguity.
6. The method as claimed in claim 1, wherein in step S3, the source code file is converted into the object code file by fscan or cscan tool.
7. The method for downloading time series data real-time calculation algorithm as claimed in claim 1, wherein the step S4 is to link the object code file and the static library to generate the dynamic link library file by making a function call via a Linker tool.
CN202210553056.4A 2022-05-20 2022-05-20 Downloading method for time sequence data real-time calculation algorithm Pending CN115185900A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210553056.4A CN115185900A (en) 2022-05-20 2022-05-20 Downloading method for time sequence data real-time calculation algorithm

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210553056.4A CN115185900A (en) 2022-05-20 2022-05-20 Downloading method for time sequence data real-time calculation algorithm

Publications (1)

Publication Number Publication Date
CN115185900A true CN115185900A (en) 2022-10-14

Family

ID=83512681

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210553056.4A Pending CN115185900A (en) 2022-05-20 2022-05-20 Downloading method for time sequence data real-time calculation algorithm

Country Status (1)

Country Link
CN (1) CN115185900A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115185898A (en) * 2022-05-20 2022-10-14 中核武汉核电运行技术股份有限公司 Nuclear power plant data periodic real-time processing method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109375525A (en) * 2018-10-15 2019-02-22 中国核电工程有限公司 A kind of instrument control finished product file importing modeling method based on verification platform
CN110471670A (en) * 2019-08-20 2019-11-19 杭州和利时自动化有限公司 A kind of compiler, Compilation Method and method for tracing and DCS controller
CN111880830A (en) * 2020-07-23 2020-11-03 中国航发控制系统研究所 Automatic compiling, linking and loading method for distributed control software source code
CN114047915A (en) * 2021-12-03 2022-02-15 瀚云科技有限公司 Configuration application display method and device, electronic equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109375525A (en) * 2018-10-15 2019-02-22 中国核电工程有限公司 A kind of instrument control finished product file importing modeling method based on verification platform
CN110471670A (en) * 2019-08-20 2019-11-19 杭州和利时自动化有限公司 A kind of compiler, Compilation Method and method for tracing and DCS controller
CN111880830A (en) * 2020-07-23 2020-11-03 中国航发控制系统研究所 Automatic compiling, linking and loading method for distributed control software source code
CN114047915A (en) * 2021-12-03 2022-02-15 瀚云科技有限公司 Configuration application display method and device, electronic equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
陆玉军 等: "基于Qt的继电保护逻辑组态软件开发", 江苏电机工程, vol. 34, no. 5, pages 43 - 46 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115185898A (en) * 2022-05-20 2022-10-14 中核武汉核电运行技术股份有限公司 Nuclear power plant data periodic real-time processing method
CN115185898B (en) * 2022-05-20 2024-02-09 中核武汉核电运行技术股份有限公司 Nuclear power plant data periodic real-time processing method

Similar Documents

Publication Publication Date Title
US8572583B2 (en) Method and system for testing software for industrial machine
US20050223295A1 (en) Method for the creation of sequences for testing software
US7712089B2 (en) Revalidation of a compiler for safety control
US20090089753A1 (en) Software product line analyzer
CN110244936B (en) Method and device for supporting VISIO flow chart to automatically import DCS algorithm configuration software
CN115185900A (en) Downloading method for time sequence data real-time calculation algorithm
CN101937396B (en) Detecting method of unsafe variable use in software program
CN115237418A (en) Network mode configuration system and method for multi-mode network element equipment
CN112346987A (en) Test case generation and conversion method and system based on Xmind
WO2021040727A1 (en) Plc code generation with a knowledge graph
CN115185899A (en) Non-periodic real-time processing method for nuclear power plant time sequence data
CN114077544A (en) Software testing method, device, equipment and medium
da Silva et al. On the automatic generation of timed automata models from function block diagrams for safety instrumented systems
JP4488227B2 (en) Debugging method of control component having variability and debugging support apparatus
Younis et al. UML-based approach for the re-engineering of PLC programs
Altinger et al. On error-class distribution in automotive model-based software
CN115185508A (en) Algorithm configuration tool and method based on graphic elements
JP6369177B2 (en) Development support program, development support method, and development support apparatus
CN113688402A (en) Intelligent contract vulnerability mining method and device
Zhang et al. An approach for resource Function Block generation: Towards RAMI4. 0-compliant PLC Programming
Burnard et al. Verifying and validating automatically generated code
CN115185898B (en) Nuclear power plant data periodic real-time processing method
Julius et al. A model-driven approach for transforming GRAFCET specification into PLC code including hierarchical structures
CN111176993A (en) Code static detection method based on abstract syntax tree
EP3575956A1 (en) Graph configuration language transformation method and apparatus

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination