[go: up one dir, main page]

CN110989820A - Method and device for controlling power consumption of processor, processor and electronic device - Google Patents

Method and device for controlling power consumption of processor, processor and electronic device Download PDF

Info

Publication number
CN110989820A
CN110989820A CN201911204652.6A CN201911204652A CN110989820A CN 110989820 A CN110989820 A CN 110989820A CN 201911204652 A CN201911204652 A CN 201911204652A CN 110989820 A CN110989820 A CN 110989820A
Authority
CN
China
Prior art keywords
processor
task
executed
enter
deep sleep
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.)
Pending
Application number
CN201911204652.6A
Other languages
Chinese (zh)
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.)
Shanghai Mxchip Information Technology Co Ltd
Original Assignee
Shanghai Mxchip Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Mxchip Information Technology Co Ltd filed Critical Shanghai Mxchip Information Technology Co Ltd
Priority to CN201911204652.6A priority Critical patent/CN110989820A/en
Publication of CN110989820A publication Critical patent/CN110989820A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/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/3228Monitoring task completion, e.g. by use of idle timers, stop commands or wait commands
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/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
    • G06F1/329Power saving characterised by the action undertaken by task scheduling

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Power Sources (AREA)

Abstract

The invention discloses a method and a device for controlling power consumption of a processor, the processor and an electronic device. The method comprises the following steps: detecting a task to be executed in a current operating system; and if the task to be executed is not detected within the preset time length, triggering the processor to enter a deep sleep mode, wherein the processor is in a running stop state in the deep sleep mode. The invention solves the technical problem that the power consumption control mode of the processor provided by the related technology is difficult to simultaneously realize the power consumption control of foreground and background application programs operated by the processor.

Description

