[go: up one dir, main page]

WO2016127665A1 - 控制功耗的方法和装置 - Google Patents

控制功耗的方法和装置 Download PDF

Info

Publication number
WO2016127665A1
WO2016127665A1 PCT/CN2015/093230 CN2015093230W WO2016127665A1 WO 2016127665 A1 WO2016127665 A1 WO 2016127665A1 CN 2015093230 W CN2015093230 W CN 2015093230W WO 2016127665 A1 WO2016127665 A1 WO 2016127665A1
Authority
WO
WIPO (PCT)
Prior art keywords
task
monitoring
real
currently
triggered
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.)
Ceased
Application number
PCT/CN2015/093230
Other languages
English (en)
French (fr)
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.)
Xiaomi Inc
Original Assignee
Xiaomi Inc
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 Xiaomi Inc filed Critical Xiaomi Inc
Priority to JP2016574328A priority Critical patent/JP6250844B2/ja
Priority to KR1020157036598A priority patent/KR101729679B1/ko
Priority to MX2016002563A priority patent/MX356521B/es
Priority to RU2016113187A priority patent/RU2643516C2/ru
Publication of WO2016127665A1 publication Critical patent/WO2016127665A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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/32Means for saving power
    • G06F1/3203Power management, i.e. event-based initiation of a power-saving mode
    • G06F1/3234Power saving characterised by the action undertaken
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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/32Means for saving power
    • G06F1/3203Power management, i.e. event-based initiation of a power-saving mode
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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/32Means for saving power
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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/32Means for saving power
    • G06F1/3203Power management, i.e. event-based initiation of a power-saving mode
    • G06F1/3206Monitoring of events, devices or parameters that trigger a change in power modality
    • G06F1/3212Monitoring battery levels, e.g. power saving mode being initiated when battery voltage goes below a certain level

