Industrial monitoring method and device, electronic equipment and medium

By parsing the algorithm program to generate flowcharts and binding them to data models in the industrial production control system, and mapping monitoring parameters in real time, the problem of relying on human experience in existing technologies is solved, and efficient anomaly diagnosis and production process monitoring are achieved.

CN121995878APending Publication Date: 2026-05-08CHINA THREE GORGES CORPORATION
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610013177.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-01-06
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

The existing monitoring mode of industrial production control system has a "black box" problem, which relies on human experience and makes it difficult to quickly locate the root cause, resulting in low efficiency in anomaly diagnosis.

Method used

By acquiring the data model and algorithm program of industrial projects, the algorithm program is parsed to generate an algorithm flowchart, and monitoring parameters and program variables are bound to the address based on variable binding, data is mapped in real time and execution status is marked.

Benefits of technology

It has improved the level of automation in industrial monitoring, lowered the threshold for operation and maintenance, enabled timely detection and resolution of problems in the production process, and improved production stability and efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121995878A_ABST
    Figure CN121995878A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides an industrial monitoring method and device, electronic equipment and a medium. According to the embodiment of the invention, the data model and the algorithm program of the industrial project are obtained, and the algorithm program is analyzed to generate the algorithm flow chart, so that the monitoring parameters in the data model and the program variables in the algorithm program are accurately bound based on the variable binding address. 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, and the industrial monitoring efficiency is improved. Problems in the production process can be found and solved in time, and finally the stability and efficiency of industrial production are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of industrial production technology, and in particular to an industrial monitoring method, device, electronic equipment, and readable storage medium. Background Technology

[0002] Current monitoring models for industrial production control systems have significant limitations. The control program runs within the controller, and its internal execution process is presented as a "black box" to monitoring personnel. Personnel can only rely on static data point tables and flowcharts to manually correlate and infer discrete data points with the process flow. This approach requires highly experienced personnel and consumes significant resources for maintaining documentation during program updates, making it difficult to adapt to project iterations. More importantly, static views cannot present the dynamic logic and data flow of program execution, resulting in low efficiency in anomaly diagnosis, heavy reliance on manual experience for troubleshooting, and difficulty in quickly locating the root cause. Summary of the Invention

[0003] In view of the above problems, embodiments of the present invention are proposed to provide an industrial monitoring method, apparatus, electronic device and readable storage medium that overcomes or at least partially solves the above problems.

[0004] In a first aspect, embodiments of the present invention provide an industrial monitoring method, the method comprising: Acquire the data model and algorithm program of the industrial project, wherein the data model contains multiple monitoring parameters and corresponding variable binding addresses; The algorithm program is parsed and a corresponding algorithm flowchart is generated. Program variables in the algorithm program are extracted, and each program variable has a corresponding variable binding address. The monitoring parameters in the data model are bound to the program variables in the algorithm program through the variable binding address; Acquire real-time data of the monitoring parameters during the execution of the industrial project; and map the real-time data of the monitoring parameters to the corresponding program variables in the algorithm flowchart; Obtain the execution status of the industrial project, determine and mark the target flowchart node in the algorithm flowchart that corresponds to the execution status.

[0005] Optionally, the algorithm parsing program includes: Determine the syntax structure of the industrial programming language used by the algorithm program; The algorithm program is divided into functional syntax blocks corresponding to different syntax structure types, including conditional judgment structures, multiple-way selection structures, loop structures, and other program structures.

[0006] Optionally, generating the corresponding algorithm flowchart includes: The functional syntax blocks are mapped to corresponding flowchart elements according to the flowchart generation rules; Connect the various flowchart elements according to the execution logic order of the algorithm program to generate a preliminary algorithm flowchart; The preliminary algorithm flowchart is optimized to obtain the final algorithm flowchart.

[0007] Optionally, mapping the functional syntax block to corresponding flowchart primitives according to the flowchart generation rules includes: The conditional portion of the functional syntax block corresponding to the conditional judgment structure, the multiplexing structure, and the loop structure is mapped to a first type of primitive, and the remaining portion of the functional syntax block and the functional syntax blocks of other program structure types are mapped to a second type of primitive.

[0008] Optionally, optimizing the preliminary algorithm flowchart includes: Identify nested structures in the preliminary algorithm flowchart; the nested structure is a branch of the first type of primitive containing at least one first type of primitive. If the total number of the first type of graphic elements contained in the nested structure exceeds a preset threshold, all the flowchart graphic elements in the nested structure will be merged into a single graphic element.

[0009] Optionally, optimizing the preliminary algorithm flowchart includes: Identify continuous primitive sequences in the preliminary algorithm flowchart; the continuous primitive sequence contains three or more consecutive connected primitives of the second type; All second-type primitives within the continuous primitive sequence are merged into a single primitive.

