Power consumption control method of Internet of Things equipment, equipment, auxiliary processing unit and medium

By introducing an auxiliary processing unit into IoT devices, which can autonomously switch power consumption modes, the problem of achieving fine-grained power consumption control in existing technologies is solved, thereby optimizing system power consumption and improving response speed.

CN120835367APending Publication Date: 2025-10-24SHENZHEN XIAOPAI TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510979428.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-16
Publication Date
2025-10-24

AI Technical Summary

Technical Problem

Existing technologies struggle to achieve precise power consumption control for IoT devices in complex application scenarios, and the main processing unit struggles to manage power consumption efficiently, resulting in slow response times.

Method used

An auxiliary processing unit is introduced to autonomously switch power consumption modes by detecting battery power and charging status. It adopts multi-level power thresholds and mode commands to achieve fine-grained power consumption management. The auxiliary processing unit independently completes battery model reading and anomaly handling, reducing the intervention of the main processing unit.

Benefits of technology

It enables refined power management in complex scenarios, reduces overall system power consumption, improves device response speed, enhances device availability in low-power scenarios, and reduces the burden on the main processing unit.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120835367A_ABST
    Figure CN120835367A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of Internet of Things and security and protection, in particular to a power consumption control method and equipment of Internet of Things equipment, an auxiliary processing unit and a storage medium, and solves the technical problem that traditional Internet of Things equipment lacks power consumption fine management. The method comprises the following steps: after power-on, detecting the battery electric quantity and the battery charging state of the Internet of Things equipment; when the battery charging state is normal and the battery electric quantity is greater than or equal to a first electric quantity threshold value, entering a normal mode; and in the normal mode, autonomously switching the power consumption mode of the Internet of Things equipment according to a received mode instruction, an external interrupt wake-up source and a preset electric quantity threshold value.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of Internet of Things, and in particular to a power consumption control method and device of an Internet of Things equipment, an auxiliary processing unit and a storage medium. BACKGROUND

[0002] In a battery-powered Internet of Things equipment (such as a security camera, a sensor node, etc.), power consumption management is crucial. Such an Internet of Things equipment usually contains a main processing unit (CPU) responsible for core applications and an auxiliary processing unit (which can be a microprocessor unit MCU) responsible for underlying hardware management (such as power supply, sensors, charging). In order to maximize battery life, the Internet of Things equipment needs to intelligently turn on and off different device modules (such as CPU, 4G module, sensor module, etc.) according to the power state, use scenario (such as standby, monitoring, low power), and efficiently switch between different states while maintaining necessary communication and response capabilities (such as remote wake-up, event triggering).

[0003] In the prior art, a relatively simple sleep / wake-up mechanism or a single battery power threshold control is usually used, for example, the main processing unit CPU centrally manages power consumption, and the microcontroller unit is responsible for monitoring the states of all peripherals and the battery power, and directly controls all power switches. After the main processing unit CPU enters sleep, it is woken up by an external interrupt, which is difficult to achieve fine power consumption control in complex application scenarios. SUMMARY

[0004] The embodiments of the present application provide a power consumption control method and device of an Internet of Things equipment, an auxiliary processing unit and a storage medium to solve the technical problem of lack of fine power consumption management of the Internet of Things equipment.

[0005] A power consumption control method of an Internet of Things equipment, applied to an auxiliary processing unit of the Internet of Things equipment, the method comprising: after power-on, detecting the battery power and the battery charging state of the Internet of Things equipment; when the battery charging state is normal and the battery power is greater than or equal to a first power threshold, entering a normal mode; in the normal mode, autonomously switching the power consumption mode of the Internet of Things equipment according to a received mode instruction, an external interrupt wake-up source and a preset power threshold.

[0006] Further, after the detection of the battery power and the battery charging state of the Internet of Things equipment, the method further comprises: when the battery charging state is normal and the battery power is less than the first power threshold, detecting whether the battery power is zero and whether the battery voltage is less than or equal to a battery voltage threshold; When the battery power is zero and the battery voltage is less than or equal to the battery voltage threshold, the normal mode is entered; When the battery power is not zero or the battery voltage is greater than the battery voltage threshold, the system power supply and the communication module power supply of the Internet of Things device are turned off to enter the forced shutdown mode; after entering the forced shutdown mode, the battery power is periodically detected, and when the battery power is greater than or equal to a second power threshold, the system power supply and the communication module power supply of the Internet of Things device are turned on.

[0007] Further, the autonomous switching of the power consumption mode of the Internet of Things device according to the received mode instruction, the external interrupt wake-up source and the preset power threshold comprises: When the first mode instruction is received and the sensor flag bit is enabled, the first sub-power consumption working mode is entered, and when the first mode instruction is received and the sensor flag bit is not enabled, the second sub-power consumption working mode is entered; In the first sub-power consumption working mode, the system power supply, the communication module power supply and the sensor power supply of the Internet of Things device are turned on to enter the sleep mode, and only the communication module interrupt signal, the peripheral interrupt signal and the sensor interrupt signal are responded; after the communication module interrupt signal, the peripheral interrupt signal or the sensor interrupt signal is received, a main processing unit wake-up signal is output to wake up the main processing unit, and is reported to the corresponding external interrupt wake-up source; In the second sub-power consumption working mode, the system power supply and the communication module power supply of the Internet of Things device are turned on, and the sensor power supply is turned off to enter the sleep mode, and only the communication module interrupt signal and the peripheral interrupt signal are responded; after the communication module interrupt signal or the peripheral interrupt signal is received, a main processing unit wake-up signal is output to wake up the main processing unit, and is reported to the corresponding external interrupt wake-up source.

[0008] Further, after the sleep mode is entered or the battery power and the battery charging state of the Internet of Things device are detected, the method further comprises: The charging state detection is periodically performed, and when the battery charging state is abnormal, a charging enable bit is autonomously pulled high for a preset time length and then reset.

