Method for supporting multi-protocol sensor access and data analysis and gateway machine equipment

By configuring relevant tables and loading dynamic libraries in the database of the gateway device, and supporting multi-protocol sensor access and data analysis, the difficulty of sensor data processing of different interfaces and protocols in the substation station building is solved, and the effect of simplifying the installation process and reducing professional skills requirements is achieved.

CN119603380APending Publication Date: 2025-03-11NANJING ZHENGTU INFORMATION TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411734013.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-29
Publication Date
2025-03-11

AI Technical Summary

Technical Problem

In substations, there are difficulties in processing sensor data with different interfaces and protocols, resulting in complex installation process and high professional skills requirements.

Method used

By configuring the database dictionary table, sensor communication node, model library and sensor library in the database of the gateway device, it supports multi-protocol sensor access and data parsing. The method includes configuring communication methods, protocol types and data analysis methods, loading the data analysis dynamic library, and collecting and parsing data through the communication data acquisition module.

Benefits of technology

It realizes sensor data processing for multiple interfaces and protocols, simplifies the installation process, reduces the requirements for professional skills, and has the advantages of being easy to expand and reusable.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119603380A_ABST
    Figure CN119603380A_ABST
Patent Text Reader

Abstract

The invention discloses a method for supporting multi-protocol sensor access and data analysis and gateway machine equipment, which can be used for processing sensor data of various interfaces and communication protocol types and conveniently expanding other interfaces and communication protocol types. The gateway machine equipment comprises a database, a sensor communication node configuration module, a sensor configuration module and a communication data acquisition module, a database dictionary table, a model library and a sensor library are stored in the database, and communication mode configuration, communication protocol type configuration and data analysis method list configuration are performed in the database dictionary. Using a data analysis dynamic library as an analysis function interface for each data analysis method defined in the data analysis method list; the sensor configuration module is used for creating a sensor model of each sensor connected to gateway machine equipment; and the communication data acquisition module is used for loading a database of gateway machine equipment and carrying out data acquisition and analysis.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a method and gateway equipment supporting multi-protocol sensor access and data analysis, belonging to the technology of smart substation. Background Art

[0002] In power substations, sensor equipment or dynamic environment equipment is usually provided by multiple manufacturers. Due to historical reasons, they may support different protocols. In addition, different substations have different types of access sensors, and the protocols are unlikely to be completely consistent. In power distribution substations, gateway equipment supports serial ports, network ports, IO and wireless access to sensor data. The supported protocol types include but are not limited to IED60870-101, IED60870-104, IEC61850 protocol, MODBUS protocol, TCPMODBUS protocol, DL / T645-2007 protocol, QGDW 12184-2021 Transmission and Substation Equipment Internet of Things Sensor Data Specification, etc. When installing sensor equipment, it is necessary to debug separately for different communication protocols. The installation process is very troublesome and requires high professional skills of the installer. Summary of the invention

[0003] Purpose of the invention: In order to overcome the deficiencies in the prior art, the present invention provides a method and a gateway device that supports multi-protocol sensor access and data analysis to solve the data processing problem facing different interfaces and different protocols.

[0004] Technical solution: To achieve the above purpose, the technical solution adopted by the present invention is:

[0005] A method for supporting multi-protocol sensor access and data analysis includes the following steps:

[0006] Step 1. Configure the database dictionary table in the database of the gateway device, and configure the communication mode, communication protocol type and data parsing method list in the database dictionary;

[0007] Step 2. Configure the sensor communication node in the database of the gateway device. The configuration information of the sensor communication node includes the node communication mode, the node communication protocol type and the node communication parameters. The node communication parameters are in the string format and are the combination information formed based on the node communication mode and the node communication protocol type.

[0008] Step 3. Build a model library in the database of the gateway device. The model library is used to store data models of different types of sensors. The data model includes a model recognition module and a model information point module. Model recognition parameters are defined in the model recognition module, and model information point parameters are defined in the model information point module. The model information point parameters are in a string format and are combined information based on the sensor communication mode and the sensor communication protocol type.

