A data format conversion method of an internet of things sensor, a gateway and a communication device

By introducing device manufacturer and device type identification information into the IoT system, the standardized conversion of sensor data formats is achieved, which solves the platform pressure problem caused by inconsistent sensor data formats, reduces storage and processing burden, and improves the system's data transmission efficiency and security.

CN116112553BActive Publication Date: 2026-04-21CHINA MOBILE COMM LTD RES INST +1
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-11
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

The lack of standardized sensor data formats increases the difficulty of replicating IoT projects, puts a heavy burden on platform data storage and processing, and poses data security risks due to centralized processing.

Method used

By introducing identification information based on device manufacturer and device type, a data format conversion protocol is determined. When receiving sensor data at the gateway, the data format is converted, and standardized data is uploaded to the platform.

Benefits of technology

This reduces reliance on sensor equipment manufacturers, lowers the platform's data storage and processing pressure, and improves data transmission efficiency and security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116112553B_ABST
    Figure CN116112553B_ABST
Patent Text Reader

Abstract

The application provides a data format conversion method of an Internet of Things sensor, a gateway and a communication device, and the method comprises the following steps: receiving data transmitted by a sensor based on a transmission protocol, analyzing identification information of a protocol layer of the data, wherein the identification information is related to a sensor device manufacturer code and a device type code; identifying whether the identification information is a default value; when it is identified that the identification information is not the default value, obtaining a data format conversion protocol corresponding to the identification information; and performing format conversion on the data according to the data format conversion protocol. Compared with traditional device ID binding and mac address binding, the application does not require a device ID and a mac address, but only requires a sensor device manufacturer information and a device type, thereby greatly reducing the dependence on a sensor device manufacturer and reducing the data storage and processing pressure of a platform.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of Internet of Things (IoT) technology, and in particular to a data format conversion method, gateway, and communication device for IoT sensors. Background Technology

[0002] The standardization of sensor data formats has a significant impact on IoT projects. Due to the lack of uniformity in sensor data formats, it increases the difficulty of replicating IoT projects and puts more pressure on the platform's data storage and processing capabilities.

[0003] The most basic solution is to convert the sensor data format on the platform. On the one hand, data information is lost. For example, the protocol layer of the information emitted by the sensor includes IP / MAC addresses, which is helpful for format conversion. However, after multiple forwardings to the platform, very little information from the protocol layer is useful for data layer format conversion. Therefore, the solution design needs to add extra information to the data layer of the sensor information, which puts a lot of storage pressure on the platform. On the other hand, data is aggregated on the platform. Many IoT projects have a very large amount of data, which puts a lot of pressure on the platform's data processing. Moreover, centralized processing also brings data security risks.

[0004] Currently, there are two main solutions for converting sensor data into a standardized data format before uploading it to the platform, in order to reduce the platform's data storage and processing pressure: one relies on sensor manufacturers to follow standardized data format specifications, with manufacturers defining data formats according to the specifications to meet the standard requirements; the other is based on gateway protocol conversion, configuring each device in the cloud, and determining the device ID. The gateway needs to query the variable mapping table for each new device access, and subsequent updates to the variable mapping table also need to be maintained one by one.

[0005] The first type of solution relies on sensor manufacturers for implementation. Because proprietary data formats require equipment manufacturers to increase the cost of changing sensor suppliers for integrator projects, sensor manufacturers are unwilling to adhere to standardized sensor data formats. The second type of solution involves configuring each individual device, resulting in significant effort required for system construction and maintenance. Summary of the Invention

[0006] The purpose of this invention is to provide a data format conversion method, gateway, and communication device for Internet of Things (IoT) sensors, in order to solve the problem of high data storage and processing pressure in the prior art that relies on sensor manufacturers and data platforms.

[0007] To address the aforementioned problems, embodiments of the present invention provide a data format conversion method for IoT sensors, applied in a gateway, the method comprising:

[0008] The system receives data sent by the sensor based on a transmission protocol and parses the protocol layer identification information of the data. This identification information is related to the sensor device manufacturer code and device type code.

[0009] Identify whether the identification information is a default value, and when it is determined that the identification information is not a missing value, obtain the data format conversion protocol corresponding to the identification information;

[0010] The data is converted according to the data format conversion protocol, and the conversion result is uploaded to the platform.

[0011] Furthermore, the step of obtaining the data format conversion protocol corresponding to the identification information includes:

[0012] Determine whether the local machine has a data format conversion protocol corresponding to the identification information;

[0013] If so, obtain the corresponding data format conversion protocol from the local machine;

[0014] If not, request the platform to issue the data format conversion protocol corresponding to the identification information.

[0015] Before receiving data from the sensor, the gateway locally stores the correspondence between identification information and data format conversion protocol.

[0016] The step of determining whether the local machine has a data format conversion protocol corresponding to the identification information includes:

[0017] Based on the correspondence between local identification information and data format conversion protocols, it is determined whether the local system has the data format conversion protocol corresponding to the identification information.

[0018] The frame headers of the transmission protocol are in the following order:

[0019] Send IP address, destination IP address, communication protocol, identification information, and verification code, or

[0020] Identification information, sending IP, destination IP, communication protocol and verification code, or

[0021] Send IP address, destination IP address, communication protocol, verification code, and identification information.

[0022] The data format conversion protocol is generated based on the data format provided by the sensor equipment manufacturer and the data format of the target database, or it is determined by searching from an existing protocol library.

[0023] When the data format of the target database or the data format provided by the sensor device manufacturer changes, the data format conversion protocol is updated.

[0024] This invention also provides a data format conversion method for IoT sensors, applied to sensors, wherein the sensors acquire identification information, and the identification information is obtained based on the sensor device manufacturer code and device type code;

[0025] Update the initial identification information of the protocol layer to the aforementioned identification information;

[0026] The data format conversion protocol of the sensor is determined based on the identification information.

[0027] This invention also provides a data format conversion method for IoT sensors, applied on a platform, the method comprising:

[0028] Receive a registration request sent by a sensor, the registration request carrying the sensor device manufacturer code and device type code;

[0029] Based on the sensor equipment manufacturer code and equipment type code, determine the identification information corresponding to the sensor, and determine the corresponding data format conversion protocol based on the identification information;

[0030] Send the identification information and the data format conversion protocol to the gateway, or send the data format conversion protocol corresponding to the identification information to the gateway after receiving the request from the gateway.

[0031] This invention also provides a gateway, the gateway comprising:

[0032] The processing module is used to receive data sent by the sensor based on the transmission protocol, and parse the protocol layer identification information of the data. The identification information is related to the sensor device manufacturer code and device type code.

[0033] The identification module is used to identify whether the identification information obtained by the receiving module is a default value, and when the identification information is not a missing value, to obtain the data format conversion protocol corresponding to the identification information.

[0034] The format conversion module is used to convert the data according to the data format conversion protocol obtained by the recognition module, and upload the format conversion result to the platform.

[0035] The identification module includes an identification unit, a judgment unit, and an acquisition unit.

[0036] The identification unit is used to identify whether the identification information obtained by the receiving module is a default value;

[0037] The judgment unit is used to determine whether there is a data format conversion protocol corresponding to the identification information locally when the identification unit identifies that the identification information is not a default value.

[0038] The acquisition unit is used to acquire the corresponding data format conversion protocol from the local machine when the judgment result of the judgment unit is "something"; and to request the platform to send the data format conversion protocol corresponding to the identification information when the judgment result of the judgment unit is "no".

[0039] The processing module is further configured to: locally store the correspondence between identification information and data format conversion protocols.

[0040] Specifically, the judgment unit is used to determine whether there is a data format conversion protocol corresponding to the identification information locally, based on the correspondence between the local identification information and the data format conversion protocol, when the identification unit identifies that the identification information is not a default value.

[0041] The frame headers of the transmission protocol are in the following order:

[0042] Send IP address, destination IP address, communication protocol, identification information, and verification code, or

[0043] Identification information, sending IP, destination IP, communication protocol and verification code, or

[0044] Send IP address, destination IP address, communication protocol, verification code, and identification information.

[0045] This invention also provides a sensor, the sensor comprising:

[0046] The acquisition module is used to acquire identification information, which is obtained based on the sensor device manufacturer code and device type code;

[0047] The update module is used to update the initial identification information of the protocol layer to the identification information;

[0048] The determination module is used to determine the data format conversion protocol of the sensor based on the identification information determined by the update module.

[0049] This invention also provides a platform, the platform comprising:

[0050] The receiving module is used to receive a registration request sent by the sensor, wherein the registration request carries the sensor device manufacturer code and device type code;

[0051] The determination module is used to determine the identification information corresponding to the sensor based on the sensor device manufacturer code and device type code, and to determine the corresponding data format conversion protocol based on the identification information;

[0052] The distribution module is used to distribute the identification information and the data format conversion protocol to the gateway, or to receive the request from the gateway to distribute the data format conversion protocol, and distribute the data format conversion protocol corresponding to the identification information to the gateway.

[0053] This invention also provides a data format conversion system for IoT sensors, including sensors, gateways, and a platform.

[0054] The sensor is used to send a registration request to the platform and send sensor data to the gateway based on the transmission protocol. The registration request carries the sensor device manufacturer code and device type code.

[0055] The gateway receives data sent by the sensor, parses the protocol layer identification information of the data, the identification information being related to the sensor device manufacturer code and device type code; identifies whether the identification information is a default value; if the identification information is not a missing value, it obtains the data format conversion protocol corresponding to the identification information; performs format conversion on the data according to the data format conversion protocol, and uploads the format conversion result to the platform.