[0009] Further, the autonomous switching of the power consumption mode of the Internet of Things device according to the received mode instruction, the external interrupt wake-up source and the preset power threshold further comprises: When the second mode instruction is received and the sensor flag bit is enabled, the third sub-power consumption working mode is entered, and when the second mode instruction is received and the sensor flag bit is not enabled, the fourth sub-power consumption working mode is entered; In the third sub-power consumption working mode, the system power supply of the Internet of Things device is turned off, the communication module power supply and the sensor power supply are turned on, and the Internet of Things device enters a sleep mode, only responds to a communication module interrupt signal and a sensor interrupt signal, and performs periodic battery power detection; after receiving the communication module interrupt signal or the sensor interrupt signal, the system power supply of the Internet of Things device is turned on; when the battery power is less than the first power threshold, the system power supply, the sensor power supply and the communication module power supply of the Internet of Things device are turned off to enter a forced shutdown mode; In the fourth sub-power consumption working mode, the system power supply and the sensor power supply of the Internet of Things device are turned off, and the communication module power supply is turned on, and the Internet of Things device enters a sleep mode, only responds to a communication module interrupt signal and periodically performs battery power detection; when the communication module interrupt signal is received or the battery power is greater than or equal to the fourth power threshold, the system power supply of the Internet of Things device is turned on to exit the fourth sub-power consumption working mode; when the battery power is less than the first power threshold, the system power supply, the sensor power supply and the communication module power supply of the Internet of Things device are turned off to enter a forced shutdown mode, and after entering the forced shutdown mode, the battery power is periodically detected, and when the battery power is greater than or equal to the second power threshold, the system power supply and the communication module power supply of the Internet of Things device are turned on.

[0010] Further, the method further comprises: After power-on, it is judged whether an entering fourth sub-power consumption working mode instruction sent by a main processing unit is received, wherein the fourth sub-power consumption working mode instruction is sent by the main processing unit after detecting that the battery power is less than a third power threshold; When the fourth sub-power consumption working mode instruction is received, the fourth sub-power consumption working mode is entered; When it is detected that the battery power is greater than or equal to the third power threshold, the fourth sub-power consumption working mode is exited.

[0011] Further, the first power threshold, the second power threshold, the third power threshold and the fourth power threshold used before entering the normal mode after power-on are respectively less than the first power threshold, the second power threshold, the third power threshold and the fourth power threshold used after entering the normal mode.

[0012] An Internet of Things device comprises a main processing unit responsible for core applications and an auxiliary processing unit responsible for underlying hardware management, and the auxiliary processing unit is used for: After power-on, the battery power and the battery charging state of the Internet of Things device are detected; When the battery charging state is normal and the battery power is greater than or equal to a first power threshold, a normal mode is entered; In the normal mode, the power consumption mode of the Internet of Things device is autonomously switched according to the received mode instruction, the external interrupt wake-up source and the preset power threshold.

[0013] An auxiliary processing unit comprises a memory, a processor and a computer program stored in the memory and executable on the processor, and the processor implements the power consumption control method of the Internet of Things device as described.

[0014] A computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the power consumption control method of the Internet of Things device as described.

[0015] In the scheme provided by the embodiments of the present application, after the auxiliary processing unit of the Internet of Things device is powered on, the battery power and the battery charging state of the Internet of Things device are detected; when the battery charging state is normal and the battery power is greater than or equal to a first power threshold, the normal mode is entered; in the normal mode, the power consumption mode of the Internet of Things device is autonomously switched according to the received mode instruction, the external interrupt wake-up source and the preset power threshold. After the auxiliary processing unit of the Internet of Things device enters a certain mode, it has autonomous decision-making ability and can seamlessly switch between multiple complex power consumption modes according to the power, the instruction, the interrupt and the preset power threshold, thereby realizing fine power consumption management capability. BRIEF DESCRIPTION OF DRAWINGS

[0016] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed in the description of the embodiments of the present application will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.

[0017] Figure 1 is a flowchart of a power consumption control method of an Internet of Things device in an embodiment of the present application; Figure 2 is a flowchart of a first and a second sub-power consumption working mode of a power consumption control method of an Internet of Things device in an embodiment of the present application; Figure 3 is a flowchart of a third and a fourth sub-power consumption working mode of a power consumption control method of an Internet of Things device in an embodiment of the present application; Figure 4 is another flowchart of a power consumption control method of an Internet of Things device in an embodiment of the present application; Figure 5is another flowchart of the first and second sub-power consumption modes of the power consumption control method of the Internet of Things device in an embodiment of the present application; Figure 6 is another flowchart of the third and fourth sub-power consumption modes of the power consumption control method of the Internet of Things device in an embodiment of the present application; Figure 7 is a structural diagram of the Internet of Things device in an embodiment of the present application. DETAILED DESCRIPTION

[0018] In order to make the technical problems, technical solutions and beneficial effects solved by the present application clearer, the present application will be further described in detail below in combination with the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and do not limit the present application.

[0019] In the prior art, a relatively simple sleep / wake mechanism or a single battery power threshold control is generally used, for example, a main processing unit centrally manages power consumption, a microcontroller unit is responsible for monitoring the states of all peripherals and the battery power, and directly controls all power switches. After the main processing unit enters sleep, it is woken up by an external interrupt, and it is difficult to achieve fine power consumption control in a complex application scenario. For example, a main processing unit centrally manages power consumption, and a secondary processing unit is responsible for monitoring the states of all peripherals and the battery power, and directly controls all power switches. After the secondary processing unit enters sleep, it is woken up by an external interrupt.

[0020] In an embodiment of the present application, a power consumption control scheme of an Internet of Things device is provided, which can achieve fine power consumption control in a complex application scenario. Before describing the embodiments of the present application, the terms / concepts involved in the embodiments of the present application are introduced first for better understanding.

[0021] The Internet of Things device includes but is not limited to a camera (such as a security camera), a sensor node or other Internet of Things devices, which can also be extended to an electronic device with a communication module and a sensor module, and the specific implementation is not limited. Such Internet of Things devices usually contain a main processing unit responsible for core applications and a secondary processing unit responsible for underlying hardware management. For ease of description, the scheme will be explained by taking a security camera as an example in the embodiments of the present application.