[0009] Step 4. Build a sensor library in the database of the gateway device. The sensor library is used to store the sensor models of each sensor connected to the gateway device. The sensor model includes a sensor identification module and a sensor information point module. The sensor identification module inherits and extends the model identification module. The sensor information point module inherits and extends the model information point module. Define sensor identification parameters and sensor communication parameters in the sensor identification module. Define sensor information point parameters in the sensor information point module. Sensor information point parameters inherit and extend model information point parameters. When creating a sensor model, first select the corresponding sensor communication node, then select the corresponding type of data model, then create a new sensor model, set sensor identification parameters and sensor communication parameters in the sensor identification module, traverse each sensor information point and set the sensor information point parameters in the sensor information point module.

[0010] Step 5. Load the data analysis dynamic library, which provides analysis function interfaces for each data analysis method defined in the data analysis method list.

[0011] Step 6. Start the communication data acquisition module to load the database of the gateway device and perform data acquisition and analysis;

[0012] Loading the database of the gateway machine data device includes the following steps:

[0013] S61, connecting to the database of the gateway device, loading the configuration information of all sensor communication nodes, and parsing the node communication parameters according to the node communication mode and node communication protocol type of the sensor communication node;

[0014] S62, traversing all sensor communication nodes, loading all sensor models under each sensor communication node, and parsing sensor communication parameters according to the node communication mode and node communication protocol type of the sensor communication node;

[0015] S63, traversing all sensor models, loading all sensor information point modules under each sensor model, and parsing sensor information point parameters according to the node communication protocol type of the sensor communication node;

[0016] Data collection and analysis include the following steps:

[0017] S64. After the database of the gateway device is loaded, the communication data acquisition module establishes a communication connection with the sensor according to the sensor communication parameters, creates a data processing thread for each sensor communication node according to the node communication protocol type, and actively or passively obtains the sensor data message according to the data acquisition cycle;

[0018] S65, after receiving the data message, the data processing thread first confirms the sensor and sensor information point involved in the data message according to the context information of the data message;

[0019] S66, intercepting corresponding message content in the data message according to the information point parameters of each sensor;

[0020] S67, calling the corresponding data analysis method in the data analysis dynamic library according to the sensor information point parameters, and performing data analysis on the intercepted message content;

[0021] S68. Process the data analysis result according to the sensor information point parameters to obtain sensor information point data.

[0022] Specifically, the node communication parameters of the sensor communication node are in a string format, which are combined information formed based on the node communication mode and the node communication protocol type. Different node communication protocol types and node communication modes will configure different node communication parameters; if the node communication mode is serial port communication, the combined information includes parameters such as serial port number, baud rate, parity bit, data bit, stop bit, and flow control; if the node communication mode is TCP communication or UPD communication, the combined information includes parameters such as IP address and port number; in short, the node communication parameters will determine the specific content according to the node communication protocol type and the node communication mode.

[0023] Specifically, the model information point parameters are the soul of the model information point, and the model information point parameters generated based on different sensor communication modes and sensor communication protocol types are different; the model information point parameters are in a string format, which are combined information formed based on the sensor communication mode and the sensor communication protocol type, including parameters such as data type, conversion coefficient, number of decimal places, data parsing method, data length, data pointer, data offset, and function type; if the sensor communication mode is serial communication, the combined information also includes register address and read and write function code; if the sensor communication mode is wireless communication, the combined information also includes communication parameter values ​​of the information point.

[0024] Specifically, the sensor information point parameters adopt the method of inheriting the model information point parameters, but if necessary, they can also be modified according to the actual sensor information point parameters; the sensor information point parameters designed in this case are combined information formed based on the sensor communication method and the sensor communication protocol type; if the sensor communication method is serial port communication, the combined information includes the serial port communication address; if the sensor communication method is wireless communication, the combined information includes the SN code of the sensor; if the sensor communication method is IO port communication, the combined information includes the IO port number.

[0025] Specifically, in the data model, the model identification module and the model information point module are both designed as tables, respectively recorded as model identification table and model information point table; in the sensor model, the sensor identification module and the sensor information point module are both designed as tables, respectively recorded as sensor identification table and sensor information point table.

[0026] Specifically, the model identification table includes at least the field Id representing the model ID, the field Name representing the model name, and the field samename representing the unique code of the model. The data type of the field Id is Number, the data type of the field Name is String, and the data type of the field samename is String; the model information point table includes at least the field Id representing the model information point ID, the field Name representing the model information point name, the field modelid representing the model ID, the field remotetype representing the four remote types of the information point, and the field url representing the model information point parameters. The data type of the field Id is Number, the data type of the field Name is String, the data type of the field modelid is String, the data type of the field remotetype is String, and the data type of the field url is String; the value of the field modelid in the model information point table is equal to the field id in the model identification table.

