Method and system for accessing a gateway to an Internet of Things device

By dividing network protocols into manageable components and writing message encoding and decoding plug-ins, the problem of encoding and decoding capability limitations and network capability coupling in device access gateways is solved, achieving flexibility and stability of device access, and supporting multiple Dynamic protocol adaptation by equipment manufacturers.

CN115801912BActive Publication Date: 2024-10-01CHONGQING MARMOT INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211341094.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-30
Publication Date
2024-10-01
Estimated Expiration
2042-10-30

AI Technical Summary

Technical Problem

In the existing technology, the device access gateway needs to adapt to the encoding and decoding capabilities of the platform standard protocol, which limits the device access capability, and the network capabilities are closely coupled with the gateway life cycle, resulting in the need to stop the gateway function when the network environment changes or network resources are switched. , resulting in device data loss and offline status.

Method used

Divide network protocols into manageable network components, use the message encoding and decoding interface and connection authentication interface of the IoT platform to write message encoding and decoding logic, package it as a message encoding and decoding plug-in, and load it into the IoT platform to form a device The access gateway separates network capabilities and data encoding and decoding capabilities, and supports dynamic plug-in upload and user customization.

Benefits of technology

It realizes the decoupling of gateway functions, supports dynamic protocol adaptation of multiple device manufacturers, avoids the limitations of standard protocols of device adaptation platforms, and ensures the stability and flexibility of data transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115801912B_ABST
    Figure CN115801912B_ABST
Patent Text Reader

Abstract

The present invention proposes a method and system for IoT device access gateway, which divides the network protocol into network components; writes message encoding and decoding logic and connection authentication logic, and packages them into message encoding and decoding plug-ins; loads the message encoding and decoding plug-ins into the IoT platform; constructs a device access gateway; stores the transmission protocol and encoding and decoding protocol ID contained in the device access gateway into the product; caches the basic data of the product and the device into a database; when the device uploads data to the IoT platform and / or the IoT platform issues instructions to the device, the basic data of the product is obtained, and the data is transmitted through the network information and device of the product; and the data is encoded and decoded through the encoding and decoding protocol of the product. The method and system separate the network capability and data encoding and decoding capability of the gateway, realizes functional decoupling, and also supports dynamic uploading and user customization of data encoding and decoding plug-ins, which greatly solves the dynamic protocol adaptation problem of multiple device manufacturers in the IoT industry.
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, and in particular to a method and system for accessing an Internet of Things device to a gateway. Background Art

[0002] In the IoT platform, when device data is reported to the platform or the platform sends instructions to the device, it needs to go through the encoding, decoding and authentication of the device access gateway. For devices using different transmission protocols and different encoding and decoding protocols, the device access gateway capabilities used are also different. In related technologies, the standard protocols and fixed transmission network resources of the IoT platform are usually built into the gateway. Through the integration of network resources and standard protocols, a device access gateway that supports processing device message reports and platform messages to devices is organized. This setting method has the following disadvantages:

[0003] (1) Built-in integrated standard protocols require devices to adapt to the encoding and decoding capabilities of the platform standard protocols. However, in the current IoT era, device manufacturers and device protocols are ever-changing, which greatly limits the device access capabilities.

[0004] (2) Manage network capabilities together with the life cycle of the gateway. When the network environment changes or when there is a need to switch to different network resources, the gateway function needs to be stopped first and then switched. In this process, the data reported by the device may be lost, and the device may be offline during the period when the gateway is stopped. Summary of the invention

[0005] The present invention proposes a method and system for IoT device access to a gateway, and mainly solves the following technical problems: in the related art, during the process of device access to the gateway, the device needs to adapt the encoding and decoding capabilities of the platform standard protocol, which limits the device access capability, and manages the network capability together with the life cycle of the gateway, resulting in the need to stop the gateway function when the network environment changes or when switching different network resources.

[0006] To solve the above technical problems, an embodiment of the present invention provides a method for an Internet of Things device to access a gateway, comprising the following steps:

[0007] Step 1: Divide network protocols into manageable network components;

[0008] Step 2: Use the message encoding and decoding interface and connection authentication interface of the IoT platform to write message encoding and decoding logic and connection authentication logic, and package them into a message encoding and decoding plug-in;

[0009] Step 3: Load the message encoding and decoding plug-in into the Internet of Things platform;

[0010] Step 4: Use the network component and the message encoding and decoding plug-in to form a device access gateway;