[0056] The platform is used to determine the identification information corresponding to the sensor based on the sensor device manufacturer code and device type code, and to determine the corresponding data format conversion protocol based on the identification information; to send the identification information and the data format conversion protocol to the gateway, or to send the data format conversion protocol corresponding to the identification information to the gateway after receiving a request from the gateway to send the data format conversion protocol.

[0057] This invention also provides a communication device, including a memory, a processor, and a program stored in the memory and executable on the processor. When the processor executes the program, it implements the data format conversion method for IoT sensors as described above.

[0058] This invention also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps in the data format conversion method for IoT sensors as described above.

[0059] The above-described technical solution of the present invention has at least the following beneficial effects:

[0060] In the data format conversion method, gateway, and communication device for IoT sensors of this invention, a data format conversion protocol is determined by introducing identification information based on device manufacturer and device type. When the gateway receives data sent by the sensor, it converts the received data according to this data format conversion protocol and uploads the converted data to the platform. Compared to traditional device ID binding and MAC address binding, this invention does not require device IDs and MAC addresses; it only requires sensor device manufacturer information and device type. This greatly reduces dependence on sensor device manufacturers and lowers the pressure on platform data storage and processing. Attached Figure Description

[0061] Figure 1 This diagram illustrates the deployment system structure for data format conversion of IoT sensors provided in this embodiment of the invention.

[0062] Figure 2 This diagram illustrates a data format conversion method for IoT sensors on the gateway side provided in an embodiment of the present invention.

[0063] Figure 3 This diagram illustrates a data format conversion method for IoT sensors on the platform side provided in an embodiment of the present invention.

[0064] Figure 4 This diagram illustrates the sensor-gateway-platform interaction process that supports standardized sensor data formats, as provided in this embodiment of the invention.

[0065] Figure 5 This diagram illustrates the gateway structure provided in an embodiment of the present invention.

[0066] Figure 6 This is a schematic diagram of the platform structure provided in an embodiment of the present invention. Detailed Implementation

[0067] To make the technical problems, technical solutions and advantages of the present invention clearer, a detailed description will be given below in conjunction with the accompanying drawings and specific embodiments.

[0068] like Figure 1 As shown, this embodiment of the invention provides a deployment system for sensor data format conversion. The system includes a sensor 11, a gateway 12, and a platform 13. The data from the sensor 11 is converted at the gateway 12 and uploaded to the platform 13 in a standardized data format.

[0069] When sensor 11 registers on the platform, it determines the corresponding identification information NewID based on the sensor device manufacturer and device type; and updates the protocol layer identifier NewID field from the default value (such as 0) to NewID.

[0070] In this embodiment of the invention, the device identifier NewID is determined by the sensor device manufacturer and the device type. Devices of the same type manufactured by the same manufacturer have the same data format, and the NewID uses the same identifier encoding for these devices. The encoding method can be based on existing encoding methods, such as AB, where A is the sensor device manufacturer code and B is the device type code.

[0071] Gateway 12 receives data sent by sensor 11. The data protocol layer has an identifier NewID. The gateway uses the value of NewID to determine the data format conversion required at the data layer. Based on NewID, it looks up the local NewID and data format conversion protocol lookup table. If no corresponding conversion protocol is found, it requests the data format conversion protocol from platform 13. Gateway 12 completes the data format conversion, re-encapsulates the data, and uploads it to platform 13.

[0072] Platform 13 sends NewID to gateway 12, determines the sensor data format based on NewID, and converts it into the target data format using the data format conversion protocol T.

[0073] like Figure 2 As shown, this embodiment of the invention provides a data format conversion method for IoT sensors, applied in a gateway, including:

[0074] Step 101: Receive data sent by the sensor based on the transmission protocol, and parse the protocol layer identification information of the data. The identification information is related to the sensor device manufacturer information and device type.

[0075] Typical communication protocols include the sending address, destination address, transmission protocol type, and checksum in the frame header. Addressing the issues in sensor data format standardization, this invention proposes a new transmission protocol that adds an identifier to the existing frame header. The default value of this identifier indicates that data format conversion is not supported; the identifier information is determined by the sensor device manufacturer and device type.

[0076] Original frame header:

[0077] Send IP Destination IP Communication Protocol Verification code

[0078] The transmission protocol frame header provided in this embodiment of the invention:

[0079] Option 1

[0080] Send IP Destination IP Communication Protocol New ID Verification code

[0081] Option 2

[0082] New ID Send IP Destination IP Communication Protocol Verification code

[0083] Option 3

[0084] Send IP Destination IP Communication Protocol Verification code New ID

[0085] As can be seen, the frame header of the transmission protocol provided in this embodiment of the invention consists of, in sequence, the sending IP, the destination IP, the communication protocol, the identification information and the verification code, or the identification information, the sending IP, the destination IP, the communication protocol and the verification code, or the sending IP, the destination IP, the communication protocol, the verification code and the identification information.