[0010] Optionally, extracting program variables from the algorithm program includes: Lexical analysis is performed on the multiple functional syntax blocks to identify statements in the functional syntax blocks that conform to variable definition syntax and statements that conform to variable assignment syntax. Extract the name and data type of the program variable from the statement that conforms to the variable definition syntax; Extract the name and corresponding value of the program variable from the statement that conforms to the variable assignment syntax; A program variable table is generated based on the extracted program variable names, the data types of the program variables, and the corresponding values ​​of the program variables.

[0011] Optionally, the method further includes: In response to adding, modifying, or deleting operations on the algorithm program file, the affected portion of the algorithm program is determined; Based on the identified affected algorithm program parts, the algorithm flowchart corresponding to the affected algorithm program parts is parsed and updated.

[0012] Optionally, the method further includes: Receive abnormal information during the execution of the industrial project; Determine the program variable or flowchart node in the algorithm flowchart that corresponds to the exception information; Anomalies are marked on the program variables or flowchart nodes in the algorithm flowchart.

[0013] Secondly, embodiments of the present invention provide an industrial monitoring device, the device comprising: The data acquisition module is used to acquire the data model and algorithm program of the industrial project. The data model includes multiple monitoring parameters and corresponding variable binding addresses. The flowchart generation module is used to parse the algorithm program and generate a corresponding algorithm flowchart, and extract program variables from the algorithm program, wherein the program variables have corresponding variable binding addresses; A variable binding module is used to bind monitoring parameters in the data model to program variables in the algorithm program through the variable binding address; The data mapping module is used to acquire real-time data of the monitoring parameters during the execution of the industrial project; and to map the real-time data of the monitoring parameters to the corresponding program variables in the algorithm flowchart; The execution status marking module is used to obtain the execution status of the industrial project, determine the target flowchart node in the algorithm flowchart corresponding to the execution status, and mark it.

[0014] Thirdly, embodiments of the present invention provide an electronic device including a processor, a memory, and a program or instructions stored in the memory and executable on the processor, wherein the program or instructions, when executed by the processor, implement the steps of the industrial monitoring method as described in the first aspect.

[0015] Fourthly, embodiments of the present invention provide a readable storage medium on which a program or instructions are stored, which, when executed by a processor, implement the steps of the industrial monitoring method as described in the first aspect.

[0016] The embodiments of this invention offer the following advantages: By acquiring the data model and algorithm program of an industrial project and parsing the algorithm program to generate an algorithm flowchart, this invention achieves precise binding of monitoring parameters in the data model to program variables in the algorithm program based on variable binding addresses. During the execution of the industrial project, real-time data of the monitoring parameters are dynamically mapped to corresponding program variables in the algorithm flowchart. Furthermore, it can determine and mark the corresponding target flowchart nodes in the algorithm flowchart based on the actual execution status of the industrial project. This lowers the operational and maintenance threshold, improves the automation level of industrial monitoring, and enables timely detection and resolution of problems in the production process, ultimately enhancing the stability and efficiency of industrial production. Attached Figure Description

[0017] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0018] Figure 1 This is a flowchart of the steps of an industrial monitoring method provided in an embodiment of the present invention; Figure 2 This is a flowchart of another industrial monitoring method provided in an embodiment of the present invention; Figure 3 This is a structural block diagram of an industrial monitoring device provided in an embodiment of the present invention. Detailed Implementation

[0019] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0020] The terms "first," "second," etc., used in the specification and claims of this invention are used to distinguish similar objects and are not used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of the invention can be implemented in orders other than those illustrated or described herein. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.

[0021] In modern industrial production and management, with the continuous development of automation and information technology, the demand for real-time monitoring and precise control of production processes is increasing. Traditional industrial monitoring methods mainly rely on manual inspection and fixed threshold alarm systems. This approach is not only inefficient but also fails to meet the requirements of complex and ever-changing industrial environments. Furthermore, due to the lack of effective data processing and analysis tools, traditional methods often fail to detect potential problems in a timely manner, leading to frequent production accidents, increased equipment maintenance costs, and low production efficiency.

[0022] Figure 1 This is a flowchart of the steps of an industrial monitoring method provided in an embodiment of the present invention.

[0023] like Figure 1 As shown, the method may specifically include the following steps: Step 101: Obtain the data model and algorithm program for the industrial project. The data model includes multiple monitoring parameters and corresponding variable binding addresses. In the method of this invention, during the actual industrial project development process, developers can design and write data models and algorithm programs to support the periodic automatic operation of industrial equipment according to specific production needs. The data model can be represented as a point table, which defines key monitoring parameters (such as temperature, pressure, motor status, etc.) that need to be collected or controlled from the industrial site. Each monitoring parameter not only has key attributes such as the corresponding specific equipment component, physical meaning, and normal operating range, but also has a unique variable binding address, which can be used for data interaction with the control system during runtime.

