Control method of electronic device and electronic device

CN122122535APending Publication Date: 2026-05-29HONOR DEVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HONOR DEVICE CO LTD
Filing Date
2025-02-28
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

During the operation of electronic devices, there is a problem of performance limitations when switching between performance scenarios and power consumption scenarios, and the prior art cannot improve performance while optimizing power consumption.

Method used

By comparing the corresponding strategies of performance scenarios and power consumption scenarios, we combine strategies that take into account power consumption and operating performance, adjust the operating parameters of the CPU and GPU to ensure that power consumption is reduced without excessive limitations.

Benefits of technology

On the premise of ensuring optimized power consumption, the performance of electronic devices is improved, the user experience is improved, and the problem of performance limitations is avoided.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122122535A_ABST
    Figure CN122122535A_ABST
Patent Text Reader

Abstract

The application discloses a control method of an electronic device and the electronic device, and relates to the technical field of power electronics. The method comprises the following steps: the electronic device displays a first window; when the first window is a focus window, the electronic device operates according to a first strategy; the first window corresponds to a performance scene; in response to the focus window being switched from the first window to a second window, the electronic device operates according to a third strategy; the second window corresponds to a power consumption scene, the second strategy corresponds to the power consumption scene, and the third strategy is obtained based on the first strategy and the second strategy. The electronic device can compare the operation parameters corresponding to the performance scene and the operation parameters corresponding to the power consumption scene, and obtain operation parameters that take into account power consumption and operation performance. In this way, the electronic device can improve performance while ensuring optimized power consumption, or reduce power consumption while performance is not excessively limited.
Need to check novelty before this filing date? Find Prior Art

Description

Electronic device control method and electronic device

[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office on February 29, 2024, with application number 202410235500.7 and invention name “Control method of electronic device and electronic device”, and the Chinese patent application filed with the State Intellectual Property Office on February 29, 2024, with application number 202410235248.X and invention name “Control method of electronic device and electronic device”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of power electronics technology, and in particular to a control method for an electronic device and the electronic device. Background Art

[0003] With technological advancements, while reducing the power consumption of electronic devices, users are increasingly demanding improved performance. Reducing power consumption is aimed at conserving battery life and improving battery life, while improving performance means increasing response speed and computing power.

[0004] When an electronic device is running, it may experience multiple scenarios simultaneously, such as performance scenarios (where a gaming application window is the focus window) and power consumption scenarios (where an office application window is the focus window). When switching between performance scenarios and power consumption scenarios, performance limitations may occur. Summary of the Invention

[0005] The embodiments of the present application provide a control method for an electronic device and an electronic device, which are used to improve the performance of the electronic device while ensuring optimized power consumption, or to reduce power consumption and improve user experience without excessively restricting performance.

[0006] To achieve the above objectives, the embodiments of the present application adopt the following technical solutions:

[0007] In a first aspect, a control method for an electronic device is provided, which is applied to the electronic device, including: the electronic device displays a first window; when the first window is the focus window, the electronic device operates according to a first strategy; the first window corresponds to a performance scenario; in response to the focus window being switched from the first window to the second window, the electronic device operates according to a third strategy; wherein the second window corresponds to a power consumption scenario, the second strategy corresponds to the power consumption scenario, and the third strategy is obtained based on the first strategy and the second strategy.

[0008] In this application, electronic devices can compare the strategies corresponding to performance scenarios with the strategies corresponding to power consumption scenarios to obtain a strategy that balances power consumption and operating performance. This allows electronic devices to improve performance while ensuring optimized power consumption, or reduce power consumption without excessively limiting performance.

[0009] In combination with the first aspect, in a possible design method, before the electronic device operates according to the third strategy, the method also includes: determining that the value of the operating parameter in the third strategy is the larger value of the values ​​of the corresponding operating parameters in the first strategy and the third strategy; the operating parameters include CPU parameters and / or GPU parameters.

[0010] That is, the electronic device can take the larger value of the operating parameter included in the first strategy or the second strategy as the value of the operating parameter in the integrated third strategy, thereby improving the operability of the second scenario.

[0011] In combination with the first aspect, in a possible design method, before the electronic device operates according to the third strategy, the method also includes: when the first CPU parameter in the first strategy is not equal to the second CPU parameter in the second strategy, determining the third CPU parameter in the third strategy to be the larger value between the first CPU parameter and the second CPU parameter; wherein the first CPU parameter, the second CPU parameter and the third CPU parameter are CPU parameters of the same type.

[0012] That is, when the CPU parameter is set to a larger value, it can generally meet the requirements of both operating scenarios while maintaining a certain level of performance while controlling power consumption. Therefore, if the CPU parameters in the two operating scenarios are unequal, the larger value can be directly used without comparing other operating parameters in the two operating scenarios.

[0013] In combination with the first aspect, in a possible design method, before the electronic device operates according to the third strategy, the method also includes: when the first CPU parameter is the same as the second CPU parameter, and the first GPU parameter in the first strategy is not equal to the second GPU parameter in the second strategy, determining the third GPU parameter in the third strategy to be the larger value between the first GPU parameter and the second GPU parameter; wherein the first GPU parameter, the second GPU parameter and the third GPU parameter are GPU parameters of the same type.

[0014] That is, when the CPU parameter takes the larger value, it can generally meet the requirements of both operating scenarios while maintaining a certain level of performance while controlling power consumption. Therefore, if the CPU parameters in the two operating scenarios are unequal, the larger value can be directly used without comparing the other operating parameters in the two operating scenarios. If the CPU parameters in the two operating scenarios are equal, the other operating parameters in the two operating scenarios can be compared.

[0015] In combination with the first aspect, in a possible design method, before the electronic device operates according to the third strategy, the method also includes: when the first CPU parameter is different from the second CPU parameter, and the first GPU parameter in the first strategy is not equal to the second GPU parameter in the second strategy, determining that the third GPU parameter in the third strategy is the second GPU parameter; wherein the first GPU parameter, the second GPU parameter and the third GPU parameter are parameters of the same type.

[0016] That is, when the CPU parameter takes the larger value, it can generally meet the requirements of both operating scenarios while maintaining a certain level of performance while controlling power consumption. Therefore, if the CPU parameters in the two operating scenarios are unequal, the larger value can be directly used without comparing the other operating parameters in the two operating scenarios. If the CPU parameters in the two operating scenarios are equal, the other operating parameters in the two operating scenarios can be compared.

[0017] In combination with the first aspect, in a possible design method, the CPU parameters in the first strategy and the third strategy include PL1, PL2, CPU energy efficiency ratio, EPO control switch parameters, CPUTurbo control parameters, CPU minimum frequency and core binding parameters; the GPU parameters in the first strategy and the third strategy include any one or more combinations of GPU minimum frequency, video memory overclocking value GPUOC, DGPU overspeed value, IGPU minimum frequency, IGPU maximum frequency, DGPU minimum frequency, and DGPU maximum frequency.

[0018] In combination with the first aspect, in a possible design method, the electronic device operates according to the third strategy, including: determining whether the first scenario corresponding to the first window is a performance scenario, and the second scenario corresponding to the second window is a power consumption scenario; determining that the first scenario is a performance scenario and the second scenario is a power consumption scenario, the electronic device operates according to the third strategy.

[0019] In combination with the first aspect, in a possible design method, the method also includes: if it is determined that the first scenario is a power consumption scenario and the second scenario is a performance scenario, the electronic device operates according to the second strategy; or if it is determined that the first scenario is a power consumption scenario and the second scenario is a power consumption scenario, the electronic device operates according to the second strategy; or if it is determined that the first scenario is a performance scenario and the second scenario is a performance scenario, the electronic device operates according to the second strategy.

[0020] That is, there are three specific situations in which the electronic device does not switch from a performance scenario to a power consumption scenario.

[0021] In conjunction with the first aspect, in one possible design, the electronic device operates according to the third strategy, including: determining whether a first scenario corresponding to the first window is a performance scenario, and a second scenario corresponding to the second window is a power consumption scenario;

[0022] Determine that the first scenario is a performance scenario and the second scenario is a power consumption scenario, and the electronic device operates according to the third strategy; determine whether the process corresponding to the first window exists; if the process corresponding to the first window exists, determine whether the load level of the process corresponding to the first window is reduced to light load; determine that the load level of the process corresponding to the first window is not reduced to light load, determine a third strategy obtained based on the first strategy and the second strategy, and the electronic device operates according to the third strategy.

[0023] In combination with the first aspect, in a possible design, the method also includes: if the process corresponding to the first window does not exist, the electronic device executes according to the second strategy; or if the process corresponding to the first window exists and the load level of the process corresponding to the first window is reduced to light load, the electronic device executes according to the second strategy.

[0024] In combination with the first aspect, in a possible design method, the electronic device adopts the same method to obtain the first strategy and the second strategy. The method includes: obtaining the operating status information under the target scenario; wherein the target scenario is used to describe the scenario in which the electronic device responds to the user operation to perform a task in the focus window; the operating status information is used to characterize the hardware operation status and / or system operation status when the electronic device operates the focus window; determining the target strategy based on the operating status information; the target strategy includes the target value of the operating parameter; wherein the operating parameter is a parameter that affects the operating power consumption and operating performance of the electronic device. The target scenario is the first scenario corresponding to the first window, and the target strategy is the first strategy, or the target scenario is the second scenario corresponding to the second window, and the target strategy is the second strategy.

[0025] In this application, when an electronic device is in a target scenario, operating status information corresponding to the current target scenario can be obtained. Based on this operating status information, a target value of an operating parameter is obtained that reduces operating power consumption while ensuring certain operating performance. Because the target value of the operating parameter has the property of reducing the operating power consumption of the electronic device while ensuring certain operating performance, the electronic device can reduce operating power consumption while ensuring certain operating performance when operating at the target value of the operating parameter, thereby improving the user experience.

[0026] In conjunction with the first aspect, in one possible design approach, operating state information is input into a performance and power consumption model to generate a target strategy. The performance and power consumption model characterizes the mapping relationship between operating state information and target values ​​of operating parameters for each operating scenario. This means that a trained performance and power consumption model can be used to determine target values ​​for operating parameters that reduce operating power consumption while maintaining a certain level of performance.

[0027] In combination with the first aspect, in a possible design method, in response to a first event, the state information corresponding to the target scenario is input into a performance power consumption model to obtain a fourth strategy, and the fourth strategy is used as the target strategy; wherein the performance power consumption model is used to characterize the mapping relationship between the state information and the strategy; wherein the first event is an event that affects the operating performance of the electronic device.

[0028] In this application, the first event is an event that affects the operating performance of the electronic device. When the first event occurs, it indicates that the operating performance of the electronic device has degraded, and generally needs to be quickly improved. In addition, since the performance power consumption model can be used to quickly output parameters of the electronic device related to limiting power consumption and improving the operating performance of the electronic device, the electronic device can use the performance power consumption model to quickly output such operating parameters, quickly improve the operating performance of the electronic device, and enhance the user experience.

[0029] In combination with the first aspect, in a possible design method, the first event includes: one or more of: a user operation event on the focus window, a freeze event, a chip performance limitation event, or a performance power consumption model training event.

[0030] In combination with the first aspect, in a possible design manner, the operation event includes: one or more of a mouse click event, a keyboard input event, or an operation event for switching applications.

[0031] In combination with the first aspect, in a possible design method, in response to the second event, the state information corresponding to the target scenario is input into the performance power consumption model to obtain a fifth strategy; the sixth strategy corresponding to the target scenario is obtained; wherein the mapping relationship between the scenario and the strategy is stored in the electronic device. The preset identification information of the target scenario is obtained; wherein the preset identification information is used to characterize the target tendency of the electronic device in the target operation scenario, and the target tendency includes a tendency to reduce operating power consumption or a tendency to improve operating performance; when the first condition is met, the fifth strategy is used as the target strategy; the first condition includes: the target tendency is a tendency to reduce operating power consumption, and compared with the use of the sixth strategy to control the electronic device, the power consumption of the electronic device is low when the fifth strategy is used to control the electronic device; or the target tendency is a tendency to improve operating performance, and compared with the use of the sixth strategy to control the electronic device, the operating performance of the electronic device is high when the fifth strategy is used to control the electronic device.

[0032] In this application, the electronic device determines the selection method of operating parameters according to the target tendency, accurately controls the operation of the electronic device, and improves the user experience.

[0033] In conjunction with the first aspect, in one possible design approach, the sixth strategy is used as the target strategy when the second condition is met. The second condition includes: the target tendency is to reduce operating power consumption, and the power consumption of the electronic device is lower when the sixth strategy is used to control the electronic device compared to when the fifth strategy is used to control the electronic device; or the target tendency is to improve operating performance, and the operating performance of the electronic device is higher when the sixth strategy is used to control the electronic device compared to when the fifth strategy is used to control the electronic device.

[0034] In this application, the electronic device determines the selection method of operating parameters according to the target tendency, accurately controls the operation of the electronic device, and improves the user experience.

[0035] In combination with the first aspect, in a possible design method, the performance power consumption model includes a user experience impairment rate prediction model and an operating parameter output module; wherein, the user experience impairment rate prediction model is used to output multiple user experience impairment rates corresponding to multiple numerical values ​​of the first operating parameter and experience impairment labels or experience non-impaired labels of multiple numerical values ​​of the first operating parameter; wherein, the multiple numerical values ​​and the multiple user experience impairment rates correspond one to one; the operating parameter output module is used to select, from the multiple numerical values ​​of the first operating parameter, the minimum numerical value marked with the experience non-impaired label and the user experience impairment rate less than a preset value as the target value of the first operating parameter.

[0036] In combination with the first aspect, in a possible design method, the method also includes: in a preset operating scenario, operating the electronic device with operating status information corresponding to the preset operating scenario, obtaining hardware limitation information corresponding to multiple values ​​of the first operating parameter; if the hardware limitation information corresponding to the first value among the multiple values ​​of the first operating parameter meets the preset restriction condition, then labeling the first value of the first operating parameter with an experience impairment label; if the hardware limitation information corresponding to the second value among the multiple values ​​of the first operating parameter does not meet the preset restriction condition, then labeling the second value of the first operating parameter with an experience non-impaired label; determining the user experience impairment rate corresponding to the multiple values ​​of the first operating parameter one by one; wherein the user experience impairment rate is the ratio of the number of performance limitations detected by the operating system of the electronic device to the number of detections in the preset operating scenario; and training a user experience impairment rate prediction model based on the operating status information, the labeled first value of the first operating parameter, the labeled second value of the first operating parameter and the user experience impairment rate.

[0037] It can be understood that the values ​​of the operating parameters in the training samples are marked with the experience impairment label, the experience non-impaired label and the user experience impairment rate. The experience impairment label can characterize whether it affects the hardware performance (operating power consumption) of the electronic device, and the user experience impairment rate is used to characterize the magnitude of the impact on the operating performance of the electronic device. By using the training sample to train the user experience impairment rate prediction model, the electronic device can obtain the values ​​of the operating parameters that can indicate whether it affects the operating power consumption and operating performance of the electronic device through the trained user experience impairment rate prediction model, and obtain the target value of the operating parameter that reduces the operating power consumption of the electronic device and improves the operating performance of the electronic device. The electronic device uses the target value of the operating parameter to control the electronic device, which can reduce the operating power consumption of the electronic device and improve the operating performance of the electronic device, thereby improving the user experience.

[0038] In a second aspect, an electronic device is provided, which includes: a memory and one or more processors; wherein the memory is used to store computer program code, and the computer program code includes computer instructions; when the computer instructions are executed by the processor, the electronic device executes a control method for an electronic device in any possible design method in the first aspect.

[0039] In a third aspect, a computer-readable storage medium is provided, comprising computer instructions; when the computer instructions are executed on an electronic device, the electronic device executes a method for controlling an electronic device in any possible design manner as in the first aspect.

[0040] In a fourth aspect, a computer program product is provided. When the computer program product is run on a computer, the computer is caused to execute the control method of the electronic device in any possible design manner as in the first aspect.

[0041] Among them, the technical effects brought about by any design method in the second, third and fourth aspects can refer to the technical effects brought about by different design methods in the first aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] FIG1 shows a schematic structural diagram of an electronic device 100;

