A tenant- and gateway-based IoT device terminal access system and method

Through the Internet of Things device terminal access system based on tenants and gateways, the access problems caused by changes in protocol and message formats when the device terminal replaces the project is solved, and flexible access to the device terminal is realized, saving development time, reducing costs and improving efficiency.

CN114301982BActive Publication Date: 2024-11-15XCMG HANYUN TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210003376.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-04
Publication Date
2024-11-15
Estimated Expiration
2042-01-04

AI Technical Summary

Technical Problem

When changing the communication protocol and message format of existing IoT device terminals, the original application system does not support access to new device terminals, and needs to be redeveloped and tested, reducing efficiency and increasing costs.

Method used

Using the Internet of Things device terminal access system based on tenants and gateways, the gateway module analyzes the connection information and control instructions of the device terminal, provides a common framework to process different protocols and message formats, and the application system performs authentication and control, so as to realize the device terminal's Flexible access.

Benefits of technology

It saves development and testing time, improves efficiency, reduces costs, and supports device terminal access in different transmission protocols and message formats, reduces duplicate development of application systems, and ensures quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114301982B_ABST
    Figure CN114301982B_ABST
Patent Text Reader

Abstract

The present invention discloses a system and method for accessing IoT device terminals based on tenants and gateways in the field of IoT application technology, including: receiving connection information of device terminals; parsing the connection information into a format supported by the application system and sending it to the application system; receiving a token issued by the application system after authentication and responding to the device terminal; receiving upload information and tokens from the device terminal; parsing the upload information into a format supported by the application system and sending it to the application system together with the token; receiving control instructions issued by the application system; parsing the control instructions into a format supported by the device terminal and feeding it back to the device terminal. The present invention provides a data processing system for tenant projects, saving a lot of development and testing time, improving efficiency, reducing costs, and ensuring quality.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a tenant- and gateway-based Internet of Things device terminal access system and method, belonging to the technical field of Internet of Things applications. Background Art

[0002] With the rapid development of Internet of Things technology, more and more physical device terminals are connected to the network and transmit data to the application system. These device terminals use different protocols to upload data, such as HTTP protocol, UDP protocol, TCP protocol, MQTT protocol, COAP protocol, etc. They are assembled and manufactured by different manufacturers, and different manufacturers of the same protocol have different message formats, which vary greatly.

[0003] When delivering projects, people often only consider the specific protocols and message formats used in the project and directly connect the device terminals to the application system. When the project is changed, the device terminals of the new project may use new communication protocols or message formats. At this time, the original application system no longer supports the access of the device terminals of the new project and needs to be redeveloped and tested, which reduces the efficiency of development and testing, causes a lot of waste of human resources, and greatly increases costs. Summary of the invention

[0004] The purpose of the present invention is to overcome the deficiencies in the prior art and provide an IoT device terminal access system and method based on tenants and gateways, which provides a data processing system for tenant projects, saves a lot of development and testing time, improves efficiency, reduces costs, and ensures quality.

[0005] To achieve the above object, the present invention is implemented by adopting the following technical solutions:

[0006] In a first aspect, the present invention provides an IoT device terminal access system based on tenants and gateways, comprising:

[0007] Gateway module: receiving the connection information of the device terminal, parsing the connection information into a format supported by the application system and sending it to the application system, and receiving the token issued by the application system after authentication and responding to the device terminal, and receiving the upload information and token from the device terminal, parsing the upload information into a format supported by the application system and sending it to the application system together with the token, and receiving the control instructions issued by the application system, parsing the control instructions into a format supported by the device terminal and feeding back to the device terminal;

[0008] Application system: after receiving the parsed connection information, it performs authentication based on the connection information, and in response to successful authentication, it feeds back the token to the gateway module; and, after receiving the report information and token uploaded by the gateway module, it performs verification based on the token, and in response to successful verification, it saves the report information, and sends control instructions to the gateway module to control the device terminal.

[0009] Furthermore, the gateway module includes a general framework of multiple protocols and a gateway of a specific message format. The gateway is a module that specifically processes messages of different protocols and different formats. One gateway corresponds to only one tenant, while one tenant can correspond to multiple gateways.

[0010] Furthermore, the application system includes:

[0011] Tenant module: isolates data between physical device terminals of different projects and tenants;

[0012] Device module: maintains information of physical device terminals. The device module divides the device terminals into different tenants through the tenant module;

