Method and device for realizing low power consumption of embedded device
By determining the low power consumption conditions and switching status in embedded devices, the problem of high power consumption in the equipment during free, and achieve longer battery life and a better user experience.
Patent Information
- Application Number
- CN202111219692.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2021-09-30
- Filing Date
- 2021-10-20
- Publication Date
- 2025-01-28
- Estimated Expiration
- 2041-10-20
AI Technical Summary
The existing embedded devices based on RISC-V architecture still have power consumption when they are idle, affecting the battery life and user experience of the device.
By determining whether the device meets the conditions for entering the low power consumption state, the call state switch request to switch the device status to low power consumption state and perform power -off operations. This method provides a variety of low power consumption states, including a low power consumption state that needs to perform power -off operations.
Effectively reduce the power consumption of embedded equipment, extend the time of the equipment, and improve the adaptability of the embodiment.
Smart Images

Figure CN114035670B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of embedded device power consumption management, and in particular to a method and device for realizing low power consumption of an embedded device. Background Art
[0002] RISC-V is an open source instruction set architecture (ISA) based on the principles of the Reduced Instruction Set (RISC). Compared with most instruction sets, the RISC-V architecture can be freely used for any purpose, allowing anyone to design, manufacture and sell RISC-V chips and software. Therefore, more and more companies use the RISC-V architecture to design embedded devices.
[0003] At present, when embedded devices designed based on the RISC-V architecture have no tasks, the processor will be in an idle state, which has a certain reduction in power consumption compared to when working. However, since most embedded devices are powered by batteries, the capacity is limited by the size and weight of the battery. Therefore, in order to increase the battery life of embedded devices and improve the user experience, it is very important to further reduce their power consumption during the design of embedded devices. Summary of the invention
[0004] The technical problem to be solved by the present invention is to provide a low-power consumption implementation method and device for an embedded device, which can provide a variety of low-power consumption states for the embedded device, and especially provide a low-power consumption state that requires a power-off operation to be performed, which is conducive to further reducing the power consumption of the embedded device, thereby increasing the use time of the device, and can also determine whether to enter the first low-power consumption condition according to the first condition, thereby improving the adaptability of the implementation plan.
[0005] In order to solve the above technical problems, the first aspect of the present invention discloses a method for realizing low power consumption of an embedded device, the method comprising:
[0006] Determine whether the embedded device meets a first condition for entering a first low power consumption state in a low power consumption state; the low power consumption state includes the first low power consumption state and at least one second low power consumption state, and the power consumption corresponding to each second low power consumption state is higher than the power consumption corresponding to the first low power consumption state;
[0007] When it is determined that the embedded device meets the first condition, calling a state switching request to switch the state of the embedded device to the first low power consumption state;
[0008] When the state of the embedded device is switched to the first low power consumption state, the recovery data is saved and the embedded device is controlled to perform a power-off operation.
[0009] As an optional embodiment, in the first aspect of the present invention, the method further comprises:
[0010] Determining whether the embedded device meets a second condition for exiting the first low power consumption state;
[0011] When it is determined that the embedded device meets the second condition, the embedded device is controlled to perform a power recovery operation, and the embedded device is controlled to recover to the working state of the embedded device before the state switching request is called according to the recovery data.
[0012] As an optional implementation, in the first aspect of the present invention, the determining whether the embedded device satisfies a first condition for entering a first low power consumption state in a low power consumption state includes:
[0013] Determine whether the estimated duration of the embedded device being in the idle state is greater than or equal to a preset duration, and when it is determined that the estimated duration is greater than or equal to the preset duration, determine that the embedded device meets a first condition for entering a first low power consumption state in the low power consumption state; or,
[0014] Determine whether the maximum limit value of the delay duration corresponding to the embedded device is greater than or equal to the preset delay duration. When it is determined that the maximum limit value of the delay duration is greater than or equal to the preset delay duration, it is determined that the embedded device meets the first condition for entering the first low power consumption state in the low power consumption state.
[0015] As an optional implementation, in the first aspect of the present invention, before controlling the embedded device to perform a power-off operation, the method further includes:
[0016] Set the wakeup source;
[0017] And, determining whether the embedded device satisfies a second condition for exiting the first low power consumption state includes:
[0018] It is determined whether a wake-up signal sent by the wake-up source to wake up the embedded device is received, and when it is determined that the wake-up signal is received, it is determined that the embedded device meets the second condition for exiting the first low power consumption state.
[0019] As an optional implementation, in the first aspect of the present invention, after saving the recovery data and before controlling the embedded device to perform a power-off operation, the method further includes:
[0020] A wake-up entry is set; a storage space corresponding to the wake-up entry stores a preset recovery code;
[0021] And, controlling the embedded device to recover to the working state of the embedded device before invoking the state switching request according to the recovery data includes:
[0022] Reading the recovery code stored in the storage space corresponding to the wake-up entry;
[0023] The embedded device is controlled to be restored to the working state of the embedded device before the state switching request is called according to the restoration code and the restoration data.
[0024] As an optional implementation manner, in the first aspect of the present invention, the saving and recovery data includes:
[0025] Controlling the embedded device to save the first recovery data;
[0026] After the embedded device saves the first recovery data, controlling the embedded device to save the second recovery data;
[0027] And, controlling the embedded device to recover to the working state of the embedded device before invoking the state switching request according to the recovery code and the recovery data includes:
[0028] controlling the embedded device to be restored to a first state of the embedded device when the second restoration data is saved according to the second restoration data and the restoration code;
[0029] When it is detected that the embedded device enters the first state, the embedded device is controlled to be restored to the second state of the embedded device before the state switching request is called according to the first restoration data and the restoration code.
[0030] As an optional implementation, in the first aspect of the present invention, after controlling the embedded device to perform the power recovery operation, the method further includes:
[0031] Determining whether the state of the embedded device before executing the power recovery operation is the first low power consumption state;
[0032] When it is determined that the state of the embedded device before power failure is the first low power consumption state, the operation of controlling the embedded device to recover to the working state of the embedded device before calling the state switching request according to the recovery code and the recovery data is triggered.
[0033] A second aspect of the present invention discloses a low power consumption implementation device for an embedded device, the device comprising:
[0034] A first judgment module is used to judge whether the embedded device meets a first condition for entering a first low power consumption state in a low power consumption state; the low power consumption state includes the first low power consumption state and at least one second low power consumption state, and the power consumption corresponding to each second low power consumption state is higher than the power consumption corresponding to the first low power consumption state;
[0035] a calling module, configured to call a state switching request to switch the state of the embedded device to the first low power consumption state when the first judging module judges that the embedded device satisfies the first condition;
[0036] A saving module, used for saving recovery data when the state of the embedded device is switched to the first low power consumption state;
[0037] A power-off module is used to control the embedded device to perform a power-off operation after the saving module saves the recovery data.
[0038] As an optional implementation, in the second aspect of the present invention, the device further includes:
[0039] A second judgment module, used to judge whether the embedded device meets a second condition for exiting the first low power consumption state;
[0040] A power recovery module, configured to control the embedded device to perform a power recovery operation when the second judgment module determines that the embedded device satisfies the second condition;
[0041] The recovery state module is used to control the embedded device to recover to the working state of the embedded device before the calling module calls the state switching request according to the recovery data after the power recovery module controls the embedded device to perform the power recovery operation.
[0042] As an optional implementation, in the second aspect of the present invention, the first determination module determines whether the embedded device satisfies the first condition for entering the first low power consumption state in the low power consumption state in a manner specifically including:
[0043] Determine whether the estimated duration of the embedded device being in the idle state is greater than or equal to a preset duration, and when it is determined that the estimated duration is greater than or equal to the preset duration, determine that the embedded device meets a first condition for entering a first low power consumption state in the low power consumption state; or,
[0044] Determine whether the maximum limit value of the delay duration corresponding to the embedded device is greater than or equal to the preset delay duration. When it is determined that the maximum limit value of the delay duration is greater than or equal to the preset delay duration, it is determined that the embedded device meets the first condition for entering the first low power consumption state in the low power consumption state.
[0045] As an optional implementation, in the second aspect of the present invention, the device further includes:
[0046] A setting module, used for setting a wake-up source before the power-off module controls the embedded device to perform a power-off operation;
[0047] And, the second judgment module judges whether the embedded device meets the second condition for exiting the first low power consumption state in a manner that specifically includes:
[0048] It is determined whether a wake-up signal sent by the wake-up source to wake up the embedded device is received, and when it is determined that the wake-up signal is received, it is determined that the embedded device meets the second condition for exiting the first low power consumption state.
[0049] As an optional implementation, in the second aspect of the present invention, the setting module is further used to set a wake-up entry after the saving module saves the recovery data and before the power-off module controls the embedded device to perform a power-off operation; the storage space corresponding to the wake-up entry stores a preset recovery code;
[0050] And, the recovery state module includes:
[0051] A first recovery submodule, configured to read the recovery code stored in the storage space corresponding to the wake-up entry after the power recovery module controls the embedded device to perform a power recovery operation;
[0052] The second recovery submodule is used to control the embedded device to recover to the working state of the embedded device before the calling module calls the state switching request according to the recovery code and the recovery data after the first recovery submodule reads the recovery code stored in the storage space corresponding to the wake-up entry.
[0053] As an optional implementation, in the second aspect of the present invention, the manner in which the saving module saves the recovery data specifically includes:
[0054] Controlling the embedded device to save the first recovery data;
[0055] After the embedded device saves the first recovery data, controlling the embedded device to save the second recovery data;
[0056] And, the second recovery submodule controls the embedded device to recover to the working state of the embedded device before the calling module calls the state switching request according to the recovery code and the recovery data, specifically including:
[0057] controlling the embedded device to be restored to the first state of the embedded device when the saving module saves the second restoration data according to the second restoration data and the restoration code;
[0058] When it is detected that the embedded device enters the first state, the embedded device is controlled to be restored to the second state of the embedded device before the calling module calls the state switching request according to the first restoration data and the restoration code.
[0059] As an optional implementation, in the second aspect of the present invention, the device further includes:
[0060] The third judgment module is used to judge whether the state of the embedded device before executing the power recovery operation is the first low power consumption state; when it is judged that the state of the embedded device before power failure is the first low power consumption state, the recovery state module is triggered to execute the operation of controlling the embedded device to recover to the working state of the embedded device before the calling module calls the state switching request according to the recovery code and the recovery data.
[0061] A third aspect of the present invention discloses another low power consumption implementation device for an embedded device, the device comprising:
[0062] A memory storing executable program code;
[0063] a processor coupled to the memory;
[0064] The processor calls the executable program code stored in the memory to execute the low power consumption implementation method of the embedded device disclosed in the first aspect of the present invention.
[0065] The fourth aspect of the present invention discloses a computer storable medium, wherein the computer storage medium stores computer instructions, and when the computer instructions are called, they are used to execute the low power consumption implementation method of the embedded device disclosed in the first aspect of the present invention.
[0066] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:
[0067] In an embodiment of the present invention, it is determined whether the embedded device meets the first condition for entering the first low power state in the low power state; the low power state includes the first low power state and at least one second low power state, and the power consumption corresponding to each of the second low power state is higher than the power consumption corresponding to the first low power state; when it is determined that the embedded device meets the first condition, a state switching request is called to switch the state of the embedded device to the first low power state; when the state of the embedded device is switched to the first low power state, the recovery data is saved and the embedded device is controlled to perform a power-off operation. It can be seen that the implementation of the present invention can provide a variety of low power states for embedded devices, especially a low power state that requires a power-off operation, which is conducive to further reducing the power consumption of embedded devices, thereby increasing the use time of the device, and can also determine whether to enter the first low power condition according to the first condition, thereby improving the adaptability of the implementation plan. BRIEF DESCRIPTION OF THE DRAWINGS
[0068] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0069] Figure 1 It is a flowchart of a method for realizing low power consumption of an embedded device disclosed in an embodiment of the present invention;
[0070] Figure 2 It is a flowchart of another method for realizing low power consumption of an embedded device disclosed in an embodiment of the present invention;
[0071] Figure 3 It is a structural schematic diagram of a low power consumption implementation device for an embedded device disclosed in an embodiment of the present invention;
[0072] Figure 4 It is a structural schematic diagram of another low power consumption implementation device for embedded devices disclosed in an embodiment of the present invention;
[0073] Figure 5 It is a structural schematic diagram of another low-power consumption implementation device for an embedded device disclosed in an embodiment of the present invention. DETAILED DESCRIPTION
[0074] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0075] The terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish different objects rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, device, product or end including a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units that are not listed, or may optionally include other steps or units inherent to these processes, methods, products or ends.
[0076] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present invention. The appearance of the phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0077] The present invention discloses a method and device for realizing low power consumption of an embedded device, which can provide a variety of low power consumption states of the embedded device, and in particular, provide a low power consumption state that requires a power-off operation, which is conducive to further reducing the power consumption of the embedded device, thereby increasing the service life of the device, and can also determine whether to enter the first low power consumption condition according to a first condition, thereby improving the adaptability of the implementation scheme. The following are detailed descriptions.
[0078] Embodiment 1
[0079] See also Figure 1 , Figure 1 1 is a flow chart of a method for realizing low power consumption of an embedded device disclosed in an embodiment of the present invention. Figure 1 The method for implementing low power consumption of an embedded device described above can be applied to a management system of an embedded device or to a server of an embedded device, and the embodiment of the present invention does not limit this. Figure 1 As shown, the low power consumption implementation method of the embedded device may include the following operations:
[0080] 101. Determine whether the embedded device meets a first condition for entering a first low power consumption state in a low power consumption state. When the determination result of step 101 is yes, step 102 is triggered.
[0081] In the embodiment of the present invention, the embedded device may include at least one of a wearable device, a mobile device, electric-controlled furniture, and other electric-controlled devices. Among them, the wearable device includes a watch-type wearable device supported by the wrist (including products such as watches and wristbands), a shoe-type wearable device supported by the foot (including shoes, socks, or other leg-worn products in the future), a Glass-type wearable device supported by the head (including products such as glasses, helmets, headbands, etc.), and at least one of smart clothing-type wearable devices, schoolbag-type wearable devices, crutches-type wearable devices, and accessories-type wearable devices. Among them, the mobile device includes at least one of mobile terminals such as smart phones (Android phones, iOS phones, etc.), smart phone watches, tablet computers, PDAs, car computers, netbooks, personal digital assistants (PDAs), smart navigators, and mobile Internet devices (MIDs). Among them, the electronically controlled furniture includes at least one of air conditioners, refrigerators, televisions, hair dryers, sweeping robots, electronic curtains, range hoods, washing machines, cameras, electronic door locks, intercoms, dishwashers, air purifiers, humidifiers, electronic weighing scales, remote controls, water heaters, cooking machines, induction cookers, electric ceramic cookers, ovens, air fryers, and microwave ovens. Among them, other electronically controlled equipment includes at least one of elevators, electric meters, electronic water meters, electronic gas meters, access control systems, lighting systems, ventilation systems, LCD billboards, motorcycles, electric vehicles, traffic lights, remote-controlled rolling doors, and remote-controlled toys.
[0082] In an embodiment of the present invention, the low power consumption state may include a first low power consumption state, and may also include at least one second low power consumption state. Optionally, the power consumption corresponding to each second low power consumption state may be higher than the power consumption corresponding to the first low power consumption state. Optionally, the time required to recover from the first low power consumption state is much longer than the time required to recover from the second low power consumption state. Optionally, the first low power consumption state may be switched with the working state, and the second low power consumption state may be switched with the working state. Further, the first low power consumption state cannot be switched with the second low power consumption state. Among them, the working state may be when the embedded device is busy, and the low power consumption state may be when the embedded device is idle.
[0083] 102. When it is determined that the embedded device meets the first condition, call a state switching request to switch the state of the embedded device to a first low power consumption state.
[0084] In an embodiment of the present invention, an embedded device may be based on a RISC-V architecture and a single-core CPU. Optionally, the first low-power state of the embedded device may be implemented in M mode (Machine Mode). Optionally, the state switching request may include an SBI request. Specifically, calling the SBI request includes defining a HART_SUSPEND interface in Linux, and the Idle driver executes SBI_CALL (HART_SUSPEND). After calling the SBI request, the system of the embedded device based on the RISC-V architecture will switch from S mode (Supervisor Mode) to M mode. When the embedded device is in S mode, it works under the framework of the operating system, and optionally, it can work under the framework of the Linux operating system. Among them, the Idle driver can be implemented on the Linux side. When the embedded device is in M mode, it works under the framework of the firmware, and optionally, it can work under the framework of the Runtime firmware. Among them, the underlying operations of the CPU state (interrupts, CPU status registers, etc.) are implemented in the Runtime firmware. Among them, the OpenSBI interface can be selected to provide an open source reference implementation that complies with the RISC-V SBI specification for the Runtime firmware.
[0085] 103. When the state of the embedded device is switched to the first low power consumption state, the recovery data is saved and the embedded device is controlled to perform a power-off operation.
[0086] In an embodiment of the present invention, the embedded device is provided with a power management device. Optionally, the power management device may be a SUNXI platform Power Policy Unit (PPU). If the PPU module is initialized and enabled, the PPU module will automatically execute an operation of cutting off the power of the embedded device. Optionally, controlling the embedded device to perform a power-off operation may be controlling the embedded device to perform a power-off operation on a CPU and peripheral IPs in the embedded device.
[0087] It can be seen that the implementation of the embodiments of the present invention can provide a variety of low-power consumption states for embedded devices, especially a low-power consumption state that requires a power-off operation to be performed, which is conducive to further reducing the power consumption of embedded devices, thereby increasing the use time of the device, and can also determine whether to enter the first low-power consumption condition based on the first condition, thereby improving the adaptability of the implementation plan.
[0088] Embodiment 2
[0089] See also Figure 2 , Figure 2 1 is a flow chart of another method for realizing low power consumption of an embedded device disclosed in an embodiment of the present invention. Figure 2The method for implementing low power consumption of an embedded device described above can be applied to a management system of an embedded device or to a server of an embedded device, and the embodiment of the present invention does not limit this. Figure 2 As shown, the low power consumption implementation method of the embedded device may include the following operations:
[0090] 201. Determine whether the embedded device meets a first condition for entering a first low power consumption state in the low power consumption state.
[0091] 202. When it is determined that the embedded device meets the first condition, call a state switching request to switch the state of the embedded device to a first low power consumption state.
[0092] 203. When the state of the embedded device is switched to the first low power consumption state, the recovery data is saved and the embedded device is controlled to perform a power-off operation.
[0093] In the embodiment of the present invention, for other descriptions of steps 201-203, please refer to the detailed description of steps 101-103 in the first embodiment, and the embodiment of the present invention will not be repeated here.
[0094] 204. Determine whether the embedded device meets the second condition for exiting the first low power consumption state. When the determination result of step 204 is yes, step 205 is triggered.
[0095] 205. When it is determined that the embedded device meets the second condition, control the embedded device to execute a power recovery operation, and control the embedded device to recover to the working state of the embedded device before the state switching request is called according to the recovery data.
[0096] Optionally, restoring power operation may be achieved by disabling the PPU module.
[0097] It can be seen that the implementation of the embodiment of the present invention can automatically determine whether to exit the first power consumption condition according to the second condition, which helps to achieve automatic judgment and improve the accuracy of judgment. It can also control the embedded device to return to the working state according to the recovery data, which helps the normal operation of the embedded device.
[0098] In an optional embodiment, determining whether the embedded device meets a first condition for entering a first low power consumption state in a low power consumption state includes:
[0099] Determine whether the estimated duration of the embedded device being in the idle state is greater than or equal to a preset duration, and when it is determined that the estimated duration is greater than or equal to the preset duration, determine that the embedded device meets a first condition for entering a first low power consumption state in the low power consumption state; or,
[0100] Determine whether the maximum limit value of the delay duration corresponding to the embedded device is greater than or equal to the preset delay duration. When it is determined that the maximum limit value of the delay duration is greater than or equal to the preset delay duration, it is determined that the embedded device meets the first condition for entering the first low power consumption state in the low power consumption state.
[0101] Optionally, the maximum limit value of the delay time corresponding to the embedded device and the estimated time length during which the embedded device is in an idle state can be determined by using Menu Governor under the kernel framework. Further, MenuGovernor determines whether the first condition for entering the first low power consumption state in the low power consumption state is met based on the maximum limit value of the delay time corresponding to the embedded device and the estimated time length during which the embedded device is in an idle state.
[0102] It can be seen that implementing this optional embodiment can automatically determine whether the embedded device meets the first condition for entering the first low power state in the low power state based on the maximum limit value of the delay duration corresponding to the embedded device and the estimated duration that the embedded device is in the idle state, which helps to achieve automatic judgment and improve the accuracy of judging whether the first condition is met.
[0103] In yet another optional embodiment, before controlling the embedded device to perform a power-off operation, the method may further include:
[0104] Set the wakeup source.
[0105] And, optionally, determining whether the embedded device satisfies the second condition for exiting the first low power consumption state may include:
[0106] It is determined whether a wake-up signal sent by a wake-up source to wake up the embedded device is received. When it is determined that the wake-up signal is received, it is determined that the embedded device meets the second condition for exiting the first low power consumption state.
[0107] It can be seen that implementing this optional embodiment can determine whether the second condition for exiting the first low power consumption state is met according to the set wake-up source, which helps to achieve automatic judgment and improve the accuracy of judgment.
[0108] Optionally, the wake-up source can be configured according to the product characteristics of the embedded device. For example, when the embedded product is a headset, the wake-up source can be set to a tapping receiver, and a wake-up signal is sent when the tapping receiver receives a user tapping signal. It can be seen that the implementation of this optional embodiment can set a suitable wake-up source according to different product characteristics, which helps to improve the adaptability of the wake-up source application in different devices and expand the application scope of the solution.
[0109] In yet another optional embodiment, after saving the recovery data and before controlling the embedded device to perform a power-off operation, the method may further include:
[0110] Set up a wake-up entry.
[0111] Optionally, the wake-up entry (ENTRY POINT) is the address corresponding to the storage space storing the preset recovery code, and specifically, the address may be a physical address. Optionally, the storage space register includes at least one of a constant register, a vector register, a special purpose register, an instruction register, and an index register. Among them, the special purpose register includes at least one of a program counter, a stack register, and a status register (or a microprocessor status word group). Among them, the memory includes a random access memory (RAM) and / or a read-only memory (ROM). Among them, the external memory includes at least one of a hard disk memory, a floppy disk memory, an optical disk memory, and a U disk memory (also called a flash disk memory).
[0112] It can be seen that the implementation of this optional embodiment can find the recovery code stored in the storage space through the set wake-up entry, which helps the embedded device to accurately find the recovery code according to the wake-up entry, thereby improving efficiency and accuracy.
[0113] In yet another optional embodiment, controlling the embedded device to recover to the working state of the embedded device before the state switching request is called according to the recovery data may include:
[0114] Read the recovery code stored in the storage space corresponding to the wake-up entry;
[0115] The embedded device is controlled to be restored to the working state of the embedded device before the state switching request is called according to the restoration code and the restoration data.
[0116] It can be seen that implementing this optional embodiment can accurately find the recovery code according to the wake-up entry, improve efficiency and accuracy, and can also control the embedded device to recover to the working state according to the recovery code and recovery data, which is conducive to the normal operation of the embedded device.
[0117] In yet another optional embodiment, saving the recovery data may include:
[0118] Controlling the embedded device to save the first recovery data;
[0119] After the embedded device saves the first restoration data, the embedded device is controlled to save the second restoration data.
[0120] Optionally, the restored data may be a corresponding context. Optionally, the first restored data may be a context corresponding to the first saving, and the second restored data may be a context corresponding to the second saving after the first saving.
[0121] It can be seen that implementing this optional embodiment can save the recovery data twice, which helps to provide data support for the recovery of data and / or state of the embedded device and helps to smoothly carry out the state recovery.
[0122] In yet another optional embodiment, controlling the embedded device to save the second restoration data may include:
[0123] Control the embedded device to save the data of the operator;
[0124] Control embedded devices to save data of PLIC interrupt controller based on RISC-V architecture;
[0125] Control the embedded device to save the data in the CSR registers corresponding to the M mode and S mode based on the RISC-V architecture;
[0126] Control embedded devices to save data of the PMP physical memory protection module based on the RISC-V architecture;
[0127] Control embedded devices to save data in GPR general registers based on RISC-V architecture;
[0128] In this optional embodiment, the operator can be used to calculate floating points and / or vectors.
[0129] It can be seen that implementing this optional embodiment can save the data of the operator, PLIC interrupt controller, CSR register, PMP physical memory protection module and GPR general register, which helps to provide data support for the recovery of data and / or state of the embedded device and helps the smooth recovery of state.
[0130] In yet another optional embodiment, controlling the embedded device to recover to the working state of the embedded device before the state switching request is called according to the recovery code and the recovery data may include:
[0131] controlling the embedded device to recover to the first state of the embedded device when the second recovery data is saved according to the second recovery data and the recovery code;
[0132] When it is detected that the embedded device enters the first state, the embedded device is controlled to be restored to the second state of the embedded device before the state switching request is called according to the first restoration data and the restoration code.
[0133] It can be seen that the implementation of this optional embodiment can recover from the low power consumption state to the working state in two steps. First, the embedded device is controlled to enter the first state according to the second recovery data and the recovery code, and then the embedded device is controlled to enter the second state, that is, the working state, according to the second recovery data and the recovery code. This helps to trace the steps when errors occur during the recovery process, and also helps to adapt to complex application situations to avoid situations where errors are prone to occur due to excessive state changes during the recovery process, thereby helping the recovery process to proceed smoothly.
[0134] In yet another optional embodiment, controlling the embedded device to recover to the second state of the embedded device before the state switching request is called according to the first recovery data and the recovery code may include:
[0135] Restore the general register GPR according to the data in the saved GPR general register;
[0136] According to the saved data in the CSR registers corresponding to the M mode and the S mode, respectively, the CSR registers corresponding to the M mode and the S mode are restored;
[0137] Restore the PMP physical memory protection module according to the saved data of the PMP physical memory protection module;
[0138] Restore the PLIC interrupt controller according to the saved data of the PLIC interrupt controller;
[0139] Restore the calculator based on the saved calculator data.
[0140] It can be seen that implementing this optional embodiment can restore the hardware corresponding to the embedded device to a working state according to the data of the operator, PLIC interrupt controller, CSR register, PMP physical memory protection module and GPR general register, which helps the normal operation of the embedded device.
[0141] In yet another optional embodiment, after controlling the embedded device to perform the power recovery operation, the method may further include:
[0142] Determining whether the state of the embedded device before executing the power recovery operation is a first low power consumption state;
[0143] When it is determined that the state of the embedded device before power failure is the first low power consumption state, an operation of controlling the embedded device to recover to the working state of the embedded device before the state switching request is called according to the recovery code and the recovery data is triggered.
[0144] It can be seen that the implementation of this optional embodiment can determine whether the embedded device was in the first low power consumption state before power failure each time the power is restored. If it was in the first low power consumption state before power failure, it triggers the execution of the operation of resuming the working state, thereby increasing the prerequisite for executing the operation of resuming the working state, which helps to improve the accuracy of judging whether to execute the operation of resuming the working state.
[0145] In yet another optional embodiment, before determining whether the embedded device satisfies a first condition for entering a first low power consumption state in a low power consumption state, the method further includes:
[0146] Determining whether the embedded device meets a third condition for entering a second low power consumption state in the low power consumption state;
[0147] When it is determined that the embedded device meets the third condition, the embedded device is controlled to enter an idle state; the embedded device does not work in the idle state.
[0148] Optionally, the second low power consumption state in the low power consumption can be that the processor of the embedded device enters the WFI state. Wherein, the states of the CPU and peripheral IP registers of the embedded device do not change in the WFI state. Wherein, the process of entering the WFI state is completed in the S mode. Optionally, whether the third condition for entering the second low power consumption is met can be judged by the Menu Governor under the kernel framework. It can be seen that the implementation of this optional embodiment can provide another low power consumption state scheme under the third condition, which is helpful to implement the corresponding low power consumption state scheme according to different conditions in practice and improve the adaptability of the scheme.
[0149] In this optional embodiment, as an optional implementation, the fourth condition for waking up the embedded device from the second low power consumption state can be any asynchronous exception occurring in the embedded device, and when the embedded device meets the fourth condition, the embedded device is controlled to recover to the working state. The asynchronous exception can be an interrupt. Optionally, the entry and wake-up of the second low power consumption state in low power consumption are both completed in Linux, and the driver code design conforms to the kernel architecture.
[0150] It can be seen that implementing this optional embodiment can automatically determine whether the embedded device meets the fourth condition based on whether the embedded device sends an asynchronous exception, which helps to achieve automatic judgment and improve the accuracy of the judgment. It can also control the embedded device to return to the working state when the fourth condition is met, which helps the normal operation of the embedded device.
[0151] Embodiment 3
[0152] See also Figure 3 , Figure 3 Schematic diagram of a low power consumption implementation device for an embedded device disclosed in an embodiment of the present invention. Figure 3 The described low power consumption implementation device for embedded devices can be applied to a management system of embedded devices or to a server of embedded devices, which is not limited in the embodiments of the present invention. Figure 3 As shown, the low power consumption implementation device of the embedded device may include:
[0153] A first judgment module 301 is used to judge whether the embedded device meets a first condition for entering a first low power consumption state in a low power consumption state; the low power consumption state includes a first low power consumption state and at least one second low power consumption state, and the power consumption corresponding to each second low power consumption state is higher than the power consumption corresponding to the first low power consumption state;
[0154] The calling module 302 is configured to call a state switching request to switch the state of the embedded device to a first low power consumption state when the first judging module 301 judges that the embedded device satisfies the first condition;
[0155] A saving module 303, configured to save the recovery data when the state of the embedded device is switched to the first low power consumption state;
[0156] The power-off module 304 is used to control the embedded device to perform a power-off operation after the saving module 303 saves the recovery data.
[0157] In the embodiment of the present invention, the embedded device may include at least one of a wearable device, a mobile device, electric-controlled furniture, and other electric-controlled devices. Among them, the wearable device includes a watch-type wearable device supported by the wrist (including products such as watches and wristbands), a shoe-type wearable device supported by the foot (including shoes, socks, or other leg-worn products in the future), a Glass-type wearable device supported by the head (including products such as glasses, helmets, headbands, etc.), and at least one of smart clothing-type wearable devices, schoolbag-type wearable devices, crutches-type wearable devices, and accessories-type wearable devices. Among them, the mobile device includes at least one of mobile terminals such as smart phones (Android phones, iOS phones, etc.), smart phone watches, tablet computers, PDAs, car computers, netbooks, personal digital assistants (PDAs), smart navigators, and mobile Internet devices (MIDs). Among them, the electronically controlled furniture includes at least one of air conditioners, refrigerators, televisions, hair dryers, sweeping robots, electronic curtains, range hoods, washing machines, cameras, electronic door locks, intercoms, dishwashers, air purifiers, humidifiers, electronic weighing scales, remote controls, water heaters, cooking machines, induction cookers, electric ceramic cookers, ovens, air fryers, and microwave ovens. Among them, other electronically controlled equipment includes at least one of elevators, electric meters, electronic water meters, electronic gas meters, access control systems, lighting systems, ventilation systems, LCD billboards, motorcycles, electric vehicles, traffic lights, remote-controlled rolling doors, and remote-controlled toys.
[0158] In an embodiment of the present invention, the low power consumption state may include a first low power consumption state, and may also include at least one second low power consumption state. Optionally, the power consumption corresponding to each second low power consumption state may be higher than the power consumption corresponding to the first low power consumption state. Optionally, the time required to recover from the first low power consumption state is much longer than the time required to recover from the second low power consumption state. Optionally, the first low power consumption state may be switched with the working state, and the second low power consumption state may be switched with the working state. Further, the first low power consumption state cannot be switched with the second low power consumption state. Among them, the working state may be when the embedded device is busy, and the low power consumption state may be when the embedded device is idle.
[0159] In an embodiment of the present invention, an embedded device may be based on a RISC-V architecture and a single-core CPU. Optionally, the first low-power state of the embedded device may be implemented in M mode (Machine Mode). Optionally, the state switching request may include an SBI request. Specifically, calling the SBI request includes defining a HART_SUSPEND interface in Linux, and the Idle driver executes SBI_CALL (HART_SUSPEND). After calling the SBI request, the system of the embedded device based on the RISC-V architecture will switch from S mode (Supervisor Mode) to M mode. When the embedded device is in S mode, it works under the framework of the operating system, and optionally, it can work under the framework of the Linux operating system. Among them, the Idle driver can be implemented on the Linux side. When the embedded device is in M mode, it works under the framework of the firmware, and optionally, it can work under the framework of the Runtime firmware. Among them, the underlying operations of the CPU state (interrupts, CPU status registers, etc.) are implemented in the Runtime firmware. Among them, the OpenSBI interface can be selected to provide an open source reference implementation that complies with the RISC-V SBI specification for the Runtime firmware.
[0160] In an embodiment of the present invention, the embedded device is provided with a power management device. Optionally, the power management device may be a SUNXI platform Power Policy Unit (PPU). If the PPU module is initialized and enabled, the PPU module will automatically execute an operation of cutting off the power of the embedded device. Optionally, controlling the embedded device to perform a power-off operation may be controlling the embedded device to perform a power-off operation on a CPU and peripheral IPs in the embedded device.
[0161] It can be seen that the implementation of the embodiments of the present invention can provide a variety of low-power consumption states for embedded devices, especially a low-power consumption state that requires a power-off operation to be performed, which is conducive to further reducing the power consumption of embedded devices, thereby increasing the use time of the device, and can also determine whether to enter the first low-power consumption condition based on the first condition, thereby improving the adaptability of the implementation plan.
[0162] In an optional embodiment, if Figure 4 As shown, the device may also include:
[0163] A second determination module 305, configured to determine whether the embedded device satisfies a second condition for exiting the first low power consumption state;
[0164] The power recovery module 306 is used to control the embedded device to perform a power recovery operation when the second judgment module 305 judges that the embedded device meets the second condition;
[0165] The state recovery module 307 is used to control the embedded device to recover to the working state of the embedded device before the calling module 302 calls the state switching request according to the recovery data after the power recovery module 306 controls the embedded device to execute the power recovery operation.
[0166] Optionally, restoring power operation may be achieved by disabling the PPU module.
[0167] It can be seen that implementing this optional embodiment can automatically determine whether to exit the first power consumption condition according to the second condition, which helps to achieve automatic judgment and improve the accuracy of judgment. It can also control the embedded device to return to the working state according to the recovery data, which helps the normal operation of the embedded device.
[0168] In yet another optional embodiment, Figure 4 As shown, the first determination module 301 determines whether the embedded device meets the first condition for entering the first low power consumption state in the low power consumption state, which may specifically include:
[0169] Determine whether the estimated duration of the embedded device being in the idle state is greater than or equal to a preset duration, and when it is determined that the estimated duration is greater than or equal to the preset duration, determine that the embedded device meets a first condition for entering a first low power consumption state in the low power consumption state; or,
[0170] Determine whether the maximum limit value of the delay duration corresponding to the embedded device is greater than or equal to the preset delay duration. When it is determined that the maximum limit value of the delay duration is greater than or equal to the preset delay duration, it is determined that the embedded device meets the first condition for entering the first low power consumption state in the low power consumption state.
[0171] Optionally, the maximum limit value of the delay time corresponding to the embedded device and the estimated time length during which the embedded device is in an idle state can be determined by using Menu Governor under the kernel framework. Further, MenuGovernor determines whether the first condition for entering the first low power consumption state in the low power consumption state is met based on the maximum limit value of the delay time corresponding to the embedded device and the estimated time length during which the embedded device is in an idle state.
[0172] It can be seen that implementing this optional embodiment can automatically determine whether the embedded device meets the first condition for entering the first low power state in the low power state based on the maximum limit value of the delay duration corresponding to the embedded device and the estimated duration that the embedded device is in the idle state, which helps to achieve automatic judgment and improve the accuracy of judging whether the first condition is met.
[0173] In yet another optional embodiment, Figure 4 As shown, the device may also include:
[0174] A setting module 308, used for setting a wake-up source before the power-off module 304 controls the embedded device to perform a power-off operation;
[0175] And, the second determination module 305 determines whether the embedded device meets the second condition for exiting the first low power consumption state in the following manner:
[0176] It is determined whether a wake-up signal sent by a wake-up source to wake up the embedded device is received. When it is determined that the wake-up signal is received, it is determined that the embedded device meets the second condition for exiting the first low power consumption state.
[0177] It can be seen that implementing this optional embodiment can determine whether the second condition for exiting the first low power consumption state is met according to the set wake-up source, which helps to achieve automatic judgment and improve the accuracy of judgment.
[0178] Optionally, the wake-up source can be configured according to the product characteristics of the embedded device. For example, when the embedded product is a headset, the wake-up source can be set to a tapping receiver, and a wake-up signal is sent when the tapping receiver receives a user tapping signal. It can be seen that the implementation of this optional embodiment can set a suitable wake-up source according to different product characteristics, which helps to improve the adaptability of the wake-up source application in different devices and expand the application scope of the solution.
[0179] In yet another optional embodiment, Figure 4 As shown, the setting module 308 is also used to set a wake-up entry after the saving module 303 saves the recovery data and before the power-off module 304 controls the embedded device to perform a power-off operation; the storage space corresponding to the wake-up entry stores a preset recovery code;
[0180] And, the recovery state module 307 may include:
[0181] The first recovery submodule 3071 is used to read the recovery code stored in the storage space corresponding to the wake-up entry after the power recovery module 306 controls the embedded device to perform the power recovery operation;
[0182] The second recovery submodule 3072 is used to control the embedded device to recover to the working state of the embedded device before the calling module 302 calls the state switching request according to the recovery code and the recovery data after the first recovery submodule 3071 reads the recovery code stored in the storage space corresponding to the wake-up entry.
[0183] Optionally, the wake-up entry (ENTRY POINT) is the address corresponding to the storage space storing the preset recovery code, and specifically, the address may be a physical address. Optionally, the storage space register includes at least one of a constant register, a vector register, a special purpose register, an instruction register, and an index register. Among them, the special purpose register includes at least one of a program counter, a stack register, and a status register (or a microprocessor status word group). Among them, the memory includes a random access memory (RAM) and / or a read-only memory (ROM). Among them, the external memory includes at least one of a hard disk memory, a floppy disk memory, an optical disk memory, and a U disk memory (also called a flash disk memory).
[0184] It can be seen that implementing this optional embodiment can accurately find the recovery code according to the wake-up entry, improve efficiency and accuracy, and can also control the embedded device to recover to the working state according to the recovery code and recovery data, which is conducive to the normal operation of the embedded device.
[0185] In yet another optional embodiment, Figure 4 As shown, the method of saving the recovery data by the saving module 303 may specifically include:
[0186] Controlling the embedded device to save the first recovery data;
[0187] After the embedded device saves the first restoration data, the embedded device is controlled to save the second restoration data.
[0188] Optionally, the restored data may be a corresponding context. Optionally, the first restored data may be a context corresponding to the first saving, and the second restored data may be a context corresponding to the second saving after the first saving.
[0189] It can be seen that implementing this optional embodiment can save the recovery data twice, which helps to provide data support for the recovery of data and / or state of the embedded device and helps to smoothly carry out the state recovery.
[0190] In another optional embodiment, the second recovery submodule 3072 controls the embedded device to recover to the working state of the embedded device before the calling module 302 calls the state switching request according to the recovery code and the recovery data, specifically including:
[0191] Control the embedded device to recover to the first state of the embedded device when the saving module 303 saves the second recovery data according to the second recovery data and the recovery code;
[0192] When it is detected that the embedded device enters the first state, the embedded device is controlled to be restored to the second state of the embedded device before the calling module 302 calls the state switching request according to the first restoration data and the restoration code.
[0193] It can be seen that the implementation of this optional embodiment can recover from the low power consumption state to the working state in two steps. First, the embedded device is controlled to enter the first state according to the second recovery data and the recovery code, and then the embedded device is controlled to enter the second state, that is, the working state, according to the second recovery data and the recovery code. This helps to trace the steps when errors occur during the recovery process, and also helps to adapt to complex application situations to avoid situations where errors are prone to occur due to excessive state changes during the recovery process, thereby helping the recovery process to proceed smoothly.
[0194] In yet another optional embodiment, Figure 4 As shown, the device may also include:
[0195] The third judgment module 309 is used to judge whether the state of the embedded device before executing the power recovery operation is the first low power consumption state; when it is judged that the state of the embedded device before power failure is the first low power consumption state, the recovery state module 307 is triggered to control the embedded device to recover to the working state of the embedded device before the calling module 302 calls the state switching request according to the recovery code and recovery data.
[0196] It can be seen that the implementation of this optional embodiment can determine whether the embedded device was in the first low power consumption state before power failure each time the power is restored. If it was in the first low power consumption state before power failure, it triggers the execution of the operation of resuming the working state, thereby increasing the prerequisite for executing the operation of resuming the working state, which helps to improve the accuracy of judging whether to execute the operation of resuming the working state.
[0197] Embodiment 4
[0198] See also Figure 5 , Figure 5 FIG. 1 is a schematic diagram of a structure of another low-power implementation device for an embedded device disclosed in an embodiment of the present invention. Figure 5 As shown, the low power consumption implementation device of the embedded device may include:
[0199] A memory 401 storing executable program codes;
[0200] a processor 402 coupled to the memory 401;
[0201] The processor 402 calls the executable program code stored in the memory 401 to execute the steps in the low power consumption implementation method of the embedded device described in the first embodiment of the present invention or the second embodiment of the present invention.
[0202] Embodiment 5
[0203] The embodiment of the present invention discloses a computer storable medium, which stores computer instructions. When the computer instructions are called, they are used to execute the steps in the low power consumption implementation method of the embedded device described in the first embodiment of the present invention or the second embodiment of the present invention.
[0204] Embodiment 6
[0205] An embodiment of the present invention discloses a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to enable a computer to execute the steps in the low power consumption implementation method of an embedded device described in Embodiment 1 or Embodiment 2.
[0206] The device embodiments described above are only illustrative, wherein the modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, i.e., they may be located in one place, or they may be distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Those of ordinary skill in the art may understand and implement it without creative work.
[0207] Through the specific description of the above embodiments, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on such an understanding, the above technical solution can be essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, and the storage medium includes a read-only memory (ROM), a random access memory (RAM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), a one-time programmable read-only memory (OTPROM), an electronically erasable rewritable read-only memory (EEPROM), a compact disc (CD-ROM) or other optical disc storage, magnetic disk storage, magnetic tape storage, or any other computer-readable medium that can be used to carry or store data.
[0208] Finally, it should be noted that the low-power implementation method and device for an embedded device disclosed in the embodiment of the present invention discloses only the preferred embodiments of the present invention, which are only used to illustrate the technical solution of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, a person of ordinary skill in the art should understand that the technical solutions described in the aforementioned embodiments can still be modified, or some of the technical features therein can be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.
Claims
1. A method for realizing low power consumption of an embedded device, characterized in that: The method comprises: Determine whether the embedded device meets a first condition for entering a first low power consumption state in a low power consumption state; the low power consumption state includes the first low power consumption state and at least one second low power consumption state, and the power consumption corresponding to each second low power consumption state is higher than the power consumption corresponding to the first low power consumption state; When it is determined that the embedded device meets the first condition, calling a state switching request to switch the state of the embedded device to the first low power consumption state; When the state of the embedded device is switched to the first low power consumption state, saving the recovery data, and controlling the embedded device to perform a power-off operation; The first low power state cannot be switched to the second low power state, and the first low power state and the working state are switched to each other, and the second low power state and the working state are switched to each other, and the second low power state includes the processor of the embedded device entering the WFI state; The step of determining whether the embedded device satisfies a first condition for entering a first low power consumption state in a low power consumption state includes: Determine whether the estimated duration that the embedded device is in an idle state is greater than or equal to a preset duration. When it is determined that the estimated duration is greater than or equal to the preset duration, determine that the embedded device meets a first condition for entering a first low power consumption state in a low power consumption state.
2. The method for realizing low power consumption of an embedded device according to claim 1, characterized in that: The method further comprises: Determining whether the embedded device meets a second condition for exiting the first low power consumption state; When it is determined that the embedded device meets the second condition, the embedded device is controlled to perform a power recovery operation, and the embedded device is controlled to recover to the working state of the embedded device before the state switching request is called according to the recovery data.
3. The method for realizing low power consumption of an embedded device according to claim 1 or 2, characterized in that: The determining whether the embedded device meets the first condition of entering the first low power consumption state in the low power consumption state further includes: Determine whether the maximum limit value of the delay duration corresponding to the embedded device is greater than or equal to the preset delay duration. When it is determined that the maximum limit value of the delay duration is greater than or equal to the preset delay duration, it is determined that the embedded device meets the first condition for entering the first low power consumption state in the low power consumption state.
4. The method for realizing low power consumption of an embedded device according to claim 2, characterized in that: Before controlling the embedded device to perform a power-off operation, the method further includes: Set the wakeup source; And, determining whether the embedded device satisfies a second condition for exiting the first low power consumption state includes: It is determined whether a wake-up signal sent by the wake-up source to wake up the embedded device is received, and when it is determined that the wake-up signal is received, it is determined that the embedded device meets the second condition for exiting the first low power consumption state.
5. The method for realizing low power consumption of an embedded device according to claim 2, characterized in that: After saving the recovery data and before controlling the embedded device to perform a power-off operation, the method further includes: A wake-up entry is set; a storage space corresponding to the wake-up entry stores a preset recovery code; And, controlling the embedded device to recover to the working state of the embedded device before invoking the state switching request according to the recovery data includes: Reading the recovery code stored in the storage space corresponding to the wake-up entry; The embedded device is controlled to be restored to the working state of the embedded device before the state switching request is called according to the restoration code and the restoration data.
6. The method for realizing low power consumption of an embedded device according to claim 5, characterized in that: The saving and recovery of data comprises: Controlling the embedded device to save the first recovery data; After the embedded device saves the first recovery data, controlling the embedded device to save the second recovery data; And, controlling the embedded device to recover to the working state of the embedded device before invoking the state switching request according to the recovery code and the recovery data includes: controlling the embedded device to be restored to a first state of the embedded device when the second restoration data is saved according to the second restoration data and the restoration code; When it is detected that the embedded device enters the first state, the embedded device is controlled to be restored to the second state of the embedded device before the state switching request is called according to the first restoration data and the restoration code.
7. The method for realizing low power consumption of an embedded device according to claim 6, characterized in that: After controlling the embedded device to perform the power recovery operation, the method further includes: Determining whether the state of the embedded device before executing the power recovery operation is the first low power consumption state; When it is determined that the state of the embedded device before power failure is the first low power consumption state, the operation of controlling the embedded device to recover to the working state of the embedded device before calling the state switching request according to the recovery code and the recovery data is triggered.
8. A low power consumption implementation device for an embedded device, characterized in that: The device is used to execute the low power consumption implementation method of the embedded device according to any one of claims 1 to 7, and the device includes: A first judgment module is used to judge whether the embedded device meets a first condition for entering a first low power consumption state in a low power consumption state; the low power consumption state includes the first low power consumption state and at least one second low power consumption state, and the power consumption corresponding to each second low power consumption state is higher than the power consumption corresponding to the first low power consumption state; a calling module, configured to call a state switching request to switch the state of the embedded device to the first low power consumption state when the first judging module judges that the embedded device satisfies the first condition; A saving module, used for saving recovery data when the state of the embedded device is switched to the first low power consumption state; A power-off module, used for controlling the embedded device to perform a power-off operation after the saving module saves the recovery data; Among them, the first low power consumption state cannot be switched with the second low power consumption state, and the first low power consumption state and the working state are switched with each other, and the second low power consumption state and the working state are switched with each other, and the second low power consumption state includes the processor of the embedded device entering the WFI state.
9. A low power consumption implementation device for an embedded device, characterized in that: The device comprises: A memory storing executable program code; a processor coupled to the memory; The processor calls the executable program code stored in the memory to execute the low power consumption implementation method of the embedded device as described in any one of claims 1-7.
10. A computer storable medium, characterized in that: The computer storage medium stores computer instructions, and when the computer instructions are called, they are used to execute the low power consumption implementation method of the embedded device according to any one of claims 1 to 7.
Citation Information
Patent Citations
Low-power-consumption mode data recovery method and device for solid state disk, computer equipment and storage medium
CN111913836A
Method and device for improving low-power-consumption efficiency of chip, computer equipment and medium
CN112346556A