Power consumption control method and apparatus, sensor device, and computer-readable storage medium

By reducing sensitivity or stopping power supply before the sensor enters deep sleep mode, the problem of high power consumption of sensor devices in deep sleep mode is solved, thus extending the lifespan of sensor devices.

CN115407683BActive Publication Date: 2025-10-24SHENZHEN LUMIUNITED TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202110594287.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-05-28
Publication Date
2025-10-24
Estimated Expiration
2041-05-28

AI Technical Summary

Technical Problem

Sensor devices consume higher power in deep sleep mode, which shortens their lifespan.

Method used

Before the sensor enters deep sleep mode, reduce the sensor's sensitivity or stop supplying power to the sensor to reduce the probability of the sensor being triggered and power consumption.

Benefits of technology

By reducing the sensor's sensitivity or cutting off power, the current draw caused by the sensor being triggered can be reduced, thus extending the lifespan of the sensor device.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115407683B_ABST
    Figure CN115407683B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a power consumption control method and device, a sensor device and a computer readable storage medium, relating to the technical field of computer. The method comprises: in the case of needing to switch modes, determining whether the mode to be entered is a deep sleep mode; in the case of the mode to be entered being the deep sleep mode, adjusting the sensitivity of a sensor in the sensor device to be lower. Thus, by reducing the sensitivity of the sensor, the probability of the sensor being triggered is reduced, and the power consumption caused by the sensor being triggered is reduced, thereby increasing the service life of the sensor device.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computer, in particular to a power consumption control method and device, a sensor device and a computer readable storage medium. BACKGROUND

[0002] Sensor devices are used in smart home industry and other industries. For example, door and window sensors are used in smart home industry to detect whether doors, windows, drawers, etc. are illegally opened or moved. In some cases where sensor devices do not need to work (such as during warehouse storage or transportation process), the sensor devices will enter deep sleep mode to save power consumption. However, the power consumption of the sensor device is still relatively high when it is in deep sleep mode, which shortens the service life of the sensor device. SUMMARY

[0003] The embodiments of the present application provide a power consumption control method, device, sensor device and computer readable storage medium, which can reduce the probability of triggering the sensor by adjusting the sensitivity of the sensor before entering deep sleep mode, thereby reducing the power consumption caused by triggering the sensor and increasing the service life of the sensor device.

[0004] The embodiments of the present application can be implemented as follows:

[0005] In a first aspect, the embodiments of the present application provide a power consumption control method applied to a sensor device, and the method comprises:

[0006] In the case of needing to switch modes, determining whether the mode to be entered is a deep sleep mode;

[0007] In the case of the mode to be entered being the deep sleep mode, adjusting the sensitivity of a sensor in the sensor device.

[0008] In a second aspect, the embodiments of the present application provide a power consumption control method applied to a control unit in a sensor device, wherein the sensor device further comprises a sensor, a switch and a power supply unit, the power supply unit is electrically connected with the sensor through the switch, the power supply unit is electrically connected with the control unit, and the control unit is electrically connected with the switch, and the method comprises:

[0009] In the case of needing to switch modes, determining whether the mode to be entered is a deep sleep mode;

[0010] In the case of the mode to be entered being the deep sleep mode, controlling the switch state of the switch to stop the power supply unit from supplying power to the sensor.

[0011] In a third aspect, an embodiment of the present application provides a power consumption control apparatus applied to a sensor device, the apparatus comprising:

[0012] a determination module configured to determine whether the upcoming mode is a deep sleep mode in the case of needing to switch modes;

[0013] a control module configured to lower the sensitivity of a sensor in the sensor device in the case of the upcoming mode being the deep sleep mode.

[0014] In a fourth aspect, an embodiment of the present application provides a power consumption control apparatus applied to a control unit in a sensor device, the sensor device further comprising a sensor, a switch and a power supply unit, the power supply unit being electrically connected with the sensor through the switch, the power supply unit being electrically connected with the control unit, the control unit being electrically connected with the switch, the apparatus comprising:

[0015] a determination module configured to determine whether the upcoming mode is a deep sleep mode in the case of needing to switch modes;

[0016] a control module configured to stop the power supply unit from supplying power to the sensor by controlling the switch state of the switch in the case of the upcoming mode being the deep sleep mode.

[0017] In a fifth aspect, an embodiment of the present application provides a sensor device, the sensor device comprising a sensor and a control unit, the control unit comprising a processor and a memory, the sensor being configured to obtain detection data, the memory storing machine executable instructions capable of being executed by the processor, and the processor being capable of executing the machine executable instructions to implement the power consumption control method according to any one of the preceding embodiments.

[0018] In a sixth aspect, an embodiment of the present application provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the power consumption control method according to any one of the preceding embodiments.

