Embedded security SDK (Software Development Kit) Internet of Things gateway method based on MQTTS protocol

By using an embedded security SDK IoT gateway method based on the MQTTS protocol, the problem of insufficient security in gateway access and data transmission in existing technologies is solved, realizing an IoT gateway solution with barrier-free access and automatic resolution, thus improving security and efficiency.

CN118972202APending Publication Date: 2024-11-15CHINA UNICOM (SHANGHAI) IND INTERNET CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410944858.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-15
Publication Date
2024-11-15

AI Technical Summary

Technical Problem

Existing embedded security SDK IoT gateway methods require extensive manual intervention and code development during the initial data interaction between the gateway and the IoT platform, as well as the addition and removal of sub-devices, and data transmission security is relatively poor.

Method used

An embedded security SDK IoT gateway method based on the MQTTS protocol is adopted. The SDK is generated and imported by the IoT platform on its own. The core elements are defined in combination with the actual use scenario of the gateway device to realize security authentication, data encryption and decryption and automatic parsing. It supports one-type one-key or one-device one-key authentication, reducing the threshold for manual access and improving security.

Benefits of technology

It enables barrier-free access between IoT gateways and platforms, pre-generation of sub-devices, and automatic data parsing, thereby improving data transmission security and reducing application setup time and access difficulty.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118972202A_ABST
    Figure CN118972202A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of Internet of Things gateways, in particular to an embedded security SDK (Software Development Kit) Internet of Things gateway method based on an MQTTS protocol, which comprises the following steps: S1, by means of the function of an Internet of Things platform server, generating an SDK and a model TSL which are suitable for being embedded into gateway equipment in a self-service manner and importing, and after the importing is completed, executing the step S2; performing simple data uplink and downlink verification after the equipment is registered on the Internet of Things platform, and confirming that the function in the import stage is normal; and S2, gateway equipment information is added in the Internet of Things platform to complete gateway registration, and security authentication and data encryption and decryption are initiated by a gateway equipment side based on an MQTTS protocol. The method can effectively solve the problem that in an existing Internet of Things gateway method, the security authentication and the data encryption and decryption are not influenced under the conditions of data interaction between the gateway and the Internet of Things platform for the first time, gateway sub-equipment addition and deletion and the like. The problems that a large amount of manual access and code development are needed to adapt to newly added and changed data, and the data and transmission security is poor due to the fact that the gateway collects the data of a plurality of sub-devices are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of Internet of Things gateways, and in particular to an embedded security SDK Internet of Things gateway method based on the MQTTS protocol. Background Art

[0002] The development of the Internet of Things is inseparable from the update and iteration of equipment, so that the equipment can collect and report data remotely as scheduled. In some scenarios, the cost of equipment modification is too high, and a gateway needs to be used as a relay bridge to collect / parse local devices and report them remotely to the Internet of Things platform. However, the existing embedded security SDK Internet of Things gateway method still has shortcomings. Specifically, the existing Internet of Things gateway method requires a lot of manual access and code development to adapt to the additions and changes when the gateway interacts with the Internet of Things platform for the first time and when gateway sub-devices are added or deleted. In addition, the gateway aggregates data from multiple sub-devices, and its data and transmission security is poor.

[0003] Therefore, an embedded secure SDK IoT gateway method based on the MQTTS protocol is needed to solve the problems raised in the above background technology. Summary of the invention

[0004] The purpose of the present invention is to provide an embedded security SDK Internet of Things gateway method based on the MQTTS protocol to solve the problems raised in the above background technology.

[0005] To achieve the above object, the present invention provides the following technical solutions: An embedded security SDK IoT gateway method based on the MQTTS protocol includes the following steps: S1, with the help of the IoT platform server function, self-generate the SDK and model TSL that can be embedded in the gateway device and import them. After the import is completed, register the device on the IoT platform and perform simple data uplink and downlink verification to confirm that the import stage functions normally; S2, add the gateway device information to the IoT platform to complete the gateway registration, and the gateway device side initiates security authentication and data encryption and decryption based on the MQTTS protocol. After the authentication is passed, the business can be initiated with the IoT platform, and the gateway side initiates data reporting. After the IoT platform side receives the reported data, it parses it according to the SDK definition content, generates and encapsulates it into a data packet that can be pushed to the application side; S3, initiated by the IoT platform or application platform, sends data or instructions to the gateway device or even the sub-device through the platform to the gateway device. The gateway device first completes security authentication and confirms the legal identity of the data sent. Then, the next step is performed according to the SDK definition and the sent data. The IoT platform determines the online and offline status of the device based on the device data reporting situation, that is, the device activity.