[0022] The main processing unit is a main processing unit on the Internet of Things device, which is generally a central processing unit (CPU) and is responsible for the core applications of the Internet of Things device.

[0023] The secondary processing unit is a secondary processing unit on the Internet of Things device, which is generally a microcontroller (MCU) and is responsible for the underlying hardware management of the Internet of Things device.

[0024] For example, the central processor CPU of the security camera is used to be responsible for the core application function of the security camera, and the microcontroller MCU is used to be responsible for the underlying hardware management (such as system power supply, sensor, charging) of the security camera.

[0025] As shown in Table 1, some signals involved in the implementation of the embodiments of the present application are introduced.

[0026] Table 1 Next, the embodiments of the present application are described in detail. Figures 1-7 , the embodiments of the present application are described in detail.

[0027] As Figures 1-3 shown, the power consumption control method of the Internet of Things device provided by the embodiments of the present application is described in detail, and the power consumption control method of the Internet of Things device applies the auxiliary processing unit of the Internet of Things device, and the method comprises: After power-on, the battery capacity and the battery charging state of the Internet of Things device are detected; When the battery charging state is normal and the battery capacity is greater than or equal to the first capacity threshold, the normal mode is entered; In the normal mode, the power consumption mode of the Internet of Things device is autonomously switched according to the received mode instruction, the external interrupt wake-up source and the preset capacity threshold.

[0028] In this embodiment, the auxiliary processing unit of the Internet of Things device can detect the battery capacity and the battery charging state of the Internet of Things device after power-on, and when the battery charging state is normal and the battery capacity is greater than or equal to the first capacity threshold, the normal mode is entered, and in the normal mode, the power consumption mode of the Internet of Things device is autonomously switched according to the received mode instruction, the external interrupt wake-up source and the preset capacity threshold.

[0029] When the battery charging state is normal and the battery capacity is greater than or equal to the first capacity threshold, the normal mode is entered; in the normal mode, the power consumption mode of the Internet of Things device is intelligently and autonomously switched according to the received mode instruction, the external interrupt wake-up source and the preset capacity threshold. After the auxiliary processing unit of the Internet of Things device enters a certain mode, it has autonomous decision-making ability and can seamlessly switch between multiple complex power consumption modes according to the capacity, instruction, interrupt and preset capacity threshold, thereby realizing fine power consumption management capability.

[0030] Moreover, the battery model reading, capacity monitoring, charging state detection and exception handling can be independently and reliably completed by the auxiliary processing unit, the intervention of the main processing unit is reduced, and the problem of slow response caused by heavy burden of the main processing unit is avoided.

[0031] It should be noted that, optionally, after the Internet of Things device is powered on, the auxiliary processing unit will initialize and self-calibrate the minimum interference power meter chip: initialize the state of all I / O ports according to the pre-defined GPIO function definition table. When reading the battery model from the power meter, the power meter chip self-calibration will be triggered, and the output current of the battery of the Internet of Things device needs to be guaranteed to be minimum, so the communication module module, system power supply and related sensor power supply of the Internet of Things device need to be turned off. In the hardware design, the auxiliary processing unit can control the communication module module, system power supply and related sensor power supply. In this embodiment, before the power meter calibration, the auxiliary processing unit actively turns off all unnecessary power supplies to maximize the accuracy of power calibration.

[0032] In an embodiment, as shown in Figure 1 After detecting the battery power and the battery charging state of the Internet of Things device, the method further comprises: When the battery charging state is normal and the battery power is less than the first power threshold, it is detected whether the battery power is zero and whether the battery voltage is less than or equal to the battery voltage threshold; When the battery power is zero and the battery voltage is less than or equal to the battery voltage threshold, the normal mode is entered; When the battery power is not zero or the battery voltage is greater than the battery voltage threshold, the system power supply and the communication module power supply of the Internet of Things device are turned off to enter the forced shutdown mode; after entering the forced shutdown mode, the battery power is periodically detected, and when the battery power is greater than or equal to the second power threshold, the system power supply and the communication module power supply of the Internet of Things device are turned on.

[0033] In this embodiment, the charging state is further detected, and the forced shutdown mode and the normal mode are intelligently switched according to the charging state. When the battery charging state is normal and the battery power is less than the first power threshold, it is detected whether the battery power is zero and whether the battery voltage is less than or equal to the battery voltage threshold; when the battery power is zero and the battery voltage is less than or equal to the battery voltage threshold, the normal mode is entered to ensure the logical processing of the normal mode; when the battery power is not zero or the battery voltage is greater than the battery voltage threshold, the system power supply and the communication module power supply of the Internet of Things device are turned off to enter the forced shutdown mode to avoid continuing to consume the battery power; and after entering the forced shutdown mode, the battery power is periodically detected, and when the battery power is greater than or equal to the second power threshold, the system power supply and the communication module power supply of the Internet of Things device are turned on to enter the normal mode.

[0034] In an embodiment, as shown in Figure 1 and Figure 2 According to the received mode instruction, the external interrupt wake-up source and the pre-set power threshold, the power consumption mode of the Internet of Things device is autonomously switched, which comprises the following steps: when receiving the first mode instruction and the sensor flag bit is enabled, entering the first sub-power consumption working mode, and when receiving the first mode instruction and the sensor flag bit is enabled, entering the second sub-power consumption working mode; In the first sub-power consumption working mode, the system power supply, the communication module power supply and the sensor power supply of the Internet of Things device are turned on to enter the sleep mode, and only the peripheral interrupt signal and the sensor interrupt signal in response to the communication module interrupt signal; after receiving the communication module interrupt signal, the peripheral interrupt signal or the sensor interrupt signal, a main processing unit wake-up signal is output to wake up the main processing unit, and is reported to the corresponding external interrupt wake-up source; In the second sub-power consumption working mode, the system power supply and the communication module power supply of the Internet of Things device are turned on, and the sensor power supply of the Internet of Things device is turned off to enter the sleep mode, and only the peripheral interrupt signal in response to the communication module interrupt signal; after receiving the communication module interrupt signal or the peripheral interrupt signal, a main processing unit wake-up signal is output to wake up the main processing unit, and is reported to the corresponding external interrupt wake-up source.