Method and device for controlling power consumption of processor, processor and electronic device
Technical Field
The invention relates to the field of computers, in particular to a method and a device for controlling power consumption of a processor, the processor and an electronic device.
Background
Currently, in an operating system (e.g., a Windows system, a Linux system) of a Personal Computer (PC) end or an operating system (e.g., an Android system, an IOS system) of a mobile end provided in the related art, in order to control energy consumption of a processor, when a user is aware of no application requirement, power consumption of the processor is reduced. At this time, the processor will no longer run the control instruction of the foreground application, thereby reducing the utilization rate of the processor and reducing the power consumption of the processor. However, at this point the processor may need to continue to maintain the running background application (which may include any application not directly contacted by the user), although it is no longer necessary to run the foreground application. Because the front-end user cannot usually perceive such background applications or interact with such background applications, it is difficult to implement power consumption control for processor maintenance and running background applications.
In view of the above problems, no effective solution has been proposed.
Disclosure of Invention
At least some embodiments of the present invention provide a method and an apparatus for controlling processor power consumption, a processor, and an electronic apparatus, so as to at least solve the technical problem that it is difficult to simultaneously implement power consumption control on foreground and background applications running on a processor in a power consumption control manner of the processor provided in the related art.
According to an embodiment of the present invention, there is provided a method for controlling power consumption of a processor, including:
detecting a task to be executed in a current operating system; and if the task to be executed is not detected within the preset time length, triggering the processor to enter a deep sleep mode, wherein the processor is in a running stop state in the deep sleep mode.
Optionally, after triggering the processor to enter the deep sleep mode, the method further includes: the wake-up processor re-enters the operating mode in response to a control operation applied to the control switch.
Optionally, after triggering the processor to enter the deep sleep mode, the method further includes: receiving a network data packet from a control terminal, wherein information carried in the network data packet includes: a wake-up instruction; and according to the wake-up instruction, waking up the processor to enter the working mode again.
Optionally, before triggering the processor to enter the deep sleep mode, the method further includes: and displaying the countdown duration and prompt information in a graphical user interface, wherein the prompt information is used for prompting the processor to enter a deep sleep mode after the countdown duration is finished.
Optionally, after the countdown duration and the prompt message are displayed in the graphical user interface, the method further includes: and if the execution of the task to be executed is detected to be finished within the countdown time length and the execution result of the task to be executed is not stored, temporarily storing the execution result into a first preset storage area.
Optionally, after the countdown duration and the prompt message are displayed in the graphical user interface, the method further includes: and if the new receiving task is detected within the countdown time length, storing the new receiving task to the task queue, and preferentially executing the new receiving task after the processor reenters the working mode.
According to another aspect of the embodiments of the present invention, there is also provided an apparatus for controlling power consumption of a processor, including:
the detection module is used for detecting a task to be executed in the current operating system; and the control module is used for triggering the processor to enter a deep sleep mode if the task to be executed is not detected within the preset time length, wherein the processor is in a running stop state in the deep sleep mode.
Optionally, the apparatus further comprises: and the first wake-up module is used for responding to the control operation acted on the control switch and waking up the processor to re-enter the working mode.
Optionally, the apparatus further comprises: a receiving module, configured to receive a network data packet from a control end, where information carried in the network data packet includes: a wake-up instruction; and the second awakening module is used for awakening the processor to reenter the working mode according to the awakening instruction.
Optionally, the apparatus further comprises: and the display module is used for displaying the countdown duration and prompt information in the graphical user interface, wherein the prompt information is used for prompting the processor to enter a deep sleep mode after the countdown duration is finished.
Optionally, the apparatus further comprises: the first processing module is used for temporarily storing the execution result to the first preset storage area if the execution completion of the task to be executed is detected within the countdown time length and the execution result of the task to be executed is not stored yet.
Optionally, the apparatus further comprises: and the second processing module is used for storing the new receiving task to the task queue if the new receiving task is detected within the countdown time length, and preferentially executing the new receiving task after the processor reenters the working mode.
According to another aspect of the embodiments of the present invention, there is also provided a storage medium having a computer program stored therein, wherein the computer program is configured to execute the method for controlling power consumption of a processor in any one of the above when running.
According to another aspect of the embodiments of the present invention, there is also provided a processor for executing a program, wherein the program is configured to execute the control method of processor power consumption in any one of the above when running.
According to another aspect of the embodiments of the present invention, there is also provided an electronic apparatus, including a memory and a processor, the memory having a computer program stored therein, the processor being configured to execute the computer program to perform the method for controlling power consumption of the processor in any one of the above.
In at least some embodiments of the present invention, a mode of detecting a to-be-executed task in a current operating system is adopted, and when the to-be-executed task is not detected within a preset time period, the processor is triggered to enter a deep sleep mode, and the processor is in a stop operation state in the deep sleep mode, so that not only can power consumption control be performed on a foreground application program operated by the processor, but also power consumption control can be performed on a background application program operated by the processor, and thus a technical effect of significantly reducing the power consumption of the processor during the operation of an embedded internet of things platform is achieved, and further, a technical problem that the power consumption control of the foreground and background application programs operated by the processor is difficult to be simultaneously achieved by a processor power consumption control mode provided in related technologies is solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
FIG. 1 is a flow diagram of a method of controlling power consumption of a processor according to one embodiment of the invention;
FIG. 2 is a block diagram of an apparatus for controlling processor power consumption according to one embodiment of the present invention;
fig. 3 is a block diagram of a control apparatus for processor power consumption according to an alternative embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
In accordance with one embodiment of the present invention, there is provided an embodiment of a method for controlling power consumption of a processor, it should be noted that the steps illustrated in the flowchart of the accompanying drawings may be performed in a computer system such as a set of computer-executable instructions, and that although a logical order is illustrated in the flowchart, in some cases the steps illustrated or described may be performed in an order different than here.
The method embodiments may be performed in a mobile terminal, a computer terminal or a similar computing device. For example, operating on a mobile terminal, the mobile terminal may include one or more processors (which may include, but are not limited to, a processing device such as a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a Digital Signal Processing (DSP) chip, a Microprocessor (MCU), or a programmable logic device (FPGA)), and memory for storing data. Optionally, the mobile terminal may further include a transmission device, an input/output device, and a display device for a communication function. It will be understood by those skilled in the art that the foregoing structural description is only illustrative and not restrictive of the structure of the mobile terminal. For example, the mobile terminal may also include more or fewer components than described above, or have a different configuration than described above.
The memory may be used to store computer programs, for example, software programs and modules of application software, such as computer programs corresponding to the control method of processor power consumption in the embodiments of the present invention, and the processor executes various functional applications and data processing by running the computer programs stored in the memory, that is, implements the control method of processor power consumption described above. The memory may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory may further include memory located remotely from the processor, and these remote memories may be connected to the mobile terminal through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device is used to receive or transmit data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device includes a Network adapter (NIC) that can be connected to other Network devices through a base station to communicate with the internet. In one example, the transmission device may be a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
The display device may be, for example, a touch screen type Liquid Crystal Display (LCD) and a touch display (also referred to as a "touch screen" or "touch display screen"). The liquid crystal display may enable a user to interact with a user interface of the mobile terminal. In some embodiments, the mobile terminal has a Graphical User Interface (GUI) with which a user can interact by touching finger contacts and/or gestures on a touch-sensitive surface, where the human-machine interaction function optionally includes the following interactions: executable instructions for creating web pages, drawing, word processing, making electronic documents, games, video conferencing, instant messaging, emailing, call interfacing, playing digital video, playing digital music, and/or web browsing, etc., for performing the above-described human-computer interaction functions, are configured/stored in one or more processor-executable computer program products or readable storage media.
In this embodiment, a method for controlling power consumption of a processor operating in the mobile terminal is provided, and fig. 1 is a flowchart of a method for controlling power consumption of a processor according to an embodiment of the present invention, as shown in fig. 1, the method includes the following steps:
step S12, detecting the task to be executed in the current operating system;
and step S14, if the task to be executed is not detected within the preset time length, triggering the processor to enter a deep sleep mode, wherein the processor is in a running stop state in the deep sleep mode.
Through the steps, a mode of detecting the task to be executed in the current operating system can be adopted, the processor is triggered to enter the deep sleep mode under the condition that the task to be executed is not detected within the preset time, and the processor is in the running stop state under the deep sleep mode, so that the purposes of performing power consumption control on the foreground application program running by the processor and performing power consumption control on the background application program running by the processor are achieved, the technical effect of obviously reducing the power consumption of the processor during the running of the embedded internet of things platform is achieved, and the technical problem that the power consumption control on the foreground application program and the background application program running by the processor in the power consumption control mode provided by the related technology is difficult to simultaneously achieve is solved.
In an optional embodiment, the operating system may be a microcontroller-based internet of things access operating system, and is a software platform for developing internet of things devices. The operating system is internally provided with a real-time operating system kernel facing the equipment of the Internet of things, and is particularly suitable for running on the micro-control equipment with limited resources. The operating system comprises a bottom chip driver, a wireless network protocol, a radio frequency control technology and an application framework. In addition, the operating system also comprises a network communication protocol stack, a security algorithm and protocol, a hardware abstraction layer, a programming tool and other software function packages essential for developing the Internet of things.
Based on the operating system, if the task to be executed (such as running audio and video playing software, running communication software, updating software version, transmitting network data and the like) is not detected within the preset time length, the processor is triggered to enter a deep sleep mode. The processor is in a shutdown state in the deep sleep mode. That is, the processor in the deep sleep mode will not execute the control instruction of the foreground application nor the control instruction of the background application, but will be completely in the stop state.
Optionally, after triggering the processor to enter the deep sleep mode at step S14, the method may further include the following steps:
in response to the control operation applied to the control switch, the wake-up processor re-enters the operating mode, step S15.
After triggering the processor to enter the deep sleep mode, if it is desired to switch the processor from the deep sleep mode back to the normal operating mode, the processor may be awakened to re-enter the operating mode by responding to a control operation applied to the control switch. The control switch may be a physical switch added to an electronic device such as a mobile terminal. Therefore, the control operation in response to the control switch may be a pressing operation in response to a physical button or a sliding operation in response to a physical button (e.g., a physical button that slides back and forth between an on-position and an off-position). The control switch can be a virtual control area or a virtual control key arranged on a display screen of electronic equipment such as a mobile terminal. Therefore, the control operation responding to the control switch may be a sliding operation responding to the virtual control area, or may be one of a re-pressing operation (i.e. the pressing force degree is greater than the preset pressure threshold value), a long-pressing operation (i.e. the pressing time length exceeds the preset time threshold value), a double-click operation, and the like, which are applied to the virtual control key. The response operation can be completed by a plurality of different types of sensors arranged in the mobile terminal, and then the processor is awakened to enter the working mode again through the generated induction signal.
Optionally, after triggering the processor to enter the deep sleep mode at step S14, the method may further include the following steps:
step S16, receiving a network data packet from the control end, where the information carried in the network data packet includes: a wake-up instruction;
step S17, according to the wake-up command, wake up the processor to re-enter the operating mode.
The control terminal may be a mobile terminal, a computer terminal or a similar operation device, or may be a server. The control terminal can be responsible for monitoring the operation mode of the operating system in real time. If the control end determines that the mobile terminal running the operating system currently enters the deep sleep mode and needs to switch the processor from the deep sleep mode to the normal working mode based on the consideration of factors such as load balancing and the like, a network data packet carrying a wake-up instruction can be sent to the mobile terminal, so that the mobile terminal wakes up the processor to reenter the working mode according to the wake-up instruction.
Optionally, before triggering the processor to enter the deep sleep mode in step S14, the method may further include the following steps:
and step S13, displaying the countdown duration and prompt information in the graphical user interface, wherein the prompt information is used for prompting the processor to enter the deep sleep mode after the countdown duration is finished.
Before entering the deep sleep mode, a countdown duration and a prompt message may be displayed in the graphical user interface to prompt the front-end user that the processor enters the deep sleep mode after the countdown duration ends. Considering that there may be some special cases when the determination condition for not detecting the task to be executed within the preset time duration is not detected, in order to enhance the user experience, the countdown time duration (e.g., 60S) and the prompt information (e.g., the processor will enter the deep sleep mode after 60S) may be displayed in the graphical user interface to ensure that the user has sufficient time to handle the incomplete event.
Optionally, after the countdown duration and the prompt message are displayed in the graphical user interface at step S13, the following steps may be further included:
in step S18, if it is detected that the task to be executed has been executed and the execution result of the task to be executed has not been stored yet within the countdown period, the execution result is temporarily stored in the first preset storage area.
It is considered that, in a normal situation, if the processor has completely executed all the detected tasks to be executed, an execution result of each task to be executed is generated. However, when the task to be executed is not detected within the predetermined time period, the processor is triggered to enter the deep sleep mode, and therefore, a certain buffer time period (i.e., a countdown time period) needs to be provided so that the user can perform subsequent processing in time on the execution result of the task to be executed, which is already executed but is not stored. Certainly, before the processor enters the deep sleep mode, the execution result may be actively buffered in the first preset storage area, so as to prevent the execution result from being abnormal and unable to be recovered due to the fact that the user fails to perform subsequent processing on the execution result in time. The first preset storage area can be a storage space such as a local cache of the mobile terminal and can also be a cloud storage space on the remote server, so that a user can search and confirm an execution result in time.
For example: the terminal A and the terminal B need to transmit network data, and the two parties agree in advance that after the network data sent by the terminal A is successfully received by the terminal B, the terminal B needs to return a confirmation message to the terminal A. The confirmation message may be returned to the terminal a, typically after the user performs the confirmation operation. However, since the terminal B does not detect the task to be executed within the preset time and the user does not perform the confirmation operation, that is, the terminal B is about to enter the deep sleep mode, if the execution result is not stored at this time, the terminal a cannot know whether the network data transmission is successful. However, if the execution result is stored in the local cache of the terminal B or the cloud storage space on the remote server within the countdown time, even if the terminal B does not return the confirmation message to the terminal a, the terminal a may obtain the execution result by querying the local cache of the terminal B or the cloud storage space on the remote server, and then determine whether the network data transmission is successful.
Optionally, after the countdown duration and the prompt message are displayed in the graphical user interface in step S13, the following steps may be further included:
and step S19, if a new received task is detected within the countdown time length, storing the new received task to the task queue, and preferentially executing the new received task after the processor reenters the working mode.
Since the processor is triggered to enter the deep sleep mode when the task to be executed is not detected within the predetermined time period, a certain buffer time period (i.e., a countdown time period) needs to be provided so that the user can perform subsequent processing on the execution result of the executed task to be executed in time. In this process, the current mobile terminal may also detect a new reception task within the countdown period. At this time, since the processor is about to enter the deep sleep mode and cannot process the new receiving task, the mobile terminal may temporarily store the new receiving task in a preset task queue, so that the new receiving task is preferentially executed after the processor reenters the working mode. Specifically, after the processor enters the operating mode again, the user may skip the user confirmation link to preferentially execute the new receiving task directly, or the user may be prompted to currently store the unprocessed new receiving task in the task queue first, and then wait for the user to confirm whether to preferentially process the new receiving task. And if the user confirms that the new receiving task is processed preferentially, the new receiving task is executed preferentially. If the user confirms that the newly received task is not to be processed for a while, the newly received task is skipped and the remaining tasks are executed.
For example: in the countdown process, the current mobile terminal detects a new update task. At this time, since the processor is about to enter the deep sleep mode and cannot process the update task, the mobile terminal may temporarily store the update task in a preset task queue, so that the update task is preferentially executed after the processor reenters the working mode. Specifically, after the processor reenters the working mode, the user may skip the user confirmation link to directly preferentially execute the update task, or may first prompt the user that the unprocessed update task is currently stored in the task queue, and then wait for the user to confirm whether to preferentially process the update task. And if the user confirms that the updating task is processed preferentially, the updating task is executed preferentially. If the user confirms that the update task is not to be processed for the moment, the update task is skipped and the rest of the tasks are executed.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
In this embodiment, a device for controlling power consumption of a processor is also provided, and the device is used to implement the foregoing embodiments and preferred embodiments, and the description of the device that has been already made is omitted. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
Fig. 2 is a block diagram of a control apparatus for processor power consumption according to an embodiment of the present invention, as shown in fig. 2, the apparatus including: the detection module 10 is used for detecting a task to be executed in a current operating system; and the control module 20 is configured to trigger the processor to enter a deep sleep mode if the task to be executed is not detected within the preset time period, where the processor is in a stop operation state in the deep sleep mode.
Optionally, fig. 3 is a block diagram of a device for controlling power consumption of a processor according to an alternative embodiment of the present invention, and as shown in fig. 3, the device includes, in addition to all modules shown in fig. 2: a first wake-up module 30 for waking up the processor to re-enter the operating mode in response to a control operation applied to the control switch.
Optionally, as shown in fig. 3, the apparatus includes, in addition to all the modules shown in fig. 2: a receiving module 40, configured to receive a network data packet from a control end, where information carried in the network data packet includes: a wake-up instruction; and a second wake-up module 50, configured to wake up the processor to re-enter the operating mode according to the wake-up instruction.
Optionally, as shown in fig. 3, the apparatus includes, in addition to all the modules shown in fig. 2: and a display module 60, configured to display the countdown duration and prompt information in the graphical user interface, where the prompt information is used to prompt the processor to enter the deep sleep mode after the countdown duration is over.
Optionally, as shown in fig. 3, the apparatus includes, in addition to all the modules shown in fig. 2: the first processing module 70 is configured to, if it is detected within the countdown time period that the task to be executed has been executed and the execution result of the task to be executed is not stored yet, temporarily store the execution result in the first preset storage area.
Optionally, as shown in fig. 3, the apparatus includes, in addition to all the modules shown in fig. 2: and a second processing module 80, configured to, if a new received task is detected within the countdown period, store the new received task to the task queue, and preferentially execute the new received task after the processor reenters the operating mode.
It should be noted that, the above modules may be implemented by software or hardware, and for the latter, the following may be implemented, but not limited to: the modules are all positioned in the same processor; alternatively, the modules are respectively located in different processors in any combination.
Embodiments of the present invention also provide a storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the above method embodiments when executed.
Alternatively, in the present embodiment, the storage medium may be configured to store a computer program for executing the steps of:
s1, detecting a task to be executed in the current operating system;
and S2, if the task to be executed is not detected within the preset time length, triggering the processor to enter a deep sleep mode, wherein the processor is in a running stop state in the deep sleep mode.
Optionally, in this embodiment, the storage medium may include, but is not limited to: various media capable of storing computer programs, such as a usb disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk.
Embodiments of the present invention also provide an electronic device comprising a memory having a computer program stored therein and a processor arranged to run the computer program to perform the steps of any of the above method embodiments.
Optionally, the electronic apparatus may further include a transmission device and an input/output device, wherein the transmission device is connected to the processor, and the input/output device is connected to the processor.
Optionally, in this embodiment, the processor may be configured to execute the following steps by a computer program:
s1, detecting a task to be executed in the current operating system;
and S2, if the task to be executed is not detected within the preset time length, triggering the processor to enter a deep sleep mode, wherein the processor is in a running stop state in the deep sleep mode.
Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation manners, and this embodiment is not described herein again.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
In the above embodiments of the present invention, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed technology can be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units may be a logical division, and in actual implementation, there may be another division, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