[0027] Specifically, the sensor identification table includes at least a field Id representing the sensor ID, a field Name representing the sensor name, a field commnodeid representing the sensor communication node ID, a field modelid representing the model ID, and a field commaddr representing the sensor communication parameter. The data type of the field Id is Number, the data type of the field Name is String, the data type of the field commnodeid is Number, the data type of the field modelid is Number, and the data type of the field commaddr is String; the sensor information point table includes at least a field Id representing the sensor information point ID, a field Na representing the sensor information point name, and a field String representing the sensor information point name. me, the field sensorid representing the sensor ID, the field modelpointid representing the model information point ID, the field url representing the sensor information point parameters, the data type of the field Id is Number, the data type of the field Name is String, the data type of the field sensorid is Number, the data type of the field modelpointid is Number, and the data type of the field url is String; the value of the field modelid in the sensor identification table is the field Id in the model identification table; the value of the field sensorid in the sensor information point table is equal to the field Id in the sensor identification table, and the value of the field url is equal to the field url in the model information point table.

[0028] Specifically, the data parsing interface of the data parsing dynamic library is designed as an interface table;

[0029] For the data type transmitted by bytes, the interface table is designed to include at least the field buf representing the data pointer, the field len representing the data length, the field method enumerating the data parsing method, the field bOk representing the success or failure of the data parsing, and the field QVariant representing the data parsing result. The data type of the field buf is char, the data type of the field len is int, the data type of the field method is int, the data type of the field bOk is bool, and the data type of the field QVariant is QVariant.

[0030] For the data type transmitted by bit, the interface table is designed to include at least the field buf representing the data pointer, the field len representing the data length, the field nBitPos representing the bit position, the field method enumerating the data parsing methods, the field bOk representing whether the data parsing is successful or not, and the field QVariant representing the data parsing result. The data type of the field buf is char, the data type of the field len is int, the data type of the field nBitPos is int, the data type of the field method is int, the data type of the field bOk is bool, and the data type of the field QVariant is QVariant.

[0031] A gateway device supporting multi-protocol sensor access and data analysis processing includes a database, a sensor communication node configuration module, a sensor configuration module and a communication data acquisition module. A database dictionary table, a model library and a sensor library are stored in the database. Communication mode configuration, communication protocol type configuration and data analysis method list configuration are performed in the database dictionary. A data analysis dynamic library is used as an analysis function interface for each data analysis method defined in the data analysis method list.

[0032] The sensor communication node configuration module is used to configure the sensor communication node for the gateway device. The configuration information of the sensor communication node includes the node communication mode, the node communication protocol type and the node communication parameters. The node communication parameters are in the string format and are combined information formed based on the node communication mode and the node communication protocol type.

[0033] The model library is used to store data models of different types of sensors, the data model includes a model recognition module and a model information point module, the model recognition parameters are defined in the model recognition module, and the model information point parameters are defined in the model information point module; the model information point parameters are in a string format, which are combined information formed based on the sensor communication mode and the sensor communication protocol type;

[0034] The sensor library is used to store sensor models of various sensors connected to the gateway device, the sensor model includes a sensor identification module and a sensor information point module, the sensor identification module inherits and extends the model identification module, the sensor information point module inherits and extends the model information point module, sensor identification parameters are defined in the sensor identification module, sensor information point parameters are defined in the sensor information point module, and the sensor information point parameters inherit and extend the model information point parameters;

[0035] The sensor configuration module is used to create a sensor model for each sensor connected to the gateway device. When creating a sensor model, first select the corresponding sensor communication node, then select the corresponding type of data model, then create a new sensor model, set the sensor identification parameters in the sensor identification module, traverse each sensor information point and set the sensor information point parameters in the sensor information point module;

[0036] The communication data acquisition module is used to load the database of the gateway device and perform data acquisition and analysis.

