An industrial data acquisition system and method
By introducing an event center and various types of managers and listeners, the problem of mutual influence between channels in industrial data collection is solved, system decoupling and performance improvement are achieved, and the stability and maintainability of the system are ensured.
Patent Information
- Application Number
- CN202310132103.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-06
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2043-02-06
AI Technical Summary
In existing industrial data collection solutions, the integration of scheduling tasks and collection tasks leads to unstable time consumption, and there is mutual influence between different collection channels, which affects the overall scheduling task cycle and collection efficiency.
An event center is introduced, and industrial collection parameters are sent to the event center as pending events through the collection control module. The event center manages, distributes and processes events, and uses various types of managers and listeners to isolate the tasks of different collection channels, thereby decoupling system modules and reducing the mutual influence between channels.
It improves the maintainability and scalability of the system, realizes low-cost access or expansion capabilities, and improves collection performance and system stability.
Smart Images

Figure CN116257025B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of industrial control, in particular, to an industrial data acquisition system and method. BACKGROUND
[0002] This section is intended to provide background information to facilitate an understanding of embodiments of the application as set forth in the claims. The description herein does not constitute admission of prior art.
[0003] Industrial acquisition refers to acquiring data of industrial devices, PLCs, DCSs and the like devices or systems through certain industrial driving protocols. Industrial control refers to issuing instruction data to industrial devices, PLCs, DCSs and the like devices or systems through certain industrial driving protocols. In existing industrial acquisition schemes, scheduling tasks and acquisition tasks are integrated, and thus factors such as unstable time consumption of acquisition tasks will affect overall scheduling task cycle acquisition. In addition, acquisition tasks share a thread pool, and different acquisition channels will affect each other. SUMMARY
[0004] Embodiments of the present application provide an industrial data acquisition system and method to improve the performance of industrial acquisition.
[0005] According to one aspect of the present application, an industrial data acquisition system is also provided, which includes an acquisition control module and an event center; the event center includes at least one type of manager and at least one type of listener; the acquisition control module is configured to acquire industrial acquisition parameters, and send the industrial acquisition parameters as a first to-be-processed event to the event center; the industrial acquisition parameters include a first type parameter and a first attribute parameter; the event center is configured to, when receiving an event, distribute the event to a target type of manager according to the first type parameter of the event, and control a target type of listener to process the event distributed to the target type of manager according to the first attribute parameter of the event; and the event center is further configured to send a first processing result obtained according to the first to-be-processed event to a data service center.
[0006] According to another aspect of the present application, an industrial data acquisition method is also provided, which includes: an acquisition control module acquires industrial acquisition parameters, and sends the industrial acquisition parameters as a first to-be-processed event to an event center; the industrial acquisition parameters include a first type parameter and a first attribute parameter; the event center, when receiving an event, distributes the event to a target type of manager according to the first type parameter of the event, and controls a target type of listener to process the event distributed to the target type of manager according to the first attribute parameter of the event; and the event center sends a first processing result obtained according to the first to-be-processed event to a data service center.
[0007] According to another aspect of the present application, there is also provided an electronic device comprising: a processor; and a memory storing a program, wherein the program comprises instructions which, when executed by the processor, cause the processor to perform the method steps according to the above.
[0008] According to another aspect of the present application, there is also provided a non-transitory computer readable storage medium storing computer instructions for causing a computer to perform the method steps according to the above.
[0009] In the embodiments of the present application, an industrial data acquisition system comprises an acquisition control module and an event center; the event center comprises at least one type of manager and at least one type of listener; the acquisition control module is configured to acquire industrial acquisition parameters, and send the industrial acquisition parameters as a first to-be-processed event to the event center; the industrial acquisition parameters comprise a first type parameter and a first attribute parameter; the event center is configured to, when receiving an event, distribute the event to a target type of manager according to the first type parameter of the event, and control a target type of listener to process the event distributed to the target type of manager according to the first attribute parameter of the event; and the event center is further configured to send a first processing result obtained according to the first to-be-processed event to a data service center. The present application introduces an event center, the acquisition control module sends the industrial acquisition parameters as a first to-be-processed event to the event center, the event center manages, distributes and processes all events, and by setting a plurality of types of managers and listeners in the event center, the acquisition tasks of different acquisition channels can be isolated, the mutual influence between different acquisition channels is reduced, the decoupling of system modules is realized, the maintainability of the system is improved, and low-cost access or expansion capability can be realized. BRIEF DESCRIPTION OF DRAWINGS
[0010] The accompanying drawings, which form a part of the present application, are intended to provide further understanding of the present application, and are used to interpret the illustrative embodiments of the present application and their descriptions, and are not intended to be an improper limitation of the present application. In the drawings:
[0011] Figure 1 FIG. 1 shows a structure block diagram of an industrial data acquisition system according to an embodiment of the present application;
[0012] Figure 2 FIG. 2 shows a schematic diagram of an industrial data acquisition system according to an embodiment of the present application;
[0013] Figure 3 FIG. 3 shows a structure schematic diagram of an acquisition control module according to an embodiment of the present application;
[0014] Figure 4A structural block diagram of an exemplary electronic device that can be used to implement embodiments of the present disclosure is shown
[0015] Figure 5 A flowchart of an industrial data collection method according to embodiments of the present application is shown.
[0016] Figure 6 Another structural block diagram of an industrial data collection system according to embodiments of the present application is shown. DETAILED DESCRIPTION
[0017] Embodiments of the present disclosure will be described below in greater detail with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it is understood that the present disclosure can be embodied in various forms and should not be interpreted as being limited to the embodiments set forth herein; rather, these embodiments are provided so as to more completely and thoroughly understand the present disclosure. It is understood that the drawings and embodiments of the present disclosure are for exemplary purposes only and are not intended to limit the scope of protection of the present disclosure.
[0018] It should be understood that each of the steps recited in the method embodiments of the present disclosure can be performed in different orders and / or in parallel. In addition, the method embodiments can include additional steps and / or omit performing the steps shown. The scope of the present disclosure is not limited in this respect.
[0019] The term “comprising” and variations thereof as used herein are open-ended, that is, “comprising but not limited to.” The term “one embodiment” means “at least one embodiment.” The term “another embodiment” means “at least one additional embodiment.” The term “some embodiments” means “at least some embodiments.” Related terms are defined as follows: “consisting of” means “including and limited to;” “consisting essentially of” means “including at least the recited ingredients and any additional ingredients;” and “consisting essentially of” means “including at least the recited ingredients and any additional ingredients that do not materially change the basic and novel characteristics of the claimed application.” It is understood that the terms “comprising,” “including,” “containing,” and “having” are inclusive and therefore specify the presence of stated features, integers, steps, operations, elements, or components but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, or groups thereof. It is also understood that the use of the terms “first,” “second,” “third,” etc. merely designate different units or apparatuses, and do not limit the scope of the claimed application to any particular order of performing the functions described.
[0020] It should be noted that the terms “one,” “plural” or “a plurality” of adjectives in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise explicitly stated in the context, it should be understood as “one or more.”
[0021] The names of the messages or information exchanged between the plurality of apparatuses in the embodiments of the present disclosure are merely for illustrative purposes, and are not intended to limit the scope of the messages or information.
[0022] In the intelligent control and energy optimization scene of industry, real-time docking with the production system such as DCS of the customer is carried out, and safe and reliable data acquisition and control bidirectional millisecond level communication ability must be achieved. The industrial control gateway involves many industrial protocols, many standards, many private protocols, many types of connected data equipment and systems, large data volume, high safety and stability requirements of industrial control, and different specifications of industrial DCS / PLC hardware configuration, which greatly affect the stability of acquisition and control. The safety of acquisition and control has a great impact on enterprise production. Therefore, an extensible and easy-to-integrate system architecture is needed to solve the problems of many industrial protocols and standards. At the same time, a reasonable system architecture is needed to meet the product and system characteristics of industrial control from the perspective of data acquisition and control safety and stability.
[0023] Based on the above background, the present application proposes an industrial data acquisition system and method, which can achieve the following three dimensions of basic requirements of high reliability, safety and stability: a, unified abstract task modeling, based on event-driven architecture, to build an extensible and easy-to-integrate industrial intelligent control gateway system. b, data acquisition, which realizes the separation of scheduling and acquisition tasks in terms of ability, thread-level isolation between different channels, support for batch processing to improve the performance of acquisition, and support for the fuse mechanism to maximize the safety and stability of production equipment. c, industrial control, providing multiple protection mechanisms such as quality code, upper and lower limits, dead zone protection, and three different writing strategies to maximize the safety and stability of industrial equipment and devices.
[0024] In the present embodiment, an industrial data acquisition system is provided, Figure 1 is a structure block diagram of the industrial data acquisition system according to the embodiment of the present application, and the following describes the system involved in Figure 1
[0025] The system includes an acquisition control module 12 and an event center 14; the event center includes at least one type of manager and at least one type of listener; the acquisition control module is configured to obtain industrial acquisition parameters, and send the industrial acquisition parameters as a first to-be-processed event to the event center; the industrial acquisition parameters include a first type parameter and a first attribute parameter; the event center is configured to, when receiving an event, distribute the event to a target type of manager according to the first type parameter of the event, and control a target type of listener to process the event distributed to the target type of manager according to the first attribute parameter of the event; and the event center is further configured to send a first processing result obtained according to the first to-be-processed event to a data service center.
[0026] In the embodiment of the present application, the industrial data acquisition system is in communication connection with the industrial equipment through an acquisition control module, and the acquisition control module is in communication connection with an event center. The acquisition control module can be used to acquire data generated by the industrial equipment, i.e., to acquire industrial acquisition parameters, and the industrial acquisition parameters are sent to the event center as first to-be-processed events. The industrial acquisition parameters include first type parameters and first attribute parameters. The first type parameters are used to determine the processing mode of the first to-be-processed events, and the first attribute parameters are used to determine the specific processing steps of the first to-be-processed events under a certain processing mode. The first type parameters and the first attribute parameters can be obtained by defining the industrial acquisition parameters in advance.
[0027] A plurality of types of managers and a plurality of types of listeners can be declared in the event center in advance. After an event publisher publishes an event to the event center, the event publisher can leave without waiting for the event to be executed, so that asynchronous processing is achieved. Through the managers and the listeners, the event center can uniformly manage, distribute and process events, and decouple industrial data tasks. The event center is used to receive the first to-be-processed events sent by the acquisition control module. When the event center receives an event, the event center determines a target type of manager from the plurality of types of managers according to the first type parameters, and distributes the received event to the target type of manager. Then, the event center determines a target type of listener from the plurality of types of listeners according to the first attribute parameters, and controls the target type of listener to process the event distributed to the target type of manager.
[0028] The event center is also used to send a first processing result obtained according to the first to-be-processed event to the data service center, so as to implement an industrial acquisition process.
[0029] In the embodiment of the present application, the industrial data acquisition system comprises an acquisition control module and an event center; the event center comprises at least one type of manager and at least one type of listener; the acquisition control module is configured to acquire industrial acquisition parameters, and send the industrial acquisition parameters as first to-be-processed events to the event center; the industrial acquisition parameters comprise first type parameters and first attribute parameters; the event center is configured to, when receiving an event, distribute the event to a target type of manager according to the first type parameters of the event, and control a target type of listener to process the event distributed to the target type of manager according to the first attribute parameters of the event; and the event center is further configured to send a first processing result obtained according to the first to-be-processed event to a data service center. The event center is introduced, the acquisition control module sends the industrial acquisition parameters as first to-be-processed events to the event center, the event center manages, distributes and processes all events, a plurality of types of managers and listeners are set in the event center, the acquisition tasks of different acquisition channels can be isolated, the mutual influence between different acquisition channels is reduced, the decoupling of system modules is realized, the maintainability of the system is improved, and low-cost access or expansion capability can be realized.
[0030] On the basis of introducing the event center, considering that a plurality of types of managers and a plurality of types of listeners are declared in the event center in advance, not only the industrial data acquisition work can be processed, but also the event center can be used to process work such as industrial data writing, therefore, in a possible implementation manner, the system further comprises the data service center, the data service center is configured to receive and store the first processing result; the data service center is further configured to receive write request data, send the write request data as second to-be-processed events to the event center; the write request data comprises second type parameters and second attribute parameters; the event center is configured to, when receiving an event, distribute the event to a target type of manager according to the second type parameters of the event, and control a target type of listener to process the event distributed to the target type of manager according to the second attribute parameters of the event; the event center is further configured to send a second processing result obtained according to the second to-be-processed event to the acquisition control module; and the acquisition control module is further configured to receive the second processing result, determine target write data according to the second processing result, and write the target write data to a target device.
[0031] In the embodiment of the present application, referring to another structural block diagram of the industrial data acquisition system according to the embodiment of the present application shown in FIG. 2, Figure 6 The event center 14 is in communication connection with the acquisition control module 12 and the data service center 16 respectively, wherein the data service center can be configured to receive and store the first processing result sent by the event center, so as to facilitate the user to query data.
[0032] The data service center can be in communication connection with the management end, for receiving the write request data sent by the management end, and sending the write request data as a second to-be-processed event to the event center; the write request data comprises a second type parameter and a second attribute parameter, wherein the second type parameter is used to determine the processing mode of the second to-be-processed event, and the second attribute parameter is used to determine the specific processing step of the second to-be-processed event under a certain processing mode. The second type parameter and the second attribute parameter can be obtained by defining the write request data in advance.
[0033] A plurality of types of managers and a plurality of types of listeners can be declared in the event center in advance, and the event publisher can leave after publishing the event to the event center, without waiting for the event to be executed to completion, so as to realize asynchronous processing. Through the managers and the listeners, the event center can uniformly manage, distribute and process events, and decouple industrial data tasks. The event center is used to receive the second to-be-processed event sent by the data service center. When the event center receives the event, a target type of manager is determined from the plurality of types of managers according to the second type parameter, and the received event is distributed to the target type of manager. Then, a target type of listener is determined from the plurality of types of listeners according to the second attribute parameter, and the target type of listener is controlled to process the event distributed to the target type of manager.
[0034] The event center is also used to send a second processing result obtained according to the second to-be-processed event to the collection control module, so as to realize an industrial write process.
[0035] The collection control module is also used to receive the second processing result sent by the event center, determine a target write data in the second processing result according to a preset data screening condition, and write the target write data into a target device. It should be noted that the data screening condition can be set according to the requirements of the data type, category, format and the like, so as to screen out the target write data for writing into the device.
[0036] In the embodiments of the present application, the managers and the listeners of the event center are used to process the write task, the write process can be dynamically adjusted, so that the industrial data collection system can be applied to an industrial data control process, and the write pressure on the industrial device is greatly reduced.
[0037] In order to reduce the impact of burst traffic impact, in an optional embodiment, the event center comprises: a queue unit, used to add the received event to a blocking queue of the target type of manager; and a processing unit, used to obtain a target event from the blocking queue, and control a target type of listener to process the target event according to the attribute parameter of the target event.
[0038] In the above optional implementation, the manager of the event center is provided with a blocking queue, and the queue unit of the event center is used to add the received events to the blocking queue of the manager of the target type, and then the processing unit obtains the target event from the blocking queue, and controls the listener of the target type to process the target event according to the attribute parameters of the target event, so that the same type of events can be buffered and the impact of sudden traffic shocks can be reduced.
[0039] As an optional implementation, the event center includes at least one type of manager, which may be a single event manager, a batch event manager, and a delayed event manager; the type parameter is a single event parameter, a batch event parameter, or a delayed event parameter; the queue unit is specifically used to: if the type parameter of the received event is a single event parameter, then the received event is added to the blocking queue of the single event manager; if the type parameter of the received event is a batch event parameter, then the received event is added to the blocking queue of the batch event manager; if the type parameter of the received event is a delayed event parameter, then the received event is sent to the blocking queue of the delayed event manager.
[0040] In the above optional implementation, the single event manager can be used to process single events such as acquisition events, control events, and heartbeat events. The batch event manager can be used to merge repeated events or batch process events of the same type to improve the throughput of the system. The delayed event manager can be used to process delayed events whose response time exceeds a preset time threshold due to abnormal conditions such as high pressure. The type parameter is a single event parameter, a batch event parameter, or a delayed event parameter. According to the type parameter of the received event, the received event is added to the blocking queue of the corresponding manager, that is, if the type parameter of the received event is a single event parameter, the received event is added to the blocking queue of the single event manager; if the type parameter of the received event is a batch event parameter, the received event is added to the blocking queue of the batch event manager; if the type parameter of the received event is a delayed event parameter, the received event is sent to the blocking queue of the delayed event manager.
[0041] As an optional implementation, the processing unit is specifically used to: obtain a first target event from the blocking queue of the single event manager, and control the listener of the target type to process the first target event according to the attribute parameters of the first target event; obtain a second target event from the blocking queue of the batch event manager, and control multiple listeners of the target type to process the second target event in parallel according to the attribute parameters of the second target event; obtain a third target event from the blocking queue of the delayed event manager, and control the listener of the target type to process the third target event according to the attribute parameters of the third target event.
[0042] In the optional implementation described above, the listener can be used to perform specific event processing steps such as forwarding, writing, etc. According to the attribute parameters of the event, a listener of a target type can be selected for the event, and it should be noted that one or more listeners of a target type can be selected to process the event according to actual needs. The event obtained from the blocking queue of the single event manager is taken as a first target event, and the listener of a target type is controlled to process the first target event according to the attribute parameters of the first target event; the event obtained from the blocking queue of the batch event manager is taken as a second target event, and multiple listeners of a target type are controlled to process the second target event in parallel according to the attribute parameters of the second target event; the event obtained from the blocking queue of the delay event manager is taken as a third target event, and the listener of a target type is controlled to process the third target event according to the attribute parameters of the third target event. Different types of managers can process the received events through corresponding listeners to achieve efficient processing of different types of events.
[0043] In order to enable more efficient use of resources, as an optional implementation, the processing unit is further configured to adjust the number of listeners corresponding to the manager of the target type according to the query rate per second and the event response time length.
[0044] In the optional implementation described above, the means of adjusting the number of listeners corresponding to the manager of the target type can be increasing the number of listeners corresponding to the manager of the target type or reducing the number of listeners corresponding to the manager of the target type. The processing unit can perform scaling of different granularities according to system running conditions and preset strategies, for example, dynamically adjusting the size of the manager thread pool, adjusting the number of listeners corresponding to the manager, etc. according to parameters such as QPS (Queries Per Second) and event response time length, to ensure efficient use of resources.
[0045] As one of the key capabilities to obtain production data, the acquisition engine is a cornerstone of intelligent manufacturing for safely and stably obtaining data of a customer-side production system. At the same time, the quality of the obtained data directly affects the effect of industrial intelligent control and process optimization. Therefore, as an optional implementation, the acquisition control module can be specifically configured to write, as target writing data, data with a quality code value not less than a preset quality code threshold in the second processing result.
[0046] In the optional implementation, the quality code can be used to evaluate the quality of the collected device measurement point data. The quality code threshold can be set according to actual needs, and the embodiments of the present application are not specifically limited herein. For example, when the control engine is issued, the data with a quality code value not less than the preset quality code threshold in the second processing result is written as target write data, thereby realizing the control of issuing data with a quality code >= 192. It should be noted that the collected device measurement point data has a quality code in addition to time and value. In the OPC DA (OLE for Process Control Data Access, Data Access Based on OPC Standard) protocol, only data with a quality code >= 192 is good quality data. Therefore, in the calculation process, only the measurement point data participating in the calculation is data with a quality code >= 192, and the final calculation result data quality code can be >= 192.
[0047] In order to improve the effectiveness of the data, in an optional implementation, the collection control module is specifically configured to: write, as target write data, data in the second processing result within the upper and lower limit protection range.
[0048] In the optional implementation, the upper and lower limit protection range can be set according to actual needs, and the data is screened by using the upper and lower limit protection range. When the data is issued to the device, the control engine automatically detects whether the data is within the limited range, and only the data meeting the condition is issued to the device level, thereby reducing the data pressure of the device level.
[0049] In order to better control the frequency of writing in the scenario where the data changes, the control of writing can be optimized according to the degree of data change, and therefore, the collection control module can be specifically configured to: if the degree of change of the update data included in the second processing result meets a preset interval range, the update data is written as target write data.
[0050] In the optional implementation, the second processing result can include one or more data, and part or all of the data can be in a state of continuous updating. The data in the second processing result in the state of continuous updating is taken as the updating data. The degree of variation of the updating data can be described by the difference between the two groups of data before and after the variation. The preset interval range can be set according to actual needs, and the embodiments of the present application do not make specific limitation on this. The target write data is screened by the degree of variation of the data, so as to avoid the situation that the write operation is performed every time the data in the second processing result is updated. For example, when the data is changed, if the numerical value type of the measurement is greater than a certain interval range, the write operation is performed again. The advantage of this is that many industrial field devices are old or have low configuration, so the bottom pressure on the device is reduced, thereby ensuring the safety and stability of production. Alternatively, the acquisition control module is further configured to: take the updating data in the second processing result as the target write data at intervals of a preset time length, so as to realize forced writing, which can be used as a timeout mechanism to protect the device. For example, if the degree of variation of the updating data included in the second processing result does not always meet the preset interval range within a time interval, the updating data in the second processing result is taken as the target write data to perform the write operation at the end of the time interval, thereby reducing the impact of timeout on the device.
[0051] In an optional implementation, the acquisition control module is specifically configured to: acquire a write mode instruction; and determine the target write data in the second processing result according to the write mode instruction.
[0052] In the optional implementation, the write mode instruction is used to determine the write mode and the write content. Through the write mode instruction, the control protection scheme can be enriched, and various write strategies such as “write all values of all tags”, “write the latest value of non-Boolean tags” and “write the latest value of all tags” can be implemented. The dynamic selection and optimized adjustment of the write strategy can be realized, and the pressure on the industrial device can be reduced.
[0053] It should be noted that “write all values of all tags”: the control engine attempts to write each value. In this mode, the control engine will continuously collect write requests and add them to the write queue. The control engine will process the write queue and attempt to empty it by writing data to the device as soon as possible. This mode can ensure that all data written from the client application can be sent to the target device. If the order of the write operation or the content of the write item must and can only be displayed on the target device, this mode should be selected.
[0054] "Write the latest value of non-Boolean tags": Since it takes some time to actually send data to the device, multiple consecutive writes to the same value remain in the write queue. If the control engine updates a write value that is already in the write queue, it needs to do significantly less writes to get the same final output value. This way, there are no extra write data remaining in the write queue. Almost as soon as the user stops moving the slide switch, the value in the device reaches its correct value. According to this mode, any non-Boolean value is updated in the internal write queue of the control engine and sent to the device at the next possible opportunity. This can significantly improve the application performance.
[0055] "Write the latest value of all tags": This option applies the theory behind the second optimization mode to all tags. This option is particularly useful if the application only needs to send the latest value to the device. This mode optimizes all write operations by updating the tags in the current write queue before sending them. This is the default mode.
[0056] In order to enable the underlying system to perceive the health of the upper intelligent control system, a square wave signal needs to be sent to the underlying system to inform the system of its health. Therefore, in an optional embodiment, the acquisition control module can further include a periodic write unit configured to write system state information to the target device according to a preset period after establishing a connection with the target device. When the connection between the acquisition driver and the device measurement point is established, a signal data such as a 0-1 alternating square wave signal needs to be written to the measurement point. Let t represent time, T represent period, and s(u) represent a 0-1 alternating function in a single period. The function x(t) is as follows:
[0057] x(t) = ∑s(t-nT), where,
[0058] Referring to the acquisition control module structure diagram shown in Figure 3 In the diagram, the acquisition control module can be connected with OPCDA measurement points through an OPCDA connection pool, connected with OPCUA measurement points through an OPCUA connection pool, connected with ModBus measurement points through a ModBus connection pool, and connected with S7 measurement points through an S7 connection pool.
[0059] It should be noted that the target device can be connected with the acquisition control module through other connection pools. Figure 3The measurement points shown in the figure can also be PLC (Programmable Logic Controller) devices, DCS (Distributed Control System) devices, intelligent instruments, and board cards, etc. The target devices can be connected to the acquisition control module in communication through ProfiBus (a fieldbus standard used in automation technology) and ModBus protocols, etc.
[0060] It should be further noted that the operation of the field devices is complex and sometimes cannot respond well to the acquisition request, which requires the acquisition control module to be able to adaptively adjust the acquisition and writing strategy, to reduce the impact on the industrial devices in extreme cases through the increase of the fuse mechanism, to play a role in protecting the field devices. In specific implementation, the heartbeat detection can be performed on the target device, as shown in Figure 3 , if the heartbeat detection result meets the preset state condition, the connection between the acquisition control module and the target device is disconnected. It should be noted that, as shown in Figure 3 , the acquisition control module can include a plurality of drive processing units corresponding to the measurement points, for example, can include an OPC DA drive processing unit, an OPC UA drive processing unit, a ModBus drive processing unit, and an S7 drive processing unit. The acquisition control module can realize acquisition control management through the drive processing unit. The drive processing unit can be used to store the data collected from the measurement points. The acquisition control module can write the data stored in the drive processing unit into the corresponding measurement points.
[0061] In order to improve the observability and tuning ability of the system, in an optional implementation, the system further includes an operation and maintenance module, which is configured to: acquire running parameters of the acquisition control module, the event center and the data service center respectively; and generate an operation and maintenance result according to the running parameters.
[0062] In the above optional implementation, the operation and maintenance module is in communication connection with the acquisition control module, the event center and the data service center respectively. By providing unified operation and maintenance management, the observability of the system is improved. Micrometer provides a simple and general operation and maintenance client for JVM (Java Virtual Machine) based application programs. The system uses Micrometer to perform operation and maintenance and report on the system running status. The operation and maintenance content includes one or several of the following running parameters: connection state, acquisition time consumption, acquisition quantity, control time consumption, control quantity, etc. At present, the operation and maintenance information is reported to the time series database, which can be viewed using Grafana (an open source data visualization tool).
[0063] It should be noted that the operation and maintenance information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0064] The data generated by industrial equipment is typically time series data, with the following characteristics: All measurement point data has a timestamp, which generally indicates the time the data was generated. Written data is always new and typically generated in chronological order. Data value is closely related to time; the more recent the data is, the higher its value. Utilizing time series data typically requires the use of aggregate computing. This system provides query services for the latest value, interval details, and interval range downsampling, tailored to specific scenarios. It also supports visual chart analysis.
[0065] The following combination Figure 2 The schematic diagram of the industrial data acquisition system shown in FIG. 1 illustrates the architecture of the system.
[0066] This system can be applied to the IGate product as the basic data component of the AICS (a control and optimization product, an open IoT control optimization system based on cloud + AI) intelligent control optimization platform. It is committed to providing safe, stable, reliable, and high-performance data acquisition (northbound) and decision execution (southbound) connection channel capabilities for intelligent applications in the three major industries of manufacturing, automobiles, and power, and to safeguard the production materials and data display effects of the AI control optimization engine. As an industrial data acquisition base, IGate mainly provides four core capabilities: data acquisition, equipment reverse control, data query and calculation, and data storage in industrial sites. It directly connects to the physical equipment in the industrial environment downward, and completes data acquisition and control of hardware equipment by integrating various data acquisition drivers; it is mainly responsible for data processing internally, and completes efficient calculation and storage of industrial data by integrating event engines and data storage engines; it connects to various application scenarios upward, and provides stable data services to upper-level applications by providing equipment management, data query, equipment reverse control and other capabilities.
[0067] There are many communication protocols for equipment / system in industrial automation field. Each communication protocol has corresponding driving parameters and point configuration parameters, so the abstract modeling of metadata is crucial, and it needs to have flexible protocol expansion capability. In the protocol definition, it is abstracted as driving, driving attribute, measurement point attribute, etc. In specific scenarios, instance models such as driving instance, driving attribute instance, equipment instance, measurement point instance, and measurement point attribute instance are abstracted. Because of the variety of industrial communication protocols, in addition to some general basic protocols developed by ourselves, more protocol implementations are given to ecological partners to implement, so in addition to the self-developed acquisition control module that can subscribe to metadata, ecological partners can also subscribe to pull metadata and change data based on unified metadata management, so as to realize extensibility and easy integration in metadata management.
[0068] Since the equipment point data changes very quickly, one of the factors affecting data quality is whether the equipment point data can be obtained according to the established acquisition frequency. Due to the complexity and diversity of customer's on-site environment equipment, network and other factors, in our actual application scenarios, we need to interface with the customer's PLC / DCS system. Different PLC / DCSs will cause great differences in acquisition time due to different hardware configurations including equipment performance differences. In the acquisition engine, the following can be achieved:
[0069] 1) scheduling and collection task separation, scheduling global unified management, collection task to worker thread pool processing, can effectively solve the partial connection channel blockage, cause the overall scheduling task disorder. 2) channel level thread pool, different connection channels carry out thread level resource isolation, can configure the worker number of its own channel, achieve different channels in the scheduling process mutual influence. 3) drive connection pool, collection task has a collection frequency, usually the collection interval time is much larger than the collection time, the connection pool can make the connection in the pool get high efficient and safe reuse, avoid the overhead of frequent connection establishment and close. 4) batch processing, according to the different protocol, realize the ability of batch collection, such as modbus protocol, read multiple register data at a time, then according to the demand for cutting and assembling, so as to effectively improve the performance of collection. 5) data processing, increase the specific data pre, post processing logic of the data collected (such as based on modbus protocol intelligent control scene, the data collected is integer, need to carry on the data reduction 100 times processing, control time, also need to amplify 100 times processing of data). 6) fuse mechanism, the running situation of field device is complex, sometimes can not very good response to the collection request, this requires the collection module can adaptively adjust the collection and write strategy, we increase the fuse mechanism, in the extreme case, reduce the influence on the industrial equipment, play the role of protection of field device. Safe, stable access to customer side production system data is the cornerstone of intelligent manufacturing, so the system also carries on the safety protection to the control downlink, control engine supports several dimensions of protection and write optimization strategy.
[0070] From the perspective of data flow, by introducing event center to decouple system modules, and improve the maintainability of the system, can low cost access or expansion ability. In logic, the behavior of system running process is abstracted as event and its corresponding listener, event center manages, distributes and processes all events, see Figure 2, and can be implemented by, for example, a single event manager, a batch event manager, a delayed event manager, a driven event listener, a time series data storage event listener, and a latest value event listener. When the event center is started, the listeners are loaded and registered through a reflection mechanism. When an event arrives, the event center distributes it to a thread pool of a corresponding event manager (Worker) for execution. The Worker first puts the event into a blocking queue, and then the corresponding Listener processes the event. The data service center manages metadata, point data, and KV (Key-Value) type data. The point data management uses a time series database InfluxDB or Lemming to save historical data for user query and down-sampling analysis. The KV type data management uses Redis (Remote Dictionary Server) and RocksDB (an embedded key-value storage system supporting persistence), which are mainly applied to storage of the latest values of data. The metadata storage can be realized by using MySQL (an open source small relational database management system).
[0071] The application discloses an industrial data acquisition system, which uniformly abstracts task modeling, is based on an event-driven architecture, and creates an extensible and easily integrated industrial intelligent control gateway system. Data acquisition is separated from scheduling and acquisition tasks in terms of capability, thread-level isolation is performed between different channels, batch processing is supported to improve the performance of acquisition, and a fuse mechanism is supported to maximize the safety and stability of production equipment. Industrial control provides a multi-layer protection mechanism such as a quality code, upper and lower limits, and dead zone protection, and simultaneously provides three different writing strategies to maximize the safety and stability of industrial equipment and devices.
[0072] The application further provides an industrial data acquisition method, referring to the industrial data acquisition method flowchart shown in Figure 5 The method comprises the following steps:
[0073] In step S502, the acquisition control module acquires industrial acquisition parameters, and sends the industrial acquisition parameters as a first to-be-processed event to an event center; the industrial acquisition parameters comprise a first type parameter and a first attribute parameter. In step S504, when the event center receives an event, the event center distributes the event to a manager of a target type according to the first type parameter of the event, and controls a listener of the target type to process the event distributed to the manager of the target type according to the first attribute parameter of the event. In step S506, the event center sends a first processing result obtained according to the first to-be-processed event to a data service center.
[0074] The method is used to realize the functions of the system in the above-mentioned embodiments, each step in the method corresponds to a module or center in the system, which has been described in the system and will not be repeated here.
[0075] The exemplary embodiments of the present disclosure further provide an electronic device, comprising: at least one processor; and a memory connected with the at least one processor in communication. The memory stores a computer program capable of being executed by the at least one processor, and the computer program, when executed by the at least one processor, is used to make the electronic device perform the method according to the embodiments of the present disclosure.
[0076] The exemplary embodiments of the present disclosure further provide a non-transitory computer readable storage medium storing a computer program, wherein the computer program, when executed by a processor of a computer, is used to make the computer perform the method according to the embodiments of the present disclosure.
[0077] Reference Figure 4 The structure block diagram of the electronic device 400 which can be a server or a client of the present disclosure will now be described, which is an example of a hardware device that can be applied to various aspects of the present disclosure. The electronic device is intended to represent a variety of forms of digital electronic computing devices such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframes, and other suitable computers. The electronic device can also represent a variety of forms of mobile devices such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections, and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the present disclosure described and / or claimed in this document.
[0078] As Figure 4 shown, the electronic device 400 includes a computing unit 401 that can perform various appropriate actions and processes in accordance with a computer program stored in a read-only memory (ROM) 402 or a computer program loaded from a storage unit 408 into a random access memory (RAM) 403. In the RAM 403, various programs and data required for the operation of the device 400 can also be stored. The computing unit 401, the ROM 402, and the RAM 403 are connected to each other through a bus 404. An input / output (I / O) interface 405 is also connected to the bus 404.
[0079] A plurality of components in the electronic device 400 are connected to the I / O interface 405, including: an input unit 406, an output unit 407, a storage unit 408, and a communication unit 409. The input unit 406 can be any type of device that can input information to the electronic device 400, and can receive inputted digital or character information, and generate key signal inputs related to user settings and / or function controls of the electronic device. The output unit 407 can be any type of device that can present information, and can include, but is not limited to, a display, a speaker, a video / audio output terminal, a vibrator, and / or a printer. The storage unit 408 can include, but is not limited to, a magnetic disk, an optical disk. The communication unit 409 allows the electronic device 400 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks, and can include, but is not limited to, a modem, a network card, an infrared communication device, a wireless communication transceiver, and / or a chipset, such as a Bluetooth device, a WiFi device, a WiMax device, a cellular communication device, and / or the like.
[0080] The computing unit 401 can be various general and / or special purpose processing components with processing and computing capabilities. Some examples of the computing unit 401 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The computing unit 401 performs various methods and processes described above. For example, in some embodiments, the aforementioned cloud desktop encoding method, cloud desktop reconstruction method, or cloud desktop display method can be implemented as a computer software program, which is tangibly embodied in a machine-readable medium, such as the storage unit 408. In some embodiments, part or all of the computer program can be loaded and / or installed onto the electronic device 400 via the ROM 402 and / or the communication unit 409. In some embodiments, the computing unit 401 can be configured to perform the cloud desktop encoding method, cloud desktop reconstruction method, or cloud desktop display method by any other appropriate means, such as by means of firmware.
[0081] Program code for carrying out methods of the present disclosure can be written in any combination of one or more programming languages. The program code can be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the program code, when executed by the processor or controller, produces the functions / operations specified in the flowcharts and / or the block diagrams. The program code can be executed entirely on a machine, partially on a machine, partially on a machine as part of a separate software package, and partially on a remote machine or server.
[0082] In the context of this disclosure, a machine-readable medium can be a tangible medium that contains or stores a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include but is not limited to an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium will include one or more lines of electrical connections, portable computer disks, hard disk drives, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or Flash memory), optical fibers, portable compact disc read-only memories (CD-ROMs), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0083] As used in this disclosure, the terms "machine-readable medium" and "computer- readable medium" refer to any computer program product, apparatus and / or device (e.g., magnetic discs, optical disks, memory, Programmable Logic Devices (PLDs)) used to provide machine instructions and / or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal that can be used to provide machine instructions and / or data to a programmable processor.
[0084] To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the computer. Other kinds of devices can be used to provide for interaction with a user as well; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input.
[0085] The systems and techniques described here can be implemented in a computing system that includes a back end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front end component (e.g., a user computer having a graphical user interface or a Web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back end, middleware, or front end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), and the Internet.
[0086] The computing system can include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other.
[0087] The specific embodiments of the present application are not to be construed as limiting, but rather as illustrative only. Many other variations are possible whose details are within the scope of the present application as defined by the appended claims. The specific embodiments of this application are provided only as examples and should not be used to limit or restrict the scope of the present application to these specific embodiments, but rather the scope of the present application is to be determined by the claims appended hereto.
Claims
1. An industrial data acquisition system, characterized in that: The system includes an acquisition control module and an event center; the event center includes at least one type of manager and at least one type of listener; The acquisition control module is used to obtain industrial acquisition parameters and send the industrial acquisition parameters as the first event to be processed to the event center; the industrial acquisition parameters include a first type parameter and a first attribute parameter; The event center is configured to, upon receiving an event, distribute the event to a manager of a target type according to a first type parameter of the event, and control a listener of the target type to process the event distributed to the manager of the target type according to a first attribute parameter of the event; The event center is further configured to send a first processing result obtained according to the first event to be processed to a data service center; The event center comprises: a queue unit, configured to add received events to a blocking queue of a manager of the target type; And the event center includes a single event manager, a batch event manager and a delayed event manager; The type parameter is a single event parameter, a batch event parameter, or a delayed event parameter; the queue unit is specifically used to: If the type parameter of the received event is a single event parameter, adding the received event to the blocking queue of the single event manager; If the type parameter of the received event is a batch event parameter, the received event is added to the blocking queue of the batch event manager; If the type parameter of the received event is a delayed event parameter, the received event is sent to the blocking queue of the delayed event manager.
2. The system according to claim 1, wherein: The system further comprises the data service center, The data service center is configured to receive and store the first processing result; The data service center is further configured to receive write request data and send the write request data as a second event to be processed to the event center; the write request data includes a second type parameter and a second attribute parameter; The event center is configured to, upon receiving an event, distribute the event to a manager of a target type according to a second type parameter of the event, and control a listener of the target type to process the event distributed to the manager of the target type according to a second attribute parameter of the event; The event center is further configured to send a second processing result obtained according to the second event to be processed to the acquisition control module; The acquisition control module is further configured to receive the second processing result, determine target write data according to the second processing result, and write the target write data into a target device.
3. The system according to claim 1 or 2, characterized in that The event center includes: The processing unit is used to obtain the target event from the blocking queue and control the listener of the target type to process the target event according to the attribute parameters of the target event.
4. The system according to claim 3, characterized in that The processing unit is specifically configured to: Obtain a first target event from the blocking queue of the single event manager, and control a listener of a target type to process the first target event according to attribute parameters of the first target event; Obtain a second target event from the blocking queue of the batch event manager, and control multiple listeners of target types to process the second target event in parallel according to attribute parameters of the second target event; A third target event is obtained from the blocking queue of the delayed event manager, and a listener of a target type is controlled to process the third target event according to attribute parameters of the third target event.
5. The system according to claim 3, wherein: The processing unit is further configured to: Adjust the number of listeners corresponding to the manager of the target type based on the query rate per second and the event response time.
6. The system according to claim 2, wherein: The acquisition control module is specifically used to: The data in the second processing result whose quality code value is not less than the preset quality code threshold is used as the target writing data.
7. The system according to claim 2, wherein: The acquisition control module is specifically used to: The data in the upper and lower protection ranges of the second processing result are used as target write data.
8. The system according to claim 2, wherein: The acquisition control module is specifically used to: If the variation degree of the updated data included in the second processing result satisfies a preset interval range, the updated data is used as target write data.
9. The system according to claim 8, characterized in that The acquisition control module is further used to: At intervals of a preset time, the updated data in the second processing result is used as target write data.
10. The system according to claim 2, wherein: The acquisition control module is specifically used to: Get write mode instruction; According to the write mode instruction, target write data is determined in the second processing result.
11. The system according to claim 2, wherein: It also includes an operation and maintenance module, which is used to: respectively obtaining the operating parameters of the acquisition control module, the event center, and the data service center; An operation and maintenance result is generated according to the operation parameters.
12. An industrial data collection method, characterized in that: The method comprises: The acquisition control module acquires industrial acquisition parameters and sends the industrial acquisition parameters as a first event to be processed to the event center; the industrial acquisition parameters include a first type parameter and a first attribute parameter; When the event center receives an event, it distributes the event to a manager of the target type according to the first type parameter of the event, and controls the listener of the target type to process the event distributed to the manager of the target type according to the first attribute parameter of the event. The event center includes a single event manager, a batch event manager, and a delayed event manager. The event center sends the first processing result obtained according to the first event to be processed to the data service center; The type parameter is a single event parameter, a batch event parameter, or a delayed event parameter; The queue unit of the event center adds the received event to the blocking queue of the manager of the target type, including: If the type parameter of the received event is a single event parameter, adding the received event to the blocking queue of the single event manager; If the type parameter of the received event is a batch event parameter, the received event is added to the blocking queue of the batch event manager; If the type parameter of the received event is a delayed event parameter, the received event is sent to the blocking queue of the delayed event manager.
13. An electronic device comprising: processor; as well as Memory for storing programs, The program includes instructions that, when executed by the processor, cause the processor to perform the method according to claim 12 .
14. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to claim 12.