[0019] The power consumption control method, apparatus, sensor device and computer readable storage medium provided by the embodiments of the present application can lower the sensitivity of a sensor in a sensor device in the case of needing to switch modes and the upcoming mode being a deep sleep mode, so as to reduce the probability of the sensor being triggered, thereby reducing the power consumption caused by the sensor being triggered and increasing the service life of the sensor device, and meanwhile, the circuit of the sensor device does not need to be modified. BRIEF DESCRIPTION OF DRAWINGS

[0020] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the embodiments will be briefly introduced as follows. It should be understood that the following drawings only show some of the embodiments of the present application, and therefore should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can also be obtained without creative labor on the basis of these drawings.

[0021] Figure 1 is a structural schematic diagram of an existing sensor device;

[0022] Figure 2 is a schematic diagram of an application environment suitable for the embodiments of the present application;

[0023] Figure 3 is one of the flow schematic diagrams of the power consumption control method provided by the embodiments of the present application;

[0024] Figure 4 is another of the flow schematic diagrams of the power consumption control method provided by the embodiments of the present application;

[0025] Figure 5 is a working mode conversion diagram provided by the embodiments of the present application;

[0026] Figure 6 is one of the block schematic diagrams of the sensor device provided by the embodiments of the present application;

[0027] Figure 7 is a third of the flow schematic diagrams of the power consumption control method provided by the embodiments of the present application;

[0028] Figure 8 is a block schematic diagram of the power consumption control device provided by the embodiments of the present application;

[0029] Figure 9 is a second of the block schematic diagrams of the sensor device provided by the embodiments of the present application;

[0030] Figure 10 is a third of the block schematic diagrams of the sensor device provided by the embodiments of the present application.

[0031] Figure: 10 - smart home system; 100 - gateway device; 200 - sensor device; 210 - sensor; 220 - processor; 230 - memory; 240 - power supply unit; 250 - key; 260 - alarm unit; 270 - antenna; 280 - switch; 300 - server; 400 - user terminal; 500 - router; 600 - power consumption control device; 610 - determination module; 620 - control module. DETAILED DESCRIPTION

[0032] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions of the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings herein can be arranged and designed in various different configurations.

[0033] Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the present application for protection, but merely represents selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making any creative efforts shall fall within the scope of protection of the present application.

[0034] It should be noted that relational terms such as "first" and "second" are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus comprising the element.

[0035] At present, when the sensor device is in deep sleep mode, the power consumption is still relatively high. Figure 1 Give specific descriptions of it.

[0036] The sensor device includes a sensor, a battery, and an MCU (Microcontroller Unit). The battery is electrically connected to the sensor and the MCU, respectively, to provide power to the MCU and the sensor. Currently, the MCU does not adjust the sensitivity of the sensor before entering deep sleep mode. That is, the sensitivity of the sensor does not change before and after the MCU enters deep sleep mode. Figure 1 As shown, the sensor includes port 1, i.e., pin 1; the MCU includes port 2, i.e., chip pin 2; the sensor and the MCU are connected through pin 1 and pin 2.

[0037] When the MCU is in deep sleep mode, the MCU cannot control its chip pin 2, and the chip pin 2 connected with the sensor is at high level. When the sensor is not triggered, the pin 1 connected with the MCU is at high level; when the sensor is triggered, the pin 1 connected with the MCU is at low level. As can be seen, in the case that the sensor is triggered, the pin 1 of the sensor is at low level, the pin 2 of the MCU is at high level, the pin 1 and the pin 2 are connected, and in this case, the current flowing from the MCU to the sensor as shown in Figure 1 , that is, at this time, the battery and the MCU directly supply power to the sensor, thereby causing the power consumption of the sensor device in deep sleep mode to increase.

[0038] For example, a door and window sensor includes a Hall sensor, a magnet and a JN5189 as an MCU. The IO (Input / Output) port of the JN5189 connected with the Hall sensor is in a default state in deep sleep mode, and the high and low levels of the IO port cannot be controlled, where the default state is high level.

[0039] When the Hall sensor detects that the magnet is close, the ALERT pin of the Hall sensor jumps to low level, the IO port of the JN5189 connected with the ALERT pin of the Hall sensor is at high level in deep sleep mode, a voltage difference is generated, which causes a current flowing from the JN5189 to the Hall sensor when the door and window sensor is in deep sleep mode, so that the power consumption increases and the service life of the door and window sensor is reduced.

[0040] Other sensor devices, such as a radar module and a natural gas sensor, may also encounter similar problems.

[0041] The above-mentioned defects are the results of the inventors after practice and careful research, and therefore, the discovery process of the above-mentioned problems and the solutions proposed by the embodiments of the present application to the above-mentioned problems should be the contributions of the inventors to the present application.

[0042] In view of the above-mentioned problems, the embodiments of the present application provide a power consumption control method and device, a sensor device and a computer readable storage medium. By reducing the probability of triggering the sensor, the power consumption caused by triggering the sensor is reduced, that is, the current flowing to the sensor caused by triggering the sensor is reduced, and the service life of the sensor device is increased.

