CN117130462A - Equipment control method and electronic equipment - Google Patents

Equipment control method and electronic equipment Download PDF

Info

Publication number
CN117130462A
CN117130462A CN202310304793.5A CN202310304793A CN117130462A CN 117130462 A CN117130462 A CN 117130462A CN 202310304793 A CN202310304793 A CN 202310304793A CN 117130462 A CN117130462 A CN 117130462A
Authority
CN
China
Prior art keywords
performance parameter
mode
performance
notebook computer
parameter
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
CN202310304793.5A
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.)
Honor Device Co Ltd
Original Assignee
Honor Device 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 Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202310304793.5A priority Critical patent/CN117130462A/en
Publication of CN117130462A publication Critical patent/CN117130462A/en
Pending legal-status Critical Current

Links

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/3234Power saving characterised by the action undertaken
    • G06F1/329Power saving characterised by the action undertaken by task scheduling
    • 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/3212Monitoring battery levels, e.g. power saving mode being initiated when battery voltage goes below a certain level
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
    • G06F9/4893Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues taking into account power or heat criteria
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5094Allocation of resources, e.g. of the central processing unit [CPU] where the allocation takes into account power or heat criteria
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The application provides a device control method and electronic equipment, and relates to the technical field of computers. The scheme improves the compatibility between the performance and the energy consumption of the electronic equipment. The specific scheme is as follows: operating according to a first performance parameter corresponding to the first mode, wherein the parameter type of the first performance parameter comprises one or more of central processor power, overall power consumption of a graphics system, the number of enabled central processor cores, a main frequency of the central processor and a main frequency of the graphics processor; under the first condition, the operation is sequentially and alternately performed according to a second performance parameter corresponding to a second mode and the first performance parameter; the second performance parameter is the same as the first performance parameter in type, and the value of the second performance parameter is larger than that of the first performance parameter; wherein the first condition comprises one or more of the following: enabling a first application; an indication by the user to enable the second mode is detected.

Description