[0006] As a preferred solution of the present invention, in the process of generating an SDK suitable for embedding in a gateway device in S1, it is necessary to define three types of core elements of the gateway device in combination with the actual usage scenario, including attributes, time and services, wherein attributes refer to data fields that the gateway device is expected to report, events refer to types of time such as alarms and warnings of the gateway device, and services correspond to various data services of the gateway device facing the platform side. The SDK is generated with the help of the embedded SDK management function of the Internet of Things platform.

[0007] As a preferred solution of the present invention, the security authentication method in S2 is a one-type-one-password or one-machine-one-password authentication method. During the security authentication process, after the sub-device registration-free button is turned on, when a new device conducts business with the Internet of Things platform through the gateway, the gateway sub-device device information will be pre-generated according to the SDK definition content and subsequent normal data uplink and downlink services can be carried out directly. Otherwise, the platform side needs to manually enable the corresponding sub-device permissions.

[0008] As a preferred solution of the present invention, all gateway devices that have passed security authentication in S2 and their subordinate sub-devices can view details in the sub-device list of the Internet of Things platform, and the start and stop status of the sub-devices can be controlled in the sub-device list.

[0009] As a preferred solution of the present invention, when the reported data in S2 is parsed, the reported data will be parsed into three types of data according to the three core elements of SDK. The data parsed according to the attribute element are the field data reported by the gateway device, the data parsed according to the event element are gateway device alarm and other types of events, and the data parsed according to the service element are various data services of the corresponding gateway device facing the platform side.

[0010] As a preferred solution of the present invention, the data in S2 needs to be encapsulated into the standard interface data required by the upper-layer application. The backtracking of the data reported by the gateway device can view the historical reported data records in the gateway device and its contained sub-devices through the southbound log module on the Internet of Things platform side.

[0011] As a preferred solution of the present invention, the data or instructions sent in S3 implement downlink instruction control of the sub-device through SDK definition content.

[0012] As a preferred solution of the present invention, in S3, according to the device data reporting situation, the SDK supports defining the heartbeat data of the gateway device. When the gateway device is in a non-business state, the heartbeat data is reported according to the defined heartbeat data reporting time interval, and it is determined that the gateway device can be paged by the platform device.

[0013] Compared with the prior art, the present invention has the following beneficial effects: 1. In the present invention, the main process is divided into two stages: the introduction stage and the application stage. The introduction stage mainly generates an SDK that can be embedded in the gateway device. The application stage mainly involves the normal operation of the gateway device and the security authentication and data uplink and downlink process between the IoT platform. The SDK defined by China Unicom specifications is embedded on the device side. During the data collection and reporting process, security authentication and data encryption transmission are performed with the IoT platform developed by China Unicom. At the same time, data parsing and sub-device pre-generation can be automatically completed according to the device data during the device data reporting process, thereby making up for the problem that traditional gateway devices need to be manually accessed for docking and development whenever a sub-device is added during the access process, thereby lowering the platform access threshold. Based on the MQTTS protocol and with the embedded SDK as a bridge, an IoT solution with one-stop barrier-free access, sub-device pre-production and automatic data parsing between the IoT gateway and the IoT platform is constructed. While encrypting and securely transmitting the collected data, barrier-free access between the device and the IoT platform, sub-device pre-generation (such as gateway sub-devices) and automatic data parsing can be achieved, and the application construction time can be reduced and the overall security can be improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] Figure 1 It is the overall scheme framework diagram of the present invention; Figure 2 This is a schematic diagram of the SDK generation and import process of the present invention; Figure 3 It is a schematic diagram of the terminal side process of the present invention; Figure 4 This is a schematic diagram of the three core elements of the SDK of the present invention; Figure 5 It is a schematic diagram of the TSL model structure of the present invention; Figure 6 This is a schematic diagram of the security authentication interface of the present invention; Figure 7 This is a schematic diagram of a sub-device list of the present invention; Figure 8 This is a schematic diagram of the data reporting interface of the present invention; Fig. 9 This is a schematic diagram of the data log interface of the gateway and sub-device of the present invention; Fig.10 This is a schematic diagram of the data downlink and command sending interface of the present invention. DETAILED DESCRIPTION

[0015] The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0016] To facilitate understanding of the present invention, the present invention will be described more comprehensively below with reference to the relevant drawings. Several embodiments of the present invention are given. However, the present invention can be implemented in many different forms and is not limited to the embodiments described herein. On the contrary, the purpose of providing these embodiments is to make the disclosure of the present invention more thorough and comprehensive.

[0017] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by technicians in the technical field to which the present invention belongs. The terms used in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The term "and / or" used herein includes any and all combinations of one or more related listed items.

