Internet of Things terminal mode switching method

Through integrated configuration interface and adaptive algorithms, dynamic switching between the gateway mode and the node mode of the Internet of Things terminal is achieved, which solves the problems of poor deployment flexibility and insufficient scalability of traditional industrial sensor systems, reduces deployment costs and simplifies user operations.

CN120512366APending Publication Date: 2025-08-19TANGSHAN IRON & STEEL GROUP +3
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510426204.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-07
Publication Date
2025-08-19

AI Technical Summary

Technical Problem

Traditional industrial sensor systems have poor deployment flexibility, insufficient scalability, complex maintenance, and mode switching requires external tools or fixed configurations, so dynamic and user-friendly switching cannot be achieved.

Method used

The integrated configuration interface and adaptive algorithm are adopted to realize dynamic switching between the gateway mode and the node mode of the Internet of Things terminal. The browser scans the code to configure and simplify user operations. The device reads configuration information at startup and switches the mode dynamically according to the network environment and application needs.

Benefits of technology

Improves network flexibility and adaptability, reduces deployment costs, simplifies user operations, and improves ease of use and maintenance of equipment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120512366A_ABST
    Figure CN120512366A_ABST
Patent Text Reader

Abstract

The invention relates to an Internet of Things terminal mode switching method, and belongs to the technical field of Internet of Things configuration methods. According to the technical scheme, the method comprises the following steps: reading configuration information during starting, and determining own basic parameters and function modules; in an equipment operation process, dynamically switching between a gateway mode and a node mode according to an actual network environment and application requirements; in the gateway mode, the equipment serves as a data aggregation and forwarding center, receives data from the node equipment and sends the data to the server; in the node mode, the equipment is used as a data acquisition and uploading terminal, acquires sensor data and sends the sensor data to the gateway equipment. The method has the beneficial effects that the dynamic switching of the equipment between the gateway mode and the node mode is realized through the integrated configuration interface and the self-adaptive algorithm, the network flexibility is improved, the deployment cost is reduced, and the user operation is simplified through the browser code scanning configuration.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a method for switching modes of an Internet of Things terminal, and belongs to the technical field of Internet of Things configuration methods. Background Art

[0002] Traditional industrial sensor systems mostly adopt fixed modes (such as serving only as gateways or nodes), which have the following problems: 1. Poor deployment flexibility: Single-mode devices cannot adapt to complex network topology requirements, requiring additional configuration of different devices, increasing costs.

[0003] 2. Insufficient scalability: Fixed-mode devices cannot dynamically adjust their roles and are difficult to adapt to changes in network size.

[0004] 3. Complex maintenance: The mode needs to be adjusted through dedicated software or hardware, which is cumbersome to operate.

[0005] In the prior art, although dual-mode communication devices exist, mode switching relies on external tools or fixed configurations, and dynamic and user-friendly switching cannot be achieved. Summary of the Invention

[0006] The purpose of the present invention is to provide a method for switching the mode of an Internet of Things terminal. Through an integrated configuration interface and an adaptive algorithm, the method realizes the dynamic switching of the device between gateway mode and node mode, improves network flexibility, reduces deployment costs, and simplifies user operations through browser scanning code configuration, effectively solving the above-mentioned problems existing in the background technology.

[0007] The technical solution of the present invention is: a method for switching the mode of an Internet of Things terminal, comprising the following steps: (1) Device initialization: When the IoT terminal device is started, it reads the configuration information and determines its basic parameters and functional modules; (2) Mode selection: select the device's operating mode, including gateway mode and node mode, based on preset rules or user input; (3) Mode configuration: configure the device’s network parameters, communication protocols, and data processing logic accordingly based on the selected working mode; (4) Mode switching: During device operation, the device dynamically switches between gateway mode and node mode according to the actual network environment and application requirements; (5) Data transmission: In gateway mode, the device acts as a data aggregation and forwarding center, receiving data from node devices and sending it to the server; in node mode, the device acts as a data collection and upload terminal, collecting sensor data and sending it to the gateway device.

[0008] In step (1), device initialization includes hardware initialization, network initialization and sensor initialization.

[0009] In step (2), the mode selection is achieved by reading a configuration file or an instruction input by the user.

[0010] In step (3), the mode configuration includes the configuration of the LoRa module, the WiFi module and the MQTT service.

[0011] In step (4), mode switching is achieved by changing the working mode parameters of the device.

[0012] In step (5), data transmission includes LoRa communication and MQTT communication.

[0013] Based on the unique ID of each device, a QR code is generated and affixed to the surface of the device. After the user scans the code, they will jump to the built-in web page; the web page displays the device status in real time and provides mode switching options.

[0014] The beneficial effects of the present invention are: through an integrated configuration interface and adaptive algorithm, dynamic switching of devices between gateway mode and node mode is achieved, network flexibility is improved, deployment costs are reduced, and user operations are simplified through browser code scanning configuration. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] Figure 1 is a flow chart of the method of the present invention; Figure 2 It is a WEB configuration interface diagram of the present invention. DETAILED DESCRIPTION

[0016] In order to make the purpose, technical solutions and advantages of the invention implementation cases clearer, the technical solutions in the invention implementation cases will be clearly and completely described below in conjunction with the drawings in the implementation cases. Obviously, the implementation cases described are only a small part of the implementation cases of the present invention, rather than all the implementation cases. Based on the implementation cases in the present invention, all other implementation cases obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0017] A method for switching an IoT terminal mode, comprising the following steps: (1) Device initialization: When the IoT terminal device is started, it reads the configuration information and determines its basic parameters and functional modules; (2) Mode selection: select the device's operating mode, including gateway mode and node mode, based on preset rules or user input; (3) Mode configuration: configure the device’s network parameters, communication protocols, and data processing logic accordingly based on the selected working mode; (4) Mode switching: During device operation, the device dynamically switches between gateway mode and node mode according to the actual network environment and application requirements; (5) Data transmission: In gateway mode, the device acts as a data aggregation and forwarding center, receiving data from node devices and sending it to the server; in node mode, the device acts as a data collection and upload terminal, collecting sensor data and sending it to the gateway device.