[0043] The above-mentioned door and window sensor is taken as an example to briefly describe the present application.

[0044] The ALERT pin of the Hall sensor outputs a low level when a magnet is detected to be close, and outputs a high level when a magnet is detected to be far away. In the case of using the present solution, the sensitivity of the Hall sensor is reduced before the MCU enters the deep sleep mode. After the sensitivity of the Hall sensor is reduced, the probability of the Hall sensor detecting a magnet is reduced, that is, even if a magnet is close to the Hall sensor, the Hall sensor is probably still unable to detect the magnet. When the Hall sensor does not detect a magnet, the ALERT pin of the Hall sensor outputs a high level. That is, the above-mentioned manner can make the ALERT pin of the Hall sensor be a high level with a high probability. Since the ALERT pin is a high level and the IO port connected to the Hall sensor of the MCU is a high level, there is no voltage difference between the two, so no Figure 1 current from the MCU pin flows into the ALERT pin of the Hall sensor. Therefore, the current generated by the MCU pin can be avoided from flowing into the ALERT pin of the Hall sensor, thereby reducing power consumption.

[0045] Next, an application environment related to the present application will be introduced.

[0046] Please refer to Figure 2 , Figure 2 is a schematic diagram of an application environment suitable for the embodiments of the present application. Among them, Figure 2 An intelligent home system 10 is provided, which can include a gateway device 100, a sub-device connected to the gateway device 100, and a server 300 connected to the gateway device 100. Among them, the number of gateway devices 100 can be at least one, and the number of intelligent home devices as sub-devices can be at least one. In addition, when the number of gateway devices 100 is multiple, different gateway devices 100 can also be connected in communication.

[0047] In the embodiments of the present application, the gateway device 100 can be an intelligent gateway for intelligent home control, and can realize functions such as system information collection, information input, information output, centralized control, remote control, and linkage control. The gateway device can be responsible for specific security alarm, home appliance control, and power consumption information collection. The gateway device 100 can also perform information interaction with intelligent interaction terminals and other products through a wireless manner. The gateway device 100 also has a wireless routing function, excellent wireless performance, network security, and coverage area.

[0048] In the embodiments of the present application, the sub-devices can include various smart home devices, sensor devices 200, detection devices, etc. set in the indoor space, such as a smart television, a smart refrigerator, a smart air conditioner, a temperature and humidity sensor, a pressure sensor, a smoke sensor, a human body sensor, a door and window sensor, a smart switch, a socket, a lamp, an infrared emitter, a camera device, etc. The sub-devices connected with the gateway device 100 can interact with the gateway device 100 in information and instructions. The gateway device 100 and the sub-devices can be connected through Bluetooth, WiFi (Wireless-Fidelity), ZigBee (ZigBee Technology), etc. communication mode, of course, the connection mode of the gateway device 100 and the sub-devices can not be limited in the embodiments of the present application.

[0049] In the embodiments of the present application, the server 300 can be a local server, a cloud server, etc. The specific server type can not be limited in the embodiments of the present application. The server 300 connected with the gateway device 100 can interact with the gateway device 100 in information through a wireless manner. The gateway devices 100 set in different indoor spaces can be connected with the same server 300 through a network to interact in information between the server 300 and the gateway devices 100.

[0050] Further, the above-mentioned smart home system 10 can further include a user terminal 400. The user terminal 400 can include a personal computer (PC), a tablet computer, a smart phone, a personal digital assistant (PDA), etc. and is not limited herein. The user terminal 400 can interact with the server 300 in information through a 2G / 3G / 4G / 5G / WiFi, etc. wireless manner. Of course, the connection mode between the user terminal 400 and the server 300 can not be limited in the embodiments of the present application. In some embodiments, the user terminal 400 can also be used to interact with the user, so that the user can communicate wirelessly with the gateway device 100 based on the router 500 through the user terminal 400. In addition, the user can add an account information to the gateway device 100 and the user terminal 400 at the same time, and realize information synchronization of the gateway device 100 and the user terminal 400 through the account information.

[0051] In some embodiments, the user can set different trigger scenarios or automation linkages through an application (APP) of the user terminal 400. As one way, the user terminal 400 can upload scenario configuration information or an automation scheme to the server 300, so that when the trigger condition of the trigger scenario or automation is reached, the server 300 can find the device corresponding to the execution action in the scenario configuration information or automation scheme according to the stored scenario configuration information or automation scheme, to notify the device to perform the execution action to meet the execution result of the trigger scenario or automation. As another way, the server 300 can also send the scenario configuration information or automation scheme to the gateway device 100, and the gateway device 100 can find the device corresponding to the execution action in the scenario configuration information or automation scheme according to the stored scenario configuration information or automation scheme. At the same time, the gateway device 100 can feed back the execution of the device to the server 300.