[0024] In this embodiment of the invention, the variable binding address can be a unique addressing identifier in the target controller or real-time database, used to accurately obtain real-time data. Key attributes may include, but are not limited to, the following: Associated device components: The specific physical device or functional unit corresponding to this monitoring parameter.

[0025] Data collection range and period: the effective range of monitoring parameters and the sampling frequency.

[0026] Engineering significance information: Includes supplementary explanations such as units, descriptions, and alarm thresholds for monitoring parameters, to facilitate understanding and configuration.

[0027] At the same time, the algorithm program can be organized and coded according to the functional modules, control scope or equipment hierarchy of the industrial project, in a way that goes from large to small and from whole to part, in order to realize specific logic control, status judgment or process scheduling.

[0028] This led to the acquisition of two key elements that form the basis of industrial monitoring: a data model defining "what to monitor" and "how to acquire it," and an algorithm program defining "how to execute it," providing basic data support for realizing the visualization of industrial monitoring.

[0029] Step 102: Parse the algorithm program and generate the corresponding algorithm flowchart, extract the program variables in the algorithm program, and the program variables have corresponding variable binding addresses; After obtaining the algorithm program, it can be structured and analyzed to identify the control flow, logical branches, loop structures, and functional modules, and a visual algorithm flowchart can be automatically generated. The algorithm flowchart can intuitively show the execution logic and processing order of the algorithm in the form of graphical nodes and connecting edges, which facilitates subsequent state tracking and monitoring.

[0030] Simultaneously, during the analysis process, all program variables used in the algorithm can be further extracted, including input variables, intermediate calculation variables, and output variables. During the development phase, program variables are typically assigned variable binding addresses corresponding to industrial field monitoring parameter data points, used for data exchange with external devices or data models during runtime. This step not only achieves a visual representation of the algorithm logic but also lays the foundation for the association between program variables and monitoring parameters.

[0031] Step 103: Bind the monitoring parameters in the data model to the program variables in the algorithm program through the variable binding address; In the method of this invention embodiment, a one-to-one correspondence between monitoring parameters and program variables can be established based on the acquired data model and extracted program variables, using the variable binding addresses contained in each of them.

[0032] Specifically, each monitoring parameter in the data model is configured with a unique variable binding address, and each program variable in the algorithm program also has a variable binding address corresponding to its actual storage location in the runtime environment. When the variable binding addresses of the two are consistent, the monitoring parameter can be automatically bound to the corresponding program variable, thereby realizing the data association between the data model and the algorithm program.

[0033] Step 104: Obtain real-time data of the monitoring parameters during the execution of the industrial project; and map the real-time data of the monitoring parameters to the corresponding program variables in the algorithm flowchart; During the operation of industrial projects, the current values ​​of various monitoring parameters defined in the data model can be collected in real time by communicating with the control system. Based on the established binding relationships, the real-time data of each monitoring parameter can be automatically mapped to the program variable node corresponding to the variable binding address in the algorithm flowchart, so that the variable values ​​in the algorithm flowchart can dynamically reflect the actual operating status of the industrial site.

[0034] Step 105: Obtain the execution status of the industrial project, determine and mark the target flowchart node in the algorithm flowchart that corresponds to the execution status.

[0035] By monitoring the execution status of industrial projects in real time and collecting status information from industrial control systems, the system can monitor the operation of production lines, the working status of equipment, and whether process parameters meet preset standards.

[0036] Next, the execution status information can be parsed to determine the current stage or state of the project, such as initialization, normal operation, maintenance, or shutdown. Based on the parsed execution status, the corresponding flowchart node can be found in the algorithm flowchart. The algorithm flowchart can contain all possible execution states and their transition conditions. Each node represents a specific operation or decision point. Finally, the target flowchart node corresponding to the current execution state is marked in the algorithm flowchart. In this embodiment of the invention, the marking can be highlighting, color changing, or other forms of visual identification to help operators quickly identify the current state of the project and the next action to be taken.

[0037] This invention acquires the data model and algorithm program of an industrial project, and parses the algorithm program to generate an algorithm flowchart, achieving precise binding of monitoring parameters in the data model to program variables in the algorithm program based on variable binding addresses. During the execution of the industrial project, real-time data of the monitoring parameters are dynamically mapped to corresponding program variables in the algorithm flowchart. Furthermore, it can determine and mark corresponding target flowchart nodes in the algorithm flowchart based on the actual execution status of the industrial project, reducing the operational and maintenance threshold, improving the automation level of industrial monitoring, enabling timely detection and resolution of problems in the production process, and ultimately improving the stability and efficiency of industrial production.

[0038] Figure 2 This is a flowchart of another industrial monitoring method provided in an embodiment of the present invention.