[0011] Step 5: When a device under a certain product is connected to the device access gateway, the transmission protocol and codec protocol ID contained in the device access gateway are stored in the product;

[0012] Step 6: Create a registration center for device data, and cache the basic data of the product and the basic data of the device in a database;

[0013] Step 7: When the device uploads data to the IoT platform and / or the IoT platform issues instructions to the device, the registration center obtains basic data corresponding to the product to which the device belongs, and transmits data through the network information and device corresponding to the product in the basic data;

[0014] Step 8: Encode and decode the transmitted data using the encoding and decoding protocol corresponding to the product to which the device belongs.

[0015] In one embodiment of the present invention, packaging network protocols into manageable network components includes:

[0016] Fill in the unique attributes of the network protocol, and create a network component for monitoring device connections or connecting to other middleware based on the unique attributes.

[0017] In an embodiment of the present invention, the basic data of the product includes: product name, product ID, object model, codec protocol ID, product status, transmission protocol, gateway ID, gateway name.

[0018] In an embodiment of the present invention, the basic data of the device includes: device name, device ID, product ID, product name, device status, and transmission protocol.

[0019] In an embodiment of the present invention, the network information and device corresponding to the product in the basic data refer to a gateway ID and a device ID, respectively.

[0020] The embodiment of the present invention also provides a system for accessing a gateway to an Internet of Things device, including:

[0021] A subassembly module for subassembling network protocols into manageable network components;

[0022] Write a module to use the message encoding and decoding interface and connection authentication interface of the IoT platform to write message encoding and decoding logic and connection authentication logic, and package them into message encoding and decoding plug-ins;

[0023] A loading module, used to load the message encoding and decoding plug-in into the Internet of Things platform;

[0024] The protocol storage module is used to store the transmission protocol and codec protocol ID contained in the device access gateway into the product;

[0025] A cache module, used for caching the basic data of the product and the basic data of the device into a database;

[0026] A data transmission module, used to obtain basic data corresponding to the product to which the device belongs, and to transmit data through the network information and device corresponding to the product in the basic data;

[0027] The encoding and decoding module is used to encode and decode the transmitted data through the encoding and decoding protocol corresponding to the product to which the device belongs.

[0028] In one embodiment of the present invention, the subassembly module includes a component creation submodule for filling in the unique attributes of the network protocol and creating a network component for monitoring device connections or connecting other middleware according to the unique attributes.

[0029] In one embodiment of the present invention, the device access gateway is composed of the network component and the message encoding and decoding plug-in.

[0030] An embodiment of the present invention also provides a computer-readable storage medium, which stores one or more computer programs. The one or more computer programs can be executed by one or more processors to implement the steps of the above-mentioned method for IoT device accessing a gateway.

[0031] The beneficial technical effects of the present invention are:

[0032] The method and system for accessing an Internet of Things device to a gateway provided by the present invention comprises the following steps: packaging a network protocol into manageable network components; using a message encoding and decoding interface and a connection authentication interface of an Internet of Things platform to compile message encoding and decoding logic and connection authentication logic, and packaging them into a message encoding and decoding plug-in; loading the message encoding and decoding plug-in into the Internet of Things platform; using network components and message encoding and decoding plug-ins to form a device access gateway; when a device under a certain product is accessed to the device access gateway, storing the transmission protocol and encoding and decoding protocol ID contained in the device access gateway into the product; creating a registration center for device data, caching basic data of the product and basic data of the device into a database; when the device uploads data to the Internet of Things platform and / or the Internet of Things platform issues instructions to the device, obtaining basic data corresponding to the product to which the device belongs in the registration center, and transmitting data through network information and devices corresponding to the product in the basic data; encoding and decoding the transmitted data through the encoding and decoding protocol corresponding to the product to which the device belongs, so that the network capability and data encoding and decoding capability of the gateway are separated, functional decoupling is achieved, and dynamic uploading and user customization of data encoding and decoding plug-ins are supported, which greatly solves the problem of dynamic protocol adaptation of multiple device manufacturers in the Internet of Things industry. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] Attached Figure 1 A flowchart of a method for an Internet of Things device to access a gateway in the present invention;

[0034] Attached Figure 2 This is a schematic diagram of the structure of the system for accessing the gateway of the Internet of Things device in the present invention.

[0035] In each of the accompanying drawings: 21, packaging module; 22, writing module; 23, loading module; 24, protocol storage module; 25, cache module; 26, data transmission module; 27, encoding and decoding module. DETAILED DESCRIPTION

