A method for adding multi-type and multi-protocol sub-devices to an Internet of Things gateway
By using splitters and triple information matching mechanisms in the IoT gateway, efficient matching of multi-type multi-protocol sub-device is achieved, solving the problem of inefficient matching in the prior art, and improving the accuracy and efficiency of automated additions.
Patent Information
- Application Number
- CN202211011323.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-23
- Publication Date
- 2025-04-08
- Estimated Expiration
- 2042-08-23
AI Technical Summary
When adding multi-type multi-protocol sub-device, existing IoT gateways have low matching efficiency and require manual intervention, resulting in inefficiency.
Through the splitter, the IoT gateway and multi-protocol and multi-type sub-device are quickly matched in batches, and the splitter control in the rotated and all-on modes is used, combined with the matching mechanism of triple information, the automated addition process is realized.
It realizes efficient matching between IoT gateways and multi-type multi-protocol sub-device, reduces manual intervention, and improves matching accuracy and efficiency.
Smart Images

Figure CN115567620B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of Internet of Things gateways, and in particular to a method for adding multi-type and multi-protocol sub-devices to an Internet of Things gateway. Background Art
[0002] The IoT gateway will play a very important role in the IoT era. It will become the link between the perception network and the traditional communication network. As a gateway device, the IoT gateway can realize the protocol conversion between the perception network and the communication network, as well as between different types of perception networks. It can realize both wide area interconnection and local area interconnection. In addition, the IoT gateway also needs to have device management functions. Operators can manage the underlying perception nodes through the IoT gateway device, understand the relevant information of each node, and realize remote control.
[0003] However, when adding sub-devices to the existing IoT gateway, it is difficult to match the IoT gateway and the sub-devices due to the different types of sub-devices and the different communication protocols between the IoT gateway and the gateway. If adding multiple types of multi-protocol sub-devices requires manual assistance, the matching efficiency is low. Summary of the invention
[0004] The purpose of the present invention is to overcome the defects of low matching efficiency, time-consuming and labor-intensive when adding multi-type and multi-protocol sub-devices in the Internet of Things gateway in the prior art, and to provide a method for adding multi-type and multi-protocol sub-devices to the Internet of Things gateway.
[0005] The purpose of the present invention is achieved through the following technical solutions:
[0006] A method for adding multi-type and multi-protocol sub-devices to an Internet of Things gateway comprises the following steps:
[0007] Step 1: The IoT gateway is controlled by relevant personnel to start the batch adding sub-device mode;
[0008] Step 2: The IoT gateway sends a control signal to the splitter, and the splitter starts the rotation connection mode;
[0009] Step 3, the splitters are connected in turn so that the multiple sub-devices communicate with the IoT gateway in turn, and the IoT gateway stores the device information of each sub-device;
[0010] Step 4: The IoT gateway sends a control signal to the splitter, and the splitter turns on the full connection mode;
[0011] Step 5, calling the triplet information of the sub-device, each triplet information corresponds to a sub-device;
[0012] Step 6: Each time a triplet of information is matched, the indicator light corresponding to the sub-device that matches the triplet of information lights up, indicating that the sub-device is successfully matched and the IoT gateway has added the device; the indicator lights of all sub-devices light up, indicating that all sub-devices have been successfully added;
[0013] Step 7: Disable the batch adding of sub-devices mode in IoT.
[0014] Preferably, the MCU of the IoT gateway stores addressing instructions corresponding to several different protocols, different addressing commands correspond to different device types, and the types of addressing instructions correspond to the types of device types.
[0015] Preferably, the step 3 is specifically as follows:
[0016] Sub-step 1, assume that there are i demultiplexer ports and j addressing instructions; let i=1, j=1;
[0017] Sub-step 2, the port i of the splitter is turned on, and the IoT gateway sends an addressing instruction numbered j. After receiving the addressing instruction, the sub-device corresponding to the port i of the splitter replies to the IoT gateway. If the IoT gateway receives the reply information of the sub-device, the IoT gateway verifies the reply information. If the verification passes, the device SN code in the reply information is saved. The device SN code is the communication address of the device. The MCU of the IoT gateway saves the device type, device SN code and address code of the sub-device, and then sets i+1; if the IoT gateway does not receive the reply information of the sub-device or the verification fails, it indicates that the sub-device corresponding to the added splitter port i does not match the addressing instruction, and i+1 is set at the same time;
[0018] Sub-step 3, if i is greater than or equal to the set number of demultiplexer ports, set j+1 and set i=1;
[0019] Sub-step 4, repeat steps 2 to 3 until j is greater than the set number of addressing instruction types.
[0020] Preferably, the Internet of Things gateway also sends a synchronous clock signal to the splitter before sending the addressing instruction.
[0021] Preferably, the IoT gateway sends the same addressing instruction more than twice. This design prevents packet loss when the IoT gateway sends the addressing instruction.
[0022] As a preferred embodiment, after the IoT gateway sends the addressing instruction, the timer of the demultiplexer starts timing, and after the set time, the demultiplexer i port is closed, and the total time that the IoT gateway sends the addressing instruction is less than the time that the demultiplexer i port is opened.
[0023] Preferably, the number of ports of the splitter is 20, and the number of types of addressing commands stored in the IoT gateway is 5.
[0024] Preferably, the method in which the splitter is connected in turn so that multiple sub-devices communicate with the Internet of Things gateway in turn is RS485 communication.
[0025] The beneficial effects of the present invention are as follows: the present invention enables the Internet of Things gateway and multi-protocol and multi-type sub-devices to be matched quickly in batches through the splitter, and the Internet of Things gateway can realize the adding process without manual intervention, and the matching accuracy is high. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 It is a schematic diagram of a process of the present invention;
[0027] Figure 2 It is a specific flow chart of step 3 of the present invention. DETAILED DESCRIPTION
[0028] The present invention is further described below in conjunction with the accompanying drawings and embodiments.
[0029] Example:
[0030] A method for adding multi-type and multi-protocol sub-devices to an Internet of Things gateway, such as Figure 1 As shown, the following steps are included:
[0031] Step 1: The IoT gateway is controlled by relevant personnel to start the batch adding sub-device mode;
[0032] Step 2: The IoT gateway sends a control signal to the splitter, and the splitter starts the rotation connection mode;
[0033] Step 3, the splitters are connected in turn so that multiple sub-devices communicate with the IoT gateway in turn via RS485, and the IoT gateway stores the device information of each sub-device;
[0034] Step 4: The IoT gateway sends a control signal to the splitter, and the splitter turns on the full connection mode;
[0035] Step 5, calling the triplet information of the sub-device, each triplet information corresponds to a sub-device;
[0036] Step 6: Each time a triplet of information is matched, the indicator light corresponding to the sub-device that matches the triplet of information lights up, indicating that the sub-device is successfully matched and the IoT gateway has added the device; the indicator lights of all sub-devices light up, indicating that all sub-devices have been successfully added;
[0037] Step 7: Disable the batch adding of sub-devices mode in IoT.
[0038] The MCU of the IoT gateway stores addressing instructions corresponding to several different protocols. Different addressing commands correspond to different device types, and the types of addressing instructions correspond to the types of device types.
[0039] The MCU of the IoT gateway stores addressing instructions corresponding to several different protocols. Different addressing commands correspond to different device types, and the types of addressing instructions correspond to the types of device types.
[0040] Step 3 as described Figure 2 As shown, specifically:
[0041] Sub-step 1, assume that there are 20 demultiplexer ports and 5 types of addressing instructions, the number of demultiplexer ports is recorded as i, and the type of addressing instruction is recorded as j; let i=1, j=1;
[0042] Sub-step 2, the port i of the splitter is turned on, and the IoT gateway sends an addressing instruction numbered j. After receiving the addressing instruction, the sub-device corresponding to the port i of the splitter replies to the IoT gateway. If the IoT gateway receives the reply information of the sub-device, the IoT gateway verifies the reply information. If the verification passes, the device SN code in the reply information is saved. The device SN code is the communication address of the device. The MCU of the IoT gateway saves the device type, device SN code and address code of the sub-device, and then sets i+1; if the IoT gateway does not receive the reply information of the sub-device or the verification fails, it indicates that the sub-device corresponding to the added splitter port i does not match the addressing instruction, and i+1 is set at the same time;
[0043] Sub-step 3, if i is greater than or equal to the set number of demultiplexer ports, set j+1 and set i=1;
[0044] Sub-step 4, repeat steps 2 to 3 until j is greater than the set number of addressing instruction types.
[0045] The Internet of Things gateway also sends a synchronous clock signal to the splitter before sending an addressing instruction.
[0046] The IoT gateway sends the same addressing command three times. This design causes packet loss when the IoT gateway sends the addressing command.
[0047] After the IoT gateway sends the addressing instruction, the timer of the demultiplexer starts timing. After the set time, the demultiplexer i port is closed. The total time that the IoT gateway sends the addressing instruction is less than the time that the demultiplexer i port is opened.
[0048] In this embodiment, the Internet of Things gateway is used to add multiple smart meters. At the same time, the sub-devices of the smart meters include smart circuit breakers, smart measurement modules and smart molded case circuit breakers; the smart meters are smart meters using the 645-2007 protocol. Since the 4 devices have different 485 configurations such as baud rates, and different protocols, the gateway issues a total of 5 rounds of commands, one round each for the smart circuit breaker, smart measurement module and smart molded case circuit breaker, and two rounds for the smart meter to change the baud rate. After five rounds of instructions are issued, a signal is sent to adjust the smart splitter to the full connection mode. 3. After the gateway MCU saves the device list, it communicates with the cloud platform, calls the cloud triplet information corresponding to the sub-device, and automatically goes offline to the subordinate sub-device.
[0049] In the embodiments provided in the present application, it should be understood that the described structures and methods can be implemented in other ways. For example, the above described embodiments of the structure are only illustrative, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, for example, multiple units or components can be combined or integrated into another structure, or some features can be ignored or not executed.
[0050] The units described as separate components may or may not be physically separated, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0051] In addition, each functional unit in the embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0052] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium, including several instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to perform all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.
[0053] The above-described embodiment is only a preferred solution of the present invention and does not limit the present invention in any form. There are other variations and modifications without exceeding the technical solution described in the claims.
Claims
1. A method for adding multi-type and multi-protocol sub-devices to an Internet of Things gateway, characterized by: The following steps are involved: Step 1: The IoT gateway is controlled by relevant personnel to start the batch adding sub-device mode; Step 2: The IoT gateway sends a control signal to the splitter, and the splitter starts the rotation connection mode; Step 3: The splitters are connected in turn so that multiple sub-devices can communicate with the IoT gateway in turn. The IoT gateway stores the device information of each sub-device. Step 4: The IoT gateway sends a control signal to the splitter, and the splitter turns on the full connection mode; Step 5: Call the triplet information of the sub-device, each triplet information corresponds to a sub-device; Step 6: Each time a triplet of information is matched, the indicator light corresponding to the sub-device that matches the triplet of information lights up, indicating that the sub-device is successfully matched and the IoT gateway has added the device; the indicator lights of all sub-devices light up, indicating that all sub-devices have been successfully added; Step 7: The IoT switch turns off the batch adding sub-device mode; The IoT gateway's MCU stores addressing instructions corresponding to several different protocols. Different addressing commands correspond to different device types, and the types of addressing instructions correspond to the types of device types. The step 3 is specifically as follows: Sub-step 1, assume that there are i demultiplexer ports and j addressing instructions; let i=1, j=1; Sub-step 2: Port i of the splitter is turned on, and the IoT gateway sends an addressing instruction numbered j. After receiving the addressing instruction, the sub-device corresponding to port i of the splitter replies to the IoT gateway. If the IoT gateway receives the reply information of the sub-device, the IoT gateway verifies the reply information. If the verification passes, the device SN code in the reply information is saved. The device SN code is the communication address of the device. The MCU of the IoT gateway saves the device type, device SN code and address code of the sub-device, and then sets i+1. If the IoT gateway does not receive the reply information of the sub-device or the verification fails, it indicates that the sub-device corresponding to port i of the splitter does not match the addressing instruction, and i+1 is set at the same time. Sub-step 3: If i is greater than or equal to the number of ports on the splitter, set j+1 and set i=1; Sub-step 4, repeating steps 2 to 3 until j is greater than the set number of addressing instruction types.
2. The method for adding multi-type and multi-protocol sub-devices to an Internet of Things gateway according to claim 1, characterized in that: The Internet of Things gateway also sends a synchronous clock signal to the splitter before sending the addressing instruction.
3. The method for adding multi-type and multi-protocol sub-devices to an Internet of Things gateway according to claim 2, wherein: The IoT gateway sends the same addressing command more than twice.
4. The method for adding multi-type and multi-protocol sub-devices to an Internet of Things gateway according to claim 3, wherein: After the IoT gateway sends the addressing command, the timer of the demultiplexer starts timing. After the set time, the demultiplexer i port is closed. The total time that the IoT gateway sends the addressing command is less than the time that the demultiplexer i port is open.
5. The method for adding multi-type and multi-protocol sub-devices to an Internet of Things gateway according to claim 1, wherein: The demultiplexer has 20 ports, and the IoT gateway stores 5 types of addressing commands.
6. The method for adding multi-type and multi-protocol sub-devices to an Internet of Things gateway according to claim 1, wherein: The method in which the splitter is connected in turn so that multiple sub-devices communicate with the Internet of Things gateway in turn is RS485 communication.
Citation Information
Patent Citations
Gateway, Internet of Things sub-devices, Internet of Things system and control method
CN109462662A
Gateway application system and method compatible with various different protocol sub-devices
CN114172971A