[0039] like Figure 2 As shown, the method may specifically include the following steps: Step 201: Obtain the data model and algorithm program for the industrial project. The data model includes multiple monitoring parameters and corresponding variable binding addresses. In some embodiments, all relevant information required for the industrial project can be collected first, including but not limited to the project's data model and algorithm program. The data model may consist of multiple monitoring parameters, each associated with a specific variable binding address, which identifies the specific location or label in the actual industrial control system. The algorithm program is designed according to the project's functional requirements, scope, or equipment components, organizing the logical control flow in a holistic to partial manner. This step ensures that the basic data and algorithm logic required to achieve subsequent monitoring tasks can be accurately acquired and understood.

[0040] Step 202: Determine the syntax structure of the industrial programming language used by the algorithm program; Algorithm programs are codes written in industrial programming languages. Different industrial programming languages, such as ladder diagrams (LD), function block diagrams (FBD), structured text diagrams (ST), and sequential function charts (SFC) under the IEC 61131-3 standard, or the specific languages ​​of various automation manufacturers, all have their own defined syntax rules.

[0041] In this embodiment of the invention, language recognition can be performed on the algorithm program to clarify its syntactic structure features. This process is a fundamental prerequisite for subsequent parsing of the algorithm program. In some embodiments, the syntactic structure may include basic elements constituting program logic, such as statement composition rules, variable declaration methods, control flow structures (e.g., conditional branches, loops, jumps), function / function block calling formats, and address reference specifications. By clarifying the syntactic structure, necessary language-level support is provided for subsequent accurate parsing of the algorithm program, variable extraction, and flowchart generation.

[0042] Step 203: Divide the algorithm program into functional syntax blocks corresponding to different syntax structure types. The syntax structure types include conditional judgment structure, multiple-way selection structure, loop structure, and other program structures.

[0043] Based on the established syntax structure of the industrial programming language, the algorithm program can be structurally decomposed, identifying and extracting code segments with specific control logic semantics, and dividing them into several functional syntax blocks. Each functional syntax block corresponds to a predefined syntax structure type: Conditional statements are used to represent "if...then..." logic (such as IF-THEN-ELSE). Multi-way selection structures are used to implement multi-branch selection logic (such as CASE or SELECT statements). Loop structures are used to describe logic that is executed repeatedly (such as FOR and WHILE loops). Other program structures may include basic program units that do not have explicit control flow branching or looping characteristics, such as sequential execution statements, assignment operations, and function / function block calls.

[0044] This division organizes the algorithm program into a structured sequence of functional syntax blocks of different types, laying the foundation for the subsequent generation of clear and accurate algorithm flowcharts.

[0045] Step 204: Map the functional syntax blocks to corresponding flowchart elements according to the flowchart generation rules; In this embodiment of the invention, different types of functional syntax blocks can be transformed into graphical representation units, i.e., flowchart primitives, according to predetermined flowchart generation rules. This aims to present the program logic structure intuitively and in a standardized manner, which not only helps to understand the program logic structure but also provides convenience for subsequent program analysis, optimization, and maintenance.

[0046] In some embodiments, step 204 specifically includes the following sub-steps: Sub-step S11: Map the condition portion of the functional syntax block corresponding to the condition judgment structure, the multiplexing structure, and the loop structure to a first type of primitive, and map the remaining portion of the functional syntax block and the functional syntax blocks of other program structure types to a second type of primitive.

[0047] Specifically, based on the type of the functional syntax block and its role in the program logic, it can be mapped to two basic types of primitives to achieve a clear distinction of logical relationships: Type 1 primitives correspond to the conditional judgments or selection control parts in the functional syntax blocks of conditional judgment structures (such as IF), multiplexing structures (such as CASE / SWITCH), and loop structures (such as WHILE, FOR). Type 1 primitives are typically used to represent decision points or branching logic, graphically illustrating the possible path choices during program execution. For example, in a flowchart, a diamond primitive can be used to represent these conditional judgments or selection structures, with the judgment conditions or selection criteria clearly indicated inside.

[0048] The second type of primitive corresponds to the execution body (excluding the conditional part) of the functional syntax blocks for conditional statements, multiplexing, and loop structures mentioned above; for example, the code blocks within the THEN and ELSE branches of an IF statement, and the statement sequence within a loop body; as well as functional syntax blocks of other program structure types. This mainly includes sequential structure blocks, function blocks, or function block call blocks. The second type of primitive includes basic program units that do not possess explicit control flow branching or looping characteristics, such as sequentially executed statements, assignment operations, and function calls. These are mainly used to represent operational steps or processing stages in a program. For example, in a flowchart, rectangular primitives can be used to represent these operational steps or processing stages, with a brief description of their execution content inside.

[0049] This classification and mapping method can effectively transform complex program logic into an intuitive and easy-to-understand flowchart, helping developers better understand and manage the code logic structure.