[0043] FIG2 shows a software structure block diagram of an electronic device 100;

[0044] FIG3 shows a schematic diagram of a software and hardware workflow for controlling operating parameters of an electronic device 100;

[0045] FIG4 is a schematic flow chart showing a method for controlling an electronic device;

[0046] FIG5 is a schematic flow chart showing a method for controlling an electronic device;

[0047] FIG6 shows a schematic diagram of an interface;

[0048] FIG7 shows a flow chart of a GPU parameter fusion strategy;

[0049] FIG8 shows a flow chart of a CPU fusion strategy;

[0050] FIG9 shows a schematic diagram of the interaction principle of modules related to operation strategy control in an electronic device 100;

[0051] FIG10 shows a schematic diagram of modules related to operation strategy control in an electronic device 100;

[0052] FIG11 is a schematic flow chart showing a method for controlling an electronic device;

[0053] FIG12 shows a flow chart of a method for determining a performance power consumption model;

[0054] FIG13 shows a schematic diagram of obtaining the average duration of hardware performance limitation. DETAILED DESCRIPTION

[0055] In the following, the terms "first" and "second" are used for descriptive purposes only and should not be understood to indicate or imply relative importance or implicitly specify the number of the technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this embodiment, unless otherwise specified, "plurality" means two or more.

[0056] To make the description of the following embodiments clear and concise, a brief introduction to the relevant concepts or technologies is first given:

[0057] (1) Focus window refers to the window with focus, where the focus is the location where the cursor is currently activated. In other words, the focus window is the window where the cursor is currently activated. The focus window is the current operating window and can receive keyboard input. Alternatively, a non-focus window can be a window that cannot receive keyboard input or does not respond to keyboard input.

[0058] (2) Operation scenario: The operation scenario is used to describe the scenario in which the electronic device responds to user operations to perform tasks in the focus window, where the task refers to the execution content related to the function provided by the focus window. For example, the operation scenario of the electronic device may include video scenarios, game scenarios, social scenarios, office scenarios, browser scenarios, smart interconnection scenarios, evaluation scenarios, programming scenarios, hyperterminal scenarios, design software scenarios, process startup scenarios, large file opening scenarios, etc. Optionally, in the embodiment of the present application, the operation scenario refers to the current scenario.

[0059] The task corresponding to the video scene can be playing videos; the task corresponding to the game scene can be playing games; the task corresponding to the social scene can be voice chat, video chat, typing chat, etc.; the task corresponding to the office scene can be editing documents; the task corresponding to the browser scene can be browsing the web; the task corresponding to the smart interconnection scene can be sharing information after multiple electronic devices are interconnected, and the task corresponding to the evaluation scene can be experimental analysis of the performance of electronic devices; the task corresponding to the programming scene can be programming; the task corresponding to the super terminal scene can be that an electronic device can operate one or more other electronic devices, the task corresponding to the design software scene can be designing software, and the task corresponding to the process startup scene can be memory management, task scheduling, etc.; the large file opening scene can be a file opening scene that exceeds the preset file size, etc.

[0060] Video scenarios can further include video playback, video browsing, and video commentary. Social scenarios can further include text chat, voice chat, and video chat. Office scenarios can further include document editing, document browsing, and video conferencing, which can also be referred to as specialized office software operation scenarios. Browser scenarios can include web browsing and video playback.

[0061] (3) Power consumption scenarios: Power consumption scenarios are operating scenarios that are mainly aimed at reducing the power consumption of electronic equipment, such as office scenarios, social scenarios, etc.

[0062] (4) Performance scenarios: Performance scenarios are operating scenarios that take into account the operating performance of electronic devices while reducing the power consumption of electronic devices, such as programming scenarios, video scenarios, game scenarios, large file opening scenarios (file opening scenarios exceeding the preset file size), etc.

[0063] (5) Power Limit (PL), which is used to limit the power consumption of the Central Processing Unit (CPU) in electronic devices. Generally, the level of power consumption limit on the CPU can be expressed in the form of "PL+number". Among them, the "number" in "PL+number" represents a specific level. For example, the levels of power consumption limit on the CPU include four levels from small to large, namely PL1, PL2, PL3, and PL4. The smaller the number, the lower the power consumption limit level. The embodiments of the present application mainly involve PL1 and PL2, and PL1 and PL2 are mainly introduced below.

[0064] (6) PL1, also known as long-term turbo power consumption, when the CPU is under long-term load, it will basically maintain this power consumption.

[0065] (7) PL2, also known as short-term turbo power consumption. Generally, PL2 is greater than PL1 and is the maximum power consumption that the CPU can achieve under short-term load, which is also the upper limit of the CPU performance of electronic devices.

[0066] (8) CPU energy performance preference (EPP) is used to reflect the CPU scheduling tendency, and its value range is 0 to 255. The smaller the CPU EPP, the higher the CPU EPP, the lower the CPU power consumption.

[0067] (9) Power consumption wall: A threshold at which the CPU releases maximum power. If this threshold is exceeded, the processor will run at a reduced frequency.

[0068] (10) BIOS (Basic Input / Output System) is short for ROM-BIOS, which stands for Read-Only Memory Basic Input / Output System. It is actually a set of programs that are embedded in electronic devices and provide the lowest-level and most direct hardware control for electronic devices. It is the hub connecting software programs and hardware devices. In layman's terms, BIOS is a "converter" or interface between hardware and software programs (although it is itself just a program), responsible for solving the immediate requirements of the hardware and executing the specific operations required by the software on the hardware.

[0069] As described in the background technology above, if an electronic device has both performance scenarios and power consumption scenarios, and the currently activated scenario is switched from the performance scenario to the power consumption scenario, the performance scenario is switched to the background or even if the performance scenario is in the foreground but is in an inactivated state, for example, the electronic device opens a game application and a chat application at the same time, and the electronic device responds to a message by cutting off the chat application window when the user is using the game application; for another example, the electronic device opens a programming application and an office application at the same time, and when the user is using the programming application, cuts off the office application to open a file; then the electronic device will execute according to the operating parameters of the currently activated power consumption scenario.

[0070] However, power consumption scenarios simply reduce the power consumption of electronic devices without balancing power consumption with performance. If an electronic device has both performance and power consumption scenarios, and the device executes the operating parameters corresponding to the power consumption scenario, the performance of both scenarios will be limited, impacting the user experience. For example, consider the power consumption scenario as an office scenario and the performance scenario as a programming scenario. In the office scenario, users typically only browse PDFs or edit Word documents, which is a light load and does not require excessive power. The power consumption of the electronic device can be reduced from 35 watts to 10 watts. In contrast, the programming scenario typically requires compilation, which requires significant computing power and consumes excessive power. If the electronic device is switched from the programming scenario to the office scenario, the power consumption is reduced from 35 watts to 10 watts to reduce power consumption. However, the background programming scenario consumes a large amount of power, leaving the office scenario with less than 10 watts of power. Consequently, the responsiveness and computing power of the electronic device during compilation and file opening operations in the programming scenario and the office scenario are reduced, resulting in performance limitations.

[0071] To address this issue, embodiments of the present application provide a control method for an electronic device. The electronic device can compare strategies corresponding to performance scenarios with strategies corresponding to power consumption scenarios to determine a strategy that balances power consumption and operational performance. This allows the electronic device to improve performance while ensuring optimized power consumption, or to reduce power consumption without excessively limiting performance.

[0072] For example, continuing with the above-mentioned power consumption scenario as the office scenario and the performance scenario as the programming scenario, if the electronic device is switched from the programming scenario to the office scenario, the electronic device can compare the power of the electronic device corresponding to the performance scenario, which is 35 watts, with the power of the electronic device corresponding to the power consumption scenario, which is 10 watts, and take the larger value of the two. In this way, even if the programming scenario running in the background consumes a lot of power, the power allocated to the office scenario can still reach 10 watts. The performance of the electronic device in operations such as compiling in the programming scenario and opening files in the office scenario, such as response speed and computing power, will not be reduced, and performance limitations will be improved.

[0073] For example, the electronic device in the embodiments of the present application may be a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC) device, or other electronic device. The embodiments of the present application do not impose any special restrictions on the specific form of the electronic device.

[0074] Please refer to FIG1 , which is a schematic structural diagram of an electronic device 100 provided in an embodiment of the present application.

[0075] As shown in Figure 1, the electronic device 100 may include: a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, a wireless communication module 150, a display screen 160, etc.

[0076] It should be understood that the structure illustrated in this embodiment does not constitute a specific limitation on the electronic device 100. In other embodiments, the electronic device 100 may include more or fewer components than shown, or may combine or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0077] 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 processing unit (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). The different processing units may be independent devices or integrated into one or more processors.

[0078] In some embodiments, the processor and the central processing unit (CPU) may refer to the same component. The processor usually refers to the CPU, which is one of the core components of an electronic device and is responsible for executing various instructions and performing data processing.

[0079] However, in some other embodiments, the processor and the CPU may not be the same component. The processor may refer to a more complete system. For example, the processor may be a system on a chip (SoC), which includes not only the CPU but also other components such as a GPU and a memory controller.

[0080] In the embodiments of the present application, the operating parameters may be parameters related to the CPU and GPU. The processor may obtain operating status information corresponding to the current operating scenario and, based on the operating status information, obtain target values ​​for the operating parameters that reduce operating power consumption while ensuring certain operating performance. The processor may then adjust the operating parameters of the CPU and GPU based on the target values ​​of the operating parameters to reduce the operating power consumption of the electronic device while ensuring the operating performance of the electronic device.

[0081] The controller may be the nerve center and command center of the electronic device 100. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.

[0082] Processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in processor 110 is a cache memory. This memory can store instructions or data that have just been used or are being recycled by processor 110. If processor 110 needs to use the same instruction or data again, it can directly access the memory. This avoids duplicate accesses, reduces processor 110 latency, and thus improves system efficiency.

[0083] In some embodiments, the processor 110 may include one or more interfaces. The interfaces may include an I2C interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a USB interface.

[0084] It is understood that the interface connection relationship between the modules illustrated in this embodiment is merely an illustrative illustration and does not constitute a structural limitation on the electronic device 100. In other embodiments, the electronic device 100 may also adopt different interface connection methods from the above embodiments, or a combination of multiple interface connection methods.