[0036] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0037] Embodiment 1

[0038] In order to solve the problems in the related technology that, during the process of device access to the gateway, the device needs to adapt the encoding and decoding capabilities of the platform standard protocol, which limits the device access capability, and the network capability is managed together with the life cycle of the gateway, resulting in the need to stop the gateway function when the network environment changes or when switching different network resources, the embodiment of the present invention provides a method for IoT device access to the gateway, which implements Jetlinks (JetLinks is an open source IoT platform, JetLinks is developed based on Java8, Spring Boot 2.x, WebFlux, Netty, Vert.x, Reactor, etc., and is an open source enterprise-level IoT basic development platform that implements many basic functions related to the IoT and related business development) IoT device access to the gateway by means of capability decoupling and protocol plug-in writing.

[0039] like Figure 1 As shown, a method for an IoT device to access a gateway includes the following steps:

[0040] S101: Divide network protocols into manageable network components.

[0041] In this step, the commonly used network protocols in the Internet of Things industry (including but not limited to MQTT, CoAP, HTTP, WebSocket, TCP and other protocols) are packaged into manageable network components. The implementation logic of packaging network protocols into network components is as follows:

[0042] Fill in the unique properties of the network protocol, and create a network component for monitoring device connections or connecting other middleware based on the unique properties. Specifically, fill in the unique properties of the network protocol including but not limited to the network port, bound network card address, data length, account number, password, etc., and then use the Java network API to create the corresponding network component based on the filled in data.

[0043] S102: Use the message encoding and decoding interface and connection authentication interface of the Internet of Things platform to write message encoding and decoding logic and connection authentication logic, and package them into a message encoding and decoding plug-in.

[0044] In this step, using the message encoding and decoding interface and connection authentication interface provided by the IoT platform, users can write specific message encoding and decoding logic and connection authentication logic according to the devices of different manufacturers, and then package them into message encoding and decoding plug-ins. Specifically, after the code development is completed, the Maven packaging command mvn package can be used to package the code into a message encoding and decoding plug-in.

[0045] S103: Load the message encoding and decoding plug-in into the Internet of Things platform.

[0046] In this step, the classloader provided by Java can be used in the IoT platform to load the plug-in dynamically uploaded by the user into the IoT platform.

[0047] S104: Use network components and message encoding and decoding plug-ins to form a device access gateway.

[0048] In this step, the access gateway of the device is constructed using the above-mentioned different network components and different message encoding and decoding plug-ins.

[0049] S105: After a device under a certain product is connected to the device access gateway, the transmission protocol and codec protocol ID contained in the device access gateway are stored in the product.

[0050] Among them, the product is the abstraction of a type of device in the real world. Multiple devices can be created under one product. For example, iPhone13pro max is a product, and the actual iPhone13 pro max mobile phone entity is a specific device. The device access gateway is virtual and is a piece of business code defined by the platform to undertake device data.

[0051] In this step, when a device under a certain product is connected to the device access gateway, for example, when a physical camera under the camera product of model A is connected to the gateway, the transmission protocol and codec protocol ID contained in the device access gateway are stored in the data form corresponding to the camera product of model A.

[0052] S106: Create a registration center for device data, and cache basic data of products and basic data of devices in a database.

[0053] Specifically, the registration center is used to cache the basic data of products and devices in the redis middleware. Redis is a high-speed cache database that supports multiple data structures such as key-value. It can be used for caching, event publishing and subscription, high-speed queues and other scenarios, and can provide direct storage and access of strings, hashes, lists, queues, and collections.

[0054] The basic data of the product includes but is not limited to product name, product ID, object model (modeling data of the product, such as description of what functions the product supports and what color it is. This field is expressed in JSON format), codec protocol ID, product status, transmission protocol (such as: http, mqtt, tcp, etc.), gateway ID (device access gateway), gateway name and other data.

[0055] The basic data of the device includes but is not limited to the device name, device ID, product ID, product name, device status, transmission protocol, modeling data, device account password and other data.

[0056] S107: When the device uploads data to the IoT platform and / or the IoT platform sends instructions to the device, the registration center obtains basic data corresponding to the product to which the device belongs, and transmits data through the network information and device corresponding to the product in the basic data.

