Equipment control method and electronic equipment
By alternately enabling different performance modes in electronic devices, dynamically adjusting the power and frequency of the CPU and GPU, the problem of high power consumption in high performance mode is solved, and high performance and long battery life at limited power, as well as external power supply Low energy consumption when connected.
Patent Information
- Application Number
- CN202410925739.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-20
- Publication Date
- 2024-11-15
AI Technical Summary
When electronic devices are enabled with high performance mode, their power consumption is high, resulting in shortening of the device's battery life, making it difficult to achieve the optimal performance and energy consumption at the same time.
Provides a device control method that dynamically adjusts the power and frequency of the central processor and graphics processor according to the power and usage scenarios by alternately enabling different performance modes, ensuring high performance and battery life under limited power.
While meeting performance needs, it extends the battery life of the device, reduces energy consumption when connecting external power supplies, and improves user experience.
Smart Images

Figure CN118963530A_ABST
Abstract
Description
[0001] This application is a divisional application. The application number of the original application is 202310304793.5, and the original application date is March 20, 2023. The entire contents of the original application are incorporated into this application by reference. Technical Field
[0002] The present application relates to the field of computer technology, and in particular to a device control method and an electronic device. Background Art
[0003] With the development of electronic devices, performance and energy consumption have remained the direction of device iteration and improvement, and are also important indicators that users pay more attention to.
[0004] Usually, when an electronic device enables high-performance mode, for example, when a large number of central processing unit (CPU) cores, a high CPU main frequency, a high CPU power, a high graphics processing unit (GPU) main frequency, and a high GPU power are enabled, the real-time power consumption of the electronic device will also be higher. Understandably, the higher the power consumption, the higher the energy consumption of the entire device. In other words, at present, it is difficult for electronic devices to achieve optimal performance and energy consumption at the same time. In this way, when the device has limited power, the electronic device either cannot enable high-performance mode, or the device's battery life is significantly shortened after enabling high-performance mode. Summary of the invention
[0005] The present application provides a device control method and an electronic device, which are used to balance high performance and battery life when the power of the device is limited.
[0006] To achieve the above objectives, the embodiments of the present application adopt the following technical solutions:
[0007] In a first aspect, an embodiment of the present application provides a device control method, which is applied to an electronic device, and the method includes: operating according to a first performance parameter corresponding to a first mode, the parameter type of the first performance parameter including one or more of the central processing unit power, the overall power consumption of the graphics system, the number of enabled central processing unit cores, the central processing unit main frequency and the graphics processing unit main frequency; under a first condition, operating alternately according to a second performance parameter corresponding to a second mode and the first performance parameter; the second performance parameter and the first performance parameter have the same parameter type, and the value of the second performance parameter is greater than the value of the first performance parameter; wherein the first condition includes one or more of the following conditions: enabling a first application; detecting a user instruction to enable the second mode.
[0008] Exemplarily, the first application may be program data that has high requirements for device performance. For example, game applications, large-scale simulation applications, design applications, development applications, etc. The first application may have high requirements for device performance, which can be reflected in that during the operation of the first application, the system resources required to be occupied meet preset conditions, the system resources include central processing unit resources and graphics processing unit resources, and the preset conditions include one or more of the number of central processing unit cores required to be enabled being greater than a preset number, the main frequency of the central processing unit required to be enabled being greater than a first frequency, and the main frequency of the graphics processing unit required to be enabled being greater than a second frequency.
[0009] As another example, the first application may also be program data that has high requirements for device performance in certain specific operation stages, such as office applications that need to parse or open files of larger volumes.
[0010] In addition, taking the CPU power as the first performance parameter as an example, when operating according to the first performance parameter, the CPU power does not exceed the first performance parameter as a constraint condition, and various system resources of the electronic device are called to release the performance required for the operation of the electronic device. That is, during the operation according to the first performance parameter, the maximum CPU power of the electronic device is equal to the first performance parameter.
[0011] Taking the CPU power as an example, when the second performance parameter is operated according to the second performance parameter, the CPU power does not exceed the second performance parameter as a constraint condition, and various system resources of the electronic device are called to release the performance required for the operation of the electronic device. That is, during the operation according to the second performance parameter, the maximum CPU power of the electronic device is equal to the second performance parameter.
[0012] The operation of the electronic device according to the second performance parameter may be referred to as enabling the second mode. The operation of the electronic device according to the first performance parameter may be referred to as enabling the first mode. The device performance exhibited by the electronic device when the second mode is enabled is higher than the device performance exhibited when the first mode is enabled. 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.
[0013] In the above embodiment, according to the first application, it is determined that the second mode needs to be enabled, or according to the user's active indication, it is determined that the second mode needs to be enabled, and the electronic device can alternately enable the second mode and the first mode in sequence. In this way, compared with enabling only the first mode, during the period of alternatingly enabling the second mode and the first mode, higher performance can be exhibited to meet the current user's performance requirements for the device. Compared with enabling only the second mode, during the period of alternatingly enabling the second mode and the first mode, lower energy consumption is generated. In some embodiments, before alternating in sequence according to the first performance parameter corresponding to the second mode and the first performance parameter, the method also includes: determining that the electronic device is not connected to an external power supply.
[0014] In the above embodiment, when the external power supply is not connected, the power of the electronic device is limited. In the scenario of limited power, the electronic device can increase the battery life of the device while meeting the performance requirements by alternately enabling the first mode and the second mode.
[0015] In some embodiments, after completing alternating operation according to the second performance parameters and the first performance parameters, when the electronic device operates according to the first performance parameters again, the method further includes: under the first condition, determining that the electronic device is connected to the external power supply; and operating according to the second performance parameters corresponding to the second mode.
[0016] The electronic device may end the alternate activation of the first mode and the second mode in at least one of the following scenarios:
[0017] (1) The end time point of the heartbeat control policy, the trigger ends. For example, the number of alternations between the first mode and the second mode has reached the number indicated in the heartbeat control policy. For another example, the activation time of the heartbeat control policy has reached the pre-configured maximum time. For another example, the time point when a specific program stops running. For another example, the time point when a specific usage scenario no longer exists.
[0018] (2) Connect an external power supply.
[0019] (3) A user instruction is received to turn off the operation of alternately enabling the first mode and the second mode.
[0020] In the above embodiment, after the alternating activation of the first mode and the second mode is stopped and the electronic device decides to continue to operate in the first mode, also under the first condition, if it is detected that the electronic device is connected to an external power supply, the second mode is directly enabled to give priority to meeting performance requirements.
[0021] In some embodiments, when the first condition is enabling the first application, before the first performance parameters and the first performance parameters corresponding to the second mode are run alternately in sequence, the method further includes: detecting a first event; wherein, when the first application is a document editing application, the first event is opening a first type of file, and the first type of file is a file whose volume is greater than a preset value; when the first application is a simulation application, the first event is receiving an operation to start the simulation.
[0022] In some embodiments, when different first applications are enabled, the manner of alternating between running according to the second performance parameters and the first performance parameters includes at least one of the following differences: different lengths of time for running according to the first performance parameters; different lengths of time for running according to the second performance parameters; and different corresponding numbers of alternations.
[0023] In the above embodiment, in response to different first applications, the manner of alternately switching between the second mode and the first mode may also be different, so that the performance and the adaptability to the first application can be improved.
[0024] In some embodiments, when the remaining power of the electronic device is different, the manner of alternating operation according to the second performance parameter and the first performance parameter includes at least one of the following differences: a different length of time of operation according to the first performance parameter; a different length of time of operation according to the second performance parameter.
[0025] In the above embodiment, the electronic device may alternately switch between the second mode and the first mode in different ways under different remaining power levels, so that the remaining power can be maximized and the battery life and performance of the device can be coordinated.
[0026] In some embodiments, while alternating between operating according to the second performance parameter and the first performance parameter, the method further includes: when operating according to the second performance parameter, increasing the speed of the cooling fan of the electronic device from a first speed to a second speed; and when operating according to the first performance parameter, restoring the speed of the cooling fan to the first speed.
[0027] In some embodiments, after operating alternately according to the second performance parameters corresponding to the second mode and the first performance parameters, the method also includes: detecting connection with the external power supply; operating according to the second performance parameters corresponding to the second mode; under a second condition, operating according to third performance parameters within a first time period, the third performance parameter and the first performance parameter have the same parameter type, the value of the third performance parameter is greater than the value of the first performance parameter, and less than the value of the second performance parameter; the second condition includes detecting that the electronic device is disconnected from the external power supply and the first application is running; within a second time period after the first time period, operating according to the fourth performance parameter, the fourth performance parameter and the first performance parameter have the same parameter type, the value of the fourth performance parameter is greater than the value of the first performance parameter, and less than the value of the third performance parameter; when it is detected that the electronic device is connected to the external power supply again, continue to operate according to the second performance parameters corresponding to the second mode.
[0028] In the above embodiment, taking the third performance parameter as CPU power as an example, when operating according to the third performance parameter, the CPU power does not exceed the third performance parameter as a constraint condition, calling various system resources of the electronic device, and releasing the performance required for the operation of the electronic device. That is, during the operation according to the third performance parameter, the maximum CPU power of the electronic device is equal to the third performance parameter.
[0029] Taking the fourth performance parameter as CPU power as an example, when operating according to the fourth performance parameter, the CPU power does not exceed the fourth performance parameter as a constraint condition, calling various system resources of the electronic device to release the performance required for the operation of the electronic device. That is, during the operation according to the fourth performance parameter, the maximum CPU power of the electronic device is equal to the fourth performance parameter.
[0030] In some embodiments, when the remaining power of the electronic device is different, the corresponding time length of the first time period is different, and the corresponding time length of the second time period is also different.
[0031] In a second aspect, an embodiment of the present application provides a device control method, which is applied to an electronic device, and the method includes: after the electronic device is connected to the external power supply, operating according to the second performance parameter corresponding to the second mode; the parameter type of the second performance parameter includes one or more of the central processing unit power, the overall power consumption of the graphics system, the number of enabled central processing unit cores, the central processing unit main frequency and the graphics processor main frequency; under a second condition, operating according to a third performance parameter within a first time period, the parameter type of the third performance parameter and the second performance parameter are the same, the value of the third performance parameter is less than the value of the second performance parameter, and is greater than the value of the first performance parameter corresponding to the first mode, and the parameter type 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 supply and the electronic device contains a running application; after the first time period, operating according to the first performance parameter corresponding to the first mode.
[0032] In the above embodiment, the electronic device can use the third performance parameter to transition from operating according to the second performance parameter to operating according to the first performance parameter, so as to avoid the device performance from degrading too quickly and affecting the user's experience.
[0033] In some embodiments, the electronic device may operate according to the second performance parameters corresponding to the second mode in response to the event “connecting the external power supply”.
[0034] In other embodiments, after the electronic device is connected to the external power supply, the second mode of operation may be initiated in response to a user instruction, and the device may operate according to second performance parameters corresponding to the second mode.
[0035] In some embodiments, in the second condition, the running application is a first application, wherein during the operation of the first application, the amount of system resources required meets a preset condition, the system resources include central processing unit resources and graphics processing unit resources, and the preset condition includes one or more of the number of central processing unit cores required to be enabled being greater than a preset number, the main frequency of the central processing unit required to be enabled being greater than a first frequency, and the main frequency of the graphics processing unit required to be enabled being greater than a second frequency.
[0036] In some embodiments, before operating according to the first performance parameter corresponding to the first mode, the method also includes: in a second time period after the first time period, operating according to the fourth performance parameter, the fourth performance parameter and the first performance parameter have the same parameter type, and the value of the fourth performance parameter is greater than the value of the first performance parameter and less than the value of the third performance parameter.
[0037] In some embodiments, when the remaining power of the electronic device is different, the corresponding time length of the first time period is different, and the corresponding time length of the second time period is also different.
[0038] 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 is used to store computer program code, the computer program code includes computer instructions, when one or more processors execute the computer instructions, the one or more processors are used to: operate according to a first performance parameter corresponding to a first mode, the parameter type of the first performance parameter includes one or more of the central processing unit power, the overall power consumption of the graphics system, the number of enabled central processing unit cores, the main frequency of the central processing unit and the main frequency of the graphics processing unit; under a first condition, alternately operate according to a second performance parameter corresponding to a second mode and the first performance parameter; the second performance parameter and the first performance parameter have the same parameter type, and the value of the second performance parameter is greater than the value of the first performance parameter; wherein the first condition includes one or more of the following conditions: enabling a first application, wherein during the operation of the first application, the system resources required to be occupied meet a preset condition, the system resources include central processing unit resources and graphics processing unit resources, and the preset condition includes one or more of the number of central processing unit cores required to be enabled being greater than a preset number, the main frequency of the central processing unit required to be enabled being greater than a first frequency, and the main frequency of the graphics processing unit required to be enabled being greater than a second frequency; detecting an operation in which a user indicates to enable the second mode.
[0039] In some embodiments, before operating alternately according to the first performance parameter corresponding to the second mode and the first performance parameter, the one or more processors are further used to determine that the electronic device is not connected to an external power supply.
[0040] In some embodiments, after completing alternating operation according to the second performance parameters and the first performance parameters, when the electronic device operates according to the first performance parameters again, the one or more processors are further used to: under the first condition, determine that the electronic device is connected to the external power supply; and operate according to the second performance parameters corresponding to the second mode.
[0041] In some embodiments, when the first condition is enabling the first application, before the first performance parameters and the first performance parameters corresponding to the second mode are run alternately in sequence, the one or more processors are also used to: detect a first event; wherein, when the first application is a document editing application, the first event is opening a first type of file, and the first type of file is a file with a volume greater than a preset value; when the first application is a simulation application, the first event is receiving an operation to start the simulation.
[0042] In some embodiments, when different first applications are enabled, the manner of alternating between running according to the second performance parameters and the first performance parameters includes at least one of the following differences: different lengths of time for running according to the first performance parameters; different lengths of time for running according to the second performance parameters; and different corresponding numbers of alternations.
[0043] In some embodiments, when the remaining power of the electronic device is different, the manner of alternating operation according to the second performance parameter and the first performance parameter includes at least one of the following differences: a different length of time of operation according to the first performance parameter; a different length of time of operation according to the second performance parameter.
[0044] In some embodiments, while alternating between operating according to the second performance parameter and the first performance parameter, the one or more processors are further used to: when operating according to the second performance parameter, increase the speed of the cooling fan of the electronic device from a first speed to a second speed; and when operating according to the first performance parameter, restore the speed of the cooling fan to the first speed.
[0045] In some embodiments, after operating alternately according to the second performance parameters corresponding to the second mode and the first performance parameters, the one or more processors are also used to: detect connection with the external power supply; operate according to the second performance parameters corresponding to the second mode; under a second condition, operate according to a third performance parameter in a first time period, the third performance parameter and the first performance parameter have the same parameter type, and the value of the third performance parameter is greater than the value of the first performance parameter and less than the value of the second performance parameter; the second condition includes detecting that the electronic device is disconnected from the external power supply and the first application is running; in a second time period after the first time period, operate according to the fourth performance parameter, the fourth performance parameter and the first performance parameter have the same parameter type, and the value of the fourth performance parameter is greater than the value of the first performance parameter and less than the value of the third performance parameter; when it is detected that the electronic device is connected to the external power supply again, continue to operate according to the second performance parameter corresponding to the second mode.
[0046] In some embodiments, when the remaining power of the electronic device is different, the corresponding time length of the first time period is different, and the corresponding time length of the second time period is also different.
[0047] In a fourth aspect, an embodiment of the present application provides an electronic device, the electronic device comprising one or more processors and a memory; the memory is coupled to the processor, the memory is used to store computer program code, the computer program code includes computer instructions, and when one or more processors execute the computer instructions, the one or more processors are used to: after being connected to the external power supply, operate according to the second performance parameter corresponding to the second mode; the parameter type of the second performance parameter includes one or more of the central processing unit power, the overall power consumption of the graphics system, the number of enabled central processing unit cores, the central processing unit main frequency and the graphics processor main frequency; under a second condition, operate according to a third performance parameter within a first time period, the parameter type of the third performance parameter and the second performance parameter are the same, the value of the third performance parameter is less than the value of the second performance parameter, and is greater than the value of the first performance parameter corresponding to the first mode, and the parameter type 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 supply and the electronic device contains a running application; after the first time period, operate according to the first performance parameter corresponding to the first mode.
[0048] In some embodiments, in the second condition, the running application is a first application, wherein the amount of system resources required by the first application during operation meets a preset condition, the system resources include CPU resources and GPU resources, and the preset condition includes one or more of the number of CPU cores required to be enabled being greater than a preset number, the CPU main frequency required to be enabled being greater than a first frequency, and the GPU main frequency required to be enabled being greater than a second frequency. In some embodiments, before operating according to the first performance parameter corresponding to the first mode, the one or more processors are further configured to: operate according to the fourth performance parameter in a second time period after the first time period, the fourth performance parameter and the first performance parameter are of the same parameter type, the value of the fourth performance parameter is greater than the value of the first performance parameter, and less than the value of the third performance parameter.
[0049] In some embodiments, after operating alternately according to the second performance parameters corresponding to the second mode and the first performance parameters, the one or more processors are also used to: detect connection with the external power supply; operate according to the second performance parameters corresponding to the second mode; under a second condition, operate according to a third performance parameter in a first time period, the third performance parameter and the first performance parameter have the same parameter type, and the value of the third performance parameter is greater than the value of the first performance parameter and less than the value of the second performance parameter; the second condition includes detecting that the electronic device is disconnected from the external power supply and the first application is running; in a second time period after the first time period, operate according to the fourth performance parameter, the fourth performance parameter and the first performance parameter have the same parameter type, and the value of the fourth performance parameter is greater than the value of the first performance parameter and less than the value of the third performance parameter; when it is detected that the electronic device is connected to the external power supply again, continue to operate according to the second performance parameter corresponding to the second mode.
[0050] In some embodiments, when the remaining power of the electronic device is different, the corresponding time length of the first time period is different, and the corresponding time length of the second time period is also different.
[0051] In a fifth aspect, an embodiment of the present application provides a computer storage medium, comprising computer instructions. When the computer instructions are executed on an electronic device, the electronic device executes the method in the above-mentioned first aspect and its possible embodiments.
[0052] In a sixth aspect, the present application provides a computer program product. When the computer program product runs on the above-mentioned electronic device, it enables the electronic device to execute the method in the above-mentioned first aspect and possible embodiments thereof.
[0053] It can be understood that the electronic devices, computer storage media and computer program products provided in the above-mentioned aspects are all applied to the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] Figure 1 An example diagram of a display interface of an electronic device provided in an embodiment of the present application;
[0055] Figure 2 An example diagram of the manual switching operation mode provided in an embodiment of the present application;
[0056] Figure 3 An example diagram of the hardware structure of an electronic device provided in an embodiment of the present application;
[0057] Figure 4 One of the step flow charts of the device control method provided in the embodiment of the present application;
[0058] Figure 5 This is one of the example diagrams of CPU power performance provided in the embodiment of the present application;
[0059] Figure 6 The second step flow chart of the device control method provided in the embodiment of the present application;
[0060] Figure 7 This is one of the example diagrams of the TGP performance of the GPU provided in the embodiment of the present application;
[0061] Figure 8 The second example diagram of TGP performance of the GPU provided in the embodiment of the present application;
[0062] Fig. 9 The third step flow chart of the device control method provided in the embodiment of the present application;
[0063] Fig.10 The second example diagram of the power performance of the CPU provided in the embodiment of the present application;
[0064] Fig.11 This is a flowchart of the device control method provided in the embodiment of the present application;
[0065] Fig.12 An example diagram of the software and hardware of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0066] The technical scheme in the embodiment of the present application will be described below in conjunction with the drawings in the embodiment of the present application. Wherein, in the description of the present application, unless otherwise specified, "at least one" refers to one or more, and "a plurality of" refers to two or more than two. In addition, in order to facilitate the clear description of the technical scheme of the embodiment of the present application, in the embodiment of the present application, the words "first", "second" and the like are used to distinguish the same items or similar items with substantially the same functions and effects. Those skilled in the art will understand that the words "first", "second" and the like do not limit the quantity and execution order, and the words "first", "second" and the like do not limit necessarily different.
[0067] With the development of technology, performance and energy consumption have become two important indicators for users to evaluate electronic devices.
[0068] It is understandable that electronic devices can improve their performance ceiling by upgrading their hardware. For example, they can configure a CPU with more cores, higher frequency, and higher power. Another example is configuring a GPU with higher frequency and higher power, or configuring a larger storage space to improve the performance ceiling of electronic devices.
[0069] The higher the performance ceiling of an electronic device, the higher the performance that the electronic device can actually release in scenarios that require high performance, such as running game programs, simulation programs, and other programs that occupy a large amount of system resources (including storage resources, computing resources, graphics processing resources, etc.). For example, an electronic device can call more CPU cores and have stronger computing power. For another example, an electronic device can enable a higher CPU main frequency and a faster computing speed. For another example, the CPU power of an electronic device is higher, which can support better CPU operation. For another example, an electronic device can enable a higher GPU main frequency and a faster graphics processing speed. For another example, the GPU power of an electronic device is higher, which supports better GPU operation. In other words, the CPU and GPU have stronger working capabilities. In this scenario, electronic devices dispatch the above-mentioned system resources (such as GPU resources and CPU resources) to provide users with better services.
[0070] However, while electronic devices release high performance, they will inevitably bring about higher energy loss. That is, in the same period of time, it is difficult for the performance actually released by electronic devices and the actual energy consumption generated to reach the optimal level. However, electronic devices can maintain energy consumption at a relatively optimal level while releasing the optimal performance, that is, performance is prioritized. Or, while maintaining the optimal energy consumption, relatively excellent performance is released, that is, energy consumption is prioritized. For another example, a balanced state is maintained between the released performance and the maintained energy consumption, that is, performance and energy consumption are balanced.
[0071] In some embodiments, the electronic device can be configured with multiple different operating modes, such as a power saving mode, a normal mode, and a high energy mode.
[0072] The energy-saving mode is an operation mode that prioritizes energy consumption. When the electronic device operates in the energy-saving mode, the upper limit of the target power of the electronic device is the first power value.
[0073] Exemplarily, the target power may be the CPU power of the electronic device. For example, when the electronic device does not include an independent GPU chip, the target power may be the CPU power of the electronic device. Another exemplary embodiment may be the GPU power of the electronic device. For example, when the electronic device includes an independent GPU chip, the target power may be the GPU power.
[0074] It is understandable that the above is only an example, and the corresponding target power of an electronic device without an independent GPU chip can also be the GPU power. The corresponding target power of an electronic device including an independent GPU chip can also be the GPU power, and this embodiment of the application does not limit this.
[0075] The high energy mode is a performance-first operation mode. When the electronic device operates in the high energy mode, the upper limit of the target power of the electronic device is the second power value.
[0076] The above-mentioned normal mode is an operation mode in which performance and energy consumption are balanced. When the electronic device operates in the normal mode, the upper limit of the target power of the electronic device is the third power value.
[0077] In some embodiments, the first power value is less than the third power value, and the third power value is less than the second power value. The second power value is the maximum power value that the target power can reach under the best heat dissipation effect of the electronic device. The third power value and the first power value can both be values determined based on the second power value. For example, the second power value is 60w, the second power value can be 35w, and the first power value can be 25w.
[0078] It can be understood that the higher the upper limit of the target power, the higher the performance that the electronic device can release, for example, the more CPU cores that can be called, the higher the CPU main frequency that can be enabled, the higher the GPU main frequency that can be enabled, 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.
[0079] When an electronic device is running in energy-saving mode, the overall energy consumption of the electronic device can be maintained at a low level, but the actual performance that the electronic device can release is lower than that of the normal mode and high-energy mode. In other words, in scenarios that require high performance, the quality of service provided by the electronic device may be flawed. For example, when running large-scale game programs, problems such as frame drops and freezes may occur.
[0080] When an electronic device operates in high-energy mode, the electronic device can actually output higher performance. That is, in scenarios requiring high performance, the electronic device provides better services, but it also results in higher energy consumption.
[0081] When an electronic device is running in normal mode, a balance can be achieved between the performance that the electronic device can actually output and the energy consumption generated. That is, in scenarios that require high performance, the service provided by the electronic device in normal mode is inferior to the service provided in high-energy mode, but better than the service provided in energy-saving mode. Correspondingly, the energy consumption generated in normal mode is lower than the energy consumption generated in high-energy mode, but higher than the energy consumption generated in energy-saving mode.
[0082] In addition, in some embodiments, the above-mentioned target power may include CPU power and GPU power. In the case where the target power includes CPU power and 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 in the first power value may be different from the power value corresponding to the CPU. For example, the first power value includes 35w corresponding to the CPU and 65w corresponding to the GPU. In this way, when the electronic device is running in energy-saving mode, the maximum power that the CPU can reach is 35w, and the maximum power that the GPU can reach is 65w.
[0083] Similarly, 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 in the second power value may be different from the power value corresponding to the CPU. 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 in the third power value may be different from the power value corresponding to the CPU.
[0084] In some embodiments, the operating mode enabled by the electronic device can be selected by the user.
[0085] Exemplarily, the electronic device detects a user's designated operation, such as the user clicking a shortcut key indicating switching the operating mode, and can respond to the designated operation, such as Figure 1As shown, a system configuration interface 101 for selecting an operation mode of an electronic device is displayed. The system configuration interface 101 may include selection items indicating various operation modes, such as selection item 102 indicating an energy saving mode, selection item 103 indicating a normal mode, and selection item 104 indicating a high energy mode.
[0086] In some examples, a default operating mode may be preset in the electronic device, and the default operating mode may be one of the energy-saving mode, the normal mode, and the high-energy mode. After the electronic device is turned on and before the user manually changes the operating mode, the electronic device may directly enable the default operating mode. In this way, when the system configuration interface 101 is displayed, the option corresponding to the default operating mode is in a selected state. For example, the default operating mode in the electronic device is the normal mode, and in the displayed system configuration interface 101, the option 103 corresponding to the normal mode is in a selected state.
[0087] In addition, while the system configuration interface 101 is displayed, the electronic device can respond to the user's selection operation in the system configuration interface 101, such as the user's selection of the energy-saving mode (or the selection of the high-energy mode), enable the operation mode selected by the user (such as the target mode), and update the selection item corresponding to the target mode to the selected state in the system configuration interface 101, and update the selection item corresponding to the default operation mode to the unselected state. Figure 2 As shown, when the user selects the energy-saving mode, the electronic device can also update the option 102 corresponding to the energy-saving mode in the system configuration interface 101 to a selected state, and update the option 103 corresponding to the normal mode to an unselected state when the energy-saving mode is enabled.
[0088] In other embodiments, the electronic device can automatically select the operating mode to be enabled based on the power level of the device.
[0089] For example, when the electronic device is plugged in (external power supply), the power level of the device is relatively stable, and the high-energy mode can be automatically enabled.
[0090] As another example, when the electronic device has sufficient power but is not plugged in, the power of the device can maintain the normal operation of the electronic device for a relatively long time, but the power of the device will continue to decrease. At this time, the normal mode can be automatically selected to be enabled.
[0091] As another example, when the power of the electronic device is low and it is not plugged in, the time that the power of the device can maintain the normal operation of the electronic device is relatively short, and at the same time, the power of the device will continue to decrease. At this time, the energy saving mode is automatically enabled.
[0092] In the related art, whether the user manually switches the operating mode or the mode is automatically switched according to the power level of the device, the performance released by the electronic device will change suddenly, and correspondingly, the energy consumption will increase or the performance will decrease.
[0093] For example, when the electronic device is not plugged in, if the electronic device switches from normal mode or energy-saving mode to high-energy mode, the electronic device can release more performance in high-energy mode. Of course, the energy consumption of the electronic device will also increase. That is, when the electronic device is not plugged in, after switching to high-energy mode, the battery life of the electronic device will be significantly shortened. In this way, in the related art, most electronic devices cannot enable high-energy mode when not plugged in.
[0094] As another example, when an electronic device is already running in high-energy mode, if it switches to normal mode or energy-saving mode, the performance released by the electronic device will drop instantly. That is, when the service provided by the electronic device remains unchanged, the quality of service actually provided will also deteriorate instantly due to the instantaneous drop in released performance. For example, when the electronic device is running a game program, the power suddenly cuts off, and the electronic device needs to switch from high-energy mode to other modes (such as normal mode or energy-saving mode), otherwise the electronic device will be powered off quickly. However, when the electronic device switches from high-energy mode to other modes, the running game program will show obvious frame drops and freezes, which greatly affects the user experience.
[0095] In order to solve the above problems, an embodiment of the present application provides a device control method. The device control method is applied to an electronic device. In this way, the electronic device can effectively reduce the increase in energy consumption and improve the battery life of the device when switching to a high-energy mode.
[0096] In addition, when the electronic device switches out of the high-energy mode, the released performance changes in a step-by-step manner, thereby avoiding a sudden drop in the quality of service actually provided by the electronic device and affecting the user experience.
[0097] Exemplarily, 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, as well as a cellular phone, a personal digital assistant (PDA), a media player, and the like. The embodiments of the present application do not impose any special restrictions on the specific form of the electronic device.
[0098] Of course, the above-mentioned electronic device can be connected to an external power source. In the case of an external power source for the electronic device, the external power source can be used for power supply. For example, the electronic device can obtain electrical energy by plugging in to power the device for operation. In addition, the electronic device also includes a built-in power source, such as a battery. In this way, in the absence of an external power source (e.g., not plugged in), the electronic device can be powered by its own battery for operation.
[0099] Taking a laptop as an example, Figure 3 A schematic diagram of the structure of a notebook computer is shown.
[0100] The laptop computer may include a processor 110, an external memory interface 120, an internal memory 121, a 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.
[0101] It is to be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the laptop computer. In other embodiments of the present application, the laptop computer may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0102] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0103] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0104] The wireless communication function of the notebook computer can be realized through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor.
[0105] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in the laptop can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of the antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.
[0106] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied to laptop computers. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.
[0107] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to laptop computers. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the frequency of the electromagnetic wave signal and performs filtering, and sends the processed signal to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency of it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.
[0108] In some embodiments, the antenna 1 of the laptop is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the laptop can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology, etc. The GNSS may include global positioning system (GPS), global navigation satellite system (GLONASS), Beidou navigation satellite system (BDS), quasi-zenith satellite system (QZSS) and / or satellite based augmentation system (SBAS).
[0109] The laptop computer implements display functions through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
[0110] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc.
[0111] The laptop computer can realize the shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, and an application processor.
[0112] ISP is used to process the data fed back by camera 193. For example, when taking a photo, the shutter is opened, and the light is transmitted to the camera photosensitive element through the lens. The light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to ISP for processing and converts it into an image visible to the naked eye. ISP can also perform algorithm optimization on the noise, brightness, and skin color of the image. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, ISP can be set in camera 193.
[0113] The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then passes the electrical signal 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 other format. In some embodiments, the laptop computer may include 1 or N cameras 193, where N is a positive integer greater than 1.
[0114] Digital signal processors are used to process digital signals. In addition to processing digital image signals, they can also process other digital signals. For example, when a laptop selects a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.
[0115] Video codecs are used to compress or decompress digital videos. Laptops can support one or more video codecs. This allows them to play or record videos in a variety of encoding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
[0116] NPU is a neural network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain, it can quickly process input information and can also continuously self-learn. Through NPU, applications such as intelligent cognition of electronic device 100 can be realized, such as image recognition, face recognition, voice recognition, text understanding, etc.
[0117] Of course, the laptop computer may also include a charging management module 240, a power management module 241, a battery 242, an indicator, a keyboard, a mouse, a control panel, a heat dissipation device, and one or more SIM card interfaces, etc., and the embodiments of the present application do not impose any restrictions on this.
[0118] In addition, the control panel can sense the user's touch actions and convert them into corresponding touch commands. The heat dissipation device is used to assist the hardware (such as CPU, GPU, etc.) in the laptop computer to dissipate heat. Exemplarily, the heat dissipation device can be a built-in heat dissipation fan, an external heat dissipation fan, or a liquid cooling device. In the subsequent embodiments, the heat dissipation device is mainly exemplified by a heat dissipation fan.
[0119] The following describes the implementation details of the device control method provided in the embodiment of the present application by taking a laptop computer as an example in conjunction with the accompanying drawings:
[0120] In some embodiments, Figure 4 As shown, the above device control method may include the following steps:
[0121] S101, the notebook computer starts running in the first mode.
[0122] The first mode may be one of the operating modes of the laptop computer. When the laptop computer is operating in the first mode, the maximum performance that can be released is lower than the performance upper limit of the laptop computer. That is, the first mode may be an operating mode other than the high-energy mode, such as the energy-saving mode or the normal mode.
[0123] In some examples, the laptop computer may enable the first mode in any of the following scenarios:
[0124] Scenario 1: The first mode is the default mode in the laptop. After the laptop is turned on, the first mode is enabled. In addition, during the operation, if the operation mode is not switched, the laptop continues to enable the first mode.
[0125] Scenario 2: In response to the user's instruction to switch to enable the first mode, the first mode is enabled. The user's instruction to switch to enable the first mode may be: by pressing a shortcut key, instructing the laptop to display the system configuration interface 101. While the system configuration interface 101 is displayed, the user selects the operation of the first mode on the system configuration interface 101.
[0126] Scenario 3: When the laptop is powered by a built-in battery, the first mode is enabled.
[0127] Scenario 4: When the laptop computer is plugged in, that is, connected to an external power source, it is detected that the external power source is disconnected, that is, the external power source stops supplying power, and the first mode is enabled.
[0128] In some embodiments, the notebook computer is pre-configured with first operating parameters (also referred to as first performance parameters) corresponding to the first mode.
[0129] Exemplarily, the first operating parameter includes a first upper limit value of the target power, such as the first upper limit value may be the third power value or the first power value in the aforementioned embodiment. Among them, the target power may be CPU power and / or GPU power. When operating according to the first operating parameter, the laptop computer may schedule various types of system resources, such as CPU resources, GPU resources, and storage resources, while 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 enabled CPU main frequency, the enabled CPU power, the enabled GPU main frequency, and the enabled GPU power, etc., that is, the first operating parameter may directly affect the upper limit of the performance that the laptop computer can release in the first mode.
[0130] In some embodiments, in the first mode, the laptop computer can control the operating state of each hardware according to the first operating parameter, so that the laptop computer can release the required operating performance according to the actual situation under the constraint of the first operating parameter. For example, the first operating parameter is the first upper limit value of the target power. If the target power is the CPU power, the number of cores enabled in the CPU is scheduled and the CPU main frequency is determined with the CPU power not exceeding the first upper limit value as a constraint. If the target power is the GPU power, the GPU main frequency is determined with the GPU power not exceeding the first upper limit value as a constraint.
[0131] As another example, the first operating parameter includes: 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. Of course, the number of available CPU cores in the first operating parameter is less than the total number of cores of the laptop computer, the CPU main frequency in the first operating parameter is less than the maximum CPU main frequency actually available in the laptop computer, the CPU power corresponding to the first operating parameter is less than the actual maximum CPU power of the laptop computer, the GPU main frequency corresponding to the first operating parameter is less than the actual maximum GPU main frequency available in the laptop computer, and the GPU power in the first operating parameter is less than the actual maximum GPU power of the laptop computer. That is, the first operating parameter can directly affect the upper limit of the performance that can be released by the laptop computer in the first mode.
[0132] In other embodiments, in the first mode, the laptop computer can control the operating state of each hardware according to the first operating parameter, so that the performance released by the laptop computer can reach the performance upper limit corresponding to the first mode. For example, according to the first operating parameter, the number of cores enabled in the CPU, the power, and the main frequency are adjusted, and according to the first operating parameter, the main frequency and power of the GPU are adjusted.
[0133] For example, in the case where the required performance is not high, such as when the laptop only displays the desktop, in the first mode, the laptop releases the performance required to display the desktop. The released performance may be less than the performance upper limit corresponding to the first mode.
[0134] For example, the first operating parameter indicates that a maximum of N CPU cores can be enabled, where N is an integer greater than 1. In this case, when the desktop is displayed, the laptop can only enable one CPU core. In this example, the number of enabled cores is less than the N cores corresponding to the first operating parameter, that is, in the first mode, there are still idle cores among the available cores, that is, the performance released by the laptop is less than the performance upper limit corresponding to the first mode. Similarly, the released performance is less than the performance upper limit of the first mode can also be reflected in other aspects, such as the CPU main frequency is lower than the CPU main frequency indicated by the first operating parameter, the CPU power is less than the CPU power indicated by the first operating parameter, etc., which will not be repeated here.
[0135] As another example, in the case where high performance is required, such as when a laptop computer runs a live game, in the first mode, the performance released by the laptop computer can be equal to the performance upper limit corresponding to the first mode.
[0136] For example, the first operating parameter indicates that a maximum of N CPU cores can be enabled, where N is an integer greater than 1. In this case, when the laptop is running a live game, N CPU cores can be enabled at the same time. In this example, the number of enabled cores is equal to the N cores corresponding to the first operating parameter, that is, the performance released by the laptop is equal to the performance upper limit corresponding to the first mode. Similarly, the released performance equal to the performance upper limit of the first mode can also be reflected in other aspects, such as the CPU main frequency is equal to the CPU main frequency indicated by the first operating parameter, the CPU power is equal to the CPU power indicated by the first operating parameter, etc., which will not be repeated here.
[0137] S102: During the activation of the first mode, the notebook computer recognizes that the second mode needs to be activated currently.
[0138] The second mode may also be one of the operation modes of the notebook computer. When the notebook computer is running in the second mode, the maximum performance that can be released is equal to the performance upper limit of the notebook computer. That is, the second mode may be the high-energy mode mentioned in the above embodiment.
[0139] In some examples, the laptop computer may determine that the second mode needs to be enabled in any of the following scenarios:
[0140] Scenario 5: In response to the user's instruction to switch to enable the second mode, it is determined that the second mode needs to be enabled. The user's instruction to switch to enable the second mode may be: by pressing a shortcut key, instructing the laptop to display the system configuration interface. While the system configuration interface is displayed, the user selects the second mode operation on the system configuration interface.
[0141] Scenario 6: When the laptop computer is not connected to an external power source, that is, powered by a built-in battery, the laptop computer detects that an external power source is connected, that is, after the laptop computer starts to be powered by the external power source, it is determined that the second mode needs to be enabled.
[0142] Scenario 7: When the laptop detects a specific usage scenario (e.g., the laptop runs a specific program, or the program is in a specific running stage), it determines that the second mode needs to be enabled. The implementation method of detecting the specific usage scenario can be described in detail in subsequent embodiments and will not be described here.
[0143] In addition, the notebook computer is also pre-configured with second operating parameters (also called second performance parameters) corresponding to the second mode.
[0144] Exemplarily, the second operating parameter includes a second upper limit value of the target power, such as the second upper limit value may be the second power value in the aforementioned embodiment, that is, the maximum power that the laptop can reach under the best heat dissipation effect. Wherein, when operating according to the second operating parameter, the laptop can schedule various system resources, such as CPU resources, GPU resources, and storage resources, without the target power exceeding the second upper limit value. In other words, the second operating parameter may limit the number of CPU cores, the enabled CPU main frequency, the enabled CPU power, the enabled GPU main frequency, and the enabled GPU power, etc., that is, the second operating parameter may directly affect the upper limit of the performance that the laptop can release in the second mode.
[0145] In some embodiments, in the second mode, the laptop computer can control the operating state of each hardware according to the second operating parameter, so that the laptop computer can release the required performance for operation according to the actual situation under the constraint of the second operating parameter. For example, the second operating parameter is the second upper limit value of the target power. If the target power is the CPU power, the CPU power is constrained not to exceed the second upper limit value to schedule the number of cores enabled in the CPU, determine the CPU main frequency, etc. If the target power is the GPU power, the GPU power is constrained not to exceed the second upper limit value to determine the GPU main frequency. When the second upper limit value includes an upper limit value for the GPU power and an upper limit value for the CPU power, the number of CPU cores enabled, the CPU main frequency, and the GPU main frequency are determined with the CPU power not exceeding the corresponding upper limit value and the GPU power not exceeding the corresponding upper limit value as constraints.
[0146] In addition, the second upper limit value is greater than the first upper limit value. In addition, the second operating parameter can directly affect the upper limit of performance that can be released by the notebook computer in the second mode. At the same time, the upper limit of performance corresponding to the second mode is the same as the upper limit of performance of the notebook computer.
[0147] Also exemplarily, the parameter types of the second operating parameter include 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. Of course, the number of available CPU cores corresponding to the second operating parameter is equal to the total number of cores of the laptop computer, the CPU main frequency corresponding to the second operating parameter is equal to the maximum CPU main frequency actually available to the laptop computer, the CPU power corresponding to the second operating parameter is equal to the actual maximum CPU power of the laptop computer, the GPU main frequency corresponding to the second operating parameter is equal to the maximum GPU main frequency actually available to the laptop computer, and the GPU power corresponding to the second operating parameter is equal to the actual maximum GPU power of the laptop computer. That is, each value in the above-mentioned second operating parameter is greater than the first operating parameter. In addition, the above-mentioned second operating parameter can directly affect the performance upper limit that the laptop computer can release in the second mode. At the same time, the performance upper limit corresponding to the second mode is the same as the performance upper limit of the laptop computer.
[0148] In this way, when the notebook computer actually enables the second mode, the operation of each hardware can be controlled according to the second performance parameter of the second mode, so that the notebook computer operates according to the second mode.
[0149] S103, the notebook computer activates the first mode and the second mode alternately according to a preset rule.
[0150] The above-mentioned preset rule may also be referred to as a heartbeat control strategy, which is used to control the activation period of the first mode and the second mode, so that the notebook computer can activate the first mode and the second mode alternately.
[0151] In some embodiments, the heartbeat control strategy may include: after determining that the second mode needs to be enabled, first switch to enable the second mode, that is, the operation mode of the laptop computer is switched from the first mode to the second mode. After switching to enable the second mode, the laptop computer controls the operation state of each hardware according to the second operation parameter corresponding to the second mode, so that the performance released by the laptop computer can reach the performance upper limit corresponding to the second mode. The specific implementation principle can be referred to the aforementioned embodiment, which will not be repeated here.
[0152] In other embodiments, after switching to enable the second mode, the laptop computer can also control the operating status of each hardware according to the second operating parameters corresponding to the second mode, so that the laptop computer can release the required operating performance according to actual conditions under the constraints of the second operating parameters.
[0153] After running in the second mode for a period of time, the laptop switches to enable the first mode according to the heartbeat control strategy. The process of enabling the first mode can refer to S101, which is not repeated here. Similarly, after running in the first mode for a period of time, the second mode is switched again, and so on.
[0154] In some examples, in different usage scenarios, the number of alternations between the above-mentioned first mode and the second mode may be different. In addition, in the process of alternating between the first mode and the second mode, the duration of a single operation of the first mode and the duration of a single operation of the second mode may also be determined according to the battery power. For details, please refer to the description in the subsequent embodiments. Of course, the duration of a single operation of the first mode may be different from the duration of a single operation of the second mode. In addition, there may also be differences in the duration of enabling the first mode at different times. There may also be differences in the duration of enabling the second mode at different times. That is, in the embodiments of the present application, no specific limitation is made on the duration of running the first mode, nor is there a specific limitation on the duration of running the second mode.
[0155] In the scenario where both the first operating parameter and the second operating parameter are upper limits of the target power, if the laptop is used in scenarios that require high CPU performance, such as running simulation programs, or running design programs, or loading large text data in office programs, the target power can be the CPU power. In this way, during the alternating activation of the first mode and the second mode, the CPU power performance of the laptop can be as follows: Figure 5 As shown: when the second mode is enabled, the CPU power of the laptop is PL2, and in time period t1, the CPU power of the laptop is maintained at PL2. Afterwards, the second mode alternates with the first mode. That is, in time period t2 after time period t1, the laptop switches to enable the first mode, so that in time period t2, the CPU power of the laptop is PL1. Among them, PL2 is greater than PL1. Afterwards, the first mode and the second mode can be alternated again, that is, in time period t3 after time period t2, the laptop switches to enable the second mode, so that in time period t3, the CPU power of the laptop is PL2, and so on.
[0156] In the above embodiment, while switching to enable the second mode, the laptop computer can also adjust the working state of the heat dissipation device. Exemplarily, after switching from the first mode to enable the second mode, the laptop computer can increase the speed of the heat dissipation fan, for example, increase the speed of the heat dissipation fan of the electronic device from the first speed to the second speed, wherein the second speed is greater than the first speed. The heat dissipation fan is used to quickly take away the heat caused by the increase in power. Exemplarily again, after switching from the second mode to the first mode, the speed of the heat dissipation fan is restored. For example, the speed of the heat dissipation fan of the electronic device is restored to the first speed.
[0157] In addition, in the scenario where both the first operating parameter and the second operating parameter are upper limits of the target power, if the laptop is used in a scenario that requires high GPU performance, such as running a game application, running a live application, or playing a video application, the target power may be the GPU power. In this way, during the period of alternately enabling the first mode and the second mode, the performance of the GPU power of the laptop is similar to that of the GPU. Figure 5 Similar, no further elaboration is required here.
[0158] In other possible embodiments, during the period of alternately enabling the first mode and the second mode, the performance of the CPU main frequency, the number of enabled CPU cores, and the GPU main frequency, etc., is also the same as Figure 5 Similar, no further elaboration is required here.
[0159] In other embodiments, after S102, if it is determined that the usage scenario is to enable the first type of program, after it is determined that the second mode needs to be enabled, the second mode can be directly enabled to run, without the need to alternately enable the first mode and the second mode according to the heartbeat control strategy. That is, the process does not execute S103. Among them, the above-mentioned first type of program can be a program that has high performance requirements for the laptop computer, for example, the first type of program can include game programs, live programs, etc.
[0160] In summary, in an embodiment of the present application, the laptop computer can intelligently switch between the first mode and the second mode, taking into account the performance and energy consumption released by the laptop computer. In addition, when the laptop computer is not connected to an external power supply, the laptop computer can use the short-time discharge effect of the built-in battery to support the laptop computer to periodically switch and enable the second mode. In the absence of an external power supply, the device life can be increased compared to directly switching to enable the second mode. In the case of an external power supply, energy consumption can be reduced compared to directly switching to enable the second mode. In this way, whether the user instructs to switch to enable the second mode, or the actual usage scenario requires the second mode to be enabled, it can improve the device life or reduce energy consumption while meeting the user's requirements for device performance.
[0161] In addition, the above method is also applicable to switching from energy-saving mode to normal mode. For example, according to the pre-configured rules, the current power of the laptop only supports the activation of energy-saving mode. If the laptop responds to the user's operation and determines that the normal mode needs to be activated, the above method can also be used, that is, the heartbeat control strategy is used to alternately activate the normal mode and the energy-saving mode.
[0162] In some embodiments, the laptop computer may also be operated alternately according to the second performance parameter and the first performance parameter corresponding to the second mode in the first condition. The first condition includes the laptop computer running the first application (e.g., a specific program). The first application may be a program data that has high requirements for device performance. For example, the first application may be a game application, a live application, a simulation application, and a design application. In other words, the first application is an application that occupies a large amount of system resources (especially, CPU resources and GPU resources) during operation. For example, the number of CPU cores required to be called by the first application is greater than the preset number, the required CPU main frequency is greater than the first frequency, and the required GPU main frequency is greater than the second frequency. For example, the storage resources occupied are large, and the data read and write speed in the occupied storage resources is greater than the first speed. It can also be said that the system resources occupied by the first application during operation meet the preset conditions. In addition, the preset number, the first frequency, and the second frequency can all be empirical values determined by testing, and this application does not make specific restrictions on this.
[0163] In addition, the first condition further includes detecting an operation of a user instructing to enable the second mode.
[0164] In some embodiments, Figure 6 As shown, the above method may further include the following steps:
[0165] S201, the notebook computer starts running in the second mode.
[0166] In some embodiments, the above S201 may be that the notebook computer enables the second operating mode in the following scenario:
[0167] Scenario a: The laptop is connected to an external power source, and a program that requires high performance, such as a game program, is enabled. Alternatively, the laptop is connected to an external power source.
[0168] Scenario b: The laptop computer responds to user operation and enables the second mode.
[0169] Scenario c: the second mode is enabled in S103.
[0170] In some embodiments, the laptop computer can control the working state of each hardware according to the second operating parameter, so that the laptop computer operates in the second mode. The specific implementation details can be referred to S101 in the above embodiment, which will not be repeated here. The difference between the two is that the enabled operating parameters are different. In addition, when the laptop computer is connected to an external power supply, the second mode can be enabled.
[0171] S202: During activation of the second mode, the notebook computer recognizes that the first mode needs to be activated currently.
[0172] In some embodiments, when the laptop computer detects that it is disconnected from the external power source, that is, when the laptop computer cannot be powered by the external power source, the laptop computer may recognize that the first mode needs to be enabled currently.
[0173] In an exemplary scenario, the laptop computer is plugged in (powered by an external power source) and runs a game program. During this period, the laptop computer can enable the second mode to run. When running in the second mode, if the laptop computer detects that it is disconnected from the external power source, it can be determined that the current power is insufficient to support the second mode for a long time. In this way, the laptop computer recognizes that the first mode needs to be enabled at present.
[0174] In some other embodiments, the laptop computer may also recognize that the first mode needs to be enabled currently in response to a user instruction to switch to enable the first mode.
[0175] In other embodiments, the laptop computer may also determine that the first mode needs to be enabled according to a heartbeat control strategy.
[0176] S203, the notebook computer switches from the second mode to the first mode in a step-down manner.
[0177] In some embodiments, the laptop computer may determine at least one set of third operating parameters between the first operating parameters and the second operating parameters.
[0178] Exemplarily, 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 CPU power, the first upper limit value is 35w, and the second upper limit value is 65w, then the determined third upper limit value may be 50w. In addition, the same is true for the scenario where the target power is GPU power, which will not be described in detail here.
[0179] Also illustratively, the third operating parameter may correspond to the number of available CPU cores, an enabled CPU main frequency, an enabled CPU power, an enabled GPU main frequency, and an enabled GPU power.
[0180] It can be understood that the values of each item of the third operating parameter are 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 is greater than the number of available CPU cores in the first operating parameter. The CPU main frequency in the third operating parameter is less than the CPU main frequency in the second operating parameter, and is greater than the CPU main frequency in the first operating parameter. The CPU power in the third operating parameter is less than the CPU power in the second operating parameter, and is greater than the CPU power in the first operating parameter. The GPU main frequency in the third operating parameter is less than the GPU main frequency in the second operating parameter, and is greater than the GPU main 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 is greater than the GPU power in the first operating parameter.
[0181] In some embodiments, when there is only one set of third operating parameters, the third operating parameters may be referred to as third performance parameters. When there are multiple sets of third operating parameters, the multiple sets of third operating parameters include third performance parameters and fourth performance parameters. Each value of the third performance parameter is greater than the fourth performance parameter, but each value of the third performance parameter is less than the second performance parameter. Each value of the fourth performance parameter is greater than the first performance parameter.
[0182] In some embodiments, before S203, the laptop computer controls the operating state of each hardware according to the second operating parameter. In S203, before the laptop computer switches to enable the first operating parameter, the operating state of each hardware is adjusted according to the third operating parameter. When the third operating parameter is the third upper limit value, the number of enabled CPU cores, CPU main frequency, GPU main frequency or GPU power is adjusted with the target power not exceeding the third upper limit value as a constraint condition.
[0183] Of course, when the third operating parameter corresponds 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, etc., the number of enabled cores, power, and main frequency in the CPU can be adjusted according to the third operating parameter, or the main frequency and power of the GPU can be adjusted.
[0184] That is, in S203, after the notebook computer runs according to the third operating parameter for a certain period of time, it runs according to the first operating parameter corresponding to the first mode, that is, the operating state of each hardware can be adjusted according to the first operating parameter. In this way, the notebook computer can be buffered in the process of switching from the second mode to the first mode, that is, the user will not feel a cliff-like drop in performance when using the notebook computer.
[0185] In some embodiments, the laptop computer may also determine multiple sets of third operating parameters between the first operating parameters and the second operating parameters. After the laptop computer controls the operating state of each hardware according to each set of third operating parameters, the maximum performance that can be released may be referred to as the performance corresponding to the third operating parameter.
[0186] In the case of having multiple sets of third operating parameters, each set of third operating parameters is used in turn in descending order according to the performance corresponding to each set of third operating parameters to control the operating state of each hardware. For example, first control the laptop to run for a period of time according to the third operating parameter with the highest performance. Then, control the laptop to run for a period of time according to the third operating parameter with the second highest performance, and so on. In this way, the performance of the laptop in each period is lower than that in the previous period, but the performance decline between two adjacent periods is not large. After the laptop has run for a period of time according to all the third operating parameters, the laptop is controlled to run according to the first operating parameters corresponding to the first mode.
[0187] In this way, when the laptop computer switches from the second mode to the first mode, the performance released by the laptop computer will gradually decrease, and the user will not feel the cliff-like drop in the performance of the laptop computer, thereby improving the user's usage experience.
[0188] In addition, in the process of switching from the second mode to the first mode in a step-down manner, the overall power consumption (TGP) of the graphics system of the GPU of the notebook computer is as follows: Figure 7 As shown: three sets of third operating parameters are configured in the laptop computer. Among the three sets of third operating parameters, the corresponding TGP power values are power value 1, power value 2, and power value 3, respectively. In this way, after determining that the second mode needs to be switched to the first mode, the TGP of the GPU of the laptop computer, in the time period t4, the TGP of the laptop computer remains at power value 1. In the time period t5 after the time period t4, the TGP of the laptop computer remains at power value 2, that is, the performance of the laptop computer remains stable in the time period t5 after a small drop. In the time period t6 after the time period 5, the TGP of the laptop computer remains at power value 3, that is, the performance of the laptop computer remains stable in the time period t6 after a small drop. Finally, after the time period t6, the TGP of the laptop computer remains at power value 4, which can be the power corresponding to the GPU in the first mode. It can be seen that after the time period 6, the switch to the first mode is completed. Before switching to the first mode, the performance of the laptop computer gradually and steadily decreases, which improves the user's adaptability to the performance decline.
[0189] In addition, during the process of switching from the second mode to the first mode, the performance of the laptop's CPU main frequency, the number of enabled CPU cores, the CPU power, and the GPU main frequency is the same as Figure 7 Similar, no further elaboration is required here.
[0190] In some embodiments, during the process of switching from the second mode to the first mode, if the notebook computer detects that an external power source is connected again, or receives an operation instructing the user to enable the second mode, the notebook computer can directly resume the operation in the second mode. That is, the TGP performance of the GPU of the notebook computer, such as Figure 8 As shown in the figure: when the second mode is enabled, the TGP of the GPU of the laptop computer is maintained at power value 1 in period t4. In period t5 after period 4, the TGP of the laptop computer is maintained at power value 2, that is, the performance of the laptop computer remains stable in period t5 after a small drop. Afterwards, if it is detected that the laptop computer is connected to an external power source again, or if an operation is received by the user indicating to enable the second mode again, the laptop computer directly switches to enable the second mode again, so that the TGP of the laptop computer can be immediately restored to power value 5.
[0191] In short, when the current power of the laptop is insufficient to support the long-term operation of the second mode, the laptop can trigger the switch from the second mode to the first mode. In the process of switching from the second mode to the first mode, the laptop can use the short-time discharge characteristics of the built-in battery to support the slow decline of the laptop performance, so that the laptop can slowly transition from the second mode to the first mode, avoiding the user from feeling a significant performance gap.
[0192] Of course, in a possible embodiment, when the laptop receives an operation instructing the user to enable the first mode, the second mode can be switched to the first mode in the same manner, and the embodiment of the present application is not limited to this.
[0193] In some embodiments, Figure 4 The method shown and Figure 6 The methods shown are two operating scenarios faced by a laptop computer during operation. In principle, there is no necessary order between the two. In some cases, for example, after the alternation between the first mode and the second mode ends, if the laptop detects that it is connected to an external power source, it can operate according to the second performance parameters corresponding to the second mode. Under the second condition, the third performance parameter is operated in a first time period (such as time period t4), the parameter type of the third performance parameter is the same as that of the first performance parameter, the value of the third performance parameter is greater than the value of the first performance parameter, and less than the value 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; after the first time period, the first performance parameter corresponding to the first mode is operated.
[0194] Of course, in the case of having the third performance parameter and the fourth performance parameter, the fourth performance parameter can also be used in the second period (eg, period t5) after the first period. After the second period, the first performance parameter corresponding to the first mode can be used.
[0195] In some embodiments, the notebook computer can also automatically control the switching of different operating modes in combination with actual usage scenarios. Fig. 9 As shown, the above method may include the following steps:
[0196] S301, the notebook computer starts running in the first mode.
[0197] In some embodiments, the implementation details of the above S301 may refer to S101 in the aforementioned embodiment, which will not be repeated here.
[0198] S302, the notebook computer identifies a current usage scenario.
[0199] The above usage scenario may be a laptop computer running a specific program.
[0200] In some embodiments, the laptop computer may be pre-configured with relevant information of a specific program. The relevant information may be the size of the corresponding program file, the program identifier, the service type description, etc. In this way, the laptop computer may obtain relevant information 1 corresponding to the running program through the event tracing for windows (ETW). When the obtained relevant information 1 matches the pre-configured relevant information, it is identified that the laptop computer is running a specific program.
[0201] For example, game programs, simulation programs, design programs, office programs, etc. in a laptop are specific programs. In this way, the laptop can be configured with relevant information of software programs such as game programs, simulation programs, design programs, office programs, etc. When the user instructs the laptop to run game program a, the laptop can detect one or more of the size, program identifier, service type description, etc. of game program a through ETW, and use the detected information as relevant information 1 of game program a.
[0202] When the relevant information 1 includes the volume size 1 of the game program a, if the difference between the volume size 1 and the volume size of any preconfigured specific program is less than a preset threshold, that is, the volume size of the game program a is close to the volume size of the preconfigured specific program, then it is determined that the currently running game program a belongs to a specific program. In this way, the laptop computer can recognize that the current usage scenario is running a specific program.
[0203] When the relevant information 1 includes the program identifier 1 of the game program a, if the program identifier 1 is the same as the program identifier of any preconfigured specific program, then it is determined that the currently running game program a belongs to the specific program. In this way, the laptop computer can recognize that the current usage scenario is running a specific program.
[0204] When the relevant information 1 includes a service type description 1 of a game program a (e.g., a multiplayer online tactical competitive game service), if the service type description 1 is the same as the service type description of any preconfigured specific program, then it is determined that the currently running game program a belongs to a specific program. In this way, the laptop computer can recognize that the current usage scenario is running a specific program.
[0205] In addition, the above usage scenario may be that the program is in a specific running stage.
[0206] In some embodiments, the notebook computer may pre-configure the operation stages corresponding to multiple programs (which may be the first application) and the identification events corresponding to different operation stages. For example, the game program corresponds to two stages, "before the game starts" and "after the game starts", where the identification event corresponding to "before the game starts" may be displaying the game lobby interface, displaying the game login interface, or displaying the game waiting interface, etc. The identification event corresponding to "after the game starts" may be displaying the real-time game screen, receiving the user's interactive operation, requesting a surge in the amount of resources occupied, etc. For another example, the office program corresponds to multiple stages such as "opening a document" and "browsing a document", where the identification event corresponding to "opening a document" may be receiving the user's selection operation for a specified document. The identification event corresponding to "browsing a document" may be receiving the user's instruction to slide and browse.
[0207] In some embodiments, an identification event that can trigger the alternating activation of the first mode and the second mode can be referred to as a first event. For different first applications, the corresponding first events may be different. For example, when the first application is a document editing application, the first event is opening a first type of file, and the first type of file is a file with a volume greater than a preset value; when the first application is a simulation application, the first event is receiving an operation to start the simulation. The first events corresponding to different first applications can be set by the user based on actual experience, and the embodiments of the present application do not specifically limit this.
[0208] In this way, during the operation of the laptop, identification events can be detected through ETW, and then the current usage scenario of the laptop can be determined based on the detected identification events. For example, identification event a pre-configured in the laptop can indicate the running stage a corresponding to program a. When the laptop actually detects identification event a, the laptop can determine that the current usage scenario is: program a is running in stage a.
[0209] S303: When the usage scenario indicates that the second mode needs to be enabled, a heartbeat control strategy matching the usage scenario is adopted to alternately enable the first mode and the second mode.
[0210] In some embodiments, multiple types of usage scenarios 1 may be pre-configured in the laptop computer, and the usage scenario 1 is a scenario where the second mode needs to be enabled. Exemplarily, the usage scenario 1 may include running a specific program, such as a game program or a simulation program. For another example, when some programs run to a specific running stage, it is a usage scenario where the second mode needs to be enabled.
[0211] In addition, in other embodiments, the laptop computer may be pre-configured with a heartbeat control strategy corresponding to each type of usage scenario 1. It is understandable that the heartbeat control strategy may be configured according to the scene characteristics of the usage scenario 1. The heartbeat control strategy may specify the number of switching times between the first mode and the second mode. Alternatively, the heartbeat control strategy may specify the start and end time points for enabling the heartbeat control strategy.
[0212] For example, in the scenario of running a file browsing program, the scenario characteristics may be: in the process of opening a large-volume document, the performance requirements for the laptop are high. After the document is opened, the performance requirements for the laptop are not high during the period of actually displaying the document content. In addition, the time taken to open a document is usually short. In combination with the above-mentioned scenario characteristics, the corresponding heartbeat control strategy (such as heartbeat control strategy 1) can instruct the laptop to switch to the first mode after enabling the second mode. After switching to the first mode, the alternation between the first mode and the second mode ends, that is, the heartbeat control strategy 1 stipulates that the number of alternations between the first mode and the second mode is small, such as the number of alternations is 1.
[0213] Thus, when the laptop is controlled according to the heartbeat control strategy 1, the CPU power performance of the laptop is as follows: Fig.10 As shown: when the second mode is enabled, the CPU power of the laptop is PL2, and in period t7, the power of the laptop remains at PL2. After period t7, the laptop switches to enable the first mode, and the CPU power of the laptop also remains at PL1.
[0214] For another example, in the scenario of running a design program, the scenario characteristics may be: during the entire operation of the design program, the performance requirements for the laptop are high. In combination with the above-mentioned scenario characteristics, the corresponding heartbeat control strategy may instruct the laptop to continuously and alternately enable the first mode and the second mode until the design program stops running. In this way, the heartbeat control strategy may specify that the starting time point for enabling the heartbeat control strategy is the moment when it is determined that the second mode needs to be enabled, and the end time point is the moment when the design program stops running or the moment when the external power supply is detected to be connected.
[0215] For another example, the game program runs in the "before game starts" scenario, and the scenario characteristics may be: after the game program runs and before the game is officially started, such as during the display of the game login interface or the display of the game lobby interface, although the performance requirements for the laptop are high, the occasional performance drop of the laptop will not affect the user experience at this stage. In combination with the above-mentioned scenario characteristics, the corresponding heartbeat control strategy can instruct the laptop to continuously and alternately enable the first mode and the second mode until the scenario ends, such as the game program enters the "after game starts" stage, or the game program ends running. In this way, the heartbeat control strategy can specify that the starting time point for enabling the heartbeat control strategy is the moment when it is determined that the second mode needs to be enabled, and the end time point is the moment when the game program stops running or the moment when the external power supply is detected to be connected.
[0216] For another example, the game program is running in the "after the game is started" scenario. The scenario characteristics may be: after the game is started, the performance requirements of the laptop are high, and the performance drops for a short time, and the game will also drop frames and freeze, which directly affects the user experience at this stage. Combined with the above scenario characteristics, the heartbeat control strategy is not enabled, and the laptop needs to enable the second mode for a long time.
[0217] That is, for the game program, in some embodiments, after the program is run, the heartbeat control strategy can be adopted in the stage of "before the game is started". In the stage of "after the game is started", the heartbeat control strategy is not adopted, and the state of enabling the second mode is maintained.
[0218] Of course, in other embodiments, for game programs, after the programs are running, the heartbeat control strategy may not be enabled, giving priority to satisfying the user's performance requirements for the laptop computer.
[0219] In some other embodiments, the above-mentioned heartbeat control strategy may further specify the duration of a single activation of the first mode (activation duration 1) and the duration of a single activation of the second mode (activation duration 2).
[0220] It can be understood that both the activation duration 1 and the activation duration 2 are associated with the remaining power (or short-time discharge capability) of the laptop computer. That is, under different remaining power, the corresponding activation duration 1 may be different, the corresponding activation duration 2 may also be different, and the number of alternations between the first mode and the second mode may also be different.
[0221] In some examples, the optimal enabling duration 1 and enabling duration 2 can be determined by testing under different remaining power (or short-time discharge capacity). The optimal enabling duration 1 and enabling duration 2 can coordinate the performance requirements of the usage scenario and the battery life of the laptop under different remaining power (or short-time discharge capacity).
[0222] Of course, the activation duration 1 and the activation duration 2 may also be related to the first application being run. That is, when different first applications are enabled, the corresponding activation duration 1 may be different, the corresponding activation duration 2 may also be different, and the number of alternations between the first mode and the second mode may also be different.
[0223] In some embodiments, the optimal activation duration 1 and activation duration 2 can also be determined by testing in combination with the scenario characteristics of the usage scenario. Of course, the activation duration 1 for each activation of the first mode and the activation duration 2 for each activation of the second mode can also be determined in different usage scenarios by testing. For example, in some usage scenarios, the activation duration 1 for different activations of the first mode can be different, and the activation duration 2 for different activations of the second mode can be different. For another example, in other usage scenarios, the activation duration 1 for different activations of the first mode can be the same, and the activation duration 2 for different activations of the second mode can be the same.
[0224] It can be seen that the heartbeat control strategies corresponding to different usage scenarios 1 may be different, and of course, they may also be the same. The embodiments of the present application do not make specific limitations on this.
[0225] In some embodiments, after the laptop computer identifies the current usage scenario, if the current usage scenario belongs to the pre-configured usage scenario 1, the first mode and the second mode are alternately enabled according to the matching heartbeat control strategy. Since the heartbeat control strategy can match the scene characteristics of the corresponding usage scenario 1, it can be ensured that in various usage scenarios 1, the corresponding heartbeat control strategy can well coordinate the requirements of battery life and performance of the usage scenario.
[0226] In addition, after the notebook computer switches between the first mode and the second mode according to the heartbeat control strategy, such as after S103 and S303, the alternating switching between the first mode and the second mode can be terminated in the following cases:
[0227] 1. The end time point indicated by the heartbeat control policy is reached. For example, the number of alternations between the first mode and the second mode has reached the number indicated in the heartbeat control policy. For another example, the activation time of the heartbeat control policy has reached the pre-configured maximum time. For another example, the time point when a specific program stops running. For another example, the time point when a specific usage scenario no longer exists.
[0228] 2. The laptop detects that an external power source is connected.
[0229] 3. Receive a user instruction to close the operation of alternately enabling the first mode and the second mode.
[0230] After the alternating activation of the first mode and the second mode ends, the notebook computer can select the running mode according to the preset strategy. For example, if an external power supply is currently connected, the second mode is directly enabled. For example, if an external power supply is not currently connected, the first mode is directly enabled. For example, when the alternation ends, the first mode is enabled, and the first mode continues to be enabled; when the alternation ends, the second mode is enabled, and the second mode continues to be enabled.
[0231] In some embodiments, Fig.11 As shown, the above method may include the following steps:
[0232] S401, the notebook computer starts running in the second mode.
[0233] In some embodiments, the implementation details of the above S401 can refer to S201 in the aforementioned embodiment, which will not be repeated here.
[0234] S402, the notebook computer identifies a current usage scenario.
[0235] In some embodiments, the implementation details of the above S402 may refer to S302 in the aforementioned embodiment, which will not be repeated here.
[0236] S403, the laptop computer switches from the second mode to the first mode in a step-down manner according to the current usage scenario.
[0237] In some embodiments, the laptop is pre-configured with a plurality of usage scenarios 1 and a step-down method corresponding to the usage scenario 1. The step-down method may specify the number of third operating parameters and the duration of each operation according to the third operating parameters.
[0238] In some embodiments, the step-down methods corresponding to different usage scenarios 1 may be different, or of course, they may be the same, and this application does not make any specific limitations on this.
[0239] In other embodiments, the same usage scenario 1 may also correspond to multiple step-down modes, each of which corresponds to the remaining power (or short-time discharge capacity) of a built-in battery.
[0240] In this way, after the laptop computer identifies the current usage scenario, if the current usage scenario belongs to the pre-configured usage scenario 1, it determines a matching step-down method in combination with the remaining power (or short-time discharge capacity) of the current built-in battery. Then, according to the matching step-down method, the first operating parameter corresponding to the first mode is enabled and the second operating parameter corresponding to the second mode is enabled.
[0241] As a way to achieve this, Fig.12 As shown, the laptop computer may include an application layer, a middleware layer, an operating system (OS) layer, and a hardware layer.
[0242] Exemplarily, the application layer may include a scenario recognition module, which may distinguish different usage scenarios by calling ETW, such as a scenario of running a game program, a scenario of running a design program, a scenario of running a simulation program, and a scenario of running an office program.
[0243] As another example, the middleware layer includes a performance mode monitoring module, a CPU performance scheduling module, and a GPU performance scheduling module. Among them, the performance mode monitoring module monitors whether the second mode needs to be enabled when the laptop enables the first mode. When it is determined that the second mode needs to be enabled, the scene recognition module identifies the current usage scenario. Then, the performance mode monitoring module determines the matching heartbeat control strategy based on the usage scenario.
[0244] The CPU performance scheduling module and the GPU performance scheduling module can adjust the working status of the CPU, GPU, heat dissipation device, and built-in battery through the OS layer according to the heartbeat control strategy to adjust the performance of the laptop computer.
[0245] Also exemplarily, 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.
[0246] Among them, the CPU management policy module can directly drive the CPU and adjust the working state of the CPU, such as adjusting the main frequency, the number of enabled cores, power, etc.
[0247] The GPU management strategy module can directly drive the GPU and adjust the working status of the GPU, such as adjusting the main frequency, TGP, etc.
[0248] The battery management strategy module can detect whether the laptop is connected to an external power supply, and can also detect the remaining power and short-time discharge capability of the built-in battery. It can also instruct the built-in battery to start short-time discharge to supply the power required for the laptop to operate.
[0249] The heat dissipation control module can directly drive the heat dissipation device (eg, a heat dissipation fan) and adjust the working state of the heat dissipation device.
[0250] In this way, each software module of the notebook computer can implement the method provided by the aforementioned embodiment.
[0251] Exemplarily, the above S101, S201, S301 and S401 can be implemented by the CPU performance scheduling module calling the CPU management policy module, the battery management policy module and the heat dissipation control module to drive the corresponding hardware. Of course, the above S101, S201, S301 and S401 can also be implemented by the GPU performance scheduling module calling the GPU management policy module, the battery management policy module and the heat dissipation control module to drive the corresponding hardware.
[0252] Also illustratively, the above S102, S202, S302 and S402 may be collaboratively executed by the scene recognition module and the performance mode monitoring module.
[0253] As another example, the above S103, S203, S303 and S403 can be implemented by the CPU performance scheduling module calling the CPU management strategy module, the battery management strategy module and the heat dissipation control module to drive the corresponding hardware. Of course, the above S103, S203, S303 and S403 can also be implemented by the GPU performance scheduling module calling the GPU management strategy module, the battery management strategy module and the heat dissipation control module to drive the corresponding hardware.
[0254] For example, according to the heartbeat control strategy, the CPU performance scheduling module can adjust the working state 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-term discharge while periodically improving the CPU output performance, so as to provide the power required for the notebook computer to run, and remove the heat caused by the CPU performance improvement through the heat dissipation device. For another example, according to the heartbeat control strategy, the GPU performance scheduling module can adjust the working state of the GPU, the heat dissipation device and the built-in battery through the GPU management strategy module, the battery management strategy module and the heat dissipation control module, and control the built-in battery to start short-term discharge while periodically improving the GPU output performance, so as to provide the power required for the notebook computer to run, and remove the heat caused by the GPU performance improvement through the heat dissipation device.
[0255] The embodiment of the present application also provides an electronic device, which may include: a memory and one or more processors. The memory is coupled to the processor. The memory is used to store computer program code, and the computer program code includes computer instructions. When the processor executes the computer instructions, the electronic device can execute the various steps executed by the mobile phone in the above embodiment. Of course, the electronic device includes but is not limited to the above memory and one or more processors.
[0256] In some embodiments, through the description of the above implementation methods, technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. The specific working process of the system, device and unit described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0257] Each functional unit in each embodiment of the present application can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of software functional units.
[0258] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can 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 each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as flash memory, mobile hard disk, read-only memory, random access memory, disk or optical disk.
[0259] The above is only a specific implementation of the embodiment of the present application, but the protection scope of the embodiment of the present application is not limited thereto, and any changes or replacements within the technical scope disclosed in the embodiment of the present application should be included in the protection scope of the embodiment of the present application. Therefore, the protection scope of the embodiment of the present application should be based on the protection scope of the claims.
Claims
1. A device control method, characterized in that: Applied to electronic equipment, the method comprises: After the electronic device is connected to the external power supply, the electronic device operates according to the second performance parameter corresponding to the second mode; During operation according to the second performance parameter corresponding to the second mode, if it is detected that the electronic device is disconnected from the external power supply and the electronic device is running an application, switching to operation for the first period according to the third performance parameter, the value of the third performance parameter is less than the value of the second performance parameter, and greater than the value of the first performance parameter corresponding to the first mode; After the first period of time, operating according to the first performance parameter corresponding to the first mode; Among them, the parameter type of the second performance parameter includes one or more of the central processing unit power, the overall power consumption of the graphics system, the number of enabled central processing unit cores, the central processing unit main frequency and the graphics processor main frequency, and the first performance parameter and the third performance parameter are of the same parameter type as the second performance parameter.
2. The method according to claim 1, characterized in that The application being run is a first application, wherein during the running of the first application, the amount of system resources required by the first application meets a preset condition, the system resources include central processing unit resources and graphics processing unit resources, and the preset condition includes one or more of the number of central processing unit cores required to be enabled being greater than a preset number, the main frequency of the central processing unit required to be enabled being greater than a first frequency, and the main frequency of the graphics processing unit required to be enabled being greater than a second frequency.
3. The method according to claim 1, characterized in that Before operating according to the first performance parameter corresponding to the first mode, the method further includes: After the first period, switching to the fourth performance parameter to run for a second period; The fourth performance parameter and the first performance parameter have the same parameter type, and the value of the fourth performance parameter is greater than the value of the first performance parameter and less than the value of the third performance parameter.
4. The method according to any one of claims 1 to 3, characterized in that: When the remaining power of the electronic device is different or the running application is different, the switching to the third performance parameter for the first period of time includes at least one of the following differences: The actual length of the first period of operation is different; The value of the third performance parameter in actual configuration is different.
5. The method according to claim 3, characterized in that: When the remaining power of the electronic device is different or the running application is different, the switching to the fourth performance parameter for the second period of time includes at least one of the following differences: The actual length of the second period of operation is different; The value of the fourth performance parameter in actual configuration is different.
6. The method according to claim 1, characterized in that In the case where the running application is a document editing application, before switching to the third performance parameter to run for the first period of time, the method further includes: detecting that the running application opens a first type of file, the first type of file being a file with a volume greater than a preset value; In the case that the application being run is a simulation application, before switching to the third performance parameter to run for the first period of time, the method further includes: receiving an operation to start the simulation.
7. The method according to claim 1, characterized in that After operating according to the first performance parameter corresponding to the first mode, the method further includes: When it is detected that the electronic device is restored to be connected to the external power supply, operating according to the second performance parameter; During the operation according to the second performance parameter, if it is detected again that the electronic device is disconnected from the external power supply and the electronic device is running an application, switching to the operation according to the third performance parameter; During operation according to the third performance parameter, it is detected that the electronic device is connected to an external power source again, or an operation indicating by a user to enable the second mode is received, and the operation is switched to the second performance parameter.
8. The method according to claim 7, characterized in that After receiving an operation instructing the user to enable the second mode and switching to the second performance parameter operation, the method further includes: The first performance parameter and the second performance parameter are operated alternately in sequence.
9. The method according to claim 1, characterized in that: After operating according to the first performance parameter corresponding to the first mode, the method further includes: Under the first condition, operating according to the second performance parameter and the first performance parameter alternately in sequence; The first condition includes one or more of the following conditions: Activate a first application, wherein during the operation of the first application, the system resources required to be occupied meet preset conditions, the system resources include central processing unit resources and graphics processing unit resources, and the preset conditions include one or more of the following: the number of central processing unit cores required to be activated is greater than a preset number, the main frequency of the central processing unit required to be activated is greater than a first frequency, and the main frequency of the graphics processing unit required to be activated is greater than a second frequency; An operation of a user indicating activation of the second mode is detected.
10. The method according to claim 9, characterized in that When the first condition is to enable the first application, before the first performance parameter corresponding to the second mode and the first performance parameter are alternately run in sequence, the method further includes: A first event is detected; Wherein, in the case where the first application is a document editing application, the first event is opening a first type of file, and the first type of file is a file whose volume is larger than a preset value; In the case where the first application is a simulation application, the first event is receiving an operation to start simulation.
11. The method according to claim 9, characterized in that During the period of alternating operation according to the second performance parameter and the first performance parameter, the method further comprises: When operating according to the second performance parameter, increasing the speed of the cooling fan of the electronic device from the first speed to the second speed; When operating according to the first performance parameter, the rotation speed of the cooling fan is restored to the first rotation speed.
12. An electronic device, characterized in that: The electronic device includes one or more processors and a memory; the memory is coupled to the processor, the memory is used to store computer program code, the computer program code includes computer instructions, and when the one or more processors execute the computer instructions, the one or more processors are used to execute the method as described in any one of claims 1-11.
13. A computer storage medium, characterized in that: The method comprises computer instructions, which, when executed on an electronic device, cause the electronic device to execute the method as claimed in any one of claims 1 to 11.
Citation Information
Cited By
System function execution method and device
CN120104200A
Method and apparatus for executing a system function
CN120104200B
