Modular gateway and sub-module connection bus and implementation method thereof

By designing a modular gateway and sub-module connection bus, the self-enumeration, hot-plugging, and cascading of sub-modules are realized, solving the problems of unreliable modular gateway connections and insufficient scalability, improving reliability and scalability, and reducing costs.

CN116866110BActive Publication Date: 2026-03-27ACREL CO LTD +2
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-08-08
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

The connection between the main module and sub-modules of the modular IoT gateway is unreliable, and its functional scalability is weak.

Method used

Design a modular gateway and submodule connection bus, which enables self-enumeration, hot-plugging and cascading of submodules through control messages, data messages and synchronization messages, and uses any full-duplex physical bus for connection.

Benefits of technology

It improves the reliability and functional scalability of submodules, reduces the cost of using the gateway, supports a variety of use scenarios, and has broad application prospects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116866110B_ABST
    Figure CN116866110B_ABST
Patent Text Reader

Abstract

The application relates to a modular gateway and sub-module connection bus and an implementation method thereof. The connection bus is connected between a main module and a concentrator module and between the concentrator module and a sub-module, and is used for realizing self-enumeration, hot plug and sub-module cascade of the gateway sub-module through control messages, data messages and synchronization messages. Compared with the prior art, the application has the advantages of reducing the cost of using the gateway of users and the like.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of power internet of things gateway, in particular to a modular gateway and sub-module connection bus and an implementation method thereof. BACKGROUND

[0002] The communication management machine is an important device for realizing interconnection and integration of various devices and systems in enterprise automation and informatization. With the development of internet of things technology, various applications and systems are constantly updated and replaced. As the data hub of the system, the communication management machine plays an important role in the whole system. The running conditions, faults, alarms and other information of the sensing layer devices are transmitted to the monitoring center and the dispatching center through the communication management machine, so that the operation personnel can know the running status of the system at any time. At the same time, the operation and maintenance personnel can also issue control commands at the monitoring and dispatching center, which are transmitted to the intelligent devices through the communication management machine to realize remote control and remote setting.

[0003] The functions supported by the traditional power internet of things gateway are determined at the time of design and production. When new functions need to be added, different types of gateways need to be replaced. Sometimes, it is difficult to find a gateway that can completely cover the use scenarios in the actual use process. The modular gateway can add different modules according to different use scenarios, and the use scenarios are rich and the prospect is broad.

[0004] The modular gateway is limited by cost and cannot use special physical bus controllers, and has high reliability requirements and high functional expansion requirements.

[0005] Therefore, how to solve the unreliable connection between the modular internet of things gateway main module and the sub-module, and the weak functional expansion, becomes a technical problem to be solved. SUMMARY

[0006] The purpose of the present application is to overcome the defects of the prior art and provide a modular gateway and sub-module connection bus and an implementation method thereof.

[0007] The purpose of the present application can be achieved by the following technical solutions:

[0008] According to one aspect of the present application, a modular gateway and sub-module connection bus is provided, which is connected between a main module and a hub module, and between the hub module and a sub-module, for realizing self-enumeration, hot plug and sub-module cascading of the gateway sub-module through control messages, data messages and synchronization messages.

[0009] As a preferred technical solution, the bus is based on an arbitrary full-duplex physical bus.

[0010] As a preferred technical solution, the sub-module enumerates the module type to the main module through the connection control message, and the main module mounts the corresponding sub-module driver.

[0011] As a preferred technical solution, the submodule sends a heartbeat to the main module through a synchronization message to achieve hot-plugging of the submodule.

[0012] As a preferred technical solution, the bus achieves the cascading of sub-modules by encapsulating control messages in the data field of data messages.

[0013] According to another aspect of the present invention, a method for implementing a bus for connecting the modular gateway and submodules is provided, comprising: a submodule self-enumeration process, a submodule hot-plugging process, and a submodule cascading process.

[0014] As a preferred technical solution, the submodule self-enumeration process is specifically as follows:

[0015] In step S101, the submodule is connected to the main module via the bus, and the submodule is powered via the bus.

[0016] Step S102: The submodule sends a control message to the main module, enumerating its own device type;

[0017] In step S103, the main module mounts the corresponding sub-module driver to the driver layer. After the driver layer completes initialization, it sends a control message to the sub-module to complete device enumeration.

[0018] As a preferred technical solution, the hot-swap process of the submodule is as follows:

[0019] Step S201: When the communication idle time exceeds the set time, the main module sends a synchronization message through the bus;