[0057] Specifically, when a device uploads data to the platform or the platform sends instructions to the device, the cache information corresponding to the product (i.e., the basic data of the product) is obtained in the registration center through the device ID of the device, and the data is transmitted through the gateway ID information and device ID information corresponding to the product in the cache information. The network information and device corresponding to the product in the basic data refer to the gateway ID and device ID, respectively. For example, when a device uploads data to the Internet of Things platform, the basic data of the product to which the device belongs is obtained in the registration center through the ID information of the device. After knowing the gateway ID information corresponding to the product, the data transmitted by the device can be sent to the gateway of the corresponding ID. The platform obtains the cache information. The platform runs the network component by applying for a network resource in the server. For example, a TCP type network component. Apply for a TCP service that occupies one port and runs it in the server.

[0058] S108: Encode and decode the transmitted data using the encoding and decoding protocol corresponding to the product to which the device belongs.

[0059] By implementing the above-mentioned method of IoT device access to the gateway, the network capability and data encoding and decoding capability of the gateway are separated, functional decoupling is achieved, and dynamic uploading and user customization of data encoding and decoding plug-ins are supported, which greatly solves the dynamic protocol adaptation problem of multiple device manufacturers in the IoT industry.

[0060] The user needs to select a network component (according to the required protocol), and then needs to fill in the relevant parameters, which are supported by the network component and the codec message protocol, but the device can be universal when accessing the gateway. Different products can use the same device to access the gateway.

[0061] The device access gateway integrates access capabilities such as network components, third-party cloud platforms, and video access. The unique video transmission protocol and codec protocol for video access is called the gb28181 protocol. It is also different from the business logic of the third-party platform of the network component. It unifies the southbound access entrance of the IoT platform. It is a traditional cloud-to-cloud connection, but here it is only southbound cloud-to-cloud connection. Data from other clouds also needs to be encoded and decoded, so a message protocol is also required, but a network component is not required. Because it is a connection between clouds, the network link for messages is http; southbound represents data flowing into the platform. Northbound represents data flowing out of the platform.

[0062] Embodiment 2

[0063] In order to solve the problems in the related art that, during the process of device accessing the gateway, the device needs to adapt the encoding and decoding capabilities of the platform standard protocol, which limits the device access capability, and the network capability is managed together with the life cycle of the gateway, resulting in the need to stop the gateway function when the network environment changes or when switching different network resources, the embodiment of the present invention provides a method for IoT device accessing the gateway.

[0064] like Figure 2 As shown, a system for accessing a gateway to an IoT device includes:

[0065] The subassembly module 21 is used to sub-assemble the network protocol into manageable network components.

[0066] Specifically, the network protocols commonly used in the Internet of Things industry (including but not limited to MQTT, CoAP, HTTP, WebSocket, TCP and other protocols) are packaged into manageable network components.

[0067] The subassembly module also includes a component creation submodule, which is used to fill in the unique attributes of the network protocol and create a network component for monitoring device connections or connecting other middleware according to the unique attributes. Specifically, by filling in the unique attributes of the network protocol including but not limited to the network port, bound network card address, data length, account number, password, etc., and then using the Java network API to create the corresponding network component according to the filled in data.

[0068] The writing module 22 is used to use the message encoding and decoding interface and connection authentication interface of the Internet of Things platform to write message encoding and decoding logic and connection authentication logic, and package them into a message encoding and decoding plug-in.

[0069] Specifically, using the message encoding and decoding interface and connection authentication interface provided by the IoT platform, users can write specific message encoding and decoding logic and connection authentication logic according to the devices of different manufacturers, and then package them into message encoding and decoding plug-ins. After the code development is completed, you can use the Maven packaging command mvn package to package the code into a message encoding and decoding plug-in.

[0070] The loading module 23 is used to load the message encoding and decoding plug-in into the Internet of Things platform.

[0071] Specifically, the classload class loader provided by Java can be used in the Internet of Things platform to load the plug-in dynamically uploaded by the user into the Internet of Things platform.

[0072] The protocol storage module 24 is used to store the transmission protocol and codec protocol ID contained in the device access gateway into the product.

[0073] The device access gateway is composed of the above-mentioned network components and message encoding and decoding plug-ins.

[0074] A product is an abstraction of a type of device in the real world. Multiple devices can be created under one product. For example, the iPhone13 pro max is a product, and the iPhone13 pro max mobile phone entity actually used is the specific device.

[0075] Specifically, when a device under a certain product is connected to the device access gateway, for example, when a physical camera under a camera product of model A is connected to the gateway, the transmission protocol and codec protocol ID contained in the device access gateway are stored in the data form corresponding to the camera product of model A.