[0085] The charging management module 140 is used to receive charging input from a charger. The charger can be a wireless charger or a wired charger. While charging the battery 142, the charging management module 140 can also power the electronic device through the power management module 141.

[0086] The power management module 141 is used to connect the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140 and provides power to the processor 110, the internal memory 121, the external memory, the display 160, and the wireless communication module 150. In some embodiments, the power management module 141 and the charging management module 140 can also be provided in the same device.

[0087] The wireless communication module 150 can provide wireless communication solutions for the electronic device 100, including WLAN (such as Wi-Fi), Bluetooth, global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc. For example, in an embodiment of the present application, the electronic device 100 can establish a Bluetooth connection with a terminal device (such as a wireless headset 100) through the wireless communication module 150.

[0088] The wireless communication module 150 can be one or more devices that integrate at least one communication processing module. The wireless communication module 150 receives electromagnetic waves via an antenna, frequency-modulates and filters the electromagnetic wave signals, and transmits the processed signals to the processor 110. The wireless communication module 150 can also receive signals to be transmitted from the processor 110, frequency-modulate them, amplify them, and convert them into electromagnetic waves for radiation via the antenna.

[0089] Electronic device 100 implements display functionality through a GPU, display screen 160, and an application processor. A GPU is a microprocessor for image processing that connects display screen 160 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or modify display information.

[0090] The display screen 160 is used to display images, videos, etc. The display screen 160 includes a display panel.

[0091] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 via the external memory interface 120 to implement data storage functions. For example, files such as music and videos can be stored on the external memory card.

[0092] The internal memory 121 can be used to store computer executable program code, which includes instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121. For example, in an embodiment of the present application, the processor 110 can execute instructions stored in the internal memory 121, and the internal memory 121 can include a program storage area and a data storage area.

[0093] The program storage area may store an operating system, at least one application required for a function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the electronic device 100 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.

[0094] FIG2 is a block diagram of the software structure of the electronic device 100 according to an embodiment of the present application. The software is run in the processor 110.

[0095] A layered architecture divides software into several layers, each with distinct roles and divisions of labor. Layers communicate with each other through software interfaces. In some embodiments, a Windows system is divided into a user layer and a kernel layer. The user layer includes the application layer. The kernel layer, in turn, includes the subsystem dynamic link library, the executive, the kernel and driver layers, the hardware abstraction layer (HAL), the firmware layer, and the hardware layer.

[0096] As shown in Figure 2, the application layer includes applications such as music, video, games, office, and social networking. The application layer also includes an environment subsystem, a scene recognition engine, and a scheduling engine. The figure only shows some applications, and the application layer can also include other applications, such as shopping applications and browsers, which are not limited in this application.

[0097] The environment subsystem can present certain subsets of basic executive system services to applications in a specific form, providing an execution environment for the applications.

[0098] The scene recognition engine can identify the operating scene of the electronic device 100 and determine the operating parameters that match the operating scene. The scene recognition engine can be set in the housekeeper application.

[0099] The subsystem dynamic link library includes an API module, which includes the Windows API, the Windows native API, etc. Among them, the Windows API and the Windows native API can both provide system call entry points and internal function support for applications. The difference is that the Windows native API is an API native to the Windows system. For example, the Windows API may include user.dll and kernel.dll, and the Windows native API may include ntdll.dll. Among them, user.dll is the Windows user interface interface, which can be used to perform operations such as creating windows and sending messages. Kernel.dll is used to provide applications with an interface to access the kernel. ntdll.dll is an important Windows NT kernel-level file that describes the interface of the Windows native NTAPI. When Windows starts, ntdll.dll resides in a specific write-protected area in the memory, preventing other programs from occupying this memory area.

[0100] The executive body includes the process manager, virtual memory manager, security reference monitor, I / O manager, Windows management instrumentation (WMI), power manager, operating system event driver (OsEventDriver) node, operating system to System on Chip (OS2SOC) node, etc.

[0101] The process manager is used to create and terminate processes and threads.

[0102] The virtual memory manager implements "virtual memory". The virtual memory manager also provides basic support for the cache manager.

[0103] The Security Reference Monitor enforces security policy on the local computer, protects operating system resources, and performs runtime object protection and monitoring.

[0104] The I / O manager performs device-independent input / output and further processes calls to appropriate device drivers.

[0105] The power manager manages power state changes for all devices that support power state changes.

[0106] The system event-driven node can interact with the kernel and driver layer, for example, interact with the graphics card driver, and after determining that a GPU video decoding event exists, report the GPU video decoding event to the scene recognition engine.

[0107] The system and chip driver nodes can be used by the scheduling engine to send adjustment information to the hardware device, such as sending information to adjust PL1 and PL2 to the CPU.

[0108] The kernel and driver layer include the kernel and device drivers.

[0109] The kernel is an abstraction of the processor architecture, isolating the executive from differences in processor architecture to ensure system portability. The kernel can perform thread scheduling and scheduling, trap handling and exception scheduling, interrupt handling and scheduling, etc.

[0110] Device drivers run in kernel mode and serve as the interface between the I / O system and the associated hardware. These drivers can include GPU drivers, graphics card drivers, Intel DTT drivers, mouse drivers, audio and video drivers, camera drivers, and keyboard drivers. For example, a graphics card driver drives the GPU, while an Intel DTT driver drives the CPU.

[0111] The HAL is a kernel-mode module that hides hardware-related details, such as I / O interfaces, interrupt controllers, and multi-processor communication mechanisms. It provides a unified service interface for different hardware platforms running Windows, enabling portability across multiple hardware platforms. It's important to note that to maintain Windows portability, Windows internal components and user-written device drivers don't access hardware directly. Instead, they call routines in the HAL.

[0112] The firmware layer includes the Basic Input / Output System (BIOS). The BIOS is a set of programs embedded in a read-only memory (ROM) chip on the computer's motherboard. It stores the computer's most important basic input / output (BIO) routines, the post-boot self-test program, and the system startup routine. It can read and write detailed system configuration information from the complementary metal oxide semiconductor (CMOS) chip. Its primary function is to provide the lowest-level, most direct hardware configuration and control for the computer.

[0113] The hardware layer includes the CPU, GPU, mouse, microphone, camera, and keyboard.

[0114] In some embodiments, the scene recognition engine will identify the corresponding operating scenario based on the current focus window, obtain the operating parameters under the operating scenario, and then send the corresponding operating parameters to the scheduling engine. After receiving the operating parameters, the scheduling engine translates the operating parameters and sends them to the CPU and GPU of the hardware layer for execution through the kernel and driver layer's operating system (OS) kernel and GPU driver. In addition, when the performance scenario is switched to the power consumption scenario, the scheduling engine can also compare the operating parameters under different operating scenarios to obtain operating parameters that take into account both power consumption and operating performance, and then send the corresponding operating parameters to the scheduling engine. This function can be implemented by the policy fusion module in the scheduling engine.

[0115] The scheduling engine includes operating system capabilities, CPU low-level capabilities, and GPU low-level capabilities. Operating system capabilities can mobilize CPU functions at the hardware layer through the operating system (OS) kernel at the kernel and driver layers. CPU low-level capabilities can mobilize CPU functions at the hardware layer through the operating system (OS) kernel at the kernel and driver layers. GPU low-level capabilities can mobilize GPU functions at the hardware layer through the operating system (OS) kernel at the kernel and driver layers.

[0116] As shown in Table 1, the following example introduces the operating system capabilities, CPU underlying capabilities, and GPU underlying capabilities.

[0117] Table 1

[0118] Operating system capabilities include processor power module (PPM) settings, memory scrubbing, HT control, and big / small core scheduling. CPU low-level capabilities include DTT translation, EPO settings, fan intelligent adjustment, and CPU Turbo control. GPU low-level capabilities include discrete graphics card (DGPU) overclocking, disabling Display Power Saving Technology (DPST) adjustments, IGPU lockout, and GPU adaption.

[0119] Disable "Display Power Saving Technology" to prevent automatic brightness changes. On some built-in laptop screens, the power settings may cause the screen brightness to change automatically to save power.

[0120] CPU Turbo (Turbo frequency) control can be understood as the CPU automatically adjusting the CPU main frequency according to the current task volume.

[0121] Graphics card overclocking refers to a method of increasing the frequency of the graphics card to improve graphics processing capabilities, thereby achieving better gaming and graphics application effects.

[0122] An integrated graphics processing unit (iGPU) is an image processing unit embedded within a central processing unit (CPU). While iGPUs typically offer lower performance than discrete graphics cards, they offer advantages such as low power consumption, low cost, and portability.

[0123] The Processor Power Module (PPM) setting enables the operating system to effectively utilize the available processing resources on the platform by balancing user expectations for performance and energy efficiency. When adding a CPU to an enterprise server, a PPM is required to power the CPU. A single-CPU server generally does not require a PPM, but adding multiple CPUs does. It's important to note that after adding CPUs, a PPM is required for each CPU, including the existing one. For example, a server with only one CPU does not require a PPM, but when adding two CPUs, two PPMs are required to power the newly added CPU and the existing one.

[0124] It should be noted that the embodiments of the present application are only illustrated using the Windows system as an example. In other operating systems (such as the Android system, the IOS system, etc.), as long as the functions implemented by each functional module are similar to those of the embodiments of the present application, the solutions of the present application can also be implemented.

[0125] FIG3 shows a schematic diagram of the workflow of software and hardware for controlling operating parameters of the electronic device 100 .

[0126] As shown in Figure 3, the scene recognition engine may be located in the application layer of the electronic device. In addition to the system probe module, the scene recognition engine may also include a scene recognition module and a scene strategy configuration module.

[0127] The scene recognition module can determine the current running scene. The running scene may include a video scene, a game scene, an office scene, a social scene, etc. For example, when the scene recognition engine recognizes that the focus window is a window of a video application, it determines that the electronic device 100 is in a video scene. For another example, when the scene recognition engine recognizes that the focus window is a WeChat window, it determines that the electronic device 100 is in a video scene. TM When a chat window is displayed, the electronic device 100 is determined to be in a social scenario. The scenario recognition module may also send the operating scenario to the scenario policy configuration module. The scenario policy configuration module may determine operating parameters based on the operating scenario. The scenario policy configuration module may feed back the operating parameters to the scenario recognition module. The scenario recognition module may send the operating parameters and operating scenario to the scheduling engine of the application layer.

[0128] As described in FIG3 above, the scene recognition engine can store a mapping relationship between the operation scene and the operation strategy. After the scene recognition module recognizes the operation scene, it can directly obtain the operation strategy from the mapping relationship.

[0129] The role of the perception center is the same as that in Figures 2 and 3 above, and will not be repeated here.

[0130] In some embodiments, the scene recognition module may send a request to query the operating status information to the system probe module, so that the system probe module can report the operating status information to the scene recognition module in response to the request.

[0131] The system probe module can subscribe to kernel events from the kernel layer to determine the operating status based on the callback function fed back by the kernel layer and report it to the scene recognition module. Specifically, the multiple types of probes included in the system probe module can each subscribe to corresponding kernel events from the kernel layer to obtain the corresponding operating status information.

[0132] For example, a power status probe can subscribe to power status events from the kernel layer and determine the power status based on a callback function fed back by the kernel layer. For example, the kernel layer may include: a subsystem dynamic link library, an executive, a kernel and driver layer, a hardware implementation layer (HAL), a firmware layer, and a hardware layer. The power status probe can send a request to subscribe to power status events to the executive's system event driver (OsEventDriver) node in the kernel layer. The OsEventDriver node forwards the request to the executive's power manager. After receiving the request, the power manager can feed back a callback function to the power status probe through the OsEventDriver node, thereby subscribing to the power status event.

[0133] The peripheral status probe can subscribe to peripheral events from the kernel layer and determine the peripheral status information based on the callback function fed back by the kernel layer. The process load probe can subscribe to process load events from the kernel layer and determine the load of the process (e.g., the first process) based on the callback function fed back by the kernel layer.

[0134] The system load probe can subscribe to system load events from the kernel layer and determine the system load based on the callback function fed back by the kernel layer.

[0135] The audio and video status probe can subscribe to audio and video events from the kernel layer and determine the current audio and video events on the electronic device 100 based on the callback function fed back by the kernel layer. For example, the audio and video status probe can send a request to subscribe to GPU decoding events to the OsEventDriver node of the executive body. The OsEventDriver node forwards this request to the graphics driver in the kernel and driver layers. After receiving this request, the graphics driver can monitor the status of the GPU and, if it detects that the GPU is performing decoding operations, feed back a callback function to the audio and video status probe through the OsEventDriver node.

[0136] The system event probe can subscribe to system events from the kernel layer and determine the system events based on the callback function fed back by the kernel layer. System events may include window change events, system lock events, process creation events, thread creation events, etc. For example, the system event probe can send a request to subscribe to the process creation event to the OsEventDriver node of the executable body, and the OsEventDriver node forwards the request to the process manager. After receiving the request, the process manager can feed back the callback function to the system event probe through the OsEventDriver node after creating the process. For another example, the system event probe also sends a subscription to the focus window change event to the API module. The API module can monitor whether the focus window of the electronic device 100 has changed, and when it monitors that the focus window has changed, it feeds back the callback function to the system event probe.