Equipment control method and electronic equipment
Technical Field
The present application relates to the field of computer technologies, and in particular, to an apparatus control method and an electronic apparatus.
Background
The development of electronic equipment is that the performance and the energy consumption are still the iterative improvement direction of the equipment so far, and are also important indexes of more attention of users.
In general, when the electronic device enables the high-performance mode, for example, when the number of cores of a central processing unit (central processing unit, CPU) is large, the main frequency of the CPU is high, the power of the CPU is high, the main frequency of an image processor (graphics processing unit, GPU) is high, and the power of the GPU is high, the real-time power consumption of the electronic device is also high. It will be appreciated that the higher the power consumption, the higher the overall power consumption. That is, at present, it is difficult to simultaneously optimize the performance and power consumption of the electronic device. Thus, in the case of limited device power, the electronic device either cannot enable the high performance mode or the device duration is significantly reduced after the high performance mode is enabled.
Disclosure of Invention
The application provides a device control method and electronic equipment, which are used for considering high performance and endurance under the condition of limited electric quantity of the device.
In order to achieve the above purpose, the embodiment of the present application adopts the following technical scheme:
in a first aspect, an apparatus control method provided by an embodiment of the present application is applied to an electronic apparatus, where the method includes: operating according to a first performance parameter corresponding to the first mode, wherein the parameter type of the first performance parameter comprises one or more of central processor power, overall power consumption of a graphics system, the number of enabled central processor cores, a main frequency of the central processor and a main frequency of the graphics processor; under the first condition, the operation is sequentially and alternately performed according to a second performance parameter corresponding to a second mode and the first performance parameter; the second performance parameter is the same as the first performance parameter in type, and the value of the second performance parameter is larger than that of the first performance parameter; wherein the first condition comprises one or more of the following: enabling a first application; an indication by the user to enable the second mode is detected.
The first application may be program data that has a high requirement for performance of the device, for example. Such as gaming applications, large simulation applications, design class applications, development class applications, etc. The first application may have a higher requirement on performance of the device, and may be configured in that during running of the first application, system resources that need to be occupied meet a preset condition, where the system resources include a central processor resource and a graphics processor resource, and the preset condition includes one or more of a number of central processor cores that need to be enabled being greater than a preset number, a central processor main frequency that needs to be enabled being greater than a first frequency, and a graphics processor main frequency that needs to be enabled being greater than a second frequency.
Also illustratively, the first application may also be program data that is highly demanding with respect to device performance at certain particular phases of operation. Such as office-like applications that require parsing or opening of large volumes of files.
In addition, taking the first performance parameter as the CPU power as an example, when the CPU power runs according to the first performance parameter, the CPU power is not more than the first performance parameter as a constraint condition, various system resources of the electronic equipment are called, and the performance required by the running of the electronic equipment is released. That is, the maximum CPU power of the electronic device during operation according to the first performance parameter is equal to the first performance parameter.
Taking the second performance parameter as an example, when the CPU power is operated according to the second performance parameter, the CPU power is not more than the second performance parameter as a constraint condition, and various system resources of the electronic equipment are called to release the performance required by the operation of the electronic equipment. That is, during operation according to the second performance parameter, the maximum CPU power of the electronic device is equal to the second performance parameter.
The electronic device operates in accordance with the second performance parameter and may be referred to as enabling the second mode. The electronic device operating in accordance with the first performance parameter may be referred to as enabling the first mode. The electronic device exhibits higher device performance when enabled in the second mode than when enabled in the first mode. At the same time, the energy consumption generated when the first mode is enabled is lower than the energy consumption when the second mode is enabled.
In the above embodiment, the electronic device may sequentially and alternately enable the second mode and the first mode according to the first application determining that the second mode needs to be enabled, or according to the active indication of the user determining that the second mode needs to be enabled. In this way, higher performance can be exhibited during alternate enablement of the second mode and the first mode than when only the first mode is enabled, meeting the performance requirements of the current user for the device. The energy consumption generated during alternating enabling of the second mode and the first mode is lower than when only the second mode is enabled. In some embodiments, before sequentially alternating the operation of the first performance parameter and the first performance parameter corresponding to the second mode, the method further comprises: and determining that the electronic equipment is not connected with an external power supply.
In the above embodiment, the electric quantity of the electronic device is limited without connecting an external power source. Under the scene of limited electric quantity, the electronic equipment can also increase the equipment duration while meeting the performance requirement by alternately starting the first mode and the second mode.
In some embodiments, after ending the alternating operation according to the second performance parameter and the first performance parameter, in the case that the electronic device is again operated according to the first performance parameter, the method further comprises: under the first condition, determining that the electronic equipment is connected with the external power supply; and operating according to a second performance parameter corresponding to the second mode.
Wherein the electronic device may end the alternately enabling the first mode and the second mode in at least one of the following scenarios:
(1) And the stopping time point of the heartbeat control strategy is triggered to be ended. For example, the number of alternations between the first mode and the second mode has reached the number indicated in the heartbeat control strategy. For another example, the activation time of the heartbeat control policy has reached a preconfigured maximum time. For another example, the point in time when the particular program being run ceases to run. As another example, a point in time when a particular usage scenario does not already exist.
(2) And an external power supply is connected.
(3) An operation is received that the user instructs to turn off alternately enabling the first mode and the second mode.
In the above embodiment, after the first mode and the second mode are alternatively started and the electronic device decides to continue to operate in the first mode, if it is detected that the electronic device is connected to the external power supply, the second mode is directly started, so as to preferably meet the performance requirement, also under the first condition.
In some embodiments, where the first condition is that the first application is enabled, before the sequentially alternating running according to the first performance parameter and the first performance parameter corresponding to the second mode, the method further includes: detecting a first event; wherein, in the case that the first application is a document editing application, the first event is opening a first type file, and the first type file is a file with a volume larger than a preset value; in the case that the first application is a simulation application, the first event is the receipt of an operation to start simulation.
In some embodiments, when different ones of the first applications are enabled, the manner in which the second performance parameter and the first performance parameter are alternately run includes at least one of the following differences: the time length of operation according to the first performance parameter is different; the time length of operation according to the second performance parameter is different; the corresponding number of alternations is different.
In the above embodiment, the manner of alternately switching the second mode and the first mode may also be different for different first applications, so that the suitability between the performance and the first application may be improved.
In some embodiments, when the remaining power of the electronic device is different, the manner of alternately operating according to the second performance parameter and the first performance parameter includes at least one of the following differences: the time length of operation according to the first performance parameter is different; the length of time of operation is different according to the second performance parameter.
In the above embodiment, the manner of alternately switching the second mode and the first mode of the electronic device under different residual amounts of power may also be different, so that the residual amounts of power may be utilized to the maximum extent, and the endurance and the performance of the device may be coordinated.
In some embodiments, during operation alternately in accordance with the second performance parameter and the first performance parameter, the method further comprises: under the condition of running according to the second performance parameter, the rotating speed of the cooling fan of the electronic equipment is increased from a first rotating speed to a second rotating speed; and recovering the rotating speed of the cooling fan to the first rotating speed under the condition of operating according to the first performance parameter.
In some embodiments, after sequentially alternating operation of the second performance parameter and the first performance parameter corresponding to the second mode, the method further comprises: detecting connection with the external power supply; operating according to a second performance parameter corresponding to the second mode; under a second condition, operating according to a third performance parameter in a first period, wherein the parameter types of the third performance parameter and the first performance parameter are the same, and the value of the third performance parameter is larger than that of the first performance parameter and smaller than that of the second performance parameter; the second condition includes detecting that the electronic device is disconnected from the external power source and the first application is running; in a second period after the first period, operating according to the fourth performance parameter, wherein the fourth performance parameter is the same as the first performance parameter in type, and the value of the fourth performance parameter is larger than the value of the first performance parameter and smaller than the value of the third performance parameter; and continuing to operate according to a second performance parameter corresponding to the second mode under the condition that the electronic equipment is detected to be connected with the external power supply again.
In the above embodiment, taking the case that the third performance parameter is the CPU power as an example, when the electronic device operates according to the third performance parameter, the CPU power is not more than the third performance parameter and is used as a constraint condition, and various system resources of the electronic device are invoked, so as to release the performance required by the operation of the electronic device. That is, during operation according to the third performance parameter, the maximum CPU power of the electronic device is equal to the third performance parameter.
Taking the fourth performance parameter as an example of CPU power, when the electronic equipment operates according to the fourth performance parameter, adopting the CPU power not exceeding the fourth performance parameter as a constraint condition, calling various system resources of the electronic equipment, and releasing the performance required by the operation of the electronic equipment. That is, during operation according to the fourth performance parameter, the maximum CPU power of the electronic device is equal to the fourth performance parameter.
In some embodiments, in a case where the remaining power of the electronic device is different, the corresponding time length of the first period is different, and the corresponding time length of the second period is also different.
In a second aspect, an apparatus control method provided by an embodiment of the present application is applied to an electronic apparatus, where the method includes: after the electronic equipment is connected with the external power supply, the electronic equipment operates according to a second performance parameter corresponding to the second mode; the parameter types of the second performance parameter include one or more of central processor power, graphics system overall power consumption, number of enabled central processor cores, central processor main frequency, and graphics processor main frequency; under a second condition, operating according to a third performance parameter in a first period, wherein the parameter types of the third performance parameter and the second performance parameter are the same, the value of the third performance parameter is smaller than the value of the second performance parameter and larger than the value of a first performance parameter corresponding to a first mode, and the parameter types of the first performance parameter and the second performance parameter are the same; the second condition includes detecting that the electronic device is disconnected from the external power source and that the electronic device contains an operating application; and after the first period, operating according to a first performance parameter corresponding to the first mode.
In the above embodiment, the electronic device may transition from operating according to the second performance parameter to operating according to the first performance parameter by using the third performance parameter, so as to avoid that the performance of the device decreases too fast and affects the use experience of the user.
In some embodiments, the electronic device may be configured to operate in accordance with a second performance parameter corresponding to the second mode in response to an event "connect the external power connection".
In other embodiments, after the electronic device is connected to the external power supply, the electronic device may also respond to the user instruction to start the operation of the second mode, and operate according to the second performance parameter corresponding to the second mode.
In some embodiments, in the second condition, the running application is a first application, wherein the first application, during running, the required amount of system resources including central processor resources and graphics processor resources meets a preset condition, the preset condition including one or more of a number of central processor cores required to be enabled being greater than a preset number, a central processor main frequency required to be enabled being greater than a first frequency, and a graphics processor main frequency required to be enabled being greater than a second frequency.
In some embodiments, prior to operating in accordance with the first performance parameter corresponding to the first mode, the method further comprises: and in a second period after the first period, operating according to the fourth performance parameter, wherein the fourth performance parameter is the same as the first performance parameter in type, and the value of the fourth performance parameter is larger than the value of the first performance parameter and smaller than the value of the third performance parameter.
In some embodiments, in a case where the remaining power of the electronic device is different, the corresponding time length of the first period is different, and the corresponding time length of the second period is also different.
In a third aspect, an electronic device provided by an embodiment of the present application includes one or more processors and a memory; the memory is coupled to the processor, the memory for storing computer program code comprising computer instructions that, when executed by the one or more processors, operate to: operating according to a first performance parameter corresponding to the first mode, wherein the parameter type of the first performance parameter comprises one or more of central processor power, overall power consumption of a graphics system, the number of enabled central processor cores, a main frequency of the central processor and a main frequency of the graphics processor; under the first condition, the operation is sequentially and alternately performed according to a second performance parameter corresponding to a second mode and the first performance parameter; the second performance parameter is the same as the first performance parameter in type, and the value of the second performance parameter is larger than that of the first performance parameter; wherein the first condition comprises one or more of the following: enabling a first application, wherein system resources required to be occupied by the first application during operation meet a preset condition, the system resources comprising central processor resources and graphics processor resources, the preset condition comprising one or more of a number of central processor cores required to be enabled being greater than a preset number, a central processor main frequency required to be enabled being greater than a first frequency, and a graphics processor main frequency required to be enabled being greater than a second frequency; an indication by the user to enable the second mode is detected.
In some embodiments, the one or more processors are further configured to determine that the electronic device is not connected to an external power source before sequentially alternating operation according to a first performance parameter corresponding to a second mode and the first performance parameter.
In some embodiments, after ending the alternating operation according to the second performance parameter and the first performance parameter, the one or more processors are further configured to, if the electronic device is again operating according to the first performance parameter: under the first condition, determining that the electronic equipment is connected with the external power supply; and operating according to a second performance parameter corresponding to the second mode.
In some embodiments, the first condition is that the one or more processors, with the first application enabled, are further configured to, prior to the sequentially alternating running the first performance parameter and the first performance parameter corresponding to the second mode: detecting a first event; wherein, in the case that the first application is a document editing application, the first event is opening a first type file, and the first type file is a file with a volume larger than a preset value; in the case that the first application is a simulation application, the first event is the receipt of an operation to start simulation.
In some embodiments, when different ones of the first applications are enabled, the manner in which the second performance parameter and the first performance parameter are alternately run includes at least one of the following differences: the time length of operation according to the first performance parameter is different; the time length of operation according to the second performance parameter is different; the corresponding number of alternations is different.
In some embodiments, when the remaining power of the electronic device is different, the manner of alternately operating according to the second performance parameter and the first performance parameter includes at least one of the following differences: the time length of operation according to the first performance parameter is different; the length of time of operation is different according to the second performance parameter.
In some embodiments, during alternating operation according to the second performance parameter and the first performance parameter, the one or more processors are further configured to: under the condition of running according to the second performance parameter, the rotating speed of the cooling fan of the electronic equipment is increased from a first rotating speed to a second rotating speed; and recovering the rotating speed of the cooling fan to the first rotating speed under the condition of operating according to the first performance parameter.
In some embodiments, the one or more processors, after sequentially alternating operation of the second performance parameter and the first performance parameter corresponding to the second mode, are further configured to: detecting connection with the external power supply; operating according to a second performance parameter corresponding to the second mode; under a second condition, operating according to a third performance parameter in a first period, wherein the parameter types of the third performance parameter and the first performance parameter are the same, and the value of the third performance parameter is larger than that of the first performance parameter and smaller than that of the second performance parameter; the second condition includes detecting that the electronic device is disconnected from the external power source and the first application is running; in a second period after the first period, operating according to the fourth performance parameter, wherein the fourth performance parameter is the same as the first performance parameter in type, and the value of the fourth performance parameter is larger than the value of the first performance parameter and smaller than the value of the third performance parameter; and continuing to operate according to a second performance parameter corresponding to the second mode under the condition that the electronic equipment is detected to be connected with the external power supply again.
In some embodiments, in a case where the remaining power of the electronic device is different, the corresponding time length of the first period is different, and the corresponding time length of the second period is also different.
In a fourth aspect, an electronic device provided by an embodiment of the present application includes one or more processors and a memory; the memory is coupled to the processor, the memory for storing computer program code comprising computer instructions that, when executed by the one or more processors, operate to: after being connected with the external power supply, the device operates according to a second performance parameter corresponding to the second mode; the parameter types of the second performance parameter include one or more of central processor power, graphics system overall power consumption, number of enabled central processor cores, central processor main frequency, and graphics processor main frequency; under a second condition, operating according to a third performance parameter in a first period, wherein the parameter types of the third performance parameter and the second performance parameter are the same, the value of the third performance parameter is smaller than the value of the second performance parameter and larger than the value of a first performance parameter corresponding to a first mode, and the parameter types of the first performance parameter and the second performance parameter are the same; the second condition includes detecting that the electronic device is disconnected from the external power source and that the electronic device contains an operating application; and after the first period, operating according to a first performance parameter corresponding to the first mode.
In some embodiments, in the second condition, the running application is a first application, wherein the first application, during running, the required amount of system resources including central processor resources and graphics processor resources meets a preset condition, the preset condition including one or more of a number of central processor cores required to be enabled being greater than a preset number, a central processor main frequency required to be enabled being greater than a first frequency, and a graphics processor main frequency required to be enabled being greater than a second frequency. In some embodiments, the one or more processors are further configured to, prior to operating in accordance with the first performance parameter corresponding to the first mode: and in a second period after the first period, operating according to the fourth performance parameter, wherein the fourth performance parameter is the same as the first performance parameter in type, and the value of the fourth performance parameter is larger than the value of the first performance parameter and smaller than the value of the third performance parameter.
In some embodiments, the one or more processors, after sequentially alternating operation of the second performance parameter and the first performance parameter corresponding to the second mode, are further configured to: detecting connection with the external power supply; operating according to a second performance parameter corresponding to the second mode; under a second condition, operating according to a third performance parameter in a first period, wherein the parameter types of the third performance parameter and the first performance parameter are the same, and the value of the third performance parameter is larger than that of the first performance parameter and smaller than that of the second performance parameter; the second condition includes detecting that the electronic device is disconnected from the external power source and the first application is running; in a second period after the first period, operating according to the fourth performance parameter, wherein the fourth performance parameter is the same as the first performance parameter in type, and the value of the fourth performance parameter is larger than the value of the first performance parameter and smaller than the value of the third performance parameter; and continuing to operate according to a second performance parameter corresponding to the second mode under the condition that the electronic equipment is detected to be connected with the external power supply again.
In some embodiments, in a case where the remaining power of the electronic device is different, the corresponding time length of the first period is different, and the corresponding time length of the second period is also different.
In a fifth aspect, embodiments of the present application provide a computer storage medium comprising computer instructions which, when run on an electronic device, cause the electronic device to perform the method of the first aspect and possible embodiments thereof.
In a sixth aspect, the application provides a computer program product for causing an electronic device to carry out the method of the first aspect and possible embodiments thereof, when the computer program product is run on the electronic device.
It will be appreciated that the electronic device, the computer storage medium and the computer program product provided in the above aspects are all applicable to the corresponding methods provided above, and therefore, the advantages achieved by the electronic device, the computer storage medium and the computer program product may refer to the advantages in the corresponding methods provided above, and are not repeated herein.
Drawings
Fig. 1 is a diagram illustrating a display interface of an electronic device according to an embodiment of the present application;
FIG. 2 is an exemplary diagram of a manual switching mode of operation provided by an embodiment of the present application;
Fig. 3 is a diagram illustrating a hardware structure of an electronic device according to an embodiment of the present application;
FIG. 4 is a flowchart illustrating steps of a method for controlling a device according to an embodiment of the present application;
FIG. 5 is a diagram showing an example of the power of a CPU according to an embodiment of the present application;
FIG. 6 is a second flowchart illustrating a method for controlling a device according to an embodiment of the present application;
FIG. 7 is a diagram illustrating an exemplary TGP performance of a GPU according to an embodiment of the present application;
FIG. 8 is a second exemplary diagram of a TGP performance of a GPU according to an embodiment of the present application;
FIG. 9 is a third flowchart illustrating steps of a method for controlling a device according to an embodiment of the present application;
FIG. 10 is a diagram showing a second example of the power of a CPU according to an embodiment of the present application;
FIG. 11 is a fourth flowchart illustrating steps of a method for controlling an apparatus according to an embodiment of the present application;
fig. 12 is a diagram illustrating software and hardware of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the accompanying drawings in the embodiments of the present application. Wherein, in the description of the application, unless otherwise indicated, "at least one" means one or more, and "a plurality" means two or more. In addition, in order to facilitate the clear description of the technical solution of the embodiments of the present application, in the embodiments of the present application, the words "first", "second", etc. are used to distinguish the same item or similar items having substantially the same function and effect. It will be appreciated by those of skill in the art that the words "first," "second," and the like do not limit the amount and order of execution, and that the words "first," "second," and the like do not necessarily differ.
With the development of technology, performance and energy consumption have become two important indicators for users to evaluate electronic devices.
It can be appreciated that the electronic device may increase the upper performance limit of the electronic device by upgrading the hardware. For example, a CPU with more cores, higher frequency, and higher power is configured. For another example, the GPU with higher frequency and higher power is configured, the storage space is configured to be larger, and the performance upper limit of the electronic equipment is improved.
The higher the upper limit of the performance of the electronic device, the higher the performance that the electronic device can actually release in a scenario requiring high performance, for example, when running a program with a large system resource (including a storage resource, a computing resource, a graphics processing resource, etc.) occupied by a game program, a simulation program, etc. For example, the electronic device may call more CPU cores, so that the computing capability is stronger, for example, the electronic device may enable a higher CPU main frequency, so that the computing speed is faster, for example, the CPU power of the electronic device is higher, and the electronic device may support better operation of the CPU, for example, the electronic device may enable a higher GPU main frequency, so that the graphics processing speed is faster, for example, the GPU power of the electronic device is higher, and the better operation of the GPU is supported. That is, the CPU and GPU are more capable of operation. In this scenario, the electronic device schedules the system resources (e.g., GPU resources and CPU resources) described above, enabling better quality of service to be provided to the user.
However, the electronic device releases high performance and also inevitably brings high energy loss. That is, the performance actually released by the electronic device and the actually generated energy consumption are hardly optimized at the same time period. However, the electronic device may maintain the energy consumption at a relatively good level, i.e. performance priority, while releasing optimal performance. Alternatively, relatively good performance, i.e. energy consumption priority, is released while maintaining an optimal energy consumption state. As another example, a state of equilibrium is maintained between the released performance and the maintained energy consumption, i.e., the performance and the energy consumption are balanced.
In some embodiments, the electronic device may be configured in a plurality of different modes of operation, such as a power saving mode, a normal mode, and a high energy mode.
The energy saving mode is an operation mode with priority of energy consumption. And under the condition that the electronic equipment operates in the energy-saving mode, the upper limit of the target power of the electronic equipment is a first power value.
The target power may be, for example, a CPU power of the electronic device. For example, when the electronic device does not include a separate GPU chip, the target power may be a CPU power of the electronic device. Also illustratively, the target power may be a GPU power of the electronic device. For example, when the electronic device includes a separate GPU chip, the target power may be GPU power.
It will be appreciated that the above is merely an example, and that the corresponding target power may also be GPU power for an electronic device that does not contain a separate GPU chip. The electronic device including the independent GPU chip may also be the GPU power as the corresponding target power, which is not limited in the embodiment of the present application.
The high-energy mode is a performance-first operation mode. And when the electronic equipment operates in the high-energy mode, the upper limit of the target power of the electronic equipment is a second power value.
The above-mentioned normal mode is an operation mode in which the performance and the power consumption are balanced. And under the condition that the electronic equipment operates in the normal mode, the upper limit of the target power of the electronic equipment is a third power value.
In some embodiments, the first power value is smaller than the third power value, and the third power value is smaller than the second power value. The second power value is the maximum power value which can be reached by the target power under the optimal heat dissipation effect of the electronic equipment. The third power value and the first power value may each be a value determined on the basis of the second power value. For example, the second power value may be 60w, the second power value may be 35w, and the first power value may be 25w.
It will be appreciated that the higher the upper limit of target power, the higher the performance that the electronic device can release, e.g., the greater the number of callable CPU cores, the higher the enabled CPU master frequency, the higher the enabled GPU master frequency, the higher the CPU power, and the higher the GPU power. Conversely, the lower the upper limit of the target power, the lower the performance that the electronic device can release.
In the case of the electronic device operating in the energy saving mode, the overall power consumption of the electronic device may be maintained at a lower level, but the performance that the electronic device is actually able to release is lower than the performance that is actually releasable in the normal mode and the high-energy mode. That is, in a scenario where high performance is required, there may be a flaw in the quality of service provided by the electronic device, for example, problems such as frame dropping and jamming may occur when a large-sized game program is run.
In the case of the high-energy mode of operation of the electronic device, the performance that the electronic device can actually output is higher, that is, in the face of the scene that needs high-performance, the electronic device provides better service, but also brings higher energy consumption.
In the case of operating the electronic device in the normal mode, a balance can be achieved between the performance that the electronic device can actually output and the energy consumption that is generated, that is, in the face of a scene where high performance is required, the service provided by the electronic device in the normal mode is inferior to the service provided in the high-energy mode, but superior to the service provided in the energy-saving mode. Correspondingly, the energy consumption generated in the normal mode is lower than that generated in the high-energy mode, but higher than that generated in the energy-saving mode.
Additionally, in some embodiments, the target power may include a CPU power and a GPU power. In the case that the target power includes the CPU power and the GPU power, the first power value may include a power value corresponding to the CPU and a power value corresponding to the GPU, and the power value corresponding to the GPU and the power value corresponding to the CPU in the first power value may be different. For example, the first power value includes 35w corresponding to the CPU and 65w corresponding to the GPU. Thus, in the case where the electronic device is operating in a power saving mode, the highest power achievable by the CPU is 35w and the highest power achievable by the gpu is 65w.
Likewise, the second power value may include a power value corresponding to the CPU and a power value corresponding to the GPU, and the power value corresponding to the GPU and the power value corresponding to the CPU in the second power value may be different. The third power value may include a power value corresponding to the CPU and a power value corresponding to the GPU, and the power value corresponding to the GPU and the power value corresponding to the CPU in the third power value may be different.
In some embodiments, the mode of operation enabled by the electronic device may be selected by a user.
For example, the electronic device detects a specified operation by the user, for example, the user clicks a shortcut key indicating to switch the operation mode, and may display a system configuration interface 101 for selecting the operation mode of the electronic device in response to the specified operation, as shown in fig. 1. The system configuration interface 101 may include options indicating various operation modes, such as an option 102 indicating a power saving mode, an option 103 indicating a normal mode, and an option 104 indicating a high energy mode.
In some examples, a default operating mode may be preset in the electronic device, which may be one of the energy saving mode, the normal mode, and the high energy mode described above. The electronic device may directly enable the default operating mode after the electronic device is powered on and before the user does not manually change the operating mode. In this way, when the system configuration interface 101 is displayed, the selection item corresponding to the default operation mode is in the selected state, for example, the default operation mode in the electronic device is the normal mode, and in the displayed system configuration interface 101, the selection item 103 corresponding to the normal mode is in the selected state.
In addition, during the display of the system configuration interface 101, the electronic device may enable an operation mode (e.g., a target mode) selected by the user in response to a selection operation of the user in the system configuration interface 101, e.g., an operation of clicking the energy saving mode (or clicking the high energy mode) by the user, and update, in the system configuration interface 101, a selection item corresponding to the target mode to a selected state and an selection item corresponding to the default operation mode to an unselected state. For example, as shown in fig. 2, when the user clicks the energy saving mode, the electronic device may update the selection item 102 corresponding to the energy saving mode in the system configuration interface 101 to a selected state and update the selection item 103 corresponding to the normal mode to an unselected state when the energy saving mode is enabled.
In other embodiments, the electronic device may automatically select a desired enabled mode of operation based on the device power.
In an exemplary case, the electric quantity of the electronic device is relatively stable under the condition of plugging in (external power supply), and the high-energy mode can be automatically selected and started at the moment.
Also, for example, the device power of the electronic device is sufficient, but in the case of no power-on, the device power can be maintained for a relatively long time when the electronic device is operating normally, but the device power is continuously reduced, and at this time, the normal mode may be automatically selected and enabled.
Still further, for example, the power of the electronic device is insufficient, and in the case that no power is plugged in, the power of the electronic device can be maintained for a relatively short period of time for normal operation of the electronic device, and at the same time, the power of the electronic device is continuously reduced, so that the energy-saving mode is automatically selected and started.
In the related art, no matter a user manually switches an operation mode or automatically switches according to the electric quantity of the equipment, the performance released by the electronic equipment can jump, and correspondingly, the energy consumption can also be increased or the performance can be reduced.
For example, if the electronic device is switched from a normal mode or a power saving mode to a high energy mode without plugging in the electronic device, the electronic device may release more performance in the high energy mode. Of course, the power consumption of the electronic device increases. That is, when the electronic device is not plugged in, the endurance of the electronic device is significantly shortened after switching to the high-energy mode. Thus, in the related art, most electronic devices cannot enable the high-energy mode without power-on.
Further exemplary, in the case where the electronic device is already operating in the high-energy mode, if switching to the normal mode or the power saving mode occurs, the performance released by the electronic device may be instantaneously degraded. That is, in the case where the service provided by the electronic device is unchanged, the quality of service actually provided is also instantaneously deteriorated due to instantaneous degradation of the released performance. For example, during a game program being run by the electronic device, the electronic device is suddenly powered down, and the electronic device needs to be switched from a high-energy mode to other modes (such as a normal mode or a power-saving mode), otherwise, the electronic device is powered down quickly. However, when the electronic device is switched from the high-energy mode to other modes, the running game program can be obviously dropped and blocked, so that the use experience of a user is very affected.
In order to solve the above problems, an embodiment of the present application provides an apparatus control method. The device control method is applied to the electronic device. Therefore, the electronic equipment can effectively reduce the increase of energy consumption and improve the endurance of the equipment under the condition of switching into a high-energy mode.
In addition, under the condition that the electronic equipment cuts out a high-energy mode, the release performance is changed in a stepwise manner, so that the service quality actually provided by the electronic equipment is prevented from being reduced, and the use experience of a user is prevented from being influenced.
The electronic device in the embodiments of the present application may be a portable computer (such as a mobile phone), a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a cellular phone, a personal digital assistant (personal digital assistant, PDA), a media player, or the like, and the embodiment of the present application is not limited to a specific form of the electronic device.
Of course, the electronic device may be connected to an external power source. Under the condition of an external power supply of the electronic equipment, the external power supply can be utilized for supplying power. For example, the electronic device may obtain electrical energy by plugging in to operate the device. In addition, the electronic device also includes a built-in power source, such as a battery. Thus, the electronic device can be powered by the battery without an external power source (such as no power plug-in), so that the device can operate.
Taking an electronic device as an example of a notebook computer, fig. 3 shows a schematic structural diagram of the notebook computer.
The notebook computer may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (universal serial bus, USB) interface 130, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a microphone 170C, an earphone interface 170D, a sensor module 180, and the like.
It should be understood that the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the notebook computer. In other embodiments of the application, the notebook computer may include more or less components than illustrated, or certain components may be combined, or certain components may be split, or different arrangements of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
The processor 110 may include one or more processing units, such as: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a memory, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and/or a neural network processor (neural-network processing unit, NPU), etc. Wherein the different processing units may be separate devices or may be integrated in one or more processors.
A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may hold instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to reuse the instruction or data, it can be called directly from the memory. Repeated accesses are avoided and the latency of the processor 110 is reduced, thereby improving the efficiency of the system.
The wireless communication function of the notebook computer can be realized by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, a modem processor, a baseband processor and the like.
The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in a notebook computer may be used to cover a single or multiple communication bands. Different antennas may also be multiplexed to improve the utilization of the antennas. For example: the antenna 1 may be multiplexed into a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
The mobile communication module 150 may provide a solution including 2G/3G/4G/5G wireless communication applied to a notebook computer. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA), etc. The mobile communication module 150 may receive electromagnetic waves from the antenna 1, perform processes such as filtering, amplifying, and the like on the received electromagnetic waves, and transmit the processed electromagnetic waves to the modem processor for demodulation. The mobile communication module 150 can amplify the signal modulated by the modem processor, and convert the signal into electromagnetic waves through the antenna 1 to radiate. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be disposed in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be provided in the same device as at least some of the modules of the processor 110.
The wireless communication module 160 may provide solutions for wireless communication including wireless local area network (wireless local area networks, WLAN) (e.g., wireless fidelity (wireless fidelity, wi-Fi) network), bluetooth (BT), global navigation satellite system (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field wireless communication technology (near field communication, NFC), infrared technology (IR), etc. applied to a notebook computer. The wireless communication module 160 may be one or more devices that integrate at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the electromagnetic wave signals, filters the electromagnetic wave signals, and transmits the processed signals to the processor 110. The wireless communication module 160 may also receive a signal to be transmitted from the processor 110, frequency modulate it, amplify it, and convert it to electromagnetic waves for radiation via the antenna 2.
In some embodiments, the antenna 1 and the mobile communication module 150 of the notebook computer are coupled, and the antenna 2 and the wireless communication module 160 are coupled, so that the notebook computer can communicate with a network and other devices through wireless communication technology. The wireless communication techniques may include the Global System for Mobile communications (global system for mobile communications, GSM), general packet radio service (general packet radio service, GPRS), code division multiple access (code division multiple access, CDMA), wideband code division multiple access (wideband code division multiple access, WCDMA), time division code division multiple access (time-division code division multiple access, TD-SCDMA), long term evolution (long term evolution, LTE), BT, GNSS, WLAN, NFC, FM, and/or IR techniques, among others. The GNSS may include a global satellite positioning system (global positioning system, GPS), a global navigation satellite system (global navigation satellite system, GLONASS), a beidou satellite navigation system (beidou navigation satellite system, BDS), a quasi zenith satellite system (quasi-zenith satellite system, QZSS) and/or a satellite based augmentation system (satellite based augmentation systems, SBAS).
The notebook computer realizes the display function through the GPU, the display screen 194, the application processor, and the like. The GPU is a microprocessor for image processing, and is connected to the display 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
The display screen 194 is used to display images, videos, and the like. The display 194 includes a display panel. The display panel may employ a liquid crystal display (liquid crystal display, LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED) or an active-matrix organic light-emitting diode (matrix organic light emitting diode), a flexible light-emitting diode (flex), a mini, a Micro led, a Micro-OLED, a quantum dot light-emitting diode (quantum dot light emitting diodes, QLED), or the like.
The notebook computer can realize a photographing function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, an application processor, and the like.
The ISP is used to process data fed back by the camera 193. For example, when photographing, the shutter is opened, light is transmitted to the camera photosensitive element through the lens, the optical signal is converted into an electric signal, and the camera photosensitive element transmits the electric signal to the ISP for processing and is converted into an image visible to naked eyes. ISP can also optimize the noise, brightness and skin color of the image. The ISP can also optimize parameters such as exposure, color temperature and the like of a shooting scene. In some embodiments, the ISP may be provided in the camera 193.
The camera 193 is used to capture still images or video. The object generates an optical image through the lens and projects the optical image onto the photosensitive element. The photosensitive element may be a charge coupled device (charge coupled device, CCD) or a Complementary Metal Oxide Semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, which is then transferred to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV, or the like format. In some embodiments, the notebook computer may include 1 or N cameras 193, N being a positive integer greater than 1.
The digital signal processor is used for processing digital signals, and can process other digital signals besides digital image signals. For example, when a notebook computer is selected at a frequency point, the digital signal processor is used to fourier transform the frequency point energy, etc.
Video codecs are used to compress or decompress digital video. A notebook computer may support one or more video codecs. Thus, the notebook computer can play or record video in various coding formats, such as: dynamic picture experts group (moving picture experts group, MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
The NPU is a neural-network (NN) computing processor, and can rapidly process input information by referencing a biological neural network structure, for example, referencing a transmission mode between human brain neurons, and can also continuously perform self-learning. Applications such as intelligent awareness of the electronic device 100 may be implemented through the NPU, for example: image recognition, face recognition, speech recognition, text understanding, etc.
Of course, the notebook computer may further include a charging management module 240, a power management module 241, a battery 242, a pointer, a keyboard, a mouse, a control panel, a heat sink, and 1 or more SIM card interfaces, which are not limited in this embodiment of the present application.
In addition, the control panel can sense the touch action of the user and convert the touch action into a corresponding touch instruction. The heat dissipation device is used for assisting hardware (such as a CPU, a GPU and the like) in the notebook computer to dissipate heat. The heat dissipation device may be an internal heat dissipation fan, an external heat dissipation fan, a liquid cooling device, or the like, and in the following embodiments, the heat dissipation device is mainly exemplified as a heat dissipation fan.
The implementation details of the device control method provided by the embodiment of the application are described below by taking a notebook computer as an example with reference to the accompanying drawings:
In some embodiments, as shown in fig. 4, the device control method may include the following steps:
s101, enabling the notebook computer to operate in a first mode.
The first mode may be one of operation modes of the notebook computer. When the notebook computer is operated in the first mode, the maximum performance which can be released is lower than the upper performance limit of the notebook computer. That is, the first mode may be an operation mode other than the high-energy mode, for example, may be a power saving mode or a normal mode.
In some examples, the notebook computer may enable the first mode in any of the following scenarios:
scene one: the first mode is a default mode in the notebook computer. After the notebook computer is started, the first mode is started. In addition, during operation, if the switching of the operation mode does not occur, the notebook computer continues to enable the first mode.
Scene II: the first mode is enabled in response to a user indicating a switch to enable operation of the first mode. Wherein the operation of the user to instruct the switch to enable the first mode may be: by pressing the shortcut key, the notebook computer is instructed to display the system configuration interface 101. During display of the system configuration interface 101, a user selects a first mode of operation on the system configuration interface 101.
Scene III: and under the condition that the notebook computer is operated by adopting the built-in battery power supply, the first mode operation is started.
Scene four: under the condition of plug-in operation of the notebook computer, namely under the condition of being connected with an external power supply, disconnection from the external power supply is detected, namely under the condition that the external power supply stops supplying power, the first mode is started.
In some embodiments, a first operation parameter (also referred to as a first performance parameter) corresponding to the first mode is preconfigured in the notebook computer.
For example, the first operation parameter includes a first upper limit value of the target power, and for example, the first upper limit value may be the third power value or the first power value in the foregoing embodiment. The target power may be CPU power and/or GPU power. When operating according to the first operating parameter, the notebook computer can schedule various system resources, such as CPU resources, GPU resources and storage resources, under the condition that the target power does not exceed the first upper limit value. In other words, the first operating parameter may limit the number of CPU cores, the activatable CPU main frequency, the activatable CPU power, the activatable GPU main frequency, the activatable GPU power, and the like, that is, the first operating parameter may directly affect the upper performance limit of the notebook computer that can be released in the first mode.
In some embodiments, in the first mode, the notebook computer may control the operation state of each hardware according to the first operation parameter, so that the notebook computer releases the performance required by operation according to the actual situation under the constraint of the first operation parameter. For example, the first operating parameter is a first upper limit of the target power, if the target power is a CPU power, the CPU power is not exceeding the first upper limit as a constraint, the number of cores enabled in the CPU is scheduled, the CPU master frequency is determined, etc., and if the target power is a GPU power, the GPU power is not exceeding the first upper limit as a constraint, the GPU master frequency is determined.
Still further exemplary, the first operating parameter includes: the number of available CPU cores, the CPU master frequency that can be enabled, the CPU power that can be enabled, the GPU master frequency that can be enabled, and the GPU power that can be enabled. Of course, the number of available CPU cores in the first operation parameter is smaller than the total number of cores of the notebook computer, the CPU main frequency in the first operation parameter is smaller than the maximum CPU main frequency actually available to the notebook computer, the CPU power corresponding to the first operation parameter is smaller than the maximum CPU power actually available to the notebook computer, the GPU main frequency corresponding to the first operation parameter is smaller than the maximum GPU main frequency actually available to the notebook computer, and the GPU power in the first operation parameter is smaller than the maximum GPU power actually available to the notebook computer. That is, the first operating parameter may directly affect the upper performance limit of the notebook computer that can be released in the first mode.
In other embodiments, in the first mode, the notebook computer may control the operating states of the respective hardware according to the first operating parameter, so that the performance released by the notebook computer may reach the performance upper limit corresponding to the first mode. For example, according to the first operation parameter, the number of cores, power and main frequency which are started in the CPU are adjusted, and for example, according to the first operation parameter, the main frequency and power of the GPU are adjusted.
For example, in the case where the desired performance is not high, such as in the case where the notebook computer only displays the desktop, in the first mode, the notebook computer releases the performance required for displaying the desktop. The released performance may be less than the upper performance limit corresponding to the first mode.
For example, the first operation parameter indicates that at most N CPU cores can be enabled, where N is an integer greater than 1, and then the notebook computer can only enable 1 CPU core when displaying the desktop, in this example, the number of enabled cores is less than N cores corresponding to the first operation parameter, that is, in the first mode, there are idle cores in the available cores, that is, the performance released by the notebook computer is less than the upper performance limit corresponding to the first mode. Also, the performance upper limit of the release performance smaller than the first mode may also be embodied in other aspects, for example, the main CPU frequency is lower than the main CPU frequency indicated by the first operation parameter, the power of the CPU is lower than the power of the CPU indicated by the first operation parameter, and the like, which will not be described herein.
Also by way of example, in the event that the desired performance is high, such as in the event that the notebook computer is running a live game, in the first mode, the performance released by the notebook computer may be equal to the upper performance limit corresponding to the first mode.
For example, the first operation parameter indicates that at most N CPU cores can be enabled, where N is an integer greater than 1, and then the notebook computer can simultaneously enable N CPU cores when running the live game, where in this example, the number of enabled cores is equal to N cores corresponding to the first operation parameter, that is, the performance released by the notebook computer is equal to the upper performance limit corresponding to the first mode. Similarly, the performance upper limit of the release performance equal to the first mode may also be embodied in other aspects, for example, the CPU main frequency is equal to the CPU main frequency indicated by the first operation parameter, the CPU power is equal to the CPU power indicated by the first operation parameter, and the like, which will not be described herein.
S102, during the first mode starting period, the notebook computer recognizes that the second mode needs to be started currently.
The second mode may be one of the operation modes of the notebook computer. When the notebook computer runs in the second mode, the maximum performance which can be released is equal to the upper performance limit of the notebook computer. That is, the second mode may be the high-energy mode mentioned in the foregoing embodiment.
In some examples, the notebook computer may determine that the second mode needs to be enabled in any of the following scenarios:
scene five: responsive to the user indicating to switch the operation to enable the second mode, it is determined that the second mode needs to be enabled. Wherein the operation of the user to instruct the switch to enable the second mode may be: and by pressing the shortcut key, indicating the configuration interface of the display system of the notebook computer. During display of the system configuration interface, the user selects a second mode of operation on the system configuration interface.
Scene six: under the condition that the notebook computer is not connected with the external power supply, namely under the scene of adopting the internal battery to supply power, the notebook computer detects that the external power supply is connected, namely after the notebook computer starts to adopt the external power supply to supply power, the second mode is determined to be required to be started.
Scene seven: when the notebook detects a particular use scenario (e.g., the notebook runs a particular program, or the program is in a particular run phase), it is determined that the second mode needs to be enabled. The implementation manner of detecting the specific usage scenario may be described in detail in the following embodiments, which are not described herein in detail.
In addition, a second operation parameter (also referred to as a second performance parameter) corresponding to the second mode is also preconfigured in the notebook computer.
For example, the second operating parameter includes a second upper limit value of the target power, for example, the second upper limit value may be the second power value in the foregoing embodiment, that is, the maximum power that the notebook computer can achieve under the best heat dissipation effect. When the notebook computer operates according to the second operation parameter, various system resources, such as a CPU resource, a GPU resource and a storage resource, can be scheduled under the condition that the target power does not exceed the second upper limit value. In other words, the second operating parameter may limit the number of CPU cores, the activatable CPU main frequency, the activatable CPU power, the activatable GPU main frequency, the activatable GPU power, and the like, that is, the second operating parameter may directly affect the upper performance limit of the notebook computer that can be released in the second mode.
In some embodiments, in the second mode, the notebook computer may control the operation state of each hardware according to the second operation parameter, so that the notebook computer releases the performance required by operation under the constraint of the second operation parameter according to the actual situation. For example, the second operating parameter is a second upper limit of the target power, if the target power is a CPU power, the CPU power is not exceeding the second upper limit as a constraint, the number of cores enabled in the CPU is scheduled, the CPU master frequency is determined, etc., and if the target power is a GPU power, the GPU power is not exceeding the second upper limit as a constraint, the GPU master frequency is determined. When the second upper limit value comprises an upper limit value for GPU power and an upper limit value for CPU power, the number of enabled CPU cores, the CPU main frequency and the GPU main frequency are determined by taking the constraint that the CPU power does not exceed the corresponding upper limit value and the GPU power does not exceed the corresponding upper limit value.
In addition, the second upper limit value is larger than the first upper limit value. In addition, the second operation parameter may directly affect the upper performance limit of the notebook computer that can be released in the second mode. Meanwhile, the performance upper limit corresponding to the second mode is the same as that of the notebook computer.
Also illustratively, the parameter types of the second operating parameter include a number of available CPU cores, an activatable CPU main frequency, an activatable CPU power, an activatable GPU main frequency, and an activatable GPU power. Of course, the number of available CPU cores corresponding to the second operation parameter is equal to the total number of cores of the notebook computer, the CPU main frequency corresponding to the second operation parameter is equal to the maximum CPU main frequency actually available to the notebook computer, the CPU power corresponding to the second operation parameter is equal to the maximum CPU power actually available to the notebook computer, the GPU main frequency corresponding to the second operation parameter is equal to the maximum GPU main frequency actually available to the notebook computer, and the GPU power corresponding to the second operation parameter is equal to the maximum GPU power actually available to the notebook computer. That is, each value in the second operation parameter is larger than the first operation parameter. In addition, the second operation parameter may directly affect the upper performance limit of the notebook computer that can be released in the second mode. Meanwhile, the performance upper limit corresponding to the second mode is the same as that of the notebook computer.
Therefore, when the notebook computer actually starts the second mode, the work of each hardware can be controlled according to the second performance parameter of the second mode, so that the notebook computer can operate according to the second mode.
S103, the notebook computer alternately enables the first mode and the second mode according to a preset rule.
The preset rule may also be referred to as a heartbeat control policy, and is used to control the first mode and the second mode enabling period, so that the notebook computer can enable the first mode and the second mode alternately.
In some embodiments, the heartbeat control strategy described above may include: after determining that the second mode needs to be started, the second mode is started in a switching mode, that is, the operation mode of the notebook computer is switched from the first mode to the second mode. After the second mode is switched and started, the notebook computer controls the running state of each hardware according to the second running parameter corresponding to the second mode, so that the performance released by the notebook computer can reach the performance upper limit corresponding to the second mode, and the specific implementation principle can refer to the foregoing embodiment and is not repeated herein.
In other embodiments, after the second mode is switched and started, the notebook computer may further control the operation state of each hardware according to the second operation parameter corresponding to the second mode, so that the notebook computer releases the performance required by operation under the constraint of the second operation parameter according to the actual situation.
After operating for a period of time according to the second mode, the notebook computer switches and enables the first mode according to the heartbeat control strategy. The process of enabling the first mode may refer to S101, which is not described herein. Also, after operating in the first mode for a period of time, the second mode is again switched on, alternating.
In some examples, the number of alternations between the first and second modes may be different under different usage scenarios. In addition, during the alternating of the first mode and the second mode, the time length of the single operation of the first mode and the time length of the single operation of the second mode may also depend on the battery level, and reference may be made to the description in the following embodiments. Of course, the length of time of the first mode single operation may be different from the length of time of the second mode single operation. In addition, the length of time that the first mode is enabled may also vary from time to time. There may also be a difference in the length of time that the second mode is enabled different times. That is, in the embodiment of the present application, the duration of the operation of the first mode is not specifically limited, and the duration of the operation of the second mode is not specifically limited.
Under the condition that the first operation parameter and the second operation parameter are both the upper limit value of the target power, if the use situation of the notebook computer is a situation with higher requirements on the CPU performance, for example, a simulation program is run, or a design program is run, for example, an office program loads text data with larger volume and the like, the target power can be the CPU power. Thus, during the alternating enabling of the first mode and the second mode, the CPU power performance of the notebook computer may be as shown in FIG. 5: in the case where the second mode is enabled, the CPU power of the notebook computer is PL2, and the CPU power of the notebook computer is kept at PL2 during the period t 1. Thereafter, the second mode is alternated with the first mode. That is, in a period t2 after the period t1, the notebook computer is switched to enable the first mode, so that the CPU power of the notebook computer is PL1 in the period t 2. Wherein PL2 is greater than PL1. Thereafter, the first mode and the second mode may also be alternated again, that is, the notebook computer is switched to enable the second mode in a period t3 after the period t2, so that the CPU power of the notebook computer is PL2 in the period t3 and is cyclically replaced.
In the above embodiment, the notebook computer may also adjust the working state of the heat dissipating device while switching to enable the second mode. For example, after the second mode is switched from the first mode to the enabled mode, the notebook computer may increase the rotational speed of the heat dissipating fan, for example, increase the rotational speed of the heat dissipating fan of the electronic device from the first rotational speed to a second rotational speed, where the second rotational speed is greater than the first rotational speed. And heat brought by the power increase is quickly taken away by using the cooling fan. Still further exemplary, the rotational speed of the radiator fan is restored after switching from the second mode to the first mode. For example, the rotation speed of the heat radiation fan of the electronic device is restored to the first rotation speed.
In addition, in a scenario where the first operation parameter and the second operation parameter are both upper limit values of the target power, if the usage scenario of the notebook computer is a scenario with a high requirement on GPU performance, for example, a game application is run, for example, a live application is run, and for example, the target power may be GPU power during the video application plays video. Thus, the GPU power of the notebook computer performs similar to that of fig. 5 during the first mode and the second mode are alternately enabled, and will not be described again.
In other possible embodiments, the performance of the CPU master frequency, the number of enabled CPU cores, the GPU master frequency, etc. during alternately enabling the first mode and the second mode is also similar to that of fig. 5, and will not be described again here.
In other embodiments, after S102, if the usage scenario is determined to be enabling the first type of program, the second mode may be enabled to operate directly after the second mode is determined to be needed to be enabled, without alternately enabling the first mode and the second mode according to a heartbeat control policy. That is, the flow does not execute S103. The first type of program may be a program with a high requirement on the performance of the notebook computer, for example, the first type of program may include a game program, a live type program, and the like.
In summary, in the embodiment of the application, the notebook computer can intelligently switch the first mode and the second mode, and both the release performance and the energy consumption of the notebook computer are considered. In addition, under the condition that the notebook computer is not connected with an external power supply, the notebook computer can support the notebook computer to periodically switch and start the second mode by utilizing the short-time discharging special effect of the built-in battery. Under the condition of no external power supply, compared with the condition of directly switching and starting the second mode, the device endurance can be increased. Under the condition of an external power supply, compared with the condition that the second mode is started by direct switching, the energy consumption can be reduced. Therefore, whether the user indicates to switch to enable the second mode or the actual use situation needs to enable the second mode, the device endurance can be improved or the energy consumption can be reduced while the requirement of the user on the device performance is met.
In addition, the method is also suitable for switching the normal mode of the energy-saving mode, for example, if the current electric quantity of the notebook computer only supports to enable the energy-saving mode according to a preset rule, after the notebook computer responds to the operation of a user and determines that the normal mode needs to be started, the normal mode and the energy-saving mode can be alternatively enabled by adopting the above mode, namely adopting a heartbeat control strategy.
In some embodiments, the notebook computer may also be configured to operate according to the second performance parameter and the first performance parameter corresponding to the second mode in sequence and alternately under the first condition. Wherein the first condition includes the notebook computer running a first application (e.g., a particular program). The first application may be program data with high requirements on performance of the device, for example, the first application may be a game application, a live application, an emulation application, a design application, and the like. In other words, the first application is an application program with larger system resources (in particular, CPU resources and GPU resources) that need to be occupied during the running process. If the number of CPU cores required to be called by the first application is larger than the preset number, the required CPU main frequency is larger than the first frequency, if the required GPU main frequency is larger than the second frequency, and the like, and if the occupied storage resources are larger, and in the occupied storage resources, the data reading and writing speed is larger than the first speed. In addition, the preset number, the first frequency and the second frequency may be experience values determined through testing, which is not particularly limited in the present application.
In addition, the first condition further includes detecting that the user indicates that the second mode is enabled.
In some embodiments, as shown in fig. 6, the method may further include the steps of:
s201, enabling the notebook computer to operate in a second mode.
In some embodiments, S201 may be that the notebook computer enables the second operation mode in the following scenario:
scene a: the notebook computer is connected with an external power supply, and enables programs such as game programs which need high performance. Or the notebook computer is connected with an external power supply.
Scene b: the notebook computer responds to the operation of a user and enables the second mode.
Scene c: the second mode is enabled in S103.
In some embodiments, the notebook computer may control the working states of the respective hardware according to the second operation parameters, so that the notebook computer operates in the second mode, and specific implementation details may be referred to S101 in the foregoing embodiments, which are not described herein again, and the difference between the two is that the enabled operation parameters are different. In addition, under the condition that the notebook computer is connected with an external power supply, the second mode operation can be started.
S202, during the second mode starting period, the notebook computer recognizes that the first mode needs to be started currently.
In some embodiments, when the notebook computer detects that the notebook computer is disconnected from the external power supply, that is, when the notebook computer cannot be powered by the external power supply, the notebook computer may identify that the first mode needs to be started currently.
In an exemplary scenario, a notebook computer runs a game program when plugged in (powered by an external power source). During this time, the notebook computer may enable the second mode of operation. Under the condition of adopting the second mode to operate, if the notebook computer detects that the notebook computer is disconnected with the external power supply, the notebook computer can determine that the current electric energy is insufficient to support the second mode to operate for a long time, and thus the notebook computer recognizes that the first mode needs to be started currently.
In other embodiments, the notebook computer may also identify that the first mode is currently required to be enabled in response to a user indicating a switch to enable the first mode.
In other embodiments, the notebook computer may also determine that the first mode needs to be enabled according to a heartbeat control policy.
S203, the notebook computer switches the second mode to the first mode in a step-down mode.
In some embodiments, the notebook computer may determine at least one third set of operating parameters between the first operating parameter and the second operating parameter.
For example, the third operating parameter may include a third upper limit value corresponding to the target power. The third upper limit value may be between the first upper limit value and the second upper limit value. For example, if the target power is the CPU power, the first upper limit value is 35w, the second upper limit value is 65w, and the determined third upper limit value may be 50w. In addition, the scenario where the target power is GPU power is the same, and will not be described here again.
Also illustratively, the third operating parameter may also correspond to the number of available CPU cores, the enabled CPU main frequency, the enabled CPU power, the enabled GPU main frequency, and the enabled GPU power.
It will be appreciated that the values of the third operating parameter are intermediate between the first operating parameter and the second operating parameter. For example, the number of available CPU cores in the third operating parameter is less than the number of available CPU cores in the second operating parameter and greater than the number of available CPU cores in the first operating parameter. The main CPU frequency in the third operation parameter is smaller than the main CPU frequency in the second operation parameter and larger than the main CPU frequency in the first operation parameter. The CPU power in the third operating parameter is smaller than the CPU power in the second operating parameter and larger than the CPU power in the first operating parameter. The GPU dominant frequency in the third operating parameter is less than the GPU dominant frequency in the second operating parameter and greater than the GPU dominant frequency in the first operating parameter. The GPU power in the third operating parameter is less than the GPU power in the second operating parameter and greater than the GPU power in the first operating parameter.
In some embodiments, where there is only a set of third operating parameters, the third operating parameters may be referred to as third performance parameters. In the case of multiple sets of third operating parameters, the multiple sets of third operating parameters include a third performance parameter and a fourth performance parameter. The values of the third performance parameter are all larger than the fourth performance parameter, but the values of the third performance parameter are smaller than the second performance parameter. The values of the fourth performance parameter are larger than the first performance parameter.
In some embodiments, prior to S203, the notebook computer controls the operating state of each hardware according to the second operating parameter. In S203, before the notebook computer switches to enable the first operation parameter, the operation state of each hardware is adjusted according to the third operation parameter. And when the third operation parameter is the third upper limit value, adjusting the number of enabled CPU cores, the CPU main frequency, the GPU main frequency or the GPU power and the like by taking the target power not exceeding the third upper limit value as a constraint condition.
Of course, when the third operation parameter corresponds to the number of available CPU cores, the activatable CPU main frequency, the activatable CPU power, the activatable GPU main frequency, the activatable GPU power, and the like, the number of activated cores, the power, the main frequency, or the main frequency, the power, and the like of the GPU may be adjusted according to the third operation parameter.
That is, in S203, after the notebook computer operates for a certain period of time according to the third operation parameter, the notebook computer operates according to the first operation parameter corresponding to the first mode, that is, the operation state of each hardware may be adjusted according to the first operation parameter. In this way, the notebook computer can be buffered in the process of switching into the first mode from the second mode, that is, the user cannot feel the broken cliff in performance in the process of using the notebook computer.
In some embodiments, the notebook computer may also determine a plurality of sets of third operating parameters between the first operating parameter and the second operating parameter. The maximum performance that the notebook computer can release after controlling the running state of each hardware according to each group of third running parameters can be called as the performance corresponding to the third running parameters.
And under the condition of multiple groups of third operating parameters, sequentially adopting each group of third operating parameters according to the corresponding performance of each group of third operating parameters from big to small, and controlling the operating state of each hardware. For example, the notebook computer is first controlled to operate for a period of time according to the third operation parameter with the highest performance. And then, controlling the notebook computer to operate for a period of time according to the third operation parameter with the second highest performance, and so on. Thus, the performance of the notebook computer is lower in each period than in the previous period, but the performance of the adjacent two periods is not greatly reduced. And after the notebook computer runs for a period of time according to all the third running parameters, controlling the notebook computer to run according to the first running parameters corresponding to the first mode.
Therefore, in the process of switching the notebook computer from the second mode to the first mode, the performance released by the notebook computer can be gradually reduced, the user can not feel the cliff type reduction of the performance of the notebook computer, and the use experience of the user is improved.
In addition, in the process of switching the second mode to the first mode by adopting the step-down mode, the overall graphics system power consumption (TGP) of the GPU of the notebook computer is represented as shown in fig. 7: three sets of third operating parameters are configured in the notebook computer. Among the three sets of third operation parameters, the power values of the corresponding TGPs are power value 1, power value 2 and power value 3 respectively. Thus, after determining that the second mode needs to be switched to the first mode, the TGP of the GPU of the notebook computer is maintained at the power value 1 for the period t 4. In a period t5 after the period t4, the TGP of the notebook computer is kept at the power value 2, that is, the performance of the notebook computer is kept stable in the period t5 after a small drop. In a period t6 after period 5, the TGP of the notebook computer is kept at the power value 3, i.e., the performance of the notebook computer is kept stable in the period t6 after a small drop. Finally, after the period t6, the TGP of the notebook computer is maintained at a power value 4, where the power value 4 may be the power corresponding to the GPU in the first mode. It can be seen that after period 6, the switch to the first mode is completed. Before switching to the first mode, the performance of the notebook computer is gradually and stably reduced, and the adaptability of the user to the performance reduction is improved.
In addition, in the process of switching the second mode to the first mode, the performances of the CPU main frequency, the number of enabled CPU cores, the CPU power, the GPU main frequency, and the like of the notebook computer are similar to those of fig. 7, and are not repeated here.
In some embodiments, during the process of switching the second mode to the first mode, if the notebook computer detects that the external power is connected again, or receives an operation of enabling the second mode indicated by the user, the notebook computer may directly resume enabling the second mode. That is, the TGP representation of the GPU of the notebook computer is shown in fig. 8: with the second mode enabled, the TGP of the GPU of the notebook computer remains at power value 1 for period t 4. In a period t5 after period 4, the TGP of the notebook computer is kept at the power value 2, i.e., the performance of the notebook computer is kept stable in the period t5 after a small drop. And if the notebook computer is detected to be connected with the external power supply again, or the operation of starting the second mode again is received by the user, the notebook computer is directly switched to start the second mode again, and thus the TGP of the notebook computer can be immediately recovered to the power value of 5.
In summary, in a scenario where the current power is insufficient to support the second mode for a long period of time, the notebook computer may trigger the second mode to be switched to the first mode. In the process that the notebook computer is switched from the second mode to the first mode, the notebook computer can utilize the short-time discharge characteristic of the built-in battery to support the slow reduction of the performance of the notebook computer, so that the notebook computer can be slowly transited from the second mode to the first mode, and the user is prevented from feeling obvious performance drop.
Of course, in a possible embodiment, when the notebook computer receives the operation of enabling the first mode indicated by the user, the notebook computer may also be switched from the second mode to the first mode in the same manner, which is not limited in the embodiment of the present application.
In some embodiments, the method shown in fig. 4 and the method shown in fig. 6 are two operation scenarios faced during the operation of a notebook computer, and in principle, there is no necessary sequence of the two operation scenarios. In some cases, for example, after the first mode and the second mode are alternated, if the notebook computer detects that the external power supply is connected, the notebook computer can operate according to the second performance parameter corresponding to the second mode. Under the second condition, the operation is carried out according to a third performance parameter in a first time period (such as a time period t 4), the type of the third performance parameter is the same as that of the first performance parameter, and the value of the third performance parameter is larger than that of the first performance parameter and smaller than that of the second performance parameter; the second condition includes detecting that the electronic device is disconnected from the external power source and the first application is running; and after a first period of time, operating according to a first performance parameter corresponding to the first mode.
Of course, with the third performance parameter and the fourth performance parameter, it is also possible to operate in accordance with the fourth performance parameter for a second period (e.g., period t 5) subsequent to the first period. And after the second period of time, operating according to the first performance parameter corresponding to the first mode.
In some embodiments, the notebook computer may also automatically control the switching of different modes of operation in combination with actual usage scenarios. Illustratively, as shown in FIG. 9, the above method may include the steps of:
s301, enabling the notebook computer to operate in a first mode.
In some embodiments, the implementation details of S301 may refer to S101 in the foregoing embodiments, which is not described herein.
S302, the notebook computer identifies the current use scene.
The usage scenario may be that a notebook computer runs a specific program.
In some embodiments, information about a particular program may be preconfigured in the notebook computer. The related information may be a volume size of a corresponding program file, a program identifier, a service type description, and the like. Thus, the notebook computer can acquire the relevant information 1 corresponding to the running program through the event tracking window (event tracing for windows, etc). And identifying that the notebook computer runs a specific program under the condition that the acquired related information 1 is matched with the pre-configured related information.
For example, a game program, a simulation program, a design program, an office program, and the like in a notebook computer are specific programs. In this way, the notebook computer can be configured with information on software programs such as game programs, simulation programs, design programs, and office programs. When the user instructs the notebook computer to run the game program a, the notebook computer may detect one or more of the volume size, the program identification, the service type description, and the like of the game program a through the ETW, and use the detected information as the related information 1 of the game program a.
In the case that the related information 1 contains the volume size 1 of the game program a, if the difference between the volume size 1 and the volume size of any one of the preconfigured specific programs is smaller than the preset threshold, that is, the volume size of the game program a is close to the volume size of the preconfigured specific program, it is determined that the currently running game program a belongs to the specific program, so that the notebook computer can recognize that the current usage scenario is that the specific program is running.
In the case that the related information 1 contains the program identifier 1 of the game program a, if the program identifier 1 is the same as the program identifier of any one of the preconfigured specific programs, it is determined that the currently running game program a belongs to the specific program, so that the notebook computer can recognize that the current use scenario is that the specific program is running.
In the case that the service type description 1 of the game program a (e.g., a multi-player online tactical competition game service) is included in the related information 1, if the service type description 1 is identical to the service type description of any one of the preconfigured specific programs, it is determined that the currently running game program a belongs to the specific program, so that the notebook computer can recognize that the current use scenario is that the specific program is being run.
In addition, the usage scenario may be that the program is in a specific operation phase.
In some embodiments, the notebook computer may be preconfigured with an operation stage corresponding to a plurality of programs (may be a first application) and identification events corresponding to different operation stages. For example, the game program corresponds to two stages of "before game start" and "after game start", wherein the identification event corresponding to "before game start" may be displaying a game hall interface, displaying a game login interface, displaying a game waiting interface, or the like. The identification event corresponding to the game after being started can be that a game real-time picture is displayed, the interactive operation of a user is received, the amount of resources occupied by the request is increased, and the like. For another example, the office program corresponds to a plurality of stages such as "open document" and "browse document", wherein the identification event corresponding to "open document" may be that a user's selection operation on a specified document is received. The identification event corresponding to "browse document" may be an operation of receiving a user instruction to slide browsing.
In some embodiments, an identification event capable of triggering alternate enablement of the first mode and the second mode may be referred to as a first event. For different first applications, the corresponding first events may be different. For example, in the case that the first application is a document editing application, the first event is opening a first type file, where the first type file is a file with a volume greater than a preset value; in the case where the first application is a simulation application, the first event is the receipt of an operation to start the simulation. The first events corresponding to different first applications may be set by the user according to actual experience, which is not particularly limited in the embodiment of the present application.
Thus, during the operation of the notebook computer, the detection of the identification event can be performed through the ETW, and then, the current use scene of the notebook computer is determined according to the detected identification event. For example, the pre-configured identification event a in the notebook computer may indicate the operation stage a corresponding to the program a. Under the condition that the notebook computer actually detects the identification event a, the notebook computer can determine that the current use scene is: program a runs in phase a.
S303, under the condition that the usage scenario indicates that the second mode needs to be started, adopting a heartbeat control strategy matched with the usage scenario, and starting the first mode and the second mode alternately.
In some embodiments, multiple classes of usage scenario 1 may be preconfigured in the notebook computer, the usage scenario 1 being a scenario requiring the second mode to be enabled. Illustratively, the above-described usage scenario 1 may include running a specific program, for example, the specific program includes a game-type program, a simulation-type program. For another example, the partial program running to a specific run phase is a use scenario requiring the second mode to be enabled.
In addition, in other embodiments, a heartbeat control policy corresponding to each type of usage scenario 1 may be preconfigured in the notebook computer. It will be appreciated that the heartbeat control strategy may be configured for scene features using scene 1. Wherein the heartbeat control policy may specify a number of times the first mode and the second mode are switched. Alternatively, the heartbeat control policy may specify the start and stop points in time at which the heartbeat control policy is enabled.
For example, a scene of running a file browsing program may be characterized by: in the process of opening a large volume of documents, the performance requirement on a notebook computer is high. The performance requirements for a notebook computer are not high during the period when the document content is actually displayed after the document is opened. In addition, the time taken to open a document is typically short. In combination with the above scene features, the corresponding heartbeat control strategy (e.g. referred to as heartbeat control strategy 1) can instruct the notebook computer to switch to the first mode after enabling the second mode. After switching to the first mode, the alternation of the first mode and the second mode is ended, i.e. the heartbeat control strategy 1 specifies that the number of alternations of the first mode and the second mode is small, e.g. the number of alternations is 1.
In this way, when the notebook computer is controlled according to the heartbeat control strategy 1, the CPU power performance of the notebook computer is as shown in fig. 10: in the case where the second mode is enabled, the CPU power of the notebook computer is PL2, and the power of the notebook computer is kept at PL2 for the period t 7. After period t7, the notebook switches to enable the first mode, and the CPU power of the notebook is also maintained at PL1.
For another example, the scene of running the design program may be characterized by: in the whole running process of the design program, the performance requirement on the notebook computer is high. And combining the scene characteristics, the corresponding heartbeat control strategy can instruct the notebook computer to continuously and alternately start the first mode and the second mode until the design program stops running. In this way, the heartbeat control policy may specify that the starting time point when the heartbeat control policy is started is the time when the second mode needs to be started, and the ending time point is the time when the design program stops running or the time when the connection of the external power supply is detected.
For another example, the game program runs in a scene of "before game start", and the scene features may be: after the game program is run and before the game is formally started, for example, a game login interface is displayed or a game hall interface is displayed, the performance requirement on the notebook computer is high, but the performance of the notebook computer is occasionally reduced, and the use experience of a user at the stage is not influenced. In combination with the above scene features, the corresponding heartbeat control policy may instruct the notebook computer to continuously and alternately enable the first mode and the second mode until the scene ends, for example, the game program enters a "after game start" stage, or the game program ends running. In this way, the heartbeat control policy may specify that the starting time point when the heartbeat control policy is started is the time when the second mode needs to be started, and the ending time point is the time when the game program stops running or the time when the connection of the external power supply is detected.
For another example, the game program runs in a scene of "after game start", and the scene features may be: after the game is started, the performance requirement on the notebook computer is high, the transient performance is reduced, and the frame dropping and the clamping of the game can also occur, so that the use experience of a user at the stage is directly affected. In combination with the scene characteristics, the heartbeat control strategy is not started, and the notebook computer needs to start the second mode for a long time.
That is, for a game program, in some embodiments, a heartbeat control strategy may be employed at a "pre-game start" stage after the program is run. In the stage of 'after game start', the heartbeat control strategy is not adopted, and the state of enabling the second mode is kept.
Of course, in other embodiments, for a game program, after the program is run, the heartbeat control strategy may not be activated, so that the performance requirement of the user on the notebook computer is preferentially met.
In other embodiments, the heartbeat control policy described above may also specify a duration of a single enablement of the first mode (enablement duration 1) and a duration of a single enablement of the second mode (enablement duration 2).
It will be appreciated that the activation period 1 and the activation period 2 are each associated with the remaining power (or short discharge capability) of the notebook computer. That is, under different residual amounts, the corresponding activation time period 1 may be different, the corresponding activation time period 2 may be different, and the number of alternations between the first mode and the second mode may be different.
In some examples, the optimal activation duration 1 and activation duration 2 may be determined by testing under different residual amounts (or short-time discharge capabilities). The optimal starting time length 1 and starting time length 2 can coordinate the requirements of the use scene on the performance and the endurance of the notebook computer under different residual electric quantity (or short-time discharging capability).
Of course, the enabling duration 1 and the enabling duration 2 may also be related to the first application being executed, i.e. when different first applications are enabled, the corresponding enabling duration 1 may be different, the corresponding enabling duration 2 may also be different, and the number of alternations of the first mode and the second mode may also be different.
In some embodiments, the optimal enabling duration 1 and enabling duration 2 may also be determined by a test method in combination with the scene characteristics of the use scene. Of course, the activation duration 1 of each activation of the first mode and the activation duration 2 of each activation of the second mode may also be determined by means of testing under different usage scenarios. For example, in some usage scenarios, the activation time period 1 for different times of activating the first mode may be different, and the activation time period 2 for different times of activating the second mode may be different. For another example, in other usage scenarios, the activation time period 1 for different times of activating the first mode may be the same, and the activation time period 2 for different times of activating the second mode may be the same.
It can be seen that the heartbeat control policies corresponding to different usage scenarios 1 may be different, and of course, may be the same, which is not particularly limited in the embodiment of the present application.
In some embodiments, after identifying the current usage scenario, the notebook computer alternately enables the first mode and the second mode according to the matched heartbeat control strategy if the current usage scenario belongs to the preconfigured usage scenario 1. Because the heartbeat control strategy can be matched with the scene characteristics of the corresponding use scene 1, the corresponding heartbeat control strategy can be ensured to be capable of well coordinating the requirements of the duration and the use scene on performance under various use scenes 1.
In addition, after the notebook computer switches the first mode and the second mode according to the heartbeat control policy, as in S103 and S303, the alternating switching of the first mode and the second mode may be ended in the following cases:
1. reaching the ending time point indicated by the heartbeat control strategy. For example, the number of alternations between the first mode and the second mode has reached the number indicated in the heartbeat control strategy. For another example, the activation time of the heartbeat control policy has reached a preconfigured maximum time. For another example, the point in time when the particular program being run ceases to run. As another example, a point in time when a particular usage scenario does not already exist.
2. The notebook computer detects that an external power supply is connected.
3. An operation is received that the user instructs to turn off alternately enabling the first mode and the second mode.
After ending the alternate enabling of the first mode and the second mode, the notebook computer may select the mode to be operated according to a preset policy. For example, the second mode is directly enabled when an external power source is currently connected. For example, if the external power source is not currently connected, the first mode is directly enabled. For example, at the end of the alternation, the first mode is enabled, then the first mode continues to be enabled; the second mode is enabled at the end of the alternation, then the second mode continues to be enabled.
In some embodiments, as shown in fig. 11, the above method may include the steps of:
s401, enabling the notebook computer to operate in a second mode.
In some embodiments, the implementation details of S401 may refer to S201 in the foregoing embodiments, which is not described herein.
S402, the notebook computer identifies the current use scene.
In some embodiments, the implementation details of S402 may refer to S302 in the foregoing embodiments, which is not described herein.
S403, the notebook computer switches the second mode to the first mode in a step-down mode according to the current use scene.
In some embodiments, a plurality of usage scenarios 1 and a step-down method corresponding to the usage scenarios 1 are preconfigured in the notebook computer. The step-down mode may define a number of third operating parameters and a length of time each time the third operating parameters are operated.
In some embodiments, the step-down manner corresponding to different usage scenario 1 may be different, and of course, may be the same, which is not particularly limited by the present application.
In other embodiments, the same usage scenario 1 may also correspond to a plurality of step-down modes, where each step-down mode corresponds to a remaining power (or short-time discharging capability) of a built-in battery.
In this way, after the notebook computer recognizes the current usage scenario, if the current usage scenario belongs to the preconfigured usage scenario 1, the matched step descent mode is determined by combining the residual capacity (or short-time discharging capacity) of the current built-in battery. Then, according to the matched step-down mode, the first operation parameters corresponding to the first mode are started, and the second operation parameters corresponding to the second mode are started.
As one implementation, as shown in fig. 12, the notebook computer may include an application layer, a middleware layer, an Operating System (OS) layer, a hardware layer, and the like.
By way of example, the application layer may include a scene recognition module that can distinguish between different usage scenes, such as a scene running a game program, a scene running a design program, a scene running a simulation program, and a scene running an office program, by invoking the ETW.
Also illustratively, the middleware layer includes a performance mode monitoring module, a CPU performance scheduling module, a GPU performance scheduling module, and the like. The performance mode monitoring module monitors whether the second mode is required to be started or not under the condition that the notebook computer starts the first mode. And under the condition that the second mode is required to be started, the current use scene is identified through the scene identification module. Then, the performance mode monitoring module determines a matched heartbeat control strategy according to the usage scenario.
According to the CPU performance scheduling module and the GPU performance scheduling module, the working states of the CPU, the GPU, the heat dissipation device and the built-in battery can be adjusted through the OS layer according to the heartbeat control strategy, so that the performance of the notebook computer can be adjusted.
Also illustratively, the OS layer may include a CPU management policy module, a GPU management policy module, a battery management policy module, and a heat dissipation control module.
The CPU management policy module can directly drive the CPU to adjust the working state of the CPU, such as main frequency adjustment, kernel quantity starting, power and the like.
The GPU management policy module may directly drive the GPU to adjust the operating state of the GPU, e.g., adjust the main frequency, TGP, etc.
The battery management strategy module can detect whether the notebook computer is externally connected with an external power supply, can detect the residual capacity, short-time discharging capacity and the like of the internal battery, and can also instruct the internal battery to start short-time discharging so as to supply electric energy required by the operation of the notebook computer.
The heat dissipation control module can directly drive the heat dissipation device (such as a heat dissipation fan) to adjust the working state of the heat dissipation device.
In this way, each software module of the notebook computer can implement the method provided by the foregoing embodiment.
For example, the above S101, S201, S301, and S401 may be that the CPU performance scheduling module invokes the CPU management policy module, the battery management policy module, and the heat dissipation control module to drive the corresponding hardware implementation. Of course, in the steps S101, S201, S301, and S401, the GPU performance scheduling module may call the GPU management policy module, the battery management policy module, and the heat dissipation control module to drive the corresponding hardware implementation.
Also for example, the above S102, S202, S302, and S402 may be cooperatively performed by the scene recognition module and the performance mode monitoring module.
As another example, the CPU performance scheduling module may invoke the CPU management policy module, the battery management policy module, and the heat dissipation control module to drive the corresponding hardware implementation in S103, S203, S303, and S403. Of course, the above-mentioned S103, S203, S303, and S403 may also be implemented by the GPU performance scheduling module invoking the GPU management policy module, the battery management policy module, and the heat dissipation control module to drive corresponding hardware.
For example, according to the heartbeat control strategy, the CPU performance scheduling module can adjust the working states of the CPU, the heat dissipation device and the built-in battery through the CPU management strategy module, the battery management strategy module and the heat dissipation control module, and control the built-in battery to start short-time discharging to provide the electric quantity required by the operation of the notebook computer while periodically improving the output performance of the CPU, and take away the heat brought by the improvement of the CPU performance through the heat dissipation device. For another example, according to the heartbeat control strategy, the GPU performance scheduling module can adjust the working states of the GPU, the heat dissipating device and the built-in battery through the GPU management strategy module, the battery management strategy module and the heat dissipating control module, and control the built-in battery to start short-time discharging while periodically improving the output performance of the GPU, so as to provide the electric quantity required by the operation of the notebook computer, and take away the heat brought by the improvement of the GPU performance through the heat dissipating device.
The embodiment of the application also provides electronic equipment, which can comprise: a memory and one or more processors. The memory is coupled to the processor. The memory is for storing computer program code, the computer program code comprising computer instructions. The computer instructions, when executed by the processor, cause the electronic device to perform the steps performed by the handset in the embodiments described above. Of course, the electronic device includes, but is not limited to, the memory and the one or more processors described above.
In some embodiments, it will be clearly understood by those skilled in the art from the foregoing description of the embodiments, for convenience and brevity of description, only the division of the above functional modules is illustrated, and in practical application, the above functional allocation may be implemented by different functional modules, that is, the internal structure of the apparatus is divided into different functional modules to implement all or part of the functions described above. The specific working processes of the above-described systems, devices and units may refer to the corresponding processes in the foregoing method embodiments, which are not described herein.
The functional units in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the embodiments of the present application may be essentially or a part contributing to the prior art or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium, including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor to perform all or part of the steps of the method described in the embodiments of the present application. And the aforementioned storage medium includes: flash memory, removable hard disk, read-only memory, random access memory, magnetic or optical disk, and the like.
The foregoing is merely a specific implementation of the embodiment of the present application, but the protection scope of the embodiment of the present application is not limited to this, and any changes or substitutions within the technical scope disclosed in the embodiment of the present application should be covered in the protection scope of the embodiment of the present application. Therefore, the protection scope of the embodiments of the present application shall be subject to the protection scope of the claims.

Claims (15)

1. A device control method, characterized by being applied to an electronic device, the method comprising:
operating according to a first performance parameter corresponding to the first mode, wherein the parameter type of the first performance parameter comprises one or more of central processor power, overall power consumption of a graphics system, the number of enabled central processor cores, a main frequency of the central processor and a main frequency of the graphics processor;
under the first condition, the operation is sequentially and alternately performed according to a second performance parameter corresponding to a second mode and the first performance parameter; the second performance parameter is the same as the first performance parameter in type, and the value of the second performance parameter is larger than that of the first performance parameter;
wherein the first condition comprises one or more of the following:
enabling a first application, wherein system resources required to be occupied by the first application during operation meet preset conditions, the system resources comprising central processor resources and graphics processor resources, the preset conditions comprising one or more of a number of central processor cores required to be enabled being greater than a preset number, a central processor main frequency required to be enabled being greater than a first frequency, and a graphics processor main frequency required to be enabled being greater than a second frequency;
An indication by the user to enable the second mode is detected.
2. The method of claim 1, wherein prior to sequentially alternating operation of the first performance parameter and the first performance parameter corresponding to the second mode, the method further comprises:
and determining that the electronic equipment is not connected with an external power supply.
3. The method of claim 2, wherein after ending the alternating operation with the second performance parameter and the first performance parameter, in the event that the electronic device is again operating with the first performance parameter, the method further comprises:
under the first condition, determining that the electronic equipment is connected with the external power supply;
and operating according to a second performance parameter corresponding to the second mode.
4. The method of claim 2, wherein, in the case where the first condition is that the first application is enabled, before the sequentially alternating running according to the first performance parameter and the first performance parameter corresponding to the second mode, the method further comprises:
detecting a first event;
wherein, in the case that the first application is a document editing application, the first event is opening a first type file, and the first type file is a file with a volume larger than a preset value;
In the case that the first application is a simulation application, the first event is the receipt of an operation to start simulation.
5. The method of claim 1, wherein upon enabling a different one of the first applications, alternately operating in accordance with the second performance parameter and the first performance parameter comprises at least one of the following differences:
the time length of operation according to the first performance parameter is different;
the time length of operation according to the second performance parameter is different;
the corresponding number of alternations is different.
6. The method of claim 1, wherein when the remaining power of the electronic device is different, alternately operating in accordance with the second performance parameter and the first performance parameter comprises at least one of the following differences:
the time length of operation according to the first performance parameter is different;
the length of time of operation is different according to the second performance parameter.
7. The method of claim 1, wherein during alternating operation according to the second performance parameter and the first performance parameter, the method further comprises:
under the condition of running according to the second performance parameter, the rotating speed of the cooling fan of the electronic equipment is increased from a first rotating speed to a second rotating speed;
And recovering the rotating speed of the cooling fan to the first rotating speed under the condition of operating according to the first performance parameter.
8. The method of claim 1, wherein after sequentially alternating operation of the second performance parameter and the first performance parameter corresponding to the second mode, the method further comprises:
detecting connection with the external power supply;
operating according to a second performance parameter corresponding to the second mode;
under a second condition, operating according to a third performance parameter in a first period, wherein the parameter types of the third performance parameter and the first performance parameter are the same, and the value of the third performance parameter is larger than that of the first performance parameter and smaller than that of the second performance parameter; the second condition includes detecting that the electronic device is disconnected from the external power source and the first application is running;
in a second period after the first period, operating according to the fourth performance parameter, wherein the fourth performance parameter is the same as the first performance parameter in type, and the value of the fourth performance parameter is larger than the value of the first performance parameter and smaller than the value of the third performance parameter;
And continuing to operate according to a second performance parameter corresponding to the second mode under the condition that the electronic equipment is detected to be connected with the external power supply again.
9. The method of claim 8, wherein in the case where the remaining power of the electronic device is different, the corresponding time length of the first period is different, and the corresponding time length of the second period is also different.
10. A device control method, characterized by being applied to an electronic device, the method comprising:
after the electronic equipment is connected with the external power supply, the electronic equipment operates according to a second performance parameter corresponding to a second mode; the parameter types of the second performance parameter include one or more of central processor power, graphics system overall power consumption, number of enabled central processor cores, central processor main frequency, and graphics processor main frequency;
under a second condition, operating according to a third performance parameter in a first period, wherein the parameter types of the third performance parameter and the second performance parameter are the same, the value of the third performance parameter is smaller than the value of the second performance parameter and larger than the value of a first performance parameter corresponding to a first mode, and the parameter types of the first performance parameter and the second performance parameter are the same; the second condition includes detecting that the electronic device is disconnected from the external power source and that the electronic device contains an operating application;
And after the first period, operating according to a first performance parameter corresponding to the first mode.
11. The method of claim 10, wherein in the second condition the running application is a first application, wherein the first application, during running, the amount of system resources required satisfies a preset condition, the system resources including central processor resources and graphics processor resources, the preset condition including one or more of a number of central processor cores required to be enabled being greater than a preset number, a central processor main frequency required to be enabled being greater than a first frequency, and a graphics processor main frequency required to be enabled being greater than a second frequency.
12. The method of claim 10, wherein prior to operating in accordance with the first performance parameter corresponding to the first mode, the method further comprises:
and in a second period after the first period, operating according to the fourth performance parameter, wherein the fourth performance parameter is the same as the first performance parameter in type, and the value of the fourth performance parameter is larger than the value of the first performance parameter and smaller than the value of the third performance parameter.
13. The method according to claim 12, wherein in the case where the remaining power of the electronic device is different, the corresponding time length of the first period is different, and the corresponding time length of the second period is also different.
14. An electronic device comprising one or more processors and memory; the memory being coupled to a processor, the memory being for storing computer program code comprising computer instructions which, when executed by one or more processors, are for performing the method of any of claims 1-13.
15. A computer storage medium comprising computer instructions which, when run on an electronic device, cause the electronic device to perform the method of any one of claims 1-13.
CN202310304793.5A 2023-03-20 2023-03-20 Equipment control method and electronic equipment Pending CN117130462A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310304793.5A CN117130462A (en) 2023-03-20 2023-03-20 Equipment control method and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310304793.5A CN117130462A (en) 2023-03-20 2023-03-20 Equipment control method and electronic equipment

Publications (1)

Publication Number Publication Date
CN117130462A true CN117130462A (en) 2023-11-28

Family

ID=88851557

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310304793.5A Pending CN117130462A (en) 2023-03-20 2023-03-20 Equipment control method and electronic equipment

Country Status (1)

Country Link
CN (1) CN117130462A (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2005029300A2 (en) * 2003-09-18 2005-03-31 Vulcan Portals Inc. Method and apparatus for operating an electronic device in a low power mode
CN1877491A (en) * 2005-06-11 2006-12-13 乐金电子(昆山)电脑有限公司 Method and apparatus for implementing a hybrid mode for a multi-core processor and powder supply manage mode setting method
CN101997956A (en) * 2009-08-17 2011-03-30 联想(北京)有限公司 Method for switching work mode of mobile terminal and mobile terminal
CN102301309A (en) * 2009-01-30 2011-12-28 意法爱立信(法国)有限公司 Method and system for managing the operation of a multicore data processing device
TWI521339B (en) * 2015-03-09 2016-02-11 光寶電子(廣州)有限公司 External power supply and system connection detection unit applied thereto
CN109445858A (en) * 2018-09-30 2019-03-08 联想(北京)有限公司 Switching method and system
CN111698544A (en) * 2019-03-15 2020-09-22 海信视像科技股份有限公司 Display device
CN113986002A (en) * 2021-12-31 2022-01-28 荣耀终端有限公司 Frame processing method, device and storage medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2005029300A2 (en) * 2003-09-18 2005-03-31 Vulcan Portals Inc. Method and apparatus for operating an electronic device in a low power mode
CN1877491A (en) * 2005-06-11 2006-12-13 乐金电子(昆山)电脑有限公司 Method and apparatus for implementing a hybrid mode for a multi-core processor and powder supply manage mode setting method
CN102301309A (en) * 2009-01-30 2011-12-28 意法爱立信(法国)有限公司 Method and system for managing the operation of a multicore data processing device
CN101997956A (en) * 2009-08-17 2011-03-30 联想(北京)有限公司 Method for switching work mode of mobile terminal and mobile terminal
TWI521339B (en) * 2015-03-09 2016-02-11 光寶電子(廣州)有限公司 External power supply and system connection detection unit applied thereto
CN109445858A (en) * 2018-09-30 2019-03-08 联想(北京)有限公司 Switching method and system
CN111698544A (en) * 2019-03-15 2020-09-22 海信视像科技股份有限公司 Display device
CN113986002A (en) * 2021-12-31 2022-01-28 荣耀终端有限公司 Frame processing method, device and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
王桂彬;杜静;唐滔;: "一种面向异构并行系统的最大功耗管理方法", 软件学报, no. 10, 15 October 2013 (2013-10-15) *

Similar Documents

Publication Publication Date Title
CN109660842B (en) Method for playing multimedia data and electronic equipment
WO2020192537A1 (en) Network card switching method and electronic device
WO2021078284A1 (en) Content continuation method and electronic device
WO2020108356A1 (en) Application display method and electronic device
WO2020143380A1 (en) Data transmission method and electronic device
WO2021042978A1 (en) Theme switching method and theme switching apparatus
WO2021052410A1 (en) Application management method and apparatus
WO2020173370A1 (en) Method for moving application icons, and electronic device
CN111182614B (en) Method and device for establishing network connection and electronic equipment
WO2023279820A9 (en) Method for adjusting touch panel sampling rate, and electronic device
EP4311314A1 (en) Sleep scheduling method and device
WO2021238387A1 (en) Application execution method and apparatus
CN116028205B (en) Resource scheduling method and electronic equipment
EP3550822A1 (en) Camera control method and terminal
CN116680153B (en) Application frame rate smoothing method, electronic device and storage medium
CN117130462A (en) Equipment control method and electronic equipment
CN117130773A (en) Resource allocation method, device and equipment
CN117270670B (en) Power consumption control method and electronic equipment
WO2023116415A1 (en) Application program suppression method and electronic device
CN116027880B (en) Resource scheduling method and electronic equipment
CN116055443B (en) Method for identifying social scene, electronic equipment and computer readable storage medium
EP4113276A1 (en) Sound playback method and device
WO2022022436A1 (en) Charging method and electronic device
RU2793700C1 (en) Method of information transmission and electronic device
EP4280060A1 (en) Power consumption control method and apparatus

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