Claims (15)

1. A method for controlling power consumption of a processor, comprising:
detecting a task to be executed in a current operating system;
and if the task to be executed is not detected within the preset time length, triggering the processor to enter a deep sleep mode, wherein the processor is in a running stop state in the deep sleep mode.
2. The method of claim 1, further comprising, after triggering the processor to enter the deep sleep mode:
waking up the processor to re-enter the operating mode in response to a control operation acting on the control switch.
3. The method of claim 1, further comprising, after triggering the processor to enter the deep sleep mode:
receiving a network data packet from a control terminal, wherein information carried in the network data packet includes: a wake-up instruction;
and according to the awakening instruction, awakening the processor to re-enter the working mode.
4. The method of claim 1, further comprising, prior to triggering the processor to enter the deep sleep mode:
displaying a countdown duration and prompt information in a graphical user interface, wherein the prompt information is used for prompting the processor to enter the deep sleep mode after the countdown duration is finished.
5. The method of claim 4, wherein after displaying the countdown duration and the prompt message in the graphical user interface, further comprising:
if the fact that the to-be-executed task is executed completely but the execution result of the to-be-executed task is not stored is detected within the countdown duration, the execution result is temporarily stored in a first preset storage area.
6. The method of claim 4, wherein after displaying the countdown duration and the prompt message in the graphical user interface, further comprising:
and if a new receiving task is detected in the countdown time length, storing the new receiving task to a task queue, and preferentially executing the new receiving task after the processor reenters the working mode.
7. An apparatus for controlling power consumption of a processor, comprising:
the detection module is used for detecting a task to be executed in the current operating system;
the control module is used for triggering the processor to enter a deep sleep mode if the task to be executed is not detected within a preset time length, wherein the processor is in a running stop state in the deep sleep mode.
8. The apparatus of claim 7, further comprising:
a first wake-up module for waking up the processor to re-enter the operating mode in response to a control operation applied to the control switch.
9. The apparatus of claim 7, further comprising:
a receiving module, configured to receive a network data packet from a control end, where information carried in the network data packet includes: a wake-up instruction;
and the second awakening module is used for awakening the processor to re-enter the working mode according to the awakening instruction.
10. The apparatus of claim 7, further comprising:
the display module is used for displaying countdown duration and prompt information in a graphical user interface, wherein the prompt information is used for prompting the processor to enter the deep sleep mode after the countdown duration is finished.
11. The apparatus of claim 10, further comprising:
the first processing module is used for temporarily storing the execution result to a first preset storage area if the execution of the task to be executed is detected to be completed but the execution result of the task to be executed is not stored in the countdown time length.
12. The apparatus of claim 10, further comprising:
and the second processing module is used for storing the new receiving task to a task queue if the new receiving task is detected within the countdown time length, and preferentially executing the new receiving task after the processor reenters the working mode.
13. A storage medium having a computer program stored thereon, wherein the computer program is arranged to execute the method of controlling power consumption of a processor according to any one of claims 1 to 6 when running.
14. A processor arranged to run a program, wherein the program is arranged to perform the method of controlling power consumption of the processor of any one of claims 1 to 6 when running.
15. An electronic device comprising a memory and a processor, wherein the memory has stored therein a computer program, and the processor is configured to execute the computer program to perform the method of controlling power consumption of the processor according to any one of claims 1 to 6.
CN201911204652.6A 2019-11-29 2019-11-29 Method and device for controlling power consumption of processor, processor and electronic device Pending CN110989820A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911204652.6A CN110989820A (en) 2019-11-29 2019-11-29 Method and device for controlling power consumption of processor, processor and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911204652.6A CN110989820A (en) 2019-11-29 2019-11-29 Method and device for controlling power consumption of processor, processor and electronic device

