CN-121995878-A - Industrial monitoring method, device, electronic equipment and medium
Abstract
The embodiment of the invention provides an industrial monitoring method, an industrial monitoring device, electronic equipment and a medium. According to the embodiment of the invention, the accurate binding of the monitoring parameters in the data model and the program variables in the algorithm program based on the variable binding addresses is realized by acquiring the data model and the algorithm program of the industrial project and analyzing the algorithm program to generate the algorithm flow chart. In the execution process of the industrial project, the real-time data of the monitoring parameters are dynamically mapped to the corresponding program variables in the algorithm flow chart, and the corresponding target flow chart nodes in the algorithm flow chart can be determined and marked according to the actual execution state of the industrial project, so that the operation and maintenance threshold is reduced, the automation level of industrial monitoring is improved, the problems in the production process can be found and solved in time, and the stability and efficiency of industrial production are finally improved.
Inventors
- WANG JIE
- WANG QIAN
- KANG XIAOFEI
- ZHU QIANG
- WANG ZHENGYING
Assignees
- 中国长江三峡集团有限公司
Dates
- Publication Date
- 20260508
- Application Date
- 20260106
Claims (12)
- 1. An industrial monitoring method, the method comprising: acquiring a data model and an algorithm program of an industrial project, wherein the data model comprises a plurality of monitoring parameters and corresponding variable binding addresses; Analyzing the algorithm program and generating a corresponding algorithm flow chart, and extracting program variables in the algorithm program, wherein the program variables have corresponding variable binding addresses; binding the monitoring parameters in the data model with program variables in the algorithm program through the variable binding address; the real-time data of the monitoring parameters are mapped to the corresponding program variables in the algorithm flow chart; And acquiring the execution state of the industrial item, determining a target flow chart node corresponding to the execution state in the algorithm flow chart, and marking.
- 2. The industrial monitoring method of claim 1, wherein said parsing the algorithm program comprises: Determining a grammar structure of an industrial programming language used by the algorithm program; Dividing the algorithm program into functional grammar blocks corresponding to different grammar structure types, wherein the grammar structure types comprise a condition judgment structure, a multi-path selection structure, a circulation structure and other program structures.
- 3. The industrial monitoring method of claim 2, wherein the generating a corresponding algorithm flow chart comprises: mapping the functional grammar blocks into corresponding flowchart graphic elements according to a flowchart generation rule; connecting the flow chart elements according to the execution logic sequence of the algorithm program to generate a preliminary algorithm flow chart; and optimizing the preliminary algorithm flow chart to obtain the algorithm flow chart.
- 4. The industrial monitoring method according to claim 2, wherein the mapping the functional grammar blocks into corresponding flowchart primitives according to a flowchart generation rule comprises: The conditional parts in the functional grammar blocks corresponding to the conditional judgment structure, the multiplexing structure and the loop structure are mapped to a first type of primitive, and the functional grammar blocks of the rest and the functional grammar blocks of the other program structure types are mapped to a second type of primitive.
- 5. The industrial monitoring method of claim 3, wherein optimizing the preliminary algorithm flow chart comprises: identifying a nested structure in the preliminary algorithm flow chart, wherein the nested structure is that at least one first type of graphic element is nested in a branch of the first type of graphic element; and merging all the flow chart primitives in the nested structure into a single primitive under the condition that the total number of the first type primitives contained in the nested structure exceeds a preset threshold value.
- 6. The industrial monitoring method of claim 3, wherein optimizing the preliminary algorithm flow chart comprises: identifying a continuous primitive sequence in the preliminary algorithm flow chart, wherein the continuous primitive sequence is internally provided with three or more continuous connected primitives of the second type; all primitives of the second type within the sequence of consecutive primitives are merged into a single primitive.
- 7. The industrial monitoring method of claim 2, wherein the extracting the program variables in the algorithm program comprises: Performing lexical analysis on the plurality of functional grammar blocks to identify sentences conforming to variable definition grammar and sentences conforming to variable assignment grammar in the functional grammar blocks; extracting the name and the data type of the program variable from the statement conforming to the variable definition grammar; Extracting the name and the corresponding value of the program variable from the statement conforming to the variable assignment grammar; And generating a program variable table according to the extracted name of the program variable, the data type of the program variable and the value corresponding to the program variable.
- 8. The industrial monitoring method of claim 1, further comprising: Determining an affected algorithm program portion in response to a new, modified or deleted operation on the algorithm program file; and according to the determined affected algorithm program part, analyzing and updating the algorithm flow chart corresponding to the affected algorithm program part.
- 9. The industrial monitoring method of claim 1, further comprising: Receiving abnormal information in the industrial project execution process; determining the program variable or the flowchart node corresponding to the abnormal information in the algorithm flowchart; And carrying out exception labeling on the program variable or the flowchart nodes in the algorithm flowchart.
- 10. An industrial monitoring device, the device comprising: The data acquisition module is used for acquiring a data model and an algorithm program of the industrial project, wherein the data model comprises a plurality of monitoring parameters and corresponding variable binding addresses; the flow chart generation module is used for analyzing the algorithm program and generating a corresponding algorithm flow chart, extracting program variables in the algorithm program, wherein the program variables have corresponding variable binding addresses; The variable binding module is used for binding the monitoring parameters in the data model with the program variables in the algorithm program through the variable binding address; the data mapping module is used for acquiring the real-time data of the monitoring parameters in the execution process of the industrial project and mapping the real-time data of the monitoring parameters to the corresponding program variables in the algorithm flow chart; And the execution state marking module is used for acquiring the execution state of the industrial item, determining a target flow chart node corresponding to the execution state in the algorithm flow chart and marking the target flow chart node.
- 11. An electronic device comprising a processor, a memory and a program or instruction stored on the memory and executable on the processor, which program or instruction when executed by the processor implements the steps of the industrial monitoring method as claimed in claims 1-9.
- 12. A readable storage medium, characterized in that it has stored thereon a program or instructions which, when executed by a processor, implement the steps of the industrial monitoring method according to claims 1-9.
Description
Industrial monitoring method, device, electronic equipment and medium Technical Field The present invention relates to the field of industrial production technologies, and in particular, to an industrial monitoring method, an industrial monitoring device, an electronic device, and a readable storage medium. Background There are significant limitations to the monitoring mode of current industrial production control systems. The control program runs in the controller, and its internal execution appears as a "black box" to the monitoring personnel. The monitoring personnel can only rely on static data point tables and flow charts to manually associate and infer discrete data points with the process flow. The method has high requirements on personnel experience, and a large amount of resources are consumed for synchronously maintaining documents when the program is updated, so that project iteration is difficult to adapt. More importantly, the static view can not present dynamic logic and data flow of program execution, so that the abnormality diagnosis efficiency is low, manual experience investigation is seriously relied on, and the root cause is difficult to quickly locate. Disclosure of Invention In view of the foregoing, embodiments of the present invention are directed to providing an industrial monitoring method, apparatus, electronic device, and readable storage medium that overcome, or at least partially solve, the foregoing problems. In a first aspect, an embodiment of the present invention provides an industrial monitoring method, including: acquiring a data model and an algorithm program of an industrial project, wherein the data model comprises a plurality of monitoring parameters and corresponding variable binding addresses; Analyzing the algorithm program and generating a corresponding algorithm flow chart, and extracting program variables in the algorithm program, wherein the program variables have corresponding variable binding addresses; binding the monitoring parameters in the data model with program variables in the algorithm program through the variable binding address; the real-time data of the monitoring parameters are mapped to the corresponding program variables in the algorithm flow chart; And acquiring the execution state of the industrial item, determining a target flow chart node corresponding to the execution state in the algorithm flow chart, and marking. Optionally, said parsing said algorithm program includes: Determining a grammar structure of an industrial programming language used by the algorithm program; Dividing the algorithm program into functional grammar blocks corresponding to different grammar structure types, wherein the grammar structure types comprise a condition judgment structure, a multi-path selection structure, a circulation structure and other program structures. Optionally, the generating a corresponding algorithm flow chart includes: mapping the functional grammar blocks into corresponding flowchart graphic elements according to a flowchart generation rule; connecting the flow chart elements according to the execution logic sequence of the algorithm program to generate a preliminary algorithm flow chart; and optimizing the preliminary algorithm flow chart to obtain the algorithm flow chart. Optionally, the mapping the functional grammar block into a corresponding flowchart primitive according to a flowchart generation rule includes: The conditional parts in the functional grammar blocks corresponding to the conditional judgment structure, the multiplexing structure and the loop structure are mapped to a first type of primitive, and the functional grammar blocks of the rest and the functional grammar blocks of the other program structure types are mapped to a second type of primitive. Optionally, the optimizing the preliminary algorithm flow chart includes: identifying a nested structure in the preliminary algorithm flow chart, wherein the nested structure is that at least one first type of graphic element is nested in a branch of the first type of graphic element; and merging all the flow chart primitives in the nested structure into a single primitive under the condition that the total number of the first type primitives contained in the nested structure exceeds a preset threshold value. Optionally, the optimizing the preliminary algorithm flow chart includes: identifying a continuous primitive sequence in the preliminary algorithm flow chart, wherein the continuous primitive sequence is internally provided with three or more continuous connected primitives of the second type; all primitives of the second type within the sequence of consecutive primitives are merged into a single primitive. Optionally, the extracting the program variable in the algorithm program includes: Performing lexical analysis on the plurality of functional grammar blocks to identify sentences conforming to variable definition grammar and sentences conforming to variable assignment g