[0037] Beneficial effects: The method and gateway device supporting multi-protocol sensor access and data analysis provided by the present invention have the advantages of easy expansion and reuse, and can be split for processing according to different communication protocol types; if it is necessary to add a new communication method, communication protocol type, or data analysis method, it is only necessary to increase the database dictionary table configuration and increase the corresponding analysis function interface in the data analysis dynamic library, and the data analysis method can be reused; if it is necessary to increase the sensor type, it is only necessary to compile the corresponding data model before leaving the factory, and flexibly create files according to the on-site conditions, which is simple, easy to use, and convenient to operate. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] Figure 1 It is a schematic diagram of the implementation process of the present invention. DETAILED DESCRIPTION

[0039] The present invention is described in detail below with reference to the accompanying drawings and specific embodiments.

[0040] A gateway device supporting multi-protocol sensor access and data analysis processing can process sensor data of multiple interfaces and communication protocol types, and can easily expand other interfaces and communication protocol types; the gateway device includes a database, a sensor communication node configuration module, a sensor configuration module and a communication data acquisition module, and stores a database dictionary table, a model library and a sensor library in the database, performs communication mode configuration, communication protocol type configuration and data analysis method list configuration in the database dictionary, and uses a data analysis dynamic library as an analysis function interface for each data analysis method defined in the data analysis method list; the sensor communication node configuration module is used to configure the sensor for the gateway device Communication node; the model library is used to store data models of different types of sensors; the sensor library is used to store sensor models of each sensor connected to the gateway device; the sensor configuration module is used to create sensor models of each sensor connected to the gateway device. When creating a sensor model, first select the corresponding sensor communication node, then select the corresponding type of data model, then create a new sensor model, set the sensor identification parameters in the sensor identification module, traverse each sensor information point and set the sensor information point parameters in the sensor information point module; the communication data acquisition module is used to load the database of the gateway device and perform data acquisition and analysis.

[0041] like Figure 1 As shown in the figure, the method for supporting multi-protocol sensor access and data analysis and processing adopted by the above-mentioned gateway device is described in detail below in combination with each step.

[0042] Step 1: Configure the database dictionary table in the database of the gateway device

[0043] Configure the communication mode, communication protocol type and data parsing method list in the database dictionary.

[0044] The communication mode refers to the communication mode between the sensor and the gateway device. Table 1 shows an example of the communication mode configuration, including but not limited to the table contents.

[0045] Table 1 Adding communication mode configuration in the database dictionary (expandable)

[0046] Dictionary code Dictionary item ID name describe commode 1 Serial communication commode 2 TCP communication commode 3 UDP communication commode 4 MQTT communication

[0047] The communication protocol type refers to the communication protocol type between the sensor and the gateway device. Table 2 shows an example of the communication protocol type configuration, including but not limited to the table content.

[0048] Table 2 Adding communication protocol type configuration in the database dictionary (expandable)

[0049] Dictionary code Dictionary item ID name describe protocoltype 1 MODBUS MODBUS Protocol protocoltype 2 MODBUS_TCP TCPMODBUS protocol protocoltype 3 LORA_GB Wireless communication protocols protocoltype 4 104 IEC60870-104 protocol protocoltype 5 101 IEC60870-101 protocol protocoltype 6 61850 IEC61850 protocol protocoltype 7 IO Gateway IO input and output

[0050] Each data parsing method specifies the data length and parsing function. Table 3 shows an example of a data parsing method list configuration, including but not limited to table content.

[0051] Table 3 Adding data parsing method list configuration in the database dictionary (expandable)

[0052]

[0053] Step 2: Configure the sensor communication node in the database of the gateway device

[0054] The configuration information of the sensor communication node includes the node communication mode, the node communication protocol type and the node communication parameters; Table 4 shows an example of the data structure design in the communication node configuration, including but not limited to the table content.

[0055] Table 4 Data structure design in communication node configuration (extensible)

[0056] Fields type illustrate Id Number Sensor communication node ID, non-null, * Name String Sensor communication node name Commaddr String Node communication parameters Commmode Number Node communication mode Protocol type Number Node communication protocol type

[0057] The communication node is the communication interface of the sensor on the gateway device. The node communication parameters are in the string format, which are combined information based on the node communication mode and the node communication protocol type. Different node communication protocol types and node communication modes will configure different node communication parameters; if the node communication mode is serial communication, the combined information includes parameters such as serial port number, baud rate, parity bit, data bit, stop bit, and flow control; if the node communication mode is TCP communication or UPD communication, the combined information includes parameters such as IP address and port number; in short, the node communication parameters will determine the specific content according to the node communication protocol type and node communication mode.