Publications (1)

Publication Number Publication Date
CN110989820A true CN110989820A (en) 2020-04-10

Family

ID=70088560

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911204652.6A Pending CN110989820A (en) 2019-11-29 2019-11-29 Method and device for controlling power consumption of processor, processor and electronic device

Country Status (1)

Country Link
CN (1) CN110989820A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111679730A (en) * 2020-06-01 2020-09-18 深圳移航通信技术有限公司 Processor state control method and device based on FreeRTOS
CN112114651A (en) * 2020-09-24 2020-12-22 哲库科技(北京)有限公司 Power saving method and device, chip, device and storage medium for processor cluster
CN114610140A (en) * 2022-03-31 2022-06-10 联想(北京)有限公司 Power consumption control method and system of processor and electronic equipment

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5713029A (en) * 1995-09-29 1998-01-27 International Business Machines Corporation Information handling system including doze mode control
US20080059275A1 (en) * 2006-08-31 2008-03-06 Bernard Keany Automatic task performance as scheduled using embedded secondary processor
US20100106886A1 (en) * 2008-10-29 2010-04-29 Sandisk Il Ltd. Transparent Self-Hibernation of Non-Volatile Memory System
CN102841674A (en) * 2012-07-25 2012-12-26 中国科学院上海微系统与信息技术研究所 Embedded system based on novel memory and hibernation and awakening method for process of embedded system
CN102955453A (en) * 2011-08-19 2013-03-06 比亚迪股份有限公司 Remote control system and remote control method for flameout automobiles
US20140143568A1 (en) * 2012-11-16 2014-05-22 Samsung Electronics Co., Ltd. Monitoring and managing processor activity in power save mode of portable electronic device
CN103984598A (en) * 2013-02-07 2014-08-13 宏达国际电子股份有限公司 method and system for thread scheduling
US20150067241A1 (en) * 2012-05-29 2015-03-05 Lee Warren Atkinson Hibernation Based on Page Source
CN105763735A (en) * 2016-04-01 2016-07-13 努比亚技术有限公司 User equipment and quick sleep method
CN106095059A (en) * 2016-06-08 2016-11-09 维沃移动通信有限公司 A kind of method reducing mobile terminal power consumption and mobile terminal
CN107454955A (en) * 2017-06-15 2017-12-08 深圳市汇顶科技股份有限公司 A kind of screen awakening method, device and terminal device
CN107980120A (en) * 2016-12-08 2018-05-01 深圳市柔宇科技有限公司 Electronic device and its dormancy control method
WO2019033779A1 (en) * 2017-08-18 2019-02-21 华为技术有限公司 Method and device for waking up computer from sleep state

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5713029A (en) * 1995-09-29 1998-01-27 International Business Machines Corporation Information handling system including doze mode control
US20080059275A1 (en) * 2006-08-31 2008-03-06 Bernard Keany Automatic task performance as scheduled using embedded secondary processor
US20100106886A1 (en) * 2008-10-29 2010-04-29 Sandisk Il Ltd. Transparent Self-Hibernation of Non-Volatile Memory System
CN102955453A (en) * 2011-08-19 2013-03-06 比亚迪股份有限公司 Remote control system and remote control method for flameout automobiles
US20150067241A1 (en) * 2012-05-29 2015-03-05 Lee Warren Atkinson Hibernation Based on Page Source
CN102841674A (en) * 2012-07-25 2012-12-26 中国科学院上海微系统与信息技术研究所 Embedded system based on novel memory and hibernation and awakening method for process of embedded system
US20140143568A1 (en) * 2012-11-16 2014-05-22 Samsung Electronics Co., Ltd. Monitoring and managing processor activity in power save mode of portable electronic device
CN103984598A (en) * 2013-02-07 2014-08-13 宏达国际电子股份有限公司 method and system for thread scheduling
CN105763735A (en) * 2016-04-01 2016-07-13 努比亚技术有限公司 User equipment and quick sleep method
CN106095059A (en) * 2016-06-08 2016-11-09 维沃移动通信有限公司 A kind of method reducing mobile terminal power consumption and mobile terminal
CN107980120A (en) * 2016-12-08 2018-05-01 深圳市柔宇科技有限公司 Electronic device and its dormancy control method
CN107454955A (en) * 2017-06-15 2017-12-08 深圳市汇顶科技股份有限公司 A kind of screen awakening method, device and terminal device
WO2019033779A1 (en) * 2017-08-18 2019-02-21 华为技术有限公司 Method and device for waking up computer from sleep state

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
万马良;廉迎战;唐敏;: "多任务机制在单片机系统设计中的实现" *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111679730A (en) * 2020-06-01 2020-09-18 深圳移航通信技术有限公司 Processor state control method and device based on FreeRTOS
CN112114651A (en) * 2020-09-24 2020-12-22 哲库科技(北京)有限公司 Power saving method and device, chip, device and storage medium for processor cluster
CN112114651B (en) * 2020-09-24 2022-08-16 哲库科技(北京)有限公司 Power saving method and device for processor cluster, chip, equipment and storage medium
CN114610140A (en) * 2022-03-31 2022-06-10 联想(北京)有限公司 Power consumption control method and system of processor and electronic equipment

