CN114528026B - Equipment sleep method and device and electronic equipment - Google Patents

Equipment sleep method and device and electronic equipment Download PDF

Info

Publication number
CN114528026B
CN114528026B CN202011320489.2A CN202011320489A CN114528026B CN 114528026 B CN114528026 B CN 114528026B CN 202011320489 A CN202011320489 A CN 202011320489A CN 114528026 B CN114528026 B CN 114528026B
Authority
CN
China
Prior art keywords
sleep
real
electronic equipment
undervoltage
intelligent switch
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011320489.2A
Other languages
Chinese (zh)
Other versions
CN114528026A (en
Inventor
梁佳
邓世荣
周黄
傅春
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Eigenstone Technology Co ltd
Original Assignee
Eigenstone Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Eigenstone Technology Co ltd filed Critical Eigenstone Technology Co ltd
Priority to CN202011320489.2A priority Critical patent/CN114528026B/en
Publication of CN114528026A publication Critical patent/CN114528026A/en
Application granted granted Critical
Publication of CN114528026B publication Critical patent/CN114528026B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/4418Suspend and resume; Hibernate and awake
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/263Arrangements for using multiple switchable power supplies, e.g. battery and AC
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Abstract

In the device sleep method, the device sleep method and the electronic device, the electronic device judges whether the real-time voltage value is smaller than a preset voltage threshold value or not by acquiring the real-time voltage value; and if the real-time voltage value is smaller than the preset voltage threshold value, entering a first sleep period of sleep mode sleep. The sleep period of the electronic equipment is adjusted according to the current power supply condition, so that the electronic equipment can be charged for a sufficient time, and the electronic equipment can normally operate under the condition of externally connecting a small power load.

Description

Equipment sleep method and device and electronic equipment
Technical Field
The application relates to the field of smart home, in particular to a device sleep method and device and electronic equipment.
Background
With the advent of the internet of things era, intelligent households supported by houses as platforms, and devices related to common household life are connected by utilizing the internet of things technology, so that an intelligent household daily transaction processing center is constructed, and a more efficient, intelligent, convenient and advanced household environment is formed.
The switch is an important component in a daily home control environment, a plurality of people adopt a wiring mode of a single live wire due to cost saving and other reasons in home decoration at home and abroad, the single live wire power taking technology has the difficulty in balancing power taking and intelligent control between the intelligent switch and a low-power load, for example, when a lamp is closed, the single-fire intelligent switch is connected with the lamp in series and then is connected with a power grid, so that the current flowing through the intelligent switch and the lamp is the same, the intelligent switch circuit cannot work due to small current, and the lamp has the intermittent flickering problem if the current is too large.
Disclosure of Invention
In a first aspect, an embodiment of the present application provides a device sleep method, applied to an electronic device, where the method includes:
acquiring a real-time voltage value;
judging whether the real-time voltage value is smaller than a preset voltage threshold value or not;
and if the real-time voltage value is smaller than the preset voltage threshold value, entering a first sleep period of sleep mode sleep.
In a second aspect, an embodiment of the present application provides an apparatus sleep device, including:
the voltage acquisition module is used for acquiring a real-time voltage value;
the equipment sleep module is used for judging whether the real-time voltage value is smaller than a preset voltage threshold value or not;
and if the real-time voltage value is smaller than the preset voltage threshold value, entering a first sleep period of sleep mode sleep.
In a third aspect, an embodiment of the present application provides an electronic device, where the electronic device includes a processor and a memory, where the memory stores computer executable instructions that, when executed by the processor, implement the device sleep method.
In a fourth aspect, embodiments of the present application provide a computer readable storage medium storing a computer program, where the computer program when executed by a processor implements the device sleep method.
Compared with the prior art, the application has the following beneficial effects:
in the device sleep method, the device sleep method and the electronic device, the electronic device judges whether the real-time voltage value is smaller than a preset voltage threshold value or not by acquiring the real-time voltage value; and if the real-time voltage value is smaller than the preset voltage threshold value, entering a first sleep period of sleep mode sleep. The sleep period of the electronic equipment is adjusted according to the current power supply condition, so that the electronic equipment can be charged for a sufficient time, and the electronic equipment can normally operate under the condition of externally connecting a small power load.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments will be briefly described below, it being understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered limiting the scope, and that other related drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic circuit diagram of an intelligent switch according to an embodiment of the present application;
fig. 2 is a schematic diagram of a power supply circuit of the intelligent switch according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present application;
fig. 4 is a schematic flow chart of a device sleep method according to an embodiment of the present application;
FIG. 5 is an exemplary diagram of a workflow of a smart switch provided in an embodiment of the present application;
fig. 6 is a schematic structural diagram of a sleep device of an apparatus according to an embodiment of the present application.
Icon: 100-intelligent switch; 110-LED lamp; 210-device sleep means; 220-memory; 230-a processor; 240-communication means; 250-energy storage device; 1101-a voltage acquisition module; 1102-device sleep module.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the embodiments of the present application more clear, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments. The components of the embodiments of the present application, which are generally described and illustrated in the figures herein, may be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present application, as provided in the accompanying drawings, is not intended to limit the scope of the application, as claimed, but is merely representative of selected embodiments of the application. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, are intended to be within the scope of the present application.
It should be noted that: like reference numerals and letters denote like items in the following figures, and thus once an item is defined in one figure, no further definition or explanation thereof is necessary in the following figures.
In the related art, when the intelligent switch is connected with the low-power load in series, the working current of the low-power load is difficult to support the intelligent switch to work normally, and an energy storage device is provided in the intelligent switch, so that the intelligent switch is powered by the energy storage device. Therefore, the energy storage state of the energy storage device is related to whether the intelligent switch can work normally or not.
The operation of the intelligent switch 100 described above is described in detail with reference to fig. 1. As shown in fig. 1, the intelligent switch 100 is connected in series with a low power LED (Light Emitting Diode ) lamp 110. The intelligent switch 100 controls the on or off of the LED lamp 110 by the received task instruction. Considering that the LED lamp 110 itself is less powerful, therefore, only a small current is needed to maintain the LED lamp 110 operating normally. In order to solve the problem that the power of the whole system is insufficient due to the small external load power of the intelligent switch 100 in use, an energy storage device (e.g. a capacitor) is integrated in the intelligent switch 100 for providing electric energy for the intelligent switch 100, so that the intelligent switch 100 can be connected in series with a low-power load and control the low-power load.
As shown in fig. 2, a schematic circuit structure of the above-mentioned intelligent switch is one possible embodiment of the present application. The intelligent switch 100 is connected with the low-power load 110 in series, and the intelligent switch 100 comprises a processor, a single-fire power taking circuit and a power supply monitoring circuit, wherein the processor is electrically connected with the power supply monitoring circuit and the single-fire power taking circuit, and the power supply monitoring circuit is electrically connected with the single-fire power taking circuit. The single-fire power-taking circuit is used for supplying power to the processor, and the power supply monitoring circuit obtains the voltage of the single-fire power-taking circuit, namely the voltage V of a point C in the figure C . The processor collects the real-time voltage V of the point D through the power supply monitoring circuit D . Wherein the voltage V at the point B B Voltage V to point C C The sum is the total voltage of the whole intelligent switch system, and the real-time voltage V D The following relationship is satisfied with the total voltage:
V D =1/3(V B +V c );
the intelligent switch obtains the real-time voltage of the point D through the processor, and obtains the total voltage of the intelligent switch through the voltage relation calculation. When the electric quantity of the energy storage device is insufficient, the intelligent switch is in an under-voltage state, and the total voltage is lower than the normal working voltage.
In view of the working principle of the intelligent switch, the embodiment of the application provides a device sleep method which is applied to electronic devices. The electronic device may be the above-mentioned intelligent switch, or may be an intelligent device including the intelligent switch. For example, the smart device may be a single fire panel, a single fire LED lamp, a smart sensor, or the like.
The electronic equipment detects the current real-time voltage, and enters a sleep mode to sleep when the real-time voltage is smaller than a preset voltage threshold. Because the power consumption of the electronic equipment in the sleep mode is smaller than that of the electronic equipment in the non-sleep mode, the energy storage device can be rapidly filled with electric energy so as to maintain the normal operation of the electronic equipment.
With respect to the electronic device, the hardware configuration thereof is exemplarily described below with reference to fig. 3. The electronic device comprises an energy storage device 250, a processor 230, a memory 220 and a communication device 240. The memory 220, the processor 230, the energy storage device 250, and the communication device 240 are electrically connected to each other, directly or indirectly, to achieve data transmission or interaction.
The communication means may be a wired or wireless communication means for receiving the task instructions. For example, the processor receives a task instruction for controlling the load through the communication device.
Processor 230 is an integrated circuit chip with signal processing capabilities. The disclosed methods, steps, and logic blocks in the embodiments of the present application may be implemented or performed.
The Memory 220 may be, but is not limited to, a random access Memory (Random Access Memory, RAM), a Read Only Memory (ROM), a programmable Read Only Memory (Programmable Read-Only Memory, PROM), an erasable Read Only Memory (Erasable Programmable Read-Only Memory, EPROM), an electrically erasable Read Only Memory (Electric Erasable Programmable Read-Only Memory, EEPROM), etc. The memory 220 is used for storing a program, and the processor 230 executes the program after receiving the execution instruction. The communication device 240 is used for transmitting and receiving data through a network.
The above-mentioned device sleep method is described in detail below with reference to the schematic step flow chart of the device sleep method shown in fig. 4.
Step S101, acquiring a real-time voltage value.
The real-time voltage value represents the current power supply state of the electronic equipment, and the real-time voltage value of the electronic equipment can be the power supply voltage of the whole electronic equipment or the power supply voltage of one or more devices in the electronic equipment. Namely, when the real-time voltage is greater than or equal to a preset voltage threshold, the electronic equipment can work normally. When the real-time voltage is smaller than the preset voltage threshold, the electronic equipment may be down or restarted automatically due to the undervoltage.
In one possible implementation manner provided by the embodiment of the present application, considering that the instantaneous voltage of the electronic device may be affected by the power grid fluctuation, a voltage spike appears at a certain moment, and then the judgment result of the real-time voltage value is affected.
Therefore, the step S101 includes:
step S101-1, acquiring acquisition voltage of the electronic equipment in a current preset sleep period.
And step S101-2, filtering the acquired voltage to obtain a real-time voltage value.
It should be appreciated that there are many ways to filter the voltage, and the above steps are exemplified below by taking an average filtering algorithm as an example.
The electronic equipment performs voltage acquisition once every 20ms within 100ms, performs average calculation on 5 acquired voltages acquired within 100ms, and takes the obtained average value as the real-time voltage value. Thus, erroneous judgment caused by voltage spikes can be avoided.
Step S102, judging whether the real-time voltage value is smaller than a preset voltage threshold.
When the real-time voltage of the electronic equipment is larger than or equal to a preset voltage threshold, the electronic equipment can work normally. For example, the electronic device may be capable of task scheduling and execution of device task instructions.
Step S103, if the real-time voltage value is smaller than the preset voltage threshold value, entering a first sleep period of a sleep mode sleep.
The electronic equipment compares the current real-time voltage value with a preset voltage threshold value, and enters a sleep mode to sleep when the real-time voltage value is insufficient to normally maintain the electronic equipment to work so as to avoid the electronic equipment from working in an under-voltage state.
In the embodiment of the application, it is considered that the response efficiency of the electronic device to the task instruction is affected by the length of the first sleep period. It should be understood that, in the sleep mode with a fixed sleep period, the electronic device needs to sleep for the same sleep period no matter how much power is left in the electronic device, so that the electronic device has a problem of poor efficiency when responding to a task instruction. For example, when the fixed sleep period is 300ms, the remaining power of the electronic device is 50%, or 300ms is required to sleep at 90%. However, compared to the sleep period required by 50% of the remaining power, 90% of the remaining power requires relatively less sleep period to fully charge the energy storage device of the electronic device with electrical energy.
Thus, in one possible implementation manner provided in the embodiment of the present application, the step S103 includes:
step S103-1, obtaining the number of undervoltage times.
The under-voltage times represent times of under-voltage of the electronic equipment, and when the real-time voltage value is greater than or equal to a preset voltage threshold value, the under-voltage times are cleared; otherwise, the undervoltage times are accumulated and updated.
For example, after the electronic device wakes up from the sleep mode, the historical under-voltage number is 3, which indicates that the electronic device is in an under-voltage state after 3 previous wakes up from the sleep mode.
If the current real-time voltage value of the electronic equipment is smaller than the preset voltage threshold value, accumulating and updating the 3 to obtain the updated undervoltage frequency of 4.
If the current real-time voltage value of the electronic equipment is larger than or equal to the preset voltage threshold value, resetting the 3, and enabling the number of the undervoltage times after updating to be 0.
Alternatively, as one possible implementation, the electronic device may wake up from a sleep mode by a wake-up signal. The wake-up signal may be a timer interrupt signal generated by a timer. I.e. the timer generates an interrupt signal after the end of the timing, and the electronic device wakes up the electronic device from the sleep mode after capturing the interrupt signal.
Step S103-2, determining a first sleep period according to the undervoltage times.
The undervoltage times can reflect the current energy storage state of the electronic equipment to a certain extent. For example, when the number of undervoltage is large, it indicates that the electronic device is still in an undervoltage state after the electronic device passes through the sleep mode of continuous multiple rounds. Therefore, the method can reflect that the residual electric quantity in the energy storage device of the electronic equipment is smaller, and more sleep cycles are needed for energy storage.
In view of this, in one implementation provided in the embodiments of the present application, the first sleep period is positively correlated with the number of undervoltage times.
It should be noted that, there are various situations of the positive correlation manner of the first sleep period and the under-voltage frequency, including linear positive correlation and nonlinear positive correlation. An example of linear positive correlation and nonlinear correlation is described below.
Let the number of undervoltage after updating be N, if it is a linear positive correlation, the first sleep period may be denoted as 2*N. If a nonlinear positive correlation is used, the first sleep period may be represented as 2 N . 2 in the above example is the sleep cycle adjustment base, which is adapted by those skilled in the art based on the requirements.
It is obvious that for the above-mentioned positive relevant specific implementation, a person skilled in the art will adapt the selection based on the actual requirements, which do not need to make an inventive contribution based on the technical solutions disclosed in the present application.
Step S103-3, executing a sleep instruction, and entering a sleep mode to sleep for a first sleep period.
Therefore, after the electronic equipment wakes up from the sleep mode each time, the under-voltage times are updated, and the first sleep period is dynamically adjusted according to the updated under-voltage times. The first sleep period determined by the electronic equipment is positively correlated with the undervoltage times, so that the electronic equipment sleeps for a longer sleep period when the undervoltage times are more. And because the under-voltage frequency represents the electric quantity condition of the electronic equipment, the purpose of adjusting the charging sleep period based on the electric quantity condition can be achieved, so that when the residual electric quantity of the electronic equipment is more, the electric quantity in the energy storage device can be fully stored only in the sleep period with shorter sleep mode.
Therefore, the electronic equipment dynamically adjusts the first sleep period through the undervoltage times, so that the electronic equipment can obtain sufficient electric quantity and the response efficiency to the task instruction is improved.
In addition, referring to fig. 4 again, the device sleep method provided in the embodiment of the present application further includes:
step S104, if the real-time voltage value is greater than or equal to the preset voltage threshold value, entering a third sleep period of the sleep mode sleep.
For clarity of explanation, the following will describe in detail an example of the smart switch of one of the above electronic devices.
The preset voltage threshold of the intelligent switch is set to be 3.3V, and the first sleep period is determined by assuming that a formula 150×n is set, wherein N represents the number of undervoltage times, 150 is a sleep base, and the preset voltage threshold can be adaptively adjusted according to actual requirements. The intelligent switch wakes up from sleep mode for the 10 th time, and the historical undervoltage times are 3. The under-voltage frequency represents that the real-time voltage value is smaller than 3.3V after the intelligent switch is awakened from the sleep mode for the 9 th, 8 th and 7 th times.
In one possible scenario, the smart switch acquires the current real-time voltage value less than 3.3V after the 10 th time that the smart switch is awakened from the sleep mode. The intelligent switch performs accumulation on the basis of 3 to obtain the updated undervoltage frequency of 4. Based on the updated undervoltage times, the intelligent switch calculates the first sleep period to be 600 milliseconds by the formula 150×n.
In another possible scenario, the current real-time voltage is greater than or equal to 3.3V after the smart switch wakes up. Therefore, the intelligent switch clears the under-voltage times, and based on the cleared under-voltage times, the initial value of the first sleep period is determined to be 250 milliseconds, and the 250 milliseconds can be adaptively adjusted according to actual requirements.
And, because the electronic equipment is awakened from the sleep mode for the 10 th time, the undervoltage frequency is cleared, if the electronic equipment is awakened from the sleep mode for the 11 th time, the power supply voltage of the electronic equipment is smaller than 3.3V, the undervoltage frequency is accumulated again, namely, the 11 th time is awakened from the sleep mode, and the updated undervoltage frequency is 1.
In addition, in the embodiment of the present application, task instructions executed by the electronic device are classified into two types, i.e., a high-power-consumption instruction and a low-power-consumption instruction. For example, the operation corresponding to the high power consumption instruction may be an operation related to network connection. The operation corresponding to the low power consumption instruction can also be to control the opening and closing of the load. The high power consumption instructions are further divided into a first category and a second category. The first category may be a network entry instruction; the second category may be a re-networking instruction.
It should be noted that the electronic device needs to be communicatively connected to the gateway, so that the user may send the task instruction to the electronic device through the gateway.
Thus, before step S103, the electronic device receives a task instruction; and judging the category to which the task instruction belongs.
The task instruction is a task instruction currently executed by the electronic device. Because of the different power consumption requirements of different task instructions, the different task instructions need to be processed in a targeted manner.
If the task instruction belongs to the first category, the electronic equipment turns off a load electrically connected with the electronic equipment.
If the task instruction belongs to the second category, the electronic device delays execution until the real-time voltage is greater than or equal to a preset voltage threshold. Wherein the voltage required to execute the first class of task instructions is greater than the voltage required to execute the second class of task instructions.
For different electronic devices, there is a certain difference in the high power consumption instructions. The above steps are exemplified by a zigbee protocol-based smart switch. The intelligent switch based on the zigbee protocol can be a network access operation instruction based on the zigbee protocol, and the second instruction can be a re-network access instruction based on the zigbee protocol.
It should be understood that the operation corresponding to the network access operation instruction is an operation related to a network protocol required when the intelligent switch joins the zigbee network for the first time. The operation corresponding to the re-networking instruction is the operation required by the intelligent switch to establish communication connection with the gateway again after the gateway in the zigbee networking is abnormally restarted. Both of the above operations require an increase in their own power consumption to search for zigbee signals in the space, and thus require more energy to maintain the above operations. Considering that the network access operation needs a lot of network interaction and then needs more energy, in the embodiment of the application, the load controlled by the electronic device is turned off to further reduce the power consumption.
It should be noted that, in the network architecture of zigbee protocol, a gateway is used for forwarding and buffering a message. After the intelligent switch is awakened from the sleep mode, communication connection is established between the intelligent switch and the gateway based on the zigbee protocol. And once the gateway discovers that the intelligent switch is connected into the network, the gateway sends the task instruction cached during the sleep mode of the intelligent switch to the intelligent switch. Of course, the task instruction may also be obtained based on the state of the intelligent switch itself. For example, the intelligent switch detects that a network access operation or a re-access operation is currently required to be performed based on the network status.
In addition, it is contemplated that the proper operation of the electronic device is dependent upon the amount of power in the energy storage device 250. Thus, in an embodiment of the present application, the device sleep method further comprises:
and when the electronic equipment is started for the first time, controlling the electronic equipment to enter a sleep mode to sleep for a second sleep period. Alternatively, the second sleep period may be 1s.
Because the electronic device is powered on for the first time, the energy storage device in the electronic device is in a depleted state, so that the electronic device can sleep for a second sleep period to ensure enough time to fully charge the energy storage device 250 of the electronic device, so that the electronic device can work normally after awakening from a sleep mode.
In the following, a possible implementation manner is provided for the device sleep method in conjunction with fig. 5, which also takes an intelligent switch as an example, and the device sleep method is described in detail. Wherein, the preset voltage threshold of the intelligent switch is 3.3V.
The intelligent switch is forced to enter a sleep mode for 1s when the equipment is powered on and started. After the intelligent switch sleeps for 1s, the intelligent switch is awakened from a sleep mode in response to an awakening signal, and the intelligent switch is initialized after being powered on.
The initialization operation includes an initialization operation for each device in the smart switch and a parameter-dependent initialization operation. For example, the undervoltage times may be initialized to zero by a parameter initialization operation.
Further, the intelligent switch initiates a supply voltage monitoring task. And, the intelligent switch performs some basic instructions while initializing the supply voltage monitoring task. The operation corresponding to the basic instruction may include an indicator light display state control operation, an equipment temperature monitoring operation, and an equipment key monitoring operation.
The intelligent switch acquires a current real-time voltage value based on the initialized power supply voltage monitoring task and judges whether the real-time voltage value is smaller than 3.3V or not.
If the voltage is greater than or equal to 3.3V, the intelligent switch clears the undervoltage times and executes some received control instructions, such as opening the load or closing the load; after execution, the sleep mode is entered for 250ms.
If the current task instruction is less than 3.3V, the intelligent switch judges whether the current task instruction is a network access operation instruction or a re-network access operation instruction.
If the network access operation instruction is received, the intelligent switch turns off the load so as to further reduce the power consumption of the equipment. Meanwhile, after performing some initialization operations related to network operations (for example, initializing a zigbee chip), the intelligent switch enters a sleep mode to sleep until the energy storage device is full of electric quantity, and then executes a network access operation instruction.
If the network operation command is a network access operation command, the intelligent switch also delays executing the network access operation command after executing some initialization operations related to the network operation until the real-time voltage value is greater than or equal to a preset voltage threshold.
If the current task instruction is neither a network access operation instruction nor a re-network access operation instruction, the intelligent switch stops the current task instruction and updates the undervoltage times; and after the sleep period of the sleep mode is determined based on the updated undervoltage times, entering the sleep mode to sleep.
Based on the same inventive concept, the embodiments of the present application also provide a device sleep apparatus including at least one functional module stored in a memory in the form of software. When the computer executable instructions corresponding to the equipment sleeping device are executed by the processor, the equipment sleeping method is realized. Referring to fig. 6, functionally divided, the device sleep apparatus 210 includes:
the voltage acquisition module 1101 is configured to acquire a real-time voltage value.
In this embodiment, the voltage obtaining module 1101 is configured to perform step S101 in fig. 6, and for a detailed description of the voltage obtaining module 1101, please refer to the detailed description of step S101.
The device sleep module 1102 is configured to determine whether the real-time voltage value is less than a preset voltage threshold;
if the real-time voltage value is smaller than the preset voltage threshold value, entering a first sleep period of sleep mode sleep.
And if the real-time voltage is greater than or equal to the voltage threshold, entering a third sleep period of sleep mode sleep.
In this embodiment of the present application, the device sleep module 1102 is configured to execute step S102, step S103, and step S104 in fig. 4, and for a detailed description of the device sleep module 1102, please refer to the detailed description of step S102, step S103, and step S104.
The equipment sleeping module is specifically used for acquiring the times of under-voltage; determining a first sleep period according to the undervoltage times; executing a sleep instruction, and entering a sleep mode to sleep for a first sleep period.
The equipment sleep module is also used for receiving task instructions; judging the category to which the task instruction belongs; if the task instruction belongs to the first class, closing the load; if the task instruction belongs to the second category, the execution is deferred until the real-time voltage is greater than or equal to a preset voltage threshold.
The device sleep module is further configured to enter a sleep mode to sleep for a second sleep period when the device sleep module is started for the first time.
The equipment sleep module is further used for entering a sleep mode to sleep for a third sleep period if the real-time voltage value is greater than or equal to a preset voltage threshold.
The voltage acquisition module is specifically used for acquiring the acquired voltage in the current preset sleep period; and filtering the acquired voltage to obtain a real-time voltage value.
The embodiment of the application also provides electronic equipment. The electronic device includes a processor and a memory. The memory stores computer executable instructions that, when executed by the processor, implement the above-described device sleep method.
Embodiments of the present application also provide a computer-readable storage medium storing a computer program. The computer program, when executed by a processor, implements the above-described device sleep method.
In summary, in the device sleep method, the device sleep device and the electronic device, the electronic device determines whether the real-time voltage value is smaller than a preset voltage threshold value by acquiring the real-time voltage value; and if the real-time voltage value is smaller than the preset voltage threshold value, entering a first sleep period of sleep mode sleep. The sleep period of the electronic equipment is adjusted according to the current power supply condition, so that the electronic equipment can be charged for a sufficient time, and the electronic equipment can normally operate under the condition of externally connecting a small power load.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners as well. The apparatus embodiments described above are merely illustrative, for example, flow diagrams and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, the functional modules in the embodiments of the present application may be integrated together to form a single part, or each module may exist alone, or two or more modules may be integrated to form a single part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
It is noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The foregoing is merely various embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily think about changes or substitutions within the technical scope of the present application, and the changes and substitutions are intended to be covered in the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. A device sleep method, characterized by being applied to an electronic device, the electronic device being an intelligent switch or a device comprising an intelligent switch, the intelligent switch being provided with energy storage means for providing the intelligent switch with electrical energy, the method comprising:
acquiring a real-time voltage value;
judging whether the real-time voltage value is smaller than a preset voltage threshold value or not, wherein the preset voltage threshold value represents a voltage threshold value required by the electronic equipment to execute normal task scheduling;
if the real-time voltage value is smaller than the preset voltage threshold value, acquiring the undervoltage times, wherein the undervoltage times represent the energy storage state of the electronic equipment;
determining a first sleep period according to the undervoltage times;
executing a sleep instruction, entering a sleep mode to sleep for the first sleep period, and enabling an energy storage device in the electronic equipment to perform energy storage operation in the first sleep period.
2. The device sleep method as claimed in claim 1, characterized in that, the number of undervoltage times characterizes the number of undervoltage times of the electronic device, and when the real-time voltage value is greater than or equal to the preset voltage threshold value, the number of undervoltage times is cleared; otherwise, accumulating and updating the undervoltage times.
3. The device sleep method of claim 1, wherein the first sleep period is positively correlated to the number of undervoltage times.
4. The device sleep method as claimed in claim 1, characterized in that, before said entering sleep mode to sleep for said first sleep period, the method further comprises:
receiving a task instruction;
judging the category to which the task instruction belongs;
if the task instruction belongs to a first class, closing a load electrically connected with the electronic equipment;
if the task instruction belongs to the second category, deferring to be executed until the real-time voltage is greater than or equal to the preset voltage threshold;
wherein the voltage required to execute the first class of task instructions is greater than the voltage required to execute the second class of task instructions.
5. The device sleep method as claimed in claim 1, characterized in that, the acquiring real-time voltage value comprises:
acquiring acquisition voltage in a current preset sleep period;
and filtering the acquired voltage to obtain the real-time voltage value.
6. The device sleep method as claimed in any one of claims 1-5, characterized in that, the method further comprises:
and when the device is started for the first time, entering the sleep mode to sleep for a second sleep period.
7. The device sleep method as claimed in any one of claims 1-5, characterized in that, the method further comprises:
and if the real-time voltage value is greater than or equal to the preset voltage threshold value, entering a third sleep period of the sleep mode.
8. An apparatus sleep device, characterized in that it is applied to electronic equipment, the electronic equipment is intelligent switch or including intelligent switch's equipment, intelligent switch is provided with energy storage device for intelligent switch provides electric energy, the apparatus sleep device includes:
the voltage acquisition module is used for acquiring a real-time voltage value;
the equipment sleep module is used for judging whether the real-time voltage value is smaller than a preset voltage threshold value or not, wherein the preset voltage threshold value represents a voltage threshold value required by the electronic equipment to execute normal task scheduling;
if the real-time voltage value is smaller than the preset voltage threshold value, acquiring the undervoltage times, wherein the undervoltage times represent the energy storage state of the electronic equipment;
determining a first sleep period according to the undervoltage times;
executing a sleep instruction, entering a sleep mode to sleep for the first sleep period, and enabling an energy storage device in the electronic equipment to perform energy storage operation in the first sleep period.
9. An electronic device comprising a processor and a memory storing computer-executable instructions that, when executed by the processor, implement the device sleep method of any one of claims 1-7.
10. A computer readable storage medium, characterized in that the computer readable storage medium stores a computer program which, when executed by a processor, implements the device sleep method of any one of claims 1-7.
CN202011320489.2A 2020-11-23 2020-11-23 Equipment sleep method and device and electronic equipment Active CN114528026B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011320489.2A CN114528026B (en) 2020-11-23 2020-11-23 Equipment sleep method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011320489.2A CN114528026B (en) 2020-11-23 2020-11-23 Equipment sleep method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN114528026A CN114528026A (en) 2022-05-24
CN114528026B true CN114528026B (en) 2024-02-27

Family

ID=81618806

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011320489.2A Active CN114528026B (en) 2020-11-23 2020-11-23 Equipment sleep method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN114528026B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102570589A (en) * 2011-12-27 2012-07-11 南京理学工程数据技术有限公司 Electronic equipment with sleeping control circuit and sleeping control method of electronic equipment
JP2014145188A (en) * 2013-01-29 2014-08-14 Asmo Co Ltd Opening/closing member controller
CN105141762A (en) * 2015-08-11 2015-12-09 Tcl移动通信科技(宁波)有限公司 Method and system for low-power shutdown of mobile terminal
CN107078638A (en) * 2014-10-20 2017-08-18 高通股份有限公司 The quiescent current reduced in power converter
CN110199550A (en) * 2019-04-17 2019-09-03 北京小米移动软件有限公司 Terminal sleep state control method, device and computer readable storage medium
CN110481383A (en) * 2019-08-29 2019-11-22 华人运通(江苏)技术有限公司 Data processing method and battery management system based on battery management system
CN110557802A (en) * 2019-07-22 2019-12-10 华为技术有限公司 ZigBee terminal device re-online method and ZigBee terminal device
CN111399405A (en) * 2020-03-03 2020-07-10 北京嘀嘀无限科技发展有限公司 Control method and device for vehicle-mounted electronic equipment, storage medium and electronic equipment

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102570589A (en) * 2011-12-27 2012-07-11 南京理学工程数据技术有限公司 Electronic equipment with sleeping control circuit and sleeping control method of electronic equipment
JP2014145188A (en) * 2013-01-29 2014-08-14 Asmo Co Ltd Opening/closing member controller
CN107078638A (en) * 2014-10-20 2017-08-18 高通股份有限公司 The quiescent current reduced in power converter
CN105141762A (en) * 2015-08-11 2015-12-09 Tcl移动通信科技(宁波)有限公司 Method and system for low-power shutdown of mobile terminal
CN110199550A (en) * 2019-04-17 2019-09-03 北京小米移动软件有限公司 Terminal sleep state control method, device and computer readable storage medium
CN110557802A (en) * 2019-07-22 2019-12-10 华为技术有限公司 ZigBee terminal device re-online method and ZigBee terminal device
CN110481383A (en) * 2019-08-29 2019-11-22 华人运通(江苏)技术有限公司 Data processing method and battery management system based on battery management system
CN111399405A (en) * 2020-03-03 2020-07-10 北京嘀嘀无限科技发展有限公司 Control method and device for vehicle-mounted electronic equipment, storage medium and electronic equipment

Also Published As

Publication number Publication date
CN114528026A (en) 2022-05-24

Similar Documents

Publication Publication Date Title
US7400911B2 (en) Wireless node and method of powering a wireless node employing ambient light to charge an energy store
US9405303B2 (en) Power stealing for a wireless-enabled thermostat
Fraternali et al. Aces: Automatic configuration of energy harvesting sensors with reinforcement learning
US20130131883A1 (en) Electricity management system for efficiently operating a plurality of electric appliances, electric appliance therefor, central control unit, computer program and storage medium thereof, and method of managing electric appliances by the central control unit
EP3068069B1 (en) Network system and method for controlling the same
EP3829268A1 (en) Iot light switch module for smart home construction
WO2007074541A1 (en) Systems and methods for selectively controlling electrical outlets using power profiling
Huynh et al. Energy-aware wireless sensor network with ambient intelligence for smart LED lighting system control
CN109140706B (en) Intelligent control method for air conditioner
US20160334812A1 (en) Power Stealing for a Wireless-Enabled Thermostat
CN104879924B (en) Control method of water heater and intelligent control terminal of water heater
CN112469171B (en) Intelligent single-fire switch and sleep time management method and device thereof
CN107703764B (en) Equipment control method and device
JP2012226643A (en) Energy management device and energy management system
TW201346515A (en) Smart energy-saving control method and system
CN112616178A (en) Energy consumption management method and device, electronic equipment and storage medium
CN102998981A (en) Electric appliance and method, device and system for standby control of electric appliance
CN111123719A (en) Household appliance control method, intelligent home controller and storage medium
CN114528026B (en) Equipment sleep method and device and electronic equipment
CN202998592U (en) Centralized controller
CN103546029B (en) A kind of suitching type adjuster and control method thereof
JPH1094170A (en) Power consumption control system
CN106912091B (en) Control method and device and electronic equipment
JP6317987B2 (en) Power control system, power control apparatus, and power control method
KR102149047B1 (en) Internet of things lighting switch module withcharge amount check function of super capacitor

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant