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

Equipment sleep method and device and electronic equipment Download PDF

Info

Publication number
CN114528026A
CN114528026A CN202011320489.2A CN202011320489A CN114528026A CN 114528026 A CN114528026 A CN 114528026A CN 202011320489 A CN202011320489 A CN 202011320489A CN 114528026 A CN114528026 A CN 114528026A
Authority
CN
China
Prior art keywords
sleep
real
voltage value
time voltage
time
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.)
Granted
Application number
CN202011320489.2A
Other languages
Chinese (zh)
Other versions
CN114528026B (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

Images

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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Power Engineering (AREA)
  • Power Sources (AREA)

Abstract

In the equipment sleep method, the equipment sleep device and the electronic equipment, the electronic equipment 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, entering a sleep mode to sleep for a first sleep period. The electronic equipment adjusts the sleep cycle of the equipment according to the current power supply condition, and gives enough charging time to the electronic equipment, so that the electronic equipment can also normally run under the condition of externally connecting a low-power load.

Description

Equipment sleep method and device and electronic equipment
Technical Field
The application relates to the field of smart homes, in particular to a device sleeping method and device and electronic equipment.
Background
With the arrival of the world of everything interconnection, the smart home depends on a residence as a platform, and equipment related to common home life is connected by using the internet of things technology to construct an intelligent processing center for daily matters of the home, so that a more efficient, intelligent, convenient and advanced home environment is formed.
The switch is an important component in a daily household control environment, many people adopt a single-live-wire wiring mode due to the reasons of cost saving and the like in home decoration at home and abroad, the single-live-wire power taking technology has the problem of balance between power taking and intelligent control between an intelligent switch and a low-power load, for example, when a lamp is turned off, the single-live-wire intelligent switch is connected with a power grid after being connected in series with the lamp, 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 can flicker intermittently if the current is too large.
Disclosure of Invention
In a first aspect, an embodiment of the present application provides a device sleep method, which is applied to an electronic device, and 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, entering a sleep mode to sleep for a first sleep period.
In a second aspect, an embodiment of the present application provides an apparatus sleep device, where 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;
and if the real-time voltage value is smaller than the preset voltage threshold, entering a sleep mode to sleep for a first sleep period.
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, and when the computer-executable instructions are executed by the processor, the device sleep method is implemented.
In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the computer program implements the device sleep method.
Compared with the prior art, the method has the following beneficial effects:
in the equipment sleep method, the equipment sleep device and the electronic equipment, the electronic equipment 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, entering a sleep mode to sleep for a first sleep period. The electronic equipment adjusts the sleep cycle of the equipment according to the current power supply condition, and gives enough charging time to the electronic equipment, so that the electronic equipment can also normally run under the condition of externally connecting a low-power load.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained from the drawings without inventive effort.
Fig. 1 is a schematic circuit diagram of an intelligent switch provided in an embodiment of the present application;
fig. 2 is a schematic diagram of a power supply circuit of an intelligent switch provided in 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 flowchart of a device sleep method according to an embodiment of the present application;
fig. 5 is a diagram illustrating an example of a work flow of an intelligent switch provided in an embodiment of the present application;
fig. 6 is a schematic structural diagram of a device sleep apparatus according to an embodiment of the present application.
Icon: 100-intelligent switch; 110-LED lamps; 210-device sleep apparatus; 220-a memory; 230-a processor; 240-a communication device; 250-an energy storage device; 1101-a voltage acquisition module; 1102-device sleep module.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in 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 obvious that the described embodiments are some embodiments of the present application, but not all embodiments. The components of the embodiments of the present application, as generally described and illustrated in the figures herein, could be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present application, presented in the accompanying drawings, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
In the correlation technique, when considering that 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 normally work, and then an energy storage device is provided for the intelligent switch, and the energy is supplied to the intelligent switch through 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 is described in conjunction with 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 LED lamp 110 to be turned on or off according to the received task command. Considering that the LED lamp 110 has a small power, a small current is needed to maintain the LED lamp 110 to operate normally. In order to solve the problem that the power of the intelligent switch 100 is not enough due to the fact that the external load power is small in use, an energy storage device (for example, a capacitor) is integrated in the intelligent switch 100 and used for providing electric energy for the intelligent switch 100, and then the intelligent switch 100 can be connected with a low-power load in series and is controlled.
Fig. 2 is a schematic diagram of a possible circuit structure of the intelligent switch according to an embodiment of the present disclosure. The intelligent switch 100 is connected in series with the low-power load 110, the intelligent switch 100 comprises a processor, a single-fire power getting circuit and a power monitoring circuit, the processor is electrically connected with the power monitoring circuit and the single-fire power getting circuit, and the power monitoring circuit is electrically connected with the single-fire power getting circuit. The single live wire power supply circuit is used for supplying power to the processor, and the power supply monitoring circuit acquires the voltage of the single live wire power supply circuit, namely the voltage V of the point C in the figureC. The processor collects the real-time voltage V of the D point through the power supply monitoring circuitD. Wherein, the voltage V of point BBVoltage V at point CCThe sum is the total voltage of the whole system of the intelligent switch, and the real-time voltage VDThe following relation is satisfied with the total voltage:
VD=1/3(VB+Vc);
the intelligent switch obtains the real-time voltage of the point D through the processor, and the total voltage of the intelligent switch is obtained through the calculation of the voltage relation. When the electric quantity of the energy storage device is insufficient, the intelligent switch is in an undervoltage 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 sleeping method, which is applied to electronic devices. The electronic device may be the above-mentioned intelligent switch, and may also be an intelligent device including the intelligent switch. For example, the smart device may be a single fire panel, a single fire LED light, a smart sensor, and the like.
The electronic equipment enters a sleep mode to sleep by detecting the current real-time voltage 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 less than that in the non-sleep mode, the energy storage device can be quickly filled with electric energy to maintain the normal work of the electronic equipment.
Regarding the electronic apparatus, a hardware structure thereof is exemplarily explained below with reference to fig. 3. The electronic device comprises a power storage device 250, a processor 230, a memory 220 and a communication device 240. The memory 220, processor 230, energy storage device 250, and communication device 240 are electrically connected to each other, either directly or indirectly, to enable the transfer or interaction of data.
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 a load through the communication device.
Processor 230 is an integrated circuit chip having signal processing capabilities. The various methods, steps, and logic blocks disclosed 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 (RAM), a Read Only Memory (ROM), a Programmable Read-Only Memory (PROM), an Erasable Read-Only Memory (EPROM), an electrically Erasable Read-Only Memory (EEPROM), and the like. The memory 220 is used for storing programs, and the processor 230 executes the programs after receiving the execution instructions. The communication device 240 is used for transmitting and receiving data through a network.
With regard to the device sleep method, the following is described in detail with reference to the flowchart of the steps of the device sleep method shown in fig. 4.
And step S101, acquiring a real-time voltage value.
The real-time voltage value represents a current power supply state of the electronic device, and may be a power supply voltage of the whole electronic device or a power supply voltage of one or more devices in the electronic device. Namely, when the real-time voltage is greater than or equal to the preset voltage threshold, the electronic equipment can work normally. When the real-time voltage is smaller than the preset voltage threshold, the electronic device may be down or automatically restarted due to undervoltage.
In a possible implementation manner provided by the embodiment of the application, it is considered that the instantaneous voltage of the electronic device may be influenced by the fluctuation of the power grid, a voltage spike occurs at a certain moment, and then the judgment result of the real-time voltage value is influenced.
Therefore, the step S101 includes:
and S101-1, acquiring the acquisition voltage of the electronic equipment in the current preset sleep cycle.
And S101-2, filtering the acquired voltage to obtain a real-time voltage value.
It should be understood that there are many methods for filtering the voltage, and the average filtering algorithm is taken as an example to illustrate the above steps.
The electronic equipment collects voltage once every 20ms within 100ms, 5 collected voltages collected within 100ms are calculated averagely, and the obtained average value is used as the real-time voltage value. Therefore, misjudgment caused by voltage spikes can be avoided.
Step S102, judging whether the real-time voltage value is smaller than a preset voltage threshold value.
When the real-time voltage of the electronic equipment is greater than or equal to the preset voltage threshold, the electronic equipment can normally work. 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, entering a sleep mode for sleeping for a first sleep period.
The electronic equipment compares the current real-time voltage value with a preset voltage threshold, and enters a sleep mode to sleep when the real-time voltage value is not enough to normally maintain the electronic equipment to work so as to prevent the electronic equipment from working in an undervoltage state.
In the embodiment of the application, it is considered that the length of the first sleep cycle may affect the response efficiency of the electronic device to the task instruction. It should be understood that, in the sleep mode with a fixed sleep cycle, the electronic device needs to sleep for the same sleep cycle 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 cycle is 300ms, the remaining power of the electronic device is 50%, or 90% of the electronic device needs to sleep for 300 ms. 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 store the energy storage device of the electronic device.
Therefore, in one possible implementation manner provided by the embodiment of the present application, the step S103 includes:
and step S103-1, acquiring the number of times of undervoltage.
The undervoltage times represent the undervoltage times of the electronic equipment, and when the real-time voltage value is greater than or equal to a preset voltage threshold, the undervoltage times are cleared; otherwise, the undervoltage times are accumulated and updated.
For example, if the historical undervoltage number is 3 after the electronic device wakes up from the sleep mode, it indicates that the electronic device is in the undervoltage state after 3 times of waking 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 voltage value 3 to obtain the updated under-voltage frequency of 4.
If the current real-time voltage value of the electronic equipment is greater than or equal to the preset voltage threshold value, clearing the voltage value 3, and then updating the undervoltage frequency to be 0.
Optionally, as a possible implementation, the electronic device may wake up from the sleep mode by a wake-up signal. The wake-up signal may be a timer interrupt signal generated by a timer. That is, the timer generates an interrupt signal after the timing is finished, and the electronic device wakes up the electronic device from the sleep mode after capturing the interrupt signal.
And step S103-2, determining a first sleep cycle 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 times of under-voltage is large, it indicates that the electronic device is still in an under-voltage state after the electronic device passes through a plurality of consecutive sleep modes. Therefore, the condition that the residual electric quantity in the energy storage device of the electronic equipment is less and more sleep cycles are needed for energy storage can be reflected.
In view of this, in an implementation manner provided by the embodiment of the present application, the first sleep cycle is positively correlated to the brown-out times.
It should be noted that there are many cases in the positive correlation between the first sleep cycle and the under-voltage frequency, including a linear positive correlation and a non-linear positive correlation. The following is an exemplary description of a linear positive correlation and a non-linear correlation.
Let the updated under-voltage number be N, and if the updated under-voltage number is a linear positive correlation, the first sleep cycle may be represented as 2 × N. If there is a non-linear positive correlation, the first sleep cycle can be represented as 2N. 2 in the above example is the sleep cycle adjustment cardinality, which is adapted by those skilled in the art based on the needs.
It is obvious that for the above-mentioned positive correlation specific implementation, those skilled in the art can make an adaptive selection based on actual needs, which do not need to make creative contributions based on the technical solutions disclosed in the present application.
And step S103-3, executing a sleep instruction, and entering a sleep mode to sleep for a first sleep period.
Therefore, after the electronic device is awakened from the sleep mode each time, the undervoltage times are updated, and the first sleep cycle is dynamically adjusted according to the updated undervoltage times. Because the first sleep cycle determined by the electronic equipment is positively correlated with the under-voltage times, the electronic equipment can sleep for a longer sleep cycle when the under-voltage times are more. And because the number of times of undervoltage represents the electric quantity situation of the electronic equipment, therefore, the purpose of adjusting the charging sleep cycle based on the electric quantity situation can be achieved, and when the residual electric quantity of the electronic equipment is more, the electric quantity in the energy storage device can be fully stored only by sleeping in the sleep mode for a shorter sleep cycle.
Therefore, the electronic equipment dynamically adjusts the first sleep cycle through the undervoltage times, so that the electronic equipment can obtain sufficient electric quantity and improve the response efficiency of the task instruction.
In addition, referring to fig. 4 again, the sleep method of the device provided in the embodiment of the present application further includes:
and step S104, if the real-time voltage value is greater than or equal to the preset voltage threshold, entering a sleep mode for sleeping for a third sleep period.
For clarity, the intelligent switch of one of the electronic devices is taken as an example and is explained in detail below.
The preset voltage threshold of the intelligent switch is set to be 3.3V, and a formula 150 × N is assumed to determine a first sleep cycle, wherein a unit is milliseconds (ms), N represents the number of times of undervoltage, 150 is a sleep base number, and adaptive adjustment can be performed according to actual requirements. The intelligent switch is awakened from the sleep mode for the 10 th time, and the historical undervoltage times are 3. The undervoltage times represent that the real-time voltage values of the intelligent switch are all smaller than 3.3V after the intelligent switch is awakened from the sleep mode for the 9 th time, the 8 th time and the 7 th time.
In a possible case, after the intelligent switch is awakened from the sleep mode for the 10 th time, the current real-time voltage value is acquired to be less than 3.3V. The intelligent switch is accumulated on the basis of 3, and the updated undervoltage frequency is 4. Based on the updated number of undervoltages, the smart switch calculates the first sleep period to be 600 ms by equation 150 x N.
In another possible case, after the intelligent switch is awakened, the current real-time voltage is greater than or equal to 3.3V. Therefore, the intelligent switch clears the undervoltage times, and determines the initial value of the first sleep cycle to be 250 milliseconds based on the cleared undervoltage times, wherein the 250 milliseconds can be adaptively adjusted according to actual requirements.
And because the electronic equipment wakes up from the sleep mode for the 10 th time, the undervoltage times are cleared, if the electronic equipment wakes up from the sleep mode for the 11 th time and the power supply voltage of the electronic equipment is less than 3.3V, the undervoltage times are accumulated again, namely the electronic equipment wakes up from the sleep mode for the 11 th time, and the updated undervoltage times are 1.
In addition, in the embodiment of the present application, the task instructions executed by the electronic device are divided into two types, which are a high power consumption instruction and a low power consumption instruction respectively. For example, the operation corresponding to the high power consumption instruction may be an operation related to network connection. The low power consumption instruction may correspond to an operation for controlling the load to be turned on and off. The high power consumption instructions are classified into a first category and a second category. The first category may be network entry instructions; the second category may be re-network instructions.
It should be noted that the electronic device needs to be communicatively connected to the gateway, so that the user can send task instructions to the electronic device through the gateway.
Therefore, before step S103, the electronic device receives a task instruction; and judging the category of the task instruction.
The task instruction is a task instruction currently executed by the electronic device. Due to the different power consumption requirements of different task instructions, the different task instructions need to be processed in a targeted manner.
If the task command belongs to the first category, the electronic device shuts down a load electrically connected with the electronic device.
If the task instruction belongs to the second category, the electronic device postpones execution until the real-time voltage is greater than or equal to the preset voltage threshold. And the voltage required for executing the first category of task instructions is greater than the voltage required for executing the second category of task instructions.
For different electronic devices, the high power consumption instruction has a certain difference. The above steps are exemplified by a zigbee (zigbee) protocol based intelligent switch. In the intelligent switch based on the zigbee protocol, the first class of instructions may be network access operation instructions based on the zigbee protocol, and the second class of instructions may be re-network instructions based on the zigbee protocol.
It should be understood that the operation corresponding to the network access operation instruction is a network protocol related operation required when the intelligent switch first joins the zigbee networking. The operation corresponding to the network re-entry 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 increased power consumption to search for the zigbee signal in space, and therefore, more energy is required to sustain the above operations. In view of the fact that a large amount of network interaction is required for network access operation, and then more energy is required, in the embodiment of the present application, the load controlled by the electronic device is turned off to further reduce power consumption.
It is worth mentioning that in the network architecture of the zigbee protocol, the gateway is used for forwarding and buffering messages. And after the intelligent switch is awakened from the sleep mode, the communication connection is established on the gateway based on the zigbee protocol. And once the gateway finds that the intelligent switch is connected into the network, the gateway sends the task instruction cached in the sleep mode of the intelligent switch to the intelligent switch. Of course, the task instruction can 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 network re-access operation needs to be executed currently based on the network state.
Additionally, it is contemplated that the proper operation of the electronic device is dependent upon the amount of power in the energy storage device 250. Therefore, in this embodiment of the present application, the device sleep method further includes:
when the electronic equipment is started for the first time, the electronic equipment is controlled to enter a sleep mode to sleep for a second sleep period. Alternatively, the second sleep period may be 1 s.
Because the electronic device is powered on for the first time, the energy storage device in the electronic device is in a dry state, and therefore, sufficient time is ensured for the energy storage device 250 of the electronic device to be fully charged through the second sleep cycle of the electronic device, so that the electronic device can normally work after being awakened from the sleep mode.
The following also takes the intelligent switch as an example, and provides a possible implementation manner for the device sleep method described above with reference to fig. 5, and the device sleep method is described in detail. Wherein, the preset voltage threshold of the intelligent switch is 3.3V.
When the intelligent switch is powered on and started, the intelligent switch is forced to enter a sleep mode for 1 s. After the intelligent switch sleeps for 1s, the intelligent switch is awakened from the sleep mode in response to an awakening signal, and initialization operation after power-on is carried out.
The initialization operation includes an initialization operation for each device in the intelligent switch and a parameter-dependent initialization operation. For example, the brownout times may be initialized to zero by a parameter initialization operation.
Further, the intelligent switch initializes the power supply voltage monitoring task. And the intelligent switch executes some basic instructions while initializing the power supply voltage monitoring task. The operation corresponding to the basic instruction may include an indicator light display state control operation, an apparatus temperature monitoring operation, and an apparatus 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 or closing the load; after the execution, the sleep mode is entered to sleep for 250 ms.
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 network re-access operation instruction.
If the network access operation instruction is received, the intelligent switch closes the load so as to further reduce the power consumption of the equipment. Meanwhile, after the intelligent switch executes 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 re-entry operation instruction is the network re-entry operation instruction, the intelligent switch also executes some initialization operations related to network operation, and then postpones the execution of the network re-entry operation instruction until the real-time voltage value is larger than or equal to the preset voltage threshold value.
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 running task instruction and updates the undervoltage times; and after determining the sleep period of the sleep mode based on the updated under-voltage times, entering the sleep mode for sleeping.
Based on the same inventive concept, the embodiment of the application also provides the equipment sleep device, and the equipment sleep device comprises at least one functional module which is stored in the memory in a software form. When the computer executable instruction corresponding to the equipment sleeping device is executed by the processor, the equipment sleeping method is realized. Referring to fig. 6, functionally, the device sleep apparatus 210 includes:
a voltage obtaining module 1101, configured to obtain a real-time voltage value.
In the embodiment of the present application, the voltage obtaining module 1101 is configured to execute step S101 in fig. 6, and please refer to the detailed description of step S101 for a detailed description of the voltage obtaining module 1101.
The device sleep module 1102 is configured to determine whether the real-time voltage value is smaller than a preset voltage threshold;
and if the real-time voltage value is smaller than the preset voltage threshold, entering a sleep mode to sleep for a first sleep period.
And if the real-time voltage is larger than or equal to the voltage threshold, entering a sleep mode for sleeping for a third sleep period.
In this embodiment of the application, the device sleep module 1102 is configured to execute step S102, step S103, and step S104 in fig. 4, and please refer to detailed descriptions of step S102, step S103, and step S104 for a detailed description of the device sleep module 1102.
The equipment sleep module is specifically used for acquiring the undervoltage times; determining a first sleep cycle according to the undervoltage times; and 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 a task instruction; judging the category of the task instruction; if the task instruction belongs to the first category, closing the load; and if the task instruction belongs to the second category, postponing execution 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 for a second sleep cycle when the device is started for the first time.
The device sleep module is further configured to enter a sleep mode for a third sleep cycle if the real-time voltage value is greater than or equal to the preset voltage threshold.
The voltage acquisition module is specifically used for acquiring the acquired voltage in the current preset sleep cycle; and filtering the acquired voltage to obtain a real-time voltage value.
The embodiment of the application also provides the 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 device sleep method described above.
An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored. The computer program, when executed by a processor, implements the device sleep method described above.
In summary, in the device sleep method, the device and the electronic device provided by the application, the electronic device determines whether the real-time voltage value is smaller than the 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, entering a sleep mode to sleep for a first sleep period. The sleep cycle of the electronic equipment is adjusted according to the current power supply condition, and sufficient charging time is provided for the electronic equipment, so that the electronic equipment can normally run under the condition of externally connecting a low-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 ways. The apparatus embodiments described above are merely illustrative, and for example, the flowchart 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, functional modules in the embodiments of the present application may be integrated together to form an independent part, or each module may exist alone, or two or more modules may be integrated to form an independent 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 or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to 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), a magnetic disk or an optical disk, and other various media capable of storing program codes.
It is noted that, herein, relational terms such as first and second, and the like may be 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. Also, 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 an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The above description is only for 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 conceive of changes or substitutions within the technical scope of the present application, and all such changes or substitutions are included 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 (11)