[0058] Step 3: Build a model library in the database of the gateway device

[0059] Sensor modeling is for the convenience of users. In order to avoid repeated configuration, sensors need to be classified. Each category of sensors uses a common data model. Data models are prefabricated in the gateway device. When users need to use them, they only need to select a specific data model to quickly create a sensor model. Sensor access can be achieved by creating a file in the gateway device. The model library is used to store data models of different types of sensors. The data model includes a model recognition module and a model information point module. Model recognition parameters are defined in the model recognition module, and model information point parameters are defined in the model information point module. In this example, the model recognition module and the model information point module are both designed as tables, which are respectively recorded as the model recognition table (model table) and the model information point table (modelpoint table). The model table defines the sensor type, and the modelpoint table defines the specific information point information of the sensor.

[0060] Table 5 shows an example of a model identification table, including but not limited to the table content.

[0061] Table 5. Example of model identification table

[0062] Fields Data Types illustrate Id Number Model ID, not null, * Name String Model Name samename String Model unique code

[0063] Table 6 shows an example of a model information point table, including but not limited to the table content.

[0064] Table 6 Example of model information point table

[0065]

[0066] Note: The value of the modelid field in Table 6 is equal to the Id field in Table 5.

[0067] The model information point parameters are in a string format, which are combined information formed based on the sensor communication mode and the sensor communication protocol type, including parameters such as data type, conversion coefficient, number of decimal places, data parsing method, data length, data pointer, data offset, and function type; if the sensor communication mode is serial communication, the combined information also includes register address and read and write function code; if the sensor communication mode is wireless communication, the combined information also includes communication parameter values ​​of the information point.

[0068] When the gateway device is in use, it is necessary to configure the communication nodes according to the on-site conditions, select the specific node communication mode and node communication protocol type, fill in the node communication parameters, and create the configuration record of the communication node.

[0069] Step 4: Build a sensor library in the database of the gateway device

[0070] The sensor library is used to store the sensor models of each sensor connected to the gateway device. The sensor model includes a sensor identification module and a sensor information point module. The sensor identification module inherits and extends the model identification module. The sensor information point module inherits and extends the model information point module. The sensor identification parameters and sensor communication parameters are defined in the sensor identification module. The sensor information point parameters are defined in the sensor information point module. The sensor information point parameters inherit and extend the model information point parameters. When creating a sensor model, select a suitable data model to create the sensor model according to the actual sensor situation. First, select the corresponding sensor communication node, then select the corresponding type of data model, then create a new sensor model, set the sensor identification parameters and sensor communication parameters in the sensor identification module, traverse each sensor information point and set the sensor information point parameters in the sensor information point module.

[0071] In this example, the sensor identification module and the sensor information point module are both designed as tables, which are respectively recorded as the sensor identification table (sensor table) and the sensor information point table (sensorpoint table).

[0072] Table 7 shows an example of a sensor identification table, including but not limited to the table contents.

[0073] Table 7 Sensor identification table example

[0074] Fields Data Types illustrate Id Number Sensor ID, non-null, * Name String Sensor Name commnodeid Number Sensor communication node ID modelid Number Model ID commaddr String Sensor communication parameters

[0075] Note: The value of the modelid field in Table 7 is the same as the Id field in Table 5

[0076] The sensor information point parameters adopt the method of inheriting the model communication parameters, but if necessary, they can be modified according to the actual sensor information point parameters; the sensor information point parameters designed in this case are combined information formed based on the sensor communication method and the sensor communication protocol type; if the sensor communication method is serial communication, the combined information includes the serial communication address; if the sensor communication method is wireless communication, the combined information includes the SN code of the sensor; if the sensor communication method is IO port communication, the combined information includes the IO port number.

[0077] Table 8 is an example of a sensor information point table, including but not limited to the table content.

[0078] Table 8 Sensor information point table example

[0079]

[0080]

[0081] Note: The value of the sensorid field in Table 8 is equal to the Id field in Table 7, and the value of the url field in Table 8 is equal to the url field in Table 6.

[0082] Step 5: Load the data parsing dynamic library

[0083] The data parsing dynamic library provides a parsing function interface for each data parsing method defined in the data parsing method list, and the data parsing interface of the data parsing dynamic library is designed as an interface table. Table 9 shows an example of an interface table designed for a data type transmitted by bytes, and Table 10 shows an example of an interface table designed for a data type transmitted by bits.