[0086] Before receiving data from the sensors, the gateway stores the correspondence between identification information and data format conversion protocols locally.

[0087] Step 102: Identify whether the identification information is a default value, and if the identification information is not a missing value, obtain the data format conversion protocol corresponding to the identification information.

[0088] Specifically, the gateway identifies whether the NewID identifier is the default value. If not, data plane parsing is required. It then uses a lookup table of NewID and existing local data format conversion protocols T (see Table 1) to determine if a corresponding data format conversion protocol T exists locally.

[0089] If not, the gateway requests the platform to send the data format conversion protocol T corresponding to the NewID, and the platform responds to the gateway's request and sends the data format conversion protocol T corresponding to the NewID.

[0090] If so, the gateway obtains the data format conversion protocol T locally, performs data format conversion on the data plane, and uploads the converted data to the platform.

[0091] The above-mentioned determination of whether the local system has the data format conversion protocol corresponding to the identification information includes: determining whether the local system has the data format conversion protocol corresponding to the identification information based on the correspondence between the local identification information and the data format conversion protocol.

[0092] Table 1. Comparison of NewID with Existing Local Data Format Conversion Protocol T

[0093]

[0094] Step 103: Convert the data according to the data format conversion protocol.

[0095] The gateway can upload the conversion results to the platform after converting the corresponding data.

[0096] Additionally, when the data format of the target database or the sensor device changes, the data format conversion protocol T needs to be maintained. This method first updates the data format conversion protocol T on the platform, then queries all gateways for the relevant NewID. If a NewID exists, the corresponding T is pushed to the gateway, replacing the previous conversion protocol.

[0097] The gateway in this embodiment of the invention has the following capabilities:

[0098] (1) Support the above transmission protocol, that is, when the received information is connected, first check the NewID field of the protocol layer. If it is not the default value, then perform data layer unpacking and data format conversion.

[0099] (2) Generate and maintain a table of NewID and local existing data format conversion protocol T (see Table 1), and provide an interface for the platform to update and maintain the data format conversion protocol T.

[0100] (3) It has the ability to perform data format conversion.

[0101] The data format conversion method for IoT sensors in this invention introduces identification information based on device manufacturer and device type to determine a data format conversion protocol. When the gateway receives data sent by the sensor, it converts the received data according to this protocol and uploads the converted data to the platform. Compared to traditional device ID binding and MAC address binding, this invention does not require device IDs and MAC addresses; it only requires sensor manufacturer information and device type. This significantly reduces dependence on sensor manufacturers and lowers the pressure on the platform's data storage and processing.

[0102] This invention provides a data format conversion method for IoT sensors, applicable to sensors.

[0103] The sensor acquires identification information, which is obtained based on the sensor device manufacturer code and device type code.

[0104] Update the initial identification information of the protocol layer to the aforementioned identification information;

[0105] The data format conversion protocol of the sensor is determined based on the identification information.

[0106] The data format conversion method for IoT sensors in this invention introduces device manufacturer and device type information to determine identification information, and then determines a data format conversion protocol. Once the sensor determines the data format conversion protocol, the gateway can perform format conversion based on this protocol when sending data. Compared to traditional device ID binding and MAC address binding, this invention does not require device IDs and MAC addresses; it only requires sensor device manufacturer information and device type, greatly reducing dependence on sensor device manufacturers.

[0107] like Figure 3 As shown, this embodiment of the invention also provides a data format conversion method for IoT sensors, applied on a platform, including:

[0108] Step 201: Receive a registration request sent by the sensor, the registration request carrying the sensor device manufacturer code and device type code.

[0109] Step 202: Determine the identification information corresponding to the sensor based on the sensor device manufacturer code and device type code, and determine the corresponding data format conversion protocol based on the identification information.

[0110] In this embodiment of the invention, the device identifier NewID is determined by the sensor device manufacturer and the device type. Devices of the same type manufactured by the same manufacturer have the same data format, and the NewID uses the same identifier encoding for these devices. The encoding method can be based on existing encoding methods, such as AB, where A is the sensor device manufacturer code and B is the device type code.

[0111] Step 203: Send the identification information and data format conversion protocol to the gateway, or after receiving the request from the gateway to send the data format conversion protocol information, send the data format conversion protocol corresponding to the identification information to the gateway.

[0112] In this embodiment of the invention, when the platform determines the NewID and data format conversion protocol corresponding to the sensor data based on the sensor data, it sends the corresponding NewID and data format conversion protocol to the gateway. The gateway then constructs a lookup table between the NewID and its existing local data format conversion protocols. Upon receiving data sent by the sensor, the gateway checks if a corresponding data format conversion protocol exists locally. If not, it sends a request to the platform to send the corresponding data format conversion protocol. If a protocol exists, the gateway directly uses its data format conversion protocol to perform format conversion on the sensor data in the data interface. The gateway then uploads the format-converted data to the platform.