[0052] Wherein, the trigger device for determining that the trigger condition of the trigger scenario or automation is reached can be, but is not limited to, a sensor device 200. The sensor device 200 can be a pressure sensor, a temperature sensor, a humidity sensor, a door and window sensor, or a smoke sensor, etc. The controlled device for performing the action can be various switches, sockets, electric lamps, infrared emitting devices, or camera devices, etc. The trigger device and the controlled device can be the same device.

[0053] For example, when the user sets the automation scheme of "door and window opening automatically turning on the light" through the APP of the user terminal 400, the trigger condition of the automation scheme is "door and window opening", and the execution action is "controlling the bulb to turn on by the smart switch". At this time, based on this automation scheme, the trigger device is the door and window sensor, and the execution device is the smart switch connected with the bulb. Wherein, the automation scheme can be stored in the gateway device 100, or stored in the server 300, and the path for executing the automation linkage can be through the local area network, or through the wide area network.

[0054] If the automation is executed locally in the gateway device 100 through the local area network path, the door and window sensor senses that the door and window is opened, and reports the information event of the door and window opening to the gateway device 100. After receiving the information event, the gateway device 100 can find the device corresponding to the execution action in the automation scheme according to the stored automation scheme, which is the smart switch in this example, and notify the smart switch to control the light to turn on, so as to realize the automation linkage of "door and window opening automatically turning on the light".

[0055] If the server 300 performs the automation through the wide area network path, the door and window sensor senses that the door and window is opened, reports the information event of the door and window being opened to the gateway device 100, the gateway device 100 reports the event to the server 300 after receiving the event, the server 300 finds the device corresponding to the execution action in the automation scheme according to the stored automation scheme, and in this example, the smart switch, and notifies the smart switch to control the light to be turned on through the gateway device 100, so as to realize the automation linkage of the door and window being opened and the light being turned on automatically.

[0056] Further, after the light is turned on, the execution result of the light being turned on successfully can be fed back to the gateway device 100, the gateway device 100 receives the information, and can report the current time, the identifier (ID) of the automation scheme and the execution result of the automation scheme to the server 300 for storage. The ID can be a symbol for uniquely identifying the automation scheme, and can be a number, a character or the like, which is not limited herein.

[0057] The embodiments of the present application will be described in detail below with reference to the accompanying drawings.

[0058] Please refer to Figure 3 , Figure 3 is one of flowcharts of the power consumption control method provided by the embodiments of the present application. The power consumption control method can be applied to the sensor device 200 described above. The specific flow of the power consumption control method will be described in detail below. The power consumption control method can include steps S110-S120.

[0059] In step S110, it is determined whether the mode to be entered is the deep sleep mode in the case of needing to switch the mode.

[0060] In the case of the mode to be entered being the deep sleep mode, step S120 is executed.

[0061] In step S120, the sensitivity of the sensor in the sensor device is adjusted to be low.

[0062] In this embodiment, in the case of receiving the mode switching instruction input by the user or the automatically generated mode switching instruction, it can be determined that the mode needs to be switched, and the mode after the switching is determined, that is, the mode to be entered is determined. Before the mode switching is performed, it can be determined whether the mode to be entered is the deep sleep mode.

[0063] When the sensor device 200 is in the deep sleep mode, the sensor device 200 is in an un-networked state, and the main clock, the RAM (random access memory), the RTC clock (Real-Time Clock) and the peripheral devices in the control unit of the sensor device 200 are in a stop working state. The control unit is in a deep sleep state (DeepSleep). Only the button IO can wake it up. At this time, the control unit cannot control the level state of the chip pins connected with the sensor. The sensor device 200 can be in the deep sleep mode from the time after the factory packaging to the time before the user starts the device, or in the case that the user has used it but continuously fails to detect network information, etc.

[0064] In the case that it is determined that the mode to be entered is the deep sleep mode, the sensitivity of the sensor in the sensor device 200 can be reduced in any manner. The sensor is used to obtain detection data and determine whether to trigger based on the detection data.

[0065] In the case that the sensitivity of the sensor is reduced, the probability of the sensor being triggered is reduced. The triggering of the sensor causes a current to flow from the control unit of the sensor device 200 to the sensor, and thus this manner can reduce the current flowing from the control unit of the sensor device 200 to the sensor, thereby achieving the purposes of reducing power consumption and increasing the service life of the sensor device 200.

[0066] The sensor stores a trigger threshold value, and when the detection data meets the requirement of the trigger threshold value, it is determined to be triggered. For example, the Hall sensor of the door / window sensor stores a trigger threshold value about the magnetic field strength, and when the magnetic field strength detected by the Hall sensor of the door / window sensor is greater than the trigger threshold value, it is determined to be triggered.

[0067] Optionally, as an optional embodiment, the sensor device 200 can store a first trigger threshold value corresponding to the deep sleep mode, and when it is determined that the deep sleep mode is to be entered, the first trigger threshold value can be set as the trigger threshold value used by the sensor. The first trigger threshold value can be a value set according to the requirement that the sensor will not be triggered. For example, a value that the magnetic field strength detected by the Hall sensor is less than can be set as the first trigger threshold value.