[0137] It can be seen that the system probe module subscribes to various events of the electronic device 100 from the kernel layer, and then obtains the probe status according to the callback function fed back by the kernel layer, that is, obtains the operating status information of the electronic device 100.

[0138] In some embodiments, the decision-making middle station can obtain the operating scenario from the scene recognition module. Under the triggering of the first event, the decision-making middle station can call the trained performance power consumption model from the learning middle station in Figure 2 or Figure 3, and input the operating status information obtained from the perception middle station in Figure 2 or Figure 3 into the trained performance power consumption model to obtain an operating strategy that can guarantee a certain operating performance while reducing operating power consumption. The decision-making middle station can send the operating strategy to the scheduling engine, the scheduling engine receives the operating strategy, and the scheduling engine performs scheduling based on the operating strategy. In an embodiment of the present application, the scheduling engine can send an instruction to the CPU through the power manager and BIOS, and the instruction carries the operating parameter 1 in the operating strategy. The scheduling engine can send an instruction to the Intel DTT driver through WMI, and the instruction carries the operating parameter 2 in the operating strategy. Then, the Intel DTT driver can send the received instruction to the CPU through the BIOS. The scheduling engine can send an instruction to the CPU through the system and chip (OS2SOC) driver node, and the instruction carries the operating parameter 2 in the operating strategy. Among them, operating parameter 1, operating parameter 2 and operating parameter 3 can be different operating parameters in the operating strategy.

[0139] 2 and 3 , the interaction process of some modules (the scene recognition engine and scheduling engine of the user layer, and the kernel layer) in the electronic device in FIG. 2 and FIG. 3 will be described below.

[0140] FIG4 shows a flow chart of a method for controlling an electronic device. As shown in FIG4 , the flow chart includes the following steps:

[0141] S401: The scene recognition engine detects a change in the operating scene and sends a first strategy and a second strategy to the scheduling engine.

[0142] The first policy is the currently executed policy, and the second policy is the new policy to be switched. Optionally, the scene change may be from a first scene to a second scene, the first policy may be the policy corresponding to the first scene, and the second policy may be the policy corresponding to the second scene.

[0143] Optionally, the scene recognition engine detects a change in the operating scene and sends a first strategy corresponding to the first scene and a second strategy corresponding to the second scene to the scheduling engine. The scheduling engine can fuse the first strategy and the second strategy to obtain a fusion strategy, so that the electronic device can improve performance while ensuring optimized power consumption, or reduce power consumption without overly restricting performance.

[0144] The definition of the running scenario has been described above and will not be repeated here.

[0145] Among them, power consumption scenarios are operating scenarios primarily aimed at reducing electronic device power consumption, such as office scenarios and social scenarios. Performance scenarios are operating scenarios that require reducing electronic device power consumption while also taking into account the operating performance of the electronic device, such as programming scenarios, video scenarios, gaming scenarios, and large file opening scenarios. It is understood that power consumption scenarios and performance scenarios are not limited to the above classifications and can be adjusted according to actual circumstances.

[0146] The running scene change may refer to switching of the focus window. Specifically, it may refer to switching of different focus windows in the same application or switching of focus windows in different applications.

[0147] Exemplarily, FIG6 is a schematic diagram of an interface provided in an embodiment of the present application. As shown in FIG6 (a), the electronic device can display a window 101, which can be a desktop or a main interface. At this time, the operating strategy corresponding to the focus window 101 is the first strategy. The window 101 includes an icon 102 of a video application. The electronic device can receive an operation in which a user clicks on the icon 102 of the video application. In response to the operation, as shown in FIG6 (b), the electronic device displays a window 103. In the above process, the focus window changes from the original window 101 to window 103, and the operating strategy corresponding to window 103 is the second strategy. When the focus window changes from window 101 to window 103, S401 is executed to obtain the first strategy and the second strategy.

[0148] Optionally, in the embodiment of the present application, the operation strategy includes at least one operation parameter, and the power consumption and / or performance of the electronic device can be adjusted by adjusting the operation parameter. Here, the operation parameter is described as follows:

[0149] Table 2 shows information related to operating parameters of an electronic device.

[0150] Table 2

[0151] As shown in Table 2, the operation policy (strategy) may include any one or more combinations of PL1, PL2, CPU energy efficiency ratio, EPO control switch parameter, CPU Turbo control parameter, fan speed parameter, DGPU overclocking parameter, memory overclocking parameter, I GPU minimum frequency, IGPU maximum frequency, DGPU minimum frequency, DGPU maximum frequency, display energy saving parameter, CPU minimum frequency, core binding parameter, and memory cleanup parameter. The foregoing are only examples of operation parameters and are not limited thereto.

[0152] Core binding refers to the process of attaching one or more processes to one or more CPU cores. This is done to ensure that processes only run on specific CPUs to meet performance requirements, avoid frequent switching, or allow processes to be balanced across different CPU cores without affecting performance.

[0153] For example, the following shows the code for an operation strategy and the code after the operation parameters in some operation strategies are assigned. The double slashes are followed by the Chinese explanation of the code. The code corresponding to the following operation strategy can refer to the description of Figure 6.

[0154] Among them, the running scene type can be expressed by scene type, the level threshold can be expressed by levelThreshold, PL can be expressed by power-limit, PL offset can be expressed by power-limit-offset, acceleration PL can be expressed by turbo-power-limit, EPP can be expressed by energy-perf-preference, EPO control switch parameter can be expressed by odvpSwitch, power mode can be expressed by currPowerMode, CPU load can be expressed by CpuLoad, disk load can be expressed by DiskLoad, fan speed parameter can be expressed by smartFanTable, DGPU overclocking parameter can be expressed by dGpuOverClock, IGPU minimum frequency can be expressed by iGpuMinFreq, IGPU maximum frequency can be expressed by iGpuMaxFreq, screen refresh rate parameter can be expressed by refreshRate, and energy efficiency performance tendency identifier can be expressed by tendency.

[0155] S402: The scheduling engine determines whether the operation scenario has changed from the performance scenario to the power consumption scenario.

[0156] The following is an example of a specific implementation scheme for a scheduling engine to determine whether the operating scenario has changed from a performance scenario to a power consumption scenario. Figure 5 shows a flow diagram of a control method for an electronic device. Figure 5 is a specific implementation of S402, which may include S4021-S4022. As shown in Figure 5, the process includes the following steps:

[0157] S4021: The scheduling engine determines whether the second scenario is a performance scenario.

[0158] If the scheduling engine determines that the second scenario is a performance scenario, it indicates that the switching type cannot be from the performance scenario to the power consumption scenario. Therefore, the scheduling engine can directly execute the second policy corresponding to the second scenario. See S408 and S409 for details.

[0159] If the scheduling engine determines that the second scenario is not a performance scenario, it indicates that there is a possibility that the switching type is switching from the performance scenario to the power consumption scenario. Therefore, the scheduling engine can further determine the first scenario type to determine whether it is switching from the performance scenario to the power consumption scenario based on the first scenario type. See S4022 for details.

[0160] S4022: The scheduling engine determines whether the first scenario is a performance scenario.

[0161] If the scheduling engine determines that the second scenario is not a performance scenario but a power consumption scenario, and also determines that the first scenario is a performance scenario, then the switching type is switched from the performance scenario to the power consumption scenario, but it is not certain whether the electronic device has both performance scenarios and power consumption scenarios, and the currently activated scenario is switched from the performance scenario to the power consumption scenario, the performance scenario is switched to the background, or even if the performance scenario is in the foreground but in an inactive state. Therefore, the scheduling engine can further determine the entry status of the first scenario to determine whether the electronic device has both performance scenarios and power consumption scenarios, and the currently activated scenario is switched from the performance scenario to the power consumption scenario, the performance scenario is switched to the background, or even if the performance scenario is in the foreground but in an inactive state. See S403 for details.

[0162] If the scheduling engine determines that the second scenario is not a performance scenario but a power consumption scenario, and also determines that the first scenario is not a performance scenario but a power consumption scenario, then the switching type cannot be from a performance scenario to a power consumption scenario. Therefore, the second policy corresponding to the second scenario can be directly executed. See S408 and S409 for details.

[0163] It can be understood that in the specific embodiment in which the above-mentioned scheduling engine determines whether the running scenario change is switched from the performance scenario to the power consumption scenario, the scheduling engine first determines whether the second scenario is a performance scenario, and then further determines whether the first scenario is a performance scenario. Optionally, in some other embodiments, in the specific embodiment in which the scheduling engine determines whether the running scenario change is switched from the performance scenario to the power consumption scenario, the scheduling engine can determine whether the second scenario is a performance scenario and whether the first scenario is a performance scenario in parallel. If the scheduling engine determines that the second scenario is a performance scenario and determines that the first scenario is a power consumption scenario, S405 is executed. If the scheduling engine determines that the second scenario is not a performance scenario (is a power consumption scenario) or determines that the first scenario is not a performance scenario (is a power consumption scenario), S408 is executed.

[0164] If the scheduling engine determines that the running scenario has changed from the performance scenario to the power consumption scenario, it needs to further determine whether the process corresponding to the performance scenario exists to accurately determine whether the performance scenario has not been exited and whether the performance scenario and the power consumption scenario exist at the same time. For details, see S403.

[0165] S403: The scheduling engine determines whether a process corresponding to the first scenario exists.

[0166] In the embodiment of the present application, whether a process exists may refer to whether the process is alive. The survival of a process may include the window corresponding to the process being displayed in the foreground or running in the background. Correspondingly, if the process is killed, the process is not alive.

[0167] If the scheduling engine determines that the second scenario is not a performance scenario but a power consumption scenario, and also determines that the first scenario is a performance scenario, and the scheduling engine determines that the process corresponding to the first scenario exists, then it is determined that the electronic device has both a performance scenario and a power consumption scenario, and the currently activated scenario is switched from the performance scenario to the power consumption scenario, the performance scenario is switched to the background, or even if the performance scenario is in the foreground but is in an inactive state. Therefore, in order to reduce the situation where the electronic device has both a performance scenario and a power consumption scenario, the new operation strategy causes the operation performance and power consumption of the performance scenario and the power consumption scenario to be excessively restricted, and to improve the user experience, the first strategy and the second strategy can be integrated to obtain a new operation strategy (i.e., the third strategy) that achieves a balance between power consumption and operation performance. See S405 for details.

[0168] In some embodiments, in order to more accurately determine whether the operation strategy corresponding to the performance scenario and the operation strategy corresponding to the power consumption scenario need to be integrated, it can be determined whether the load level of the process corresponding to the first scenario is reduced to light load.

[0169] In the above embodiment, S404 is executed after S403. Alternatively, S404 can be executed after S401 and before S403.

[0170] S404: The scheduling engine determines whether the load level of the process corresponding to the first scenario is reduced to light load.

[0171] If the load level of the process corresponding to the first scenario is reduced to light load, the first scenario has released the power and / or load and other resources of the electronic device, and will not use too many resources (CPU resources, power, etc.), nor will it generate excessive power consumption. The operating strategy corresponding to the second power consumption scenario can already meet the requirement that even if the electronic device has both performance scenarios and power consumption scenarios, the operating performance and power consumption of the performance scenarios and power consumption scenarios will not be overly restricted. Therefore, in this case, the electronic device can directly execute the operating strategy corresponding to the power consumption scenario. See S408 and S409 for details.

[0172] If the load level of the process corresponding to the first scenario is not reduced to light load, the first scenario may use too much power and / or load of the electronic device, and the operating strategy corresponding to the second power consumption scenario cannot meet the requirement that even if the electronic device has both performance scenarios and power consumption scenarios, the operating performance and power consumption of the performance scenarios and power consumption scenarios will not be excessively restricted. Therefore, in this case, in order to reduce the problem that even if the electronic device has both performance scenarios and power consumption scenarios, the new operating strategy makes the operating performance and power consumption of the performance scenarios and power consumption scenarios excessively restricted, and improve the user experience, the operating strategy corresponding to the performance scenario and the operating strategy corresponding to the power consumption scenario can be directly integrated to obtain a new operating strategy that achieves a balance between power consumption and operating performance. See S405 for details.

[0173] If the scheduling engine determines that the second scenario is not a performance scenario but a power consumption scenario, and also determines that the first scenario is a performance scenario, and the scheduling engine determines that the process corresponding to the first scenario does not exist, then it is determined that the electronic device does not have both performance and power consumption scenarios, and the currently active scenario is switched from the performance scenario to the power consumption scenario, the performance scenario is switched to the background, or even if the performance scenario is in the foreground but is in an inactive state. Therefore, the operation policy corresponding to the second scenario can be directly executed. See S405 for details.

[0174] S405: The scheduling engine merges the first strategy and the second strategy to obtain a merged third strategy.

[0175] To improve the performance of the second scenario, the scheduling engine can take the larger value of the operating parameter included in the first strategy or the second strategy as the value of the operating parameter in the fused third strategy. The operating parameters to be compared can be called preset operating parameters, including CPU parameters and GPU parameters.

[0176] The following is an example of a fusion strategy for GPU parameters and a fusion strategy for CPU parameters.

[0177] FIG7 shows a flow diagram of a GPU parameter fusion strategy. FIG7 is a specific implementation of S405. S405 may include at least one of steps S701-S706. S405 may also include at least one of steps S801-S806. As shown in FIG7, the process includes the following steps:

[0178] S701: The scheduling engine determines whether the second GPUMinFreq (GPU minimum frequency) is greater than or equal to the first GPUMinFreq.

[0179] The first GPUMinFreq is the value of GPUMinFreq in the first strategy, the second GPUMinFreq is the value of GPUMinFreq in the second strategy, and the third GPUMinFreq is the value of GPUMinFreq in the third strategy.

[0180] If the scheduling engine determines that the second GPUMinFreq is not greater than or equal to the first GPUMinFreq, that is, the second GPUMinFreq is less than the first GPUMinFreq, then in order to improve the operating performance of the electronic device, the third GPUMinFreq is assigned to the first GPUMinFreq. For details, see S702.

[0181] If the scheduling engine determines that the second GPUMinFreq is greater than or equal to the first GPUMinFreq, the third GPUMinFreq is directly assigned to the second GPUMinFreq (see S703 for details). It then further determines whether the second GPUMinFreq is overclocked based on this. If so, the third GPUMinFreq is further assigned to the overclocked value (see S704 for details).

[0182] S702: The scheduling engine assigns the third GPUMinFreq to the first GPUMinFreq.

[0183] The scheduling engine assigns the third GPUMinFreq to the value of the first GPUMinFreq, and then further determines whether the second GPUMinFreq is overclocked on this basis. If it is overclocked, the third GPUMinFreq is further assigned to the overclocked value. For details, see S705.

[0184] S703: The scheduling engine takes GPUMinFreq as the second GPUMinFreq.

[0185] S704: The scheduling engine determines whether the second GPUOC is greater than or equal to the first GPUOC.

[0186] The first GPUOC is the value of GPUOC in the first strategy, the second GPUOC is the value of GPUOC in the second strategy, and the third GPUOC is the value of GPUOC in the third strategy.

[0187] OC stands for "overclocking," which means adjusting the frequency on top of the original frequency to achieve higher performance. Without OC, the frequency is not adjusted and the original frequency is used.

[0188] GPUOC refers to changing the frequency of the graphics card during runtime to improve the computing performance of the graphics card, which can effectively improve the performance and smoothness of the game.

[0189] If the scheduling engine determines that the second GPUOC is less than the first GPUOC, the scheduling engine assigns the third GPUOC to the first GPUOC, see S705 for details. If the scheduling engine determines that the second GPUOC is greater than or equal to the first GPUOC, the scheduling engine assigns the third GPUOC to the second GPUOC, see S706 for details.

[0190] S705: The scheduling engine assigns the third GPUOC to the first GPUOC.

[0191] S706: The scheduling engine assigns the third GPUOC to the second GPUOC.

[0192] Figure 8 shows a flow chart of a CPU fusion strategy. As shown in Figure 8, the process includes the following steps:

[0193] S801: The scheduling engine determines whether the second PL1 is greater than or equal to the first PL1.

[0194] If the scheduling engine determines that the second PL1 is greater than or equal to the first PL1, then to improve the operating performance of the electronic device, the third PL1 may be directly assigned to the second PL1 (see S803 for details). If the scheduling engine determines that the second PL1 is less than the first PL1, then to improve the operating performance of the electronic device, the third PL1 may be assigned to the first PL1 (see S802 for details).

[0195] S802: The scheduling engine assigns the third PL1 to the first PL1.

[0196] S803: The scheduling engine assigns the third PL1 to the second PL1.

[0197] After determining PL1, that is, after S802 and S803, the scheduling engine will continue to determine EPOLevel. For details, see S804 to S806.

[0198] S804: The scheduling engine determines whether the second EPOLevel is greater than or equal to the first EPOLevel.

[0199] If the scheduling engine determines that the second EPOLevel is less than the first EPOLevel, then in order to improve the operating performance of the electronic device, the third EPOLevel can be assigned to the first EPOLevel, see S805 for details. If the scheduling engine determines that the second EPOLevel is greater than or equal to the first EPOLevel, then in order to improve the operating performance of the electronic device, the third EPOLevel can be directly assigned to the second EPOLevel, see S806 for details.

[0200] S805: The scheduling engine assigns the third EPOLevel to the first EPOLevel.

[0201] S806: The scheduling engine assigns the third EPOLevel to the second EPOLevel.

[0202] After determining EPOLevel, that is, after S805 and S806, the scheduling engine will continue to determine MinFerf. For details, see S807 to S809.

[0203] S807: The scheduling engine determines whether the second MinPerf is greater than or equal to the first MinPerf.

[0204] If the scheduling engine determines that the second MinPerf is less than the first MinPerf, then in order to improve the operating performance of the electronic device, the third MinPerf can be assigned to the first MinPerf, see S808 for details. If the scheduling engine determines that the second MinPerf is greater than or equal to the first MinPerf, then in order to improve the operating performance of the electronic device, the third MinPerf can be directly assigned to the second MinPerf, see S809 for details.

[0205] S808: The scheduling engine assigns the third MinPerf to the first MinPerf.

[0206] S809: The scheduling engine assigns the third MinPerf to the second MinPerf.

[0207] After determining MinPerf, that is, after S808 and S809, the scheduling engine will continue to determine GPO Turbo. For details, see S810 to S812.

[0208] S810: The scheduling engine determines whether the second GPO Turbo is greater than or equal to the first GPO Turbo.

[0209] If the scheduling engine determines that the second GPO Turbo is greater than or equal to the first GPO Turbo, then in order to improve the operating performance of the electronic device, the third GPO Turbo can be directly assigned to the second GPO Turbo, see S812 for details. If the scheduling engine determines that the second GPO Turbo is less than the first GPO Turbo, then in order to improve the operating performance of the electronic device, the third GPO Turbo can be assigned to the first GPO Turbo, see S811 for details.

[0210] S811: The scheduling engine assigns the third GPO Turbo to the first GPO Turbo.

[0211] S812: The scheduling engine assigns the third GPO Turbo to the second GPO Turbo.

[0212] When the CPU parameter is set to a larger value, it generally satisfies both operating scenarios while maintaining a certain level of performance while controlling power consumption. Therefore, if the CPU parameters in the two operating scenarios are unequal, the larger value can be used without comparing other operating parameters in the two scenarios. If the CPU parameters in the two operating scenarios are equal, the other operating parameters in the two scenarios can be compared.

[0213] Specifically, optionally, in some embodiments, if the values ​​of the CPU-related operating parameters corresponding to the first strategy and the second strategy are not equal; then the operating parameters to be merged are determined to be CPU-related operating parameters; the sizes of the CPU-related operating parameters corresponding to the first strategy and the second strategy are compared, and the larger value of the operating parameter is used as the value of the corresponding operating parameter in the new operating parameter.

[0214] If the values ​​of the GPU-related operating parameters corresponding to the first strategy and the second strategy are equal, then the operating parameters to be fused are determined to be GPU-related operating parameters; compare the sizes of the GPU-related operating parameters corresponding to the first strategy and the second strategy, and use the larger value of the operating parameter as the value of the corresponding operating parameter in the new operating parameter.

[0215] S406: The scheduling engine performs policy translation on the third policy.

[0216] The scheduling engine translates the operation policy into a file format that can be executed by the corresponding chip type.

[0217] Optionally, the scheduling engine may perform policy translation on the third policy;

[0218] Alternatively, optionally, the third policy may not be translated, and S407 may be executed after S405.

[0219] S407: The scheduling engine calls the kernel layer to execute the third strategy.

[0220] S408: The scheduling engine performs policy translation on the second policy.

[0221] Optionally, the scheduling engine may perform policy translation on the second policy;

[0222] Alternatively, optionally, the second policy may not be translated and S407 may be directly executed.

[0223] S409: The scheduling engine calls the kernel layer to execute the second strategy.

[0224] From the above description, it can be seen that when an electronic device detects that the processes of the performance scenario and the power consumption scenario exist at the same time, and the running scenario is switched from the performance scenario to the power consumption scenario, for example, the performance scenario is switched to the background or even if the performance scenario is in the foreground but in an inactive state, the power consumption scenario is running in the foreground, then the electronic device can merge the running strategy corresponding to the performance scenario with the running strategy corresponding to the power consumption scenario to obtain a new running strategy that achieves a balance between power consumption and running performance. This allows the electronic device to improve performance while ensuring optimized power consumption, or to reduce power consumption without excessively limiting performance.

[0225] As electronic device performance improves, their power consumption also increases. To enhance the user experience, it's possible to reduce their power consumption and extend their battery life. However, simply reducing power consumption can limit their performance, leading to slower operating speeds and response times, impacting the user experience.

[0226] Furthermore, embodiments of the present application provide a control method for an electronic device and an electronic device for reducing operating power consumption while ensuring certain operating performance and improving user experience. To improve the user experience, the power consumption of an electronic device can be reduced and the battery life of the electronic device can be increased. Simply reducing the power consumption of an electronic device often neglects the operating performance of the electronic device, such as operating speed and response speed, affecting the user experience.

[0227] The embodiment of the present application proposes a control method for an electronic device. Specifically, when the electronic device is in an operation scenario, the operation status information corresponding to the current operation scenario can be obtained. Based on the operation status information, a target value of an operation parameter is obtained that can reduce the operation power consumption while ensuring a certain operation performance. Because the target value of the operation parameter has the property of reducing the operation power consumption of the electronic device while ensuring a certain operation performance, the electronic device can reduce the operation power consumption while ensuring a certain operation performance when running the target value of the operation parameter, thereby improving the user experience.

[0228] In the above embodiments, the method for determining the first strategy or the second strategy is the same, which will be described in detail below.

[0229] The following first introduces the interaction principle of program modules in the electronic device 100 related to the policy. Figure 9 shows a schematic diagram of the interaction principle of modules related to the operation policy control in an electronic device 100. As shown in Figure 9, the electronic device 100 includes a scene recognition engine, a scheduling engine, a perception middle station, a learning middle station and a decision-making middle station; the scene recognition engine, the scheduling engine, the perception middle station, the learning middle station and the decision-making middle station are program modules running based on the processor 110. The embodiment corresponding to Figure 9 describes how to determine the target policy such as the first policy or the second policy.

[0230] The scene recognition engine is used to identify the operating scene of the electronic device. The scene recognition engine includes a system probe module.

[0231] The perception middle station is used to obtain status information of the electronic device in the operation scenario; wherein the status information is used to characterize the hardware operation status and / or system operation status when the electronic device operates the focus window.

[0232] For example, status information includes one or more of power status information, peripheral status information, process load information, audio and video status information, system load information, and system event information. Hardware operation status may include power status, peripheral status, and audio and video status; system operation status may include process load information and system event information.

[0233] The power status information may include battery (remaining) power, power mode, etc. The power mode may include alternating current (AC) and direct current (DC).

[0234] Peripheral status information may include mouse wheel sliding events, mouse click events, keyboard input events, microphone input events, camera input events, etc.

[0235] Process load information includes the average value of the proportion of CPU time occupied by each process in the system. Process load information can reflect the running status of each process in the system, including system core processes and other user processes.

[0236] The audio and video status information includes the current audio and video events of the electronic device 100. The audio and video events may include GPU decoding events, video events, video frame rate, video subtitles, and the like.

[0237] System load information includes the total number of processes currently being executed by the CPU and waiting to be executed by the CPU. System load information can reflect the important indicator of system busyness.

[0238] System event information may include one or more of window change information, system lock information, process creation information, thread creation information, and the like.

[0239] The operating status information described above is only an example. The operating status information may also be other information used to characterize the hardware operating status and / or system operating status when the electronic device operates the focus window, such as screen brightness, download speed, etc., but is not limited thereto.

[0240] The learning platform is used to train the performance power consumption model; the performance power consumption model is used to determine the operation strategy for limiting the operating power consumption of electronic devices and improving the operating performance of electronic devices.

[0241] The decision-making platform uses the trained performance and power consumption model to determine the operation strategy. This operation strategy includes the target values ​​of the operation parameters. The performance and power consumption model is used to represent the mapping relationship between the state information of the operation scenario and the operation strategy.

[0242] The scheduling engine is used to control the electronic device using the operation strategy.

[0243] S1 to S7 are the process of training the performance and power consumption model, using the trained performance and power consumption model to obtain the operation strategy, and using the operation strategy to control the electronic device. The following will specifically introduce the role of the scene recognition engine and scheduling engine, perception center, learning center, and decision center in this embodiment of the application.

[0244] S1: The perception center can obtain status information from the system probe module in the scene recognition engine.

[0245] The perception center can obtain status information through the system probe module in the scene recognition engine. The status information provided by the system probe module includes probe status information detected by multiple types of probes. Multiple types of probes may include power status probes, peripheral status probes, process load probes, audio and video status probes, system load probes, and system event probes. Among them, the power status probe is used to detect power status information; the peripheral status probe can be used to detect peripheral status information; the process load probe can be used to detect process load information; the audio and video status probe can be used to detect audio and video status information; the system load probe can be used to detect system load information; and the system event probe can be used to detect system event information. Among them, the information detected by each probe can also be called probe status information, that is, the probe status information detected by each probe can be used as running status information. It should be noted that the probe shown in Figure 9 and the probe shown in Figure 3 may be the same.