[0113] The platform needs to have the following capabilities:

[0114] (1) During sensor device registration, the sensor device identification information NewID is determined based on the sensor device manufacturer and device type, and its data format conversion protocol T is also determined. Protocol T can be automatically generated based on the data format sample provided by the manufacturer and the data format of the target database, or it can be determined by searching for it in an existing protocol library.

[0115] (2) When the target database data format changes or the vendor data format changes, the data format conversion protocol T can be updated.

[0116] (3) When the data format conversion protocol T is updated, the protocol T stored locally on the gateway can be queried and updated accordingly.

[0117] The data format conversion method for IoT sensors in this embodiment of the invention utilizes device manufacturer and device type identification information to determine a data format conversion protocol. Upon receiving a request from the gateway to send the data format conversion protocol information, the method sends the corresponding data format conversion protocol to the gateway. When the gateway receives data sent by the sensor, it converts the received data format based on the corresponding data format conversion protocol and uploads the converted data to the platform. Compared to traditional device ID binding and MAC address binding, this embodiment of the invention does not require device IDs and MAC addresses; it only requires sensor device manufacturer information and device type, greatly reducing dependence on sensor device manufacturers and lowering the pressure on platform data storage and processing.

[0118] like Figure 4 As shown, this embodiment of the invention also provides a sensor-gateway-platform interaction process that supports sensor data format standardization, the process including:

[0119] Step 1: Register the sensor on the platform and determine its manufacturer and device type information;

[0120] Step 2: Based on the sensor equipment manufacturer and equipment type information, determine the NewID, send it to the sensor, the sensor saves it and updates its communication protocol; based on the NewID, determine the sensor's data format, compare it with the data format required by the platform database, and generate a data format conversion protocol T.

[0121] Step 3: The sensor sends data to the gateway;

[0122] Step 4: The gateway first parses the protocol layer data and identifies that NewID is not the default value, therefore data plane parsing is required. It uses a lookup table of NewID and existing local data format conversion protocols T to determine if there is a corresponding protocol T for NewID locally. If not, proceed to step 5; otherwise, skip steps 5 and 6 and proceed to step 7.

[0123] Step 5: The gateway requests the platform to send the data format conversion protocol T;

[0124] Step 6: The platform sends a data format conversion protocol T in response to the request from the corresponding gateway.

[0125] Step 7: The gateway performs data format conversion on the data plane;

[0126] Step 8: The gateway uploads the converted data to the platform.

[0127] When the data format of the target database or the data format of the sensor device changes, the data format conversion protocol T needs to be maintained. This method first updates the data format conversion protocol T on the platform, then queries all gateways for the relevant NewID. If a NewID exists, the corresponding T is pushed to the gateway, replacing the previous conversion protocol.

[0128] Correspondingly, embodiments of the present invention provide a data format conversion system for IoT sensors, including sensors, gateways, and platforms;

[0129] The sensor is used to send a registration request to the platform and send sensor data to the gateway based on the transmission protocol. The registration request carries the sensor device manufacturer code and device type code.

[0130] The gateway receives data sent by the sensor, parses the protocol layer identification information of the data, the identification information being related to the sensor device manufacturer code and device type code; identifies whether the identification information is a default value, and when the identification information is not a missing value, obtains the data format conversion protocol corresponding to the identification information; performs format conversion on the data according to the data format conversion protocol, and uploads the format conversion result to the platform.

[0131] The platform is used to determine the identification information corresponding to the sensor based on the sensor device manufacturer code and device type code, and to determine the corresponding data format conversion protocol based on the identification information; to send the identification information and the data format conversion protocol to the gateway, or to send the data format conversion protocol corresponding to the identification information to the gateway after receiving a request from the gateway to send the data format conversion protocol.

[0132] The IoT sensor data format conversion system of this invention utilizes device manufacturer and device type identification information to determine the data format conversion protocol. Upon receiving a request from the gateway to send the data format conversion protocol, the system sends the corresponding protocol to the gateway. When the gateway receives data from the sensor, it converts the received data according to the corresponding protocol and uploads the converted data to the platform. Compared to traditional device ID binding and MAC address binding, this invention does not require device IDs and MAC addresses; it only requires sensor manufacturer information and device type, greatly reducing dependence on sensor manufacturers and lowering the platform's data storage and processing load.

[0133] This invention also provides a sensor, the sensor comprising:

[0134] The acquisition module is used to obtain the NewID, which is obtained based on the sensor device manufacturer code and device type code.

[0135] The update module is used to update the initial identification information of the protocol layer to NewID;

[0136] The sensor updates its protocol layer identifier NewID field from the default value (such as 0) to NewID.

[0137] The determination module is used to determine the data format conversion protocol of the sensor based on the NewID.