[0050] Step 205: Connect the various flowchart elements according to the execution logic order of the algorithm program to generate a preliminary algorithm flowchart; In the method of this invention embodiment, based on the control flow data parsed from the original algorithm program (such as branch pointers after condition judgment, entry and exit points of loop structures, and the natural order between statements), all generated flowchart elements are connected according to the inherent execution logic of the program, effectively transforming the algorithm program into an intuitive flowchart form.

[0051] Step 206: Optimize the preliminary algorithm flowchart to obtain the algorithm flowchart.

[0052] In this embodiment of the invention, after generating a preliminary algorithm flowchart, the flowchart may appear too large or complex because it directly maps the original structure of the program (especially complex nesting or lengthy sequential operations), making it difficult for monitoring personnel to quickly understand and focus on the core logic. Therefore, the preliminary flowchart can be intelligently optimized and simplified to improve readability and usability, resulting in a clear and concise algorithm flowchart for final monitoring. In some embodiments, the optimization operation mainly includes merging complex nested structures and lengthy sequential sequences.

[0053] In some embodiments, step 206 specifically includes the following sub-steps: Sub-step S21: Identify nested structures in the preliminary algorithm flowchart; the nested structure is a branch of the first type of graphic element containing at least one first type of graphic element. In some embodiments, control structures with multiple logical nesting levels can be identified by traversing the flowchart. Specifically, the nested structure is defined as: within one or more branches of a first-type graph element (decision / control graph element, such as condition judgment), there is at least one other first-type graph element, forming a logical hierarchical nesting.

[0054] Sub-step S22: If the total number of the first type of graphic elements contained in the nested structure exceeds a preset threshold, all the flowchart graphic elements in the nested structure are merged into a single graphic element.

[0055] To avoid excessively complex nesting that makes flowcharts difficult to identify, a configurable preset threshold can be set, such as a nesting level exceeding 3 levels or the total number of first-type elements within a nested block exceeding 5. The specific threshold can be set according to actual production needs, and this invention does not impose any limitations on it. When the total number of first-type elements within a nested structure exceeds this threshold, all flowchart elements (including first and second types) within that nested structure can be collapsed and replaced in their original positions with a new, merged single element. In some embodiments, this merged element can also be clicked or expanded to view its internal detailed logic, thus maintaining overall simplicity without losing detail.

[0056] In some embodiments, step 206 further includes the following sub-steps: Sub-step S31: Identify a continuous sequence of primitives in the preliminary algorithm flowchart; the continuous sequence of primitives contains three or more consecutively connected primitives of the second type; In some embodiments, a continuous sequence of primitives consisting of multiple sequentially executed processing units can also be identified simultaneously. The continuous sequence of primitives is defined as: a flowchart containing three or more directly sequentially connected second-type primitives (processing / execution primitives), typically corresponding to a relatively long, purely sequentially executed code block.

[0057] Sub-step S32: Merge all second-type primitives within the continuous primitive sequence into a single primitive.

[0058] To improve readability and focus on key control nodes, all second-type primitives within each identified consecutive sequence of primitives that meet the criteria can be merged into a new single primitive. In some embodiments, this merged primitive may also be labeled with a general description, such as a data preprocessing step, output sequence, or custom module name, to represent the overall function of this series of sequential operations, thereby significantly simplifying the flowchart and highlighting the control skeleton of the program.

[0059] Step 207: Extract the program variables from the algorithm program, where each program variable has a corresponding variable binding address; In the method of this invention, while parsing the algorithm program structure, data entities defined and used in the program, namely program variables, can be extracted, providing a foundation for subsequent binding with the data model. Program variables are identifiers used within the algorithm program to store, calculate, and transmit data; each variable has a logical name in the program.

[0060] In some embodiments, step 207 specifically includes the following sub-steps: Sub-step S41: Perform lexical analysis on the multiple functional syntax blocks to identify statements in the functional syntax blocks that conform to variable definition syntax and statements that conform to variable assignment syntax. First, lexical analysis can be performed on each divided functional syntax block to break down the source code into keywords, variable names, operators, etc. Then, according to the syntax rules of the programming language, variable definition statements used to define variables and variable assignment statements used to assign values ​​to variables can be identified.

[0061] Sub-step S42: Extract the name and data type of the program variable from the statement that conforms to the variable definition syntax; After identifying the variable definition statement, you can extract the variable name and its declared data type. For example, in Java, "int x;" means that an integer variable named x is defined.

[0062] Sub-step S43: Extract the name and corresponding value of the program variable from the statement that conforms to the variable assignment syntax; Next, you can process the statements used to assign values ​​to variables and extract the variable names and the assigned values. For example, "x = 10;" means that the integer 10 is assigned to the variable x.

[0063] Sub-step S44: Generate a program variable table based on the extracted program variable names, the data types of the program variables, and the corresponding values ​​of the program variables.