[0084] Table 9 Example of interface table designed for data types transmitted by byte

[0085] Fields Data Types illustrate buf char* Data pointer of sensor information point len int Data length of sensor information point method int Data parsing method enumeration (consistent with dictionary table configuration) b bool& Output parameter, whether the data parsing is successful QVariant QVariant Data analysis results, Qt powerful variant class

[0086] Table 10 Example of interface table designed for data types transmitted by bit

[0087] Fields Data Types illustrate buf char* Data pointer of sensor information point len int Data length of sensor information point nBitPos int Bit method int Data parsing method enumeration (consistent with dictionary table configuration) b Bool& Output parameter, whether the data parsing is successful QVariant QVariant Data analysis results, Qt powerful variant class

[0088] Step 6: Start the communication data acquisition module

[0089] Loading the database of the gateway machine data device includes the following steps:

[0090] S61. Connect to the database of the gateway device, load the configuration information of all sensor communication nodes, and parse the node communication parameters according to the node communication mode and node communication protocol type of the sensor communication node; if it is a serial communication mode, parse the serial port number, baud rate, parity bit, data bit, stop bit, flow control and other information according to the node communication protocol type; for TCP, UDP and other communication modes, parse the IP address and port number information according to the node communication protocol type...

[0091] S62, traversing all sensor communication nodes, loading all sensor models under each sensor communication node, and parsing sensor communication parameters according to the node communication mode and node communication protocol type of the sensor communication node;

[0092] S63, traverse all sensor models, load all sensor information point modules under each sensor model, and parse the sensor information point parameters according to the node communication protocol type of the sensor communication node; if it is a MODBUS protocol, parse out the register address, data type, number of decimal places, data length, read and write function code and other information according to a pre-set format; if it is an IEC60870-104 protocol, parse out the 104 address, data type, number of decimal places, data length and other information.

[0093] Data collection and analysis include the following steps:

[0094] S64. After the database of the gateway device is loaded, the communication data acquisition module establishes a communication connection with the sensor according to the sensor communication parameters, creates a data processing thread for each sensor communication node according to the node communication protocol type, and actively or passively obtains the sensor data message according to the data acquisition cycle;

[0095] S65, after receiving the data message, the data processing thread first confirms the sensor and sensor information point involved in the data message according to the context information of the data message;

[0096] S66, intercepting corresponding message content in the data message according to the information point parameters of each sensor;

[0097] S67, calling the corresponding data parsing method in the data parsing dynamic library according to the sensor information point parameters, and performing data parsing on the intercepted message content; if the sensor information point is data in bytes, calling the byte parsing processing interface of the data dynamic parsing library; if the sensor information point is data in bits, calling the bit parsing processing interface of the data dynamic parsing library;

[0098] S68. If the data analysis is successful, the data analysis result is processed according to the data type, number of decimal places, data conversion coefficient and other information in the sensor information point parameters to obtain the sensor information point data, refresh the data cache, and organize the message to report to the uplink platform according to the needs; if the data analysis fails, it is discarded.

[0099] The above shows and describes the basic principles, main features and advantages of the present invention. Those skilled in the art should understand that the above embodiments do not limit the present invention in any form, and any technical solution obtained by equivalent replacement or equivalent transformation falls within the protection scope of the present invention.

Claims