Definitions

  • the present disclosure relates to the field of smart devices, and in particular, to a method and apparatus for controlling power consumption.
  • Power management is very important in embedded systems, especially in some small battery-powered devices. Long standby time is an important part of a good user experience, and manufacturers of various devices are also trying their best to optimize power consumption.
  • the solution for power management on different devices often varies from device to device and varies depending on the application scenario.
  • the commonly used method of optimizing power consumption is based on the function of the product for power management, specific analysis of the specific product's working characteristics, and designing a corresponding power reduction scheme.
  • the attitude detector can stop sensor sampling when it is left standing for a long time, thereby reducing the power consumption of the attitude detector.
  • the present disclosure provides a method and apparatus for controlling power consumption to achieve uniform power consumption control without being limited by equipment.
  • a method of controlling power consumption comprising:
  • the determining the monitoring manner according to the type of the system includes:
  • the monitoring mode is determined as a way for the foreground to monitor the task triggered by the interrupted event in real time.
  • the real-time monitoring system currently has a task to be executed, including:
  • the determining the monitoring manner according to the type of the system includes:
  • the monitoring mode is determined as a method of monitoring tasks in real time according to priorities.
  • the real-time monitoring system currently has a task to be executed, including:
  • the operation of switching the system to a low power mode includes any one or more of the following:
  • the method further includes:
  • an apparatus for controlling power consumption comprising:
  • a monitoring module configured to monitor, in real time according to the monitoring manner, whether the system currently has a task to perform
  • the switching module is configured to switch the system to a low power mode when the result of the real time monitoring is that there is currently no task to execute.
  • the determining module includes:
  • the first determining sub-module is configured to determine, when the system is a system of the front-back type, a manner in which the monitoring mode is a real-time monitoring of the task triggered by the interrupted event.
  • the monitoring module includes:
  • a first monitoring sub-module configured to monitor, in a real loop of the system, whether a task triggered by an interrupted event is currently detected, and when a task is triggered by an interrupt event, determining that a current task is to be executed, when no task is When the interrupt event is triggered, it is determined that there is currently no task to execute.
  • the determining module includes:
  • the second determining sub-module is configured to determine, when the system is a real-time system that supports preemption, a monitoring mode is a manner of monitoring tasks in real time according to priorities.
  • the monitoring module includes:
  • a second monitoring submodule configured to monitor, in real time, whether a process of each priority is triggered, where a first process for performing handover to a low power mode has the lowest priority, when all processes except the first process are When none is triggered, it is determined that there is currently no task to execute, and when any process other than the first process is triggered, it is determined that there is currently a task execution.
  • the switching module includes:
  • the switching submodule is configured to perform any one or more of the following operations when the result of the real-time monitoring is that there is currently no task to perform: lowering the frequency of the central processing unit, lowering the power supply voltage of the micro control unit, and switching the micro control unit to Low power mode, stop powering the specified peripheral or stop the peripheral clock.
  • the switching module is further configured to stop the low power mode when an interrupt event occurs in real time
  • the device also includes:
  • a processing module configured to process the interrupt event monitored in real time.
  • an apparatus for controlling power consumption comprising:
  • processor executable instructions a processor and a memory for storing processor executable instructions
  • processor is configured to:
  • the technical solution provided by the embodiment of the present disclosure may include the following beneficial effects: determining a monitoring mode according to the type of the system, and monitoring, according to the monitoring mode, whether the system currently has a task to be executed, and when the result of the real-time monitoring is that no task is currently to be executed,
  • the system switches to low-power mode operation, implements general-purpose power control based on a unified and simple software architecture, facilitates the development framework, and introduces the software development kit (Software Development Kit, SDK for short) without analysis.
  • the specific working characteristics of the device are not limited by the function of the device. It is applicable to different types of devices, and the application is more extensive and flexible.
  • FIG. 1 is a flow chart showing a method of controlling power consumption, according to an exemplary embodiment.
  • FIG. 2 is a flow chart showing a method of controlling power consumption, according to another exemplary embodiment.
  • FIG. 3 is a flow chart showing a method of controlling power consumption, according to another exemplary embodiment.
  • FIG. 4 is a block diagram of an apparatus for controlling power consumption, according to another exemplary embodiment.
  • FIG. 5 is a block diagram of an apparatus for controlling power consumption, according to another exemplary embodiment.
  • FIG. 6 is a block diagram of an apparatus for controlling power consumption, according to another exemplary embodiment.
  • FIG. 7 is a block diagram of an apparatus for controlling power consumption, according to another exemplary embodiment.
  • FIG. 8 is a block diagram of an apparatus for controlling power consumption, according to another exemplary embodiment.
  • FIG. 9 is a block diagram of an apparatus for controlling power consumption, according to another exemplary embodiment.
  • FIG. 10 is a block diagram of an apparatus for controlling power consumption, according to another exemplary embodiment.
  • FIG. 11 is a block diagram of an apparatus for controlling power consumption, according to another exemplary embodiment.
  • FIG. 12 is a block diagram of an apparatus for controlling power consumption, according to another exemplary embodiment.
  • FIG. 13 is a block diagram of an apparatus for controlling power consumption, according to another exemplary embodiment.
  • the method and apparatus for controlling power consumption referred to in the present disclosure are applied to an electronic device including, but not limited to, a terminal, a server, a home appliance, and the like.
  • the terminal includes, but is not limited to, a computer, a mobile phone, a tablet, and the like.
  • the household electrical appliance includes, but is not limited to, a refrigerator, a washing machine, a microwave oven, an air conditioner, and the like.
  • the system to which the present disclosure refers refers to a system in the electronic device.
  • the system is an embedded system.
  • the type of the system is not limited, such as a system that can be a front-back type, or a real-time system that supports preemption, and the like.
  • FIG. 1 is a flowchart of a method for controlling power consumption according to an exemplary embodiment. As shown in FIG. 1 , the method is used in an electronic device, and includes the following steps.
  • step S11 the monitoring mode is determined according to the type of the system.
  • the system refers to a system of an electronic device, including but not limited to: a front-back type system, a real-time system that supports preemption, and the like.
  • This monitoring method is used to monitor whether the system has tasks to perform, and the monitoring methods are different for different types of systems.
  • step S12 the system is monitored in real time according to the monitoring mode whether the system currently has a task to execute.
  • the power consumption cannot be reduced to ensure the normal execution of the task; when the system has no task to execute, the power consumption can usually be reduced, thereby saving power for the electronic device and saving valuable. resource of.
  • step S13 when the result of the real-time monitoring is that there is currently no task to execute, the system is switched to the low power mode operation.
  • the working mode of the system can be divided into a normal working mode and a low power consumption mode.
  • a normal working mode when the system performs the task, it is in the normal working mode, and when the system does not perform the task, it is in the low power mode.
  • the system consumes less power in this low-power mode than in normal operating mode, which saves power and improves the performance of electronic devices.
  • determining the monitoring manner according to the type of the system may include:
  • determining the monitoring mode is a way for the foreground to monitor the task triggered by the interrupted event in real time;
  • the monitoring mode is a method of monitoring tasks in real time according to priorities.
  • the real-time monitoring system when the system is a front-back type system, the real-time monitoring system according to the monitoring mode has a task to be executed, which may include:
  • the real-time monitoring system when the system is a real-time system that supports the preemption, has a task to be executed, which may include:
  • the system is switched to the low power mode, and may include, but is not limited to, any one or more of the following:
  • Reduce the frequency of the central processing unit reduce the supply voltage of the Micro Control Unit (MCU), switch the micro control unit to the low power mode, stop supplying power to the specified peripherals, or stop the peripheral clock.
  • MCU Micro Control Unit
  • the foregoing method may further include:
  • the foregoing method provided in this embodiment determines the monitoring mode according to the type of the system, and monitors whether the system currently has a task to execute according to the monitoring mode.
  • the system is switched to low power consumption.
  • Mode work, based on a unified, concise software architecture to achieve universal power control, easy to implement the development framework, launch the device SDK, and without analyzing the specific working characteristics of the device, not limited by the device function, for different types of devices Applicable, the application is more extensive and flexible.
  • FIG. 2 is a flowchart of a method for controlling power consumption according to another exemplary embodiment. As shown in FIG. 2, the method is used in an electronic device, and includes the following steps.
  • step S21 when the system is a front-back type system, the monitoring mode is determined as a way for the foreground to monitor the task triggered by the interrupted event in real time.
  • the system of the front and back type refers to the system working in the way of the foreground and the background.
  • the foreground is used to monitor interrupt events and the background is used to perform specific tasks.
  • the interrupt event monitored by the foreground can trigger the corresponding task in the background.
  • the system also has a task queue (task_queue), all the tasks to be executed are queued for processing in the queue, and the main loop is called.
  • the corresponding task execution function handles the corresponding task.
  • step S22 in the main loop of the system, real-time monitoring whether there is currently a task triggered by the interrupt event, if no task is triggered by the interrupt event, step S23 is performed; if a task is triggered by the interrupt event, execution is performed Step S25.
  • different types of interrupt events may or may not trigger the task.
  • the task is dispatched to the task queue of the main loop, so it can be determined that there is currently a task to execute.
  • the task queue of the main loop is empty, so it can be determined that there is currently no task to execute.
  • step S23 it is determined that there is currently no task to perform.
  • step S24 the system is switched to the low power mode operation, and the flow ends.
  • the system is switched to the low power mode, and may include but is not limited to any one or more of the following:
  • the specified peripheral device may be a non-working peripheral device or the like, and the present disclosure is not limited.
  • step S25 it is determined that there is currently a task to be executed.
  • step S26 the low power mode is stopped and the interrupt event is processed, and the flow ends.
  • the judgment may be performed in the main loop of the front and back system. If there is a task in the task queue that needs to be executed, the corresponding task execution function is called to perform corresponding task processing, if there is no task in the task queue. If it needs to be executed, the low power mode function is called to switch the system to low power mode.
  • While(1) is the main loop, and While(has_task_in_queue(task_queue)) is the task queue processing function.
  • the function Execute_task() is called to execute the corresponding task. If there is a task in the task queue that is not satisfied, the function Enter_lowpower_mode() is executed to switch the system to low power mode.
  • the interrupt event can wake up the system from the low power mode, thereby triggering the system to perform the corresponding task.
  • the front-end system determines the monitoring mode as the manner in which the foreground triggers the task triggered by the interrupted event in real time, and monitors whether the system currently has the task triggered by the interrupted event according to the monitoring mode, when the real-time monitoring is performed.
  • the result is that when there is no task to be executed, the system is switched to the low-power mode, the general-purpose power control is realized based on the unified and simple software architecture, the development framework is facilitated, and the SDK of the device is introduced, which is provided for the customer. Projects that can be used for secondary development of software frameworks are of great significance, and secondary developers do not need to care about power management.
  • it is not necessary to analyze the specific working characteristics of the device and is not limited by the function of the device, and is applicable to different types of devices, and the application is more extensive and flexible.
  • FIG. 3 is a flowchart of a method for controlling power consumption according to another exemplary embodiment. As shown in FIG. 3, the method is used in an electronic device, and includes the following steps.
  • step S31 when the system is a real-time system that supports preemption, it is determined that the monitoring mode is a manner of monitoring tasks in real time according to priorities.
  • the real-time system that supports preemption means that the system creates a process to perform tasks, and each process has different advantages.
  • the first-level, high-priority process is executed first, ensuring that high-priority tasks are prioritized.
  • step S32 it is monitored in real time whether the processes of the respective priorities are triggered, wherein the first process for performing the handover to the low power mode has the lowest priority; if all the processes except the first process are not triggered Then, step S33 is performed; if any other process except the first process is triggered, step S35 is performed.
  • the first process for performing the handover to the low power mode has the lowest priority, and the priority of any other process is higher than the first process, and is executed when all other processes are not triggered.
  • the first process will not be executed when any other process is triggered. This method ensures that the system enters the low-power mode when there is no task in the system, so that the normal execution of the task is not affected.
  • step S33 it is determined that there is currently no task to execute.
  • step S34 the system is switched to the low power mode operation, and the flow ends.
  • the system is switched to the low power mode, and may include but is not limited to any one or more of the following:
  • step S35 it is determined that there is currently a task execution.
  • step S36 the low power mode is stopped and the interrupt event is processed, and the flow ends.
  • lowest_priority_task() is the lowest priority process, which is used to trigger the switch to low power mode.
  • the process will be triggered automatically.
  • the function Enter_low_power_mode() is executed to switch the system to low power mode.
  • the process corresponding to the interrupt event has the highest priority.
  • the execution right of the first process is preempted, and the process corresponding to the interrupt event is triggered first, so that the process executes the corresponding process.
  • the function handles the task corresponding to the interrupt event, thereby waking up the system from the low power mode, ensuring that the high priority task is executed.
  • This kind of system enters the low-power mode mechanism when there is no task, that is, idle, which does not affect the real-time performance of the system, and can also realize power consumption management conveniently.
  • the foregoing method provided in this embodiment determines the monitoring mode of the real-time system supporting the preemption as a real-time monitoring task according to the priority, and monitors whether the system currently has a task to perform according to the monitoring mode, and the real-time monitoring result is that there is no task currently.
  • To execute switch the system to low-power mode, implement common power control based on a unified and simple software architecture, facilitate the development framework, launch the SDK of the device, and do not need to analyze the specific working characteristics of the device, Limited by the function of the device, it is applicable to different types of devices, and the application is more extensive and flexible.
  • FIG. 4 is a block diagram of a device for controlling power consumption, according to another exemplary embodiment.
  • the apparatus includes a determination module 121, a monitoring module 122, and a switching module 123.
  • the determining module 121 is configured to determine a monitoring mode based on the type of system.
  • the monitoring module 122 is configured to monitor in real time whether the system currently has a task to perform in accordance with the monitoring mode.
  • the switching module 123 is configured to switch the system to a low power mode operation when the result of the real time monitoring is that there is currently no task to execute.
  • the determining module 121 may include:
  • the first determining sub-module 121a is configured to determine, when the system is a system of the front-back type, a monitoring mode for the foreground to monitor the task triggered by the interrupted event in real time.
  • the monitoring module 122 may include:
  • the first monitoring sub-module 122a is configured to monitor, in the main loop of the system, whether there is a task triggered by an interrupted event in real time. When a task is triggered by an interrupt event, it is determined that the current task is to be executed, when there is no task. When triggered by an interrupt event, it is determined that there is currently no task to execute.
  • the determining module 121 may include:
  • the second determining sub-module 121b is configured to determine, when the system is a real-time system that supports preemption, the monitoring mode is a manner of monitoring tasks in real time according to priorities.
  • the monitoring module 122 may include:
  • a second monitoring sub-module 122b configured to monitor, in real time, whether a process of each priority is triggered, where a first process for performing handover to a low power mode has the lowest priority, when all processes except the first process are When none is triggered, it is determined that there is currently no task to execute. When any other process except the first process is triggered, it is determined that there is currently a task execution.
  • the switching module 123 may include:
  • the switching sub-module 123a is configured to perform any one or more of the following operations when the result of the real-time monitoring is that there is no task to be executed: reducing the frequency of the central processing unit, lowering the power supply voltage of the micro control unit, and switching the micro control unit To low power mode, stop powering the specified peripheral or stop the peripheral clock.
  • the switching module 123 is further configured to stop the low power mode when an interrupt event occurs in real time; the device may further include:
  • the processing module 124 is configured to process the interrupt event monitored in real time.
  • the foregoing apparatus provided in this embodiment may be applied to any type of electronic device, including but not limited to: a terminal, a server, or a home appliance.
  • the device provided in this embodiment determines the monitoring mode according to the type of the system, and monitors whether the system currently has a task to execute according to the monitoring mode. When the result of the real-time monitoring is that no task is currently to be executed, the system is switched to low power consumption. Mode work, based on a unified, concise software architecture to achieve general power control, easy to implement the development framework, The SDK of the device is introduced, and it is not necessary to analyze the specific working characteristics of the device, and is not limited by the function of the device, and is applicable to different types of devices, and the application is more extensive and flexible.
  • FIG. 11 is a block diagram of a device for controlling power consumption, according to another exemplary embodiment.
  • the apparatus includes: a processor 701 and a memory 702 for storing processor-executable instructions;
  • the processor 701 is configured to:
  • the monitoring method real-time monitoring whether the system currently has a task to be executed
  • the processor 701 is configured to determine a monitoring manner according to a system type, including:
  • the monitoring mode is determined as a way for the foreground to monitor the task triggered by the interrupted event in real time.
  • the processor 701 is configured to monitor, in real time, whether the system has a task to perform according to the monitoring manner, including:
  • the processor 701 is configured to determine a monitoring manner according to a system type, including:
  • the monitoring mode is determined as a method of monitoring tasks in real time according to priorities.
  • the processor 701 is configured to monitor, in real time, whether the system has a task to perform according to the monitoring manner, including:
  • the processor 701 is configured to switch the system to a low power mode operation, including any one or more of the following:
  • the processor 701 is configured to stop the low power mode and process the interrupt event when an interrupt event occurs in real time.
  • FIG. 12 is a block diagram of an apparatus 800 for controlling power consumption, according to another exemplary embodiment.
  • device 800 can be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, Medical equipment, fitness equipment, personal digital assistants, etc.
  • apparatus 800 can include one or more of the following components: processing component 802, memory 804, power component 806, multimedia component 808, audio component 810, input/output (I/O) interface 812, sensor component 814, And a communication component 816.
  • Processing component 802 typically controls the overall operation of device 800, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations.
  • Processing component 802 can include one or more processors 820 to execute instructions to perform all or part of the steps of the methods provided by any of the above embodiments.
  • processing component 802 can include one or more modules to facilitate interaction between component 802 and other components.
  • processing component 802 can include a multimedia module to facilitate interaction between multimedia component 808 and processing component 802.
  • Memory 804 is configured to store various types of data to support operation at device 800. Examples of such data include instructions for any application or method operating on device 800, contact data, phone book data, messages, pictures, videos, and the like.
  • the memory 804 can be implemented by any type of volatile or non-volatile storage device, or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read only memory (EEPROM), erasable.
  • SRAM static random access memory
  • EEPROM electrically erasable programmable read only memory
  • EPROM Electrically erasable programmable read only memory
  • PROM Programmable Read Only Memory
  • ROM Read Only Memory
  • Magnetic Memory Flash Memory
  • Disk Disk or Optical Disk.
  • Power component 806 provides power to various components of device 800.
  • Power component 806 can include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for device 800.
  • the multimedia component 808 includes a screen between the device 800 and the user that provides an output interface.
  • the screen can include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen can be implemented as a touch screen to receive input signals from the user.
  • the touch panel includes one or more touch sensors to sense touches, slides, and gestures on the touch panel. The touch sensor may sense not only the boundary of the touch or sliding action, but also the duration and pressure associated with the touch or slide operation.
  • the multimedia component 808 includes a front camera and/or a rear camera. When the device 800 is in an operation mode, such as a shooting mode or a video mode, the front camera and/or the rear camera can receive external multimedia data. Each front and rear camera can be a fixed optical lens system or have focal length and optical zoom capabilities.
  • the audio component 810 is configured to output and/or input an audio signal.
  • the audio component 810 includes a microphone (MIC) that is configured to receive an external audio signal when the device 800 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode.
  • the received audio signal may be further stored in memory 804 or transmitted via communication component 816.
  • the audio component 810 also includes a speaker for outputting an audio signal.
  • the I/O interface 812 provides an interface between the processing component 802 and the peripheral interface module, which may be a keyboard, a click wheel, a button, or the like. These buttons may include, but are not limited to, a home button, a volume button, a start button, and a lock button.
  • Sensor assembly 814 includes one or more sensors for providing device 800 with a status assessment of various aspects.
  • sensor component 814 can detect an open/closed state of device 800, a relative positioning of the components, such as The components are the display of the device 800 and the keypad.
  • the sensor component 814 can also detect changes in the position of one component of the device 800 or device 800, the presence or absence of contact of the user with the device 800, the orientation of the device 800 or acceleration/deceleration and the device 800. temperature change.
  • Sensor assembly 814 can include a proximity sensor configured to detect the presence of nearby objects without any physical contact.
  • Sensor assembly 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications.
  • the sensor assembly 814 can also include an acceleration sensor, a gyro sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
  • Communication component 816 is configured to facilitate wired or wireless communication between device 800 and other devices.
  • the device 800 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof.
  • the communication component 816 receives broadcast signals or broadcast associated information from an external broadcast management system via a broadcast channel.
  • the communication component 816 also includes a near field communication (NFC) module to facilitate short range communication.
  • NFC near field communication
  • the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
  • RFID radio frequency identification
  • IrDA infrared data association
  • UWB ultra-wideband
  • Bluetooth Bluetooth
  • device 800 may be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable A gate array (FPGA), controller, microcontroller, microprocessor or other electronic component implementation for performing the method provided by any of the above embodiments.
  • ASICs application specific integrated circuits
  • DSPs digital signal processors
  • DSPDs digital signal processing devices
  • PLDs programmable logic devices
  • FPGA field programmable A gate array
  • controller microcontroller, microprocessor or other electronic component implementation for performing the method provided by any of the above embodiments.
  • non-transitory computer readable storage medium comprising instructions, such as a memory 804 comprising instructions executable by processor 820 of apparatus 800 to perform the operations provided by any of the above embodiments.
  • the non-transitory computer readable storage medium may be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device.
  • the non-transitory computer readable storage medium determines the monitoring mode according to the type of the system, and monitors whether the system currently has a task to execute according to the monitoring mode.
  • the system switches to low-power mode operation, implements general-purpose power control based on a unified and simple software architecture, facilitates development framework, launches device SDK, and does not need to analyze the specific working characteristics of the device, and is not limited by device functions. It is suitable for different types of equipment, and the application is more extensive and flexible.
  • FIG. 13 is a block diagram of an apparatus 1900 for controlling power consumption, according to another exemplary embodiment.
  • device 1900 can be provided as a server.
  • apparatus 1900 includes a processing component 1922 that further includes one or more processors, and memory resources represented by memory 1932 for storing instructions executable by processing component 1922, such as an application.
  • An application stored in memory 1932 can include one or more modules each corresponding to a set of instructions.
  • processing component 1922 is configured to execute instructions to perform the methods provided by any of the above embodiments.
  • Apparatus 1900 can also include a power supply component 1926 configured to perform power management of apparatus 1900, a wired or wireless network interface 1950 configured to connect apparatus 1900 to the network, and an input/output (I/O) interface 1958.
  • Apparatus 1900 can operate based on an operating system stored in memory 1932, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM or similar.
  • the device provided in this embodiment determines the monitoring mode according to the type of the system, and monitors whether the system currently has a task to execute according to the monitoring mode. When the result of the real-time monitoring is that no task is currently to be executed, the system is switched to low power consumption. Mode work, based on a unified, concise software architecture to achieve universal power control, easy to implement the development framework, launch the device SDK, and without analyzing the specific working characteristics of the device, not limited by the device function, for different types of devices Applicable, the application is more extensive and flexible.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Power Sources (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Business, Economics & Management (AREA)
  • Emergency Management (AREA)
  • Power Engineering (AREA)
  • Direct Current Feeding And Distribution (AREA)

Abstract

本公开是关于一种控制功耗的方法和装置,属于智能设备领域。所述方法包括:根据系统类型确定监测方式,按照所述监测方式实时监测系统当前是否有任务要执行,当实时监测的结果为当前没有任务要执行时,将所述系统切换至低功耗模式工作。所述装置包括:确定模块、监测模块和切换模块。本公开基于统一的、简洁的软件架构实现功耗控制,便于实现开发框架,而且无需分析设备的具体工作特性,不受设备功能的限制,对不同种类的设备都适用,应用更广泛、灵活。

Description

控制功耗的方法和装置
本申请基于申请号为201510077297.6、申请日为2015年2月13日的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此引入本申请作为参考。
技术领域
本公开涉及智能设备领域,尤其涉及一种控制功耗的方法和装置。
背景技术
功耗管理在嵌入式系统中非常重要,尤其是在某些小型电池供电设备中。较长的待机时间是良好用户体验的重要组成部分,各种设备的生产厂商也都想尽办法做功耗的优化。不同设备上功耗管理的方案往往因设备而异,因应用场景而异。
目前,常用的优化功耗方法是基于产品的功能做功耗管理,针对具体产品的工作特性做具体分析,并设计相应的降低功耗的方案。比如,姿态检测仪在长时间静置时可以停止传感器采样,从而降低姿态检测仪的功耗。
发明内容
本公开提供了一种控制功耗的方法和装置,以实现统一的功耗控制,不受设备的限制。
根据本公开实施例的第一方面,提供一种控制功耗的方法,所述方法包括:
根据系统类型确定监测方式;
按照所述监测方式实时监测系统当前是否有任务要执行;
当实时监测的结果为当前没有任务要执行时,将所述系统切换至低功耗模式工作。
其中,所述根据系统类型确定监测方式,包括:
当所述系统为前后台类型的系统时,确定监测方式为前台实时监测被中断事件所触发的任务的方式。
其中,所述按照所述监测方式实时监测系统当前是否有任务要执行,包括:
在所述系统的主循环中实时监测当前是否有被中断事件所触发的任务;
当有任务被中断事件所触发时,确定当前有任务要执行;
当没有任务被中断事件所触发时,确定当前没有任务要执行。
其中,所述根据系统类型确定监测方式,包括:
当所述系统为支持抢占的实时系统时,确定监测方式为按照优先级实时监测任务的方式。
其中,所述按照所述监测方式实时监测系统当前是否有任务要执行,包括:
实时监测各个优先级的进程是否被触发,其中,用于执行切换至低功耗模式的第一进程优先级最低;
当除所述第一进程外的其它所有进程都没有被触发时,确定当前没有任务要执行;
当除所述第一进程外的其它任一进程被触发时,确定当前有任务执行。
其中,所述将所述系统切换至低功耗模式工作,包括以下任意一种或几种:
降低中央处理器的频率、降低微控制单元的供电电压、将微控制单元切换至低功耗模式、停止给指定的外设供电或停止外设时钟。
其中,所述方法还包括:
当实时监测到有中断事件发生时,停止所述低功耗模式并对所述中断事件进行处理。
根据本公开实施例的第二方面,提供一种控制功耗的装置,所述装置包括:
确定模块,用于根据系统类型确定监测方式;
监测模块,用于按照所述监测方式实时监测系统当前是否有任务要执行;
切换模块,用于当实时监测的结果为当前没有任务要执行时,将所述系统切换至低功耗模式工作。
其中,所述确定模块包括:
第一确定子模块,用于当所述系统为前后台类型的系统时,确定监测方式为前台实时监测被中断事件所触发的任务的方式。
其中,所述监测模块包括:
第一监测子模块,用于在所述系统的主循环中实时监测当前是否有被中断事件所触发的任务,当有任务被中断事件所触发时,确定当前有任务要执行,当没有任务被中断事件所触发时,确定当前没有任务要执行。
其中,所述确定模块包括:
第二确定子模块,用于当所述系统为支持抢占的实时系统时,确定监测方式为按照优先级实时监测任务的方式。
其中,所述监测模块包括:
第二监测子模块,用于实时监测各个优先级的进程是否被触发,其中,用于执行切换至低功耗模式的第一进程优先级最低,当除所述第一进程外的其它所有进程都没有被触发时,确定当前没有任务要执行,当除所述第一进程外的其它任一进程被触发时,确定当前有任务执行。
其中,所述切换模块包括:
切换子模块,用于当实时监测的结果为当前没有任务要执行时,执行以下任意一种或几种操作:降低中央处理器的频率、降低微控制单元的供电电压、将微控制单元切换至低功耗模式、停止给指定的外设供电或停止外设时钟。
其中,所述切换模块还用于当实时监测到有中断事件发生时,停止所述低功耗模式;
所述装置还包括:
处理模块,用于对实时监测到的所述中断事件进行处理。
根据本公开实施例的第三方面,提供一种控制功耗的装置,所述装置包括:
处理器及用于存储处理器可执行指令的存储器;
其中,所述处理器被配置为:
根据系统类型确定监测方式;
按照所述监测方式实时监测系统当前是否有任务要执行;
当实时监测的结果为当前没有任务要执行时,将所述系统切换至低功耗模式工作。
本公开的实施例提供的技术方案可以包括以下有益效果:根据系统类型确定监测方式,按照该监测方式实时监测系统当前是否有任务要执行,当实时监测的结果为当前没有任务要执行时,将该系统切换至低功耗模式工作,基于统一的、简洁的软件架构实现通用的功耗控制,便于实现开发框架,推出设备的软件开发工具包(Software Development Kit,简称:SDK),而且无需分析设备的具体工作特性,不受设备功能的限制,对不同种类的设备都适用,应用更广泛、灵活。
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本公开。
附图说明
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本发明的实施例,并与说明书一起用于解释本发明的原理。
图1是根据一示例性实施例示出的一种控制功耗的方法的流程图。
图2是根据另一示例性实施例示出的一种控制功耗的方法的流程图。
图3是根据另一示例性实施例示出的一种控制功耗的方法的流程图。
图4是根据另一示例性实施例示出的一种控制功耗的装置的框图。
图5是根据另一示例性实施例示出的一种控制功耗的装置的框图。
图6是根据另一示例性实施例示出的一种控制功耗的装置的框图。
图7是根据另一示例性实施例示出的一种控制功耗的装置的框图。
图8是根据另一示例性实施例示出的一种控制功耗的装置的框图。
图9是根据另一示例性实施例示出的一种控制功耗的装置的框图。
图10是根据另一示例性实施例示出的一种控制功耗的装置的框图。
图11是根据另一示例性实施例示出的一种控制功耗的装置的框图。
图12是根据另一示例性实施例示出的一种控制功耗的装置的框图。
图13是根据另一示例性实施例示出的一种控制功耗的装置的框图。
具体实施方式
这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本发明相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本发明的一些方面相一致的装置和方法的例子。
本公开涉及的控制功耗的方法和装置应用于电子设备中,该电子设备包括但不限于:终端、服务器、家电设备等等。该终端包括但不限于:计算机、手机、平板电脑等等。该家电设备包括但不限于:冰箱、洗衣机、微波炉、空调等等。本公开涉及的系统是指该电子设备中的系统,可选的,该系统为嵌入式系统。该系统的类型不限,如可以为前后台类型的系统,或者为支持抢占的实时系统等等。
图1是根据一示例性实施例示出的一种控制功耗的方法的流程图,如图1所示,该方法用于电子设备中,包括以下步骤。
在步骤S11中,根据系统类型确定监测方式。
本实施例中,该系统是指电子设备的系统,包括但不限于:前后台类型的系统,或支持抢占的实时系统等等。该监测方式用于监测系统是否有任务需要执行,对于不同类型的系统,其监测方式也不同。
在步骤S12中,按照该监测方式实时监测系统当前是否有任务要执行。
本实施例中,当系统有任务要执行时,通常不能降低功耗,以保证任务的正常执行;当系统无任务要执行时,通常可以降低功耗,从而可以为电子设备省电,节省宝贵的资源。
在步骤S13中,当实时监测的结果为当前没有任务要执行时,将该系统切换至低功耗模式工作。
本实施例中,系统的工作模式可以分为正常工作模式和低功耗模式。其中,当系统执行任务时都处于正常工作模式,当系统不执行任务时处于低功耗模式。系统在该低功耗模式下的功耗比在正常工作模式下的功耗低,从而能够更省电,提高电子设备的性能。
本实施例中,可选的,根据系统类型确定监测方式,可以包括:
当该系统为前后台类型的系统时,确定监测方式为前台实时监测被中断事件所触发的任务的方式;或者,
当该系统为支持抢占的实时系统时,确定监测方式为按照优先级实时监测任务的方式。
本实施例中,可选的,当该系统为前后台类型的系统时,按照该监测方式实时监测系统当前是否有任务要执行,可以包括:
在该系统的主循环中实时监测当前是否有被中断事件所触发的任务;
当有任务被中断事件所触发时,确定当前有任务要执行;
当没有任务被中断事件所触发时,确定当前没有任务要执行。
本实施例中,可选的,当该系统为支持抢占的实时系统时,按照该监测方式实时监测系统当前是否有任务要执行,可以包括:
实时监测各个优先级的进程是否被触发,其中,用于执行切换至低功耗模式的第一进程优先级最低;
当除该第一进程外的其它所有进程都没有被触发时,确定当前没有任务要执行;
当除该第一进程外的其它任一进程被触发时,确定当前有任务执行。
本实施例中,可选的,将该系统切换至低功耗模式工作,可以包括但不限于以下任意一种或几种:
降低中央处理器的频率、降低微控制单元(Micro Control Unit,简称:MCU)的供电电压、将微控制单元切换至低功耗模式、停止给指定的外设供电或停止外设时钟。
本实施例中,可选的,上述方法还可以包括:
当实时监测到有中断事件发生时,停止该低功耗模式并对该中断事件进行处理。
本实施例提供的上述方法,根据系统类型确定监测方式,按照该监测方式实时监测系统当前是否有任务要执行,当实时监测的结果为当前没有任务要执行时,将该系统切换至低功耗模式工作,基于统一的、简洁的软件架构实现通用的功耗控制,便于实现开发框架,推出设备的SDK,而且无需分析设备的具体工作特性,不受设备功能的限制,对不同种类的设备都适用,应用更广泛、灵活。
图2是根据另一示例性实施例示出的一种控制功耗的方法的流程图,如图2所示,该方法用于电子设备中,包括以下步骤。
在步骤S21中,当该系统为前后台类型的系统时,确定监测方式为前台实时监测被中断事件所触发的任务的方式。
其中,前后台类型的系统是指,系统以前台和后台配合的方式进行工作。前台用于监控中断事件,后台用于执行具体的任务。前台监控到的中断事件可以触发后台执行相应的任务。在前后台类型的系统中,具有一个主循环,用于处理所有任务的调度,该系统还具有任务队列(task_queue),所有待执行的任务都在该队列中进行排队等待处理,主循环会调用相应的任务执行函数来处理对应的任务。
在步骤S22中,在该系统的主循环中实时监测当前是否有被中断事件所触发的任务,如果没有任务被中断事件所触发,则执行步骤S23;如果有任务被中断事件所触发,则执行步骤S25。
本实施例中,不同类型的中断事件可能会触发任务,也可能不触发任务。当有任务被中断事件触发时,该任务会被调度到主循环的任务队列中,因此,可以确定当前有任务要执行。当没有任务被中断事件触发时,主循环的任务队列为空,因此,可以确定当前没有任务要执行。
在步骤S23中,确定当前没有任务要执行。
在步骤S24中,将该系统切换至低功耗模式工作,流程结束。
其中,将该系统切换至低功耗模式工作,可以包括但不限于以下任意一种或几种:
降低中央处理器的频率、降低微控制单元的供电电压、将微控制单元切换至低功耗模式、停止给指定的外设供电或停止外设时钟。
所述指定的外设可以为不工作的外设等等,本公开不限定。
在步骤S25中,确定当前有任务要执行。
在步骤S26中,停止该低功耗模式并对该中断事件进行处理,流程结束。
本实施例中,可选的,可以在前后台系统的主循环中进行判断,如果任务队列中有任务需要执行,则调用相应的任务执行函数进行相应的任务处理,如果任务队列中没有任何任务需要执行,则调用低功耗模式函数,将系统切换至低功耗模式工作。
上述过程可以用如下代码实现:
Figure PCTCN2015093230-appb-000001
其中,while(1)为主循环,While(has_task_in_queue(task_queue))为任务队列处理函数,该函数在判断出任务队列中有任务需要执行时,会调用函数Execute_task()来执行相应的任务。如果任务队列中有任务这个条件不满足,则会执行函数Enter_lowpower_mode(),将系统切换至低功耗模式工作。本实施例中,中断事件可以将系统从低功耗模式中唤醒,从而触发系统执行相应的任务。
本实施例提供的上述方法,对前后台系统确定监测方式为前台实时监测被中断事件所触发的任务的方式,按照该监测方式实时监测系统当前是否有被中断事件所触发的任务,当实时监测的结果为当前没有任务要执行时,将该系统切换至低功耗模式工作,基于统一的、简洁的软件架构实现通用的功耗控制,便于实现开发框架,推出设备的SDK,对于为客户提供可进行二次开发的软件框架的项目,有重要意义,二次开发者无需关心功耗管理。而且,无需分析设备的具体工作特性,不受设备功能的限制,对不同种类的设备都适用,应用更广泛、灵活。
图3是根据另一示例性实施例示出的一种控制功耗的方法的流程图,如图3所示,该方法用于电子设备中,包括以下步骤。
在步骤S31中,当该系统为支持抢占的实时系统时,确定监测方式为按照优先级实时监测任务的方式。
其中,支持抢占的实时系统是指,系统创建进程来执行任务,各个进程具有不同的优 先级,高优先级的进程会先执行,从而保证高优先级的任务被优先处理。
在步骤S32中,实时监测各个优先级的进程是否被触发,其中,用于执行切换至低功耗模式的第一进程优先级最低;如果除该第一进程外的其它所有进程都没有被触发,则执行步骤S33;如果除该第一进程外的其它任一进程被触发,则执行步骤S35。
本实施例中,用于执行切换至低功耗模式的第一进程优先级最低,其它任何一个进程的优先级都高于该第一进程,当其它所有进程都没有被触发时,才会执行该第一进程。当有任一个其它进程被触发时,都不会执行该第一进程。这种方式保证在系统没有任何任务时,才进入低功耗模式工作,从而不会影响任务的正常执行。
在步骤S33中,确定当前没有任务要执行。
在步骤S34中,将该系统切换至低功耗模式工作,流程结束。
其中,将该系统切换至低功耗模式工作,可以包括但不限于以下任意一种或几种:
降低中央处理器的频率、降低微控制单元的供电电压、将微控制单元切换至低功耗模式、停止给指定的外设供电或停止外设时钟。
在步骤S35中,确定当前有任务执行。
在步骤S36中,停止该低功耗模式并对该中断事件进行处理,流程结束。
本实施例提供的上述切换至低功耗模式的过程,可以采用如下代码来实现:
Figure PCTCN2015093230-appb-000002
其中,lowest_priority_task()为优先级最低的进程,用于触发切换至低功耗模式工作,当其它优先级的进程都没有被触发时,则会自动触发该进程。在该进程中,会执行函数Enter_low_power_mode(),来将系统切换至低功耗模式工作。
在支持抢占的实时系统中,中断事件对应的进程具有最高的优先级,当有中断事件发生时,会抢占第一进程的执行权,优先触发该中断事件对应的进程,使该进程执行相应的函数来处理中断事件对应的任务,从而将系统从低功耗模式中唤醒,保证高优先级的任务被执行。这种系统在无任务即空闲时才进入低功耗模式的机制,既不影响系统的实时性,也能方便的实现功耗管理。
本实施例提供的上述方法,对支持抢占的实时系统确定监测方式为按照优先级实时监测任务的方式,按照该监测方式实时监测系统当前是否有任务要执行,当实时监测的结果为当前没有任务要执行时,将该系统切换至低功耗模式工作,基于统一的、简洁的软件架构实现通用的功耗控制,便于实现开发框架,推出设备的SDK,而且无需分析设备的具体工作特性,不受设备功能的限制,对不同种类的设备都适用,应用更广泛、灵活。
图4是根据另一示例性实施例示出的一种控制功耗的装置框图。参照图4,该装置包括确定模块121,监测模块122和切换模块123。
该确定模块121被配置为根据系统类型确定监测方式。
该监测模块122被配置为按照该监测方式实时监测系统当前是否有任务要执行。
该切换模块123被配置为当实时监测的结果为当前没有任务要执行时,将该系统切换至低功耗模式工作。
参见图5,本实施例中,可选的,该确定模块121可以包括:
第一确定子模块121a,用于当该系统为前后台类型的系统时,确定监测方式为前台实时监测被中断事件所触发的任务的方式。
参见图6,本实施例中,可选的,该监测模块122可以包括:
第一监测子模块122a,用于在所述系统的主循环中实时监测当前是否有被中断事件所触发的任务,当有任务被中断事件所触发时,确定当前有任务要执行,当没有任务被中断事件所触发时,确定当前没有任务要执行。
参见图7,本实施例中,可选的,该确定模块121可以包括:
第二确定子模块121b,用于当该系统为支持抢占的实时系统时,确定监测方式为按照优先级实时监测任务的方式。
参见图8,本实施例中,可选的,该监测模块122可以包括:
第二监测子模块122b,用于实时监测各个优先级的进程是否被触发,其中,用于执行切换至低功耗模式的第一进程优先级最低,当除该第一进程外的其它所有进程都没有被触发时,确定当前没有任务要执行,当除该第一进程外的其它任一进程被触发时,确定当前有任务执行。
参见图9,本实施例中,可选的,该切换模块123可以包括:
切换子模块123a,用于当实时监测的结果为当前没有任务要执行时,执行以下任意一种或几种操作:降低中央处理器的频率、降低微控制单元的供电电压、将微控制单元切换至低功耗模式、停止给指定的外设供电或停止外设时钟。
参见图10,本实施例中,可选的,该切换模块123还用于当实时监测到有中断事件发生时,停止该低功耗模式;上述装置还可以包括:
处理模块124,用于对实时监测到的该中断事件进行处理。
关于上述实施例中的装置,其中各个模块执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。
本实施例提供的上述装置可以应用于任何一种电子设备中,包括但不限于:终端、服务器或家电设备。
本实施例提供的上述装置,根据系统类型确定监测方式,按照该监测方式实时监测系统当前是否有任务要执行,当实时监测的结果为当前没有任务要执行时,将该系统切换至低功耗模式工作,基于统一的、简洁的软件架构实现通用的功耗控制,便于实现开发框架, 推出设备的SDK,而且无需分析设备的具体工作特性,不受设备功能的限制,对不同种类的设备都适用,应用更广泛、灵活。
图11是根据另一示例性实施例示出的一种控制功耗的装置框图。参照图11,该装置包括:处理器701及用于存储处理器可执行指令的存储器702;
其中,该处理器701被配置为:
根据系统类型确定监测方式;
按照该监测方式实时监测系统当前是否有任务要执行;
当实时监测的结果为当前没有任务要执行时,将该系统切换至低功耗模式工作。
该处理器701被配置为根据系统类型确定监测方式,包括:
当所述系统为前后台类型的系统时,确定监测方式为前台实时监测被中断事件所触发的任务的方式。
该处理器701被配置为按照所述监测方式实时监测系统当前是否有任务要执行,包括:
在所述系统的主循环中实时监测当前是否有被中断事件所触发的任务;
当有任务被中断事件所触发时,确定当前有任务要执行;
当没有任务被中断事件所触发时,确定当前没有任务要执行。
该处理器701被配置为根据系统类型确定监测方式,包括:
当所述系统为支持抢占的实时系统时,确定监测方式为按照优先级实时监测任务的方式。
该处理器701被配置为按照所述监测方式实时监测系统当前是否有任务要执行,包括:
实时监测各个优先级的进程是否被触发,其中,用于执行切换至低功耗模式的第一进程优先级最低;
当除所述第一进程外的其它所有进程都没有被触发时,确定当前没有任务要执行;
当除所述第一进程外的其它任一进程被触发时,确定当前有任务执行。
该处理器701被配置为所述将所述系统切换至低功耗模式工作,包括以下任意一种或几种:
降低中央处理器的频率、降低微控制单元的供电电压、将微控制单元切换至低功耗模式、停止给指定的外设供电或停止外设时钟。
该处理器701被配置为当实时监测到有中断事件发生时,停止所述低功耗模式并对所述中断事件进行处理。
图12是根据另一示例性实施例示出的一种控制功耗的装置800的框图。例如,装置800可以是移动电话,计算机,数字广播终端,消息收发设备,游戏控制台,平板设备, 医疗设备,健身设备,个人数字助理等。
参照图12,装置800可以包括以下一个或多个组件:处理组件802,存储器804,电源组件806,多媒体组件808,音频组件810,输入/输出(I/O)的接口812,传感器组件814,以及通信组件816。
处理组件802通常控制装置800的整体操作,诸如与显示,电话呼叫,数据通信,相机操作和记录操作相关联的操作。处理元件802可以包括一个或多个处理器820来执行指令,以完成上述任一实施例提供的方法的全部或部分步骤。此外,处理组件802可以包括一个或多个模块,便于处理组件802和其他组件之间的交互。例如,处理部件802可以包括多媒体模块,以方便多媒体组件808和处理组件802之间的交互。
存储器804被配置为存储各种类型的数据以支持在设备800的操作。这些数据的示例包括用于在装置800上操作的任何应用程序或方法的指令,联系人数据,电话簿数据,消息,图片,视频等。存储器804可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,如静态随机存取存储器(SRAM),电可擦除可编程只读存储器(EEPROM),可擦除可编程只读存储器(EPROM),可编程只读存储器(PROM),只读存储器(ROM),磁存储器,快闪存储器,磁盘或光盘。
电力组件806为装置800的各种组件提供电力。电力组件806可以包括电源管理系统,一个或多个电源,及其他与为装置800生成、管理和分配电力相关联的组件。
多媒体组件808包括在所述装置800和用户之间的提供一个输出接口的屏幕。在一些实施例中,屏幕可以包括液晶显示器(LCD)和触摸面板(TP)。如果屏幕包括触摸面板,屏幕可以被实现为触摸屏,以接收来自用户的输入信号。触摸面板包括一个或多个触摸传感器以感测触摸、滑动和触摸面板上的手势。所述触摸传感器可以不仅感测触摸或滑动动作的边界,而且还检测与所述触摸或滑动操作相关的持续时间和压力。在一些实施例中,多媒体组件808包括一个前置摄像头和/或后置摄像头。当设备800处于操作模式,如拍摄模式或视频模式时,前置摄像头和/或后置摄像头可以接收外部的多媒体数据。每个前置摄像头和后置摄像头可以是一个固定的光学透镜系统或具有焦距和光学变焦能力。
音频组件810被配置为输出和/或输入音频信号。例如,音频组件810包括一个麦克风(MIC),当装置800处于操作模式,如呼叫模式、记录模式和语音识别模式时,麦克风被配置为接收外部音频信号。所接收的音频信号可以被进一步存储在存储器804或经由通信组件816发送。在一些实施例中,音频组件810还包括一个扬声器,用于输出音频信号。
I/O接口812为处理组件802和外围接口模块之间提供接口,上述外围接口模块可以是键盘,点击轮,按钮等。这些按钮可包括但不限于:主页按钮、音量按钮、启动按钮和锁定按钮。
传感器组件814包括一个或多个传感器,用于为装置800提供各个方面的状态评估。例如,传感器组件814可以检测到设备800的打开/关闭状态,组件的相对定位,例如所 述组件为装置800的显示器和小键盘,传感器组件814还可以检测装置800或装置800一个组件的位置改变,用户与装置800接触的存在或不存在,装置800方位或加速/减速和装置800的温度变化。传感器组件814可以包括接近传感器,被配置用来在没有任何的物理接触时检测附近物体的存在。传感器组件814还可以包括光传感器,如CMOS或CCD图像传感器,用于在成像应用中使用。在一些实施例中,该传感器组件814还可以包括加速度传感器,陀螺仪传感器,磁传感器,压力传感器或温度传感器。
通信组件816被配置为便于装置800和其他设备之间有线或无线方式的通信。装置800可以接入基于通信标准的无线网络,如WiFi,2G或3G,或它们的组合。在一个示例性实施例中,通信部件816经由广播信道接收来自外部广播管理系统的广播信号或广播相关信息。在一个示例性实施例中,所述通信部件816还包括近场通信(NFC)模块,以促进短程通信。例如,在NFC模块可基于射频识别(RFID)技术,红外数据协会(IrDA)技术,超宽带(UWB)技术,蓝牙(BT)技术和其他技术来实现。
在示例性实施例中,装置800可以被一个或多个应用专用集成电路(ASIC)、数字信号处理器(DSP)、数字信号处理设备(DSPD)、可编程逻辑器件(PLD)、现场可编程门阵列(FPGA)、控制器、微控制器、微处理器或其他电子元件实现,用于执行上述任一实施例提供的方法。
在示例性实施例中,还提供了一种包括指令的非临时性计算机可读存储介质,例如包括指令的存储器804,上述指令可由装置800的处理器820执行以完成上述任一实施例提供的方法。例如,所述非临时性计算机可读存储介质可以是ROM、随机存取存储器(RAM)、CD-ROM、磁带、软盘和光数据存储设备等。
本实施例提供的上述非临时性计算机可读存储介质,根据系统类型确定监测方式,按照该监测方式实时监测系统当前是否有任务要执行,当实时监测的结果为当前没有任务要执行时,将该系统切换至低功耗模式工作,基于统一的、简洁的软件架构实现通用的功耗控制,便于实现开发框架,推出设备的SDK,而且无需分析设备的具体工作特性,不受设备功能的限制,对不同种类的设备都适用,应用更广泛、灵活。
图13是根据另一示例性实施例示出的一种控制功耗的装置1900的框图。例如,装置1900可以被提供为一服务器。参照图13,装置1900包括处理组件1922,其进一步包括一个或多个处理器,以及由存储器1932所代表的存储器资源,用于存储可由处理部件1922的执行的指令,例如应用程序。存储器1932中存储的应用程序可以包括一个或一个以上的每一个对应于一组指令的模块。此外,处理组件1922被配置为执行指令,以执行上述任一实施例提供的方法。
装置1900还可以包括一个电源组件1926被配置为执行装置1900的电源管理,一个有线或无线网络接口1950被配置为将装置1900连接到网络,和一个输入输出(I/O)接口1958。装置1900可以操作基于存储在存储器1932的操作系统,例如Windows ServerTM, Mac OS XTM,UnixTM,LinuxTM,FreeBSDTM或类似。
本实施例提供的上述装置,根据系统类型确定监测方式,按照该监测方式实时监测系统当前是否有任务要执行,当实时监测的结果为当前没有任务要执行时,将该系统切换至低功耗模式工作,基于统一的、简洁的软件架构实现通用的功耗控制,便于实现开发框架,推出设备的SDK,而且无需分析设备的具体工作特性,不受设备功能的限制,对不同种类的设备都适用,应用更广泛、灵活。
本领域技术人员在考虑说明书及实践这里公开的发明后,将容易想到本发明的其它实施方案。本申请旨在涵盖本发明的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本发明的一般性原理并包括本公开未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本发明的真正范围和精神由下面的权利要求指出。
应当理解的是,本发明并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本发明的范围仅由所附的权利要求来限制。

Claims (15)

  1. 一种控制功耗的方法,其特征在于,所述方法包括:
    根据系统类型确定监测方式;
    按照所述监测方式实时监测系统当前是否有任务要执行;
    当实时监测的结果为当前没有任务要执行时,将所述系统切换至低功耗模式工作。
  2. 根据权利要求1所述的方法,其特征在于,所述根据系统类型确定监测方式,包括:
    当所述系统为前后台类型的系统时,确定监测方式为前台实时监测被中断事件所触发的任务的方式。
  3. 根据权利要求2所述的方法,其特征在于,所述按照所述监测方式实时监测系统当前是否有任务要执行,包括:
    在所述系统的主循环中实时监测当前是否有被中断事件所触发的任务;
    当有任务被中断事件所触发时,确定当前有任务要执行;
    当没有任务被中断事件所触发时,确定当前没有任务要执行。
  4. 根据权利要求1所述的方法,其特征在于,所述根据系统类型确定监测方式,包括:
    当所述系统为支持抢占的实时系统时,确定监测方式为按照优先级实时监测任务的方式。
  5. 根据权利要求4所述的方法,其特征在于,所述按照所述监测方式实时监测系统当前是否有任务要执行,包括:
    实时监测各个优先级的进程是否被触发,其中,用于执行切换至低功耗模式的第一进程优先级最低;
    当除所述第一进程外的其它所有进程都没有被触发时,确定当前没有任务要执行;
    当除所述第一进程外的其它任一进程被触发时,确定当前有任务执行。
  6. 根据权利要求1-5中任一项所述的方法,其特征在于,所述将所述系统切换至低功耗模式工作,包括以下任意一种或几种:
    降低中央处理器的频率、降低微控制单元的供电电压、将微控制单元切换至低功耗模式、停止给指定的外设供电或停止外设时钟。
  7. 根据权利要求1-5中任一项所述的方法,其特征在于,所述方法还包括:
    当实时监测到有中断事件发生时,停止所述低功耗模式并对所述中断事件进行处理。
  8. 一种控制功耗的装置,其特征在于,所述装置包括:
    确定模块,用于根据系统类型确定监测方式;
    监测模块,用于按照所述监测方式实时监测系统当前是否有任务要执行;
    切换模块,用于当实时监测的结果为当前没有任务要执行时,将所述系统切换至低功耗模式工作。
  9. 根据权利要求8所述的装置,其特征在于,所述确定模块包括:
    第一确定子模块,用于当所述系统为前后台类型的系统时,确定监测方式为前台实时监测被中断事件所触发的任务的方式。
  10. 根据权利要求9所述的装置,其特征在于,所述监测模块包括:
    第一监测子模块,用于在所述系统的主循环中实时监测当前是否有被中断事件所触发的任务,当有任务被中断事件所触发时,确定当前有任务要执行,当没有任务被中断事件所触发时,确定当前没有任务要执行。
  11. 根据权利要求8所述的装置,其特征在于,所述确定模块包括:
    第二确定子模块,用于当所述系统为支持抢占的实时系统时,确定监测方式为按照优先级实时监测任务的方式。
  12. 根据权利要求11所述的装置,其特征在于,所述监测模块包括:
    第二监测子模块,用于实时监测各个优先级的进程是否被触发,其中,用于执行切换至低功耗模式的第一进程优先级最低,当除所述第一进程外的其它所有进程都没有被触发时,确定当前没有任务要执行,当除所述第一进程外的其它任一进程被触发时,确定当前有任务执行。
  13. 根据权利要求8-12中任一项所述的装置,其特征在于,所述切换模块包括:
    切换子模块,用于当实时监测的结果为当前没有任务要执行时,执行以下任意一种或几种操作:降低中央处理器的频率、降低微控制单元的供电电压、将微控制单元切换至低功耗模式、停止给指定的外设供电或停止外设时钟。
  14. 根据权利要求8-12中任一项所述的装置,其特征在于,
    所述切换模块还用于当实时监测到有中断事件发生时,停止所述低功耗模式;
    所述装置还包括:
    处理模块,用于对实时监测到的所述中断事件进行处理。
  15. 一种控制功耗的装置,其特征在于,所述装置包括:
    处理器及用于存储处理器可执行指令的存储器;
    其中,所述处理器被配置为:
    根据系统类型确定监测方式;
    按照所述监测方式实时监测系统当前是否有任务要执行;
    当实时监测的结果为当前没有任务要执行时,将所述系统切换至低功耗模式工作。
PCT/CN2015/093230 2015-02-13 2015-10-29 控制功耗的方法和装置 Ceased WO2016127665A1 (zh)

Priority Applications (4)

Application Number Priority Date Filing Date Title
JP2016574328A JP6250844B2 (ja) 2015-02-13 2015-10-29 消費電力制御方法、装置、プログラム及び記録媒体
KR1020157036598A KR101729679B1 (ko) 2015-02-13 2015-10-29 소비전력 제어방법, 장치, 프로그램 및 기록매체
MX2016002563A MX356521B (es) 2015-02-13 2015-10-29 Metodo y dispositivo para controlar el consumo de energia.
RU2016113187A RU2643516C2 (ru) 2015-02-13 2015-10-29 Способ и устройство для управления потребляемой мощностью

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510077297.6A CN104679218A (zh) 2015-02-13 2015-02-13 控制功耗的方法和装置
CN201510077297.6 2015-02-13

Publications (1)

Publication Number Publication Date
WO2016127665A1 true WO2016127665A1 (zh) 2016-08-18

Family

ID=53314419

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/093230 Ceased WO2016127665A1 (zh) 2015-02-13 2015-10-29 控制功耗的方法和装置

Country Status (8)

Country Link
US (1) US10216248B2 (zh)
EP (1) EP3056970A1 (zh)
JP (1) JP6250844B2 (zh)
KR (1) KR101729679B1 (zh)
CN (1) CN104679218A (zh)
MX (1) MX356521B (zh)
RU (1) RU2643516C2 (zh)
WO (1) WO2016127665A1 (zh)

Families Citing this family (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104679218A (zh) 2015-02-13 2015-06-03 小米科技有限责任公司 控制功耗的方法和装置
CN106354242A (zh) * 2016-08-22 2017-01-25 北京小米移动软件有限公司 一种模式切换方法及装置
KR101969395B1 (ko) * 2017-04-26 2019-07-23 아주대학교산학협력단 어플리케이션의 전력 과소비 원인 분석 장치 및 방법
DE102017109935A1 (de) * 2017-05-09 2018-11-15 Miele & Cie. Kg Verfahren zum Betreiben eines Haushaltsgeräts
CN108471632B (zh) * 2018-03-01 2021-02-23 Oppo广东移动通信有限公司 信息处理方法、装置、移动终端及计算机可读存储介质
CN111679730B (zh) * 2020-06-01 2022-06-07 深圳移航通信技术有限公司 基于FreeRTOS的处理器状态控制方法和装置
CN112217993A (zh) * 2020-09-29 2021-01-12 深圳市邻友通科技发展有限公司 摄像机降低系统功耗的方法、装置、电子设备及存储介质
CN112498268B (zh) * 2020-10-16 2021-12-17 山东派蒙机电技术有限公司 一种降低智能网联车辆控制器功耗的方法
CN113064701A (zh) * 2020-12-31 2021-07-02 杭州绿鲸科技有限公司 一种基于时间管理的任务驱动型软件实现方法
WO2022237273A1 (zh) * 2021-05-11 2022-11-17 Oppo广东移动通信有限公司 应用程序运行的控制方法、装置、电子设备和存储介质
CN113835958B (zh) * 2021-09-22 2024-02-23 深圳乐信软件技术有限公司 一种分布式任务执行进度的监控方法、装置、介质及设备
CN116546314A (zh) * 2022-01-25 2023-08-04 北京小米移动软件有限公司 功耗控制方法、装置、设备及介质
CN116447818A (zh) * 2022-12-08 2023-07-18 珠海格力电器股份有限公司 一种冰箱的控制方法、装置及冰箱

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1795428A (zh) * 2003-05-27 2006-06-28 皇家飞利浦电子股份有限公司 监测和控制功耗
CN101315577A (zh) * 2008-06-30 2008-12-03 华为技术有限公司 存储接口的功耗控制方法和装置及系统
CN101477403A (zh) * 2009-01-22 2009-07-08 浪潮电子信息产业股份有限公司 一种系统功耗自动控制方法
CN101884022A (zh) * 2007-09-14 2010-11-10 戈恩斯潘公司 降低基于模数控制电路的片上系统的功耗的方法及系统
CN104679218A (zh) * 2015-02-13 2015-06-03 小米科技有限责任公司 控制功耗的方法和装置

Family Cites Families (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6986032B2 (en) 2002-08-07 2006-01-10 Hewlett-Packard Development Company, L.P. System and method for using an operating system defined field in ACPI support multiple operating systems
US7127639B2 (en) * 2002-11-22 2006-10-24 Texas Instruments Incorporated Distinguishing between two classes of trace information
JP2005234784A (ja) * 2004-02-18 2005-09-02 Sharp Corp ジョブ処理装置
KR101128251B1 (ko) 2004-10-11 2012-03-26 엘지전자 주식회사 실행 프로그램의 장치별 절전모드 제어 장치 및 방법
US8032889B2 (en) * 2006-04-05 2011-10-04 Maxwell Technologies, Inc. Methods and apparatus for managing and controlling power consumption and heat generation in computer systems
US7899303B2 (en) * 2006-08-02 2011-03-01 Lsi Corporation DVD recorder and PVR instant on architecture
US7917784B2 (en) * 2007-01-07 2011-03-29 Apple Inc. Methods and systems for power management in a data processing system
JP5300553B2 (ja) * 2009-03-25 2013-09-25 キヤノン株式会社 通信装置、通信装置の制御方法、プログラム
RU2409832C1 (ru) * 2009-06-05 2011-01-20 Закрытое акционерное общество "Ди Эс Технолоджи" Самосинхронное устройство с автоматическим регулированием потребляемой мощности
US10195343B2 (en) * 2010-02-05 2019-02-05 Deka Products Limited Partnership Devices, methods and systems for wireless control of medical devices
CN102971710B (zh) * 2010-07-06 2016-06-29 松下电器(美国)知识产权公司 虚拟计算机系统、虚拟计算机控制方法、及集成电路
JP5581489B2 (ja) * 2010-09-29 2014-09-03 株式会社Pfu ノード監視装置、ノード監視方法、及びノード監視プログラム
US9304571B2 (en) * 2013-04-12 2016-04-05 Apple Inc. Interrupt based power state management
CN103324268A (zh) * 2013-05-29 2013-09-25 东南大学 用于无线传感器网络核心芯片的低功耗设计方法

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1795428A (zh) * 2003-05-27 2006-06-28 皇家飞利浦电子股份有限公司 监测和控制功耗
CN101884022A (zh) * 2007-09-14 2010-11-10 戈恩斯潘公司 降低基于模数控制电路的片上系统的功耗的方法及系统
CN101315577A (zh) * 2008-06-30 2008-12-03 华为技术有限公司 存储接口的功耗控制方法和装置及系统
CN101477403A (zh) * 2009-01-22 2009-07-08 浪潮电子信息产业股份有限公司 一种系统功耗自动控制方法
CN104679218A (zh) * 2015-02-13 2015-06-03 小米科技有限责任公司 控制功耗的方法和装置

Also Published As

Publication number Publication date
KR20160110066A (ko) 2016-09-21
RU2643516C2 (ru) 2018-02-02
JP6250844B2 (ja) 2017-12-20
MX356521B (es) 2018-05-31
CN104679218A (zh) 2015-06-03
MX2016002563A (es) 2016-10-13
RU2016113187A (ru) 2017-10-09
KR101729679B1 (ko) 2017-04-25
US20160239072A1 (en) 2016-08-18
EP3056970A1 (en) 2016-08-17
US10216248B2 (en) 2019-02-26
JP2017510920A (ja) 2017-04-13

Similar Documents

Publication Publication Date Title
WO2016127665A1 (zh) 控制功耗的方法和装置
EP3113549B1 (en) Method and device for waking up mcu chip
JP6355735B2 (ja) 省エネルギーモードを開始するための方法及び装置
WO2016029642A1 (zh) 后台应用程序的控制方法、装置及终端设备
EP3112979B1 (en) Method and device for waking up mcu
WO2017071068A1 (zh) 应用程序切换方法、装置及设备
CN105955765A (zh) 应用预加载方法及装置
CN106406657A (zh) 快捷操作方法、装置及终端
CN106354242A (zh) 一种模式切换方法及装置
WO2017088260A1 (zh) 睡眠状态检测方法、装置及系统
CN106484282B (zh) 设备控制方法及装置
CN106980445A (zh) 操控菜单的唤起方法及装置、电子设备
CN107423063A (zh) 多窗口处理方法、装置及设备
CN106095544A (zh) 中央处理器控制方法及装置
CN105930151A (zh) 应用程序的编译方法、装置及终端
CN106385488B (zh) 恢复正常工作模式的方法及装置
CN104461358B (zh) 点亮屏幕的方法及装置
US20170220401A1 (en) Method, device, and computer-readable storage medium for calling a process
CN108762830A (zh) 控制应用程序的方法及装置
CN115437702A (zh) 终端控制方法、终端控制装置及存储介质
CN116089025A (zh) 处理器频率控制方法、装置及存储介质
CN107797645A (zh) 资源控制方法及装置
CN110662280B (zh) 运行模式的切换方法及装置、可读存储介质、电子设备
CN107547735A (zh) 控制终端的方法及装置
CN106569931A (zh) 预计启动时长提醒的方法及装置

Legal Events

Date Code Title Description
ENP Entry into the national phase

Ref document number: 2016574328

Country of ref document: JP

Kind code of ref document: A

WWE Wipo information: entry into national phase

Ref document number: 1020157036598

Country of ref document: KR

WWE Wipo information: entry into national phase

Ref document number: MX/A/2016/002563

Country of ref document: MX

ENP Entry into the national phase

Ref document number: 2016113187

Country of ref document: RU

Kind code of ref document: A

REG Reference to national code

Ref country code: BR

Ref legal event code: B01A

Ref document number: 112016008539

Country of ref document: BR

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 15881815

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 112016008539

Country of ref document: BR

Kind code of ref document: A2

Effective date: 20160415

122 Ep: pct application non-entry in european phase

Ref document number: 15881815

Country of ref document: EP

Kind code of ref document: A1