[0013] Authentication module: According to the two fields of tenant ID and authentication information in the connection information, the authentication method and authentication information of the device terminal under the same tenant are compared. When the comparison is consistent, the authentication is passed and a token is returned to the gateway module;

[0014] Data receiving module: receives the token and reported information reported by the gateway module, verifies the token through the authentication module, and saves the reported information in response to the verification;

[0015] The command module sends control instructions to the gateway module through the device module and the tenant module to control the device terminal.

[0016] Furthermore, the device module, authentication module, data receiving module and command module are deployed in a distributed manner or in a centralized manner.

[0017] Furthermore, the information maintained by the device module includes device number, device name, device type, device status, last login time, authentication method and authentication information, and one device number corresponds to one tenant and device terminal.

[0018] Furthermore, a queue module is provided between the gateway module and the application system for decoupling the two. The queue module is deployed in a cluster and supports horizontal expansion. The queue module can isolate the data between the gateway module and the application system according to the data type.

[0019] Furthermore, load balancing is deployed between the device terminal and the gateway module of the same message format, and the load balancing between the physical device terminal and the gateway is determined by the message format, and one message format determines one load balancing.

[0020] In a second aspect, the present invention provides an IoT device terminal access method based on tenants and gateways, comprising:

[0021] receiving connection information of a device terminal;

[0022] Parse the connection information into a format supported by the application system and send it to the application system;

[0023] Receive the token issued by the application system after authentication and respond to the device terminal;

[0024] Accept the uploaded information and token from the device terminal;

[0025] Parse the uploaded information into a format supported by the application system and send it to the application system together with the token;

[0026] Receive control instructions issued by the application system;

[0027] The control instructions are parsed into a format supported by the device terminal and then fed back to the device terminal.

[0028] In a third aspect, the present invention provides an IoT device terminal access device based on tenants and gateways, including a processor and a storage medium;

[0029] The storage medium is used to store instructions;

[0030] The processor is used to operate according to the instructions to execute the steps according to the above method.

[0031] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, which implements the steps of the above-described method when executed by a processor.

[0032] Compared with the prior art, the present invention has the following beneficial effects:

[0033] The tenant- and gateway-based IoT device terminal access system and method proposed in the present invention parses, processes and saves the information of the device terminal through the gateway module and the application system, and the application system can send control instructions to the gateway module to control the device terminal, providing a data processing system for the tenant project. When a project is delivered or a new project is started, only the gateway module needs to be updated, and other modules can remain as they are, which can save a lot of development and testing time, improve efficiency and ensure quality, and can be used for device terminal access with different transmission protocols and different message formats, which helps to reduce repeated development of application systems, save costs, and improve development and testing efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] Figure 1 Schematic diagram of a tenant- and gateway-based IoT device terminal access system provided in Embodiment 1 of the present invention;

[0035] Figure 2 is a schematic diagram of a gateway module provided in Embodiment 1 of the present invention;

[0036] Figure 3 This is a data flow diagram between a single gateway service and an application system provided in the first embodiment of the present invention. DETAILED DESCRIPTION

[0037] The present invention will be further described below in conjunction with the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present invention, and cannot be used to limit the protection scope of the present invention.

[0038] Embodiment 1:

[0039] A tenant- and gateway-based IoT device terminal access system for device terminal access with different transmission protocols and message formats, which helps reduce the duplication of application system development, save costs, and improve the efficiency of development and testing. Figure 1 , including a gateway module connecting device terminals, a queue module for decoupling between the gateway and the application system, and an application system, wherein:

[0040] Device terminal: A physical device terminal is a hardware device with software that can send data to the gateway and respond to the gateway's commands. The physical device terminal only communicates with the gateway, and load balancing can be deployed between the two. The physical device terminal in this embodiment logically belongs to a tenant.

[0041] The gateway module is an independent functional module, which is the bridge and translator for the communication between the device terminal and the application system. The gateway receives the request from the device terminal, parses it into the format supported by the application system, and sends it to the application system. It also parses the control instructions issued by the application system into the format supported by the device terminal and sends it to the device terminal. Please refer to Figure 2 The gateway module further extracts the general framework of each protocol and the gateway of the specific message format. The gateway is a module that specifically handles different protocols and messages of different formats. The gateway and the application system are decoupled through the queue module. Even if the service of one party goes down, the data of the other party can still be saved in the queue, and the performance can also be improved. A gateway can and can only belong to one tenant, but a tenant can have multiple gateways. The gateway of each protocol can extract a general framework, and process messages of different formats based on the general framework to improve development efficiency and quality. Load balancing or horizontal expansion can be done between gateways, and gateway services with the same function support load balancing.