[0068] Generally, the sensor device 200 supports multiple gears of sensitivity. As another optional embodiment, the trigger threshold value used by the sensor can be set as a first trigger threshold value, and the first trigger threshold value is a trigger threshold value corresponding to a sensitivity lower than the current sensitivity among the sensitivities supported by the sensor device 200. In this way, the power consumption can be reduced, and at the same time, it is convenient to set.

[0069] For example, the sensor device 200 supports four sensitivity levels, i.e., high, medium, low and minimum. If the sensor in the sensor device 200 currently uses a trigger threshold corresponding to the medium sensitivity level, the trigger threshold used by the sensor can be set to a trigger threshold corresponding to the low or minimum sensitivity level.

[0070] Alternatively, in the above embodiment, the first trigger threshold used can be a trigger threshold corresponding to the minimum sensitivity level supported by the sensor device 200. In the above example, the trigger threshold used by the sensor is set to a trigger threshold corresponding to the minimum sensitivity level. In this way, the probability of the sensor being triggered can be minimized within the adjustable range.

[0071] Alternatively, the determined first trigger threshold can be written into a register of the sensor, so as to set the trigger threshold used by the sensor to the first trigger threshold. The sensor compares the detection data with the current trigger threshold in the register, so as to determine whether to be triggered.

[0072] Please refer to Figure 4 , Figure 4 is a flowchart of the power consumption control method provided in the embodiments of the present application. In the case where it is determined that the mode to be entered is not the deep sleep mode, the method can further include step S130.

[0073] In step S130, the sensitivity of the sensor is set according to preset normal sensitivity setting information.

[0074] In the embodiment, the preset normal sensitivity setting information can be generated according to the selection of a user in the sensitivity levels provided by the sensor device 200. For example, if the user manually selects to use the high sensitivity, the preset normal sensitivity setting information is information corresponding to the setting of the high sensitivity, e.g., including a trigger threshold corresponding to the high sensitivity. The preset normal sensitivity setting information can also be default information. For example, in the case where the user does not separately select in the sensitivity levels provided by the sensor device 200, the default information is used. The default information can be information for setting the medium sensitivity, e.g., including a trigger threshold corresponding to the medium sensitivity. The sensitivity corresponding to the preset normal sensitivity setting information is greater than the sensitivity after the adjustment in step S120.

[0075] In a case where it is determined that the incoming mode is not the deep sleep mode, the sensitivity of the sensor can be set according to the preset normal sensitivity setting information. Optionally, the trigger threshold corresponding to the preset normal sensitivity setting information can be taken as a second trigger threshold, and the trigger threshold used by the sensor can be set as the second trigger threshold. That is, the second trigger threshold corresponding to the preset normal sensitivity setting information is set as the trigger threshold used by the sensor in a case where the incoming mode is not the deep sleep mode. In a case where the sensitivity and the trigger threshold are inversely related, that is, in a case where the sensitivity becomes lower as the trigger threshold becomes larger, the second trigger threshold is smaller than the first trigger threshold; in a case where the sensitivity and the trigger threshold are positively related, that is, in a case where the sensitivity becomes larger as the trigger threshold becomes larger, the second trigger threshold is larger than the first trigger threshold.

[0076] Optionally, the second trigger threshold can be written into a register of the sensor, so as to complete the sensitivity setting of the sensor. Of course, it can be understood that, if the current sensitivity of the sensor is already the sensitivity corresponding to the preset normal sensitivity setting information, the sensitivity setting operation can not be repeated.

[0077] Please refer to Figure 5 , Figure 5 is a working mode conversion diagram provided by an embodiment of the present application. The sensor device 200 can include a control unit, and the control unit can include an MCU. The following takes the MCU included in the sensor device 200 as an example to briefly describe the mode switching. The working modes supported by the sensor device 200 include: an un-networked mode (i.e., a deep sleep mode), a newly-networked mode, a normal working mode, and a sub-health mode.

[0078] When the MCU of the sensor device 200 is in the deep sleep, it can be woken up through a key IO. After being woken up, the sensor device 200 enters the newly-networked mode.

[0079] In the newly-networked mode, the MCU of the sensor device 200 enters the normal working mode. The sensor device 200 performs the interaction of wireless messages, and performs operations such as joining a wireless network, performing corresponding factory tests, and performing binding between devices.

[0080] In the normal working mode, the MCU of the sensor device 200 re-enters the sleep mode of RAM retention + RTC wake-up. Among them, the RAM retention means that some cache information in the RAM will not be lost; the RTC wake-up means that the MCU can wake up by itself at a regular time. The sensor device 200 performs normal wireless interaction messages and periodically reports its heart rate information. When the sensor device 200 is in an environment with poor network signal or no network signal, the sensor device 200 performs wireless network detection in an exponential backoff manner; when the cumulative number of attempts fails to a certain number, the sensor device 200 enters the sub-health working mode.