[0064] In some embodiments, the collected information (variable names, data types, values) can be integrated to form a clear and ordered program variable table. This table may contain information such as: variable name, type, initial value, current value, scope, etc. The program variable table can serve as a basis for further analysis, helping developers better understand the behavior and structure of the program.

[0065] Step 208: Bind the monitoring parameters in the data model to the program variables in the algorithm program through the variable binding address; In this embodiment of the invention, a correspondence between monitoring parameters and program variables can be established based on the acquired data model and the extracted program variable table, utilizing the variable binding addresses contained in each. Specifically, each monitoring parameter in the data model is associated with a unique variable binding address, used to identify its physical or logical location in the industrial control system; and each program variable in the program variable table also records its corresponding variable binding address in the algorithm program. When the variable binding address of a monitoring parameter matches the variable binding address of a program variable, the monitoring parameter can be bound to the program variable, thereby enabling data communication between the data model and the algorithm logic during runtime.

[0066] Step 209: Obtain real-time data of the monitoring parameters during the execution of the industrial project; and map the real-time data of the monitoring parameters to the corresponding program variables in the algorithm flowchart; In this embodiment of the invention, real-time data generated during the actual operation of an industrial project can be read periodically or in an event-driven manner from the target controller, sensor, or real-time database based on the variable binding address defined for each monitoring parameter in the data model through the data acquisition interface.

[0067] Based on the established binding relationship, the real-time data of each acquired monitoring parameter can be associated and assigned to the corresponding program variables in the algorithm flowchart. In the graphical interface of the algorithm flowchart, the mapped real-time data can be visualized intuitively, allowing monitoring personnel to see it directly on the flowchart. For example, the current value and status changes of the program variable can be dynamically displayed next to the corresponding flowchart element, or the data range can be indicated by color highlighting.

[0068] Step 210: Obtain the execution status of the industrial project, determine and mark the target flowchart node in the algorithm flowchart that corresponds to the execution status.

[0069] In this embodiment of the invention, the current execution status of an industrial project can be obtained in real time from the industrial control system. The execution status can include various states such as running, paused, stopped, and alarm. Based on predefined rules or mapping tables, the obtained execution status is converted into corresponding nodes in the algorithm flowchart. On the algorithm flowchart interface, the identified target flowchart nodes can be visually marked to highlight them. Marking methods may include: highlighting the node (e.g., changing the border or fill color), flashing, adding a status icon, or dynamically annotating the status description next to the node, etc., which are not limited in this invention. In some embodiments, input / output variable data that are logically closely related to the node can also be linked and emphasized.

[0070] In some embodiments, the method further includes: In response to adding, modifying, or deleting operations on the algorithm program file, the affected portion of the algorithm program is determined; Based on the identified affected algorithm program parts, the algorithm flowchart corresponding to the affected algorithm program parts is parsed and updated.

[0071] In some embodiments, changes to algorithm program files (source code) can also be monitored, including file additions, content modifications, or deletions. When a change is detected, the affected portion of the algorithm program is identified through code differential analysis or dependency analysis.

[0072] For the identified affected parts, the steps described above—dividing functional syntax blocks, mapping to flowchart elements, connecting elements according to logical order, and optimizing the generation of new algorithm flowchart image segments—can be re-executed. The newly generated algorithm flowchart image segments then replace the corresponding original parts, or, in the case of additions, new elements and connections can be added. For deletions, the relevant elements and connections can be removed from the existing flowchart.

[0073] In some embodiments, users may also be notified that the algorithm flowchart has been updated, so that users can view the latest chart in a timely manner and make corresponding adjustments or decisions based on the changes.

[0074] This mechanism ensures that any modifications developers make to the program logic are reflected in the visual flowcharts used by monitoring personnel in real time and accurately, eliminating the heavy workload of manually maintaining flowchart documents and guaranteeing the real-time performance and consistency of the monitoring view.

[0075] In some embodiments, the method further includes: Receive abnormal information during the execution of the industrial project; Determine the program variable or flowchart node in the algorithm flowchart that corresponds to the exception information; Anomalies are marked on the program variables or flowchart nodes in the algorithm flowchart.

[0076] In some embodiments, abnormal information from the control system, sensors, or monitoring platform can also be received in real time via an interface. The abnormal information may include the abnormal type (such as over-limit alarm, equipment failure, communication interruption, etc.), the abnormal source identifier (such as specific monitoring point, device ID), the trigger time, and related data.

[0077] Based on the anomaly information and established binding relationships or state mapping rules, the program variables directly associated with them in the algorithm flowchart can be identified. Furthermore, flowchart nodes that directly use these program variables for judgment, calculation, or output can be located. Thus, the located program variables and / or flowchart nodes can be annotated on the algorithm flowchart interface.