[0042] The purpose of the queue module is to improve the reliability and availability of the system and to smooth out the peaks and valleys of traffic to prevent the system from being overwhelmed by excessive traffic. In addition, the authentication request, authentication response request, access request after authentication, and access response of the device terminal are located in different topics, isolating various data types. As a message middleware, the queue module is generally deployed in clusters and supports horizontal expansion, such as the Kafka cluster.

[0043] The business process is: receive the connection information of the device terminal, then send it to the application system through the queue for authentication, respond to the result to the device terminal after the authentication is passed, and then send the report information of the device terminal, attached with the token returned by the application system during authentication, to the data receiving module, and respond to the device terminal.

[0044] The application system includes: tenant module, device module, authentication module, data receiving module and command module, among which:

[0045] Tenant module: With multi-tenant technology, different tenants can share the same program components and ensure data isolation between tenants. In practice, each project can be regarded as a tenant, or each customer can be regarded as a tenant. It should be noted that tenants are different from users. Users prefer operation permissions, while tenants prefer data isolation. The operation permissions of different tenants may be the same, but the data they operate on is different. The tenant module can be used as part of the permission function set, and the data of different projects and different customers can be isolated through the tenant module. There are multiple device terminals and multiple gateway services under one tenant.

[0046] Device module: Maintains information about physical device terminals, including but not limited to device number, device name, device type, device status, last login time, authentication method, and authentication information. One device number corresponds to one physical device terminal, and one device number can and can only belong to one tenant. The device module relies on the tenant module to divide device terminals into different tenants.

[0047] Authentication module: Perform unified authentication on the device terminal information reported by the gateway. Only after passing the authentication, the gateway is allowed to report the device terminal data. The authentication module compares the authentication information with the authentication method of the device terminal under the same tenant according to the two fields of tenant ID and authentication information. If they are consistent, the authentication is passed and a token is returned to the gateway. Each device terminal corresponds to a token, and the authentication module depends on the device module.

[0048] Data receiving module: After the gateway passes the authentication, it carries the token of the authentication module and sends the data reported by the device terminal to the data receiving module. After receiving the data, the data receiving module verifies the token and saves the reported message after passing. The data receiving module depends on the authentication module.

[0049] Command module: used for application system to control device terminals. The command module sends commands to device terminals, and the device terminals process the commands accordingly. The command module depends on the device module and tenant module.

[0050] Tenant module, device module, authentication module, data receiving module and command module are all functional modules of the application system. They can be deployed in a distributed or centralized manner.

[0051] As mentioned above, when a project is completed and delivered, when starting a new project, only the gateway module needs to be updated, and other modules can remain as they are. This can save a lot of development and testing time, improve efficiency, reduce costs, and ensure quality.

[0052] A specific gateway service only uses a specific message format of a protocol under a single tenant. Multiple gateway services with the same function can be deployed; load balancing can be deployed between physical device terminals and gateways with the same message format to support the horizontal expansion of the system and improve reliability; in practice, load balancing is deployed between physical device terminals and gateways with the same message format under a tenant. Multiple load balancing can be deployed between physical device terminals and gateways with different message formats. In other words, the load balancing between physical device terminals and gateways is determined by the message format, and one message format determines one load balancing.

[0053] See also Figure 3When there are multiple gateway services, the topics from the gateway to the application system are the same; the topic names of the data flowing from the application system to the gateway are inconsistent, and one gateway service corresponds to one topic. The purpose is to ensure data isolation of each gateway service, reduce duplicate consumption, and improve performance. When the application system is deployed in a cluster, the service on each node only consumes a part of the partitions (that is, a part of the data) written by the gateway to the topic, thereby achieving load balancing and horizontal expansion, and improving overall performance and reliability.

[0054] Embodiment 2:

[0055] A tenant-and-gateway-based IoT device terminal access method may be implemented based on a tenant-and-gateway-based IoT device terminal access system in Embodiment 1, including:

[0056] receiving connection information of a device terminal;

[0057] Parse the connection information into a format supported by the application system and send it to the application system;

[0058] Receive the token issued by the application system after authentication and respond to the device terminal;

[0059] Accept the uploaded information and token from the device terminal;

[0060] Parse the uploaded information into a format supported by the application system and send it to the application system together with the token;

[0061] Receive control instructions issued by the application system;

