Event collection method and apparatus for large-scale industrial automation systems
By classifying equipment and encoding events in industrial automation systems, and combining event stacks and central server management, the problem of coarse event acquisition in existing systems has been solved, achieving nanosecond-level precision event acquisition and efficient retrieval, thus improving the system's intelligence level.
Patent Information
- Application Number
- CN202310072759.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-07
- Publication Date
- 2025-12-19
- Estimated Expiration
- 2043-02-07
AI Technical Summary
The event acquisition systems in existing industrial automation systems are too crude, easily lose key information, and are difficult to adapt to the needs of large-scale automation systems, especially in SCADA systems or configuration software where they cannot accurately obtain the precise time information of events.
Large-scale industrial automation systems are classified into equipment categories, four levels of standard events are defined, and the event subject is used as the smallest collection unit to obtain nanosecond-level timestamps and event codes. Events are collected through an event stack, and submission cycles or batch submissions are set. A central event server is used for high-precision event management and retrieval.
It achieves nanosecond-level high-precision event acquisition, improves the system's responsiveness and the accuracy of event retrieval, and enhances the intelligence level and operation and maintenance capabilities of manufacturing enterprises.
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of large-scale industrial automation systems. BACKGROUND
[0002] With the development of information and computer technology, in the field of industrial automation, people have higher and higher requirements for intelligent control system, for example, for system engineers and operators, it is necessary to know what events have occurred in time sequence in a day, a month or a year, whether the process detection data is out of limit, when the equipment is started, whether it is automatically started or manually started by the operator, whether the running personnel has changed some process parameters, etc. The alarm and event system of the existing industrial automation system is usually provided by the SCADA system or the industrial configuration software, and the SCADA system or the configuration software usually adopts time slice polling communication mode, and there is a minimum value limit for the data acquisition granularity, and it does not support acquisition cycle below 100ms, and when the acquisition frequency is too fast, it will cause the SCADA system or the configuration software to run slowly, and reduce the system response ability. However, the cycle period of the industrial controller such as PLC / DCS is usually 1ms-500ms, there is an information loss window in the middle, and the biggest problem is that the SCADA / configuration software cannot accurately obtain the accurate time information of the occurred event in the automation system execution program (the data acquisition in the SCADA / configuration software occurs at the end of a scanning period of the controller, which will cause the collected events to be labeled with the same time label). SUMMARY
[0003] The technical problem to be solved by the present application is how to solve the problem that the event acquisition system in the existing industrial automation system, especially large-scale automation system, is too extensive, easy to lose key information and difficult to adapt to large-scale automation system.
[0004] The technical solution adopted by the present application is: an event collection method of a large-scale industrial automation system, comprising the following steps
[0005] Step one, definition step, classifying the devices involved in the large-scale industrial automation system and defining four-level standard events, each event subject corresponds to one to four-level standard events based on 16-bit unsigned integer coding, and event subjects of the same category correspond to the same integer region; the first-level event is defined as a controller system event, the second-level event is defined as an event generating key alarm information, the third-level event is an ordinary alarm event, and the fourth-level event is defined as a device, program generated action event.
[0006] Step two, event collection step, when each event subject corresponds to the event, with an event subject as the minimum collection unit, the nanosecond time stamp corresponding to the controller instruction when the event occurs and the event subject, event code and related additional parameters are obtained, and the event stack is classified into an event item with 5 fields.
[0007] The four-level standard events based on 16-bit unsigned integer coding formed by classifying the devices involved in the industrial automation system are embodied as follows: the first-level event is defined as a controller system event; the second-level event is defined as an event generating key alarm information, such as an event causing device shutdown; the third-level event is a general alarm event, and the fourth-level event is defined as a device or program generated action event. The same device type corresponds to the same integer region, such as 6#W0100-16#W010F.
[0008] Step three, event submission step, set the submission period and batch submission quantity, when the time meets the submission period or the number of events in the event stack meets the batch submission quantity, serialize each field sequence of each event in the event stack, and send the event in the event stack to the central event server through the protocol stack program to generate a data frame, the central event server includes a message queue, when multiple event stacks simultaneously submit events, the central event server is concurrently sent, in the central event server, the received events are stored in a time sequence database.
[0009] Step four, event subscription and query step, the event retrieval terminal is connected with the central event server, and the events archived in the central event server are pushed to the event retrieval terminal through subscription or query.
[0010] The classification of the devices involved in the large-scale industrial automation system is to define each device as an event subject, and classify according to the event subject, including detection instrument class (such as pressure transmitter, electromagnetic flowmeter, etc.), bidirectional motion motor class (such as a small car that can move forward and backward, etc.), unidirectional motion motor class (such as fan, water pump, etc.), gas-liquid pressure class (cylinder, hydraulic pressure, etc.), valve class (pneumatic valve, electric valve, etc.), adjustable class (such as frequency converter, electric regulating valve, etc.), servo class (servo motor, etc.).
[0011] The device classification in the patent does not have a complete standard, and can be classified as needed, which is convenient for subsequent retrieval.
[0012] Each event contains 5 fields, namely timestamp, submitter, identity, evcode, and para, occupying 20 bytes, wherein the timestamp represents a time stamp, the time of occurrence of each event, the submitter represents an event submission terminal, specifically representing that the event is submitted to the central event server by which event stack, the identity represents an event subject, the action performer of the event, the evcode represents an event code, a 16-bit unsigned integer, and the para represents an action-attached parameter, 32-bit double-word type data in hexadecimal.
[0013] An event collection method for a large-scale industrial automation system, comprising the following devices
[0014] An event stack is configured at a controller terminal, two data units of the same structure are configured for each event stack to realize double buffering, and the two data units are switched by a flag bit. Each data unit defines three status flag bits: Idling, FullLoaded, and Engaged. When Engaged is true, the data unit is a working stack, and event data is entered into the data unit; otherwise, the event is entered into another data unit, and the data unit is not used. When Engaged is true and Idling is true, the event collection program writes the current event into the data unit, and resets the Idling flag bit (false). When the FullLoad flag bit is true, it indicates that the data unit has reached the batch submission quantity, and the event submission module needs to be notified to submit events. In order to improve processing efficiency, all event item fields in the event stack are designed to be minimized. Each event item contains 5 fields, namely timestamp, submitter, identity, evcode, and para, occupying 20 bytes, wherein the timestamp represents a time stamp, the time of occurrence of each event, the submitter represents an event submission terminal, specifically representing that the event is submitted to the central event server by which event stack, the identity represents an event subject, the action performer of the event, the evcode represents an event code, a 16-bit unsigned integer, and the para represents an action-attached parameter, 32-bit double-word type data in hexadecimal.
[0015] Event collection module, configured in the controller terminal, generates the flag bit of the defined event by constructing the event flag without changing the original automation program logic, collects events in the control program with a single event subject as the basic collection unit, and contains nanosecond timestamp generation, event stack state detection, event in-stack processing, and atomic operation function, which is triggered by the event collection module according to the event flag, acquires the current timestamp, detects the event stack state, and then pushes the 5 fields of the event item corresponding to the event into the event stack, and atomic operation is required in the in-stack process to ensure that the stack program is not interrupted by other parallel stack programs;
[0016] Event submission module, configured in the controller terminal, submits events in the event stack of the event collection module to the central event server in a timed or batch manner, contains timing judgment, batch quantity judgment, communication with the central event server, and atomic operation function, and the specific functions are whether the event should be submitted according to the set timing period or whether the current event stack reaches the batch submission amount, then the communication protocol stack module is called to generate a communication data frame to submit data, and after completion, the submitted data needs to be cleared, which is an atomic operation to ensure that the stack program is not interrupted by other parallel stack programs;
[0017] Communication protocol stack module, configured in the controller terminal, is used to process the event item data submitted by the event submission module, and specifically packs the event item data to be submitted into a TCP data frame, and provides serialization, data verification, and communication state descriptor generation functions;
[0018] Central event server, composed of server hardware, event message queue, event request processing program, and event publishing server program, can accept submission requests from multiple event submission modules, i.e., event submission terminals, when there are multiple event submission requests at the same time, the central event server sorts and processes all event requests through the message queue, at the same time, the central event server is responsible for detecting data requests from event retrieval terminals, when there are event retrieval terminals, provides event retrieval services based on subscription / query, the event information submitted by the submission module is stored in the central event server through the time sequence database, and the data table fields include: timestamp, event submission terminal name, event source name, event source number, event category, and additional parameters;
[0019] The event retrieval terminal is a computer terminal supporting HTTP protocol, which can be a desktop computer, a tablet computer, a mobile computing device or an embedded industrial computer. The event retrieval terminal is connected to the central event server in two modes, i.e., a subscription mode and a query mode. In the subscription mode, the central event server actively pushes the received events to the event retrieval terminal. In the subscription mode, the maximum number of subscriptions is set. When the number of unread events exceeds the maximum number of subscriptions, only the maximum number of events is pushed. In the query mode, the user can input the time range of the events to be queried to query the archived events. In both the query mode and the subscription mode, the user can perform operations such as filtering and sorting on the received event set according to time, event submission terminal, event subject and event type through the event retrieval page.
[0020] The present application also has the advantages of solving the problems of the existing industrial automation system, especially the large-scale automation system, such as the rough event collection system, the loss of key information and the difficulty in adapting to large-scale automation systems, and providing an event collection method, device and system with extremely fine granularity (computer instruction level, the time for a controller to execute an instruction is about 2-10 nanoseconds), carrying a nanosecond-level high-precision timestamp and high reliability.
[0021] The present application can effectively solve the problems of the traditional SCADA system or industrial configuration software in dealing with large-scale automation systems in terms of accuracy, reliability, scalability and retrieval, and can effectively improve the intelligent level of production enterprises and improve their operation and maintenance capabilities of the automation system, thereby providing a solid infrastructure for the transformation and development of enterprises. Embodiments
[0022] The present application will be described in detail below with reference to specific embodiments. The following embodiments will help those skilled in the art to further understand the present application, but do not limit the present application in any form. It should be noted that those skilled in the art can make several changes and improvements without departing from the concept of the present application. These are within the scope of the present application.
[0023] The application provides an event collection method of a large-scale automation system, which comprises definition of event subjects and related standard events in an industrial automation system. In the embodiment, the following event subjects of the industrial automation system are defined: TYPE_A, a detection instrument class, which is composed of instruments such as pressure transmitters, electromagnetic flowmeters and ultrasonic liquid level meters; TYPE_B, a one-way motion motor class, which is composed of belts, fans and water pumps; TYPE_C, a two-way motion motor class, which is composed of electric valves; TYPE_D, a pneumatic cylinder, hydraulic and valve class, which is composed of pneumatic valves; TYPE_E, an adjustable class device, which is composed of electric regulating valves and frequency converters; TYPE_X, an automatic control program class, which comprises an automatic control program written in a PLC or a DCS in the automation system; and TYPE_Z, a controller system event, such as a cycle timeout of a PLC / DSC, a cold start and a hot start.
[0024] The following takes TYPE_A and TYPE_B as examples to illustrate how to define the standard events according to the method of the application in the embodiment.
[0025] The standard events are defined. TYPE_A defines the following three-level standard events: signal abnormality, key low limit alarm, low limit alarm, high limit alarm, key high limit alarm, enablement / cancellation of key low limit, low limit, high limit, key high limit alarm, key low limit set value, low limit set value, high limit set value, key high limit set value change and 16 standard alarm events, and event codes 16#W0100-16#W010F are assigned. TYPE_B defines two-level standard events such as power tripping, motor tripping, start failure and the like, and event codes 16#W0200-16#W020F are assigned; defines three-level standard events such as motor temperature being high, bearing temperature being high and the like, and event codes 16#W0210-16#W021F are assigned; and defines four-level standard events such as power closing / opening, switching to a remote mode, switching to an on-site mode and switching to an automatic mode, and event codes 16#W0230-16#W023F are assigned.
[0026] The application provides an event collection device and system of a large-scale automation system, which comprises:
[0027] Event stack module, 2 event stack units are defined in the controller, 4X register area can be selected if Schneider series PLC is selected, background data block can be selected if Siemens PLC is selected, it must be pointed out that the physical structure of the event stack depends on the selected controller PLC / DCS, but the logic structure is limited by the following structure, including three state flag bits: Idling, FullLoaded, Engaged, each event item contains 5 fields: timestamp, submitter, identity, evcode, para, occupying 20 bytes.
[0028] Event collection module, according to the defined event code, configure the event collection module at the controller terminal, the event collection module is a general module, different event subjects realize specific event collection by calling the event collection module and assigning four input parameters, these input parameters include: current system timestamp, event subject, event code, event submission terminal name. When the event occurs, the event subject generates the event flag bit, and notifies the event collection module to collect, the operation of the event stack part in the event collection module is an atomic operation, which needs to be interrupted. The event collection module can be designed as a sub-function of PLC or DCS system, such as FC module can be considered to be selected in Siemens PLC, in the specific implementation process, the interrupt priority mechanism of different industrial controllers such as PLC / DCS needs to be considered, therefore the atomic operation in the collection module needs to be realized according to the interrupt shielding instruction provided by different controllers, and the atomic operation instruction needs to be minimized.
[0029] Event collection module, according to the defined event code, configure the event collection module at the controller terminal, the event collection module is a general module, different event subjects realize specific event collection by calling the event collection module and assigning four input parameters, these input parameters include: current system timestamp, event subject, event code, event submission terminal name. When the event occurs, the event subject generates the event flag bit, and notifies the event collection module to collect, the operation of the event stack part in the event collection module is an atomic operation.
[0030] Event submission module, the event submission module communicates with the central event server through timing trigger or batch trigger. The event submission module stack operation is an atomic operation, which needs to be interrupted. The timing trigger or batch trigger depends on the timer trigger time or batch quantity check, the event submission module should be the only mechanism for triggering the event submission module when the system runs stably, when the system occurs abnormally, a large number of event bursts caused by jitter need to be considered, so batch trigger is considered. In the specific implementation, it can be designed as a sub-function of PLC system or DCS system, and has higher loop priority.
[0031] The events collected by the event collection module are submitted to the central event server in a timed or batch manner. The event submission module includes functions such as timing judgment, batch quantity judgment, communication with the central event server, atomic operation, etc. The specific functions are that the event submission module judges whether the events should be submitted according to the set timing period or whether the current event stack reaches the batch submission quantity, and then calls the communication protocol stack module to generate a communication data frame to submit the data, and after completion, the submitted data needs to be cleared. The stack operation is an atomic operation, which ensures that the clearing program is not interrupted by other parallel stack programs.
[0032] The communication protocol stack module, protocol stack module, realizes the serialization and encoding of the event metadata to be submitted and sent by the event submission module, and packages it into a TCP data frame to realize data transmission. In the present application, the communication protocol stack module is called by the event submission module, and involves the serialization of communication data and the construction of data frames, so in specific implementation, a language with higher expression capacity needs to be considered for implementation, such as a structured text description supported by PLC or DCS system. The event item data submitted by the event submission module is processed, and the specific mode is to package the event item data to be submitted into a TCP data frame, and provide functions such as data serialization, data verification, and generation of communication state descriptors.
[0033] The central event server is composed of server hardware, event message queue, event request processing program and event publishing server program. The centralized event server can accept submission requests from multiple event submission modules, i.e. event submission terminals. When there are multiple event submission requests at the same time, the centralized server sorts and processes all event requests in the form of a message queue. At the same time, the centralized event server is responsible for detecting data requests from event display terminals, and when an event display terminal is accessed, it provides event retrieval services based on subscription / query. The event information submitted by the submission module is stored in the centralized event information server through a time series database, and the data table fields include: timestamp, event submission terminal name, event source name, event source number, event category, additional parameters. In specific implementation, the central event server selects a time series database to archive the event data submitted by the terminal device, and the event table established by the time series database includes the following fields: timestamp, event submission terminal name, event source name, event source number, event category, additional parameters. Among them, the timestamp is used as the primary key of the data table, which ensures the uniqueness of the event data.
[0034] Event retrieval terminal. Computer terminal configured to support HTTP protocol, desktop computer, tablet computer, mobile computing device, embedded industrial computer can be used as event retrieval terminal. Adopting subscription or two kinds of ways and central event server connection, default is subscription mode, when the central event server receives new event will actively push the received event to the event retrieval terminal participating in subscription. In subscription mode, there is a maximum subscription number, when the number of unread events exceeds this value, only the maximum subscription number of events is pushed. In query mode, users can query archived events by inputting the event occurrence time range to be queried. In query and subscription mode, users can perform filtering, sorting, etc. on the current received event set according to time, event submission terminal, event subject and event type through the event retrieval page.
[0035] In this embodiment, a desktop computer terminal is used as a retrieval terminal, and events are retrieved through a browser page. Query and subscription are used to connect with the centralized event information server, and the default is the subscription mode. When the event publishing server receives a new event, it will actively push the received event to the event retrieval terminal participating in the subscription. On the event retrieval terminal page, users can perform filtering and sorting operations on the current retrieved event set according to time, event subject, event submission terminal, event code and event level classification.
Claims
1. An event collection method for a large-scale industrial automation system, characterized by: Comprising the following steps Step one, definition step, classifying the devices involved in large-scale industrial automation system and defining four-level standard events, each event subject corresponds to one to four-level standard events based on 16-bit unsigned integer coding, event subjects of the same category correspond to the same integer region; The first-level event is defined as a controller system event, the second-level event is defined as an event generating critical alarm information, the third-level event is a general alarm event, and the fourth-level event is defined as a device or program generated action event; Each event contains 5 fields, namely timestamp, submitter, identity, evcode, and para, occupying 20 bytes, wherein timestamp represents the time stamp, which is the time when each event occurs, submitter represents the event submission terminal, which specifically represents which event stack submits the event to the central event server, identity represents the event subject, which is the action generator of the event, evcode represents the event code, which is an integer 16-bit unsigned number, and para represents the action additional parameter, which is a 16-bit 32-bit double word type data; Step two, event collection step, when each event subject corresponds to an event, take an event subject as the minimum collection unit, get the nanosecond level time stamp corresponding to the controller instruction when the event occurs, and the event subject, event code and related additional parameters, take 5 fields as an event item and enter the event stack; Step three, event submission step, set the submission period and batch submission quantity, when the time meets the submission period or the number of events in the event stack meets the batch submission quantity, serialize each field of each event in the event stack, and send the event in the event stack to the central event server through the protocol stack program to generate a data frame, the central event server includes a message queue, when multiple event stacks submit events at the same time, send to the central event server concurrently, in the central event server, the received events are stored in the time sequence database; Step four, event subscription and query step, the event retrieval terminal is connected with the central event server, and the events archived in the central event server are pushed to the event retrieval terminal through subscription or query mode.
2. The event collection method of a large-scale industrial automation system according to claim 1, characterized by: The classification of the devices involved in the large-scale industrial automation system is to define each device as an event subject, and classify according to the event subject, including detection instrument class, bidirectional motion motor class, unidirectional motion motor class, gas-liquid pressure class, valve class, adjustable class and servo class.
3. An apparatus for event collection method of a large-scale industrial automation system, characterized by: Comprising the following device Event stack, configured in the controller terminal, each event stack configures two data units of the same structure to realize double buffering, and the two data units are switched by a flag bit. Each data unit defines three status flag bits: Idling, FullLoaded, and Engaged. When Engaged is true, the data unit is the working stack, and the event data is entered into this data unit; otherwise, the event is entered into another data unit, which is not used. When Engaged is true and Idling is true, the event collection program writes the current event into this data unit, and resets the Idling flag bit to false; When the FullLoad flag bit is true, it indicates that the data unit has reached the batch submission quantity, and the event submission module needs to be notified to submit events. To improve processing efficiency, all event item fields in the event stack are designed to be minimized. Each event item contains five fields, namely timestamp, submitter, identity, evcode, and para, occupying 20 bytes. The timestamp represents the time stamp, which is the time of each event occurrence. The submitter represents the event submission terminal, which specifically represents which event stack submits the event to the central event server. The identity represents the event subject, which is the action performer of the event. The evcode represents the event code, which is an unsigned 16-bit integer. The para represents the action-attached parameter, which is a 32-bit double-word hexadecimal data; Event collection module, configured in the controller terminal, generates the flag bit of the defined event by building an event flag without changing the original automation program logic. The event collection module collects events in the control program with a single event subject as the basic collection unit. The event collection module includes nanosecond-level timestamp generation, event stack state detection, event stacking processing, and atomic operation functions. The functions are triggered by the event collection module according to the event flag, obtain the current timestamp, detect the event stack state, and then press the five fields of the event item corresponding to the event into the event stack. Atomic operation is required during the stacking process to ensure that the stacking program is not interrupted by other parallel stacking programs. Event submission module, configured in the controller terminal, submits events collected by the event collection module to the central event server in a timed or batch manner. The event submission module includes timing judgment, batch quantity judgment, communication with the central event server, and atomic operation functions. The specific functions are whether the event should be submitted according to the set timing period or whether the current event stack reaches the batch submission quantity, and then the communication protocol stack module generates a communication data frame to submit the data. After completion, the submitted data needs to be cleared. The stack operation is an atomic operation to ensure that the clearing program is not interrupted by other parallel stacking programs. A communication protocol stack module is configured in the controller terminal to process the event item data submitted by the event submission module. Specifically, the event item data to be submitted is packed into a TCP data frame, and functions of serializing data, checking data, and generating a communication status descriptor are provided. The central event server is composed of a server hardware, an event message queue, an event request processing program, and an event publishing server program. The central event server can accept submission requests from multiple event submission modules, i.e., event submission terminals. When there are multiple event submission requests at the same time, the central event server sorts and processes all event requests by using a message queue. Meanwhile, the central event server is responsible for detecting data requests from event retrieval terminals. When there is an event retrieval terminal, the central event server provides event retrieval services based on subscription / query. The event information submitted by the submission module is stored in the central event server by using a time sequence database. The data table fields include: a timestamp, an event submission terminal name, an event source name, an event source number, an event category, and additional parameters. The event retrieval terminal is a computer terminal configured to support an HTTP protocol. A desktop computer, a tablet computer, a mobile computing device, and an embedded industrial computer are used as the event retrieval terminal. The event retrieval terminal is connected to the central event server in two modes of subscription and query. By default, the subscription mode is used. When the central event server receives a new event, the central event server actively pushes the received event to the event retrieval terminal participating in the subscription. In the subscription mode, a maximum number of subscriptions is set. When the number of unread events exceeds the number, only the maximum number of events is pushed. In the query mode, a user inputs an event occurrence time range to be queried to query the archived events. In the query and subscription modes, a user performs filtering and sorting operations on the current received event set by using an event retrieval page according to time, an event submission terminal, an event subject, and an event type.
Citation Information
Patent Citations
Internet of Things general event service mechanism based on Restful Web Service
CN104462235A
Event subscription method, apparatus and system
CN104967652A