[0081] In the sub-health mode, the MCU of the sensor device 200 enters the sleep mode of RTC wake-up. The sensor device 200 periodically wakes up to detect the wireless network; if the network information is detected, it re-enters the normal working mode; otherwise, it enters the deep sleep mode after accumulating a certain number of failures.

[0082] In the initialization of entering the deep sleep mode, the sensitivity of the sensor in the sensor device 200 can be adjusted to be low; in the initialization of entering the new network mode, the normal working mode and the sub-health mode, the sensitivity of the sensor in the sensor device 200 can be configured to be normal, that is, set to the normal trigger threshold state.

[0083] The above method will be described below taking the door and window sensor as an example.

[0084] The door and window sensor includes a magnetic sensor, a magnet, and an MCU. The door and window sensor supports three different sensitivity levels of high, medium and low. Different sensitivities are reflected in the detection distance, that is, the higher the gear, the farther the distance between the magnetic sensor and the magnet can be sensed. In the deep sleep mode, the method adopted to solve the problem of electric leakage is to configure the sensitivity to be very low before the door and window sensor sleeps.

[0085] The magnetic sensor is selected as Si7210, the communication mode is I2C, and the working mode of the magnetic sensor is completed by consulting the chip manual to configure the corresponding register. The sensitivity can be adjusted by configuring the first 7 bits of the 8-bit register SW_OP. Among them, the first 7 bits are used to store the trigger threshold value used by the magnetic sensor. The trigger threshold value can be calculated according to (16+sw_op[3:0])*2^sw_op[6:4]*range value. For example, sw_op[3:0]=14, sw_op[6:4]=7, threshold=(16+14)*128=3840, 3840*0.005=192MT, and the final threshold is 192mT, that is, the first trigger threshold is 192mT. Therefore, even if the magnet is close to the magnetic sensor, the magnetic sensor cannot detect the magnet.

[0086] Assuming that the magnetic sensor detects the magnetic field strength around it every 200 ms (default) in the working state. When the detected magnetic field strength is greater than the set trigger threshold, the ALERT pin on the magnetic sensor outputs a low level. In this scheme, the trigger threshold in the register is set very high so that it cannot be triggered. This makes the ALERT pin on the magnetic sensor output a high level, thereby reducing the probability of the ALERT pin on the magnetic sensor outputting a low level. In this way, the current generated by the MCU pin can be prevented from flowing into the ALERT pin of the magnetic sensor, thereby reducing power consumption.

[0087] Optionally, the above steps can be performed by the control unit in the sensor device 200. In this way, without updating the circuit of the sensor device 200, the purpose of reducing power consumption and increasing service life can be achieved.

[0088] Please refer to Figure 6 and Figure 7 , another power consumption control method will be described below. This power consumption control method can be applied to the control unit in the sensor device 200. The sensor device 200 can also include a sensor 210, a switch 280, and a power supply unit 240. The power supply unit 240 is electrically connected to the sensor 210 through the switch 280, the power supply unit 240 is electrically connected to the control unit, and the control unit is electrically connected to the switch 280. The power supply unit 240 can include a battery, and the switch 280 can include a MOS (Metal Oxide Semiconductor) tube. The method can include steps S210 and S220.

[0089] Step S210, in the case of needing to switch modes, determine whether the mode to be entered is a deep sleep mode.

[0090] In the case where the mode to be entered is a deep sleep mode, step S220 is performed.

[0091] Step S220, by controlling the switch state of the switch 280, the power supply unit 240 stops supplying power to the sensor 210.

[0092] In the case where the mode to be entered is a deep sleep mode, the switch 280 can be controlled to be in an open state, thereby disconnecting the current path between the power supply unit 240 and the sensor 210, so that the power supply unit 240 stops supplying power to the sensor 210. In this way, in the deep sleep mode, the sensor 210 will not be triggered, thereby avoiding the current flowing from the control unit to the sensor 210 due to the sensor 210 being triggered, thereby reducing power consumption.

[0093] In the case that the mode to be entered is not the deep sleep mode, the switch 280 can be controlled to be in the closed state, so that the circuit path between the power supply unit 240 and the sensor 210 is in the connected state, and the power supply unit 240 supplies power to the sensor 210. Thus, the sensor device 200 can be normally detected in the non-deep sleep mode. In this mode, the trigger threshold of the sensor device 200 does not need to be modified.

[0094] Optionally, as a possible implementation, a battery blocking piece can also be provided. In the case that the sensor device 200 needs to enter the deep sleep mode, the battery blocking piece is arranged at the power supply unit of the sensor device 200, so that the sensor in the sensor device 200 is in the power-off state. For example, during the assembly process in the factory, the battery blocking piece is added when the battery is powered on, so that the battery is isolated from the battery blocking piece, and the entire sensor device 200 is in a power-off state, thereby reducing the power consumption of the sensor device 200.