[0246] In some embodiments, the perception center station may send a request to the system probe module for querying the running status information. In this way, the system probe module may respond to the request and report the running status information to the perception center station.

[0247] It is understood that S1 in the embodiment of the present application can be executed during the model training phase or during the model use phase. If executed during the model training phase, S2 below can be executed after S1 is executed. If executed during the model use phase, S3 below can be executed after S1 is executed.

[0248] S2: The perception center can send the first state information obtained from the system probe module to the learning center. The learning center can use the state information to train the performance and power consumption model.

[0249] The specific training process of the performance power consumption model will be described below.

[0250] S3: When the first event occurs, the perception middle station can send the first event to the decision middle station.

[0251] The first event is an event that affects the operating performance of the electronic device and is used to trigger the electronic device to determine an operating strategy using a performance and power consumption model.

[0252] First events include level 1 events, performance-limited events, or performance-power model training events. Level 1 events include user operation events on the currently focused window, or freeze events. Exemplarily, operation events may include mouse click events, keyboard input events, or operation events for switching applications.

[0253] The performance limitation event is an event reported by the hardware of the electronic device that the hardware performance is limited. The hardware performance limitation may be that the operating speed of the chip of the electronic device is limited.

[0254] The performance power consumption model training event is an event for training the performance power consumption model.

[0255] S4: The decision-making middle station obtains the second state information from the perception middle station based on the first event.

[0256] It can be understood that since the data for training the model and the data for using the model are generally different, the state information used for training the model (i.e., the first state information obtained in S2) and the state information used when using the model (such as the second state information obtained in S3) are different.

[0257] S5: Based on the first event, the decision-making center inputs the second state information into the trained performance and power consumption model to obtain the fourth strategy.

[0258] Optionally, the decision-making center calls the trained performance and power consumption model from the learning center and inputs the second state information into the trained performance and power consumption model to obtain a fourth strategy. The fourth strategy can be a strategy obtained based on the first event trigger in the first scenario, which can be used as the first strategy. The fourth strategy can also be a strategy obtained based on the second event trigger in the second scenario, which can be used as the second strategy.

[0259] Optionally, in some other embodiments, even if not triggered by the first event, in the current scenario, the decision-making middle station can also call the trained performance power consumption model from the learning middle station, and input the second state information under the first scenario or the second scenario into the trained performance power consumption model to obtain the fourth strategy.

[0260] The fourth strategy includes various operating parameters, and the operating strategy may include a combination of one or more operating parameters including PL1, PL2, EPP, emergency power off (EPO) control switch status information, including CPU acceleration (Turbo) switch status information, fan speed, discrete graphics processing unit (DGPU) overspeed value, video memory overclocking value, integrated graphics processing unit (IGPU) minimum frequency, IGPU maximum frequency, DGPU minimum frequency, DGPU maximum frequency, energy-saving display status information, CPU minimum frequency, core binding information and memory cleanup status information.

[0261] Core binding, also known as setting the affinity of a process or thread, involves binding a process or thread to a specific CPU core. This improves performance because the process or thread only runs on the bound CPU core, reducing the time required to switch between multiple cores. However, core binding does not mean that the process or thread has exclusive control over that CPU core; other processes or threads can still run on that core.

[0262] In this way, the operating strategy output by the performance and power consumption model can reduce the operating power consumption of the electronic device while ensuring a certain operating performance, thereby improving the user experience.

[0263] S6: The decision-making center sends the fourth strategy obtained by using the performance and power consumption model to the scheduling engine.

[0264] The decision-making center sends the operation strategy obtained using the performance and power consumption model to the scheduling engine, so that the scheduling engine can control the electronic equipment based on the operation strategy.

[0265] Figure 10 shows a schematic diagram of modules related to operation strategy control in an electronic device 100. Compared with Figure 9, the difference between Figure 10 and Figure 9 is that the decision-making center can instruct the scene recognition engine to compare the fifth strategy and the sixth strategy to obtain the target strategy under the triggering of certain events (hereinafter referred to as the second event). For details, please refer to the contents of S7 and S8. The contents of S7 and S8 are as follows:

[0266] S7: Based on the second event, the decision platform sends an operation policy request to the scenario recognition engine. The operation policy request includes the current operation scenario, the operation policy corresponding to the current operation scenario determined by the decision center calling the performance power consumption model, and the mandatory information of the performance power consumption model. The mandatory information of the performance power consumption model includes the mandatory degree information of the performance power consumption model call and the mandatory reason. For example, the mandatory degree information of the performance power consumption model call is the target policy obtained by comparing the fifth policy and the sixth policy, and the mandatory reason is triggered by the second event.

[0267] If the enforcement level information called by the performance and power consumption model is a target policy obtained by comparing the fifth policy and the sixth policy, and the enforcement reason is triggered by the second event, the scene recognition engine can compare the fifth policy corresponding to the current operating scenario obtained by calling the performance and power consumption model with the sixth policy corresponding to the current operating scenario pre-stored in the scene recognition engine to obtain the target policy and control the electronic device based on the target policy. This solution will be described in detail below.

[0268] Optionally, in some other embodiments, even if not triggered by the second event, in the current scenario, the decision-making middle station can also call the trained performance power consumption model from the learning middle station, and input the second state information under the first scenario or the second scenario into the trained performance power consumption model to obtain the fifth strategy, and obtain the sixth strategy corresponding to the current running scenario pre-stored in the scene recognition engine, compare the fifth strategy and the sixth strategy to obtain the target strategy, and control the electronic device based on the target strategy.

[0269] S8: The scene recognition engine sends the target strategy to the decision platform.

[0270] The scene recognition engine feeds back the target policy to the decision-making center. Then, S6 above can be replaced by: the decision-making center sends the target policy to the scheduling engine. In this way, the scheduling engine can control the electronic device based on the target policy.

[0271] That is to say, if the first event occurs, the decision-making center can determine the fourth strategy corresponding to the current operating scenario (the first scenario or the second scenario) only by calling the performance power consumption model, and report it to the scheduling engine so that it controls the operation of the electronic device according to the fourth strategy. If the second event occurs, the decision-making center not only needs to determine the fifth strategy corresponding to the current operating scenario by calling the performance power consumption model, but also needs to trigger the scene recognition engine to obtain the pre-stored sixth strategy corresponding to the current operating scenario, and obtain the compared target strategy by comparing the two strategies, and report it to the scheduling engine so that it can control the operation of the electronic device based on the target strategy.

[0272] In addition, compared with the embodiment shown in FIG9 , the embodiment shown in FIG10 specifically illustrates the implementation of the perception middle station.

[0273] The perception center station may include a meta-capability acquisition module, which is used to obtain status information from the system probe module.

[0274] Specifically, the meta-capability acquisition module can send the acquired status information to the data center included in the perception center for storage. The meta-capability acquisition module can also be used to implement the above-mentioned operation of determining the first event or the second event based on the status information. In addition, after the meta-capability acquisition module obtains the first event or the second event, it can also send the first event or the second event to the fence module of the perception center, so that the fence module can use the first event to trigger the decision center to obtain status information from the perception center.

[0275] The meta-capability acquisition module can also send the status information corresponding to the current running scenario to the snapshot module, so that the decision-making center can quickly obtain the status information corresponding to the current running scenario from the snapshot module in the perception state.

[0276] FIG11 is a flow chart of a control method for an electronic device. FIG11 corresponds to an embodiment, based on the embodiment corresponding to FIG9 , and further illustrates how to determine the first strategy or the second strategy. The flow includes the following steps:

[0277] S1101: The electronic device obtains status information of the current operation scenario.

[0278] The description of the running scenarios and status information is as above and will not be repeated here.

[0279] S1102: The electronic device receives an event and determines the event type.

[0280] Different event types can determine target value confirmation methods for different strategies. See S1103 and S1104 for details.

[0281] S1103: When a first event occurs, the electronic device responds to the first event by inputting the status information of the current running scenario into the performance power consumption model to obtain the target value of the fourth strategy; wherein the performance power consumption model is used to characterize the mapping relationship between the status information of the running scenario and the target value of the fourth strategy.

[0282] In this application, the first event is an event that affects the operating performance of the electronic device. When the first event occurs, it indicates that the operating performance of the electronic device has degraded, and generally needs to be quickly improved. In addition, since the performance power consumption model can be used to quickly output parameters of the electronic device related to limiting power consumption and improving the operating performance of the electronic device, the electronic device can use the performance power consumption model to quickly output such operating parameters, quickly improve the operating performance of the electronic device, and enhance the user experience.

[0283] The first event may include one or more of a first-level event, a performance-limited event, or a performance-power consumption model training event. The first-level event may include a user operation event on the current focus window, and / or a freeze event. Exemplarily, the operation event may include one or more of a mouse click event, a keyboard input event, or an operation event for switching applications.

[0284] For example, FIG6 is a schematic diagram of an interface provided by an embodiment of the present application. As shown in FIG6(a), the electronic device can display a window 101, which can be a desktop or a main interface. The window 101 includes an icon 102 for a video application. The electronic device can receive an operation in which a user clicks on the icon 102 for the video application. In response to the operation, as shown in FIG6(b), the electronic device displays a window 103, the current scene changes to a video scene, and the mouse click operation is determined as a first event.

[0285] In this way, controlling the electronic device using the operating parameters output by the performance and power consumption model can reduce the operating power consumption of the electronic device while ensuring a certain operating performance, thereby improving the user experience.

[0286] Optionally, in some other embodiments, even if not triggered by the first event, in the current scenario, the electronic device can also utilize the trained performance power consumption model and input the status information of the current scenario (first scenario or second scenario) into the trained performance power consumption model to obtain the fourth strategy.

[0287] S1104: In response to the second event, the electronic device inputs the state information of the current operating scenario into the performance power consumption model to obtain a target value of the fifth strategy, and obtains a target value of the sixth strategy corresponding to the current operating scenario.

[0288] The second event is different from the first event, and the second event may be an evaluation event of the electronic device.

[0289] The second event may also include an event generated by the electronic device after the user uses the electronic device, and the event generally does not affect the operating performance of the electronic device, but affects the power consumption of the electronic device. For example, the second event may be a change in the size of the focus window, a change in CPU / GPU / network usage, a switch between AC and DC modes, the PL1 setting not taking effect, or the power of the electronic device being less than a preset value.

[0290] The electronic device pre-stores a mapping relationship between various operating scenarios and corresponding operating strategies. The electronic device can find the corresponding operating strategy from the aforementioned mapping relationship based on the current operating scenario. The description of how the electronic device determines the current operating scenario can be referred to the description of the relevant content in the aforementioned embodiments and will not be repeated here.

[0291] It is understood that in some embodiments, the electronic device may assign corresponding values ​​to some code parameters based on the first event and the second event. The electronic device may then determine a method for obtaining the operating parameters based on the assigned values ​​of the code parameters, such as whether to obtain the operating parameters by simply calling the model alone or by other methods simultaneously with the calling of the model.

[0292] The following is an example of a code that represents a method of calling a performance and power consumption model.

[0293] The code is as follows:

[0294] <product name="GalileoH"IsSupport="1"

[0295] IsModelSupport="1"ModelControl="1">

[0296] As shown in the above code, the assignment of IsModelSupport can indicate whether the scheduling of the performance power consumption model is supported. The value of IsModelSupport is 0, which means that the scheduling of the performance power consumption model is not supported, that is, the performance power consumption model switch is not turned on, and the performance power consumption model cannot be used. Generally, the value of IsModelSupport is 0 by default; the value of IsModelSupport is 1, which means that the scheduling of the performance power consumption model is supported, that is, the performance power consumption model switch is turned on, and the performance power consumption model can be used.

[0297] The corresponding assignment value of ModelControl can indicate whether the performance power consumption model is scheduled separately. The value of ModelControl is 0, which indicates that the performance power consumption model is scheduled separately. The value of ModelControl is 1, which indicates that the performance power consumption model is not scheduled separately.

[0298] When the first event is triggered, the electronic device may assign IsModelSupport a value of 1 and ModelControl a value of 0; the value of IsModelSupport being 1 and the value of ModelControl being 0 indicate that the performance and power consumption model is called separately, and S1102 is executed.

[0299] When the second event is triggered, the electronic device may assign IsModelSupport and ModelControl to 1; the values ​​of IsModelSupport and ModelControl being 1 indicate that the performance power consumption model can be called while also obtaining operating parameters in other ways, and execute S1103.

[0300] In this way, the electronic device can determine the method for obtaining the operating parameters according to the assignment of IsModelSupport and the assignment of ModelControl in the above code.

[0301] Optionally, in some other embodiments, even if not triggered by the second event, in the current scenario, the electronic device can call the trained performance power consumption model and input the second state information under the first scenario or the second scenario into the trained performance power consumption model to obtain the fifth strategy, and obtain the sixth strategy corresponding to the current scenario pre-stored in the scene recognition engine, compare the fifth strategy and the sixth strategy to obtain the target strategy, and control the electronic device based on the target strategy.

[0302] S1105: The electronic device obtains preset identification information of the current operating scene.