[0018] In step (1), device initialization includes hardware initialization, network initialization and sensor initialization.

[0019] In step (2), the mode selection is achieved by reading a configuration file or an instruction input by the user.

[0020] In step (3), the mode configuration includes the configuration of the LoRa module, the WiFi module and the MQTT service.

[0021] In step (4), mode switching is achieved by changing the working mode parameters of the device.

[0022] In step (5), data transmission includes LoRa communication and MQTT communication.

[0023] Based on the unique ID of each device, a QR code is generated and affixed to the surface of the device. After the user scans the code, they will jump to the built-in web page; the web page displays the device status in real time and provides mode switching options. Example

[0024] 1. Device Initialization: When the device boots up, the setup() function is called to perform hardware and network initialization. For example, it initializes the LoRa module, WiFi module, and sensor module. Configuration information is read to determine the device's basic parameters and functional modules. This configuration information can be stored in the device's non-volatile memory or retrieved from a server over the network.

[0025] 2. Mode Selection: The user selects GATEWAY or NODE in the "MODE SELECTION" function block to determine the device's operating mode. After saving, the mode is stored in the Web_Data array in the system configuration file. When the device is subsequently restarted and initialized, it reads the data in the configuration file and uses the Web_Data value to determine whether the device is operating as a gateway or node, automatically setting the device's mode.

[0026] 3. Mode Configuration: Based on the selected operating mode, configure the device's network parameters, communication protocol, and other parameters. For example, in gateway mode, configure the LoRa module's receiving function, LoRa.onReceive(Receive), and start the WiFi network and MQTT service. In node mode, configure the LoRa module's sending function, LoRa_Gateway_sendMessage(), and set the sensor data collection interval. Configuration parameters include, but are not limited to, the LoRa module's frequency, spreading factor, bandwidth, coding rate, and transmit power; the WiFi module's SSID, password, IP address, subnet mask, gateway address, and DNS address; and the MQTT service's proxy address, client ID, username, password, port number, publish topic, and subscribe topic.

[0027] 4. Mode switching: During device operation, the device can switch between gateway mode and node mode according to the actual network environment and application requirements. For example, the mode switching logic is triggered by the change of the value of Web_Data

[31] [1]. When switching modes, the device will reconfigure the network parameters and communication protocols to ensure normal operation in the new working mode. For example, when switching from gateway mode to node mode, the device will shut down the WiFi network and MQTT service, start the sending function of the LoRa module, and set the interval for sensor data collection.

[0028] 5. Data Transmission: In gateway mode, the device calls the GatewayMode() function to receive data from node devices and send it to the server. Data transmission includes LoRa and MQTT communication. In node mode, the device calls the NodeMode() function to collect sensor data and send it to the gateway device. Data collection includes environmental parameters such as temperature, humidity, vibration, noise, and carbon monoxide concentration.

[0029] Each device has a unique ID, which generates a QR code and is affixed to the device surface. Users scan the code to jump to the built-in web page; The webpage displays the device status (such as IP, sensor values) in real time and provides mode switching options.

[0030] The present invention can dynamically switch between the gateway mode and the node mode according to the actual network environment and application requirements during the operation of the device, thereby improving the flexibility and adaptability of the device.

[0031] In some simple scenarios, there is no need to deploy dedicated node devices, which reduces hardware investment in data collection and lowers costs.

[0032] Through the web interface, users can easily configure the device's operating mode and network parameters, improving device usability and maintainability.

Claims

1. A method for switching the mode of an Internet of Things terminal, characterized in that The following steps are involved: (1) Device initialization: When the IoT terminal device is started, it reads the configuration information and determines its basic parameters and functional modules; (2) Mode selection: select the device's operating mode, including gateway mode and node mode, based on preset rules or user input; (3) Mode configuration: configure the device’s network parameters, communication protocols, and data processing logic accordingly based on the selected working mode; (4) Mode switching: During device operation, the device dynamically switches between gateway mode and node mode according to the actual network environment and application requirements; (5) Data transmission: In gateway mode, the device acts as a data aggregation and forwarding center, receiving data from node devices and sending it to the server; in node mode, the device acts as a data collection and upload terminal, collecting sensor data and sending it to the gateway device.

2. The method for switching an Internet of Things terminal mode according to claim 1, wherein: In step (1), device initialization includes hardware initialization, network initialization and sensor initialization.

3. The method for switching an Internet of Things terminal mode according to claim 1, wherein: In step (2), the mode selection is achieved by reading a configuration file or an instruction input by the user.

4. The method for switching an Internet of Things terminal mode according to claim 1, wherein: In step (3), the mode configuration includes the configuration of the LoRa module, the WiFi module and the MQTT service.

5. The method for switching the mode of an Internet of Things terminal according to claim 1, wherein: In step (4), mode switching is achieved by changing the working mode parameters of the device.

6. The method for switching an Internet of Things terminal mode according to claim 1, wherein: In step (5), data transmission includes LoRa communication and MQTT communication.

7. The method for switching an Internet of Things terminal mode according to claim 1, wherein: Based on the unique ID of each device, a QR code is generated and affixed to the surface of the device. After the user scans the code, they will jump to the built-in web page; the web page displays the device status in real time and provides mode switching options.