Process control method and system based on event driving
The event-driven process control method solves the problem of poor flexibility of traditional systems in dynamic environments, achieves efficient response and multi-system linkage, improves system flexibility and real-time performance, and is suitable for process control in complex asynchronous environments.
Patent Information
- Application Number
- CN202410706342.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-03
- Publication Date
- 2024-10-11
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Traditional data-driven process control systems have poor flexibility in dynamic, asynchronous, and distributed environments and cannot meet the needs of complex event response and multi-system linkage.
Adopt an event-driven process control method to realize real-time monitoring and response of event sources through event monitoring, processing, process control and action execution modules, supporting flexible configuration and efficient response.
It improves the flexibility, real-time and compatibility of the system, is suitable for process control in complex asynchronous environments, and improves business response speed and overall system performance.
Smart Images

Figure CN118760424A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of process control, and in particular relates to an event-driven process control method and system. Background Art
[0002] With the development of information technology, especially the popularization of IoT devices and smart devices, the demand for real-time data processing, complex event response, and automated multi-system linkage control is growing. Intelligent multi-system linkage can realize data interaction between multiple devices and heterogeneous systems. Driven by data, in the industrial field, with the goal of optimizing production efficiency, it can automatically adjust the operation mode of the equipment according to the equipment's own status and changes in the surrounding environment, and realize self-management and self-evolution of equipment production.
[0003] In the actual production process, traditional data-driven process control systems usually adopt fixed logic and rules. When new equipment or processes are added, a rule base needs to be specially configured for the equipment or process. Therefore, the flexibility is poor and it cannot meet the process control requirements in dynamic, asynchronous and distributed environments.
[0004] Event-driven process control methods have become an effective way to solve such problems because of their flexible configuration and efficient response to various events. Therefore, developing an event-driven process control method and system based on data-driven has important practical significance and application value. Summary of the invention
[0005] In order to solve the above technical problems, the present invention proposes an event-driven process control method and system to solve the above problems in the prior art.
[0006] To achieve the above object, the present invention provides an event-driven process control method, comprising:
[0007] Get event sources based on event listening module;
[0008] The event source is converted and analyzed by an event processing module to generate an analysis result, and a trigger signal is generated based on the analysis result;
[0009] Importing the trigger signal into the process control module to generate corresponding operations;
[0010] Import the corresponding operations into the action execution module to complete the real-time response control of the event;
[0011] Real-time monitoring of event-driven processes is performed through the monitoring and management module.
[0012] Preferably, the process of acquiring the event source based on the event monitoring module includes: acquiring the event source through the event source monitoring function, monitoring strategy and event capture formula of the event monitoring module.
[0013] Preferably, the event source monitoring function includes but is not limited to monitoring sensors, user inputs and network signals;
[0014] The monitoring strategy includes a polling strategy, an interruption strategy and an event filtering strategy;
[0015] The expression of the event capture formula is:
[0016] E={e i ∣f(e i )};
[0017] Among them, E is the set of monitored events, e i is a single event, f(e i ) is a filter function that returns a Boolean value to determine whether the event is captured.
[0018] Preferably, the event source is converted and analyzed by an event processing module to generate an analysis result, and the process of generating a trigger signal based on the analysis result includes:
[0019] Filter the event source through a time processing module to obtain a filtered event stream;
[0020] Converting the filtered event stream into a different form to obtain a converted event stream;
[0021] Allocating the converted event flows to different process paths to obtain event flows on different paths;
[0022] Merging multiple event streams of the event streams on the different paths into one event stream to obtain a merged event stream;
[0023] The combined event stream is judged according to preset rules and conditions to obtain analysis results;
[0024] A trigger signal is generated based on the analysis result.
[0025] Preferably, the expression for obtaining the filtered event stream is:
[0026] E filtered (t) = {x∈E i (t)|f(x)};
[0027] The expression for obtaining the event stream after conversion is:
[0028] E converted (t)={g(x)|x∈Efiltered(t)};
[0029] The expressions for obtaining event flows on different paths are:
[0030] E path 1(t)={x∈E converted (t)|h(x)=1};
[0031] E path 2(t)={x∈E converted (t)|h(x)=2};
[0032] The expression for obtaining the merged event stream is:
[0033] E combined (t) = {c(x, y) | x∈E path 1(t), y∈E path 2(t)}.
[0034] Preferably, the process of importing the trigger signal into the process control module and generating the corresponding operation includes: analyzing the trigger signal through the process rules and process decision formulas in the process control module to trigger the corresponding operation;
[0035] The expression of the process decision formula is:
[0036] P = {p i |h(p i , E converted )};
[0037] Among them, P is the process path set, p i For a single path, h(p i , E converted ) is the process decision function.
[0038] Preferably, the corresponding operation is performed through the action type, execution strategy and action execution formula in the action execution module;
[0039] The real-time response control of the event includes but is not limited to updating database records, sending notifications, controlling device status, data processing, and calling third-party APIs.
[0040] Preferably, the expression of the action execution formula is:
[0041] A = {a∈P|j(a)};
[0042] Among them, A is an action set, a is a single action, and j(a) is the action execution function.
[0043] To achieve the above object, the present invention also provides an event-driven process control system, comprising:
[0044] Event monitoring module, used to obtain event sources;
[0045] An event processing module, used to convert and analyze the event source, generate an analysis result, and generate a trigger signal based on the analysis result;
[0046] A process control module, used for generating corresponding operations based on the trigger signal;
[0047] An action execution module, used to complete real-time response control of events based on the corresponding operations;
[0048] The monitoring and management module is used to monitor event-driven processes in real time.
[0049] Compared with the prior art, the present invention has the following advantages and technical effects:
[0050] (1) High flexibility: Through the drag-and-drop programming of the intelligent linkage platform, users can quickly build, adjust and optimize event-driven processes without in-depth code, which greatly improves development efficiency and system flexibility; (2) Strong real-time performance: Based on the event-driven architecture, the system can respond to various events instantly to ensure the efficient execution of business processes, which is especially suitable for IoT application scenarios with high real-time requirements; (3) Wide compatibility: The present invention supports a variety of input and output nodes, and is easy to connect to various hardware devices, software systems and service interfaces to achieve cross-platform and cross-system event linkage; (4) Easy to maintain and expand: The visualized workflow is easy to understand and manage, making troubleshooting, performance optimization, function upgrades and other tasks more convenient, and can smoothly expand the complexity of the process as the business develops. The event-driven process control system provided by the present invention effectively solves the problem of process control in a complex asynchronous environment, improves the business response speed and the overall system efficiency, and has significant technical innovation and practical value. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] The drawings constituting a part of the present application are used to provide a further understanding of the present application. The illustrative embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0052] Figure 1 A business process diagram in the process development process of an embodiment of the present invention;
[0053] Figure 2 This is an event-driven data flow diagram of an embodiment of the present invention. DETAILED DESCRIPTION
[0054] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0055] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0056] Embodiment 1
[0057] like Figure 1 As shown, this embodiment provides an event-driven process control method, including:
[0058] Get event sources based on event listening module;
[0059] The event source is converted and analyzed by an event processing module to generate an analysis result, and a trigger signal is generated based on the analysis result;
[0060] Importing the trigger signal into the process control module to generate corresponding operations;
[0061] Import the corresponding operations into the action execution module to complete the real-time response control of the event;
[0062] Real-time monitoring of event-driven processes is performed through the monitoring and management module.
[0063] According to a further optimization scheme, the process of acquiring the event source based on the event monitoring module includes: acquiring the event source through the event source monitoring function, monitoring strategy and event capture formula of the event monitoring module.
[0064] Further optimizing the solution, the event source monitoring function includes but is not limited to monitoring sensors, user input and network signals;
[0065] The monitoring strategy includes a polling strategy, an interruption strategy and an event filtering strategy;
[0066] The expression of the event capture formula is:
[0067] E={e i ∣f(e i )};
[0068] Among them, E is the set of monitored events, e i is a single event, f(e i ) is a filter function that returns a Boolean value to determine whether the event is captured.
[0069] To further optimize the solution, the event source is transformed and analyzed by an event processing module to generate an analysis result. The process of generating a trigger signal based on the analysis result includes:
[0070] Filter the event source through a time processing module to obtain a filtered event stream;
[0071] Converting the filtered event stream into a different form to obtain a converted event stream;
[0072] Allocating the converted event flows to different process paths to obtain event flows on different paths;
[0073] Merging multiple event streams of the event streams on the different paths into one event stream to obtain a merged event stream;
[0074] The combined event stream is judged according to preset rules and conditions to obtain analysis results;
[0075] A trigger signal is generated based on the analysis result.
[0076] Further optimizing the solution, the expression for obtaining the filtered event stream is:
[0077] E filtered (t) = {x∈E i (t)|f(x)};
[0078] The expression for obtaining the event stream after conversion is:
[0079] E converted (t)={g(x)|x∈Efiltered(t)};
[0080] The expressions for obtaining event flows on different paths are:
[0081] E path 1(t)={x∈E converted (t)|h(x)=1};
[0082] E path 2(t)={x∈E converted (t)|h(x)=2};
[0083] The expression for obtaining the merged event stream is:
[0084] E combined (t) = {c(x, y) | x∈E path 1(t), y∈E path 2(t)}.
[0085] Further optimizing the scheme, the trigger signal is imported into the process control module, and the process of generating the corresponding operation includes: analyzing the trigger signal through the process rules and process decision formulas in the process control module to trigger the corresponding operation;
[0086] The expression of the process decision formula is:
[0087] P = {p i |h(p i , E converted )};
[0088] Among them, P is the process path set, p i For a single path, h(p i , E converted ) is the process decision function
[0089] Further optimize the scheme and execute corresponding operations through the action type, execution strategy and action execution formula in the action execution module;
[0090] The real-time response control of the event includes but is not limited to updating database records, sending notifications, controlling device status, data processing, and calling third-party APIs.
[0091] Further optimizing the solution, the expression of the action execution formula is:
[0092] A = {a∈P|j(a)};
[0093] Among them, A is an action set, a is a single action, and j(a) is the action execution function.
[0094] Embodiment 2
[0095] like Figure 2 As shown, this embodiment provides an event-driven process control system, including:
[0096] This embodiment is based on the Node-RED platform, and through event monitoring, triggering and process arrangement, it realizes real-time capture, efficient processing and accurate response of various events, and achieves flexible control effect of automated processes. The process control system of the present invention includes an event monitoring module, an event processing module, a process control module, an action execution module and a monitoring and management module, which specifically include the following aspects:
[0097] (1) Event monitoring module: The event monitoring module is responsible for monitoring input events from various sensors, devices or external systems, namely event sources. Through the built-in input nodes of the intelligent linkage platform (such as HTTP request nodes, MQTT subscription nodes, etc.) or user-defined sensor data input nodes, etc., various external event sources are monitored and accurately captured in real time, including but not limited to user operations, device status changes, data updates and system alarms, etc., to ensure that the system is instantly aware of any event. Once an event is detected, the module will quickly pass the detailed event information to the event processing module to start the corresponding processing flow.
[0098] The event monitoring module consists of three parts: event source, monitoring strategy and event capture formula:
[0099] 1) Event source, the event monitoring module can monitor a variety of event sources, such as sensors, user input, network signals, etc. These event sources have different trigger conditions in different application scenarios.
[0100] 2) Monitoring strategy. The monitoring strategy of the event monitoring module can be diversified, mainly in the following ways:
[0101] ① Polling: Regularly check the status of the event source and trigger event monitoring. This strategy is suitable for stable event sources;
[0102] ②Interrupt: When the event source changes, the event monitoring is triggered immediately, which is suitable for quick response scenarios;
[0103] ③Event filtering: Use filtering rules to eliminate unnecessary events and reduce the burden of subsequent processing.
[0104] 3) Event capture formula, in order to describe the triggering conditions of event monitoring, the following formula can be used:
[0105] E={e i |f(e i )}, where E is the set of monitored events, e i is a single event, f(e i ) is a filter function that returns a Boolean value to determine whether the event is captured.
[0106] (2) Event processing module: After receiving the event information, the event processing module forwards it to the intermediate processing node in the workflow of the intelligent linkage platform for logical processing, and determines whether the corresponding process needs to be triggered according to the preset rules and conditions. These nodes can perform operations such as data parsing, filtering, conversion, and aggregation to convert the original events into standardized information that can be used by subsequent processes. At the same time, it supports the use of function nodes to write custom JavaScript code to meet the processing requirements of specific business logic. If the trigger condition is met, a trigger signal is generated and passed to the process control module. The event processing module includes filtering, conversion, branching, and combination events. The event processing process can be described using the following formula:
[0107] 1) Filtering: The filter filters events according to conditions. If the filtering condition is set to function f(x), the event flow after filtering is: E filtered (t) = {x∈E i (t)|f(x)};
[0108] 2) Conversion: The converter is used to convert events into different forms or contents. Let the conversion function be g(x), then the event flow after conversion is: E converted(t)={g(x)|x∈Efiltered(t)};
[0109] 3) Branching: Branching distributes events to different process paths according to conditions. If the branching condition is set as function h(x), the event flow on different paths can be expressed as: E path1 (t) = {x∈E converted (t)|h(x)=1},E path 2(t)={x∈E converted (t)|h(x)=2};
[0110] 4) Combination: The combiner is used to combine multiple event streams into one event stream. Let the combination function be c(x, y), then the combined event stream is: E combined (t) = {c(x, y) | x∈E path 1(t), y∈E path 2(t)}.
[0111] (3) Process control module: The process control module is the core of the system and is based on an event-driven design pattern. It allows users to configure process logic through a graphical interface and supports dynamic modification and expansion. This module is responsible for determining the next process and action to be executed based on the output of the event processing module. It triggers corresponding operations based on different event flows, including output to display devices, triggering alarms, and interacting with external systems. This module contains three parts: process rules, process decision formulas, and process directions.
[0112] 1) Process rules: The process control module uses rules or state machines to determine the direction of the process. Rules can be formulated based on factors such as event type and system status;
[0113] 2) Process decision formula: To describe the decision process in the process control module, the following formula can be used:
[0114] P = {p i |h(p i , E converted )}, where P is the set of process paths, p i For a single path, h(p i , E converted ) is the process decision function, which defines how to select the process path according to the event;
[0115] 3) Process direction: The process control module can determine the direction of the process based on process rules and state machines. The process can be sequential or parallel to meet different application requirements.
[0116] (4) Action execution module:
[0117] The action execution module performs actual actions according to the instructions of the process control module. These actions can be updating database records, sending notifications, controlling device status, data processing, calling third-party APIs, etc., to achieve real-time response to events and closed loop of business processes. This module consists of three parts: action type, execution strategy and action execution formula.
[0118] 1) Action type: The action execution module can perform various types of actions, including mechanical control, signal transmission, data processing, etc. Different action types require different execution strategies. ;
[0119] 2) Execution strategy: The action execution module adjusts the priority and order of actions according to different execution strategies. The strategy can be based on the instructions of the process control module or adjusted according to specific conditions;
[0120] 3) Action execution formula: The main process of the action execution module can be described by the following formula: A = {a∈P|j(a)}, where A is the action set, a is a single action, and j(a) is the action execution function, which defines how to execute the action.
[0121] (5) Monitoring and management module: The monitoring and management module is responsible for real-time monitoring of the entire event-driven process, including the status information of event reception, processing, decision-making and action execution, to ensure the stability and maintainability of the system. At the same time, it supports convenient editing, debugging, deployment and version management of the process to ensure that the system can quickly adapt to business changes.
[0122] Embodiment 3
[0123] This embodiment provides an event-driven process control system, including:
[0124] The event-driven process control system of this embodiment includes multiple steps and components, and is intended to provide a flexible and dynamic process control solution. The following describes each part and its interaction method in detail.
[0125] (1) Event source: An event source is a component that generates events and may come from various sources, including but not limited to:
[0126] 1) Sensors: measure physical parameters such as temperature, humidity, pressure, etc.
[0127] 2) User input: operations or commands from the user, such as button clicks, voice commands, etc.
[0128] 3) Time trigger: triggers an event based on a predetermined time point or interval;
[0129] 4) External system interface: receiving data or event signals from other systems.
[0130] The events generated by each event source have specific attributes and formats. These events are transmitted to the process control engine through message queues or other communication mechanisms.
[0131] (2) Process control engine: The process control engine is the core part of the system, responsible for processing events from event sources and triggering subsequent operations according to process logic. The engine is based on an event-driven architecture and includes the following functions:
[0132] 1) Event processing: filtering, converting, branching and combining events. The engine will process according to the rules configured by the user, and these rules can be configured through the graphical interface;
[0133] 2) Process logic: Process logic is a predefined sequence of rules and operations that determines how to handle events and the next steps. It can include conditional judgments, loops, parallel processing, etc.
[0134] 3) Event distribution: Processed events will be distributed to different output modules, or trigger subsequent events or operations.
[0135] (3) Operation steps: Operation steps are the result of the process control engine processing events. According to the configured process logic, operation steps can include various forms of operations:
[0136] 1) Data processing: calculation, conversion, filtering, etc. of event data;
[0137] 2) Trigger action: trigger actual operation based on the processing result, such as starting the device, sending notification, etc.;
[0138] 3) Message passing: Sending processed events to other systems or modules.
[0139] (4) Output module
[0140] The output module is the output end of the system, receiving the processing results from the process control engine and performing corresponding operations. The output module may include:
[0141] 1) Display device: used to display processing results or prompt information;
[0142] 2) Alarm device: triggers an alarm under certain conditions to alert the user;
[0143] 3) External interface: interact with other systems or devices to transmit processing results or trigger other operations.
[0144] The entire system operates in an event-driven manner, and the process control engine processes events according to predefined logic and configuration. The output module performs corresponding operations based on the processing results, providing flexible and dynamic process control. Through the graphical interface, users can easily configure and manage process logic to adapt to changing needs.
[0145] The above are only preferred specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A process control method based on event-driven, characterized in that: The following steps are involved: Get event sources based on event listening module; The event source is converted and analyzed by an event processing module to generate an analysis result, and a trigger signal is generated based on the analysis result; Importing the trigger signal into the process control module to generate corresponding operations; Import the corresponding operations into the action execution module to complete the real-time response control of the event; Real-time monitoring of event-driven processes is performed through the monitoring and management module.
2. The event-driven process control method according to claim 1, characterized in that: The process of acquiring the event source based on the event monitoring module includes: acquiring the event source through the event source monitoring function, monitoring strategy and event capture formula of the event monitoring module.
3. The event-driven process control method according to claim 1, characterized in that: The event source monitoring function includes but is not limited to monitoring sensors, user input and network signals; The monitoring strategy includes a polling strategy, an interruption strategy and an event filtering strategy; The expression of the event capture formula is: And={and i ∣f(e i )}; Among them, E is the set of monitored events, e i is a single event, f(e i ) is a filter function that returns a Boolean value to determine whether the event is captured.
4. The event-driven process control method according to claim 1, characterized in that: The event source is converted and analyzed by an event processing module to generate an analysis result, and the process of generating a trigger signal based on the analysis result includes: Filter the event source through a time processing module to obtain a filtered event stream; Converting the filtered event stream into a different form to obtain a converted event stream; Allocating the converted event flows to different process paths to obtain event flows on different paths; Merging multiple event streams of the event streams on the different paths into one event stream to obtain a merged event stream; The combined event stream is judged according to preset rules and conditions to obtain analysis results; A trigger signal is generated based on the analysis result.
5. The event-driven process control method according to claim 4 is characterized in that: The expression for obtaining the filtered event stream is: E filtered (t)={x∈E i (t)∣f(x)}; The expression for obtaining the event stream after conversion is: E converted (t)={g(x)∣x∈Efiltered(t)}; The expressions for obtaining event flows on different paths are: E path 1(t)={x∈E converted (t)∣h(x)=1}; E path 2(t)={x∈E converted (t)∣h(x)=2}; The expression for obtaining the merged event stream is: E combined (t)={c(x,y)∣x∈E path 1(t),y∈E path 2(t)}。 6. The event-driven process control method according to claim 1, characterized in that: The process of importing the trigger signal into the process control module to generate the corresponding operation includes: analyzing the trigger signal through the process rules and process decision formulas in the process control module to trigger the corresponding operation; The expression of the process decision formula is: P={p i ∣h(p i ,E converted )}; Among them, P is the process path set, p i For a single path, h(p i ,E converted ) is the process decision function.
7. The event-driven process control method according to claim 1, characterized in that: Execute corresponding operations through the action type, execution strategy and action execution formula in the action execution module; The real-time response control of the event includes but is not limited to updating database records, sending notifications, controlling device status, data processing, and calling third-party APIs.
8. The event-driven process control method according to claim 1, characterized in that: The expression of the action execution formula is: A = {a∈P|j(a)}; Among them, A is an action set, a is a single action, and j(a) is the action execution function.
9. An event-driven process control system, characterized in that: include: Event monitoring module, used to obtain event sources; An event processing module, used to convert and analyze the event source, generate an analysis result, and generate a trigger signal based on the analysis result; A process control module, used for generating corresponding operations based on the trigger signal; An action execution module, used to complete real-time response control of events based on the corresponding operations; The monitoring and management module is used to monitor event-driven processes in real time.
Citation Information
Patent Citations
Event response processing system and method, computer equipment and storage medium
CN116243999A
Process engine trigger task arrangement method and device, medium and equipment
CN117632416A
