Data processing method and device
By parsing the device communication description file and configuring the connection between edge devices and field devices, data processing efficiency and application performance problems caused by field device messages or protocol changes in industrial edge devices are solved, and flexible data processing and efficient application performance are achieved.
Patent Information
- Application Number
- CN202311111643.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-30
- Publication Date
- 2025-02-28
AI Technical Summary
In industrial edge devices, when messages or protocol changes of field devices are changed, applications need to rewrite the data layer to adapt to these changes, resulting in reduced data processing efficiency and application performance.
By obtaining and parsing device communication description files, obtaining connection configuration information and data function matching information, configuring the connection between edge devices and field devices, obtaining field data, and adapting it to the data protocol used by the application.
When field devices or communication protocols change, you only need to modify the device communication profile without modifying the application's data exchange configuration, ensuring the efficiency of data processing and the application's performance.
Smart Images

Figure CN119537047A_ABST
Abstract
Description
Technical Field
[0001] The present invention mainly relates to the field of data processing, and in particular to a data processing method and device. Background Art
[0002] Industrial edge devices have an open software platform, and users can deploy applications with different functions based on scenarios. Typically, data is transmitted between field devices and applications for use by IT users and OT users.
[0003] A typical industrial edge device consists of three parts: the connection layer, the data layer, and the application layer. The connection layer is used to connect industrial edge devices to different devices (such as PLCs, motors, inverters, cloud servers, etc.) using different protocols (SIMATIC S7, OPC UA, Modbus, and PROFINET, etc.). Data is collected from the connection layer and distributed to applications. Applications use the data provided by the data layer to implement corresponding functions, such as data storage, data caching, digital twins, and performance analysis.
[0004] For IT users, communication protocols are difficult to understand, especially at the message level. In addition, if the message or protocol of the field device on the field side changes, the data layer corresponding to the application needs to be rewritten to cope with the message or protocol change. If the complex functions of the application involve input variables of one or more devices, multiple requests need to be initiated in the form of events, which will further reduce the performance of the application. Summary of the invention
[0005] In order to solve the above technical problems, the present invention provides a data processing method and device to ensure the efficiency of data processing and the performance of application programs when the message or protocol of the field equipment changes.
[0006] To achieve the above-mentioned purpose, the present invention proposes a data processing method for processing the data of a field device in an edge device for invocation by an application of the edge device, the data processing method comprising: obtaining a device communication description file, parsing the device communication description file to obtain connection configuration information and data function matching information; configuring the connection between the edge device and the field device according to the connection configuration information so that the edge device obtains field data from the field device; determining the target function and data protocol used by the application, obtaining corresponding field data from the field data according to the target function and the data function matching information, and adapting the corresponding field data to the data protocol used by the application. To this end, by providing a device communication description file, the device communication description file includes data function matching information, that is, matching and conversion between data and function can be achieved. When the field device or communication protocol changes, only the device communication description file needs to be modified, and there is no need to modify the data exchange configuration of the application one by one, thereby ensuring the efficiency of data processing and the performance of the application.
[0007] Optionally, the method further comprises: parsing the device communication description file to obtain the data function matching information, wherein the data function matching information comprises a basic function model and a complex function model composed of a plurality of basic function models. To this end, the matching and conversion between data and functions can be achieved through the basic function model and the complex function model.
[0008] Optionally, the method further comprises: the basic function model comprises the functions and information of the field devices, and the complex function model comprises complex functions, events, tasks and assets mapped to the functions and information of different field devices. To this end, by establishing a complex function model, the flexibility of the model and the efficiency of data processing can be improved.
[0009] Optionally, the method further includes: determining data processing requirements of the multiple applications, acquiring corresponding field data from the field data according to the target function and the data function matching information, and processing the field data according to the processing requirements. To this end, the field data is processed according to the data processing requirements of the multiple applications, thereby avoiding repeated processing of data by the multiple applications and improving the overall efficiency of the edge device.
[0010] Optionally, configuring the connection between the edge device and the field device according to the connection configuration information so that the edge device obtains field data from the field device includes: reading a data block from the field device, and performing bit segmentation and byte conversion on the data block.
[0011] Optionally, the method further comprises: listing the basic function model and the complex function model, and displaying the basic function model and the complex function model. To this end, by performing bit segmentation and byte conversion on the data block, matching conversion between data and function can be achieved, thereby improving the efficiency of data processing.
[0012] The present invention also proposes a data processing device for processing data of a field device in an edge device for calling by an application of the edge device. The data processing device includes: a file parsing module for obtaining a device communication description file and parsing the device communication description file to obtain connection configuration information and data function matching information; a configuration module for configuring the connection between the edge device and the field device according to the connection configuration information so that the edge device obtains field data from the field device; a data processing module for determining a target function and a data protocol used by the application, obtaining corresponding field data from the field data according to the target function and the data function matching information, and adapting the corresponding field data to the data protocol used by the application.
[0013] The present invention also proposes an electronic device, comprising a processor, a memory and instructions stored in the memory, wherein the instructions implement the above method when executed by the processor.
[0014] The present invention also provides a computer-readable storage medium on which computer instructions are stored. When the computer instructions are executed, the method described above is executed.
[0015] The present invention also provides a computer program product, characterized in that it comprises a computer program, and when the computer program is executed by a processor, the method described above is implemented. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The following drawings are intended only to illustrate and explain the present invention, and do not limit the scope of the present invention.
[0017] Figure 1 is a flow chart of a data processing method according to an embodiment of the present invention;
[0018] Figure 2 is a schematic diagram of a functional architecture of an edge device according to an embodiment of the present invention;
[0019] Figure 3 is a schematic diagram of a data layer in a functional architecture of an edge device according to an embodiment of the present invention;
[0020] Figure 4 is a schematic diagram of a user interface according to an embodiment of the present invention;
[0021] Figure 5 is a schematic diagram of a data processing device according to an embodiment of the present invention;
[0022] Figure 6 is a schematic diagram of an electronic device according to an embodiment of the present invention.
[0023] Description of Reference Numerals
[0024] 100 Data Processing Methods
[0025] Steps 110-130
[0026] 10 Connection Layer
[0027] 11 Modbus TCP Connector
[0028] 12 SIMATIC S7 connector
[0029] 13 OPC UA Connector
[0030] 14 Ethernet / IP connector
[0031] 15 Third-party connectors
[0032] 20 Data Layer
[0033] 21 File Interpreter
[0034] 211 Connection Configuration Setting Module
[0035] 212 Hardware Configuration Module
[0036] 213 Communication Configuration Module
[0037] 214 Data function matching conversion module
[0038] 215 Functional Semantic Model Creator
[0039] 216 Database Algorithm Generation Module
[0040] 217 Function Configuration Module
[0041] 22 Data bus
[0042] 23 Data exchange module
[0043] 23A Data Interaction Submodule
[0044] 232 bit segmentation and byte conversion module
[0045] 233-bit register and byte combination module
[0046] 23B Data exchange submodule
[0047] 231 Data reading module
[0048] 234 Data writing module
[0049] 24 Functional Modeling Module
[0050] 241 Basic Function Model
[0051] 242 Complex Function Model
[0052] 25 Database
[0053] 26 Function Creator
[0054] 27 Functional Platform
[0055] 271 REST
[0056] 272 GraphQL
[0057] 273 OPC UA
[0058] 274 MQTT
[0059] 275 X http Server
[0060] 30 Application Layer
[0061] 31 Workflow Creator
[0062] 32 Digital Twin
[0063] 33 Data Storage
[0064] 34 Data Cache
[0065] 35 Third-party applications
[0066] 40 User Interface
[0067] 41 Motor start
[0068] 42 Motor stop
[0069] 43 Motor enable
[0070] 44 Speed setting
[0071] 45 Motor ready
[0072] 46 Alarm
[0073] 47 Actual speed
[0074] 48 Actual torque
[0075] 49 Pump KPI
[0076] 500 Data processing device
[0077] 510 File parsing module
[0078] 520 Configuration Module
[0079] 530 Data Processing Module
[0080] 600 Electronic equipment
[0081] 610 processor
[0082] 620 Memory DETAILED DESCRIPTION
[0083] In order to have a clearer understanding of the technical features, purposes and effects of the present invention, specific embodiments of the present invention are now described with reference to the accompanying drawings.
[0084] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention may also be implemented in other ways different from those described herein. Therefore, the present invention is not limited to the specific embodiments disclosed below.
[0085] As shown in this application and claims, unless the context clearly indicates an exception, the words "a", "an", "an" and / or "the" do not refer to the singular and may also include the plural. Generally speaking, the terms "include" and "comprise" only indicate the inclusion of the steps and elements that have been clearly identified, and these steps and elements do not constitute an exclusive list. The method or device may also include other steps or elements.
[0086] The present invention proposes a data processing method for processing data of a field device in an edge device. Figure 1 is a flow chart of a data processing method 100 according to an embodiment of the present invention. Figure 1 As shown, the data processing method 100 includes:
[0087] Step 110, obtaining a device communication description file, and parsing the device communication description file to obtain connection configuration information and data function matching information.
[0088] The device communication description file can be prepared by the user according to the application scenario, such as the field devices involved in a manufacturing scenario, the communication protocols involved in these field devices, etc. After the user prepares the device communication description file, it is imported into the edge device. When the manufacturing scenario changes, such as changes in the field equipment or changes in the communication protocol, the device communication description file can be modified by the user. The device communication description file may include hardware information, configuration connection configuration information, data function matching information, basic function model, complex function model, custom algorithm, function platform configuration information, etc.
[0089] By parsing the device communication description file, the connection configuration information and data function matching information can be obtained.
[0090] The following table shows part of the content of the device communication description file according to an embodiment of the present invention, wherein Table 1 is the water flow meter part and Table 2 is the motor driver part. As shown in Table 1, the table shows the device name, address, communication protocol, sampling period, and basic function model of the water flow meter. As shown in Table 2, the table shows the device name, address, communication protocol, sampling period, basic function model, and complex function model of the motor driver. By parsing the motor driver part of the device communication description file, the connection configuration information of the motor driver can be obtained, that is, the device name, physical address, communication protocol and sampling period of the motor driver, as well as the data function matching information. Taking the message in the basic function model as an example, the function represented by the first byte of the message is that the motor is ready, the function represented by the message offset 0.7 bytes is the alarm, the function represented by the message offset 2.0 bytes word length 2.0 (hexadecimal) is the actual speed, and the function represented by the message offset 6.0 bytes word length 2.0 is the actual torque, that is, the actual speed of the function corresponds to the part of the message offset 2.0 bytes word length 2.0 (hexadecimal), and the actual torque of the function corresponds to the part of the message offset 6.0 bytes word length 2.0. In this way, the connection configuration information and data function matching information can be obtained.
[0091]
[0092] Table 1 Water flow meter part of the device communication description file
[0093]
[0094]
[0095]
[0096] Table 2. Motor driver part in the device communication description file
[0097] Figure 2is a schematic diagram of a functional architecture of an edge device according to an embodiment of the present invention, such as Figure 2 As shown, the functional framework of the edge device includes a connection layer 10 , a data layer 20 and an application layer 30 .
[0098] The connection layer 10 is used to connect with field devices, and the connection layer 10 may include a Modbus TCP connector 11 , a SIMATIC S7 connector 12 , an OPC UA connector 13 , an Ethernet / IP connector 14 and a third-party connector 15 .
[0099] The application layer 30 is used to use data to implement corresponding functions, and the application layer 30 may include a Flow Creator 31 , a digital twin 32 , a data storage 33 , a data cache 34 , and a third-party application 35 .
[0100] Figure 3 is a schematic diagram of a data layer in a functional architecture of an edge device according to an embodiment of the present invention, such as Figure 2 and 3 As shown, the data layer 20 includes a file interpreter 21, which is used to parse the device communication description file to obtain connection configuration information and data function matching information. The file interpreter 21 includes a connection configuration setting module 211, a hardware configuration module 212 and a communication configuration module 213. Through the connection configuration setting module 211, the hardware configuration module 212 and the communication configuration module 213, the connection configuration information in the device communication description file can be parsed.
[0101] Step 120 , configuring the connection between the edge device and the field device according to the connection configuration information, so that the edge device acquires field data from the field device.
[0102] The connection configuration information may include hardware configuration information and communication configuration information. The connection between the edge device and the field device is configured according to the hardware configuration information, that is, a physical connection is automatically established between the edge device and the field device. The communication protocol between the edge device and the field device is configured according to the communication configuration information so that the edge device can obtain field data from the field device.
[0103] like Figure 3As shown, the file interpreter 21 includes a data function matching conversion module 214. Through the analysis of the data function matching conversion module 214, the functions of reading, writing, segmenting, registering and combining the field data can be realized. Specifically, the data interaction exchange module 23 includes a data interaction submodule 23A and a data exchange submodule 23B. The data interaction submodule 23A includes a bit segmentation and byte conversion module 232 and a bit registration and byte combination module 233. The data exchange submodule 23B includes a data reading module 231 and a data writing module 234. The data reading module 231 reads the field data, and the bit segmentation and byte conversion module 232 performs bit segmentation and byte conversion on the field data. The bit registration and byte combination module 233 performs bit registration and byte combination, and the data writing module 234 writes the instruction data into the field device.
[0104] Step 130, determining the target function and data protocol used by the application, acquiring corresponding field data from the field data according to the target function and data function matching information, and adapting the corresponding field data to the data protocol used by the application.
[0105] For the target function used by the application, for example, for the digital twin application, the functions that need to be used may include the actual speed and actual torque of the motor. According to this target function and the data function matching information in the device communication description file, the actual speed of the function corresponds to the part of the message offset by 2.0 bytes and word length 2.0 (hexadecimal). The part of the message offset by 2.0 bytes and word length 2.0 (hexadecimal) is obtained from the field data, which is the actual speed. The actual torque of the function corresponds to the part of the message offset by 6.0 bytes and word length 2.0. The part of the message offset by 6.0 bytes and word length 2.0 is obtained from the field data, which is the actual torque. After obtaining the corresponding field data, the corresponding field data is adapted to the data protocol used by the application so that the digital twin can use these field data.
[0106] like Figure 3 As shown, the file interpreter 21 includes a function configuration module 217, through which the function platform 27 can be configured. The function platform 27 can include protocols such as REST 271, GraphQL 272, OPC UA 273, MQTT 274, X httpServer 275, etc., which are used to adapt the corresponding field data to the data protocol used by the application.
[0107] To this end, a device communication description file is provided, which includes data function matching information, so that matching and conversion between data and functions can be achieved. When the on-site equipment or communication protocol changes, only the device communication description file needs to be modified, and there is no need to modify the data exchange configuration of the application one by one, thus ensuring the efficiency of data processing and the performance of the application.
[0108] In some embodiments, the method further includes: parsing the device communication description file to obtain data function matching information, the data function matching information including a basic function model and a complex function model composed of multiple basic function models. Figure 3 As shown, the functional semantic model creator 215 is used to parse the device communication description file to obtain a basic functional model 241 and a complex functional model 242. The basic functional model 241 may include the function of device d1 (d1-func, such as the speed and torque of the motor), the information of device d1 (d1-info, such as the normal state of the motor), the function of device d2 (d2-func, such as the flow rate of a water flow meter), and the information of device d2 (d2-info, such as the normal state of the water flow meter). The complex functional model 242 is composed of multiple basic functional models. To this end, the matching and conversion between data and functions can be achieved through the basic functional model and the complex functional model.
[0109] In some embodiments, the method further includes: the basic function model includes functions and information of the field devices, and the complex function model includes complex functions, events, tasks and assets mapped to the functions and information of different field devices. Figure 3 As shown, the complex function model 242 includes complex functions (CF), events (E), tasks (T) and assets (A) mapped to the functions and information of different field devices d1 and d2. Taking Table 2 as an example, the pump KPI is a complex function model, which is composed of functions such as actual speed and actual torque. To this end, by establishing a complex function model, the flexibility of the model and the efficiency of data processing can be improved.
[0110] In some embodiments, the method further includes: determining data processing requirements of multiple applications, acquiring corresponding field data from field data according to the target function and data function matching information, and processing the field data according to the processing requirements. Figure 3As shown, the database algorithm generation module 216 is used to parse the device communication description file to obtain the data algorithm, and the database 25 processes the field data according to the database algorithm. For example, the database algorithm generation module 216 is used to parse the device communication description file to determine that multiple applications need to use a speed greater than 500r / min. The database 25 processes the acquired real-time data, filters out the speed greater than 500r / min, marks the speed greater than 500r / min as "True", and sends it to the corresponding application. To this end, the field data is processed according to the data processing requirements of multiple applications, avoiding repeated processing of data by multiple applications and improving the overall efficiency of the edge device.
[0111] In some embodiments, configuring the connection between the edge device and the field device according to the connection configuration information so that the edge device obtains field data from the field device includes: reading a data block from the field device, and performing bit segmentation and byte conversion on the data block. To this end, by performing bit segmentation and byte conversion on the data block, matching conversion between data and function can be achieved, thereby improving the efficiency of data processing.
[0112] In some embodiments, the method further includes: listing the basic function model and the complex function model, and displaying the basic function model and the complex function model. Figure 3 As shown, the function creator 26 is used to list the basic function model and the complex function model. By listing the basic function model and the complex function model and displaying the basic function model and the complex function model, the visualization of the basic function model and the complex function model is achieved.
[0113] Figure 4 40 is a schematic diagram of a user interface according to an embodiment of the present invention. The user interface may be an application such as Flow Creator. Figure 4 As shown, the left side of the user interface 40 lists basic functions and complex functions, the basic functions include motor start 41, motor stop 42, motor enable 43, speed setting 44, motor ready 45, alarm 46, actual speed 47 and actual torque 48, and the complex functions include pump KPI 49. These functions can be function blocks, and the user builds a workflow by dragging the function blocks. The right side of the user interface 40 is a workflow built by the user. As shown in the workflow, the motor starts after enabling, sets the motor speed, measures the actual speed and actual torque of the motor, and after time D, the motor stops running.
[0114] An embodiment of the present invention provides a data processing method, which provides a device communication description file, which includes data function matching information, so that matching and conversion between data and functions can be achieved. When the on-site device or communication protocol changes, only the device communication description file needs to be modified, and there is no need to modify the data exchange configuration of the application one by one, thereby ensuring the efficiency of data processing and the performance of the application.
[0115] The present invention also proposes a data processing device for processing data of a field device in an edge device. Figure 5 is a schematic diagram of a data processing device 500 according to an embodiment of the present invention. Figure 5 As shown, the data processing device 500 includes:
[0116] The file parsing module 510 obtains a device communication description file and parses the device communication description file to obtain connection configuration information and data function matching information;
[0117] A configuration module 520, which configures a connection between the edge device and the field device according to the connection configuration information, so that the edge device obtains field data from the field device;
[0118] The data processing module 530 determines the target function and data protocol used by the application, obtains corresponding field data from the field data according to the target function and data function matching information, and adapts the corresponding field data to the data protocol used by the application.
[0119] The present invention also provides an electronic device 600 . Figure 6 FIG. 6 is a schematic diagram of an electronic device 600 according to an embodiment of the present invention. Figure 6 As shown, the electronic device 600 includes a processor 610 and a memory 620 , wherein the memory 620 stores instructions, wherein when the instructions are executed by the processor 610 , the method 100 described above is implemented.
[0120] The present invention further provides a computer-readable storage medium on which computer instructions are stored. When the computer instructions are executed, the method 100 described above is executed.
[0121] The present invention further provides a computer program product, comprising a computer program, and when the computer program is executed by a processor, the method 100 described above is implemented.
[0122] Some aspects of the methods and apparatus of the present invention may be performed entirely by hardware, entirely by software (including firmware, resident software, microcode, etc.), or by a combination of hardware and software. The above hardware or software may be referred to as "data blocks", "modules", "engines", "units", "components" or "systems". The processor may be one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DAPDs), programmable logic devices (PLCs), field programmable gate arrays (FPGAs), processors, controllers, microcontrollers, microprocessors or combinations thereof. In addition, various aspects of the present invention may be expressed as computer products located in one or more computer-readable media, which include computer-readable program codes. For example, computer-readable media may include, but are not limited to, magnetic storage devices (e.g., hard disks, floppy disks, tapes, etc.), optical disks (e.g., compact disks (CDs), digital versatile disks (DVDs) ...), smart cards, and flash memory devices (e.g., cards, sticks, key drives ...).
[0123] Flowchart is used here to illustrate the operations performed according to the method of the embodiment of the present application. It should be understood that the above operations are not necessarily performed accurately in order. On the contrary, various steps can be processed in reverse order or simultaneously. At the same time, other operations may be added to these processes, or a certain step or several steps of operations may be removed from these processes.
[0124] It should be understood that although this specification is described according to various embodiments, not every embodiment contains only one independent technical solution. This narrative method of the specification is only for the sake of clarity. Those skilled in the art should regard the specification as a whole. The technical solutions in each embodiment may also be appropriately combined to form other implementation methods that can be understood by those skilled in the art.
[0125] The above description is only an illustrative embodiment of the present invention and is not intended to limit the scope of the present invention. Any equivalent changes, modifications and combinations made by any person skilled in the art without departing from the concept and principle of the present invention shall fall within the scope of protection of the present invention.
[0126] Nouns and pronouns relating to persons in this patent application are not limited to a specific gender.
Claims
1. A data processing method (100) for processing data of a field device in an edge device for invocation by an application of the edge device, characterized in that: The data processing method (100) comprises: Obtaining a device communication description file, and parsing the device communication description file to obtain connection configuration information and data function matching information (110); configuring a connection between the edge device and the field device according to the connection configuration information so that the edge device acquires field data from the field device (120); Determine the target function and data protocol used by the application, obtain corresponding field data from the field data according to the target function and the data function matching information, and adapt the corresponding field data to the data protocol used by the application (130).
2. The data processing method (100) according to claim 1, characterized in that: The method (100) further comprises: parsing the device communication description file to obtain the data function matching information, wherein the data function matching information comprises a basic function model and a complex function model composed of a plurality of basic function models.
3. The data processing method (100) according to claim 2, characterized in that: The method (100) further includes: the basic function model includes functions and information of field devices, and the complex function model includes complex functions, events, tasks and assets mapped to functions and information of different field devices.
4. The data processing method (100) according to claim 1, characterized in that: The method (100) also includes: determining data processing requirements of the plurality of the application programs, acquiring corresponding field data from field data according to the target function and the data function matching information, and processing the field data according to the processing requirements.
5. The data processing method (100) according to claim 1, characterized in that: Configuring the connection between the edge device and the field device according to the connection configuration information so that the edge device acquires field data from the field device includes: reading a data block from the field device, and performing bit segmentation and byte conversion on the data block.
6. The data processing method (100) according to claim 2 or 3, characterized in that: The method (100) further includes: listing the basic function model and the complex function model, and displaying the basic function model and the complex function model.
7. A data processing device (500) for processing data of a field device in an edge device for invocation by an application of the edge device, characterized in that: The data processing device (500) comprises: A file parsing module (510) acquires a device communication description file and parses the device communication description file to acquire connection configuration information and data function matching information; a configuration module (520), configured to configure a connection between the edge device and the field device according to the connection configuration information, so that the edge device acquires field data from the field device; The data processing module (530) determines the target function and data protocol used by the application, obtains corresponding field data from the field data according to the matching information between the target function and the data function, and adapts the corresponding field data to the data protocol used by the application.
8. An electronic device (600), comprising a processor (610), a memory (620), and instructions stored in the memory (620), wherein the instructions, when executed by the processor (610), implement the method (100) according to any one of claims 1 to 6.
9. A computer-readable storage medium having computer instructions stored thereon, wherein the computer instructions, when executed, execute the method (100) according to any one of claims 1 to 6.
10. A computer program product, characterized in that The method comprises a computer program, which, when executed by a processor, implements the method (100) according to any one of claims 1 to 6.