[0035] In this embodiment, the first sub-power consumption working mode and / or the second sub-power consumption working mode are designed, and the power consumption mode of the Internet of Things device is autonomously switched according to the received mode instruction, the external interrupt wake-up source and the preset power threshold. In this embodiment, different first sub-power consumption working modes and second sub-power consumption working modes define specific power supply combinations and allowed interrupt sources, which ensure the corresponding functional requirements and achieve extreme power consumption optimization.

[0036] In an embodiment, as shown in Figure 2 After the entering the sleep mode or the detecting the battery power and the battery charging state of the Internet of Things device, the method further comprises: Periodically performing charging state detection, and when the battery charging state is abnormal, autonomously pulling up the charging enable bit for a preset time length and then resetting.

[0037] In this embodiment, the auxiliary processing unit can independently perform charging abnormality processing: the auxiliary processing unit can automatically identify the charging abnormality signal (such as 1Hz PWM) and perform the reset operation, thereby improving the reliability of the charging system; and the process does not require intervention of the main processing unit, and the auxiliary processing unit can read the abnormality signal.

[0038] In an embodiment, as shown in Figure 1 and Figure 3 According to the received mode instruction, the external interrupt wake-up source and the preset power threshold, the power consumption mode of the Internet of Things device is autonomously switched, which further comprises: When receiving the second mode instruction and the sensor flag bit is enabled, entering the third sub-power consumption working mode; when receiving the second mode instruction and the sensor flag bit is enabled, entering the fourth sub-power consumption working mode; In the third sub-power consumption working mode, the system power supply of the Internet of Things device is turned off, and the communication module power supply and the sensor power supply are turned on to enter the sleep mode, only responding to the communication module interrupt signal and the sensor interrupt signal, and periodically detecting the battery power; after receiving the communication module interrupt signal or the sensor interrupt signal, the system power supply of the Internet of Things device is turned on; when the battery power is less than the first power threshold, the system power supply, the sensor power supply and the communication module power supply of the Internet of Things device are turned off to enter the forced shutdown mode; In the fourth sub-power consumption working mode, the system power supply and the sensor power supply of the Internet of Things device are turned off, and the communication module power supply is turned on to enter the sleep mode, only responding to the communication module interrupt signal and periodically detecting the battery power; when the communication module interrupt signal is received or the battery power is greater than or equal to the fourth power threshold, the system power supply of the Internet of Things device is turned on to exit the fourth sub-power consumption working mode; when the battery power is less than the first power threshold, the system power supply, the sensor power supply and the communication module power supply of the Internet of Things device are turned off to enter the forced shutdown mode, and after entering the forced shutdown mode, the battery power is periodically detected, and when the battery power is greater than or equal to the second power threshold, the system power supply and the communication module power supply of the Internet of Things device are turned on.

[0039] In this embodiment, the third sub-power consumption working mode and / or the fourth sub-power consumption working mode are designed, and the power consumption mode of the Internet of Things device is autonomously switched by the received mode instruction, the external interrupt wake-up source and the preset power threshold. In this embodiment, the third sub-power consumption working mode and the fourth sub-power consumption working mode respectively define another two specific power supply combinations and allowed interrupt sources, which realize extreme power optimization while guaranteeing the corresponding functional requirements.

[0040] In addition, in the low power scenario, the processing is simple, which can prevent battery over-discharge (forced shutdown mode) and maintain the minimum communication capability (low power protection mode) to facilitate waiting for remote instructions or charging recovery.

[0041] It is also worth mentioning that from here, it can be seen that the auxiliary processing unit can realize intelligent control: after entering a certain mode according to the instruction, it has autonomous decision-making ability, and can realize seamless switching between multiple complex different power consumption modes according to the power, instruction, interrupt and preset threshold, rather than single power threshold relationship centralized management of power consumption by the main processing unit.

[0042] In an embodiment, the method further comprises: After power-on, it is judged whether the entering fourth sub-power consumption working mode instruction sent by the main processing unit is received, wherein the fourth sub-power consumption working mode instruction is sent by the main processing unit after detecting that the battery power is less than the third power threshold value; When the fourth sub-power consumption working mode instruction is received, the fourth sub-power consumption working mode is entered; When it is detected that the battery power is greater than or equal to the third power threshold value, the fourth sub-power consumption working mode is exited.

[0043] In this embodiment, a third power threshold value is also designed. The main processing unit sends a fourth sub-power consumption working mode instruction after detecting that the battery power is less than the third power threshold value. The auxiliary processing unit enters the fourth sub-power consumption working mode when the fourth sub-power consumption working mode instruction is received. When it is detected that the battery power is greater than or equal to the third power threshold value, the fourth sub-power consumption working mode is exited to enter the low power state.

[0044] In an embodiment, the first to fourth power threshold values involved before entering the normal mode after power-on and after entering the normal mode can be adjusted and configured online. The flexible and configurable power threshold values are suitable for different application requirements.

[0045] As can be seen from the above embodiments, in the embodiments of the present application, there are multiple configurable power threshold values, four key power threshold values (first to fourth power threshold values) are introduced. In other embodiments, the interface of the auxiliary processing unit is supported for online configuration, and fine power management and mode conversion strategies (such as hysteresis control to avoid oscillation) are realized.

[0046] In an embodiment, the first power threshold value, the second power threshold value, the third power threshold value and the fourth power threshold value used before entering the normal mode after power-on are respectively less than the first power threshold value, the second power threshold value, the third power threshold value and the fourth power threshold value used after entering the normal mode.

[0047] In this embodiment, the first to fourth power threshold values involved before entering the normal mode after power-on and after entering the normal mode can be adjusted and configured online, and are different respectively. Different configurations can be made according to different Internet of Things device types and battery conditions. For example, the following conditions can be used: Before entering the normal mode after power-on: The first power threshold value: entering forced shutdown power threshold value, default 5%, <5%. 5% represents the remaining power ratio; The second power threshold value: exit forced shutdown power threshold value, default 10%, >10%; The third power threshold is the power threshold for entering the low-battery protection state. The main processing unit initiates the low-battery protection state, and the auxiliary processing unit does not actively enter the low-battery protection state. Fourth power threshold: The power threshold for exiting low-battery protection, the default is 17%, and the value should be ≥17%.