[0076] The cache module 25 is used to cache the basic data of the product and the basic data of the equipment into the database.

[0077] Specifically, the basic data of the product and the basic data of the device are cached in the redis middleware. Redis is a high-speed cache database that supports multiple data structures such as key-value. It can be used in scenarios such as caching, event publishing and subscription, and high-speed queues. It can provide direct storage and access of strings, hashes, lists, queues, and collections.

[0078] The basic data of the product includes but is not limited to product name, product ID, object model (modeling data of the product, such as description of what functions the product supports and what color it is. This field is expressed in JSON format), codec protocol ID, product status, transmission protocol (such as: http, mqtt, tcp, etc.), gateway ID (device access gateway), gateway name and other data.

[0079] The basic data of the device includes but is not limited to the device name, device ID, product ID, product name, device status, transmission protocol and other data.

[0080] The data transmission module 26 is used to obtain basic data corresponding to the product to which the device belongs, and to transmit data through the network information corresponding to the product in the basic data and the device.

[0081] Specifically, when a device uploads data to the platform or the platform sends instructions to the device, the cache information corresponding to the product (i.e., the basic data of the product) is obtained in the registration center through the device ID of the device, and the data is transmitted through the gateway ID information and device ID information corresponding to the product in the cache information. The network information and device corresponding to the product in the basic data refer to the gateway ID and device ID respectively. For example, when a device uploads data to the IoT platform, the basic data of the product to which the device belongs is obtained in the registration center through the ID information of the device. After knowing the gateway ID information corresponding to the product, the data transmitted by the device can be sent to the gateway of the corresponding ID.

[0082] The codec module 27 is used to encode and decode the transmitted data according to the codec protocol corresponding to the product to which the device belongs.

[0083] Through the application of the above-mentioned system for accessing the IoT device to the gateway, the network capability and data encoding and decoding capability of the gateway are separated, functional decoupling is achieved, and at the same time, dynamic uploading and user customization of data encoding and decoding plug-ins are supported, which greatly solves the dynamic protocol adaptation problem of multiple device manufacturers in the IoT industry.

[0084] Embodiment 3