Similar Documents

Publication Publication Date Title
CN104216753A (en) Method for rapidly starting application program for terminal, and terminal
EP2733995A1 (en) Control method and device for awaking intelligent terminal
US10474507B2 (en) Terminal application process management method and apparatus
CN110989820A (en) Method and device for controlling power consumption of processor, processor and electronic device
CN107783803A (en) System optimization method, device, storage medium and intelligent terminal for intelligent terminal
CN106528282A (en) Method, device and terminal for closing process
CN106658753B (en) Data migration method and terminal equipment
EP3407190A1 (en) Process control method and related device
US20200004578A1 (en) Method for fingerprint recognition and related products
CN106126377B (en) System startup method and device
CN106095065A (en) A kind of mode switching method and device
CN106055237B (en) One kind slides booster response method and equipment
AU2019203256B2 (en) Fingerprint event processing method, apparatus, and terminal
CN106598783A (en) A display control method and device for an intelligent terminal, and an intelligent terminal
CN111400080B (en) Method and device for setting shipping mode of electronic product and electronic equipment
CN110018905B (en) Information processing method, device, computer device, and computer-readable storage medium
CN107870792B (en) A kind of starting method of mobile terminal, mobile terminal and media product
US9672048B2 (en) Electronic device and method for waking up operating system thereof
CN112929254A (en) Message processing method and device and electronic equipment
CN107066264A (en) A kind of bright screen control method and mobile terminal
CN105739771B (en) A display interface management method, device and terminal
CN106066769A (en) A processing method for a mobile terminal and the mobile terminal
CN106648976A (en) A data backup method and device
CN106371896A (en) Virtual machine memory configuration method and device, mobile terminal
CN107203377B (en) Mobile terminal and awakening method thereof

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20200410