1. A device sleep method is applied to an electronic device, and comprises the following steps:
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, entering a sleep mode to sleep for a first sleep period.
2. The device sleep method according to claim 1, wherein the entering a sleep mode for a first sleep period if the real-time voltage value is smaller than the preset voltage threshold comprises:
acquiring the number of times of undervoltage;
determining the first sleep cycle according to the undervoltage times;
and executing a sleep instruction, and entering the sleep mode to sleep for the first sleep period.
3. The device sleep method according to claim 2, wherein the undervoltage times represent undervoltage times of the electronic device, and when the real-time voltage value is greater than or equal to the preset voltage threshold, the undervoltage times are cleared; otherwise, the undervoltage times are accumulated and updated.
4. The device sleep method as claimed in claim 2, wherein the first sleep cycle is positively correlated to the number of brownouts.
5. The device sleep method as claimed in claim 1, wherein before the entering sleep mode to sleep for the first sleep cycle, the method further comprises:
receiving a task instruction;
judging the category of the task instruction;
if the task instruction belongs to the first category, closing a load electrically connected with the electronic equipment;
if the task instruction belongs to a second category, postponing execution until the real-time voltage is greater than or equal to the preset voltage threshold;
wherein the voltage required for executing the first category of task instructions is greater than the voltage required for executing the second category of task instructions.
6. The device sleep method according to claim 1, wherein the obtaining of the real-time voltage value comprises:
acquiring the acquisition voltage in the current preset sleep period;
and filtering the acquired voltage to obtain the real-time voltage value.
7. The device sleep method according to any one of claims 1 to 6, characterized in that the method further comprises:
and entering the sleep mode to sleep for a second sleep period when the system is started for the first time.
8. The device sleep method according to any one of claims 1 to 6, characterized in that the method further comprises:
and if the real-time voltage value is greater than or equal to the preset voltage threshold, entering a third sleep cycle of the sleep mode.
9. An apparatus sleep device, comprising:
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, entering a sleep mode to sleep for a first sleep period.
10. An electronic device comprising a processor and a memory, the memory storing computer-executable instructions that, when executed by the processor, implement the device sleep method of any one of claims 1-8.
11. 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-8.
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 true CN114528026A (en) 2022-05-24
CN114528026B 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
CN114528026B (en) 2024-02-27

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
Han et al. Green home energy management system through comparison of energy usage between the same kinds of home appliances
Byun et al. Intelligent household LED lighting system considering energy efficiency and user satisfaction
US9337663B2 (en) Systems, devices, and methods for automation and energy management
AU2020244525B2 (en) Power consumption management method for electric devices, manager and management system
US8624430B2 (en) Standby power reduction
CN205847678U (en) A kind of intelligent LED energy-saving illuminator
EP3068069B1 (en) Network system and method for controlling the same
CN111480279B (en) Hybrid power control system, corresponding method and sensor device
CN107990483A (en) A kind of intelligent air conditioner control method, air conditioner and mobile phone
CN107272426B (en) Internet of things intelligent terminal node device for realizing remote monitoring and control method
CN112616178A (en) Energy consumption management method and device, electronic equipment and storage medium
CN105807918A (en) Control method, control device and wearable intelligent equipment
CN107703764B (en) Equipment control method and device
JP6243556B2 (en) Method and apparatus for electronic device power supply
CN103460543A (en) Control apparatus for an electrical load
Reinfurt et al. Internet of things patterns for devices: Powering, operating, and sensing
CN104879924A (en) Control method and intelligent control terminal for water heater
CN114528026B (en) Equipment sleep method and device and electronic equipment
CN102998981A (en) Electric appliance and method, device and system for standby control of electric appliance
CN112653127B (en) Energy storage scheduling method and system
CN112732062A (en) Energy management method and system for lightweight operation system of Internet of things terminal
CN114518706A (en) Equipment control method, device and system, intelligent equipment and storage medium
CN113687711A (en) Terminal wake-up circuit and wake-up method
CN105571267A (en) Refrigerator operation mode control method and device

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