[0078] This mechanism allows monitoring personnel to automatically and accurately locate alarm points and highlight them in the context of the algorithm flowchart when an anomaly occurs on-site, eliminating the need for repeated comparisons between scattered alarm lists and static flowcharts. This provides a clear visual representation of "which logical step went wrong" and "which key data is involved in the problem."

[0079] This invention acquires the data model and algorithm program of an industrial project, and parses the algorithm program to generate an algorithm flowchart, achieving precise binding of monitoring parameters in the data model to program variables in the algorithm program based on variable binding addresses. During the execution of the industrial project, real-time data of the monitoring parameters are dynamically mapped to corresponding program variables in the algorithm flowchart. Furthermore, it can determine and mark corresponding target flowchart nodes in the algorithm flowchart based on the actual execution status of the industrial project, reducing the operational and maintenance threshold, improving the automation level of industrial monitoring, enabling timely detection and resolution of problems in the production process, and ultimately improving the stability and efficiency of industrial production.

[0080] It should be noted that, for the sake of simplicity, the method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments of the present invention are not limited to the described order of actions, because according to the embodiments of the present invention, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions involved are not necessarily essential to the embodiments of the present invention.

[0081] It should be noted that the industrial monitoring method provided in this embodiment of the invention can be executed by an industrial monitoring device, or by a control module within the industrial monitoring device for executing the loading of the industrial monitoring method. This embodiment of the invention uses the execution of the loading of the industrial monitoring method by an industrial monitoring device as an example to illustrate the industrial monitoring method provided in this embodiment of the invention.

[0082] Figure 3 This is a structural block diagram of an industrial monitoring device provided in an embodiment of the present invention.

[0083] like Figure 3 As shown in the figure, an industrial monitoring device provided in this embodiment of the invention may specifically include the following modules: Data acquisition module 301 is used to acquire the data model and algorithm program of industrial projects. The data model includes multiple monitoring parameters and corresponding variable binding addresses. Flowchart generation module 302 is used to parse the algorithm program and generate a corresponding algorithm flowchart, extract program variables in the algorithm program, and the program variables have corresponding variable binding addresses; The variable binding module 303 is used to bind the monitoring parameters in the data model to the program variables in the algorithm program through the variable binding address; The data mapping module 304 is used to acquire real-time data of the monitoring parameters during the execution of the industrial project; and to map the real-time data of the monitoring parameters to the corresponding program variables in the algorithm flowchart; The execution status marking module 305 is used to obtain the execution status of the industrial project, determine the target flowchart node in the algorithm flowchart corresponding to the execution status, and mark it.

[0084] This invention acquires the data model and algorithm program of an industrial project, and parses the algorithm program to generate an algorithm flowchart, achieving precise binding of monitoring parameters in the data model to program variables in the algorithm program based on variable binding addresses. During the execution of the industrial project, real-time data of the monitoring parameters are dynamically mapped to corresponding program variables in the algorithm flowchart. Furthermore, it can determine and mark corresponding target flowchart nodes in the algorithm flowchart based on the actual execution status of the industrial project, reducing the operational and maintenance threshold, improving the automation level of industrial monitoring, enabling timely detection and resolution of problems in the production process, and ultimately improving the stability and efficiency of industrial production.

[0085] As the apparatus embodiment is basically similar to the method embodiment, it is described in a relatively simple manner. For relevant details, please refer to the description of the method embodiment.

[0086] This invention also provides an electronic device, including a processor, a memory, and a program or instructions stored in the memory and executable on the processor. When the program or instructions are executed by the processor, they implement the various processes of the above-described industrial monitoring method embodiments and achieve the same technical effects. To avoid repetition, they will not be described again here.

[0087] It should be noted that the electronic devices in the embodiments of the present invention include the mobile electronic devices and non-mobile electronic devices described above.

[0088] This invention also provides a readable storage medium storing a program or instructions. When the program or instructions are executed by a processor, they implement the various processes of the above-described industrial monitoring method embodiments and achieve the same technical effects. To avoid repetition, they will not be described again here.

[0089] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.

[0090] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.

[0091] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, apparatus, or computer program products. Therefore, embodiments of the present invention can take the form of entirely hardware embodiments, entirely software embodiments, or embodiments combining software and hardware aspects. Furthermore, embodiments of the present invention can take the form of computer program products implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0092] Embodiments of the present invention are described with reference to flowchart illustrations and / or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, as well as combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0093] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing terminal device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0094] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal equipment, causing a series of operational steps to be performed on the computer or other programmable terminal equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable terminal equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0095] Although preferred embodiments of the present invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the embodiments of the present invention.

[0096] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes said element.