[0138] The sensor in this embodiment of the invention determines identification information by introducing device manufacturer and device type, and then determines a data format conversion protocol. This allows the gateway to perform format conversion based on the data format conversion protocol when the sensor sends data to the gateway. Compared to traditional device ID binding and MAC address binding, this embodiment of the invention does not require device ID and MAC address; only sensor device manufacturer information and device type are needed, greatly reducing dependence on sensor device manufacturers. For the sensor, only a NewID identifier is added to the protocol layer of the communication protocol, placing very low demands on the sensor itself and simplifying implementation.

[0139] like Figure 5 As shown, this embodiment of the invention also provides a gateway, including:

[0140] Processing module 301 is used to receive data sent by the sensor based on the transmission protocol, and parse the protocol layer identification information of the data. The identification information is related to the sensor device manufacturer code and device type code.

[0141] The identification module 302 is used to identify whether the identification information obtained by the receiving module 301 is a default value, and when the identification information is identified as not being a missing value, to obtain the data format conversion protocol corresponding to the identification information.

[0142] The format conversion module 303 is used to convert the data according to the data format conversion protocol obtained by the recognition module 302.

[0143] As an optional embodiment, the identification module includes an identification unit, a judgment unit, and an acquisition unit;

[0144] The identification unit is used to identify whether the identification information obtained by the receiving module is a default value;

[0145] The judgment unit is used to determine whether there is a data format conversion protocol corresponding to the identification information locally when the identification unit identifies that the identification information is not a default value.

[0146] The acquisition unit is used to acquire the corresponding data format conversion protocol from the local machine when the judgment result of the judgment unit is "something"; and to request the platform to send the data format conversion protocol corresponding to the identification information when the judgment result of the judgment unit is "no".

[0147] As an optional embodiment, the processing module 301 is further configured to: locally store the correspondence between identification information and data format conversion protocols.

[0148] As an optional embodiment, the determination unit is specifically used to determine whether there is a data format conversion protocol corresponding to the identification information locally, based on the correspondence between the local identification information and the data format conversion protocol, when the identification unit identifies that the identification information is not a default value.

[0149] As an optional embodiment, the frame header of the transmission protocol is sequentially as follows:

[0150] Send IP address, destination IP address, communication protocol, identification information, and verification code, or

[0151] Identification information, sending IP, destination IP, communication protocol and verification code, or

[0152] Send IP address, destination IP address, communication protocol, verification code, and identification information.

[0153] As an optional embodiment, the data format conversion protocol is generated based on the data format provided by the sensor device manufacturer and the data format of the target database, or determined by searching from an existing protocol library.

[0154] As an optional embodiment, when the data format of the target database or the data format provided by the sensor device manufacturer changes, the data format conversion protocol is updated.

[0155] The gateway in this embodiment of the invention determines a data format conversion protocol by introducing identification information based on device manufacturer and device type. When the gateway receives data from a sensor, it converts the received data according to this data format conversion protocol before uploading the converted data to the platform. Compared to traditional device ID binding and MAC address binding, this embodiment of the invention does not require device IDs and MAC addresses; it only requires sensor device manufacturer information and device type. This significantly reduces dependence on sensor device manufacturers and lowers the pressure on the platform's data storage and processing.

[0156] This invention reduces the data load on the platform from the gateway. NewID can be reused in different projects, and the corresponding conversion protocol can also be reused. The modification of the platform and gateway is relatively small, and more sensor manufacturers can become equipment suppliers. If the conversion protocol needs to be updated due to changes in the data format of the platform and sensors, the update can be completed on the platform, and the location of all relevant gateways can be queried with one click to push the new protocol, which improves maintenance efficiency and reduces maintenance costs.

[0157] It should be noted that the gateway provided in this embodiment of the invention is a gateway capable of executing the above-described data format conversion method for IoT sensors. Therefore, all embodiments of the above-described data format conversion method for IoT sensors are applicable to this gateway and can achieve the same or similar beneficial effects.

[0158] like Figure 6 As shown, this embodiment of the invention also provides a platform, including:

[0159] The receiving module 401 is used to receive a registration request sent by the sensor, wherein the registration request carries the sensor device manufacturer code and device type code;

[0160] The determination module 402 is used to determine the identification information corresponding to the sensor based on the sensor device manufacturer code and device type code, and to determine the corresponding data format conversion protocol based on the identification information;

[0161] The sending module 403 is used to send the identification information and the data format conversion protocol to the gateway, or to receive the information sent by the gateway requesting the sending of the data format conversion protocol, and send the data format conversion protocol corresponding to the identification information to the gateway.