[0018] For examples, see Figure 1-10 , the present invention provides a technical solution: An embedded security SDK IoT gateway method based on the MQTTS protocol includes the following steps: S1, with the help of the IoT platform server function, self-generate the SDK and model TSL that can be embedded in the gateway device and import them. After the import is completed, register the device on the IoT platform and perform simple data uplink and downlink verification to confirm that the import stage functions normally; S2, add the gateway device information to the IoT platform to complete the gateway registration, and the gateway device side initiates security authentication and data encryption and decryption based on the MQTTS protocol. After the authentication is passed, the business can be initiated with the IoT platform, and the gateway side initiates data reporting. After the IoT platform side receives the reported data, it parses it according to the SDK definition content, generates and encapsulates it into a data packet that can be pushed to the application side; S3, initiated by the IoT platform or application platform, sends data or instructions to the gateway device or even the sub-device through the platform to the gateway device. The gateway device first completes security authentication and confirms the legal identity of the data sent. Then, the next step is performed according to the SDK definition and the sent data. The IoT platform determines the online and offline status of the device based on the device data reporting situation, that is, the device activity.

[0019] Furthermore, in the process of generating an SDK suitable for embedding in a gateway device in S1, it is necessary to define three types of core elements of the gateway device in combination with the actual usage scenario, including attributes, time and services, where attributes refer to data fields that the gateway device is expected to report, events refer to types of time such as alarms and warnings of the gateway device, and services correspond to various data services of the gateway device facing the platform side. The SDK is generated with the help of the embedded SDK management function of the Internet of Things platform.

[0020] Furthermore, the security authentication method in S2 is a one-type-one-password or one-machine-one-password authentication method. During the security authentication process, after the sub-device registration-free button is turned on, when a new device conducts business with the IoT platform through the gateway, the gateway sub-device device information will be pre-generated according to the SDK definition content and subsequent normal data uplink and downlink services can be carried out directly. Otherwise, the platform side needs to manually enable the corresponding sub-device permissions.

[0021] Furthermore, for all gateway devices in S2 that have passed security authentication, the details of their subordinate sub-devices can be viewed in the sub-device list of the Internet of Things platform, and the start and stop status of the sub-devices can be controlled in the sub-device list.

[0022] Furthermore, when the reported data in S2 is parsed, the reported data will be parsed into three types of data according to the three core elements of the SDK. The data parsed according to the attribute element are the field data reported by the gateway device, the data parsed according to the event element are gateway device alarm and warning and other types of events, and the data parsed according to the service element are various data services of the corresponding gateway device facing the platform side.

[0023] Furthermore, the data in S2 needs to be encapsulated into the standard interface data required by the upper-layer application. The backtracking of the data reported by the gateway device can view the historical reported data records in the gateway device and its contained sub-devices through the southbound log module on the IoT platform side.

[0024] Furthermore, the data or instructions sent in S3 implement downlink instruction control of the sub-device through SDK definition content.

[0025] Furthermore, in S3, according to the device data reporting situation, the SDK supports defining the heartbeat data of the gateway device. When the gateway device is in a non-business state, the heartbeat data is reported at the defined heartbeat data reporting time interval, and it is determined that the gateway device can be paged by the platform device.

[0026] With the help of the embedded SDK management function of the IoT platform and combined with the actual usage scenarios, three core elements of the gateway device are defined. Attributes refer to the data fields that the gateway device is expected to report, events refer to types of events such as gateway device alarms and warnings, and services correspond to various data services of the gateway device facing the platform. Self-service generation of SDK and model TSL that can be embedded in the gateway device, and importing the SDK and model TSL. After the import is completed, register the device on the IoT platform and perform simple data uplink and downlink verification to confirm that the import stage functions normally; Add the gateway device information in the IoT platform to complete the gateway registration. The gateway device side initiates security authentication and data encryption and decryption based on the MQTTS protocol. The security authentication methods include one type one password and one machine one password. During the security authentication process, after the sub-device registration-free button is turned on, when a new device conducts business with the IoT platform through the gateway, the gateway sub-device device information will be pre-generated according to the SDK definition content and can directly conduct subsequent normal data uplink and downlink business. Otherwise, the platform side needs to manually open the corresponding sub-device rights. All gateway devices that have passed the security authentication and their subordinate sub-devices can view details in the IoT platform sub-device list, and the start and stop status of the sub-device can be controlled in the sub-device list; After passing the authentication, you can initiate business with the IoT platform. The gateway side initiates data reporting. After receiving the reported data, the IoT platform side parses it according to the SDK definition. When parsing the reported data, it will parse the reported data into three types of data according to the three core elements of the SDK. Among them, the data parsed according to the attribute element is the field data reported by the gateway device, the data parsed according to the event element is the type of event such as the gateway device alarm, and the data parsed according to the service element is the various data services of the corresponding gateway device to the platform side; After parsing is completed, data packets are generated and encapsulated to be pushed to the application side. The data needs to be encapsulated into the standard interface data required by the upper-layer application. The backtracking of the data reported by the gateway device can be viewed through the southbound log module on the IoT platform side to view the historical data records reported by the gateway device and its sub-devices. Initiated by the IoT platform or application platform, the downlink command control of the sub-device is realized through the SDK definition content, and sent to the gateway device through the platform. The gateway device first completes the security authentication, confirms the legal identity of the platform sending the data, and then performs the next operation according to the SDK definition and the sent data. The IoT platform will determine the online and offline status of the device based on the device data reporting situation, that is, the device activity; According to the device data reporting situation, the SDK supports defining the heartbeat data of the gateway device. When the gateway device is in a non-business state, the heartbeat data is reported according to the defined heartbeat data reporting time interval, and the gateway device is confirmed to be paged by the platform device.