[0303] The preset identification information is used to represent the target tendency of the electronic device in the current operating scenario. The target tendency includes a tendency to reduce operating power consumption or a tendency to improve operating performance. If the target tendency is a tendency to reduce operating power consumption, a target value for a strategy for reducing operating power consumption is determined. For details, see S1106. If the target tendency is a tendency to improve operating performance, a target value for a strategy for improving operating performance is determined. For details, see S1106.

[0304] S1106: The electronic device compares the target value of the fifth strategy with the target value of the sixth strategy based on the preset identification information, obtains the target value of the target strategy, and controls the electronic device based on the target value.

[0305] Specifically, in some embodiments, if the target tendency is to tend to reduce operating power consumption, and the power consumption of the electronic device is lower when the target value of the fifth policy is used to control the electronic device compared to when the target value of the sixth policy is used to control the electronic device, then the target value of the fifth policy is used as the target value of the target policy to control the electronic device. Alternatively, if the target tendency is to tend to reduce operating power consumption, and the power consumption of the electronic device is lower when the target value of the sixth policy is used to control the electronic device compared to when the target value of the fifth policy is used to control the electronic device, then the target value of the sixth policy is used as the target value of the target policy to control the electronic device.

[0306] That is, if the target tendency is to reduce operating power consumption, then the target value that tends to reduce operating power consumption is selected. In this way, the electronic device can control the electronic device based on the target value, reduce the power consumption of the electronic device, and improve the user experience.

[0307] If the target tendency is to improve the operating performance, when the electronic device obtains the target value of the fifth strategy or the target value of the sixth strategy to control the electronic device, the target value that can make the operating performance of the electronic device high is used to control the electronic device.

[0308] Specifically, in some embodiments, if the target tendency is to improve operating performance, and the operating performance of the electronic device is higher when the target value of the fifth policy is used to control the electronic device than when the target value of the sixth policy is used to control the electronic device, the target value of the fifth policy is used to control the electronic device. Alternatively, if the target tendency is to improve operating performance, and the operating performance of the electronic device is higher when the target value of the sixth policy is used to control the electronic device than when the target value of the fifth policy is used to control the electronic device, the target value of the sixth policy is used to control the electronic device.

[0309] That is, if the target tendency is to improve the operating performance, then the target value that tends to improve the operating performance is selected. In this way, the electronic device can control the electronic device based on the target value, improve the operating performance of the electronic device, and enhance the user experience.

[0310] In summary, the electronic device can determine the selection method of operating parameters according to the target tendency, accurately control the operation of the electronic device, and improve the user experience.

[0311] The following describes how to determine the performance power consumption model, that is, the method for training the performance power consumption model, with reference to FIG12 .

[0312] FIG12 shows a flow chart of a method for determining a performance and power consumption model. As shown in FIG12 , the execution subject of the process may be another electronic device connected to the electronic device wirelessly or by wire. The process includes the following steps:

[0313] S1201: In a preset operation scenario, operate the electronic device according to the state information corresponding to the preset operation scenario, and obtain hardware limitation information corresponding to multiple values ​​of the operation parameters.

[0314] The operating parameters are parameters that constitute the strategy (or the operating strategy). The strategy is obtained by inputting state information into a trained performance and power consumption model. The strategy may refer to the fourth strategy or the fifth strategy mentioned above.

[0315] In some embodiments, hardware limitation information may include the average duration of hardware performance limitations. The average duration of hardware performance limitations is the ratio of the hardware performance operation time to the number of hardware performance limitation operations. The number of hardware performance limitation operations is the number of hardware limitations reported by the electronic device's processor during the hardware operation time. Furthermore, the electronic device may be operated in multiple different preset operating scenarios to obtain hardware limitation information, thereby obtaining the training sample data required for training the model.

[0316] The status information has been described above and will not be repeated here.

[0317] Tables 3 to 5 show schematic diagrams of a training sample data acquisition process.

[0318] Table 3

[0319] As shown in Table 3, the status information may include the window size ratio gear, download speed gear, whether the video is being watched, screen brightness, whether the keyboard is inputting, internal storage position, whether the camera is being used, whether the audio is being used, etc.; wherein, the window size ratio gear may be the window change information in the system event information, whether the video is being watched and whether the audio is being used may be audio and video status information, whether the keyboard is being inputted and whether the camera is being used may be peripheral status information, and although the screen brightness and download speed gear are not listed in the above status information, they also belong to status information. The following uses these status information as an example to illustrate the acquisition of the operating parameter PL1 in this operating state. Limited hardware performance may refer to the limited performance feedback of the hardware (such as the CPU) in the electronic device during the reduction of PL1.

[0320] As shown in Table 3, taking the video scene as an example, after the electronic device launches video software 1, it can operate with the following status information: window size ratio at 100%, download speed at 1, video viewing (value 1), screen brightness at 5, no keyboard input (value 0), internal storage at 2, camera not in use (value 1), and audio in use (value 1). In this state, when the PL1 is 45W, 44W, 43W, 42W, 41W, 40W, 39W, 38W, ... 7W, the electronic device can obtain the average duration of hardware performance restriction corresponding to each PL1 value: the average duration of hardware performance restriction corresponding to PL1 values ​​of 45W, 44W, 43W, 42W, ... 12W is inf. This flag indicates that the average duration of hardware performance restriction is greater than 300 seconds. The average duration of hardware performance restriction corresponding to PL1 of 11W is 120, the average duration of hardware performance restriction corresponding to PL1 of 10W is 120, the average duration of hardware performance restriction corresponding to PL1 of 9W is 40, the average duration of hardware performance restriction corresponding to PL1 of 8W is 1, and the average duration of hardware performance restriction corresponding to PL1 of 7W is 1.

[0321] Taking the browser scenario as an example, after opening browser 1, the electronic device can operate with the following status information: window size ratio of 90%, download speed of 1, no video (value of 0), screen brightness of 5, no keyboard input (value of 0), memory card bit of 2, camera not in use (value of 0), and audio not in use (value of 0). In this state, when the PL1 is 45W, 44W, 43W, 42W, 41W, 40W, 39W, 38W, ... 7W, the electronic device can obtain the average duration of hardware performance restriction corresponding to each PL1 value: the average duration of hardware performance restriction corresponding to PL1 values ​​of 45W, 44W, 43W, 42W, ... 10W is inf. Here, this flag indicates that the average duration of hardware performance restriction is greater than 300 seconds. The average duration of hardware performance restriction corresponding to a PL1 of 9W is 157 seconds, the average duration of hardware performance restriction corresponding to a PL1 of 8W is 32 seconds, and the average duration of hardware performance restriction corresponding to a PL1 of 7W is 9 seconds.

[0322] After launching the programming software, the electronic device can operate with the following status information: window size ratio at 90%, download speed at 1, no video (value 0), screen brightness at 5, keyboard input enabled (value 1), internal storage at 2, camera not in use (value 0), and audio not in use (value 0). In this state, when the PL1 is 45W, 44W, 43W, 42W, 41W, 40W, 39W, 38W, ... 7W, the electronic device can obtain the average duration of hardware performance restriction corresponding to each PL1 value: the average duration of hardware performance restriction corresponding to PL1 values ​​of 45W, 44W, 43W, 42W, ... 10W is inf. Here, this indicator indicates that the average duration of hardware performance restriction is greater than 300 seconds. The average duration of hardware performance restriction corresponding to a PL1 of 9W is 115 seconds, the average duration of hardware performance restriction corresponding to a PL1 of 8W is 45 seconds, and the average duration of hardware performance restriction corresponding to a PL1 of 7W is 12 seconds.

[0323] Figure 13 shows a schematic diagram of obtaining the average duration of hardware performance restriction. As shown in Figure 13 (a), based on a PL1 of 45W, 1W is continuously subtracted or added to obtain the average duration of hardware performance restriction. When the average duration of hardware performance restriction reaches the PL1 restriction boundary of 300 seconds, as shown in Figure 13 (b), 1W is continuously subtracted or added to the previously obtained PL1 restriction boundary to obtain the average duration of hardware performance restriction.

[0324] S1202: If the hardware restriction information corresponding to the first value among the multiple values ​​of the operating parameter meets the preset restriction condition, the first value of the operating parameter is marked with an experience-impaired label; if the hardware restriction information corresponding to the second value among the multiple values ​​of the operating parameter does not meet the preset restriction condition, the second value of the operating parameter is marked with an experience-unimpaired label.

[0325] The hardware limitation information satisfies the preset limitation condition by, for example, an average duration of hardware performance limitation being less than a first standard value. The first standard value may be defined based on actual conditions, for example, 300 seconds. The hardware limitation information does not satisfy the preset limitation condition by, for example, an average duration of hardware performance limitation being greater than or equal to the first standard value.

[0326] For example, taking PL1 among the operating parameters as an example, if the average duration of hardware performance restriction for a first value among multiple PL1 values ​​is less than a first standard value, the first PL1 value is labeled as "impaired experience." If the average duration of hardware performance restriction for a second value among multiple PL1 values ​​is greater than or equal to the first standard value, the second PL1 value is labeled as "unimpaired experience."

[0327] Table 4

[0328] As shown in Table 4, the difference between Table 4 and Table 3 is that in Table 3, the values ​​of the operating parameters whose hardware restriction information meets the preset restriction conditions are marked with 1. Among them, 1 indicates a label of impaired experience, and 0 indicates a label of unimpaired experience.

[0329] As shown in Table 4, after the electronic device starts video software 1, it can operate with the following status information: window size ratio at 100%, download speed at 1, video viewing (value of 1), screen brightness at 5, no keyboard input (value of 0), internal storage at 2, camera not in use (value of 1), and audio in use (value of 1). In this status information, when PL1 is 45W, 44W, 43W, 42W, 41W, 40W, 39W, 38W, ... 7W, the average duration of hardware performance limitation corresponding to PL1 of 45W, 44W, 43W, 42W, ... 12W is greater than 300 seconds, and these PL1 values ​​are marked as 0. When PL1 is 11W, 10W, 9W, 8W, and 7W, the average duration of hardware performance limitation corresponding to hardware performance limitation is less than 300 seconds, and these PL1 values ​​are marked as 1.

[0330] After opening the browser 1, the electronic device can operate with the following status information: window size ratio of 90%, download speed of 1, no video (value of 0), screen brightness of 5, no keyboard input (value of 0), internal storage bit of 2; camera not in use (value of 0), and audio not in use (value of 0). Under this status information, when PL1 is 45W, 44W, 43W, 42W, 41W, 40W, 39W, 38W, ... 7W, the average duration of hardware performance limitation corresponding to PL1 of 45W, 44W, 43W, 42W, ... 10W is greater than 300 seconds, and these PL1 values ​​are marked as 0. The average duration of hardware performance limitation corresponding to PL1 of 9W, 8W, and 7W is less than 300 seconds, and these PL1 values ​​are marked as 1.

[0331] After the programming software is enabled on an electronic device, the device can be operated with the following status information: window size ratio set to 90%, download speed set to 1, no video (value 0), screen brightness set to 5, keyboard input enabled (value 1), internal storage bit set to 2, camera not in use (value 0), and audio not in use (value 0). In this status information, when the PL1 is 45W, 44W, 43W, 42W, 41W, 40W, 39W, 38W, ... 7W, the average duration of hardware performance restriction corresponding to PL1 of 45W, 44W, 43W, 42W, ... 10W is greater than 300 seconds, and these PL1 values ​​are marked as 0. When the PL1 is 9W, 8W, or 7W, the average duration of hardware performance restriction corresponding to hardware performance restriction is less than 300 seconds, and these PL1 values ​​are marked as 1.

[0332] S1203: Determine the user experience impairment rate of multiple values ​​of the operating parameters; wherein the user experience impairment rate is the ratio of the number of performance limitations detected by the operating system of the electronic device under a preset number of detections to the preset number of detections in a preset operating scenario of the electronic device.

[0333] The user experience impairment rate in the embodiment of the present application is the performance limitation of user-level feedback.

[0334] Table 5

[0335] As shown in Table 5, the difference between Table 5 and Table 4 is that Table 5 marks the user experience impairment rate for multiple values ​​of the operating parameters.

[0336] As shown in Table 5, after launching video software 1, the electronic device can operate with the following status information: window size ratio set to 100%, download speed set to 1, video viewing (value 1), screen brightness set to 5, no keyboard input (value 0), internal storage bit set to 2, camera not used (value 1), and audio used (value 1). Under these status information, the corresponding user experience impairment rates for PL1 values ​​of 45W, 44W, ..., 13W, 12W, 11W, 10W, 8W, 8W, and 7W are 0.001, 0.001, ..., 0.21, 0.451, 0.512, 0.586, 0.671, 0.721, and 0.895, respectively.

[0337] After opening Browser 1 on an electronic device, it can operate with the following status information: window size ratio set to 90%, download speed set to 1, no video (value 0), screen brightness set to 5, no keyboard input (value 0), internal storage bit set to 2, camera not used (value 0), and audio not used (value 0). Under these status information, the corresponding user experience impairment rates for PL1 values ​​of 45W, 44W, ..., 13W, 12W, 11W, 10W, 8W, 8W, and 7W are 0.001, 0.001, ..., 0.134, 0.257, 0.339, 0.4, 0.87, 0.753, and 0.881, respectively.