[0085] The present embodiment also provides a computer-readable storage medium, which includes volatile or non-volatile, removable or non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, computer program modules or other data). Computer-readable storage media include, but are not limited to, RAM (Random Access Memory), ROM (Read-Only Memory), EEPROM (Electrically Erasable Programmable read only memory), flash memory or other memory technology, CD-ROM (Compact Disc Read-Only Memory), digital versatile disk (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and can be accessed by a computer.

[0086] The computer-readable storage medium in this embodiment can be used to store one or more computer programs, and the one or more computer programs stored therein can be executed by a processor to implement at least one step in the method for accessing a gateway to an Internet of Things device in the above-mentioned embodiment 1.

[0087] It can be seen that those skilled in the art should understand that all or some of the steps, systems, and functional modules / units in the above disclosed methods can be implemented as software (which can be implemented with computer program code executable by a computing device), firmware, hardware, and appropriate combinations thereof. In hardware implementations, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component can have multiple functions, or a function or step can be performed by several physical components in cooperation. Some or all physical components can be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit.

[0088] In addition, it is well known to those skilled in the art that communication media generally contain computer readable instructions, data structures, computer program modules or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery media. Therefore, the present invention is not limited to any specific hardware and software combination.

[0089] The above contents are further detailed descriptions of the embodiments of the present invention in combination with specific implementation methods, and it cannot be determined that the specific implementation of the present invention is limited to these descriptions. For ordinary technicians in the technical field to which the present invention belongs, several simple deductions or substitutions can be made without departing from the concept of the present invention, which should be regarded as falling within the protection scope of the present invention.

Claims

1. A method for accessing a gateway to an Internet of Things device, characterized in that: The steps include: Step 1: Pack the network protocols into manageable network components. In this step, the network protocols commonly used in the Internet of Things industry are packed into manageable network components. The implementation logic of packing the network protocols into network components is as follows: Fill in the unique attributes of the network protocol, and create a network component for monitoring device connections or connecting other middleware based on the unique attributes; fill in the unique attributes of the network protocol including but not limited to the network port, bound network card address, data length, account number, password, etc., and then use the Java network API to create the corresponding network component based on the filled in data; Step 2: Use the message encoding and decoding interface and connection authentication interface of the IoT platform to write the message encoding and decoding logic and connection authentication logic, and package them into a message encoding and decoding plug-in; Using the message encoding and decoding interface and connection authentication interface of the IoT platform, users can write specific message encoding and decoding logic and connection authentication logic according to the equipment of different manufacturers, and then package them into a message encoding and decoding plug-in; After the code development is completed, you can use the Maven packaging command mvn package to package the code into a message encoding and decoding plug-in; Step 3: Load the message encoding and decoding plug-in into the IoT platform; use the classload class loader provided by Java in the IoT platform to load the plug-in dynamically uploaded by the user into the IoT platform; Step 4: Use the network components and the message codec plug-in to form a device access gateway; Use the above different network components and different message codec plug-ins to form a device access gateway; Step 5, when a device under a certain product is connected to the device access gateway, the transmission protocol and codec protocol ID contained in the device access gateway are stored in the product; when a digital product is connected to the device access gateway, the transmission protocol and codec protocol ID contained in the device access gateway are stored in the data form corresponding to the digital product; Step 6: Create a registration center for device data and cache the basic data of the product and the basic data of the device in the database; the registration center is used to cache the basic data of the product and the basic data of the device in the redis middleware. Redis is a high-speed cache database that supports multiple data structures such as key-value, and is used for caching, event publishing and subscription, high-speed queues and other scenarios, providing direct storage and access of strings, hashes, lists, queues, and collections; Step 7: When the device uploads data to the IoT platform and / or the IoT platform issues instructions to the device, the registration center obtains basic data corresponding to the product to which the device belongs, and transmits data through the network information and device corresponding to the product in the basic data; Step 8. Encode and decode the transmitted data through the encoding and decoding protocol corresponding to the product to which the device belongs; when the device uploads data to the platform or the platform sends instructions to the device, the cache information corresponding to the product is obtained in the registration center through the device ID of the device, and the data is transmitted through the gateway ID information and device ID information corresponding to the product in the cache information; the network information and device corresponding to the product in the basic data refer to the gateway ID and device ID respectively.

2. The method for accessing a gateway to an Internet of Things device according to claim 1, wherein: The method of packaging the network protocol into manageable network components includes: Fill in the unique attributes of the network protocol, and create a network component for monitoring device connections or connecting to other middleware based on the unique attributes.

3. The method for accessing a gateway to an Internet of Things device according to claim 1, wherein: The basic data of the product includes: product name, product ID, object model, codec protocol ID, product status, transmission protocol, gateway ID, and gateway name.

4. The method for accessing a gateway to an Internet of Things device according to claim 1, wherein: The basic data of the device includes: device name, device ID, product ID, product name, device status, and transmission protocol.

5. The method for accessing a gateway to an Internet of Things device according to any one of claims 3 and 4, characterized in that: The network information and device corresponding to the product in the basic data refer to the gateway ID and device ID respectively.

6. A system for accessing a gateway to an Internet of Things device, characterized in that: include: A subassembly module for subassembling network protocols into manageable network components; Write a module to use the message encoding and decoding interface and connection authentication interface of the IoT platform to write message encoding and decoding logic and connection authentication logic, and package them into message encoding and decoding plug-ins; Using the message encoding and decoding interface and connection authentication interface provided by the IoT platform, users can write specific message encoding and decoding logic and connection authentication logic according to the devices of different manufacturers and package them into message encoding and decoding plug-ins. After the code development is completed, use the Maven packaging command mvn package to package the code into a message encoding and decoding plug-in. A loading module, used to load the message encoding and decoding plug-in into the Internet of Things platform; The protocol storage module is used to store the transmission protocol and codec protocol ID contained in the device access gateway into the product; A cache module, used for caching the basic data of the product and the basic data of the device into a database; A data transmission module, used to obtain basic data corresponding to the product to which the device belongs, and to transmit data through the network information and device corresponding to the product in the basic data; The encoding and decoding module is used to encode and decode the transmitted data through the encoding and decoding protocol corresponding to the product to which the device belongs.

7. The system for accessing a gateway to an Internet of Things device as claimed in claim 6, characterized in that: The subassembly module includes a component creation submodule, which is used to fill in the unique attributes of the network protocol and create a network component for monitoring device connections or connecting other middleware according to the unique attributes.

8. The system for accessing a gateway to an Internet of Things device as claimed in claim 6, characterized in that: The device access gateway is composed of the network component and the message encoding and decoding plug-in.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores one or more computer programs, and the one or more computer programs can be executed by one or more processors to implement the steps of the method for accessing a gateway to an Internet of Things device as described in any one of claims 1 to 5.