[0048] After entering the normal mode: First power threshold: The power threshold for forced shutdown, the default is 10%, and <10%. 5% indicates the remaining power percentage; Second power threshold: Exit forced shutdown power threshold, default 15%, >15%; The third power threshold is the power threshold for entering the low-battery protection state. The main processing unit initiates the low-battery protection state, and the auxiliary processing unit does not actively enter the low-battery protection state. Fourth power threshold: The power threshold for exiting low-battery protection, the default is 22%, and the value is ≥22%.

[0049] It can be seen that in the embodiments of the present application, the overall power consumption of the IoT device system (especially standby power consumption) is significantly reduced, the event response speed is improved, the device availability in low-power scenarios is enhanced (maintaining communication), and the burden on the main processing unit is reduced through the autonomous management of the auxiliary processing unit. It is particularly suitable for IoT devices such as low-power camera products that are battery-powered and have strict requirements on power consumption and response.

[0050] It should be noted that, as previously described, IoT devices include, but are not limited to, cameras (such as security cameras), sensor nodes, or other IoT devices. In this application embodiment, a security camera is used as an example, combined with the above embodiments, to illustrate the actual power consumption management of security cameras. The security camera includes a main processing unit (CPU) and a secondary processing unit (MCU). The security camera also includes a system power supply, a 4G power supply (power supply for the 4G communication module), and a passive infrared sensor (PIR). It should be noted that the listed underlying hardware framework is only used as an example of a security camera; other communication modules, sensor modules, etc. may also be used, and the specifics are not limited.

[0051] like Figures 4-6 As shown, an embodiment of the present application provides a power consumption control method for a security camera, which is a security camera. The power consumption control method for the security camera is applied to the MCU of the security camera, and the method includes: After powering on, detecting the battery level and battery charging status of the security camera; When the battery charging state is normal and the battery power level is greater than or equal to a first power level threshold (5%), the normal mode is entered; In the normal mode, the power consumption mode of the security camera is autonomously switched according to the received mode instruction, the external interrupt wake-up source and the preset power threshold.

[0052] In this embodiment, after the MCU of the security camera is powered on, the battery power and the battery charging state of the security camera can be detected. When the battery charging state is normal and the battery power is greater than or equal to the first power threshold, the normal mode is entered. In the normal mode, the power consumption mode of the security camera is autonomously switched according to the received mode instruction, the external interrupt wake-up source and the preset power threshold.

[0053] When the battery charging state is normal and the battery power is greater than or equal to the first power threshold (5%), the normal mode is entered. In the normal mode, the power consumption mode of the security camera is autonomously switched according to the received mode instruction, the external interrupt wake-up source and the preset power threshold. After the MCU of the security camera enters a certain mode, it has autonomous decision-making ability and can seamlessly switch between multiple complex power consumption modes according to the power, instruction, interrupt and preset power threshold, thereby realizing fine power consumption management capability.

[0054] Moreover, the battery model reading, power monitoring, charging state detection and abnormality processing can be independently and reliably completed by the MCU, CPU intervention is reduced, and the problem of slow response due to heavy CPU burden is avoided.

[0055] It should be noted that, optionally, after the security camera is powered on, the MCU will perform initialization and minimum interference power gauge chip self-calibration: all I / O port states are initialized according to a preset GPIO function definition table. When reading the battery model from the power gauge, the power gauge chip self-calibration will be triggered. To ensure that the output current of the security camera battery is minimized, the 4G module, system power supply and PIR power supply of the security camera should be turned off. In the hardware design, the MCU can control the 4G module, system power supply and PIR power supply. In this embodiment, before the power gauge calibration, the MCU actively turns off all unnecessary power supplies (4G module, system power supply and PIR power supply) to maximize the accuracy of power calibration.

[0056] In one embodiment, as Figure 4 After detecting the battery power and the battery charging state of the security camera, the method further includes: When the battery charging state is normal and the battery power is less than the first power threshold (5%), it is detected whether the battery power is zero and whether the battery voltage is less than or equal to the battery voltage threshold (0.5V); When the battery power is zero and the battery voltage is less than or equal to the battery voltage threshold (0.5V), the normal mode is entered; When the battery power is not zero or the battery voltage > the battery voltage threshold (0.5V), the system power and 4G power of the security camera are turned off to enter the forced shutdown mode; after entering the forced shutdown mode, the battery power is periodically detected every 2 minutes, and when the battery power ≥ the second power threshold (10%), the system power and 4G power of the security camera are turned on.

[0057] In this embodiment, the charging state is further detected, and the forced shutdown mode and the normal mode are intelligently switched according to the charging state; when the battery charging state is normal and the battery power < the first power threshold (5%), it is detected whether the battery power is zero and the battery voltage is less than or equal to the battery voltage threshold (0.5V); when the battery power is zero and the battery voltage is less than or equal to the battery voltage threshold (0.5V), the normal mode is entered to ensure the logic processing of the normal mode; when the battery power is not zero or the battery voltage > the battery voltage threshold (0.5V), the system power and 4G power of the security camera are turned off to enter the forced shutdown mode to avoid continuous consumption of battery power; after entering the forced shutdown mode, the battery power is periodically detected every 2 minutes, and when the battery power ≥ the second power threshold (10%), the system power and 4G power of the security camera are turned on to enter the normal mode.