[0095] In order to perform the corresponding steps in the above embodiments and various possible modes, an implementation of a power consumption control apparatus 600 is given below. Please refer to Figure 8 , Figure 8 is a block schematic diagram of the power consumption control apparatus 600 provided by the embodiments of the present application. It should be noted that the power consumption control apparatus 600 provided by the embodiments has the same basic principles and technical effects as the above embodiments, and for brief description, the part not mentioned in the embodiments can refer to the corresponding content in the above embodiments.

[0096] In an implementation, the power consumption control apparatus 600 can be applied to the sensor device 200. The power consumption control apparatus 600 can include a determination module 610 and a control module 620. The determination module 610 is configured to determine whether the mode to be entered is the deep sleep mode in the case that the mode needs to be switched.

[0097] In another implementation, the power consumption control apparatus 600 can be applied to the control unit in the sensor device 200. The sensor device 200 further includes a sensor 210, a switch 280 and a power supply unit 240. The power supply unit 240 is electrically connected to the sensor 210 through the switch 280, the power supply unit 240 is electrically connected to the control unit, and the control unit is electrically connected to the switch 280.

[0098] In this embodiment, the determining module 610 is configured to determine whether the upcoming mode is the deep sleep mode in the case that the switching mode is needed. The control module 620 is configured to control the switching state of the switch 280 so that the power supply unit 240 stops supplying power to the sensor 210 in the case that the upcoming mode is the deep sleep mode.

[0099] Please refer to Figure 9 , Figure 9 is a block schematic diagram of the sensor device 200 provided by the embodiments of the present application. The embodiments of the present application further provide a sensor device 200. As shown in Figure 9 , the sensor device 200 can include a sensor 210, a control unit, and one or more application programs. The specific type of the sensor 210 can be determined according to the use or type of the sensor device 200, for example, if the sensor device 200 is a door / window sensor, the sensor 210 can be a Hall sensor. The control unit can include one or more of the following components: a memory 230 and a processor 220. One or more application programs can be stored in the memory 230 and configured to be executed by one or more processors 220, and the one or more application programs are configured to perform the power consumption control method as described in the foregoing method embodiments.

[0100] The processor 220 can include one or more processing cores. The processor 220 connects various parts within the sensor device 200 by running or executing instructions, programs, code sets or instruction sets stored in the memory 230, and calling data stored in the memory 230, to perform various functions and process data of the sensor device 200. Optionally, the processor 220 can be implemented in at least one of a hardware form of a digital signal processing (DSP), a field-programmable gate array (FPGA), a programmable logic array (PLA). The processor 220 can also be implemented by an MCU. The processor 220 can be integrated with a combination of one or more of a central processing unit (CPU), a graphics processing unit (GPU), and a modem. Among them, the CPU is mainly used to process operating systems, user interfaces, and application programs; the GPU is used to render and draw display content; and the modem is used to process wireless communication. It can be understood that the above-mentioned modem can also not be integrated into the processor 220, but be implemented by a separate communication chip. The memory 230 can include a random access memory (RAM), and can also include a read-only memory (ROM), and can also include a flash memory. The memory 230 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 230 can include a program storage area and a data storage area, wherein the program storage area can store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing the above-mentioned various method embodiments, etc. The data storage area can also store data created by the sensor device 200 in use, etc. Those skilled in the art can understand that Figure 9 The structure shown is only schematic, which does not limit the structure of the above-mentioned sensor device 200. For example, the sensor device 200 can also include more or fewer components than those shown in Figure 9 , or have a different configuration from Figure 9 .

[0101] Optionally, please refer to Figure 10 , Figure 10This is the third block diagram of the sensor device 200 provided in an embodiment of the present application. In one implementation of this embodiment, the sensor device 200 may further include a power supply unit 240. The power supply unit 240 is configured to supply power to the sensor device 200. The power supply unit 240 may be directly electrically connected to the processor 220 and the sensor 210.

[0102] Optionally, the sensor device 200 may further include a button 250. The button 250 may be used to wake up the processor in the deep sleep mode under a user's operation.

[0103] Optionally, the sensor device 200 may further include an alarm unit 260. Upon determining that the sensor 210 is triggered, the processor 220 may control the alarm unit 260 to sound an alarm to provide a user with a prompt. The alarm unit 260 may be, but is not limited to, an LED light and / or a buzzer, and may provide a prompt by emitting corresponding light and / or sound.

[0104] Optionally, the sensor device 200 may further include an antenna 270 , and the sensor device 200 may communicate data with other electronic devices (eg, user terminal 400 ) via the antenna 270 . In this embodiment, the processor 220 may be configured to adjust the sensitivity of the sensor 210 .

[0105] For example, the sensor device 200 is a door / window sensor. The door / window sensor includes a magnet, a sensor, an MCU, an LED light, and an antenna. When the distance between the magnet and the sensor exceeds a certain threshold, the sensor detects that the door / window is open and reports the corresponding status to the MCU. The MCU then issues a corresponding instruction to cause the LED light to illuminate. Simultaneously, the MCU sends a signal to the user terminal 400 via the antenna, allowing the user to view the current door / window open / close status.