[0097] The above provides a detailed description of the industrial monitoring method, device, electronic equipment, and readable storage medium provided by the present invention. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. An industrial monitoring method, characterized in that, The method includes: Acquire the data model and algorithm program of the industrial project, wherein the data model contains multiple monitoring parameters and corresponding variable binding addresses; The algorithm program is parsed and a corresponding algorithm flowchart is generated. Program variables in the algorithm program are extracted, and each program variable has a corresponding variable binding address. The monitoring parameters in the data model are bound to the program variables in the algorithm program through the variable binding address; Acquire real-time data of the monitoring parameters during the execution of the industrial project; and map the real-time data of the monitoring parameters to the corresponding program variables in the algorithm flowchart; Obtain the execution status of the industrial project, determine and mark the target flowchart node in the algorithm flowchart that corresponds to the execution status.

2. The industrial monitoring method according to claim 1, characterized in that, The algorithm parsing program includes: Determine the syntax structure of the industrial programming language used by the algorithm program; The algorithm program is divided into functional syntax blocks corresponding to different syntax structure types, including conditional judgment structures, multiple-way selection structures, loop structures, and other program structures.

3. The industrial monitoring method according to claim 2, characterized in that, The generation of the corresponding algorithm flowchart includes: The functional syntax blocks are mapped to corresponding flowchart elements according to the flowchart generation rules; Connect the various flowchart elements according to the execution logic order of the algorithm program to generate a preliminary algorithm flowchart; The preliminary algorithm flowchart is optimized to obtain the final algorithm flowchart.

4. The industrial monitoring method according to claim 2, characterized in that, The step of mapping the functional syntax blocks to corresponding flowchart primitives according to the flowchart generation rules includes: The conditional portion of the functional syntax block corresponding to the conditional judgment structure, the multiplexing structure, and the loop structure is mapped to a first type of primitive, and the remaining portion of the functional syntax block and the functional syntax blocks of other program structure types are mapped to a second type of primitive.

5. The industrial monitoring method according to claim 3, characterized in that, The optimization of the preliminary algorithm flowchart includes: Identify nested structures in the preliminary algorithm flowchart; the nested structure is a branch of the first type of primitive containing at least one first type of primitive. If the total number of the first type of graphic elements contained in the nested structure exceeds a preset threshold, all the flowchart graphic elements in the nested structure will be merged into a single graphic element.

6. The industrial monitoring method according to claim 3, characterized in that, The optimization of the preliminary algorithm flowchart includes: Identify continuous primitive sequences in the preliminary algorithm flowchart; the continuous primitive sequence contains three or more consecutive connected primitives of the second type; All second-type primitives within the continuous primitive sequence are merged into a single primitive.

7. The industrial monitoring method according to claim 2, characterized in that, The extraction of program variables from the algorithm program includes: Lexical analysis is performed on the multiple functional syntax blocks to identify statements in the functional syntax blocks that conform to variable definition syntax and statements that conform to variable assignment syntax. Extract the name and data type of the program variable from the statement that conforms to the variable definition syntax; Extract the name and corresponding value of the program variable from the statement that conforms to the variable assignment syntax; A program variable table is generated based on the extracted program variable names, the data types of the program variables, and the corresponding values ​​of the program variables.

8. The industrial monitoring method according to claim 1, characterized in that, The method further includes: In response to adding, modifying, or deleting operations on the algorithm program file, the affected portion of the algorithm program is determined; Based on the identified affected algorithm program parts, the algorithm flowchart corresponding to the affected algorithm program parts is parsed and updated.

9. The industrial monitoring method according to claim 1, characterized in that, The method further includes: Receive abnormal information during the execution of the industrial project; Determine the program variable or flowchart node in the algorithm flowchart that corresponds to the exception information; Anomalies are marked on the program variables or flowchart nodes in the algorithm flowchart.

10. An industrial monitoring device, characterized in that, The device includes: The data acquisition module is used to acquire the data model and algorithm program of the industrial project. The data model includes multiple monitoring parameters and corresponding variable binding addresses. The flowchart generation module is used to parse the algorithm program and generate a corresponding algorithm flowchart, and extract program variables from the algorithm program, wherein the program variables have corresponding variable binding addresses; A variable binding module is used to bind monitoring parameters in the data model to program variables in the algorithm program through the variable binding address; The data mapping module is used to acquire real-time data of the monitoring parameters during the execution of the industrial project; and to map the real-time data of the monitoring parameters to the corresponding program variables in the algorithm flowchart; The execution status marking module is used to obtain the execution status of the industrial project, determine the target flowchart node in the algorithm flowchart corresponding to the execution status, and mark it.

11. An electronic device, characterized in that, It includes a processor, a memory, and a program or instructions stored in the memory and executable on the processor, wherein the program or instructions, when executed by the processor, implement the steps of the industrial monitoring method as described in claims 1-9.

12. A readable storage medium, characterized in that, The readable storage medium stores a program or instructions that, when executed by a processor, implement the steps of the industrial monitoring method as described in claims 1-9.