[0020] Step S202: After receiving the synchronization message, the submodule sends a synchronization message to the main module.

[0021] Step S203: After receiving the synchronization message, the main module updates the online status of the sub-modules;

[0022] Step S204: If the submodule does not reply with a synchronization message within the timeout period, the submodule is removed and the corresponding submodule driver is uninstalled.

[0023] As a preferred technical solution, the set time in step S201 is 100 milliseconds.

[0024] As a preferred technical solution, the submodule cascading process is specifically as follows:

[0025] Step S301: The hub module completes the submodule enumeration;

[0026] Step S302: The main module mounts the hub driver;

[0027] Step S303: The hub module connects to the new sub-module;

[0028] Step S304: The hub module sends a data message, the content of which is a control message;

[0029] Step S305: The hub driver parses the message, performs the submodule self-enumeration action, and mounts the submodule driver to the hub driver's submodule driver layer.

[0030] By following the steps above, a logical device tree identical to the physical bus connection structure can be constructed in real time within the bus driver.

[0031] Compared with the prior art, the present invention has the following advantages:

[0032] 1) The present invention provides a modular gateway and sub-module connection bus, which realizes hot-swapping of sub-modules through sub-module self-enumeration and sub-module heartbeat synchronization, thereby ensuring the reliability of sub-modules.

[0033] 2) This invention constructs a logical device tree corresponding to the physical device hierarchy in the bus driver, providing powerful scalability.

[0034] 3) The bus physical layer of this invention can be any full-duplex bus, which has broad application prospects and is of great significance in the field of power Internet of Things. Attached Figure Description

[0035] Figure 1 This is a diagram of the physical connection structure of the present invention;

[0036] Figure 2 This is an overall flowchart of the main module bus driver of the present invention;

[0037] Figure 3 This is a system structure diagram of the present invention. Detailed Implementation

[0038] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0039] This invention addresses the issues of unreliable connections and limited functional scalability between the main and sub-modules of modular IoT gateways by designing a bus for connecting modular gateways and sub-modules. This bus self-enumerates connected devices and inserts synchronization messages during idle periods to determine if a sub-module is offline. Hot-swapping of sub-modules is enabled, enhancing bus reliability. Furthermore, the bus achieves cascading of sub-modules by encapsulating control messages in the data field of data packets, further enhancing bus scalability.

[0040] The physical bus of this invention selects the UART interface, and the physical bus interface selects the RJ45 interface. The RJ45 pinout of the physical bus is defined as follows: +5V, +5V, GND, GND, UART_TXD, RST, UART_RXD, Reserved.

[0041] like Figure 1 As shown, the physical connection structure of the present invention is as follows: the main module is connected to the hub module through the present invention, and the hub module is then connected to sub-module 1 and sub-module 2 through the present invention.

[0042] like Figure 2 The diagram illustrates the overall workflow of the main module driver in this invention. This invention achieves hot-swapping of submodules through submodule self-enumeration and submodule heartbeat synchronization, ensuring the reliability of the submodules. Simultaneously, a logical device tree corresponding to the physical device hierarchy is constructed in the bus driver, providing powerful scalability.

[0043] like Figure 3 As shown, the present invention can synchronize the structure of physical devices and logical devices through bus control messages and message recursive encapsulation, and automatically update the structure of logical devices when the connection status of physical devices changes.

[0044] The bus enumeration process of this invention is as follows:

[0045] (3.1) The hub module sends an enumeration control message to the main module;

[0046] (3.2) The main module bus driver is mounted to the hub driver;

[0047] (3.3) After the main module hub driver is initialized, a control message is sent to complete the enumeration;

[0048] (3.4) Submodule 1 sends an enumeration control message to the hub module;

[0049] (3.5) The hub module sends a data packet to the main module with one report message from the submodule as the data field;

[0050] (3.6) The main module hands over the data packets of the hub module to the hub driver for processing;

[0051] (3.7) Hub driver mounting submodule 1 driver;

[0052] (3.8) After the driver of submodule 1 completes initialization, it sends a control message to complete the enumeration;

[0053] (3.9) The hub driver sends a data packet with the data field of the report message completed by submodule 1;

[0054] (3.10) The hub module parses the data packets sent by the main module and sends the completed enumeration message to sub-module 1, and sub-module 1 completes the enumeration;

[0055] Submodule 2 also completes the enumeration through the steps described in 3.4-3.10;

[0056] The bus communication process of this invention is as follows:

[0057] (4.1) The application layer calls the function of submodule 1. The driver of submodule 1 sends data packets to the hub driver. The hub driver sends data packets with the data field of the data packets sent by submodule 1 to the hub module.

[0058] (4.2) The hub module sends the data field message to submodule 1 according to the data field flag of the data message;

[0059] (4.3) After completing the task, submodule 1 sends a data packet to the hub module;

[0060] (4.4) The hub module sends a data packet with the data field of submodule 1 to the hub driver;

[0061] (4.5) The hub driver sends the data field message to the submodule 1 driver according to the data field flag of the data message, and the submodule 1 driver returns the call result to the application layer.

[0062] The module synchronization process of this invention is as follows:

[0063] (5.1) If there is no data interaction between submodule 1 and hub module for more than 100ms, hub module sends a synchronization message to submodule 1;

[0064] (5.2) Submodule 1 sends a synchronization message back to the hub module.

[0065] (5.2.1) If the hub does not receive the synchronization message sent by submodule 1 within the timeout, it sends a data message to the hub driver;

[0066] (5.2.2) Hub driver unloading submodule 1 driver;

[0067] The synchronization process between the hub module and the main module is as follows:

[0068] (6.1) If there is no data exchange between the hub and the main module for more than 100ms, the main module sends a synchronization message to the hub module;

[0069] (6.2) The hub sends a synchronization message back to the main module.

[0070] (6.2.1) If the main module does not receive the synchronization message sent by the hub within the timeout period, the hub module driver will be unloaded.

[0071] (6.2.2) The hub module driver is unloaded and mounted to its sub-module 1 driver and sub-module 2 driver.

[0072] This invention discloses a modular communication bus for gateways and sub-modules. It decomposes gateway functions and allows for customization of gateway functionality through the combination of sub-modules, reducing the cost for users. Based on existing physical buses, this invention enables self-enumeration, hot-swapping, sub-module cascading, and gateway function expansion through control messages, synchronization messages, and data interaction messages in the communication protocol. This reduces the cost of gateway usage and facilitates further promotion of cross-disciplinary data integration, deep information sharing, and precise user services, holding significant importance in the field of the power Internet of Things.

[0073] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and these modifications or substitutions should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A modular gateway and sub-module connection bus, characterized by, The connection bus is connected between the main module and the hub module and between the hub module and the sub-module, for realizing self-enumeration, hot plug and sub-module cascade of the gateway sub-module; The sub-module sends heartbeat to the main module through the synchronization message, realizing hot plug of the sub-module; the bus realizes cascade of the sub-module through encapsulating control message in data field of the data message; The hot plug process of the sub-module is specifically: Step S201, the main module sends synchronization message through the bus when communication is idle for more than a set time; Step S202, the sub-module sends synchronization message to the main module after receiving the synchronization message; Step S203, the main module updates the online state of the sub-module after receiving the synchronization message; Step S204, if the sub-module does not reply the synchronization message in time, it is judged that the sub-module is removed, and the corresponding sub-module driver is unloaded; The self-enumeration process of the sub-module is specifically: Step S101, the sub-module accesses the main module through the bus, and the sub-module is powered through the bus; Step S102, the sub-module sends control message to the main module, and enumerates the device type of the sub-module; Step S103, the main module mounts the corresponding sub-module driver to the driver layer, and sends control message to the sub-module after the driver layer is initialized, completing device enumeration; The cascade process of the sub-module is specifically: Step S301, the hub module completes enumeration of the sub-module; Step S302, the main module mounts the hub driver; Step S303, the hub module accesses new sub-module; Step S304, the hub module sends data message, and the message content is control message; Step S305, the hub driver analyzes the message, executes self-enumeration action of the sub-module, and mounts the sub-module driver to the sub-module driver layer of the hub driver.

2. The modular gateway and sub-module connection bus of claim 1, wherein, The bus is based on any full-duplex physical bus.

3. The modular gateway and sub-module connection bus of claim 1, wherein, The sub-module enumerates the module type to the main module through connection control message, and the main module mounts the corresponding sub-module driver.

4. A method for implementing the modular gateway and sub-module connection bus of claim 1, characterized in that, It comprises: Self-enumeration process of the sub-module, hot plug process of the sub-module and cascade process of the sub-module.

5. The implementation method of claim 4, wherein, The set time in step S201 is 100 milliseconds.

Citation Information

Patent Citations

  • USB equipment identification enhancing method in VxWorks operation system

    CN103514122A

  • Self-adaptive air conditioner gateway modular topology system and extension method

    CN116346540A

  • Household gateway device

    CN207853920U