An industrial event intelligent closed-loop workflow automatic generation execution method
By working collaboratively between the central server and edge gateways, and utilizing lightweight language models and standardized workflow templates, the system enables the automatic generation of intelligent closed-loop workflows for industrial events. This solves the problems of slow response speed and poor adaptability in event processing in existing technologies, and improves the accuracy of event matching and the flexibility of process scheduling.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEISU DIGITAL TECH (JIANGSU) CO LTD
- Filing Date
- 2025-07-31
- Publication Date
- 2026-07-03
AI Technical Summary
Existing industrial incident handling methods are slow to respond and have poor adaptability. They are unable to achieve the automatic matching and execution of labeling and classifying complex events and standardized workflows, and cannot meet the intelligent closed-loop incident handling needs of modern industrial sites.
By defining industrial event types and event codes in the central server, constructing an event category dictionary, and performing data collection, protocol adaptation, and initial screening at the edge gateway, the lightweight language model DistilBERT is used for multi-dimensional label classification. Combined with a preset label risk weight table and standardized workflow templates, the system achieves accurate matching between event labels and templates and automatically generates execution paths.
It achieves precise matching between industrial events and standard workflow templates, improving the accuracy of event matching and the flexibility of process scheduling. It is suitable for closed-loop handling of events from multiple scenarios, devices, and sources, and improves the automation level of the system.
Smart Images