[0058] In an embodiment, as shown in Figure 4 and Figure 5 According to the received mode instruction, the external interrupt wake-up source and the preset power threshold, the power consumption mode of the security camera is autonomously switched, which includes the following steps: When the first mode instruction (0xC1) and the PIR flag bit enable (PIR enabled) are received, the first sub-power consumption working mode (AOV+PIR mode) is entered; when the first mode instruction (0xC1) is received and the PIR flag bit is not enabled (PIR not enabled), the second sub-power consumption working mode (pure AOV mode) is entered; In the first sub-power consumption working mode (AOV+PIR mode), the system power, 4G power and PIR power of the security camera are turned on to enter the sleep mode, and only the UART interrupt signal of the 4G interrupt signal and the PIR interrupt signal are responded; after receiving the 4G interrupt signal, the UART interrupt signal or the PIR interrupt signal, the CPU wake-up signal is output to wake up the CPU, and is reported to the corresponding external interrupt wake-up source; In the second sub-power consumption mode (pure AOV mode), the system power and 4G power of the security camera are turned on, and the PIR power of the security camera is turned off to enter the sleep mode, and only respond to the 4G interrupt signal and the UART interrupt signal; after receiving the 4G interrupt signal or the UART interrupt signal, output the CPU wake-up signal to wake up the CPU, and report to the corresponding external interrupt wake-up source.

[0059] In this embodiment, AOV+PIR mode and / or pure AOV mode are designed, and the power consumption mode of the security camera is autonomously switched according to the received mode instruction, the external interrupt wake-up source and the preset power threshold. In this embodiment, the AOV+PIR mode and the AOV mode respectively define specific power combinations and allowed interrupt sources, which not only guarantee the corresponding functional requirements, but also achieve the most extreme power consumption optimization.

[0060] In an embodiment, as shown in Figure 2 After the sleep mode is entered or the battery power and the battery charging state of the security camera are detected, the method further includes: The charging state is detected every 2 minutes, and when the battery charging state is abnormal, the charging enable bit is autonomously pulled high for 10 seconds and then reset.

[0061] In this embodiment, the MCU can independently process the charging abnormality: the MCU can automatically identify the charging abnormality signal (such as 1Hz PWM) and perform the reset operation, thereby improving the reliability of the charging system; and this process does not require CPU intervention, and the MCU can read this abnormal signal.

[0062] In an embodiment, as shown in Figure 4 and Figure 6 According to the received mode instruction, the external interrupt wake-up source and the preset power threshold, the power consumption mode of the security camera is autonomously switched, which further includes: When the second mode instruction (0xA5) and the PIR flag enable (PIR enabled) are received, the third sub-power consumption mode (pure PIR mode) is entered, and when the second mode instruction and the PIR flag are not enabled (PIR not enabled) are received, the fourth sub-power consumption mode (low power protection mode) is entered; In the third sub-power consumption working mode (pure PIR mode), the system power of the security camera is turned off, the 4G power and the PIR power are turned on, and the security camera enters a sleep mode, only responds to a 4G interrupt signal and the PIR interrupt signal, and performs a 2-minute periodic battery power detection; after receiving the 4G interrupt signal or the PIR interrupt signal, the system power of the security camera is turned on; when the battery power is less than a first power threshold (10%), the system power of the security camera, the PIR power and the 4G power are turned off, and the security camera enters a forced shutdown mode. In the fourth sub-power consumption working mode (low power protection mode), the system power of the security camera and the PIR power are turned off, and the 4G power is turned on, and the security camera enters a sleep mode, only responds to a 4G interrupt signal and performs a 2-minute periodic battery power detection; when the 4G interrupt signal is received or the battery power is greater than a fourth power threshold (22%), the system power of the security camera is turned on, and the security camera exits the fourth sub-power consumption working mode (low power protection mode); when the battery power is less than the first power threshold (10%), the system power of the security camera, the PIR power and the 4G power are turned off, and the security camera enters a forced shutdown mode, and after entering the forced shutdown mode, the battery power is periodically detected, and when the battery power is greater than a second power threshold (15%), the system power of the security camera and the 4G power are turned on.

[0063] In this embodiment, a pure PIR mode and / or a low power protection mode are designed, and the power consumption mode of the security camera is autonomously switched according to the received mode instruction, the external interrupt wake-up source and the preset power threshold. In this embodiment, the pure PIR mode and the low power protection mode define another two specific power combinations and allowed interrupt sources, respectively, which realize extreme power optimization while guaranteeing corresponding functional requirements.

[0064] In addition, in a low power scenario, the processing is simple, and both battery over-discharge (forced shutdown mode) and maintenance of minimum communication capability (low power protection mode) to facilitate waiting for remote instructions or charging recovery are prevented.

[0065] It is also worth mentioning that it can be seen from this that the MCU can realize intelligent control: after entering a certain mode according to an instruction, the MCU has autonomous decision-making capability, can realize seamless switching between multiple complex different power consumption modes according to power, instructions, interrupts and preset thresholds, and is not a single CPU that centrally manages power consumption according to a single power threshold relationship.

[0066] In an embodiment, the method further comprises: After power-on, it is judged whether the entering low-power protection mode instruction sent by the CPU is received, wherein the low-power protection mode instruction is sent by the CPU after detecting that the battery power is less than a third power threshold value; When the low-power protection mode instruction is received, the low-power protection mode is entered; When it is detected that the battery power is greater than or equal to the third power threshold value, the low-power protection mode is exited.

[0067] In this embodiment, a third power threshold value is also designed. The CPU sends a low-power protection mode instruction after detecting that the battery power is less than the third power threshold value, so that the MCU enters the low-power protection mode when the low-power protection mode instruction is received, and exits the low-power protection mode when it is detected that the battery power is greater than or equal to the third power threshold value, to enter the low-power state.

[0068] In an embodiment, the first to fourth power threshold values involved before entering the normal mode after power-on and after entering the normal mode can be configured online.

[0069] As can be seen from the above embodiments, in the embodiments of the present application, multi-level configurable power threshold values are provided, four key power threshold values (first to fourth power threshold values) are introduced. In other embodiments, the interface of the MCU is also supported for online configuration, so that fine power management and mode conversion strategies (such as hysteresis control to avoid oscillation) are realized.

[0070] In an embodiment, the first power threshold value, the second power threshold value, the third power threshold value and the fourth power threshold value used before entering the normal mode after power-on are respectively less than the first power threshold value, the second power threshold value, the third power threshold value and the fourth power threshold value used after entering the normal mode.