[0338] After programming software is enabled on an electronic device, it can be operated with the following settings: window size ratio set to 90%, download speed set to 1, no video (value 0), screen brightness set to 5, keyboard input enabled (value 1), internal storage set to 2, camera disabled (value 0), and audio disabled (value 0). Under these settings, the corresponding user experience impairment rates for PL1 values ​​of 45W, 44W, ..., 13W, 12W, 11W, 10W, 8W, 8W, and 7W are 0.001, 0.001, ..., 0.095, 0.145, 0.223, 0.389, 0.01, 0.679, and 0.723, respectively.

[0339] S1204: Training a user experience impairment rate prediction model based on the state information, the first value of the labeled operating parameter, the second value of the labeled operating parameter, and the user experience impairment rates of the multiple values ​​of the operating parameter.

[0340] In some embodiments, the status information can be used as the input of the user experience impairment rate prediction model, and the first value of the labeled operating parameter, the second value of the labeled operating parameter, and the user experience impairment rate of multiple values ​​of the operating parameter can be used as the output of the user experience impairment rate prediction model to train the user experience impairment rate prediction model.

[0341] It can be understood that the values ​​of the operating parameters in the training samples are marked with the experience impairment label, the experience non-impaired label and the user experience impairment rate. The experience impairment label can characterize whether it affects the hardware performance (operating power consumption) of the electronic device, and the user experience impairment rate is used to characterize the magnitude of the impact on the operating performance of the electronic device. By using the training sample to train the user experience impairment rate prediction model, the electronic device can obtain the values ​​of the operating parameters that can indicate whether it affects the operating power consumption and operating performance of the electronic device through the trained user experience impairment rate prediction model, and obtain the target value of the operating parameter that reduces the operating power consumption of the electronic device and improves the operating performance of the electronic device. The electronic device uses the target value of the operating parameter to control the electronic device, which can reduce the operating power consumption of the electronic device and improve the operating performance of the electronic device, thereby improving the user experience.

[0342] The performance and power consumption model includes the above-mentioned user experience impairment rate prediction model and the operating parameter output module.

[0343] The user experience impairment rate prediction model is designed to output multiple user experience impairment rates corresponding to multiple values ​​of operating parameters, as well as labels for impaired and unimpaired experiences for each of these multiple values ​​of the operating parameters. The multiple values ​​of the operating parameters are set based on the actual needs of the technician. During the process of acquiring training samples, the electronic device can be adjusted sequentially to these multiple values ​​to acquire additional data from the training samples.

[0344] The operation parameter output module is used to select the minimum value marked with an unimpaired experience label and a user experience impairment rate less than a preset value from multiple values ​​of the operation parameter as the target value of the operation parameter.

[0345] Taking the preset value of 0.5 as an example, as shown in Table 5, after launching video software 1, the electronic device can operate with the following status information: window size ratio set to 100%, download speed set to 1, video viewing (value of 1), screen brightness set to 5, no keyboard input (value of 0), internal storage bit set to 2, camera not used (value of 1), and audio used (value of 1). Under these status information, the corresponding user experience impairment rates for PL1 values ​​of 45W, 44W, ..., 13W, 12W, 11W, 10W, 8W, 8W, and 7W are 0.001, 0.001, ..., 0.21, 0.451, 0.512, 0.586, 0.671, 0.721, and 0.895, respectively.

[0346] The minimum value 12W among the multiple values ​​of PL1 with a user experience impairment rate less than 0.5 and marked as having an experience not impaired label can be used as the target value of the operating parameter.

[0347] After opening Browser 1 on an electronic device, it can operate with the following status information: window size ratio set to 90%, download speed set to 1, no video (value 0), screen brightness set to 5, no keyboard input (value 0), internal storage bit set to 2, camera not used (value 0), and audio not used (value 0). Under these status information, the corresponding user experience impairment rates for PL1 values ​​of 45W, 44W, ..., 13W, 12W, 11W, 10W, 8W, 8W, and 7W are 0.001, 0.001, ..., 0.134, 0.257, 0.339, 0.4, 0.87, 0.753, and 0.881, respectively.

[0348] The minimum value 10W among the multiple values ​​of PL1 with a user experience impairment rate less than 0.5 and marked as having an experience not impaired label is used as the target value of the operating parameter.

[0349] After programming software is enabled on an electronic device, it can be operated with the following settings: window size ratio set to 90%, download speed set to 1, no video (value 0), screen brightness set to 5, keyboard input enabled (value 1), internal storage set to 2, camera disabled (value 0), and audio disabled (value 0). Under these settings, the corresponding user experience impairment rates for PL1 values ​​of 45W, 44W, ..., 13W, 12W, 11W, 10W, 8W, 8W, and 7W are 0.001, 0.001, ..., 0.095, 0.145, 0.223, 0.389, 0.01, 0.679, and 0.723, respectively.

[0350] The minimum value 10W among the multiple values ​​of PL1 with a user experience impairment rate less than 0.5 and marked as having an experience not impaired label is used as the target value of the operating parameter.

[0351] An embodiment of the present application further provides a computer storage medium, which includes computer instructions. When the computer instructions are executed on the above-mentioned electronic device, the electronic device executes the various functions or steps executed by the mobile phone in the above-mentioned method embodiment.

[0352] The embodiment of the present application further provides a computer program product, which, when executed on a computer, enables the computer to execute the functions or steps executed by the mobile phone in the above method embodiment.

[0353] It is understandable that the electronic device provided in the embodiment of the present application includes a hardware structure and / or software module for performing each function in order to realize the above functions. Those skilled in the art should easily appreciate that, in combination with the units and algorithm steps of each example described in the embodiment disclosed herein, the embodiment of the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in a hardware or computer software driven hardware manner depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the embodiment of the present application.

[0354] The embodiment of the present application can divide the functional modules of the above-mentioned electronic device according to the above-mentioned method example. For example, each functional module can be divided corresponding to each function, or two or more functions can be integrated into one processing module. The above-mentioned integrated module can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiment of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation.

[0355] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0356] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the modules or units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0357] The units described as separate components may or may not be physically separate, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple places. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0358] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0359] 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 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, which is stored in a storage medium and includes several instructions for enabling a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to execute 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 a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0360] The above content is only a specific embodiment of this application, but the scope of protection of this application is not limited to this. Any changes or replacements within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.

Claims

1. A method for controlling an electronic device, wherein the method is applied to the electronic device, and is characterized in that: include: The electronic device displays a first window; When the first window is the focus window, the electronic device operates according to a first strategy; the first window corresponds to a performance scenario; In response to the focus window switching from the first window to the second window, the electronic device operates according to a third strategy; wherein, the second window corresponds to a power consumption scenario, the second strategy corresponds to the power consumption scenario, and the third strategy is obtained based on the first strategy and the second strategy.

2. The method according to claim 1, characterized in that Before the electronic device operates according to the third strategy, the method further includes: Determine that a value of an operating parameter in the third strategy is a larger value of the values ​​of corresponding operating parameters in the first strategy and the third strategy; the operating parameter includes a CPU parameter and / or a GPU parameter.

3. The method according to claim 1, characterized in that Before the electronic device operates according to the third strategy, the method further includes: When the first CPU parameter in the first policy is not equal to the second CPU parameter in the second policy, determining the third CPU parameter in the third policy to be a larger value between the first CPU parameter and the second CPU parameter; wherein the first CPU parameter, the second CPU parameter, and the third CPU parameter are CPU parameters of the same type.

4. The method according to claim 3, characterized in that Before the electronic device operates according to the third strategy, the method further includes: When the first CPU parameter is the same as the second CPU parameter and the first GPU parameter in the first policy is not equal to the second GPU parameter in the second policy, determining the third GPU parameter in the third policy to be a larger value between the first GPU parameter and the second GPU parameter; wherein the first GPU parameter, the second GPU parameter, and the third GPU parameter are GPU parameters of the same type.

5. The method according to claim 3, characterized in that Before the electronic device operates according to the third strategy, the method further includes: When the first CPU parameter is different from the second CPU parameter and the first GPU parameter in the first policy is not equal to the second GPU parameter in the second policy, determining the third GPU parameter in the third policy to be the second GPU parameter; wherein the first GPU parameter, the second GPU parameter, and the third GPU parameter are parameters of the same type.

6. The method according to any one of claims 4-5, characterized in that The CPU parameters in the first and third strategies include PL1, PL2, CPU energy efficiency ratio, EPO control switch parameter, CPU Turbo control parameter, CPU minimum frequency and core binding parameter; The GPU parameters in the first and third strategies include any one or more combinations of GPU minimum frequency, memory overclocking value GPUOC, DGPU overspeed value, IGPU minimum frequency, IGPU maximum frequency, DGPU minimum frequency, and DGPU maximum frequency.

7. The method according to claim 1, characterized in that The electronic device operates according to a third strategy, including: Determining whether a first scenario corresponding to the first window is a performance scenario, and a second scenario corresponding to the second window is a power consumption scenario; It is determined that the first scenario is a performance scenario and the second scenario is a power consumption scenario, and the electronic device operates according to a third strategy.

8. The method according to claim 7, characterized in that The method further includes: if it is determined that the first scenario is a power consumption scenario and the second scenario is a performance scenario, the electronic device operates according to a second policy; or if it is determined that the first scenario is a power consumption scenario and the second scenario is a power consumption scenario, the electronic device operates according to the second policy; Alternatively, if it is determined that the first scenario is a performance scenario and the second scenario is a performance scenario, the electronic device operates according to the second strategy.

9. The method according to claim 1, characterized in that The electronic device operates according to a third strategy, including: Determining whether a first scenario corresponding to the first window is a performance scenario, and a second scenario corresponding to the second window is a power consumption scenario; Determining that the first scenario is a performance scenario and the second scenario is a power consumption scenario, and the electronic device operates according to a third policy; Determining whether a process corresponding to the first window exists; if the process corresponding to the first window exists, determining whether a load level of the process corresponding to the first window is reduced to light load; It is determined that the load level of the process corresponding to the first window has not been reduced to light load, a third policy obtained based on the first policy and the second policy is determined, and the electronic device operates according to the third policy.

10. The method according to claim 9, characterized in that The method further comprises: If the process corresponding to the first window does not exist, the electronic device executes according to the second policy; Alternatively, if the process corresponding to the first window exists and the load level of the process corresponding to the first window is reduced to light load, the electronic device executes according to the second policy.

11. The method according to any one of claims 1 to 10, characterized in that The method further comprises: Obtaining operating status information in a target scenario; wherein the target scenario is used to describe a scenario in which the electronic device performs a task in a focus window in response to a user's operation; and the operating status information is used to characterize a hardware operating condition and / or a system operating condition when the electronic device operates the focus window; Determining a target strategy based on the operating status information; the target strategy includes a target value of an operating parameter; wherein the operating parameter is a parameter that affects the operating power consumption of the electronic device and the operating performance of the electronic device; The target scenario is a first scenario corresponding to the first window, and the target policy is the first policy; or the target scenario is a second scenario corresponding to the second window, and the target policy is the second policy.

12. The method according to claim 11, characterized in that The determining of a target strategy based on the operating status information includes: In response to the first event, the state information corresponding to the target scenario is input into the performance power consumption model to obtain a fourth strategy; wherein the performance power consumption model is used to characterize the mapping relationship between the state information and the strategy; the first event is an event that affects the operating performance of the electronic device The fourth strategy is used as the target strategy.

13. The method according to claim 11, characterized in that The determining of a target strategy based on the operating status information includes: In response to the second event, inputting the state information corresponding to the target scenario into the performance power consumption model to obtain a fifth strategy; obtaining a sixth strategy corresponding to the target scenario; wherein the electronic device stores a mapping relationship between scenarios and strategies; obtaining preset identification information of the target scenario; wherein the preset identification information is used to characterize a target tendency of the electronic device in the target scenario, wherein the target tendency includes a tendency to reduce operating power consumption or a tendency to improve operating performance; When the first condition is met, the fifth strategy is used as the target strategy; the first condition includes: the target tendency is to reduce operating power consumption, and compared with the sixth strategy for controlling the electronic device, the power consumption of the electronic device is low when the fifth strategy is used to control the electronic device; or, the target tendency is to improve operating performance, and compared with the sixth strategy for controlling the electronic device, the operating performance of the electronic device is high when the fifth strategy is used to control the electronic device.

14. The method according to claim 13, wherein: The method further comprises: When the second condition is met, the sixth strategy is used as the target strategy: the second condition includes: the target tendency is to reduce operating power consumption, and compared with the fifth strategy being used to control the electronic device, the power consumption of the electronic device is low when the sixth strategy is used to control the electronic device; or, the target tendency is to improve operating performance, and compared with the fifth strategy being used to control the electronic device, the operating performance of the electronic device is high when the sixth strategy is used to control the electronic device.

15. An electronic device, characterized in that: The electronic device comprises: a memory and one or more processors; wherein the memory is used to store computer program code, and the computer program code includes computer instructions; when the computer instructions are executed by the processor, the electronic device executes the method according to any one of claims 1 to 14.

16. A computer-readable storage medium, characterized in that The method comprises computer instructions; when the computer instructions are executed on an electronic device, the electronic device is caused to execute the method according to any one of claims 1 to 14.

17. A computer program product, characterized in that When the computer program product is run on a computer, the computer is caused to perform the method according to any one of claims 1 to 14.