Figure CN120893806B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of automation technology, and in particular relates to a method for automatically generating and executing intelligent closed-loop workflows for industrial events. Background Technology
[0002] As industrial systems become increasingly automated, more and more production equipment, sensors, and control systems are able to report operating status, alarm information, and event logs in real time.
[0003] In existing technologies, common industrial event handling methods often rely on manually defined rules or predefined scripts to respond to various events. These methods generally suffer from problems such as slow response speed, poor adaptability, and difficulty in expansion.
[0004] Although some systems have introduced automated process control mechanisms, they usually only support static event response processes and cannot achieve the automatic matching and execution of label classification of complex events and standardized workflows based on labels.
[0005] This makes the existing system significantly inadequate in handling multi-source heterogeneous events and closed-loop control in complex scenarios, making it difficult to meet the needs of "intelligent closed-loop event handling" in modern industrial settings. Summary of the Invention
[0006] The purpose of this invention is to provide a method for automatically generating and executing intelligent closed-loop workflows for industrial events, which solves the technical problem of achieving accurate matching and automatic generation of execution paths with standard workflow templates based on structured event tags.
[0007] To achieve the above objectives, the present invention adopts the following technical solution:
[0008] A method for automatically generating and executing intelligent closed-loop workflows for industrial events includes the following steps:
[0009] Step 1: Define industrial event types and event codes (e.g.) in the central server, build an event category dictionary table, and periodically distribute it to the edge gateway;
[0010] The edge gateway collects data from multi-source industrial equipment using raw protocols, and extracts the raw data through a protocol adapter, converting it into a unified standard data stream.
[0011] The edge gateway performs noise reduction and anomaly screening on the standard data stream, identifies abnormal events, and updates the standard data stream.
[0012] The edge gateway uploads the updated standard data stream to the central server, which generates industrial events, performs preliminary classification, and caches them in the database.
[0013] Step 2: The central server processes each industrial event in the Qwindow queue in sequence. For each event record, it extracts its summary description and uses the lightweight language model DistilBERT to perform token-level processing on the summary text, extracts keywords, performs multi-dimensional label classification based on keywords, calls the preset label risk weight table to identify the risk level of the industrial event, and generates an event label set T.
[0014] Step 3: In the central server, multiple standardized workflow templates W={W1, W2, ..., Wm} are preset. Each template Wi is bound to an adaptation tag set F={f1, f2, ..., fo}, where each adaptation tag fi contains a quadruple of type, tag name, matching word and matching method.
[0015] The event tag set T is matched with the matching tag set F of each workflow template, and a matching score is calculated based on the matching results. ,in, This represents the matching score between label ti and the matching label fi;
[0016] After sorting, output the workflow template Wbest with the highest matching score;
[0017] Step 4: The central server outputs the template Wbest, generates specific workflow instances based on the template Wbest, assigns instance IDs to the displacements, and binds the workflow instances to industrial events;
[0018] Workflow instances are written to the workflow instance database in a structured format to support subsequent queries, scheduling, and auditing;
[0019] The central server extracts the task structure from the workflow instance and distributes each executable node Nj to the corresponding edge gateway.
[0020] Preferably, step 1 includes the following steps:
[0021] Step 1-1: Pre-set an industrial event type library in the central server. Industrial event types include equipment alarms, production anomalies, safety incidents, energy anomalies, and environmental exceedances.
[0022] Configure a unique event code Eg for each type of event, and construct an event category dictionary table {Eg, type, description information};
[0023] The event category dictionary is periodically sent to the edge gateway;
[0024] Steps 1-2: Edge gateway Mi collects raw protocol data from various data sources, extracts and standardizes the data through protocol adapter Pj, and generates a unified standard data stream, with the following specific format:
[0025] [Event code Eg, timestamp, raw data, initial screening results, summary description];
[0026] The summary description includes [device number, type, location, connection status];
[0027] Steps 1-3: Cleaning and anomaly detection of the raw data in the standard data stream, specifically including denoising and smoothing continuous data using the moving average method:
[0028] ;
[0029] in, The sliding average value represents the k-th data point; n represents the size of the sliding window. This represents the i-th data point in the standard data stream; This represents summing all the original data from the (k-n+1)th data point to the kth data point;
[0030] The standard data stream is updated based on the cleaning and noise reduction results;
[0031] After obtaining the cleaned and denoised standard data stream, an initial screening for anomalies is performed using a threshold rule-based screening method, as detailed below:
[0032] ;
[0033] in This represents the k-th data point to be judged after cleaning and denoising. These represent the preset upper threshold and the preset lower threshold for the g-th type of event, respectively.
[0034] The initial screening results in the standard data stream are updated based on the initial screening results of the anomaly detection.
[0035] Based on the initial screening results and equipment type, the event code Eg is obtained by referring to the event category dictionary table. Then, the event type description is filled in according to the description information corresponding to the event code Eg, and finally the preprocessed standard data stream is obtained.
[0036] Steps 1-4: The edge gateway uploads the standard data stream to the central server. The central server parses the data, identifies and generates industrial event objects. The data structure is as follows:
[0037] {e.g., timestamp, raw data, initial screening results, summary description};
[0038] The events are then initially categorized and stored in the database, and the most recent N industrial events are cached using a time window queue (Qwindow).
[0039] Preferably, step 2 includes the following steps:
[0040] Step 2-1: The central server reads industrial events one by one from the time window queue Qwindow and extracts their summary description text;
[0041] The lightweight language model DistilBERT is used to perform token-level analysis on the text, extracting verbs and nouns as keywords.
[0042] Step 2-2: Based on the extracted keywords, classify the industrial events into categories such as equipment, anomaly, location, and risk level.
[0043] Based on the tag classification results, generate an event tag set T:
[0044] T = {t1, t2, ..., tn};
[0045] Where tn represents the nth label;
[0046] Each tag ti is represented as: <type, tag name, original word, source method>;
[0047] Steps 2-3: When identifying risk level labels, the event impact calculation method is used for identification.
[0048] Preferably, when performing steps 2-3, the method for calculating the impact of the event is as follows:
[0049] Step 2-3-1: Pre-set the tag risk weight table configured by the user in the central server;
[0050] Step 2-3-2: For each tag, call different mapping methods based on the tag category:
[0051] The method for classifying equipment is: query the equipment type and map it to the equipment criticality score;
[0052] The regional approach is as follows: check the installation location, map the region, and assign a priority score.
[0053] The exception classification method is: map the exception severity score according to the event type;
[0054] Based on the mapping results, the label influence value si is obtained;
[0055] Step 2-3-3: Aggregate all the label impact values si to obtain the comprehensive impact score of the industrial event. The specific formula is as follows:
[0056] ;
[0057] Where n represents the total number of tags in an industrial event, and i represents the sequence number of the i-th tag; The overall impact score is calculated.
[0058] Steps 2-3-4: The central server sets the grading threshold and grades the impact level of industrial events according to the grading threshold.
[0059] Preferably, step 3 includes the following steps:
[0060] Step 3-1: Pre-set a set of standardized workflow templates in the central server, denoted as set W. Each template Wi in set W is represented as:
[0061] Wi={N1, N2,..., Nm};
[0062] Where Wi represents the i-th workflow template in set W, and Nm represents the m-th node in workflow template Wi;
[0063] For each template Wi, a set of adaptation tags is preset, namely the adaptation tag set F = {f1, f2, ..., fo}, where n ≤ 0; adaptation tag fi = <type, tag name, matching word>;
[0064] Step 3-2: Obtain the event tag set T = {t1, t2, ..., tn}, where ti = <type, tag name, original word, source method>;
[0065] Each tag ti in the event tag set T = {t1, t2, ..., tn} is matched one by one with the adaptation tag fi in the adaptation tag set F of the template Wi to obtain the template Wbest.
[0066] Preferably, node types are classified into three categories based on their configuration capabilities and constraints: fixed nodes, matchable nodes, and semi-fixed nodes.
[0067] Preferably, in step 3-2, the specific steps for performing a match one by one to obtain the template Wbest are as follows:
[0068] For any tag ti in the event tag set T, it is matched one by one with each fi in the adaptation tag set F of Wi. The relationship between the first three items is compared and the following determination is made:
[0069] If the type or tag name does not match: that is, ti.type ≠ fi.type or ti.tagname ≠ fi.tagname, it is considered to have low relevance, and the matching score is set to score=score1;
[0070] If the type and tag name match, but the original word does not match the matched word, then it is considered a medium relevance, and the matching score is set to score=score2.
[0071] If all three elements match perfectly (i.e., type, tag name, and original word / matching word are all the same), it is considered a high match, and the match score is set to score=score3.
[0072] Based on the matching results, the total matching score is calculated:
[0073] ;
[0074] in, This represents the matching score between label ti and the matching label fi;
[0075] Sort all templates Wi according to their total matching score, and select the template Wi with the highest score as template Wbest.
[0076] This invention discloses an intelligent closed-loop workflow automatic generation and execution method for industrial events. It solves the technical problem of achieving accurate matching and automatic generation of execution paths between structured event tags and standard workflow templates. This invention constructs a standardized workflow template set and matches events with templates based on the structured tag information of events. This enables intelligent generation of the entire process from raw event data to precise workflow execution paths. A tag-based structure is used to uniformly describe events and templates, and the matching mechanism incorporates a structure comparison and scoring model, effectively improving the accuracy and automation of event-workflow matching. Compared to traditional technologies, this invention offers advantages such as more accurate event matching, more flexible process scheduling, and stronger system versatility, making it suitable for closed-loop handling of events across multiple scenarios, devices, and sources. Attached Figure Description
[0077] Figure 1 This is the main flowchart of the present invention;
[0078] Figure 2 This is a flowchart of step 1 of the present invention;
[0079] Figure 3 This is a flowchart of step 2 of the present invention;
[0080] Figure 4 This is a flowchart of step 3-1 of the present invention.
[0081] Figure 5 This is a flowchart of step 3-2 of the present invention. Detailed Implementation
[0082] Depend on Figures 1-5 The method for automatically generating and executing an intelligent closed-loop workflow for industrial events, as shown, includes the following steps:
[0083] Step 1: Industrial Event Collection and Preprocessing
[0084] Define industrial event types and event codes (e.g.) in the central server, build an event category dictionary table, and periodically distribute it to the edge gateway;
[0085] The edge gateway collects data from multi-source industrial equipment using raw protocols, and extracts the raw data through a protocol adapter, converting it into a unified standard data stream.
[0086] The edge gateway performs noise reduction and anomaly screening on the standard data stream, identifies abnormal events, and updates the standard data stream.
[0087] The edge gateway uploads the updated standard data stream to the central server, which generates industrial events, performs preliminary classification, and caches them in the database.
[0088] Step 1 includes the following steps:
[0089] Step 1-1: Identify the types of events that may trigger workflows in the industrial site. In the central server, predefine the types of industrial events. The specific types include equipment alarms (such as overheating, overload, abnormal vibration, etc.), production anomalies (such as production stoppage, abnormal yield), safety events (such as unauthorized personnel entry, smoke detection), energy anomalies (such as voltage fluctuations, sudden increase in energy consumption), and environmental limits (such as temperature and humidity exceeding limits, gas leaks).
[0090] For each of the above event types, an event code Eg is defined, including E0 representing the original data status (device alarm type), E1 representing temperature abnormality (device alarm type), E2 representing vibration abnormality (device alarm type), E3 representing personnel intrusion (security event type), etc. The event code Eg is defined by the user according to actual needs;
[0091] Construct an event category dictionary table based on the event code Eg and its description;
[0092] In this embodiment, the structure of the event category dictionary table is {Eg, type, description information}.
[0093] The central server periodically sends the event category dictionary to the edge gateway, which in turn periodically updates its local event category dictionary.
[0094] Steps 1-2: The edge gateway collects the raw protocol packets from each data source, extracts the raw data from the raw protocol packets through the protocol adapter, and then converts them into a standard data stream;
[0095] In this embodiment, there are multiple edge gateways, denoted by Mi, where Mi represents the i-th gateway. Any edge gateway Mi can connect to multiple data sources of the same type, including devices such as PLCs, DCSs, edge acquisition terminals, embedded sensors, and cameras.
[0096] Edge Gateway Mi supports multiple industrial protocols, such as Modbus, OPCUA, MQTT, S7, and HTTPAPI. All protocols are stored in the protocol library of Edge Gateway Mi as protocol adapters. The specific protocol library is represented as follows:
[0097] LP = {P1, P2, ..., Pj};
[0098] Where LP represents the protocol library, and Pj represents the protocol adapter that supports the j-th protocol. The protocol adapter is used to support the protocol of the corresponding sensor or device, extract the fields of the raw data in the raw protocol packet, and then package the raw data into a preset general protocol format to generate a standard data stream.
[0099] The general protocol format includes event code Eg, timestamp, raw data, initial screening result, and summary description; the default value for the initial screening result is 0; the default value for event code Eg is E0.
[0100] The summary description includes the device number, device type, connection status, protocol type, installation location, and event type description.
[0101] Steps 1-3: Initial screening of raw data in the standard data stream by cleaning, denoising, and detecting anomalies;
[0102] Clean and denoise the raw data:
[0103] For sensor data, noise reduction is performed using filtering methods such as median filtering or moving average. In this embodiment, moving average is used.
[0104] ;
[0105] in, This represents the moving average of the k-th data point (after smoothing); n represents the size of the sliding window (i.e., the number of adjacent data points used when calculating the average). This represents the i-th data point in the standard data stream; This represents the summation of all the original data from the (k-n+1)th data point to the kth data point.
[0106] The standard data stream is updated based on the cleaning and noise reduction results.
[0107] After obtaining the cleaned and denoised standard data stream, an initial screening for anomalies is performed using a threshold rule-based screening method, as detailed below:
[0108] ;
[0109] in This represents the k-th data point to be judged after cleaning and denoising. These represent the preset upper threshold and the preset lower threshold for the g-th type of event, respectively.
[0110] The initial screening results in the standard data stream are updated based on the initial screening results of the anomaly detection.
[0111] Based on the initial screening results and equipment type, the event code Eg is obtained by referring to the event category dictionary table. Then, the event type description is filled in according to the description information corresponding to the event code Eg, and finally the preprocessed standard data stream is obtained.
[0112] In actual use, due to different user needs, the edge gateway will send the standard data stream in two modes: Mode 1 is to not preprocess the standard data stream, that is, the edge gateway does not perform initial screening. In this case, the edge gateway will directly send the standard data stream to the central server for further judgment and processing; Mode 2 is to preprocess the standard data stream, that is, the logic method of steps 1-3 in this embodiment.
[0113] In this embodiment, the original data is first processed into a general protocol format to generate a standard data stream, and then the standard data stream is subjected to initial edge processing. This method can quickly achieve compatibility with both Mode 1 and Mode 2 mentioned above. Compared with the traditional method of directly processing the original data and then constructing the standard protocol, this embodiment can significantly speed up the communication workflow and improve communication efficiency.
[0114] Steps 1-4: The edge gateway sends the preprocessed standard data stream to the central server. The central server generates industrial events, performs preliminary classification, and then caches and stores them in the database.
[0115] The specific steps are as follows:
[0116] Step 1-4-1: The central server parses the standard data stream, obtains the event code Eg, classifies the standard data stream according to the event code Eg, and generates industrial events based on the initial screening results of anomaly detection.
[0117] The core data architecture for industrial events is: event code (e.g.) + timestamp + raw data + initial screening results + summary description;
[0118] Step 1-4-2: The central server uses a time window queue (Qwindow) to store the most recent N industrial events and caches these industrial events in the database.
[0119] Step 2: The central server processes each industrial event in the Qwindow queue in sequence. For each event record, it extracts its summary description and uses the lightweight language model DistilBERT to perform token-level processing on the summary text, extracts keywords, performs multi-dimensional label classification based on keywords, calls the preset label risk weight table to identify the risk level of the industrial event, and generates an event label set T.
[0120] When performing step 2, the specific steps are as follows:
[0121] Step 2-1: The central server processes industrial events in the Qwindow sequentially. For any industrial event, the central server extracts a summary description and uses the lightweight language model DistilBERT to perform token-level processing on the summary description text, extracting verbs and nouns as keywords, such as "abnormal", "overheating", "failure", "temperature sensor", "cooling pump", etc.
[0122] Step 2-2: Based on the extracted keywords, classify industrial events by tagging them, including equipment (such as pumps, motors, PLCs), anomalies (such as disconnections, alarms), locations (such as workshop A area, cooling section), and risk levels (such as severe, moderate, minor).
[0123] Based on the tag classification results, generate an event tag set T:
[0124] T = {t1, t2, ..., tn};
[0125] Where tn represents the nth label.
[0126] The result for each tag is: <type, tag name, original word, source method>, for example: <device class, PLC module, "controller", system model>, <exception class, disconnection, "disconnection", data flow summary>.
[0127] Steps 2-3: When identifying risk level labels, the event impact calculation method is used for identification, specifically including the following steps:
[0128] Step 2-3-1: Pre-set a user-configured tag risk weight table in the central server, as shown in Table 1:
[0129]
[0130] Table 1 is an example table of PLC modules, disconnections, and cooling sections in the label risk weight table.
[0131] In this embodiment, the label risk weight table can be customized by the user and supports dynamic updates.
[0132] Step 2-3-2: For each tag, call different mapping methods based on the tag category:
[0133] The method for classifying equipment is: query the equipment type and map it to the equipment criticality score;
[0134] The regional approach is as follows: check the installation location, map the region, and assign a priority score.
[0135] The exception classification method is: map the exception severity score according to the event type;
[0136] Based on the mapping results, the label influence value si is obtained;
[0137] Step 2-3-3: Aggregate all the label impact values si to obtain the comprehensive impact score of the industrial event. The specific formula is as follows:
[0138] ;
[0139] Where n represents the total number of tags in an industrial event, and i represents the sequence number of the i-th tag; The overall impact score is calculated based on the combined effect.
[0140] Steps 2-3-4: The central server sets a grading threshold and grades the impact level of industrial events according to the grading threshold. In this embodiment, the grading method that can be used is: when When, it is a high priority, i.e., serious; when When, it is of medium priority, i.e., medium; when When the priority is low, it is considered minor; the specific threshold for classification can be adjusted by the user.
[0141] Step 3: In the central server, multiple standardized workflow templates W={W1, W2, ..., Wm} are preset. Each template Wi is bound to an adaptation tag set F={f1, f2, ..., fo}, where each adaptation tag fi contains a quadruple of type, tag name, matching word and matching method.
[0142] The event tag set T is matched with the matching tag set Fi of each workflow template, and a matching score is calculated based on the matching results. After sorting, output the workflow template Wbest with the highest matching score;
[0143] Step 3-1: Pre-set a set of standardized workflow templates in the central server, denoted as set W. Each template Wi in set W is represented as:
[0144] Wi={N1, N2,..., Nm};
[0145] Where Wi represents the i-th workflow template in set W, and Nm represents the m-th node in workflow template Wi;
[0146] For each template Wi, a set of adaptation tags is preset, namely the adaptation tag set F = {f1, f2, ..., fo}, where n ≤ o; adaptation tag fi = <type, tag name, matching word>.
[0147] In this embodiment, node types are classified into three categories based on their configuration capabilities and constraints:
[0148] Fixed nodes: The behavior of these nodes does not change with the label T and is always executed. Examples include: logging, event archiving, and reporting operations.
[0149] Subroutine binding method: This type of node is bound to a user-defined subroutine when the workflow template is preset, and the binding relationship is fixed in the template.
[0150] For example, logging, event archiving, and reporting operations each correspond to a unique execution logic, such as a "logging subroutine" or an "archiving subroutine".
[0151] Matchable nodes: The behavior of a node is entirely controlled by the tag set T, which determines whether to enable it through event tags and configures the executed subroutines and their parameters.
[0152] Subroutine binding method: Various callable subroutines are pre-defined in the central server, and the central server will save these subroutines in the database.
[0153] In the workflow template, each node defines a mapping rule for matching conditions and associated execution subroutines (e.g., a mapping of label and subroutine ID). When a match is successful, the hooking of the subroutine is automatically completed.
[0154] For example:
[0155] If the label contains "Device Class = Pump", then enable the pump class diagnostic module;
[0156] If the label contains "abnormal type = disconnection", then the communication link detection subprocess is enabled.
[0157] Matching rule: If the label [device class] == "pump", then call the subroutine [SP_Diag_Pump()].
[0158] Semi-fixed node: The node exists in the process, but its internal parameters or call content will be adjusted according to the tag T.
[0159] Subroutine binding method: The node is bound to a general subroutine, but its configuration parameters or execution path are determined by the dynamic mapping rules in the workflow template.
[0160] For semi-fixed nodes, the label T can only affect the calling parameters or sub-path selection, but cannot change the execution of the subroutine itself.
[0161] For example:
[0162] The tag "Device Class = Pump" binds to the subroutine that collects pressure and flow rate data.
[0163] The tag "Device Class = Transformer" binds to the subroutine that collects temperature and current.
[0164] In this embodiment, all executed subroutines are registered and stored in the database with a unique ID, such as SP_Diag_Pump().
[0165] Each node can use the following structured configuration list to hook and execute subroutines:
[0166] Subroutine ID or matching rule (limited to matchable or semi-fixed nodes);
[0167] Parameter template (containing default values and variables that can be replaced by the event label set T);
[0168] Triggering conditions (whether it is enabled, tag judgment logic).
[0169] When generating a workflow instance, the central server compares the workflow template and the event tag set T, parses the structured configuration list, and then completes the binding and parameter configuration of the specific execution subroutines, and finally instantiates them.
[0170] Step 3-2: Obtain the event tag set T = {t1, t2, ..., tn}, where ti = <type, tag name, original word, source method>;
[0171] Each tag ti in the event tag set T={t1, t2, ..., tn} is matched one by one with the adaptation tag fi in the adaptation tag set F of the template Wi to obtain the template Wbest;
[0172] For any tag ti in the event tag set T, it is matched one by one with each fi in the adaptation tag set F of Wi. The relationship between the first three items (i.e., type, tag name, original word, and matching word) is compared, and the following determination is made:
[0173] If the type or tag name does not match: that is, ti.type ≠ fi.type or ti.tagname ≠ fi.tagname, it is considered to have low relevance, and the matching score is set to score=score1. In this embodiment, it can be set to 0 or other fixed scores.
[0174] If the type and tag name match, but the original word does not match the matched word, then it is considered a medium relevance, and the matching score is set to score=score2. In this embodiment, it can be set to 0.2 or other fixed scores.
[0175] If all three items match perfectly (i.e., type, tag name, original word / matching word are all the same), it is a high match, and the match score is set to score=score3. In this embodiment, it can be set to 1 or other fixed scores.
[0176] Based on the matching results, the total matching score is calculated:
[0177] ;
[0178] in, This represents the matching score between the tag ti and the adapted tag fi.
[0179] Sort all templates Wi according to their total matching scores, and select the template Wi with the highest score as template Wbest;
[0180] Taking the scenario of an industrial cooling section disconnection as an example, the matching template Wbest is as follows:
[0181] Wbest = {N1 (Event Log), N2 (Communication Diagnostics), N3 (PLC Reconnection Attempt), N4 (Fault Root Cause Identification), N5 (Expert Dispatch), N6 (Risk Mitigation Action)}
[0182] Among them, N1 is a fixed node, N2, N3, and N4 are matchable nodes (determined by the anomaly type and equipment type), N5 is a semi-fixed node (whether manual intervention is required is determined by the risk level "severe"), and N6 is a matchable node (if the location type is cooling section, then emergency temperature control is performed).
[0183] Step 4: The central server outputs the template Wbest, generates specific workflow instances based on the template Wbest, assigns instance IDs to the displacements, and binds the workflow instances to industrial events;
[0184] Workflow instances are written to the workflow instance database in a structured format to support subsequent queries, scheduling, and auditing;
[0185] The central server extracts the task structure from the workflow instance and distributes each executable node Nj to the corresponding edge gateway.
[0186] This invention discloses an intelligent closed-loop workflow automatic generation and execution method for industrial events. It solves the technical problem of achieving accurate matching and automatic generation of execution paths between structured event tags and standard workflow templates. This invention constructs a standardized workflow template set and matches events with templates based on the structured tag information of events. This enables intelligent generation of the entire process from raw event data to precise workflow execution paths. A tag-based structure is used to uniformly describe events and templates, and the matching mechanism incorporates a structure comparison and scoring model, effectively improving the accuracy and automation of event-workflow matching. Compared to traditional technologies, this invention offers advantages such as more accurate event matching, more flexible process scheduling, and stronger system versatility, making it suitable for closed-loop handling of events across multiple scenarios, devices, and sources.
Claims
1. A method for automatically generating and executing intelligent closed-loop workflows for industrial events, characterized in that: Includes the following steps: Step 1: Define industrial event types and event codes (e.g.) in the central server, build an event category dictionary table, and periodically distribute it to the edge gateway; The edge gateway collects data from multi-source industrial equipment using raw protocols, and extracts the raw data through a protocol adapter, converting it into a unified standard data stream. The edge gateway performs noise reduction and anomaly screening on the standard data stream, identifies abnormal events, and updates the standard data stream. The edge gateway uploads the updated standard data stream to the central server, which generates industrial events, performs preliminary classification, and caches them in the database. Step 2: The central server processes each industrial event in the Qwindow queue in sequence. For each event record, it extracts its summary description and uses the lightweight language model DistilBERT to perform token-level processing on the summary text, extracts keywords, performs multi-dimensional label classification based on keywords, calls the preset label risk weight table to identify the risk level of the industrial event, and generates an event label set T. Step 3: In the central server, multiple standardized workflow templates W={W1, W2, ..., Wm} are preset. Each template Wi is bound to an adaptation tag set F={f1, f2, ..., fo}, where each adaptation tag fi contains a quadruple of type, tag name, matching word and matching method. The event tag set T is matched with the matching tag set F of each workflow template, and a matching score is calculated based on the matching results. ,in, This represents the matching score between label ti and the matching label fi; After sorting, output the workflow template Wbest with the highest matching score; Step 3 includes the following steps: Step 3-1: Pre-set a set of standardized workflow templates in the central server, denoted as set W. Each template Wi in set W is represented as: Wi={N1, N2,..., Nm}; Where Wi represents the i-th workflow template in set W, and Nm represents the m-th node in workflow template Wi; For each template Wi, a set of adaptation tags is preset, namely the adaptation tag set F = {f1, f2, ..., fo}, where n ≤ 0; adaptation tag fi = <type, tag name, matching word>; Node types are classified into three categories based on their configuration capabilities and constraints: fixed nodes, matchable nodes, and semi-fixed nodes. Fixed nodes: The behavior of the node does not change with the tag and is always executed. The execution subroutine of the fixed node is bound to the user-defined execution subroutine when the preset workflow template is used. The binding relationship is fixed in the template. Matchable nodes: The behavior of nodes is completely controlled by a set of tags. Whether a node is enabled is determined by event tags, and the execution subroutines to be called and their parameters are configured. The execution subroutines of matchable nodes are bound to various types of callable execution subroutines preset in the central server. The central server will save these subroutines in the database. In the workflow template, each node defines the mapping rules of the matching conditions and the associated execution subroutines. Semi-fixed nodes: The node exists in the process, but the internal parameters or call content will be adjusted according to the tag. The execution subroutine binding method of semi-fixed nodes is to bind a general execution subroutine to the node, but its configuration parameters or execution path are determined by the dynamic mapping rules in the workflow template. Step 3-2: Obtain the event tag set T={t1, t2, ..., tn}, where tn represents the nth tag, and ti=<type, tag name, original word, source method>; Each tag ti in the event tag set T={t1, t2, ..., tn} is matched one by one with the adaptation tag fi in the adaptation tag set F of the template Wi to obtain the template Wbest; Step 4: The central server outputs the template Wbest, generates specific workflow instances based on the template Wbest, assigns instance IDs to the displacements, and binds the workflow instances to industrial events; Workflow instances are written to the workflow instance database in a structured format to support subsequent queries, scheduling, and auditing; The central server extracts the task structure from the workflow instance and distributes each executable node Nj to the corresponding edge gateway.
2. The method for automatically generating and executing an intelligent closed-loop workflow for industrial events as described in claim 1, characterized in that: Step 1 includes the following steps: Step 1-1: Pre-set an industrial event type library in the central server. Industrial event types include equipment alarms, production anomalies, safety incidents, energy anomalies, and environmental exceedances. Configure a unique event code Eg for each type of event, and construct an event category dictionary table {Eg, type, description information}; The event category dictionary is periodically sent to the edge gateway; Steps 1-2: Edge gateway Mi collects raw protocol data from various data sources, extracts and standardizes the data through protocol adapter Pj, and generates a unified standard data stream, with the following specific format: [Event code Eg, timestamp, raw data, initial screening results, summary description]; The summary description includes [device number, type, location, connection status]; Steps 1-3: Cleaning and anomaly detection of the raw data in the standard data stream, specifically including denoising and smoothing continuous data using the moving average method: ; in, The sliding average value represents the k-th data point; n represents the size of the sliding window. This represents the i-th data point in the standard data stream; This represents summing all the original data from the (k-n+1)th data point to the kth data point; The standard data stream is updated based on the cleaning and noise reduction results; After obtaining the cleaned and denoised standard data stream, an initial screening for anomalies is performed using a threshold rule-based screening method, as detailed below: ; in This represents the k-th data point to be judged after cleaning and denoising. These represent the preset upper threshold and the preset lower threshold for the g-th type of event, respectively. The initial screening results in the standard data stream are updated based on the initial screening results of the anomaly detection. Based on the initial screening results and equipment type, the event code Eg is obtained by referring to the event category dictionary table. Then, the event type description is filled in according to the description information corresponding to the event code Eg, and finally the preprocessed standard data stream is obtained. Steps 1-4: The edge gateway uploads the standard data stream to the central server, which parses the data, identifies and generates industrial event objects; The events are then initially categorized and stored in the database, and the most recent N industrial events are cached using a time window queue (Qwindow).
3. The method for automatically generating and executing an intelligent closed-loop workflow for industrial events as described in claim 2, characterized in that: Step 2 includes the following steps: Step 2-1: The central server reads industrial events one by one from the time window queue Qwindow and extracts their summary description text; The lightweight language model DistilBERT is used to perform token-level analysis on the text, extracting verbs and nouns as keywords. Step 2-2: Based on the extracted keywords, classify the industrial events into categories such as equipment, anomaly, location, and risk level. Based on the tag classification results, generate an event tag set T: T = {t1, t2, ..., tn}; Steps 2-3: When identifying risk level labels, the event impact calculation method is used for identification.
4. The method for automatically generating and executing an intelligent closed-loop workflow for industrial events as described in claim 3, characterized in that: When performing steps 2-3, the method for calculating the impact of the event is as follows: Step 2-3-1: Pre-set the tag risk weight table configured by the user in the central server; Step 2-3-2: For each tag, call different mapping methods based on the tag category: The method for classifying equipment is: query the equipment type and map it to the equipment criticality score; The regional approach is as follows: check the installation location, map the region, and assign a priority score. The exception classification method is: map the exception severity score according to the event type; Based on the mapping results, the label influence value si is obtained; Step 2-3-3: Aggregate all the label impact values si to obtain the comprehensive impact score of the industrial event. The specific formula is as follows: ; Where n represents the total number of tags in an industrial event, and i represents the sequence number of the i-th tag; The overall impact score is calculated. Steps 2-3-4: The central server sets the grading threshold and grades the impact level of industrial events according to the grading threshold.
5. The method for automatically generating and executing an intelligent closed-loop workflow for industrial events as described in claim 4, characterized in that: In step 3-2, the specific steps for performing a match one by one to obtain the template Wbest are as follows: For any tag ti in the event tag set T, it is matched one by one with each fi in the adaptation tag set F of Wi. The relationship between the first three items is compared and the following determination is made: If the type or tag name does not match: that is, ti.type ≠ fi.type or ti.tagname ≠ fi.tagname, it is considered to have low relevance, and the matching score is set to score=score1; If the type and tag name match, but the original word does not match the matched word, then it is considered a medium relevance, and the matching score is set to score=score2. If all three elements match exactly, that is, the type, tag name, original word and the matched word are all the same, then it is a high match, and the match score is set to score=score3; Based on the matching results, the total matching score is calculated: ; in, This represents the matching score between label ti and the matching label fi; Sort all templates Wi according to their total matching score, and select the template Wi with the highest score as template Wbest.
Citation Information
Patent Citations
Task management method and device, electronic equipment, system and storage medium
CN118114962A