1. A method for supporting multi-protocol sensor access and data analysis, characterized in that: The steps include: Step 1. Configure the database dictionary table in the database of the gateway device, and configure the communication mode, communication protocol type and data parsing method list in the database dictionary; Step 2. Configure the sensor communication node in the database of the gateway device. The configuration information of the sensor communication node includes the node communication mode, the node communication protocol type and the node communication parameters. The node communication parameters are in the string format and are combined information based on the node communication mode and the node communication protocol type. Step 3. Build a model library in the database of the gateway device. The model library is used to store data models of different types of sensors. The data model includes a model recognition module and a model information point module. Model recognition parameters are defined in the model recognition module, and model information point parameters are defined in the model information point module. The model information point parameters are in a string format and are combined information based on the sensor communication mode and the sensor communication protocol type. Step 4. Build a sensor library in the database of the gateway device. The sensor library is used to store the sensor models of each sensor connected to the gateway device. The sensor model includes a sensor identification module and a sensor information point module. The sensor identification module inherits and extends the model identification module. The sensor information point module inherits and extends the model information point module. Define sensor identification parameters and sensor communication parameters in the sensor identification module. Define sensor information point parameters in the sensor information point module. Sensor information point parameters inherit and extend model information point parameters. When creating a sensor model, first select the corresponding sensor communication node, then select the corresponding type of data model, then create a new sensor model, set sensor identification parameters and sensor communication parameters in the sensor identification module, traverse each sensor information point and set the sensor information point parameters in the sensor information point module. Step 5. Load the data analysis dynamic library, which provides analysis function interfaces for each data analysis method defined in the data analysis method list. Step 6. Start the communication data acquisition module to load the database of the gateway device and perform data acquisition and analysis; Loading the database of the gateway machine data device includes the following steps: S61, connecting to the database of the gateway device, loading the configuration information of all sensor communication nodes, and parsing the node communication parameters according to the node communication mode and node communication protocol type of the sensor communication node; S62, traversing all sensor communication nodes, loading all sensor models under each sensor communication node, and parsing sensor communication parameters according to the node communication mode and node communication protocol type of the sensor communication node; S63, traversing all sensor models, loading all sensor information point modules under each sensor model, and parsing sensor information point parameters according to the node communication protocol type of the sensor communication node; Data collection and analysis include the following steps: S64. After the database of the gateway device is loaded, the communication data acquisition module establishes a communication connection with the sensor according to the sensor communication parameters, creates a data processing thread for each sensor communication node according to the node communication protocol type, and actively or passively obtains the sensor data message according to the data acquisition cycle; S65, after receiving the data message, the data processing thread first confirms the sensor and sensor information point involved in the data message according to the context information of the data message; S66, intercepting corresponding message content in the data message according to the information point parameters of each sensor; S67, calling the corresponding data analysis method in the data analysis dynamic library according to the sensor information point parameters, and performing data analysis on the intercepted message content; S68. Process the data analysis result according to the sensor information point parameters to obtain sensor information point data.

2. The method for supporting multi-protocol sensor access and data analysis according to claim 1, characterized in that: The node communication parameters of the sensor communication node are in a string format, which is a combination of information formed based on the node communication mode and the node communication protocol type; if the node communication mode is serial port communication, the combination information includes parameters including serial port number, baud rate, parity bit, data bit, stop bit, and flow control; if the node communication mode is TCP communication or UPD communication, the combination information includes parameters including IP address and port number.

3. The method for supporting multi-protocol sensor access and data analysis according to claim 1, characterized in that: The model information point parameters are in a string format, which are combined information formed based on the sensor communication mode and the sensor communication protocol type, including parameters such as data type, conversion coefficient, number of decimal places, data parsing method, data length, data pointer, data offset, and function type; if the sensor communication mode is serial communication, the combined information also includes register address and read and write function code; if the sensor communication mode is wireless communication, the combined information also includes communication parameter values ​​of the information point.

4. The method for supporting multi-protocol sensor access and data analysis according to claim 1, characterized in that: The sensor information point parameters are combined information formed based on the sensor communication mode and the sensor communication protocol type; if the sensor communication mode is serial port communication, the combined information includes the serial port communication address; if the sensor communication mode is wireless communication, the combined information includes the SN code of the sensor; if the sensor communication mode is IO port communication, the combined information includes the IO port number.

5. The method for supporting multi-protocol sensor access and data analysis according to claim 1, characterized in that: In the data model, the model identification module and the model information point module are both designed as tables, respectively recorded as model identification table and model information point table; in the sensor model, the sensor identification module and the sensor information point module are both designed as tables, respectively recorded as sensor identification table and sensor information point table.

6. The method for supporting multi-protocol sensor access and data analysis according to claim 5, characterized in that: The model identification table at least includes the field Id representing the model ID, the field Name representing the model name, and the field samename representing the unique code of the model. The data type of the field Id is Number, the data type of the field Name is String, and the data type of the field samename is String; the model information point table at least includes the field Id representing the model information point ID, the field Name representing the model information point name, the field modelid representing the model ID, the field remotetype representing the four remote types of the information point, and the field url representing the model information point parameters. The data type of the field Id is Number, the data type of the field Name is String, the data type of the field modelid is String, the data type of the field remotetype is String, and the data type of the field url is String; the value of the field modelid in the model information point table is equal to the field Id in the model identification table.