[0162] The platform in this embodiment of the invention utilizes device manufacturer and device type identification information to determine a data format conversion protocol. Upon receiving a request from the gateway to send the data format conversion protocol information, the platform sends the corresponding data format conversion protocol to the gateway. When the gateway receives data sent by the sensor, it performs format conversion on the received data based on the corresponding data format conversion protocol and uploads the converted data to the platform. Compared to traditional device ID binding and MAC address binding, this embodiment of the invention does not require device IDs and MAC addresses; it only requires sensor device manufacturer information and device type, greatly reducing dependence on sensor device manufacturers and lowering the platform's data storage and processing pressure.

[0163] This invention also provides a communication device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the various processes in the data format conversion method embodiment of the Internet of Things sensor described above, and achieves the same technical effect. To avoid repetition, it will not be described again here.

[0164] This invention also provides a computer-readable storage medium storing a computer program. When executed by a processor, this program implements the various processes described above in the data format conversion method embodiment for IoT sensors, achieving the same technical effect. To avoid repetition, it will not be described again here. The computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0165] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-readable storage media (including, but not limited to, disk storage and optical storage) containing computer-usable program code.

[0166] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 A device for one or more processes and / or the functions specified in one or more boxes.

[0167] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce a paper article including an instruction means, the instruction means being implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0168] These computer program instructions can also be loaded onto a computer or other programmable data processing equipment, causing the computer or other programmable equipment to perform a series of operational steps to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0169] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A method for data format conversion of an Internet of Things sensor, applied to a gateway, characterized in that, The method includes: The system receives data sent by the sensor based on a transmission protocol and parses the protocol layer identification information of the data. This identification information is related to the sensor device manufacturer code and device type code. The system identifies whether the identification information is a default value, and when it is determined that the identification information is not a missing value, it obtains the data format conversion protocol corresponding to the identification information; wherein, a missing value of the identification information represents that data format conversion is not supported. The data is converted according to the data format conversion protocol; The frame headers of the transmission protocol are as follows: Send IP address, destination IP address, communication protocol, identification information, and verification code, or Identification information, sending IP, destination IP, communication protocol and verification code, or Send IP address, destination IP address, communication protocol, verification code, and identification information.

2. The method of claim 1, wherein, The step of obtaining the data format conversion protocol corresponding to the identification information includes: Determine whether the local machine has a data format conversion protocol corresponding to the identification information; If so, obtain the corresponding data format conversion protocol from the local machine; If not, request the platform to issue the data format conversion protocol corresponding to the identification information.

3. The method of claim 2, wherein, Before the gateway receives data sent by the sensor, the method further includes: The system stores the mapping between identification information and data format conversion protocols.

4. The method of claim 3, wherein, The step of determining whether the local machine has a data format conversion protocol corresponding to the identification information includes: Based on the correspondence between local identification information and data format conversion protocols, it is determined whether the local system has the data format conversion protocol corresponding to the identification information.

5. The method of claim 3, wherein, The data format conversion protocol is generated based on the data format provided by the sensor equipment manufacturer and the data format of the target database, or it is determined by searching from an existing protocol library.

6. The method of claim 5, wherein, When the data format of the target database or the data format provided by the sensor device manufacturer changes, the data format conversion protocol is updated.

7. A data format conversion method for an Internet of Things (IoT) sensor, applied to sensors, characterized in that, The sensor acquires identification information, which is obtained based on the sensor device manufacturer code and device type code. Update the initial identification information of the protocol layer to the aforementioned identification information; The data format conversion protocol of the sensor is determined based on the identification information; wherein, missing values ​​in the identification information represent that data format conversion is not supported; The sensor transmits data based on a transmission protocol, and the frame headers of the transmission protocol are as follows: Send IP address, destination IP address, communication protocol, identification information, and verification code, or Identification information, sending IP, destination IP, communication protocol and verification code, or Send IP address, destination IP address, communication protocol, verification code, and identification information. 8.A method for data format conversion of an Internet of Things sensor, applied to a platform, and characterized in that, The platform includes: Receive a registration request sent by a sensor, the registration request carrying the sensor device manufacturer code and device type code; Based on the sensor equipment manufacturer code and equipment type code, determine the identification information corresponding to the sensor, and determine the corresponding data format conversion protocol based on the identification information; The identification information and the data format conversion protocol are sent to the gateway, or after receiving a request from the gateway to send the data format conversion protocol, the data format conversion protocol corresponding to the identification information is sent to the gateway; wherein, a missing value in the identification information indicates that data format conversion is not supported; The sensor transmits data based on a transmission protocol, and the frame headers of the transmission protocol are as follows: Send IP address, destination IP address, communication protocol, identification information, and verification code, or Identification information, sending IP, destination IP, communication protocol and verification code, or Send IP address, destination IP address, communication protocol, verification code, and identification information.

