Monitoring method of dynamic data acquisition and monitoring system
Through the monitoring method of the dynamic data acquisition and monitoring system, variable values are parsed and monitored, and expression calculations are performed, which solves the problem of insufficient flexibility in the existing technology, enables flexible addition of variables and calculation rules, and improves the customizability of the system. and flexibility.
Patent Information
- Application Number
- CN202410370867.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-29
- Publication Date
- 2024-08-23
AI Technical Summary
When faced with complex production environments, existing data collection systems and monitoring systems have difficulty in flexibly adding variables and calculation rules, and the trigger conditions of monitoring screens cannot be dynamically adjusted, resulting in a lack of flexibility and customizability.
Through the interactive terminal, input expressions or response action configurations, parse and monitor changes in variable values, perform expression calculations, judge and trigger actions, check legality with the built-in retrieval library, and use abstract syntax tree parsing and recursive descent to process code to achieve dynamic Data collection and monitoring.
It improves the flexibility and customizability of the data collection and monitoring system, allows variables and calculation rules to be adjusted according to actual needs, avoids the need to downtime and modify the source code, and meets different computing needs.
Smart Images

Figure CN118535622A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of automation systems, and in particular to a monitoring method for a dynamic data acquisition and monitoring system. Background Art
[0002] With the widespread application of industrial automation control systems, the degree of industrial automation is getting higher and higher. The purpose of data acquisition systems and monitoring systems is to obtain real-time production process information, equipment status and measurement data of various sensors. It can be seen that data acquisition systems and monitoring systems are key links in automation control systems. In order to better realize automation functions, how to perform data acquisition and monitoring as perfectly as possible has become a top priority.
[0003] The existing data acquisition systems and monitoring systems have the following problems: the objects of the existing data acquisition systems and monitoring systems are relatively limited. The existing data acquisition systems usually collect data by pre-defining variables and pre-setting calculation formulas, but the actual production environment is complex and changeable. This pre-setting method is difficult to adapt to the actual production environment. If the pre-setting method is to be adopted, the producer is required to understand all possible variables and calculation rules involved in advance during the configuration process. This is not only a huge workload, but also easy to miss certain variables and calculation rules, and will also cause the data acquisition system to lack sufficient flexibility; the starting conditions of the monitoring screen of the existing monitoring system are also pre-set and relatively fixed, but in the actual production environment, the producer may need to dynamically adjust the trigger conditions of the monitoring screen according to different needs, such as adjusting the trigger conditions of the monitoring screen according to environmental changes, equipment status or production needs. This pre-setting method in the existing monitoring system cannot meet the needs of producers. Summary of the invention
[0004] Purpose of the invention: The purpose of the present invention is to provide a monitoring method for a data acquisition and monitoring system that can flexibly add variables and calculation rules and freely adjust monitoring trigger conditions.
[0005] Technical solution: The monitoring method of a dynamic data acquisition and monitoring system described in the present invention comprises the following steps: Step 1: Input an expression or response action configuration through the interactive terminal, check the input expression or response action configuration, and proceed to step 2 if the check passes, otherwise terminate; Step 2: Parse the input expression and get the properties of all codes or symbols. If there are variables in the code, go to step 3; if there are no variables in the code, go to step 4. Step 3: Monitor whether the value of the variable changes; if the variable changes, refresh the variable; Step 4: Execute the calculation of the expression to complete the evaluation of the expression; Step 5: Based on the response action configuration input in the first step and the evaluation of the expression in the fourth step, determine whether the action input in the first step is triggered, and if triggered, complete the action.
[0006] Furthermore, in the first step, the interactive terminal has a built-in search library, in which the codes and symbols allowed for use are set, and checks are made to see whether the codes and symbols included in the input expression or response action configuration are included in the search library.
[0007] Furthermore, the codes and symbols include but are not limited to information such as characters, character strings, operators, numbers, constants and variables.
[0008] Furthermore, the sub-steps in the second step are as follows: A. Lexical rules that define codes or symbols; B. Read the input expression and identify each code or symbol according to the defined rules; C. Group the same codes or symbols together. The same codes or symbols grouped together are called nodes. Arrange all the nodes in order. D. construct an initially empty abstract syntax tree and fill all nodes into the abstract syntax tree; E. Formulate attribute analysis rules; F. Traverse the abstract syntax tree and parse and obtain the attributes of all nodes (ie, all codes or symbols) according to the attribute analysis rules.
[0009] Furthermore, all the nodes described in step C are arranged in a reverse Polish notation.
[0010] Furthermore, the attribute analysis rules described in step E are set in extended Backus-Naur form (EBNF).
[0011] Furthermore, the abstract syntax tree in step F is parsed in a recursive descent manner.
[0012] Furthermore, in the third step, the method for monitoring whether the value of the variable changes is to register an event corresponding to the variable, and when the value of the input device (such as a sensor) or output device that detects the variable changes, the event is triggered and the variable is refreshed. Compared with continuously and actively detecting variables through input devices or output devices, the advantage of this method is that it saves computing power.
[0013] Furthermore, the evaluation of the expression in the fourth step is obtained by traversing the abstract syntax tree.
[0014] Furthermore, the sub-steps of step 5 are as follows: Step I: Refresh the variables in the expression; Step II: According to the response action configuration, determine the conditions that meet the response action; Step III: Compare whether the variables in the expression after refreshing meet the conditions for the response action. If not, terminate. If so, proceed to step IV. Step IV: Determine the action type based on the response action configuration and complete the action.
[0015] Beneficial effects: Compared with the prior art, the present invention has the following significant advantages: the present invention can meet the needs of producers to flexibly add variables and calculation rules according to actual needs, freely adjust monitoring trigger conditions, improve the flexibility and customizability of data acquisition and monitoring systems, overcome the shortcomings of the prior art that the modification of pre-defined variables or calculation formulas requires shutdown or modification of source code, and meet different calculation needs. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 It is a flow chart of the present invention.
[0017] Figure 2 It is the input interface of the expression in the present invention.
[0018] Figure 3 An input interface configured for a response action in the present invention. DETAILED DESCRIPTION
[0019] The technical solution of the present invention is further described below in conjunction with the accompanying drawings.
[0020] See attached Figure 1 to Figure 3 The monitoring method of a dynamic data acquisition and monitoring system shown in the present invention comprises the following steps: Step 1: Enter an expression or response action configuration through the interactive terminal. The interactive terminal has a built-in search library. The search library contains the codes and symbols that can be used (codes and symbols include but are not limited to characters, strings, operators, numbers, constants, variables, etc.). Check whether the codes and symbols contained in the entered expression or response action configuration are included in the search library. If the check is passed, proceed to step 2. If the check is not passed, terminate. Step 2: A. Lexical rules that define codes or symbols; B. Read the input expression and identify each code or symbol according to the defined rules; C. Group the same codes or symbols together. The same codes or symbols grouped together are called nodes. Arrange all nodes in a reverse Polish structure. D. Build an initially empty abstract syntax tree and fill all nodes into the abstract syntax tree; E. Formulate attribute analysis rules to extend the Backus-Naur form setting; F. Traverse the abstract syntax tree and parse the attributes of all nodes (i.e. all codes or symbols) in a recursive descent manner according to the attribute analysis rules; G. If there is a variable in the code, go to step 3; if there is no variable in the code, go to step 4; Step 3: Register an event corresponding to the variable. When the value of the input device (such as a sensor) or output device that detects the variable changes, the event is triggered and the variable is refreshed. Step 4: Execute the expression calculation and complete the expression evaluation by traversing the abstract syntax tree; Step 5: Step I: Refresh the variables in the expression; Step II: According to the response action configuration, determine the conditions that meet the response action; Step III: Compare whether the variables in the expression after refreshing meet the conditions for the response action. If not, terminate. If so, proceed to step IV. Step IV: Determine the action type based on the response action configuration and complete the action.
Claims
1. A monitoring method for a dynamic data acquisition and monitoring system, the steps are as follows: Step 1: Input an expression or response action configuration through the interactive terminal, check the input expression or response action configuration, and proceed to step 2 if the check passes, otherwise terminate; Step 2: Parse the input expression and get the properties of all codes or symbols. If there are variables in the code, go to step 3; if there are no variables in the code, go to step 4. Step 3: Monitor whether the value of the variable changes; If the variable changes, refresh the variable; Step 4: Execute the calculation of the expression to complete the evaluation of the expression; Step 5: Based on the response action configuration input in the first step and the evaluation of the expression in the fourth step, determine whether the action input in the first step is triggered, and if triggered, complete the action.
2. The monitoring method of a dynamic data acquisition and monitoring system according to claim 1, characterized in that: In the first step, the interactive terminal has a built-in search library, in which the codes and symbols allowed for use are set, and checks are made to see whether the codes and symbols included in the input expression or response action configuration are included in the search library.
3. The monitoring method of a dynamic data acquisition and monitoring system according to claim 1, characterized in that: The codes and symbols include characters, character strings, operators, numbers, constants and variables.
4. The monitoring method of a dynamic data acquisition and monitoring system according to claim 1, characterized in that: The sub-steps in the second step are as follows: A. Lexical rules that define codes or symbols; B. Read the input expression and identify each code or symbol according to the defined rules; C. Group the same codes or symbols together. The same codes or symbols grouped together are called nodes. Arrange all the nodes in order. D. construct an initially empty abstract syntax tree and fill all nodes into the abstract syntax tree; E. Formulate attribute analysis rules; F. Traverse the abstract syntax tree and parse and obtain the attributes of all nodes according to the attribute analysis rules.
5. The monitoring method of a dynamic data acquisition and monitoring system according to claim 4, characterized in that: All nodes described in step C are arranged in a reverse Polish structure.
6. The monitoring method of a dynamic data acquisition and monitoring system according to claim 4, characterized in that: The attribute analysis rules described in step E are used to extend the Backus-Naur form setting.
7. The monitoring method of a dynamic data acquisition and monitoring system according to claim 4, characterized in that: The abstract syntax tree described in step F is parsed in a recursive descent manner.
8. The monitoring method of a dynamic data acquisition and monitoring system according to claim 1, characterized in that: In the third step, the method of monitoring whether the value of the variable changes is to register an event corresponding to the variable, and when the value of the input device or output device detecting the variable changes, the event is triggered and the variable is refreshed.
9. The monitoring method of a dynamic data acquisition and monitoring system according to claim 4, characterized in that: The evaluation of the expression in the fourth step is obtained by traversing the abstract syntax tree.
10. The monitoring method of a dynamic data acquisition and monitoring system according to claim 1, characterized in that: The sub-steps of step 5 are as follows: Step I: Refresh the variables in the expression; Step II: According to the response action configuration, determine the conditions that meet the response action; Step III: Compare whether the variables in the expression after refreshing meet the conditions for the response action. If not, terminate. If so, proceed to step IV. Step IV: Determine the action type based on the response action configuration and complete the action.