[0106] Alternatively, in another implementation of this embodiment, as Figure 6 As shown, the sensor device 200 is Figure 9 Based on the above, the system may further include a switch 280 and a power supply unit 240. The power supply unit 240 is electrically connected to the sensor 210 via the switch 280; the power supply unit 240 is electrically connected to the processor 220 to provide power to the processor 220. The processor 220 is electrically connected to the switch 280 and the sensor 210. When the mode to be entered is deep sleep mode, the processor 220 is configured to control the switch state of the switch 280 so that the power supply unit 240 stops supplying power to the sensor 210.

[0107] Optionally, in the embodiment, the sensor device 200 can also include a button, an alarm unit, an antenna, etc. Details are not repeated here.

[0108] The application also provides a readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the power consumption control method.

[0109] In conclusion, the embodiment of the application provides a power consumption control method, device, sensor device and computer readable storage medium. In the case that the mode needs to be switched and the mode to be entered is a deep sleep mode, the sensitivity of the sensor in the sensor device is adjusted to be low, so as to reduce the probability of the sensor being triggered, thereby reducing the power consumption caused by the sensor being triggered and increasing the service life of the sensor device, without the need of modifying the circuit of the sensor device.

[0110] In several embodiments provided in the present application, it should be understood that the disclosed apparatus and method can also be implemented by other means. The apparatus embodiment described above is only schematic, for example, the flowchart and block diagram in the drawings show the possible implementation architecture, function and operation of the apparatus, method and computer program product according to the embodiments of the present application. In this regard, each block in the flowchart or block diagram can represent a module, a program segment or a part of code, which contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions noted in the blocks can occur in a different order than that noted in the drawings. For example, two consecutive blocks can actually be executed substantially in parallel, and sometimes they can be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and the combination of blocks in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system, or by a combination of dedicated hardware and computer instructions.

[0111] In addition, each functional module in the embodiments of the present application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.

[0112] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application essentially or the parts of the prior art that make contributions or parts of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various media that can store program codes.

[0113] The above only describes the preferred embodiments of the present application and is not intended to limit the present application. For those skilled in the art, the present application can have various modifications and changes. Any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.

Claims

1. A power consumption control method characterized by comprising: The method is applied to a sensor device, and the method comprises: In a case where mode switching is required, determining whether an upcoming mode is a deep sleep mode; In a case where the upcoming mode is the deep sleep mode, setting a trigger threshold used by the sensor to be a first trigger threshold, the first trigger threshold being a trigger threshold corresponding to a sensitivity lower than a current sensitivity among sensitivities supported by the sensor device, so as to lower the sensitivity of a sensor in the sensor device.

2. The method of claim 1, wherein, The first trigger threshold is a trigger threshold corresponding to a lowest sensitivity among the sensitivities supported by the sensor device.

3. The method according to any one of claims 1-2, characterized in that, The setting of the trigger threshold used by the sensor to be the first trigger threshold comprises: writing the first trigger threshold into a register of the sensor.

4. The method according to any one of claims 1-2, characterized in that, The method further comprises: In a case where the upcoming mode is not the deep sleep mode, setting the sensitivity of the sensor according to preset normal sensitivity setting information, wherein the sensitivity corresponding to the preset normal sensitivity setting information is greater than the lowered sensitivity.

5. The method of claim 4, wherein, The setting of the sensitivity of the sensor according to the preset normal sensitivity setting information comprises: setting the trigger threshold used by the sensor to be a second trigger threshold corresponding to the preset normal sensitivity setting information, wherein in a case where the sensitivity is inversely related to the trigger threshold, the second trigger threshold is less than the first trigger threshold; and in a case where the sensitivity is positively related to the trigger threshold, the second trigger threshold is greater than the first trigger threshold.

6. A power consumption control device, characterized by comprising: The apparatus is applied to a sensor device, and the apparatus comprises: a determination module configured to, in a case where mode switching is required, determine whether an upcoming mode is a deep sleep mode; a control module configured to, in a case where the upcoming mode is the deep sleep mode, set a trigger threshold used by the sensor to be a first trigger threshold, the first trigger threshold being a trigger threshold corresponding to a sensitivity lower than a current sensitivity among sensitivities supported by the sensor device, so as to lower the sensitivity of a sensor in the sensor device.

7. A sensor device, characterized by The sensor device comprises a sensor and a control unit, the control unit comprising a processor and a memory, the sensor being configured to obtain detection data, the memory storing machine executable instructions capable of being executed by the processor, and the processor being capable of executing the machine executable instructions to implement the power consumption control method according to any one of claims 1-5.

8. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program, when executed by a processor, implements the power consumption control method according to any one of claims 1-5.

Citation Information

Patent Citations

  • Sensor control method and device, storage medium and electronic equipment

    CN110989822A