[0071] In this embodiment, the first to fourth power threshold values involved before entering the normal mode after power-on and after entering the normal mode can be configured online, and are different respectively, and can be configured differently according to different security camera types and battery conditions. For example, the following conditions can be used: Before entering the normal mode after power-on: The first power threshold value: entering forced shutdown power threshold value, default 5%, <5%. 5% represents the remaining power percentage; The second power threshold value: exit forced shutdown power threshold value, default 10%, >10%; The third power threshold value: entering low-power protection power threshold value, initiated by the CPU, and the MCU does not actively enter; The fourth power threshold value: exit low-power protection power threshold value, default 17%, ≥17%.

[0072] After entering the normal mode: First power threshold: entering forced shutdown power threshold, default 10%, <10% 5% represents the proportion of remaining power; Second power threshold: exit forced shutdown power threshold, default 15%, >15%; Third power threshold: entering low power protection power threshold, initiated by CPU, MCU does not actively enter; Fourth power threshold: exit low power protection power threshold, default 22%, ≥22%.

[0073] The following describes the main function logic of the security camera MCU, including: MCU initialization and minimum disturbance power meter chip self-calibration: After the MCU is powered on, all I / O port states are initialized according to the pre-defined GPIO function definition table.

[0074] When the MCU reads the battery model from the power meter, it will trigger the power meter chip self-calibration, at which time the output current of the battery should be minimized, so 4G, system power, and PIR power should be turned off. In the hardware design, the MCU can control the power of the 4G module, system power, and PIR.

[0075] Power management and mode switching: MCU built-in state machine, according to the power value (can be read through SDA / SCL), charging state (detected by MCU_BAT_Charge_state), received UART instructions, external interrupt wake-up source, and pre-set multi-level power threshold, autonomously decides and switches the following working modes: Normal mode: MCU periodically (e.g., every 450ms) wakes up, detects power, voltage, charging state, etc., and can maintain heartbeat communication with the camera system (such as SOC) (only when the SOC power is on). When idle, the MCU enters sleep mode.

[0076] AOV mode: enter after receiving a specific UART instruction (such as 0XC1).

[0077] Sleep: turn on system power (MCU_Vsystem_EN=high), turn on 4G power (4G_PWREN_MCU=low), turn off PIR power (PIR_POWER_EN=low). MCU enters STOP mode, only responds to 4G interrupt (4G_INT2_OUT_MCU) and UART interrupt.

[0078] Wake up: after the MCU is woken up by 4G interrupt or UART, the MCU outputs a pulse to wake up the CPU through MCU_WAKE_TO_CPU, and reports the wake-up source.

[0079] PIR mode: Enter when receiving specific UART instruction (such as 0XA5) and PIR flag bit is enabled.

[0080] Sleep: Turn off system power (MCU_Vsystem_EN = low), turn on 4G power (4G_PWREN_MCU = low), and turn on PIR power (PIR_POWER_EN = high). The MCU enters the STOP mode and responds to 4G interrupts (4G_INT2_OUT_MCU) and PIR interrupts (PIR_INT_MCU).

[0081] Wake up: After being woken up by 4G interrupts or PIR interrupts, turn on system power (MCU_Vsystem_EN = high).

[0082] Low power protection mode: Enter when receiving specific UART instruction (such as 0XA5) and PIR flag bit is not enabled.

[0083] Status: Turn off system power (MCU_Vsystem_EN = low), maintain 4G power supply (4G_PWREN_MCU = low), and turn off PIR power (PIR_POWER_EN = low). Only respond to 4G interrupts (4G_INT2_OUT_MCU).

[0084] Exit: When the power is greater than or equal to the fourth power threshold (default 22%) or woken up by 4G interrupts, turn on system power (MCU_Vsystem_EN = high).

[0085] Force shutdown: Triggered when the power is less than the first power threshold 1 (default 10%).

[0086] Status: Turn off system power (MCU_Vsystem_EN = low), turn off 4G power (4G_PWREN_MCU = high), and turn off PIR power (PIR_POWER_EN = low).

[0087] Exit: When the power is greater than or equal to the second power threshold (default 15%), turn on system power (MCU_Vsystem_EN = high) and 4G power (4G_PWREN_MCU = low).

[0088] As can be seen, in the embodiments of the present application, the overall power consumption of the security camera system is significantly reduced (especially standby power consumption), the event response speed is improved, the device availability (maintaining communication) in low power scenarios is enhanced, and the burden of the main processing unit is reduced through the autonomous management of the auxiliary processing unit, which is particularly suitable for low-power camera products and other Internet of Things devices that are powered by batteries and have strict requirements on power consumption and response.

[0089] In an embodiment, as shown in Figure 7 The embodiments of the present application also provide an Internet of Things device, which includes but is not limited to a camera. The Internet of Things device includes a main processing unit responsible for core applications and an auxiliary processing unit responsible for underlying hardware management. The auxiliary processing unit is configured to implement the power consumption control method of the Internet of Things device according to any one of the preceding embodiments.

[0090] The specific limitations of the Internet of Things device can refer to the limitations of the Internet of Things device in the power consumption control method of the Internet of Things device according to any one of the preceding embodiments, which will not be repeated here. Each module in the Internet of Things device can be implemented by software, hardware, or a combination thereof. Each module can be embedded in or independent of the processor in the computer device in hardware form, or stored in the memory in the computer device in software form, so as to be called and executed by the processor to perform the operations corresponding to each module.

[0091] In an embodiment, an auxiliary processing unit is provided, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the power consumption control method of the Internet of Things device according to any one of the preceding embodiments is implemented, for example, as shown in Figures 1 to 3 , or as shown in Figures 4 to 6 , which will not be repeated here to avoid repetition.

[0092] In an embodiment, a computer readable storage medium is provided, which stores a computer program. When the processor executes the computer program, the power consumption control method of the Internet of Things device according to the preceding embodiments is implemented, for example, as shown in Figures 1 to 3 , or as shown in Figures 4 to 6 , which will not be repeated here to avoid repetition.