9. A gateway, characterized by The gateway includes: The processing module is used to receive data sent by the sensor based on the transmission protocol, and parse the protocol layer identification information of the data. The identification information is related to the sensor device manufacturer code and device type code. The identification module is used to identify whether the identification information obtained by the processing module is a default value, and when the identification information is identified as not being a missing value, to obtain the data format conversion protocol corresponding to the identification information; The format conversion module is used to convert the data according to the data format conversion protocol obtained by the identification module; wherein, missing values ​​of the identification information represent that data format conversion is not supported; The frame headers of the transmission protocol are as follows: Send IP address, destination IP address, communication protocol, identification information, and verification code, or Identification information, sending IP, destination IP, communication protocol and verification code, or Send IP address, destination IP address, communication protocol, verification code, and identification information.

10. The gateway of claim 9, wherein, The identification module includes an identification unit, a judgment unit, and an acquisition unit; The identification unit is used to identify whether the identification information obtained by the processing module is a default value; The judgment unit is used to determine whether there is a data format conversion protocol corresponding to the identification information locally when the identification unit identifies that the identification information is not a default value. The acquisition unit is used to acquire the corresponding data format conversion protocol from the local machine when the judgment result of the judgment unit is sometimes. When the judgment result of the judgment unit is negative, it requests the platform to send the data format conversion protocol corresponding to the identification information.

11. The gateway according to claim 9 or 10, characterized in that, The processing module is also used to: locally store the correspondence between identification information and data format conversion protocols.

12. The gateway of claim 10, wherein, The judgment unit is specifically used to determine whether there is a data format conversion protocol corresponding to the identification information locally, based on the correspondence between the local identification information and the data format conversion protocol, when the identification unit identifies that the identification information is not the default value.

13. A sensor, characterized by The sensor includes: The acquisition module is used to acquire identification information, which is obtained based on the sensor device manufacturer code and device type code; The update module is used to update the initial identification information of the protocol layer to the identification information; The determining module is used to determine the data format conversion protocol of the sensor based on the identification information determined by the updating module; wherein, a missing value in the identification information represents that data format conversion is not supported; The sensor transmits data based on a transmission protocol, and the frame headers of the transmission protocol are as follows: Send IP address, destination IP address, communication protocol, identification information, and verification code, or Identification information, sending IP, destination IP, communication protocol and verification code, or Send IP address, destination IP address, communication protocol, verification code, and identification information.

14. A platform, characterized by The platform includes: The receiving module is used to receive a registration request sent by the sensor, wherein the registration request carries the sensor device manufacturer code and device type code; The determination module is used to determine the identification information corresponding to the sensor based on the sensor device manufacturer code and device type code, and to determine the corresponding data format conversion protocol based on the identification information; The distribution module is used to distribute the identification information and the data format conversion protocol to the gateway, or, after receiving a request from the gateway to distribute the data format conversion protocol, distribute the data format conversion protocol corresponding to the identification information to the gateway; wherein, a missing value in the identification information indicates that data format conversion is not supported; The sensor transmits data based on a transmission protocol, and the frame headers of the transmission protocol are as follows: Send IP address, destination IP address, communication protocol, identification information, and verification code, or Identification information, sending IP, destination IP, communication protocol and verification code, or Send IP address, destination IP address, communication protocol, verification code, and identification information.

15. A data format conversion system for an Internet of Things (IoT) sensor, comprising a sensor, a gateway, and a platform, characterized in that, The sensor is used to send a registration request to the platform and send sensor data to the gateway based on the transmission protocol. The registration request carries the sensor device manufacturer code and device type code. The gateway receives data sent by the sensor, parses the protocol layer identification information of the data, the identification information being related to the sensor device manufacturer code and device type code; identifies whether the identification information is a default value, and when it is determined that the identification information is not a missing value, obtains the data format conversion protocol corresponding to the identification information; and performs format conversion on the data according to the data format conversion protocol; wherein, a missing value in the identification information indicates that data format conversion is not supported; The platform is used to determine the identification information corresponding to the sensor based on the sensor device manufacturer code and device type code, and to determine the corresponding data format conversion protocol based on the identification information; and to send the identification information and the data format conversion protocol to the gateway, or to send the data format conversion protocol corresponding to the identification information to the gateway after receiving the request from the gateway to send the data format conversion protocol. The frame headers of the transmission protocol are as follows: Send IP address, destination IP address, communication protocol, identification information, and verification code, or Identification information, sending IP, destination IP, communication protocol and verification code, or Send IP address, destination IP address, communication protocol, verification code, and identification information.

16. A communication device comprising a memory, a processor, and a program stored on the memory and executable on the processor; characterized in that, When the processor executes the program, it implements the data format conversion method for IoT sensors as described in any one of claims 1 to 7.

17. A computer readable storage medium having stored thereon a computer program, characterized in that, When executed by a processor, the program implements the steps in the data format conversion method for IoT sensors as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Method for transferring data in internet of things, internet of things system and corresponding device

    CN103428627A

  • IOT communication method and system, and gateway module

    CN107018147A

  • Apparatus and method for integrating wireless or other field devices in a process control system

    US20070280287A1