[0027] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. An embedded security SDK IoT gateway method based on the MQTTS protocol, characterized in that: The following steps are involved: S1, with the help of the IoT platform server function, self-generate the SDK and model TSL that can be embedded in the gateway device and import them. After the import is completed, register the device on the IoT platform and perform simple data uplink and downlink verification to confirm that the import stage functions normally; S2, add the gateway device information to the IoT platform to complete the gateway registration, and the gateway device side initiates security authentication and data encryption and decryption based on the MQTTS protocol. After the authentication is passed, the business can be initiated with the IoT platform, and the gateway side initiates data reporting. After the IoT platform side receives the reported data, it parses it according to the SDK definition content, generates and encapsulates it into a data packet that can be pushed to the application side; S3, initiated by the IoT platform or application platform, sends data or instructions to the gateway device or even the sub-device through the platform to the gateway device. The gateway device first completes security authentication and confirms the legal identity of the data sent. Then, the next step is performed according to the SDK definition and the sent data. The IoT platform determines the online and offline status of the device based on the device data reporting situation, that is, the device activity.

2. According to claim 1, a method for embedded secure SDK Internet of Things gateway based on MQTTS protocol, characterized in that: In the process of generating an SDK suitable for embedding in a gateway device in S1, it is necessary to define three core elements of the gateway device in combination with the actual usage scenario, including attributes, time and services, where attributes refer to data fields that the gateway device is expected to report, events refer to types of events such as alarms and warnings of the gateway device, and services correspond to various data services of the gateway device facing the platform side. The SDK is generated with the help of the embedded SDK management function of the IoT platform.

3. According to the embedded security SDK Internet of Things gateway method based on the MQTTS protocol according to claim 1, it is characterized in that: The security authentication method in S2 is a one-type-one-password or one-machine-one-password authentication method. During the security authentication process, after the sub-device registration-free button is turned on, when a new device conducts business with the IoT platform through the gateway, the gateway sub-device device information will be pre-generated according to the SDK definition content and subsequent normal data uplink and downlink business can be carried out directly. Otherwise, the platform side needs to manually enable the corresponding sub-device permissions.

4. According to the embedded security SDK Internet of Things gateway method based on the MQTTS protocol according to claim 1, it is characterized in that: All the gateway devices in S2 that have passed security authentication and their subordinate sub-devices can be viewed in detail in the sub-device list of the IoT platform, and the start and stop status of the sub-devices can be controlled in the sub-device list.

5. The embedded security SDK Internet of Things gateway method based on the MQTTS protocol according to claim 1, characterized in that: When the reported data in S2 is parsed, the reported data will be parsed into three types of data according to the three core elements of the SDK. The data parsed according to the attribute element are the field data reported by the gateway device, the data parsed according to the event element are gateway device alarm and warning and other types of events, and the data parsed according to the service element are various data services of the corresponding gateway device facing the platform side.

6. The embedded secure SDK IoT gateway method based on the MQTTS protocol according to claim 1, characterized in that: The data in S2 needs to be encapsulated into the standard interface data required by the upper-layer application. The backtracking of the data reported by the gateway device can view the historical reported data records in the gateway device and its contained sub-devices through the southbound log module on the IoT platform side.

7. The embedded secure SDK IoT gateway method based on the MQTTS protocol according to claim 1, characterized in that: The data or instructions sent in S3 are used to control the downlink instructions of the sub-device through the SDK definition content.

8. The embedded secure SDK IoT gateway method based on the MQTTS protocol according to claim 1, characterized in that: In S3, according to the device data reporting situation, the SDK supports defining the heartbeat data of the gateway device. When the gateway device is in a non-business state, the heartbeat data is reported at the defined heartbeat data reporting time interval, and it is determined that the gateway device can be paged by the platform device.