[0093] The above embodiments are only used to illustrate the technical solutions of the present application, rather than limit them. Although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacements to some technical features. Such modifications or replacements do not change the essence of the corresponding technical solutions, and should be included in the protection scope of the present application.

Claims

1. A power consumption control method of an Internet of Things device, characterized by, The method comprises the following steps: After power-on, detecting the battery power and the battery charging state of the Internet of Things device; When the battery charging state is normal and the battery power is greater than or equal to the first power threshold, entering a normal mode; In the normal mode, according to the received mode instruction, the external interrupt wake-up source and the preset power threshold, the power consumption mode of the Internet of Things device is autonomously switched. 2.The method of claim 1, wherein, After detecting the battery power and the battery charging state of the Internet of Things device, the method further comprises the following steps: When the battery charging state is normal and the battery power is less than the first power threshold, detecting whether the battery power is zero and whether the battery voltage is less than or equal to the battery voltage threshold; When the battery power is zero and the battery voltage is less than or equal to the battery voltage threshold, entering the normal mode; When the battery power is not zero or the battery voltage is greater than the battery voltage threshold, turning off the system power supply and the communication module power supply of the Internet of Things device to enter a forced shutdown mode; after entering the forced shutdown mode, periodically detecting the battery power, and when the battery power is greater than or equal to the second power threshold, turning on the system power supply and the communication module power supply of the Internet of Things device. 3.The method of claim 1, wherein, According to the received mode instruction, the external interrupt wake-up source and the preset power threshold, the power consumption mode of the Internet of Things device is autonomously switched, which comprises the following steps: When the first mode instruction is received and the sensor flag bit is enabled, entering a first sub-power consumption working mode, and when the first mode instruction is received and the sensor flag bit is not enabled, entering a second sub-power consumption working mode; In the first sub-power consumption working mode, the system power supply, the communication module power supply and the sensor power supply of the Internet of Things device are turned on to enter a sleep mode, and only the communication module interrupt signal, the external interrupt signal and the sensor interrupt signal are responded; after the communication module interrupt signal, the external interrupt signal or the sensor interrupt signal is received, a main processing unit wake-up signal is outputted to wake up the main processing unit, and is reported to the corresponding external interrupt wake-up source; In the second sub-power consumption working mode, the system power supply and the communication module power supply of the Internet of Things device are turned on, and the sensor power supply is turned off to enter the sleep mode, and only the communication module interrupt signal and the external interrupt signal are responded; after the communication module interrupt signal or the external interrupt signal is received, the main processing unit wake-up signal is outputted to wake up the main processing unit, and is reported to the corresponding external interrupt wake-up source.

4. The power consumption control method of the IoT device according to any one of claims 1 to 3, characterized by, After entering the sleep mode or detecting the battery power and the battery charging state of the Internet of Things device, the method further comprises the following steps: Periodically performing charging state detection, and when the battery charging state is abnormal, autonomously pulling up the charging enable bit for a preset time length and then resetting.

5. The power consumption control method of an IoT device according to claim 4, wherein, According to the received mode instruction, the external interrupt wake-up source and the preset power threshold, the power consumption mode of the Internet of Things device is autonomously switched, which further comprises the following steps: When the second mode instruction is received and the sensor flag bit is enabled, entering a third sub-power consumption working mode, and when the second mode instruction is received and the sensor flag bit is not enabled, entering a fourth sub-power consumption working mode; In the third sub-power consumption working mode, the system power of the Internet of Things device is turned off, the sensor power and the communication module power are turned on, and the Internet of Things device enters a sleep mode, only responds to a communication module interrupt signal and a sensor interrupt signal, and performs periodic battery power detection; after receiving the communication module interrupt signal or the sensor interrupt signal, the system power of the Internet of Things device is turned on; when the battery power is less than the first power threshold, the system power, the sensor power and the communication module power of the Internet of Things device are turned off, and the Internet of Things device enters a forced shutdown mode; In the fourth sub-power consumption working mode, the system power and the sensor power of the Internet of Things device are turned off, and the communication module power is turned on, and the Internet of Things device enters a sleep mode, only responds to a communication module interrupt signal and periodically performs battery power detection; when the communication module interrupt signal is received or the battery power is greater than or equal to the fourth power threshold, the system power of the Internet of Things device is turned on to exit the fourth sub-power consumption working mode; when the battery power is less than the first power threshold, the system power, the sensor power and the communication module power of the Internet of Things device are turned off, and the Internet of Things device enters a forced shutdown mode, and after entering the forced shutdown mode, the battery power is periodically detected, and when the battery power is greater than or equal to the second power threshold, the system power and the communication module power of the Internet of Things device are turned on.

6. The power consumption control method of an IoT device according to claim 5, wherein, The method further comprises: After power-on, it is judged whether an entering fourth sub-power consumption working mode instruction sent by a main processing unit is received, wherein the fourth sub-power consumption working mode instruction is sent by the main processing unit after detecting that the battery power is less than a third power threshold; When the fourth sub-power consumption working mode instruction is received, the fourth sub-power consumption working mode is entered; When it is detected that the battery power is greater than or equal to the third power threshold, the fourth sub-power consumption working mode is exited.

7. The power consumption control method of an IoT device according to claim 6, wherein, The first power threshold, the second power threshold, the third power threshold and the fourth power threshold used before entering the normal mode after power-on are respectively less than the first power threshold, the second power threshold, the third power threshold and the fourth power threshold used after entering the normal mode.

8. An Internet of Things device, characterized by The processor executes the computer program to implement the power consumption control method of the Internet of Things device according to any one of claims 1-7.

9. A co-processing unit comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, The computer program is executed by the processor to implement the power consumption control method of the Internet of Things device according to any one of claims 1-7.

10. A computer-readable storage medium storing a computer program, the computer program comprising instructions that, when executed by a computer, cause the computer to perform the method of any one of claims 1 to 9. The computer program is executed by the processor to implement the power consumption control method of the Internet of Things device according to any one of claims 1-7.