7. The method for supporting multi-protocol sensor access and data analysis according to claim 6, characterized in that: The sensor identification table at least includes a field Id representing the sensor ID, a field Name representing the sensor name, a field commnodeid representing the sensor communication node ID, a field modelid representing the model ID, and a field commaddr representing the sensor communication parameter. The data type of the field Id is Number, the data type of the field Name is String, the data type of the field commnodeid is Number, the data type of the field modelid is Number, and the data type of the field commaddr is String. The sensor information point table at least includes a field Id representing the sensor information point ID, a field Name representing the sensor information point name, and a field , the field sensorid representing the sensor ID, the field modelpointid representing the model information point ID, the field url representing the sensor information point parameters, the data type of the field Id is Number, the data type of the field Name is String, the data type of the field sensorid is Number, the data type of the field modelpointid is Number, and the data type of the field url is String; the value of the field modelid in the sensor identification table is the field Id in the model identification table; the value of the field sensorid in the sensor information point table is equal to the field Id in the sensor identification table, and the value of the field url is equal to the field url in the model information point table.

8. The method for supporting multi-protocol sensor access and data analysis according to claim 1, characterized in that: The data analysis interface of the data analysis dynamic library is designed as an interface table; For the data type transmitted by bytes, the interface table is designed to include at least the field buf representing the data pointer, the field len representing the data length, the field method enumerating the data parsing method, the field bOk representing the success or failure of the data parsing, and the field QVariant representing the data parsing result. The data type of the field buf is char, the data type of the field len is int, the data type of the field method is int, the data type of the field bOk is bool, and the data type of the field QVariant is QVariant. For the data type transmitted by bit, the interface table is designed to include at least the field buf representing the data pointer, the field len representing the data length, the field nBitPos representing the bit position, the field method enumerating the data parsing methods, the field bOk representing whether the data parsing is successful or not, and the field QVariant representing the data parsing result. The data type of the field buf is char, the data type of the field len is int, the data type of the field nBitPos is int, the data type of the field method is int, the data type of the field bOk is bool, and the data type of the field QVariant is QVariant.

9. A gateway device supporting multi-protocol sensor access and data analysis, characterized in that: It includes a database, a sensor communication node configuration module, a sensor configuration module and a communication data acquisition module, stores a database dictionary table, a model library and a sensor library in the database, performs communication mode configuration, communication protocol type configuration and data analysis method list configuration in the database dictionary, and uses a data analysis dynamic library as an analysis function interface for each data analysis method defined in the data analysis method list; The sensor communication node configuration module is used to configure the sensor communication node for the gateway device. The configuration information of the sensor communication node includes the node communication mode, the node communication protocol type and the node communication parameters. The node communication parameters are in the string format and are combined information formed based on the node communication mode and the node communication protocol type. The model library is used to store data models of different types of sensors, the data model includes a model recognition module and a model information point module, the model recognition parameters are defined in the model recognition module, and the model information point parameters are defined in the model information point module; the model information point parameters are in a string format, which are combined information formed based on the sensor communication mode and the sensor communication protocol type; The sensor library is used to store sensor models of various sensors connected to the gateway device, the sensor model includes a sensor identification module and a sensor information point module, the sensor identification module inherits and extends the model identification module, the sensor information point module inherits and extends the model information point module, sensor identification parameters are defined in the sensor identification module, sensor information point parameters are defined in the sensor information point module, and the sensor information point parameters inherit and extend the model information point parameters; The sensor configuration module is used to create a sensor model for each sensor connected to the gateway device. When creating a sensor model, first select the corresponding sensor communication node, then select the corresponding type of data model, then create a new sensor model, set the sensor identification parameters in the sensor identification module, traverse each sensor information point and set the sensor information point parameters in the sensor information point module; The communication data acquisition module is used to load the database of the gateway device and perform data acquisition and analysis.

Citation Information

Patent Citations

  • Implementation scheme for accessing sensor protocol self-identification IOT (internet of things) gateway

    CN103825811A

  • Multi-protocol data processing method, device and equipment and computer readable storage medium

    CN112583797A

  • Intelligent sensor network interface self-recognition system based on wireless communication technology

    CN113691953A

  • Method for automatically identifying and creating wired sensor of gateway machine equipment of power transformation and distribution station house

    CN118313396A