A low-power processing method for long-link IoT devices based on CAT1 communication
By optimizing device peripherals, RTOS system, MQTT protocol and base station communication, the problem of high power consumption in standby state of cloud speaker series equipment is solved, and the power consumption and extended usage time is achieved without affecting the response speed.
Patent Information
- Application Number
- CN202211263190.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-14
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2042-10-14
AI Technical Summary
In the cloud speaker series and its derivatives, how to reduce the power consumption of the device in standby state without affecting the device's single response speed, especially in the 4G CAT1 communication environment.
Through configuration optimization of device peripherals and IO, configuration optimization of RTOS system resources, configuration optimization of MQTT upper-layer protocol and parameter tuning of base station communication, it specifically includes configuring the idle IO of the MCU as a floating input or output pull-down grounding, optimizing thread and timer resources, and tuning MQTT protocol parameters and base station communication parameters to reduce the standby power consumption of the device.
Without affecting communication efficiency and equipment overall performance, the equipment standby power consumption can be reduced to the equipment and the service time will be extended.
Smart Images

Figure CN115664873B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of 4G CAT1 Internet of Things terminals, and in particular to a low-power consumption processing method for a long-link Internet of Things device based on CAT1 communication. Background Art
[0002] In recent years, with the rapid development of Internet technology, the widespread application of big data technology, and the comprehensive popularization of smart phones, mankind has entered a new digital society. Mobile payment, which was born with it, has also been widely used, from the original traditional payment method to the stage where mobile payment is the main method. In such a mobile payment field, a variety of payment terminals such as code scanning POS and cloud speakers have been born. In particular, the social demand for the cloud speaker series and its derivative products has ushered in explosive growth. The characteristics of the cloud speaker series products are mainly 4G CAT1 communication, long standby, long connection, battery power supply, etc., which requires a relatively high power consumption requirement for the device in the standby state of listening to the order. How to reduce power consumption without affecting the device's response speed of listening to the order is a problem that the present invention needs to solve. Summary of the invention
[0003] The purpose of the present invention is to provide a low-power processing method for long-link Internet of Things devices based on CAT1 communication, so as to solve the above-mentioned problems existing in the prior art.
[0004] In order to achieve the above object, the technical solution adopted by the present invention is as follows:
[0005] A low power consumption processing method for long-link IoT devices based on CAT1 communication, comprising:
[0006] Optimize the configuration of device peripherals and IO: configure the idle IO of MCU, redundant IO, and IO that is electrically connected to peripherals including UART and SPI as floating input or output pull-down to ground when idle;
[0007] RTOS system resource configuration optimization: including thread optimization, timer optimization and baseband system sleep;
[0008] Configuration optimization of the MQTT upper-layer protocol: Under the premise of maintaining a long connection with the server, the power consumption of the whole machine is reduced by tuning the MQTT protocol parameters;
[0009] Parameter tuning for base station communication: Reduce the RRC time for communication between the device and the base station.
[0010] Preferably, the thread optimization includes:
[0011] Reduce the thread scheduling frequency and the number of running threads on the APP side and the driver side;
[0012] Increase the Sleep time in the thread to minimize the frequency of the thread waking up the system;
[0013] Change the notification method of waiting events in the thread from polling query method to Event notification method in blocking state, so that the thread can fully release resources when idle and be awakened in time when there is an event notification.
[0014] Preferably, the timer is optimized by suspending or releasing the use of timer resources, and adopting a thread polling mechanism instead of timer wake-up to implement scheduling.
[0015] Preferably, the baseband system hibernation is to dial up the network, activate the 4G CAT1 network, and then put the baseband system of the device into a sleep standby mode as quickly as possible.
[0016] Preferably, the tuning of the MQTT protocol parameters is specifically to increase the network socket receiving timeout in the upper layer protocol MQTT, and to increase the heartbeat packet interval between the device and the MQTT server to maintain a long link state.
[0017] Preferably, the heartbeat packet interval is greater than 100 seconds and less than or equal to 300 seconds.
[0018] Preferably, when it is necessary to reduce the power consumption of the device, the specific operation process is as follows:
[0019] S1. Turn on the device;
[0020] S2. Initialize hardware resources, optimize the configuration of device peripherals and IO, then start the user thread and change the notification method of waiting events in the thread from polling query method to event notification method in blocking state;
[0021] At the same time, dial up the network, activate the 4G CAT1 network, and then adjust the parameters of the base station communication;
[0022] S3. Log in to the MQTT server and optimize the configuration of the MQTT upper layer protocol;
[0023] S4, optimizing the timer;
[0024] S5. Suspend or release unused threads, increase the sleep time in threads, and reduce thread scheduling frequency;
[0025] S6. The baseband system of the device enters the sleep standby mode.
[0026] The beneficial effect of the present invention is that after the device is turned on and the network is registered and the MQTT server is logged in, the method can maximize the reduction of the device's standby power consumption and extend the usage time without affecting the communication efficiency and the overall performance of the device. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Figure 1 It is a schematic diagram of a process for reducing power consumption of equipment in the implementation of the present invention. DETAILED DESCRIPTION
[0028] 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. It should be understood that the specific implementation methods described herein are only used to explain the present invention and are not used to limit the present invention.
[0029] Embodiment 1
[0030] In this embodiment, a low-power processing method for long-link IoT devices based on CAT1 communication is provided. In order to minimize the power consumption of the device, this method specifically includes four operation aspects: configuration optimization of device peripherals and IO, configuration optimization of RTOS system resources, configuration optimization of MQTT upper layer protocol, and parameter tuning of base station communication. These four aspects are described below:
[0031] 1. Optimization of device peripherals and IO configuration
[0032] When idle, configure the idle IO of the MCU, redundant IO, and IO that is electrically connected to peripherals including UART and SPI as floating input or output pulled down to ground. That is, the IO that is not used in sleep mode needs to be treated to prevent leakage, such as uartTX, which needs to be configured as floating input or output pulled down.
[0033] 2. Configuration optimization of RTOS system resources
[0034] Including thread optimization, timer optimization and baseband system sleep;
[0035] 1. Thread optimization
[0036] Specifically include:
[0037] (1) Reduce the thread scheduling frequency and the number of threads running on the APP side and the driver side;
[0038] (2) Increase the Sleep time in the thread to minimize the frequency of the thread waking up the system;
[0039] (3) Change the notification method of waiting for events in the thread from the polling query method to the event notification method in the blocking state, so that the thread can fully release resources when it is idle and be awakened in time when there is an event notification.
[0040] 2. Timer optimization
[0041] Specifically: suspend or release the use of timer resources, and use thread polling mechanism instead of timer wake-up to implement scheduling.
[0042] 3. Baseband system sleep
[0043] Specifically: After dialing up and activating the 4G CAT1 network, put the baseband system of the device into sleep standby mode as quickly as possible.
[0044] 3. Configuration optimization of MQTT upper layer protocol
[0045] Under the premise of maintaining a long connection with the server, the power consumption of the whole device can be reduced by optimizing the MQTT protocol parameters. Specifically, in the upper layer protocol MQTT, the network socket receiving timeout is increased, and the heartbeat packet interval between the device and the MQTT server is increased to maintain a long connection state.
[0046] The heartbeat packet interval is greater than 100 seconds and less than or equal to 300 seconds. It can be set according to actual conditions.
[0047] 4. Parameter Tuning of Base Station Communication
[0048] Reduce the RRC time for communication between the device and the base station. That is, reduce the RRC link holding time between the device and the base station, and release the RRC as soon as possible when the communication ends.
[0049] Embodiment 2
[0050] In this embodiment, when reducing the power consumption of the device, it is necessary to start from the device startup. After the device network is attached and dialed, in order to meet the system sleep time, it is necessary to minimize the use and scheduling of threads. For example, when using the embedded system FreeRTOS or rtThread, before the device enters sleep mode, turn off the use of the timer and use the thread polling mechanism to implement scheduling. The App side or the driver side should reduce the use of threads. The notification method of waiting for events in the thread is changed from the polling query method to the Event notification method in the blocked state, which allows the thread to fully release resources when it is idle and can be awakened in time when there is an event notification.
[0051] When calling the Socket receiving interface, the timeout is increased. The receiving interface uses a blocking waiting timeout exit mechanism. In the listening mode, increasing the timeout of the input parameter can effectively reduce the number of system wake-up times. The IoT device needs to maintain a long connection with the MQTT server. The interval of the heartbeat packet should be set to more than 100 seconds, and the maximum supported is 300 seconds, which reduces the number of communication packets sent and received.
[0052] The wireless communication states include RRC connected state and RRC idle state. After completing a packet of data transmission, there is no other business data transmission. RRC maintains the connected state for a period of time and then switches to the RRC idle state. We can configure the RRC release time to release the RRC as soon as possible after a communication ends, reducing the working time of the protocol stack of the baseband chip and effectively reducing the power consumption of the device.
[0053] If there are other peripherals connected to IO in the device, including UART, SPI and other peripherals, they should be configured as floating input or output pull-down to ground when idle to prevent chip pin leakage.
[0054] See attached Figure 1 , when it is necessary to reduce the power consumption of the device, the specific operation process is as follows:
[0055] S1. Turn on the device;
[0056] S2. Initialize hardware resources, optimize the configuration of device peripherals and IO, then start the user thread and change the notification method of waiting events in the thread from polling query method to event notification method in blocking state;
[0057] At the same time, dial up the network, activate the 4G CAT1 network, and then adjust the parameters of the base station communication;
[0058] S3. Log in to the MQTT server and optimize the configuration of the MQTT upper layer protocol;
[0059] S4, optimizing the timer;
[0060] S5. Suspend or release unused threads, increase the sleep time in threads, and reduce thread scheduling frequency;
[0061] S6. The baseband system of the device enters the sleep standby mode.
[0062] By adopting the above technical solution disclosed in the present invention, the following beneficial effects are obtained:
[0063] The present invention provides a low-power processing method for a long-link Internet of Things device based on CAT1 communication. In order to minimize the power consumption of the device, the method can maximize the reduction of the standby power consumption of the device and extend the use time without affecting the communication efficiency and the performance of the entire device after the device is turned on, the network is registered and the MQTT server is logged in.
[0064] 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 principle of the present invention. These improvements and modifications should also be considered as the scope of protection of the present invention.
Claims
1. A low power consumption processing method for long-link IoT devices based on CAT1 communication, characterized in that: include, Optimize the configuration of device peripherals and IO: configure the idle IO of MCU, redundant IO, and IO that is electrically connected to peripherals including UART and SPI as floating input or output pull-down to ground when idle; RTOS system resource configuration optimization: including thread optimization, timer optimization and baseband system sleep; The thread optimization includes: Reduce the thread scheduling frequency and the number of running threads on the APP side and the driver side; Increase the Sleep time in the thread to reduce the frequency of the thread waking up the system; Change the notification method of waiting events in the thread from polling query method to event notification method in blocking state, so that the thread can fully release resources when idle and be awakened in time when there is event notification; The timer is optimized to suspend or release the use of timer resources, and adopt a thread polling mechanism instead of timer wake-up to achieve scheduling; The baseband system hibernation is to dial up the network, activate the 4G CAT1 network, and then put the baseband system of the device into a hibernation standby mode; Configuration optimization of the MQTT upper-layer protocol: Under the premise of maintaining a long connection with the server, the power consumption of the whole machine is reduced by tuning the MQTT protocol parameters; To optimize the MQTT protocol parameters, in the upper layer protocol MQTT, increase the network socket receiving timeout and increase the heartbeat packet interval between the device and the MQTT server to maintain a long connection state; Parameter tuning for base station communication: Reduce the RRC time for communication between the device and the base station.
2. According to claim 1, the low power consumption processing method of long link Internet of Things device based on CAT1 communication is characterized in that: The heartbeat packet interval is greater than 100 seconds and less than or equal to 300 seconds.
3. The low power consumption processing method for long-link Internet of Things devices based on CAT1 communication according to claim 2 is characterized in that: When it is necessary to reduce the power consumption of the device, the specific operation process is as follows: S1. Turn on the device; S2. Initialize hardware resources, optimize the configuration of device peripherals and IO, then start the user thread and change the notification method of waiting events in the thread from polling query method to event notification method in blocking state; At the same time, dial up the network, activate the 4G CAT1 network, and then adjust the parameters of the base station communication; S3. Log in to the MQTT server and optimize the configuration of the MQTT upper layer protocol; S4, optimizing the timer; S5. Suspend or release unused threads, increase the sleep time in threads, and reduce thread scheduling frequency; S6. The baseband system of the device enters the sleep standby mode.
Citation Information
Patent Citations
Low-power consumption power supply management equipment for embedded Linux equipment
CN101968678A
Reducing power consumption in multi-threaded processor mobile devices
CN103518403A