[0062] The control instructions are parsed into a format supported by the device terminal and then fed back to the device terminal.

[0063] Embodiment three:

[0064] The embodiment of the present invention further provides an IoT device terminal access device based on tenants and gateways, which can implement an IoT device terminal access method based on tenants and gateways in the first embodiment, including a processor and a storage medium;

[0065] The storage medium is used to store instructions;

[0066] The processor is used to operate according to the instructions to perform the steps of the following method:

[0067] receiving connection information of a device terminal;

[0068] Parse the connection information into a format supported by the application system and send it to the application system;

[0069] Receive the token issued by the application system after authentication and respond to the device terminal;

[0070] Accept the uploaded information and token from the device terminal;

[0071] Parse the uploaded information into a format supported by the application system and send it to the application system together with the token;

[0072] Receive control instructions issued by the application system;

[0073] The control instructions are parsed into a format supported by the device terminal and then fed back to the device terminal.

[0074] Embodiment 4:

[0075] The embodiment of the present invention further provides a computer-readable storage medium, which can implement a tenant-and-gateway-based IoT device terminal access method in Embodiment 1, and stores a computer program thereon, which implements the steps of the following method when executed by a processor:

[0076] receiving connection information of a device terminal;

[0077] Parse the connection information into a format supported by the application system and send it to the application system;

[0078] Receive the token issued by the application system after authentication and respond to the device terminal;

[0079] Accept the uploaded information and token from the device terminal;

[0080] Parse the uploaded information into a format supported by the application system and send it to the application system together with the token;

[0081] Receive control instructions issued by the application system;

[0082] The control instructions are parsed into a format supported by the device terminal and then fed back to the device terminal.

[0083] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0084] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0085] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0086] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0087] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the technical principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A tenant- and gateway-based IoT device terminal access system, characterized in that: include: Gateway module: receiving the connection information of the device terminal, parsing the connection information into a format supported by the application system and sending it to the application system, receiving the token issued by the application system after authentication and responding to the device terminal, receiving the reported information and token from the device terminal, parsing the uploaded information into a format supported by the application system and sending it to the application system together with the token, and receiving the control instructions issued by the application system, parsing the control instructions into a format supported by the device terminal and feeding back to the device terminal; Application system: after receiving the parsed connection information, perform authentication based on the connection information, and in response to the authentication being passed, feed back the token to the gateway module, and after receiving the report information and token uploaded by the gateway module, perform verification based on the token, and in response to the verification being passed, save the report information, and send a control instruction to the gateway module to control the device terminal; The gateway module includes a general framework of multiple protocols and a gateway of a specific message format. The gateway is a module that specifically processes messages of different protocols and different formats, and one gateway corresponds to only one tenant, while one tenant can correspond to multiple gateways; The application system comprises: Tenant module: isolates data between physical device terminals of different projects and tenants; A load balance is deployed between the device terminal and the gateway module of the same message format, and the load balance between the physical device terminal and the gateway is determined by the message format, and one message format determines one load balance; When the application system is deployed in a cluster, the service on each node consumes only a portion of the partitions written to the topic by the gateway; A queue module is also provided between the gateway module and the application system for decoupling the two. The queue module is deployed in a cluster and supports horizontal expansion. The queue module can isolate the data between the gateway module and the application system according to the data type. When there are multiple gateway services, the subject from the gateway to the application system is the same. The subject names of the data flowing from the application system to the gateway are inconsistent, and one gateway service corresponds to one subject.

2. According to claim 1, the IoT device terminal access system based on tenants and gateways is characterized in that: The application system comprises: Device module: maintains information of physical device terminals. The device module divides the device terminals into different tenants through the tenant module; Authentication module: According to the two fields of tenant ID and authentication information in the connection information, the authentication method and authentication information of the device terminal under the same tenant are compared. When the comparison is consistent, the authentication is passed and a token is returned to the gateway module; Data receiving module: receives the token and reported information reported by the gateway module, verifies the token through the authentication module, and saves the reported information in response to the verification; The command module sends control instructions to the gateway module through the device module and the tenant module to control the device terminal.

3. The IoT device terminal access system based on tenants and gateways according to claim 2 is characterized in that: The device module, authentication module, data receiving module and command module are deployed in a distributed manner or in a centralized manner.

4. The IoT device terminal access system based on tenants and gateways according to claim 2 is characterized in that: The information maintained by the device module includes device number, device name, device type, device status, last login time, authentication method and authentication information, and one device number corresponds to one tenant and device terminal.