WO2024093491A9 - Performance regulation method and electronic device - Google Patents
Performance regulation method and electronic device Download PDFInfo
- Publication number
- WO2024093491A9 WO2024093491A9 PCT/CN2023/116072 CN2023116072W WO2024093491A9 WO 2024093491 A9 WO2024093491 A9 WO 2024093491A9 CN 2023116072 W CN2023116072 W CN 2023116072W WO 2024093491 A9 WO2024093491 A9 WO 2024093491A9
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- parameter value
- performance
- gpu
- electronic device
- parameter
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 337
- 230000033228 biological regulation Effects 0.000 title abstract description 9
- AYEKOFBPNLCAJY-UHFFFAOYSA-O thiamine pyrophosphate Chemical compound CC1=C(CCOP(O)(=O)OP(O)(O)=O)SC=[N+]1CC1=CN=C(C)N=C1N AYEKOFBPNLCAJY-UHFFFAOYSA-O 0.000 claims abstract description 44
- 238000012545 processing Methods 0.000 claims description 28
- 230000004044 response Effects 0.000 claims description 21
- 238000004590 computer program Methods 0.000 claims description 6
- 230000002035 prolonged effect Effects 0.000 abstract 1
- 230000008569 process Effects 0.000 description 256
- 239000000523 sample Substances 0.000 description 101
- 230000006870 function Effects 0.000 description 28
- 230000002093 peripheral effect Effects 0.000 description 26
- 230000008859 change Effects 0.000 description 21
- 238000007726 management method Methods 0.000 description 17
- 238000010586 diagram Methods 0.000 description 13
- 238000004891 communication Methods 0.000 description 8
- 238000012360 testing method Methods 0.000 description 8
- 238000013461 design Methods 0.000 description 7
- 238000005516 engineering process Methods 0.000 description 6
- 230000003993 interaction Effects 0.000 description 6
- 238000012544 monitoring process Methods 0.000 description 6
- 101100012902 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) FIG2 gene Proteins 0.000 description 4
- 238000009877 rendering Methods 0.000 description 4
- 230000001276 controlling effect Effects 0.000 description 3
- 101001121408 Homo sapiens L-amino-acid oxidase Proteins 0.000 description 2
- 101000827703 Homo sapiens Polyphosphoinositide phosphatase Proteins 0.000 description 2
- 102100026388 L-amino-acid oxidase Human genes 0.000 description 2
- 102100023591 Polyphosphoinositide phosphatase Human genes 0.000 description 2
- 101100233916 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) KAR5 gene Proteins 0.000 description 2
- 238000004422 calculation algorithm Methods 0.000 description 2
- 238000004364 calculation method Methods 0.000 description 2
- 238000013500 data storage Methods 0.000 description 2
- 230000009977 dual effect Effects 0.000 description 2
- 230000004927 fusion Effects 0.000 description 2
- 230000017525 heat dissipation Effects 0.000 description 2
- 230000020169 heat generation Effects 0.000 description 2
- 238000011112 process operation Methods 0.000 description 2
- 238000013515 script Methods 0.000 description 2
- 101100498818 Arabidopsis thaliana DDR4 gene Proteins 0.000 description 1
- 238000004458 analytical method Methods 0.000 description 1
- 230000000295 complement effect Effects 0.000 description 1
- 238000001816 cooling Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 229910044991 metal oxide Inorganic materials 0.000 description 1
- 150000004706 metal oxides Chemical class 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000011056 performance test Methods 0.000 description 1
- 230000001105 regulatory effect Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 238000013112 stability test Methods 0.000 description 1
- 238000010561 standard procedure Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/3003—Monitoring arrangements specially adapted to the computing system or computing system component being monitored
- G06F11/3024—Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a central processing unit [CPU]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/3058—Monitoring arrangements for monitoring environmental properties or parameters of the computing system or of the computing system component, e.g. monitoring of power, currents, temperature, humidity, position, vibrations
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/3058—Monitoring arrangements for monitoring environmental properties or parameters of the computing system or of the computing system component, e.g. monitoring of power, currents, temperature, humidity, position, vibrations
- G06F11/3062—Monitoring arrangements for monitoring environmental properties or parameters of the computing system or of the computing system component, e.g. monitoring of power, currents, temperature, humidity, position, vibrations where the monitored property is the power consumption
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Definitions
- the present application relates to the technical field of intelligent terminals, and in particular to a performance control method and an electronic device.
- the present application provides a performance control method and an electronic device.
- the performance parameters of the electronic device can be adjusted according to the current user scenario of the electronic device, so that the graphics card can perform performance control according to the current TDP, TPP, TGP and/or DB power consumption, so that more reasonable CPU and GPU performance can be provided according to the scenario, which not only better meets the performance requirements of users in various scenarios, but also can relatively improve the battery life of the device, thereby improving the user experience.
- the present application provides a performance control method, which is applied to an electronic device, wherein the electronic device includes a central processing unit (CPU) and a graphics processing unit (GPU), and the method includes:
- a first application is started.
- a first performance parameter of the electronic device is a first parameter value, and the first performance parameter includes at least one of a TDP power consumption of the CPU, a TGP power consumption of the GPU, a TPP power consumption of the GPU, and a DB power consumption of the GPU;
- a first performance parameter of the electronic device is adjusted to a second parameter value, the second parameter value being different from the first parameter value;
- the first performance parameter of the electronic device is adjusted to a third parameter value, and the third parameter value is different from the second parameter value.
- the performance requirement of the electronic device can be determined according to the application currently running on the electronic device, and the first performance parameter of the electronic device can be adjusted according to the performance requirement of the electronic device, and the first performance parameter includes at least one of the TDP power consumption of the CPU, the TGP power consumption of the GPU, the TPP power consumption of the GPU, and the DB power consumption of the GPU.
- One method is to enable the graphics card to adjust its performance according to the current TDP, TPP, TGP and/or DB power consumption, so as to provide more reasonable CPU and GPU performance according to the scenario, which not only better meets the performance requirements of users in various scenarios, but also can relatively improve the battery life of the device, thereby improving the user experience.
- the method further includes:
- a third application is started, and before the third application is started, a second performance parameter of the electronic device is a fourth parameter value, and the second performance parameter includes a Dx value of the GPU;
- the second performance parameter of the electronic device is adjusted to a sixth parameter value, and the sixth parameter value is different from the fifth parameter value.
- the performance requirements of the electronic device can be determined according to the current user scenario of the electronic device, and the second performance parameter of the electronic device can be adjusted according to the performance requirements of the electronic device.
- the second performance parameter includes the Dx value of the GPU, so that the graphics card performs performance regulation according to the power consumption corresponding to the current Dx value, thereby providing a more reasonable GPU performance according to the scenario, which not only better meets the performance requirements of users in various scenarios, but also can relatively improve the battery life of the device, thereby improving the user experience.
- the method further includes:
- a second performance parameter of the electronic device is a seventh parameter value, the second performance parameter includes a Dx value of the GPU, and the fifth time point is after the first time point and/or the second time point;
- the remaining battery power of the electronic device at the fifth time point is less than the remaining battery power at the first time point and/or the second time point, and the electronic device is not plugged in at the fifth time point;
- the temperature of the electronic device at the fifth time point is greater than the temperature at the first time point and/or the second time point.
- This setting can reduce device heat or power consumption and improve device battery life by limiting GPU power consumption when the temperature of the electronic device is too high or the battery is low.
- the method further includes:
- the user scenario of the electronic device is determined according to the second application, and the size of the third parameter value is determined according to the user scenario of the electronic device.
- the performance parameters of the electronic device can be adjusted according to the current user scenario of the electronic device, so that the graphics card can perform performance regulation according to the current TDP, TPP, TGP and/or DB power consumption, thereby providing more reasonable CPU and GPU performance according to the scenario, which not only better meets the performance requirements of users in various scenarios, but also can relatively improve the battery life of the device, thereby improving the user experience.
- the method further includes:
- the third parameter value is sent to the GPU driver, and the GPU driver controls the performance of the GPU according to the third parameter value.
- This setting allows the graphics card to adjust its performance based on the current TDP, TPP, TGP and/or DB power consumption, thereby providing more reasonable CPU and GPU performance based on the scenario. It not only better meets the user's performance requirements in various scenarios, but also can relatively improve the device's battery life, thereby improving the user experience.
- the electronic device further includes BIOS and ACPI,
- Sending the second parameter value to a GPU driver, wherein the GPU driver controls the performance of the GPU according to the second parameter value, includes:
- the BIOS writes the second parameter value into the first performance parameter storage location specified by the ACPI, and reads the second parameter value through the GPU driver;
- the GPU driver reads the second parameter value, and controls the performance of the GPU according to the second parameter value
- Sending the third parameter value to a GPU driver, wherein the GPU driver controls the performance of the GPU according to the third parameter value, includes:
- the BIOS writes the third parameter value into the first performance parameter storage location specified by the ACPI, and reads the second parameter value through the GPU driver;
- the GPU driver reads the third parameter value and controls the performance of the GPU according to the third parameter value.
- This setting can send the current parameter value of the first performance parameter to the GPU driver through the WMI interface and BIOS, ensuring that the GPU driver obtains the current parameter value stably and timely, and performs performance control according to the current parameter value.
- the method further includes:
- the sixth parameter value is sent to the GPU driver, and the GPU driver controls the performance of the GPU according to the sixth parameter value.
- This setting allows the graphics card to adjust performance according to the current Dx value, thereby providing more reasonable CPU and GPU performance according to the scenario. It not only better meets the performance requirements of users in various scenarios, but also can relatively improve the battery life of the device, thereby improving the user experience.
- the electronic device further includes BIOS and ACPI,
- the fifth parameter value is sent to the GPU driver, and the GPU driver controls the GPU performance, including:
- the BIOS writes the fifth parameter value into the second performance parameter storage location specified by the ACPI, and reads the third parameter value through the GPU driver;
- the GPU driver reads the fifth parameter value and controls the performance of the GPU according to the fifth parameter value
- Sending the sixth parameter value to a GPU driver, wherein the GPU driver controls the performance of the GPU according to the sixth parameter value, includes:
- the BIOS writes the sixth parameter value into the second performance parameter storage location specified by the ACPI, and reads the sixth parameter value through the GPU driver;
- the GPU driver reads the sixth parameter value and controls the performance of the GPU according to the sixth parameter value.
- This setting can send the current parameter value of the second performance parameter to the GPU driver through the WMI interface and BIOS, ensuring that the GPU driver obtains the current parameter value stably and timely, and performs performance control according to the current parameter value.
- the present application provides an electronic device, comprising: a memory and a processor, wherein the memory and the processor are coupled; the memory stores program instructions, and when the program instructions are executed by the processor, the electronic device executes the performance control method in the first aspect or any possible implementation of the first aspect.
- the present application provides a computer-readable medium for storing a computer program, wherein the computer program includes instructions for executing the method in the first aspect or any possible implementation of the first aspect.
- the present application provides a computer program, comprising instructions for executing the method in the first aspect or any possible implementation of the first aspect.
- the present application provides a chip, the chip comprising a processing circuit and a transceiver pin, wherein the transceiver pin and the processing circuit communicate with each other through an internal connection path, and the processing circuit executes the method in the first aspect or any possible implementation of the first aspect to control the receiving pin to receive a signal and control the sending pin to send a signal.
- FIG1 is a schematic diagram showing an exemplary module interaction of a current temperature monitoring method
- FIG2 is a schematic diagram showing a hardware structure of an electronic device
- FIG3 is a schematic diagram showing an exemplary software structure of an electronic device
- FIG4 is a schematic diagram of interaction between software modules provided in an embodiment of the present application.
- FIG5 is a schematic diagram of a signal interaction provided in an embodiment of the present application.
- FIG6 is an interface diagram provided in an embodiment of the present application.
- FIG7 is another schematic diagram of signal interaction provided in an embodiment of the present application.
- FIG8 is a flow chart of a performance control method provided in an embodiment of the present application.
- FIG9 is an example control process of the performance control method provided in an embodiment of the present application.
- FIG10 is another exemplary control process of the performance control method provided in an embodiment of the present application.
- FIG. 11 shows a schematic block diagram of a device according to an embodiment of the present application.
- a and/or B in this article is merely a description of the association relationship of associated objects, indicating that three relationships may exist.
- a and/or B can mean: A exists alone, A and B exist at the same time, and B exists alone.
- first and second in the description and claims of the embodiments of the present application are used to distinguish different objects rather than to describe a specific order of objects.
- a first target object and a second target object are used to distinguish different target objects rather than to describe a specific order of target objects.
- words such as “exemplary” or “for example” are used to indicate examples, illustrations or descriptions. Any embodiment or design described as “exemplary” or “for example” in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as “exemplary” or “for example” is intended to present related concepts in a specific way.
- multiple refers to two or more than two.
- multiple processing units refer to two or more processing units; multiple systems refer to two or more systems.
- BIOS Basic Input Output System.
- BIOS is a set of programs that are fixed to a ROM chip on the motherboard of the computer. It stores the most important basic input and output programs of the computer, system setting information, power-on self-test program and system boot program.
- the main function of BIOS is to provide the lowest-level and most direct hardware settings and control for the computer.
- the interfaces provided by BIOS to the operating system include BS (Boot Services) and RT (Runtime Services).
- BIOS is also called VGA BIOS or Video BIOS. It is mainly used to store the control program between the display chip and the driver. It controls various working states of the graphics card, including core operating frequency, video memory operating frequency, power consumption limit, operating voltage, video memory timing and other core parameters.
- the graphics card BIOS chip is used to save the graphics card BIOS program. Like the motherboard BIOS, the graphics card BIOS is stored in the BIOS chip instead of the disk.
- NVAPI is an interface provided by NVIDIA (NVIDIA/Nvidia) for third-party calls to monitor the temperature, performance parameters, etc. of graphics cards.
- ACPI Advanced Configuration and Power Interface
- BIOS system hardware/firmware
- OS operating system
- ACPI operating system
- BIOS provides communication between operating system and hardware through a unified interface
- ACPI is an implementation of this unified interface in BIOS.
- ACPI provides two types of data structures for the operating system (OS): data tables and definition blocks. They are OS (operating system)
- the ACPI interface is an interface for the BIOS/EFI firmware to interact with the system.
- the data table stores raw data and is used by the device driver.
- the definition block consists of bytecodes that can be executed by the interpreter.
- the data table part is generated by the firmware (BIOS/EFI) and is used to describe various aspects of the system hardware.
- the ACPI interface contains many predefined tables, the definitions of which are stored in the BIOS chip and generated by the BIOS into the memory and submitted to the operating system.
- ACPI control method is similar to the function in C language.
- the function of AML is called Method.
- BIOS provides some standard methods for OS to call, such as _PTS, _WAK, etc.
- the control method defines how OS performs a simple hardware task. For example, OS calls the control method (ControlMethod) to read the temperature of a high temperature area.
- WMI Windows Management Instrumentation
- Windows Management Specification provides a unified interface for any local or remote application or script to obtain management data from a computer system, network, or enterprise.
- the design of this unified interface makes it unnecessary for WMI client applications and scripts to call various operating system application programming interfaces (APIs).
- APIs operating system application programming interfaces
- NVIDIA Dynamic Boost is a new technology that more intelligently allocates power to the CPU and GPU of a laptop, thereby improving the power efficiency of the laptop under the premise of limited power consumption, thereby improving the overall performance of the laptop.
- Dx-Notify A performance control interface reserved for NVIDIA graphics cards. Dx-Notify supports 5 levels of performance control from D1 to D5. Each level corresponds to different GPU performance. You can set the corresponding performance of D1-D5 in Video BIOS. D1 has the strongest performance and D5 has the weakest performance.
- SCI System Control Interrupt, system control interrupt.
- An IRQ interrupt request specifically used for ACPI power management, which requires OS (operating system) support.
- SMI System Management Interrupt, a special interrupt used by the system to enter SMM (System Management Mode).
- SMM System Management Mode, system management mode, is a standard architecture feature that is unified for all Intel processors.
- SMM System Management Mode
- SMI System Management Interrupt
- TGP Total Graphics Power, generally refers to the performance/power consumption of the entire graphics card.
- TDP CPU Thermal Design Power, thermal design power consumption, its meaning is "when the processor reaches the maximum load, the amount of heat released" (unit: watt (W)), is an indicator of the heat release of a processor.
- W watt
- TDP is an indicator that reflects the heat release of the processor, and it is the maximum heat limit that the computer's cooling system must be able to dissipate.
- TPP power consumption Total Processor Power, total processor power consumption. For laptops, it generally refers to CPU power consumption + GPU power consumption.
- DB power consumption dynamic power consumption of the graphics card, that is, the upper and lower limits of the dynamic adjustment of the TGP power consumption of the graphics card. For example, if the TGP power consumption is 40W and the DB power consumption is 15W, the graphics card driver can limit the graphics card power consumption to between 25W and 55W based on the current power consumption/actual power consumption of the CPU.
- Single baking/dual baking The baking machine is a stability test of the computer.
- Single baking means that the software (such as AIDA64Extreme) runs a stress test of a certain component alone, such as GPU and FPU single baking.
- Double baking means that the software allows two tests to be performed at the same time, generally referring to the CPU and GPU working at full load.
- Address information used to indicate the location information of the pre-applied memory.
- the CPU/program can obtain the specific location of the pre-applied memory through the address information, and store parameters such as GPU temperature, CPU temperature, motherboard temperature, fan speed, etc. in the memory. There are many ways to indicate the address information.
- the address information can be the starting position and length of the memory, or the starting position and end position of the memory. All address information that can be used to indicate the location of the memory is applicable to the present application embodiment.
- the focus window is the window that has the focus.
- the focus window is the only window that can receive keyboard input.
- the way the focus window is determined is related to the system's focus mode.
- the top window of the focus window is called the active window. Only one window can be the active window at the same time.
- the focus window is most likely the window that the user needs to use at the moment.
- the focus mode can be used to determine how the mouse gives focus to a window.
- focus modes there are three focus modes:
- Focus-follow-mouse In this mode, the window under the mouse can obtain the focus. That is, when the mouse moves into the range of a window that can obtain the focus, the user can activate the window and receive keyboard input without clicking anywhere in the window, but the window is not necessarily placed in the front of all windows. When the mouse moves out of the range of the window, the window will also lose the focus.
- This focus mode is similar to focus-follow-mouse: when the mouse moves into the range of a window that can receive focus, the user does not need to click anywhere in the window to activate the window and receive keyboard input, but the window is not necessarily placed in the front of all windows. Unlike focus-follow-mouse, when the mouse moves out of the window range, the focus does not change. The system focus changes only when the mouse moves to another window that can receive focus.
- a process includes multiple threads, and a thread can create a window.
- the focus process is the process to which the thread that creates the focus window belongs.
- the CPU central processing unit
- GPU graphics processing unit
- How to control the performance, power consumption, and heat generation of the CPU and GPU has always been a difficult point in performance regulation of laptops or portable computers (Laptop).
- the purpose of the embodiments of the present application is to control the graphics card performance and power consumption based on user scenarios of electronic devices such as laptops, thereby achieving control of the performance and power consumption of the entire machine.
- Figure 1 is a schematic diagram of module interaction of a current performance control method.
- adjusting the Dx value of an NV (ie, NVIDIA) graphics card ie, the Dx value in Dx-Notify is used as an example to illustrate the current graphics card performance control process.
- graphics card, GPU, graphics processing unit or graphics processor have the same meaning and represent the same component in the device.
- Graphics cards can be divided into integrated graphics cards and independent graphics cards.
- the performance of independent graphics cards is adjusted as an example for explanation.
- the performance control method disclosed in the embodiments of this application is also applicable to integrated graphics cards.
- NV graphics cards are used as an example for explanation, but the performance control method disclosed in the embodiments of this application is also applicable to other graphics cards.
- current methods for controlling the performance of a graphics card of an electronic device include:
- a controller reads the temperature of a graphics card from a temperature sensor outside the graphics card.
- the controller (EC) is connected to communicate with a temperature sensor outside the graphics card via, for example, a system management bus (“SMBus”), and polls the temperature sensor or other devices via the system management bus (“SMBus”) to read the temperature of the graphics card from the temperature sensor outside the graphics card.
- a system management bus for example, a system management bus (“SMBus")
- SMBs system management bus
- the controller (EC) determines the Dx value of the graphics card according to the temperature of the graphics card.
- the controller determines the current Dx value of the graphics card based on the current temperature of the graphics card according to the relationship between the preset temperature and the Dx value. For example, when the current temperature of the graphics card exceeds the upper limit temperature corresponding to D4, the controller (EC) determines to adjust the Dx value of the graphics card to D5 to reduce the performance of the graphics card, thereby reducing the temperature of the graphics card.
- the controller notifies the BIOS to switch the graphics card Dx value.
- the controller (EC) transmits data through the 62/66IO port.
- the BIOS and the controller (EC) predefine the SMI (System Management Interrupt) interrupt number, and the BIOS or more specifically the BIOS runtime service obtains the interrupt number from the controller (EC) through the 62/66IO port.
- SMI System Management Interrupt
- the BIOS runtime service calls the interrupt service function corresponding to the interrupt number to read the Dx value of the graphics card again through the 62/66IO port.
- BIOS modifies the Dx value and notifies the graphics card driver to read the Dx value.
- ACPI specifies a storage location in the internal memory (ie, memory) for storing Dx values. After reading the Dx value, the BIOS modifies the Dx value at the storage location to the latest value, and then notifies the graphics card driver to read the latest Dx value.
- the graphics card driver reads the Dx value, and controls the graphics card according to the power consumption corresponding to the Dx value.
- the BIOS will generate an SCI interrupt after modifying the Dx value.
- the graphics card driver After receiving the SCI interrupt (that is, event notification), the graphics card driver calls the graphics card control method (graphics card control method defined in ACPI) to read the current value of Dx.
- the graphics card performance is controlled according to the power consumption corresponding to the current value of Dx. For example, if the current Dx value is D3 and the corresponding graphics card power consumption is 15W, the graphics card driver controls the graphics card to limit its maximum power consumption to 15W.
- the above-mentioned graphics card performance control method can control the performance of the graphics card, it will only passively control the graphics card performance according to the temperature of the graphics card, and will not actively control the graphics card performance according to the scenario and needs. In many cases, performance control is performed only after the temperature of the device or graphics card is too high to reduce the temperature, which does not provide a very good experience for users. In addition, Dx only supports 5 levels of upper limit value for controlling the graphics card, and the adjustment range is relatively fixed. It is impossible to adjust the performance parameters of the graphics card according to the specific scenario, which results in some scenarios being unable to provide users with better performance.
- adjusting the graphics card performance through Dx according to the graphics card temperature may result in a lower graphics card performance requirement, but still occupying a larger power consumption indicator, which results in devices such as notebooks being unable to provide sufficient CPU performance.
- the commonly used performance control methods at present include directly setting the TPP&TGP&TDP values in the BIOS according to the conditions such as heat dissipation and performance when designing the device.
- the graphics card automatically adjusts the performance according to the TPP/TGP/TDP set values during operation, or when the game/GPU single baking/dual baking requires high GPU performance, the graphics card driver automatically adjusts the performance, but the TPP/TGP/TDP parameters will not change during this process.
- the CPU and graphics card performance parameters will not change according to the scene, but will only change according to the power consumption of the chip. This method cannot adapt to the CPU requirements in different scenes. Different performance requirements than graphics cards.
- the embodiment of the present application provides a performance control method, which identifies the current scene of the device, sets the specific parameters or Dx values of TPP, TGP and/or TDP according to the specific scene when performance control is needed, so that the graphics card can perform performance control according to the current TPP, TGP and/or TDP parameters or Dx values, thereby providing more reasonable CPU and GPU performance according to the scene, which not only better meets the performance requirements of users in various scenes, but also can relatively improve the battery life of the device, thereby improving the user experience.
- the performance control method provided by the embodiment of the present application is described in detail below.
- FIG2 is a schematic diagram of the hardware structure of an electronic device according to an embodiment of the present application. It should be understood that the electronic device 100 shown in FIG2 is only an example of an electronic device, and the electronic device 100 may have more or fewer components than those shown in the figure, may combine two or more components, or may have different component configurations.
- the various components shown in FIG2 may be implemented in hardware, software, or a combination of hardware and software including one or more signal processing and/or application specific integrated circuits.
- the electronic device 100 may include: a processor 110, an internal memory 122, an external memory 121, an embedded controller (EC) 130, an independent graphics processor 140, a BIOS firmware flash memory 150, an antenna 1, a wireless communication module 160, a display screen 170, a fan 180, a keyboard 181, a temperature sensor 190, etc.
- a processor 110 an internal memory 122, an external memory 121, an embedded controller (EC) 130, an independent graphics processor 140, a BIOS firmware flash memory 150, an antenna 1, a wireless communication module 160, a display screen 170, a fan 180, a keyboard 181, a temperature sensor 190, etc.
- the processor 110 is, for example, a central processing unit (CPU), which may include one or more processing cores.
- the processor 110 may also include: a controller, a memory controller, a graphics processing unit (GPU, integrated graphics card), etc.
- a memory may also be provided in the processor 110 for storing instructions and data.
- the memory in the processor 110 is a cache memory or a register.
- the processor 110 may include an interface bus, which may include one or more interfaces.
- the interface may include a system management bus (“SMBus”), a low pin count (LPC) bus, a serial peripheral interface (“SPI”), a high-definition audio (“HDA”) bus, a serial advanced technology attachment (“SATA”) bus, a standardized interconnect (e.g., PCIe) and/or a universal serial bus (USB) interface, etc.
- SMBs system management bus
- LPC low pin count
- SPI serial peripheral interface
- HDA high-definition audio
- SATA serial advanced technology attachment
- USB universal serial bus
- the interface connection relationship between the modules illustrated in the embodiment of the present application is only a schematic illustration and does not constitute a structural limitation on the electronic device 100.
- the electronic device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
- the wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) network), Bluetooth (BT), etc. applied to the electronic device 100.
- WLAN wireless local area networks
- BT Bluetooth
- the antenna 1 of the electronic device 100 is coupled to the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology.
- the electronic device 100 implements the display function through an independent graphics processor (i.e., independent graphics card or independent GPU) 140 or a graphics processor integrated in the processor 110 (i.e., integrated graphics card or integrated GPU), a display screen 170, and the processor 110.
- the graphics processor GPU is used to perform mathematical and geometric calculations for graphics rendering.
- the electronic device 100 may include one or more GPUs that execute program instructions to generate or change display information.
- the display screen 170 is used to display interfaces, images, videos, etc.
- the display screen 170 includes a display panel.
- the internal memory (or main memory) 120 may include a program storage area and a data storage area.
- the program storage area may store an operating system, an application required for at least one 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, etc.
- the internal memory 120 may include a high-speed random access memory (RAM), such as a DDR (Double Data Rate) RAM, more specifically a DDR4 or DDR5 RAM.
- RAM high-speed random access memory
- the internal memory (or main memory) 120 may be connected to the processor 110 in communication via a memory bus.
- the external memory 121 is, for example, a solid state disk (“SSD”) or a hard disk drive (“HDD”) or a flash memory device, a universal flash storage (UFS), etc.
- the external memory 121 can be communicatively connected to the processor 110 via a serial advanced technology attachment (“SATA”) bus or a standardized interconnect (e.g., PCIe).
- SATA serial advanced technology attachment
- PCIe standardized interconnect
- the embedded controller (EC) 130 is used to implement functions such as keyboard control, touchpad, power management, fan control, etc.
- the controller 130 can sample the CPU or GPU temperature through the temperature sensor 190, and then adjust the fan according to the algorithm based on the CPU or GPU temperature.
- the controller 130 can include independently running software stored in its own non-volatile medium.
- the temperature of the external temperature sensor read by the controller 130 is also stored in the internal RAM of the controller 130.
- the controller 120 can be connected and communicated with the processor 110 through, for example, an eSPI or LPC bus.
- the independent graphics processor 140 is used to perform mathematical and geometric calculations for graphics rendering.
- the independent graphics processor 140 can enter a low-power sleep state when no 3D program is running. When the independent graphics processor 140 is asleep, the graphics rendering work of the electronic device 100 is completed by the graphics processor (i.e., integrated graphics card or integrated GPU) in the processor 110.
- the independent graphics processor 140 can be connected to the processor 110 through a standardized interconnect (e.g., PCIe).
- the independent graphics processor 140 can perform performance control according to the Dx parameters or TPP, TGP parameters of the graphics card.
- the BIOS firmware flash memory 150 is used to store the BIOS firmware, which may be a traditional BIOS firmware or a UEFI-based BIOS firmware.
- the BIOS firmware flash memory 150 may be a ROM (read-only memory) or a Flash memory (flash memory).
- the BIOS firmware includes the mainboard BIOS firmware and the graphics card BIOS firmware.
- the fan 180 is used to dissipate heat for the processor 110, the independent graphics processor 140, etc., so as to reduce the temperature of the components and ensure the operation of the device.
- the electronic device 100 may include one or more fans 180.
- the electronic device 100 may arrange a fan near the processor 110 and a fan near the independent graphics processor 140.
- the keyboard 181 is used for input by a user of the electronic device 100 .
- the temperature sensor 190 is used to collect the temperature of the components of the electronic device 100, such as the processor 110, the internal memory 120, the independent graphics processor 140, etc.
- the electronic device 100 may include one or more temperature sensors 190. Exemplarily, for example, one or more temperature sensors 190 are arranged outside the processor 110, one or more temperature sensors are arranged outside the internal memory 120, and one or more temperature sensors 190 are arranged outside the independent graphics processor 140.
- the temperature sensor 190 can be connected to the processor 110 or the embedded controller (EC) 130 through, for example, a system management bus (“SMBus"), so as to send the collected temperature to the processor 110 or the embedded controller (EC) 130.
- SMBBs system management bus
- the software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture.
- the embodiment of the present application takes the Windows system of the layered architecture as an example to exemplify the software structure of the electronic device 100.
- FIG. 3 is a software structure block diagram of the electronic device 100 according to an embodiment of the present application.
- the layered architecture of the electronic device 100 divides the software into several layers, each with a clear role and division of labor.
- the layers communicate with each other through software interfaces.
- the Windows system is divided into user state and kernel state.
- the user state includes the application layer and the subsystem dynamic link library.
- the kernel state is divided from bottom to top into the firmware layer, the hardware abstraction layer (HAL), the kernel and the driver layer, and the executive body.
- HAL hardware abstraction layer
- the application layer includes applications such as music, video, games, office, performance control software, etc.
- the application layer also includes an environment subsystem, a scheduling engine, a system support process, a service process, etc. Among them, only some applications are shown in the figure, and the application layer can also include other applications, such as shopping applications, browsers, etc., which are not limited in this application.
- the environment subsystem can present certain subsets of the basic executive system services to the application in a specific form, providing an execution environment for the application.
- the scene recognition engine can identify the user scene in which the electronic device 100 is located, and determine a basic scheduling strategy (also referred to as a second scheduling strategy) that matches the user scene.
- a basic scheduling strategy also referred to as a second scheduling strategy
- the scheduling engine can obtain the load condition of the electronic device 100, and determine the actual scheduling strategy that meets the actual operation condition of the electronic device 100 in combination with the load condition of the electronic device 100 and the above-mentioned basic scheduling strategy.
- the performance control application can perform performance control on the CPU, GPU, etc. according to the user scenario of the electronic device 100.
- the performance control application can be an independent application, or a software module integrated with other applications (such as a computer manager), or can be integrated in a service or engine of an operating system.
- the subsystem dynamic link library includes an API module, which includes Windows API, Windows native API, NVAPI, etc.
- Windows API and Windows native API can provide system call entry and internal function support for applications.
- the difference is that Windows native API is an API native to the Windows system.
- Windows API may include user.dll and kernel.dll
- Windows native API may include ntdll, dll.
- 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.
- 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.
- WMI Windows management instrumentation
- OsEventDriver operating system event driver
- OS2SOC operating system to System on Chip
- the process manager is used to create and terminate processes and threads.
- the Virtual Memory Manager implements "virtual memory".
- the Virtual Memory Manager also provides basic support for the Cache Manager.
- the Security Reference Monitor enforces security policy on the local computer, protects operating system resources, and performs runtime object protection and monitoring.
- the I/O manager performs device-independent input/output and further processes calls appropriate device drivers.
- the power manager manages power state changes for all devices that support power state changes.
- 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 there is a GPU video decoding event, report the GPU video decoding event to the scene recognition engine.
- the system and chip driver nodes may be used by the scheduling engine to send adjustment information to the hardware device, for example, to send information for adjusting PL1 and PL2 to the CPU.
- the kernel and driver layer include the kernel and device drivers.
- the kernel is an abstraction of the processor architecture, isolating the executive body from the differences in the processor architecture to ensure the portability of the system.
- the kernel can perform thread scheduling and dispatching, trap handling and exception dispatching, interrupt handling and dispatching, etc.
- Device drivers run in kernel mode and are interfaces between the I/O system and related hardware.
- Device drivers may include graphics card drivers, Intel DTT drivers, mouse drivers, audio and video drivers, camera drivers, keyboard drivers, etc.
- graphics card driver can drive the GPU to run
- an Intel DTT driver can drive the CPU to run.
- HAL is a kernel-state module that can hide various hardware-related details, such as I/O interfaces, interrupt controllers, and multi-processor communication mechanisms, and provide a unified service interface for different hardware platforms running Windows, achieving portability on multiple hardware platforms. It should be noted that in order to maintain the portability of Windows, Windows internal components and user-written device drivers do not directly access the hardware, but call routines in HAL.
- the firmware layer can include the basic input output system (BIOS).
- BIOS is a set of programs that are fixed to a read-only memory (ROM) chip on the computer motherboard. It stores the most important basic input and output programs of the computer, the self-test program after powering on, and the system self-starting program. It can read and write specific information of system settings from the complementary metal oxide semiconductor (CMOS). Its main function is to provide the lowest-level and most direct hardware settings and control for the computer.
- BIOS basic input output system
- BIOS is a set of programs that are fixed to a read-only memory (ROM) chip on the computer motherboard. It stores the most important basic input and output programs of the computer, the self-test program after powering on, and the system self-starting program. It can read and write specific information of system settings from the complementary metal oxide semiconductor (CMOS). Its main function is to provide the lowest-level and most direct hardware settings and control for the computer.
- CMOS complementary metal oxide semiconductor
- the Intel DTT driver can send instructions to the CPU through the BIOS.
- the layers in the software structure shown in FIG3 and the components contained in each layer do not constitute a specific limitation on the electronic device 100.
- the electronic device 100 may include more or fewer layers than shown in the figure, and each layer may include more or fewer components, which is not limited in the present application.
- FIG. 4 is a schematic diagram showing the software and hardware workflow when the electronic device 100 schedules resources.
- the scene recognition engine of the application layer includes a system probe module, a scene recognition module, and a basic strategy matching manager.
- the scene recognition module can interact with the system probe module and the basic strategy matching manager respectively.
- the scene recognition module can send a request for obtaining the probe status to the system probe module.
- the system probe module can obtain the operating status of the electronic device 100.
- the system probe module can include a power status probe, a peripheral status probe, a process load probe, an audio and video status probe, a system load probe, and a system event probe.
- the power state probe can subscribe to the power state event from the kernel state, and determine the power state according to the callback function fed back by the kernel state.
- the power state includes the battery (remaining) power, power mode, etc.
- the power mode may include alternating current (AC) and direct current (DC).
- the power state probe can send a request to subscribe to the power state event to the OsEventDriver node of the executive layer, and the OsEventDriver node forwards the request to the power manager of the executive layer.
- the power manager can feed back the callback function to the power state probe through the OsEventDriver node.
- the peripheral state probe can subscribe to peripheral events in the kernel state and determine the peripheral events according to the callback function fed back by the kernel state.
- Peripheral events include mouse wheel sliding events, mouse click events, keyboard input events, microphone input events, camera input events, etc.
- the process load probe may subscribe to the process load in the kernel state, and determine the load of the process (eg, the first process) according to the callback function fed back by the kernel state.
- the system load probe can subscribe to the system load in the kernel state and determine the system load based on the callback function fed back by the kernel state.
- the audio and video status probe can subscribe to audio and video events in the kernel state, and determine the audio and video events currently existing in the electronic device 100 according to the callback function fed back by the kernel state. Audio and video events may include GPU decoding events, etc.
- the audio and video status probe can send a request for subscribing to GPU decoding events to the OsEventDriver node of the executive layer, and the OsEventDriver node forwards the request to the graphics card driver of the kernel and driver layer.
- the graphics card driver can monitor the status of the GPU, and after monitoring that the GPU is performing a decoding operation, it feeds back a callback function to the audio and video status probe through the OsEventDriver node.
- the system event probe can subscribe to system events in the kernel state and determine the system events based on the callback function fed back by the kernel state.
- System events may include window change events, process creation events, thread creation events, etc.
- the system event probe can send a request to subscribe to the process creation event to the OsEventDriver node of the executive layer, and the OsEventDriver node forwards the request to the process manager. After creating the process, the process manager can feed back the callback function to the system event probe through the OsEventDriver node.
- the system event probe also sends a subscription focus window change event to the API module.
- the API module can monitor whether the focus window of the electronic device 100 changes, and when the focus window is monitored to change, it feeds back the callback function to the system event probe.
- the system probe module subscribes to various events of the electronic device 100 in the kernel state, and then determines the running state of the electronic device 100 according to the callback function fed back by the kernel state, that is, obtains the probe state. After obtaining the probe state, the system probe module can feed back the probe state to the scene recognition module. After receiving the probe state, the scene recognition module can determine the user scene in which the electronic device 100 is located according to the probe state.
- the user scene may include a video scene, a game scene, an office scene, and a social scene. The user scene can reflect the user's current usage needs.
- the scene recognition engine when the scene recognition engine identifies that the focus window is a window of a video application, it determines that the electronic device 100 is in a video scene, which means that the user needs to use a video application to watch and browse videos. For another example, when the scene recognition engine identifies that the focus window is a chat window of WeChat TM , it determines that the electronic device 100 is in a social scene.
- the scene recognition module can also send the user scene to the basic policy matching manager.
- the basic policy matching manager can determine the basic scheduling strategy (also referred to as the second scheduling strategy) according to the user scenario, and specifically refer to the description in S301 and S302 below.
- the basic policy matching manager can feed back the basic scheduling strategy to the scene recognition module.
- the scenario recognition module may send the basic scheduling strategy and user scenario to the scheduling engine of the application layer.
- the scheduling engine includes a load controller, a chip strategy aggregator, and a scheduling executor.
- the load controller can receive the basic scheduling strategy and user scenario sent by the scenario recognition module.
- the load controller can also obtain the system load from the system probe module, and adjust the basic scheduling strategy according to the system load and user scenario to obtain the actual scheduling strategy (also referred to as the first scheduling strategy, please refer to the description in S310 below for details).
- the actual scheduling strategy includes the OS scheduling strategy and the first CPU power consumption scheduling strategy (also referred to as the first sub-strategy).
- the load controller can send the OS scheduling strategy to the scheduling executor, and the scheduling executor will make adjustments based on the OS scheduling strategy.
- the OS scheduling policy is used to adjust the process priority and I/O priority of the focus process.
- the scheduling executor may send an instruction to adjust the process priority of the focus process to the process manager, and in response to the instruction, the process manager adjusts the process priority of the focus process.
- the scheduling executor may send an instruction to adjust the I/O priority of the focus process to the I/O manager, and in response to the instruction, the I/O manager adjusts the I/O priority of the focus process.
- the load controller can also send the first CPU power consumption scheduling strategy to the chip strategy fusion device, and the chip strategy fusion device can obtain the second CPU power consumption scheduling strategy (also called the second sub-strategy, see the description in S317 to S325 below) based on the CPU chip platform type and the first CPU power consumption scheduling strategy.
- the second CPU power consumption scheduling strategy also called the second sub-strategy, see the description in S317 to S325 below.
- the scheduling executor can send an instruction to adjust the EPP to the power manager to adjust the EPP of the CPU.
- the scheduling executor can also send an instruction to adjust PL1 and PL2 to the OS2SOC driver node to adjust the PL1 and PL2 of the CPU.
- the scheduling executor can send the second CPU power consumption scheduling policy to the Intel DTT driver through the WMI plug-in.
- the second CPU power consumption scheduling policy may include the minimum value of PL1, the maximum value of PL1, PL2, the duration of PL2 and EPP.
- the Intel DTT drives the CPU to run based on the second CPU power consumption scheduling policy.
- the performance control method provided in the embodiment of the present application is mainly divided into two processes, namely: (1) determining the user scenario of the electronic device; and (2) determining the performance parameters of the electronic device according to the user scenario of the electronic device.
- the above two processes will be described below in conjunction with the accompanying drawings.
- a performance control method determines the user scenario in which the electronic device is located as follows:
- the system probe module sends a request for subscribing to a process creation event to an OsEventDriver node.
- the scene recognition engine includes a system probe module, and the system probe module includes a system event probe.
- the system event probe can send a request to subscribe to a process creation event to an OsEventDriver node located at the executive layer.
- the request to subscribe to a process creation event can also be referred to as a first request.
- the request for subscribing to a process creation event may carry a process name. That is, the scene recognition engine may only subscribe to the creation event of a specified process, reducing interference from creation events of irrelevant processes.
- the specified process may be a process of a video application, a process of a game application, a process of an office application, a process of a social application, and so on.
- the scene recognition engine may not impose restrictions on the subscribed process creation events.
- the OsEventDriver node sends a request for subscribing to a process creation event to the process manager.
- the request for the process creation event can refer to the description of S501, which will not be repeated here.
- system event probe of the scene recognition engine can send a request to subscribe to the process creation event to the process manager through the OsEventDriver node.
- the OsEventDriver node will register a callback with the process manager.
- the purpose of registering the callback is that after the process manager creates a process, the process creation event can be returned to the OsEventDriver node.
- S503 The system probe module sends a request to subscribe to GPU decoding events to the OsEventDriver node.
- the system probe module also includes an audio and video status probe.
- the audio and video status probe of the system probe module can send a request to subscribe to GPU decoding events to the OsEventDriver node.
- the request to subscribe to GPU decoding events can also be called a third request.
- the OsEventDriver node sends a request to subscribe to GPU decoding events to the graphics card driver.
- the audio and video status probe of the scene recognition engine can send a request to subscribe to GPU decoding events to the graphics driver through the OsEventDriver node.
- the OsEventDriver node can register a callback with the graphics driver. The purpose of registering this callback is that when the graphics driver monitors the GPU for decoding operations, it can return the GPU decoding event to the OsEventDriver node.
- S505 The system probe module sends a request for subscribing to a focus window change event to the API module.
- the API module may include a windows user interface implemented by user32.dll, which can be used to create a window.
- a system event probe of the system probe module may send a request to subscribe to a focus window change event to the windows user interface of the API module.
- the request to subscribe to a focus window change event may also be referred to as a second request.
- the system event probe can register a callback with the API module.
- the purpose of registering the callback is that when the API module (windows user interface interface) monitors the focus window change, the focus window change event can be returned to the system event probe.
- the focus window is the window with focus, which is most likely the window that the user currently needs to use. Therefore, by monitoring the focus window, the user's usage needs can be determined. For example, if the focus window is the window of a video application, it indicates that the user needs to browse and play videos. For another example, if the focus window is the window of a game application, it indicates that the user needs to play games. By monitoring whether the focus window changes, it can be determined whether the user's needs have changed. For example, if the focus window changes from the window of a video application to the window of a game application, it indicates that the user's current need has changed from watching videos to playing games.
- S501, S503 and S505. can be executed in sequence according to the order shown in FIG5, or they can be executed simultaneously, or they can be executed in the order of S503, S501, S505, S503, S505, S501, S503, or S505, S503, S501.
- S502, S504 and S506. As long as S502 is executed after S501, S504 is executed after S503 and S506 is executed after S505, no specific restrictions are made here.
- the create process request includes the storage address of the video application.
- the video application can send a request to create a process to the process manager through the kernel32.dll interface and the Ntdll.dll interface of the API module (not shown).
- S507 The process manager creates a video application process.
- the process manager can query the binary file of the video application program through the storage address.
- an environment for process operation can be created to start the video application process.
- the Windows operating system defines a single run of an application as a process.
- a process can have multiple threads.
- a window is an instance of a window structure, which is a graphical user interface (GUI). GUI) resources, a window is created by a thread, and a thread can own all windows it creates.
- GUI graphical user interface
- the electronic device runs a video application, and the process manager needs to create a process for the video application, that is, a video application process (that is, a first process).
- the video application process includes multiple threads, and the multiple threads include thread 1.
- Thread 1 can be used to create the main window of the video application, and the main window is a window that integrates all function keys of the video application.
- S508 The process manager reports the process creation event to the OsEventDriver node.
- the process creation event may include the name of the process created by the process manager.
- the name of the process is the name of the video application process.
- the name of the process also corresponds to the name of the other application process.
- the OsEventDriver node sends a request to the process manager to subscribe to the process creation event and registers a callback. Therefore, after creating the video application process, the process manager can report the process creation event to the OsEventDriver node.
- the OsEventDriver node reports the process creation event to the system probe module.
- the OsEventDriver node may report the process creation event to the system event probe of the system probe module.
- S510 The system probe module sends a process creation event to the scene recognition module.
- thread 1 of the video application process actively calls the windows user interface interface of the API module to create window 1.
- the electronic device can display window 601, which can be a desktop, or can also be called a main interface.
- the window 601 includes an icon 602 of the video application.
- the electronic device can receive an operation of a user clicking on the icon 602 of the video application, and in response to the operation, as shown in (b) of FIG. 6 , the electronic device displays window 603 (i.e., window 1, or can also be called a first window).
- window 603 i.e., window 1, or can also be called a first window.
- the focus window changes from the original window 601 to window 603.
- the name of the first process i.e., the focus process
- the name of the second process can be obtained.
- the first process is the process corresponding to the current focus window (i.e., window 1)
- the second process is the process corresponding to the previous focus window (e.g., window 2).
- the process corresponding to window 1 is a video application process (first process)
- the name of the process is, for example, hlive.exe
- the process corresponding to window 2 is a process of the windows program manager (second process)
- the name of the process is, for example, explorer.exe.
- the API module determines that the focus window has changed, and reports the focus window event to the system event probe of the system probe module.
- the focus window change event includes the name of the first process (i.e., the focus process).
- the first process is a video application process
- the focus window change event carries the name of the video application process.
- the electronic device does not need to execute S506 to S511.
- the system probe module sends a request to subscribe to the focus window change event to the API module, if the user switches the focus window to the window of the video application, the API module can also detect the focus window change and report the focus window event to the system probe module.
- S513 The system probe module sends a focus window event to the scene recognition module.
- the scene recognition module determines that the type of the first process is a video type.
- the electronic device may be pre-configured with an application list, and the scene recognition module may query whether the application list includes the first process. If the application list includes the first process, the scene recognition module may determine the type of the first process.
- the application list includes the process name of each application and the type of the application. Exemplarily, the application list may be as shown in Table 1:
- the scene recognition module can determine that the type of the first process is video. For another example, if the name of the first process is wechat.exe, the scene recognition module can determine that the type of the first process is social. It should be noted that the above Table 1 is only an example. In fact, Table 1 can also include process names of more applications and their types.
- the purpose of this step is to preliminarily determine the user scenario in which the electronic device is located.
- the user scenario in which the electronic device is located may include video scenarios, game scenarios, social scenarios, office scenarios, browser scenarios, etc.
- the video scenario may further include video playback scenarios and video browsing scenarios.
- the social scenario may further include text chat scenarios, voice chat scenarios, video chat scenarios, etc.
- the office scenario may further include document editing scenarios, document browsing scenarios, video conferencing scenarios, etc.
- the browser scenario may include web browsing scenarios and video playback scenarios, etc.
- the type of user scenario in which the electronic device is located can be determined by the type to which the first process belongs. For example, if it is determined that the type to which the first process belongs is a video type, it can be determined that the electronic device is in a video scenario; for another example, if it is determined that the type to which the first process belongs is a game type, it can be determined that the electronic device is in a game scenario.
- the scene recognition module can further combine other parameters (for example, peripheral events, GPU operating status, etc.) to analyze the specific scenario in which the electronic device is located, so as to achieve a more accurate analysis result. The specific content is described later and will not be described here.
- the video application may send the video play instruction to the DirectX API of the API module.
- the video play instruction may include the cache address of the video.
- the API module reads the video file.
- the API module can read the corresponding video file according to the cache address carried in the video playback instruction.
- the API module sends a decoding instruction to the graphics card driver.
- the graphics card driver sends a startup instruction to the GPU.
- the GPU can decode the video file through the GPU video processing engine.
- the GPU reports a decoding event to the graphics card driver.
- the graphics card driver reports a decoding event to the OsEventDriver node.
- the OsEventDriver node reports the decoding event to the system probe module.
- the OsEventDriver node reports the decoding event to the audio and video status probe of the system probe module.
- S523 The system probe module sends a decoding event to the scene recognition module.
- the scene recognition module sends instruction 1 to the system probe module.
- Instruction 1 instructs the system probe module to obtain the GPU occupancy rate of the first process.
- the instruction 1 may carry the name of the first process.
- the system probe module sends a request to the process manager to obtain the GPU occupancy rate of the first process.
- the request for obtaining the GPU occupancy rate of the focus process may include the name of the first process.
- the audio and video status probe of the system probe module may send a request for obtaining the GPU occupancy rate of the first process to the process manager.
- S526 The process manager collects the GPU occupancy rate of the first process.
- the process manager can collect the GPU occupancy rate of the first process through the graphics kernel interface of the graphics card driver.
- S527 The process manager sends the GPU occupancy rate of the first process to the system probe module.
- the process manager may send the GPU occupancy rate of the first process to the audio and video status probe of the system probe module.
- the system probe module sends the GPU occupancy rate of the first process to the scene recognition engine.
- the scene recognition module determines whether the GPU occupancy rate of the first process is greater than 0.
- the GPU occupancy rate of the first process it can be determined whether the first process uses the GPU during operation. If the GPU occupancy rate of the first process is greater than 0, it can be considered that the first process uses the GPU during operation; if the GPU occupancy rate of the first process is 0, it indicates that the first process does not use the GPU during operation.
- S530 The scene recognition module sends instruction 2 to the system probe module.
- Instruction 2 instructs the system probe module to obtain the GPU engine of the first process.
- the instruction 2 may carry the name of the first process.
- the system probe module sends a request to the process manager to obtain the GPU engine of the first process.
- the audio and video status probe of the system probe module may send a request to the process manager to obtain the GPU engine of the first process.
- the request to obtain the GPU engine of the first process includes the name of the first process.
- the GPU engine includes a GPU 3D engine, a GPU copy engine, a GPU video encode engine, and a GPU video processing engine.
- the GPU 3D engine is mainly responsible for processing 2D or 3D graphics.
- the GPU copy engine is mainly used to transmit data.
- the GPU video encode engine is mainly used for encoding operations.
- the GPU video processing engine mainly performs decoding operations. In some embodiments, the GPU video processing engine can also be replaced by the GPU video decode engine.
- S532 The process manager obtains the GPU engine of the first process.
- the process manager can obtain the GPU engine of the first process through the graphics kernel interface of the graphics card driver.
- S533 The process manager sends a message 1 to the system probe module, where the message 1 indicates that the GPU engine of the first process is a GPU video processing engine.
- the process manager may send the message to the audio and video status probe of the system probe module, and then the audio and video status forwards the message to the scene recognition module.
- the system probe module sends message 1 to the scene recognition module.
- the scene recognition module determines whether the GPU engine of the first process is a GPU video processing engine.
- the GPU engine of the first process is a GPU video processing engine, execute S529; if the GPU engine of the first process is not a GPU video processing engine, execute S530.
- step S5134 the scene recognition engine has determined that the type to which the first process belongs is a video class, that is, it can be determined that the electronic device is in a video scene.
- the scene recognition engine can determine the specific operations performed by the first process through the GPU, and then determine the specific operations of the user using the video application.
- the GPU engine of the first process is a GPU video processing engine, it means that the first process is using the GPU for decoding operations, and it can be considered that the user is using the video application to play the video.
- the GPU engine of the first process is not a GPU video processing engine, it means that the first process is not using the GPU for decoding operations, then the user is most likely browsing video resources on the video application and has not yet played the video.
- the scene recognition module determines that the user scene is a video playback scene according to the process information of the first process.
- the process information of the first process includes information such as the name of the first process, the application type to which the first process belongs, the GPU occupancy rate of the first process, and the GPU engine used by the first process.
- the type of the first process is video type
- the GPU occupancy of the first process is greater than 0
- the GPU engine of the first process is a GPU video processing engine
- the scene recognition engine determines that the type of the first process (focus process) belongs to the game category, the power mode of the CPU is changed to game mode (game mode), the GPU occupancy rate of the first process is greater than 0, and the GPU engine of the first process is a GPU 3D engine, it can be determined that the electronic device is in a game scene.
- the power status probe of the system probe module may send a request to the power manager to subscribe to the power mode change event.
- the power manager may report the power mode change event to the power status probe of the system probe module when the power module is switched to game mode.
- the scene recognition engine may determine whether the power mode of the CPU is game mode through the power mode change event.
- the process of the scene recognition engine obtaining the type of the first process can refer to S501, S502, S505, S506-S514 in Figure 5, and the process of the scene recognition engine determining whether the GPU occupancy rate of the first process is greater than 0 and whether the GPU engine of the first process is a GPU 3D engine can refer to S524-S535.
- the difference is that the video application is replaced with a game application, which will not be repeated here.
- FIG. 7 shows a performance control method provided in an embodiment of the present application, and the process of determining the user scenario in which the electronic device is located is as follows:
- the system probe module sends a request to subscribe to a process creation event to an OsEventDriver node.
- the OsEventDriver node sends a request to subscribe to a process creation event to the process manager.
- S703 The system probe module sends a request for subscribing to peripheral events to the OsEventDriver node.
- the system probe module also includes a peripheral status probe.
- the peripheral status probe of the system probe module can send a request to subscribe to peripheral events to the OsEventDriver node.
- the request to subscribe to peripheral events can also be called a fourth request.
- peripheral events include mouse wheel sliding, mouse clicking, keyboard input, camera input, microphone input and other events.
- the OsEventDriver node sends a request for subscribing to peripheral events to the peripheral driver.
- peripheral driver is a general term for drivers of all peripherals, for example, it may include a mouse driver, a keyboard driver, a camera driver, a microphone driver, etc.
- the system probe module sends a request for subscribing to a focus window change event to the API module.
- S706 In response to receiving the user's operation of starting the office application, the office application sends a request for creating an office application process to the process manager.
- the request for creating an office application process may include a storage address of the office application program.
- S707 The process manager creates an office application process.
- the process manager can query the binary file of the office application through the storage address.
- an environment for process operation can be created to start the video application process.
- the office application process includes thread 2, which can be used to create the main window of the office application.
- S708 The process manager reports the process creation event to the OsEventDriver node.
- the OsEventDriver node reports the process creation event to the system probe module.
- the process creation event carries the name of the office application process.
- S710 The system probe module sends a process creation event to the scene recognition module.
- the API module creates an office application window.
- the API module reports the focus window event to the system probe module.
- the focus window event carries the name of the first process (focus process). It can be understood that in the embodiment of the present application, the first process is the office application process.
- S713 The system probe module sends a focus window event to the scene recognition module.
- the scene recognition module determines that the type of the first process is office type.
- the name of the first process is word.exe, it can be determined that the type of the first process is office type.
- the OsEventDriver node sends a peripheral event to the system probe module.
- the system probe module sends a peripheral event to the scene recognition module.
- the scene recognition module determines a user scene according to the peripheral event and the type of the first process.
- the scene recognition engine determines that the type of the first process (focus process) belongs to the office category, and the peripheral event is a mouse wheel sliding event or a click event, it can be determined that the electronic device is specifically in a document browsing scene in an office scene. If the electronic device belongs to the office category and does not receive a mouse wheel sliding event, a mouse click event, or a keyboard input event within a preset time (for example, 10 seconds) after receiving a keyboard input event, it can be determined that the electronic device is specifically in a document browsing scenario under an office scenario.
- a preset time for example, 10 seconds
- the scene recognition engine determines that the type of the first process (focus process) belongs to the office category and receives a keyboard input event, it can be determined that the electronic device is specifically in a document editing scene in an office scenario.
- the scene recognition engine determines that the type of the first process (focus process) belongs to the office type, and receives a camera input event (i.e., the camera is on and there is a video stream input), it can be determined that the electronic device is specifically in a video conferencing scene in an office scenario.
- the electronic device can also be in a social scene.
- the social scene includes three specific scenes, namely: text chat scene, voice chat scene and video chat scene.
- the principle of judging whether the electronic device is in a social scene is similar to the principle of judging whether the electronic device is in an office scene. We will not go into details here. The following only explains the conditions that need to be met to judge whether the electronic device is in a social scene.
- the scene recognition engine determines that the type of the first process (focus process) belongs to the social category and receives a keyboard input event, it can be determined that the electronic device is specifically in a text chat scene under a social scene.
- the scene recognition engine determines that the type of the first process (focus process) is social, and a microphone input event is received and the camera is in an off state, it can be determined that the electronic device is specifically in a voice chat scene in a social scene.
- the scene recognition engine determines that the type of the first process (focus process) belongs to the social category, and receives a microphone input event and a camera input event, it can be determined that the electronic device is specifically in a video chat scene under a social scenario.
- the electronic device can also determine whether performance regulation is needed according to the user scenario.
- performance regulation is needed, the specific parameter values or Dx values of TPP, TGP and/or TDP are set according to the user scenario, so that the graphics card performs performance regulation according to the current TPP, TGP and/or TDP parameters or Dx values, thereby providing more reasonable CPU and GPU performance according to the scenario, which not only better meets the performance requirements of users in various scenarios, but also can relatively improve the battery life of the device, thereby improving the user experience.
- FIG8 is a flow chart of a performance control method provided in an embodiment of the present application.
- the performance control method provided in the embodiment of the present application specifically includes:
- Step S801 The scene recognition engine determines the user scene of the electronic device and sends the scene information to the performance control application.
- the scene information is used to indicate the user scene in which the electronic device is located.
- the electronic device may pre-assign unique identifiers to different user scenes, and the scene information may include the unique identifier of the user scene.
- the identifier e.g., V01
- the identifier may indicate that the electronic device is in a video playback scene.
- the identifier e.g., V02
- the electronic device is in a video browsing scene.
- Step S802 The performance control application determines parameter values of performance parameters according to scenario information.
- the performance parameter includes a first performance parameter and a second performance parameter.
- the first performance parameter includes at least one of the TDP power consumption of the CPU, the TGP power consumption of the GPU, the TPP power consumption of the GPU, and the DB power consumption of the GPU.
- the second performance parameter includes the Dx value of the GPU.
- the performance requirements of various user scenarios can be predetermined through testing, such as determining the performance required for an office scenario through testing, and determining the parameter value of the first performance parameter in the office scenario based on the performance, such as determining the specific parameter values of the TDP power consumption of the CPU, the TGP power consumption of the GPU, the TPP power consumption of the GPU, and the DB power consumption of the GPU.
- the performance requirements in various scenarios can be determined by establishing a user dynamic test model.
- the dynamic test model can be used to determine the CPU performance, GPU performance, etc. when the electronic device runs various types of applications, thereby determining the performance requirements of the electronic device in various scenarios based on these data, and then determining the specific values of the first performance parameters in various scenarios based on the performance requirements.
- the electronic device can reduce the power consumption of the device while ensuring the smooth operation of the current application.
- the electronic device when the electronic device is in an office scene, because the performance requirements are low, lower TGP, TDP, TPP and DB values can be set to ensure the smooth operation of office applications while reducing the power consumption of the device and extending the battery life of the device.
- the electronic device is in a game scene, a performance test scene, or a 3D rendering scene, the GPU performance requirements are large, so the TPP, DB, and TGP values can be large, so that the GPU can provide higher performance to meet the game operation requirements.
- the parameter value of the first performance parameter is dynamically adjusted according to the scene in which the electronic device is located, so as to ensure the smooth operation of the application, reduce the power consumption of the device, and extend the battery life of the device. And compared with the current electronic device factory setting TDP, TGP or TPP value control method, it can better meet the performance requirements of the application, reasonably allocate CPU power consumption and GPU power consumption according to specific applications, and improve user experience.
- TPP generally has an upper limit value based on processor performance and heat dissipation design.
- the specific values of TPP, TDP, and TGP set according to the electronic device are set within the TPP upper limit value. For example, if the maximum TPP of the electronic device is 90W, TPP can be set to 30W in a scene with low performance requirements. In a scene with large performance requirements, TPP can be set to a larger value such as 60W, 70W, or even 90W. And when the CPU performance requirement is large, TDP is large, and when the GPU performance requirement is large, TGP is large.
- the upper limits of performance parameters are different in the performance mode and the balanced mode.
- the parameter value of the first performance parameter in each user scenario is set within the upper limit of the first performance parameter in the performance mode.
- the parameter value of the first performance parameter in each user scenario is set within the upper limit of the first performance parameter in the balanced mode. For example, if the TGP upper limit is 50W in performance mode and 30W in balanced mode, the TGP value of each user scenario is set within the upper limit of 50W in performance mode and within the upper limit of 30W in balanced mode.
- the performance requirements of various user scenarios can be pre-determined by testing, for example, the performance required for an office scenario can be determined by testing, and the parameter value of the second performance parameter in the office scenario can be determined based on the performance.
- the performance of the GPU can be adjusted more finely to provide a more reasonable performance for the GPU.
- the second performance parameter the GPU performance can be adjusted more significantly or quickly to quickly reduce (or increase) the GPU performance.
- the first performance parameter or the second performance parameter can be adjusted as needed according to the requirements of the user scenario.
- Dx is set to D1 (maximum GPU power consumption) by default, and when the user scenario changes, the GPU performance is adjusted by adjusting the first performance parameter.
- the Dx value can be adjusted to D4 or D5 to directly limit the GPU performance to a smaller value, thereby extending the battery life of the device.
- the device when the performance requirement of the current user scenario increases relative to the performance requirement of the previous user scenario, the device provides greater GPU and CPU performance by adjusting the first performance parameter.
- the Dx value is adjusted to D4 or D5 to directly limit the GPU performance to a smaller value, thereby extending the battery life of the device.
- the Dx value is adjusted to D4 or D5 to directly limit the GPU performance to a smaller value, thereby extending the battery life of the device.
- the temperature of the electronic device includes the CPU temperature, GPU temperature, motherboard temperature, etc.
- the over-high temperature of the electronic device means that one or more of the CPU temperature, GPU temperature, motherboard temperature, etc. are too high.
- Step S803 the performance control application sends the parameter value of the performance parameter to the BIOS through the WMI interface.
- the performance control application calls the WMI interface to send the parameter value of the performance parameter to the BIOS.
- Step S804 BIOS writes the parameter value of the performance parameter into the location indicated by ACPI, and notifies the GPU driver to read the parameter value of the performance parameter.
- ACPI specifies the storage location in the internal memory (i.e., the memory) for storing the first performance parameter and the second performance parameter.
- the BIOS obtains the parameter values of the first performance parameter and the second performance parameter, it modifies the performance parameter at the storage location to the latest value, and then notifies the GPU driver to read the latest performance parameters of the graphics processor.
- the storage location of the first performance parameter and the storage location of the second performance parameter may be the same or different.
- Step S805 The GPU driver reads the parameter value of the performance parameter, and adjusts the performance of the GPU according to the parameter value of the performance parameter.
- an SCI interrupt is generated.
- the graphics driver After receiving the SCI interrupt (ie, event notification), the graphics driver calls the graphics control method (the graphics control method defined in ACPI) to read the current value of the performance parameter of the graphics processor.
- the performance of the graphics processor is regulated according to the performance parameters. For example, after the current value of Dx is read, the graphics card performance is controlled according to the power consumption corresponding to the current value of Dx. For example, if the current Dx value is D3 and the corresponding graphics card power consumption is 15W, the GPU driver controls the graphics card to limit its maximum power consumption to 15W. For another example, after the current values of TGP, TDP, TPP, and DB are read, the graphics card performance is controlled according to the current values of TGP, TDP, TPP, and DB.
- the GPU driver when controlling the graphics card performance according to the current values of TGP, TDP, TPP, and DB, the GPU driver also communicates with the CPU driver to obtain the current CPU power consumption, and adjusts the graphics card performance according to the current TGP, TDP, TPP, and DB values.
- the GPU driver can limit the GPU power consumption to between 25W (40-15) and 55W (40+15) according to the actual power consumption of the CPU. That is, when the actual power consumption of the CPU is small, for example, the actual power consumption of the CPU is 15W, the GPU power consumption can be adjusted within 55W, that is, a maximum GPU power consumption of 55W can be provided. For another example, when the actual power consumption of the CPU is 30W, the GPU power consumption can be adjusted within 25W, that is, a maximum GPU power consumption of 25W can be provided, which can ensure sufficient CPU performance.
- FIG. 9 is an example control process of the performance control method provided in an embodiment of the present application.
- the exemplary control process of the performance control method provided in the embodiment of the present application includes:
- Step S901 in response to an operation for starting a first application, before starting the first application, a first performance parameter of the electronic device is a first parameter value.
- the first application is, for example, a programming application, such as various programming applications.
- the first performance parameter includes at least one of TDP power consumption of the CPU, TGP power consumption of the GPU, TPP power consumption of the GPU, and DB power consumption of the GPU.
- the first parameter value may be a parameter set including specific values of TDP, TPP, TGP, and DB.
- the first parameter value may be TDP30W, TPP70W, TGP40W, and DB15W.
- Step S902 The scene recognition engine determines that the electronic device is in a first user scene according to the first application.
- the first user scenario is a programming scenario.
- the scenario recognition module determining the user scenario of the electronic device please refer to S501 to S536, which will not be described in detail here.
- Step S903 The scene recognition engine determines to send the first scene information to the performance control application.
- the electronic device may pre-assign unique identifiers to different user scenarios, and the scenario information may include the unique identifier of the user scenario.
- Step S904 At a first time point, the performance control application adjusts the first performance parameter to a second parameter value according to the first scenario information, where the second parameter value is different from the first parameter value.
- the second parameter value may be a parameter set including specific values of TDP, TPP, TGP, and DB.
- the second parameter value is different from the first parameter value, which means that the corresponding value of at least one parameter in the first parameter value and the second parameter value is different.
- the TGP value in the first parameter value is different from the TGP value in the second parameter value.
- the second parameter value is, for example, TDP30W, TPP60W, TGP10W, DB5W.
- Step S905 the performance control application sends the second parameter value to the BIOS through the WMI interface.
- Step S906 BIOS writes the second parameter value into the location indicated by ACPI, and notifies the GPU driver to read the second parameter value.
- the BIOS writes the second parameter value into the storage location of the first performance parameter indicated by ACPI, and notifies the GPU driver to read the second parameter value.
- Step S907 The GPU driver reads the second parameter value and adjusts the performance of the GPU according to the second parameter value.
- Step S908 starting a second application in response to the user operation.
- the second application is, for example, a game application, such as a 3A large-scale game.
- Step S909 The scene recognition engine determines that the electronic device is in a second user scene according to the second application.
- the second user scenario is a game scenario.
- the scenario recognition module determining the user scenario in which the electronic device is located refer to S501 to S536, which will not be described in detail here.
- Step S910 The scene recognition engine determines to send the second scene information to the performance control application.
- the electronic device may pre-assign unique identifiers to different user scenarios, and the scenario information may include the unique identifier of the user scenario.
- Step S911 at a second time point, the performance control application adjusts the first performance parameter to a third parameter value according to the second scenario information, where the third parameter value is different from the second parameter value.
- the third parameter value may be a parameter set including specific values of TDP, TPP, TGP, and DB.
- the third parameter value is different from the second parameter value, which means that the corresponding value of at least one parameter in the third parameter value and the second parameter value is different.
- the TGP value in the third parameter value is different from the TGP value in the second parameter value.
- the third parameter value is, for example, TDP30W, TPP80W, TGP50W, and DB15W.
- Step S912 The performance control application sends the third parameter value to the BIOS through the WMI interface.
- Step S913 BIOS writes the third parameter value into the location indicated by ACPI, and notifies the GPU driver to read the second parameter value.
- the BIOS writes the third parameter value into the storage location of the first performance parameter indicated by ACPI, and notifies the GPU driver to read the third parameter value.
- Step S914 The GPU driver reads the third parameter value and adjusts the performance of the GPU according to the third parameter value.
- FIG. 10 is another example control process of the performance control method provided in an embodiment of the present application.
- the exemplary control process of the performance control method provided in the embodiment of the present application includes:
- Step S1001 in response to an operation for starting a third application, before starting the third application, the second performance parameter of the electronic device is a fourth parameter value.
- the third application is, for example, an office application, such as various office software, such as Word.
- the second performance parameter includes a Dx value of the GPU.
- the fourth parameter value is, for example, D1.
- Step S1002 The scene recognition engine determines that the electronic device is in a third user scene based on a third application.
- the third user scenario is an office scenario.
- the scenario recognition module determining the user scenario in which the electronic device is located refer to S501 to S536, which will not be described in detail here.
- Step S1003 The scene recognition engine determines to send the third scene information to the performance control application.
- the electronic device may pre-assign unique identifiers to different user scenarios, and the scenario information may include the unique identifier of the user scenario.
- Step S1004 At a third time point, the performance control application adjusts the second performance parameter to a fifth parameter value according to the third scenario information, where the fifth parameter value is different from the fourth parameter value.
- the fifth parameter value is, for example, D4 or D5.
- the GPU performance requirement is relatively low, so the GPU performance can be directly limited by adjusting the Dx value to improve the device battery life.
- Step S1005 the performance control application sends the fifth parameter value to the BIOS through the WMI interface.
- Step S1006 BIOS writes the fifth parameter value into the location indicated by ACPI, and notifies the GPU driver to read the fifth parameter value.
- the BIOS writes the fifth parameter value into the storage location of the second performance parameter indicated by ACPI, and notifies the GPU driver to read the fifth parameter value.
- the storage location of the second performance parameter can be the same as or different from the storage location of the first performance parameter.
- Step S1007 The GPU driver reads the fifth parameter value and adjusts the performance of the GPU according to the fifth parameter value.
- Step S1008 starting a fourth application in response to the user operation.
- the fourth application is a game application, such as a 3A large game
- Step S1009 The scene recognition engine determines that the electronic device is in a fourth user scene based on the fourth application.
- the fourth user scenario is a game scenario.
- the scenario recognition module determining the user scenario in which the electronic device is located refer to S501 to S536, which will not be described in detail here.
- Step S1010 The scene recognition engine determines to send fourth scene information to the performance control application.
- the electronic device may pre-assign unique identifiers to different user scenarios, and the scenario information may include the unique identifier of the user scenario.
- Step S1011 at a fourth time point, the performance control application adjusts the second performance parameter to a sixth parameter value according to fourth scenario information, where the sixth parameter value is different from the fifth parameter value.
- the sixth parameter value is, for example, D1.
- Step S1012 the performance control application sends the sixth parameter value to the BIOS through the WMI interface.
- Step S1013 BIOS writes the fifth parameter value into the location indicated by ACPI, and notifies the GPU driver to read the fifth parameter value.
- the BIOS writes the fifth parameter value into the storage location of the second performance parameter indicated by ACPI, and notifies the GPU driver to read the fifth parameter value.
- Step S1014 The GPU driver reads the fifth parameter value and adjusts the performance of the GPU according to the fifth parameter value.
- the electronic device includes hardware and/or software modules corresponding to the execution of each function.
- 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 the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application in combination with the embodiments, but such implementation should not be considered Beyond the scope of this application.
- FIG11 shows a schematic block diagram of an apparatus 300 according to an embodiment of the present application.
- the apparatus 300 may include: a processor 301 and a transceiver/transceiver pin 302 , and optionally, a memory 303 .
- bus 304 includes a power bus, a control bus, and a status signal bus in addition to a data bus.
- bus 304 includes a power bus, a control bus, and a status signal bus in addition to a data bus.
- bus 304 includes a power bus, a control bus, and a status signal bus in addition to a data bus.
- all buses are referred to as bus 304 in the figure.
- the memory 303 may be used for the instructions in the aforementioned method embodiment.
- the processor 301 may be used to execute the instructions in the memory 303, and control the receiving pin to receive a signal, and control the sending pin to send a signal.
- the apparatus 300 may be the electronic device or a chip of the electronic device in the above method embodiment.
- the steps performed by the parameter monitoring method provided in the above embodiment of the present application may also be performed by a chip system included in the electronic device 100, wherein the chip system may include a processor.
- the chip system may be coupled to a memory so that when the chip system is running, the computer program stored in the memory is called to implement the steps performed by the above electronic device 100.
- the processor in the chip system may be an application processor or a processor other than an application processor.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computing Systems (AREA)
- Physics & Mathematics (AREA)
- Quality & Reliability (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Mathematical Physics (AREA)
- Power Sources (AREA)
- Circuits Of Receivers In General (AREA)
Abstract
A performance regulation method and an electronic device (100). The performance requirement of the electronic device (100) can be determined according to a current user scenario of the electronic device (100), and the performance parameters of the electronic device (100) are adjusted according to the performance requirement of the electronic device (100), the performance parameters comprising at least one of the TDP power consumption of a CPU, the TGP power consumption of a GPU, the TPP power consumption of the GPU, and the DB power consumption of the GPU, so that a display card performs performance regulation according to the current TDP, TPP, TGP and/or DB power consumption, so as to provide more reasonable CPU and GPU performances according to the scenario, the performance requirements of a user in various scenario are better met, and the service life of the device is relatively prolonged, thereby improving the user experience.
Description
本申请要求于2022年10月31日提交中国国家知识产权局、申请号为202211345647.9、申请名称为“一种性能调控方法及电子设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims priority to the Chinese patent application filed with the State Intellectual Property Office of China on October 31, 2022, with application number 202211345647.9 and application name “A performance control method and electronic device”, the entire contents of which are incorporated by reference in this application.
本申请涉及智能终端技术领域,尤其涉及一种性能调控方法及电子设备。The present application relates to the technical field of intelligent terminals, and in particular to a performance control method and an electronic device.
随着电子技术的不断发展,笔记本电脑或便携式电脑(Laptop)等电子设备作为人们日常生活工作中的常用设备得到了广泛发展。目前市场上存在各种各样配置的笔记本电脑,例如许多笔记本电脑为了提供更高的性能都配置了独立显卡。独立显卡的增加一般意味着设备功耗的增加,而鉴于笔记本电脑的移动属性,续航一直都是用户关注焦点。如何优化笔记本电脑或便携式电脑(Laptop)等电子设备的性能、续航、发热等一直是用户关注的焦点。With the continuous development of electronic technology, electronic devices such as laptops or portable computers have been widely developed as common devices in people's daily life and work. There are various configurations of laptops on the market. For example, many laptops are equipped with independent graphics cards to provide higher performance. The increase of independent graphics cards generally means an increase in device power consumption, and given the mobile nature of laptops, battery life has always been the focus of users. How to optimize the performance, battery life, heat generation, etc. of electronic devices such as laptops or portable computers has always been the focus of users.
发明内容Summary of the invention
为了解决上述技术问题,本申请提供一种参性能调控方法及电子设备。在该性能调控方法中,可以根据电子设备当前的用户场景调节电子设备的性能参数,使显卡根据当前的TDP、TPP、TGP和/或DB功耗进行性能调控,从而可以根据场景提供更合理的CPU和GPU性能,不仅更好地满足用户在各种场景下的性能需求,而且可以相对地提高设备的续航,从而提高用户体验。In order to solve the above technical problems, the present application provides a performance control method and an electronic device. In the performance control method, the performance parameters of the electronic device can be adjusted according to the current user scenario of the electronic device, so that the graphics card can perform performance control according to the current TDP, TPP, TGP and/or DB power consumption, so that more reasonable CPU and GPU performance can be provided according to the scenario, which not only better meets the performance requirements of users in various scenarios, but also can relatively improve the battery life of the device, thereby improving the user experience.
第一方面,本申请提供一种性能调控方法,应用于电子设备,所述电子设备包括中央处理器CPU和图形处理器GPU,所述方法包括:In a first aspect, the present application provides a performance control method, which is applied to an electronic device, wherein the electronic device includes a central processing unit (CPU) and a graphics processing unit (GPU), and the method includes:
响应于用户操作启动第一应用,在启动所述第一应用之前,所述电子设备的第一性能参数为第一参数值,所述第一性能参数包括所述CPU的TDP功耗、所述GPU的TGP功耗、所述GPU的TPP功耗、所述GPU的DB功耗中的至少一种;In response to a user operation, a first application is started. Before the first application is started, a first performance parameter of the electronic device is a first parameter value, and the first performance parameter includes at least one of a TDP power consumption of the CPU, a TGP power consumption of the GPU, a TPP power consumption of the GPU, and a DB power consumption of the GPU;
启动所述第一应用之后,在第一时间点,所述电子设备的第一性能参数调节为第二参数值,所述第二参数值与所述第一参数值不同;After starting the first application, at a first time point, a first performance parameter of the electronic device is adjusted to a second parameter value, the second parameter value being different from the first parameter value;
响应于用户操作,关闭所述第一应用,启动第二应用;In response to a user operation, closing the first application and starting a second application;
启动所述第二应用之后,在第二时间点,将所述电子设备的第一性能参数调节为第三参数值,所述第三参数值与所述第二参数值不同。After starting the second application, at a second time point, the first performance parameter of the electronic device is adjusted to a third parameter value, and the third parameter value is different from the second parameter value.
根据第一方面,可以根据电子设备当前运行的应用确定电子设备的性能需求,根据电子设备的性能需求调节电子设备的第一性能参数,该第一性能参数包括CPU的TDP功耗、所述GPU的TGP功耗、所述GPU的TPP功耗和所述GPU的DB功耗中的至少
一种,使显卡根据当前的TDP、TPP、TGP和/或DB功耗进行性能调控,从而可以根据场景提供更合理的CPU和GPU性能,不仅更好地满足用户在各种场景下的性能需求,而且可以相对地提高设备的续航,从而提高用户体验。According to the first aspect, the performance requirement of the electronic device can be determined according to the application currently running on the electronic device, and the first performance parameter of the electronic device can be adjusted according to the performance requirement of the electronic device, and the first performance parameter includes at least one of the TDP power consumption of the CPU, the TGP power consumption of the GPU, the TPP power consumption of the GPU, and the DB power consumption of the GPU. One method is to enable the graphics card to adjust its performance according to the current TDP, TPP, TGP and/or DB power consumption, so as to provide more reasonable CPU and GPU performance according to the scenario, which not only better meets the performance requirements of users in various scenarios, but also can relatively improve the battery life of the device, thereby improving the user experience.
根据第一方面,或者以上第一方面的任意一种实现方式,所述方法还包括:According to the first aspect, or any implementation of the first aspect above, the method further includes:
响应于用户操作,启动第三应用,在启动所述第三应用之前,所述电子设备的第二性能参数为第四参数值,所述第二性能参数包括所述GPU的Dx值;In response to a user operation, a third application is started, and before the third application is started, a second performance parameter of the electronic device is a fourth parameter value, and the second performance parameter includes a Dx value of the GPU;
启动所述第三应用之后,在第三时间点,将所述电子设备的第二性能参数调节为第五参数值,所述第五参数值与所述第四参数值不同;After starting the third application, at a third time point, adjusting the second performance parameter of the electronic device to a fifth parameter value, the fifth parameter value being different from the fourth parameter value;
响应于用户操作,关闭所述第三应用,启动第四应用;In response to a user operation, closing the third application and starting a fourth application;
启动所述第四应用之后,在第四时间点,将所述电子设备的第二性能参数调节为第六参数值,所述第六参数值和所述第五参数值不同。After starting the fourth application, at a fourth time point, the second performance parameter of the electronic device is adjusted to a sixth parameter value, and the sixth parameter value is different from the fifth parameter value.
如此设置,可以根据电子设备当前的用户场景确定电子设备的性能需求,根据电子设备的性能需求调节电子设备的第二性能参数,该第二性能参数包括GPU的Dx值,使显卡根据当前Dx值对应的功耗进行性能调控,从而可以根据场景提供更合理的GPU性能,不仅更好地满足用户在各种场景下的性能需求,而且可以相对地提高设备的续航,从而提高用户体验。With such a setting, the performance requirements of the electronic device can be determined according to the current user scenario of the electronic device, and the second performance parameter of the electronic device can be adjusted according to the performance requirements of the electronic device. The second performance parameter includes the Dx value of the GPU, so that the graphics card performs performance regulation according to the power consumption corresponding to the current Dx value, thereby providing a more reasonable GPU performance according to the scenario, which not only better meets the performance requirements of users in various scenarios, but also can relatively improve the battery life of the device, thereby improving the user experience.
根据第一方面,或者以上第一方面的任意一种实现方式,所述方法还包括:According to the first aspect, or any implementation of the first aspect above, the method further includes:
在第五时间点之前,所述电子设备的第二性能参数为第七参数值,所述第二性能参数包括所述GPU的Dx值,所述第五时间点在所述第一时间点和/或所述第二时间点之后;Before a fifth time point, a second performance parameter of the electronic device is a seventh parameter value, the second performance parameter includes a Dx value of the GPU, and the fifth time point is after the first time point and/or the second time point;
在第五时间点,将所述电子设备的第二性能参数调节为第八参数值,所述第八参数值与所述第七参数值不同;At a fifth time point, adjusting the second performance parameter of the electronic device to an eighth parameter value, wherein the eighth parameter value is different from the seventh parameter value;
所述电子设备在第五时间点的剩余电池电量小于在所述第一时间点和/或所述第二时间点的剩余电池电量,在所述第五时间点所述电子设备未插电;或者The remaining battery power of the electronic device at the fifth time point is less than the remaining battery power at the first time point and/or the second time point, and the electronic device is not plugged in at the fifth time point; or
所述电子设备在第五时间点的温度大于在所述第一时间点和/或所述第二时间点的温度。The temperature of the electronic device at the fifth time point is greater than the temperature at the first time point and/or the second time point.
如此设置可以在电子设备温度过高或电量不足时通过限制GPU功耗来降低设备发热或电量消耗,提高设备续航。This setting can reduce device heat or power consumption and improve device battery life by limiting GPU power consumption when the temperature of the electronic device is too high or the battery is low.
根据第一方面,或者以上第一方面的任意一种实现方式,所述方法还包括:According to the first aspect, or any implementation of the first aspect above, the method further includes:
根据所述第一应用确定所述电子设备所处的用户场景,根据所述电子设备所处的用户场景确定所述第二参数值的大小;Determine a user scenario of the electronic device according to the first application, and determine a value of the second parameter according to the user scenario of the electronic device;
根据所述第二应用确定所述电子设备所处的用户场景,根据所述电子设备所处的用户场景确定所述第三参数值的大小。The user scenario of the electronic device is determined according to the second application, and the size of the third parameter value is determined according to the user scenario of the electronic device.
如此设置,可以根据电子设备当前的用户场景调节电子设备的性能参数,使显卡根据当前的TDP、TPP、TGP和/或DB功耗进行性能调控,从而可以根据场景提供更合理的CPU和GPU性能,不仅更好地满足用户在各种场景下的性能需求,而且可以相对地提高设备的续航,从而提高用户体验。
With such a setting, the performance parameters of the electronic device can be adjusted according to the current user scenario of the electronic device, so that the graphics card can perform performance regulation according to the current TDP, TPP, TGP and/or DB power consumption, thereby providing more reasonable CPU and GPU performance according to the scenario, which not only better meets the performance requirements of users in various scenarios, but also can relatively improve the battery life of the device, thereby improving the user experience.
根据第一方面,或者以上第一方面的任意一种实现方式,所述方法还包括:According to the first aspect, or any implementation of the first aspect above, the method further includes:
将所述第二参数值发送至GPU驱动,所述GPU驱动根据所述第二参数值控制所述GPU的性能;Sending the second parameter value to a GPU driver, wherein the GPU driver controls the performance of the GPU according to the second parameter value;
将所述第三参数值发送至所述GPU驱动,所述GPU驱动根据所述第三参数值控制所述GPU的性能。The third parameter value is sent to the GPU driver, and the GPU driver controls the performance of the GPU according to the third parameter value.
如此设置,可以使显卡根据当前的TDP、TPP、TGP和/或DB功耗进行性能调控,从而可以根据场景提供更合理的CPU和GPU性能,不仅更好地满足用户在各种场景下的性能需求,而且可以相对地提高设备的续航,从而提高用户体验。This setting allows the graphics card to adjust its performance based on the current TDP, TPP, TGP and/or DB power consumption, thereby providing more reasonable CPU and GPU performance based on the scenario. It not only better meets the user's performance requirements in various scenarios, but also can relatively improve the device's battery life, thereby improving the user experience.
根据第一方面,或者以上第一方面的任意一种实现方式,所述电子设备还包括BIOS和ACPI,According to the first aspect, or any implementation of the first aspect above, the electronic device further includes BIOS and ACPI,
将所述第二参数值发送至GPU驱动,所述GPU驱动根据所述第二参数值控制所述GPU的性能,包括:Sending the second parameter value to a GPU driver, wherein the GPU driver controls the performance of the GPU according to the second parameter value, includes:
通过WMI接口将所述第二参数值传输至所述BIOS;Transmitting the second parameter value to the BIOS via a WMI interface;
所述BIOS将所述所述第二参数值写入所述ACPI指定的第一性能参数存储位置,并通过所述GPU驱动读取所述第二参数值;The BIOS writes the second parameter value into the first performance parameter storage location specified by the ACPI, and reads the second parameter value through the GPU driver;
所述GPU驱动读取所述第二参数值,并根据所述第二参数值控制所述GPU的性能;The GPU driver reads the second parameter value, and controls the performance of the GPU according to the second parameter value;
将所述第三参数值发送至GPU驱动,所述GPU驱动根据所述第三参数值控制所述GPU的性能,包括:Sending the third parameter value to a GPU driver, wherein the GPU driver controls the performance of the GPU according to the third parameter value, includes:
通过WMI接口将所述第三参数值传输至所述BIOS;Transmitting the third parameter value to the BIOS via a WMI interface;
所述BIOS将所述所述第三参数值写入所述ACPI指定的第一性能参数存储位置,并通过所述GPU驱动读取所述第二参数值;The BIOS writes the third parameter value into the first performance parameter storage location specified by the ACPI, and reads the second parameter value through the GPU driver;
所述GPU驱动读取所述第三参数值,并根据所述第三参数值控制所述GPU的性能。The GPU driver reads the third parameter value and controls the performance of the GPU according to the third parameter value.
如此设置可以通过WMI接口和BIOS将第一性能参数的当前参数值发送至GPU驱动,保证GPU驱动稳定及时获取当前参数值,并根据当前参数值进行性能调控。This setting can send the current parameter value of the first performance parameter to the GPU driver through the WMI interface and BIOS, ensuring that the GPU driver obtains the current parameter value stably and timely, and performs performance control according to the current parameter value.
根据第一方面,或者以上第一方面的任意一种实现方式,所述方法还包括:According to the first aspect, or any implementation of the first aspect above, the method further includes:
将所述第五参数值发送至GPU驱动,所述GPU驱动根据所述第五参数值控制所述GPU的性能;Sending the fifth parameter value to a GPU driver, wherein the GPU driver controls the performance of the GPU according to the fifth parameter value;
将所述第六参数值发送至所述GPU驱动,所述GPU驱动根据所述第六参数值控制所述GPU的性能。The sixth parameter value is sent to the GPU driver, and the GPU driver controls the performance of the GPU according to the sixth parameter value.
如此设置,可以使显卡根据当前的Dx值进行性能调控,从而可以根据场景提供更合理的CPU和GPU性能,不仅更好地满足用户在各种场景下的性能需求,而且可以相对地提高设备的续航,从而提高用户体验。This setting allows the graphics card to adjust performance according to the current Dx value, thereby providing more reasonable CPU and GPU performance according to the scenario. It not only better meets the performance requirements of users in various scenarios, but also can relatively improve the battery life of the device, thereby improving the user experience.
根据第一方面,或者以上第一方面的任意一种实现方式,所述电子设备还包括BIOS和ACPI,According to the first aspect, or any implementation of the first aspect above, the electronic device further includes BIOS and ACPI,
将所述第五参数值发送至GPU驱动,所述GPU驱动根据所述第五参数值控制所述
GPU的性能,包括:The fifth parameter value is sent to the GPU driver, and the GPU driver controls the GPU performance, including:
通过WMI接口将所述第五参数值传输至所述BIOS;Transmitting the fifth parameter value to the BIOS via a WMI interface;
所述BIOS将所述所述第五参数值写入所述ACPI指定的第二性能参数存储位置,并通过所述GPU驱动读取所述第三参数值;The BIOS writes the fifth parameter value into the second performance parameter storage location specified by the ACPI, and reads the third parameter value through the GPU driver;
所述GPU驱动读取所述第五参数值,并根据所述第五参数值控制所述GPU的性能;The GPU driver reads the fifth parameter value and controls the performance of the GPU according to the fifth parameter value;
将所述第六参数值发送至GPU驱动,所述GPU驱动根据所述第六参数值控制所述GPU的性能,包括:Sending the sixth parameter value to a GPU driver, wherein the GPU driver controls the performance of the GPU according to the sixth parameter value, includes:
通过WMI接口将所述第六参数值传输至所述BIOS;Transmitting the sixth parameter value to the BIOS via a WMI interface;
所述BIOS将所述所述第六参数值写入所述ACPI指定的第二性能参数存储位置,并通过所述GPU驱动读取所述第六参数值;The BIOS writes the sixth parameter value into the second performance parameter storage location specified by the ACPI, and reads the sixth parameter value through the GPU driver;
所述GPU驱动读取所述第六参数值,并根据所述第六参数值控制所述GPU的性能。The GPU driver reads the sixth parameter value and controls the performance of the GPU according to the sixth parameter value.
如此设置可以通过WMI接口和BIOS将第二性能参数的当前参数值发送至GPU驱动,保证GPU驱动稳定及时获取当前参数值,并根据当前参数值进行性能调控。This setting can send the current parameter value of the second performance parameter to the GPU driver through the WMI interface and BIOS, ensuring that the GPU driver obtains the current parameter value stably and timely, and performs performance control according to the current parameter value.
第二方面,本申请提供一种电子设备,包括:存储器和处理器,所述存储器和所述处理器耦合;所述存储器存储有程序指令,所述程序指令由所述处理器执行时,使得所述电子设备执行第一方面或第一方面的任意可能的实现方式中的性能调控方法。In a second aspect, the present application provides an electronic device, comprising: a memory and a processor, wherein the memory and the processor are coupled; the memory stores program instructions, and when the program instructions are executed by the processor, the electronic device executes the performance control method in the first aspect or any possible implementation of the first aspect.
第三方面,本申请提供了一种计算机可读介质,用于存储计算机程序,该计算机程序包括用于执行第一方面或第一方面的任意可能的实现方式中的方法的指令。In a third aspect, the present application provides a computer-readable medium for storing a computer program, wherein the computer program includes instructions for executing the method in the first aspect or any possible implementation of the first aspect.
第四方面,本申请提供了一种计算机程序,该计算机程序包括用于执行第一方面或第一方面的任意可能的实现方式中的方法的指令。In a fourth aspect, the present application provides a computer program, comprising instructions for executing the method in the first aspect or any possible implementation of the first aspect.
第五方面,本申请提供了一种芯片,该芯片包括处理电路、收发管脚。其中,该收发管脚、和该处理电路通过内部连接通路互相通信,该处理电路执行第一方面或第一方面的任一种可能的实现方式中的方法,以控制接收管脚接收信号,以控制发送管脚发送信号。In a fifth aspect, the present application provides a chip, the chip comprising a processing circuit and a transceiver pin, wherein the transceiver pin and the processing circuit communicate with each other through an internal connection path, and the processing circuit executes the method in the first aspect or any possible implementation of the first aspect to control the receiving pin to receive a signal and control the sending pin to send a signal.
图1为示例性示出的目前一种温度监控方法的模块交互示意图;FIG1 is a schematic diagram showing an exemplary module interaction of a current temperature monitoring method;
图2为示例性示出的电子设备的硬件结构示意图;FIG2 is a schematic diagram showing a hardware structure of an electronic device;
图3为示例性示出的电子设备的软件结构示意图;FIG3 is a schematic diagram showing an exemplary software structure of an electronic device;
图4为本申请实施例提供的软件模块间的交互示意图;FIG4 is a schematic diagram of interaction between software modules provided in an embodiment of the present application;
图5为本申请实施例提供的一种信号交互示意图;FIG5 is a schematic diagram of a signal interaction provided in an embodiment of the present application;
图6为本申请实施例提供的一种界面图;FIG6 is an interface diagram provided in an embodiment of the present application;
图7为本申请实施例提供的又一种信号交互示意图;FIG7 is another schematic diagram of signal interaction provided in an embodiment of the present application;
图8为本申请实施例提供的性能调控方法的流程图;
FIG8 is a flow chart of a performance control method provided in an embodiment of the present application;
图9为本申请实施例提供的性能调控方法的示例调控过程;FIG9 is an example control process of the performance control method provided in an embodiment of the present application;
图10为本申请实施例提供的性能调控方法的又一示例调控过程;FIG10 is another exemplary control process of the performance control method provided in an embodiment of the present application;
图11示出了本申请实施例的一种装置的示意性框图。FIG. 11 shows a schematic block diagram of a device according to an embodiment of the present application.
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。The term "and/or" in this article is merely a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and/or B can mean: A exists alone, A and B exist at the same time, and B exists alone.
本申请实施例的说明书和权利要求书中的术语“第一”和“第二”等是用于区别不同的对象,而不是用于描述对象的特定顺序。例如,第一目标对象和第二目标对象等是用于区别不同的目标对象,而不是用于描述目标对象的特定顺序。The terms "first" and "second" in the description and claims of the embodiments of the present application are used to distinguish different objects rather than to describe a specific order of objects. For example, a first target object and a second target object are used to distinguish different target objects rather than to describe a specific order of target objects.
在本申请实施例中,“示例性的”或者“例如”等词用于表示作例子、例证或说明。本申请实施例中被描述为“示例性的”或者“例如”的任何实施例或设计方案不应被解释为比其它实施例或设计方案更优选或更具优势。确切而言,使用“示例性的”或者“例如”等词旨在以具体方式呈现相关概念。In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.
在本申请实施例的描述中,除非另有说明,“多个”的含义是指两个或两个以上。例如,多个处理单元是指两个或两个以上的处理单元;多个系统是指两个或两个以上的系统。In the description of the embodiments of the present application, unless otherwise specified, the meaning of "multiple" refers to two or more than two. For example, multiple processing units refer to two or more processing units; multiple systems refer to two or more systems.
为了下述各实施例的描述清楚简沽,首先给出相关概念或技术的简要介绍:In order to make the description of the following embodiments clear and concise, a brief introduction to related concepts or technologies is first given:
主板BIOS:Basic Input Output System,基本输入输出系统。BIOS是一组固化到计算机内主板上一个ROM芯片上的程序,它保存着计算机最重要的基本输入输出的程序、系统设置信息、开机上电自检程序和系统启动自举程序。BIOS主要功能是为计算机提供最底层的、最直接的硬件设置和控制。BIOS提供给操作系统的接口包括BS(Boot Services,启动服务)和RT(Runtime Services,运行时服务)。Motherboard BIOS: Basic Input Output System. BIOS is a set of programs that are fixed to a ROM chip on the motherboard of the computer. It stores the most important basic input and output programs of the computer, system setting information, power-on self-test program and system boot program. The main function of BIOS is to provide the lowest-level and most direct hardware settings and control for the computer. The interfaces provided by BIOS to the operating system include BS (Boot Services) and RT (Runtime Services).
显卡BIOS:BIOS又称VGA BIOS或Video BIOS,主要用于存放显示芯片与驱动程序之间的控制程序,其控制着显卡各种工作状态,包括核心工作频率,显存工作频率,功耗限制、工作电压和显存时序等核心参数。显卡BIOS芯片用来保存显卡BIOS程序,和主板BIOS一样,显卡BIOS是储存在BIOS芯片中的,而不是储存在磁盘中。Graphics BIOS: BIOS is also called VGA BIOS or Video BIOS. It is mainly used to store the control program between the display chip and the driver. It controls various working states of the graphics card, including core operating frequency, video memory operating frequency, power consumption limit, operating voltage, video memory timing and other core parameters. The graphics card BIOS chip is used to save the graphics card BIOS program. Like the motherboard BIOS, the graphics card BIOS is stored in the BIOS chip instead of the disk.
NVAPI:NVAPI为NVIDIA(英伟达/辉达)厂商提供的供第三方调用的接口用于监控显卡的温度、性能参数等。NVAPI: NVAPI is an interface provided by NVIDIA (NVIDIA/Nvidia) for third-party calls to monitor the temperature, performance parameters, etc. of graphics cards.
ACPI:Advanced Configuration and Power Interface,高级配置与电源接口,ACPI是系统硬件/固件(BIOS)与OS(操作系统)和OS应用程序之间的接口。换言之BIOS通过统一的接口提供操作系统到硬件的通讯,ACPI就是BIOS中这种统一接口的一种实现方式。ACPI为操作系统(OS)提供两类数据结构:数据表和定义块。它们是OS(操作系
统)与BIOS/EFI固件进行交互的接口。数据表存储原始数据,并由设备驱动程序使用。定义块由解释程序可执行的字节码组成。其中的数据表部分由固件(BIOS/EFI)负责生成,用于描述系统硬件的各个方面的信息。ACPI接口中包含了很多预定义的表格,这些表格的定义存储在BIOS芯片中,由BIOS生成到内存中提交给操作系统。ACPI: Advanced Configuration and Power Interface, ACPI is the interface between system hardware/firmware (BIOS) and OS (operating system) and OS application. In other words, BIOS provides communication between operating system and hardware through a unified interface, and ACPI is an implementation of this unified interface in BIOS. ACPI provides two types of data structures for the operating system (OS): data tables and definition blocks. They are OS (operating system) The ACPI interface is an interface for the BIOS/EFI firmware to interact with the system. The data table stores raw data and is used by the device driver. The definition block consists of bytecodes that can be executed by the interpreter. The data table part is generated by the firmware (BIOS/EFI) and is used to describe various aspects of the system hardware. The ACPI interface contains many predefined tables, the definitions of which are stored in the BIOS chip and generated by the BIOS into the memory and submitted to the operating system.
ACPI Control Method:ACPI控制方法,类似于C语言中的函数,AML的函数叫做Method。根据ACPI的规范,BIOS提供了一些标准的Method给OS调用,例如_PTS,_WAK等等。控制方法定义OS如何执行一个简单的硬件任务。例如,OS调用控制方法(ControlMethod)去读取一个高温区的温度。ACPI Control Method: ACPI control method is similar to the function in C language. The function of AML is called Method. According to the ACPI specification, BIOS provides some standard methods for OS to call, such as _PTS, _WAK, etc. The control method defines how OS performs a simple hardware task. For example, OS calls the control method (ControlMethod) to read the temperature of a high temperature area.
WMI:windows management instrumentation,Windows管理规范,为从计算机系统、网络或企业获取管理数据的任何本地或远程应用程序或脚本提供统一接口。该统一接口的设计使得WMI客户端应用程序和脚本不必调用各种各样的操作系统应用程序编程接口(API)。WMI: Windows Management Instrumentation, Windows Management Specification, provides a unified interface for any local or remote application or script to obtain management data from a computer system, network, or enterprise. The design of this unified interface makes it unnecessary for WMI client applications and scripts to call various operating system application programming interfaces (APIs).
NVIDIA Dynamic Boost(动态增强):是一项新技术,它可以更智能的为笔记本电脑的CPU和GPU分配功率,从而使笔记本电脑在有限的功耗前提下,提升功耗利用效率,从而提升笔记本电脑的整体性能。NVIDIA Dynamic Boost: is a new technology that more intelligently allocates power to the CPU and GPU of a laptop, thereby improving the power efficiency of the laptop under the premise of limited power consumption, thereby improving the overall performance of the laptop.
Dx-Notify:NVIDIA(英伟达)显卡预留的性能控制接口,Dx-Notify支持D1-D5共5阶的性能控制,每一阶对应的GPU性能不同,可以在Video BIOS设置D1-D5对应的性能,D1性能最强,D5性能最弱。Dx-Notify: A performance control interface reserved for NVIDIA graphics cards. Dx-Notify supports 5 levels of performance control from D1 to D5. Each level corresponds to different GPU performance. You can set the corresponding performance of D1-D5 in Video BIOS. D1 has the strongest performance and D5 has the weakest performance.
SCI:System Control Interrupt,系统控制中断。专门用于ACPI电源管理的一个IRQ(中断请求),需要OS(操作系统)支持。SCI: System Control Interrupt, system control interrupt. An IRQ (interrupt request) specifically used for ACPI power management, which requires OS (operating system) support.
SMI:System Management Interrupt,系统管理中断,使用系统进入SMM(System Management Mode,系统管理模式)的特殊中断。SMI: System Management Interrupt, a special interrupt used by the system to enter SMM (System Management Mode).
SMM:System Management Mode,系统管理模式,是一个对所有Intel处理器都统一的标准体系结构特性,系统管理模式(SMM)提供与传统IA-32架构中的系统管理中断(SMI)处理程序相同的执行环境。SMM: System Management Mode, system management mode, is a standard architecture feature that is unified for all Intel processors. System Management Mode (SMM) provides the same execution environment as the System Management Interrupt (SMI) handler in the traditional IA-32 architecture.
TGP:Total Graphics Power,一般指整张显卡的性能/功耗。TGP: Total Graphics Power, generally refers to the performance/power consumption of the entire graphics card.
TDP:CPU Thermal Design Power,散热设计功耗,其含义是“当处理器达到最大负荷的时候,所释放出的热量”(单位为瓦(W)),是反应一颗处理器热量释放的指标,应用上,TDP是反映处理器热量释放的指标,是电脑的冷却系统必须有能力驱散的最大热量限度。TDP: CPU Thermal Design Power, thermal design power consumption, its meaning is "when the processor reaches the maximum load, the amount of heat released" (unit: watt (W)), is an indicator of the heat release of a processor. In application, TDP is an indicator that reflects the heat release of the processor, and it is the maximum heat limit that the computer's cooling system must be able to dissipate.
TPP功耗:Total Processor Power,全处理器功耗,对于笔记本而言,一般特指CPU功耗+GPU功耗。TPP power consumption: Total Processor Power, total processor power consumption. For laptops, it generally refers to CPU power consumption + GPU power consumption.
DB功耗:显卡的动态功耗,即在显卡的TGP功耗上进行动态调节的上下限,例如TGP功耗为40W,DB功耗为15W,则显卡驱动根据CPU当前功耗/实际功耗可以将显卡功耗限制在25W至55W之间。DB power consumption: dynamic power consumption of the graphics card, that is, the upper and lower limits of the dynamic adjustment of the TGP power consumption of the graphics card. For example, if the TGP power consumption is 40W and the DB power consumption is 15W, the graphics card driver can limit the graphics card power consumption to between 25W and 55W based on the current power consumption/actual power consumption of the CPU.
单烤/双烤:烤机就是电脑/计算机的稳定性测试,单烤就是软件(例如AIDA64Extreme)单独运行某个部件的压力测试,如GPU、FPU单烤,双烤就是软件让两种测试同时进行,一般指CPU和GPU满负荷工作。
Single baking/dual baking: The baking machine is a stability test of the computer. Single baking means that the software (such as AIDA64Extreme) runs a stress test of a certain component alone, such as GPU and FPU single baking. Double baking means that the software allows two tests to be performed at the same time, generally referring to the CPU and GPU working at full load.
地址信息:用于表示预先申请的内存的位置信息,CPU/程序通过地址信息可以获知预先申请的内存的具体位置,将诸如GPU温度、CPU温度、主板温度、风扇转速等参数存储在所述内存中,地址信息的表示方法有多种,所述地址信息可以是内存的起始位置与长度,也可以是内存的起始位置和末位置,凡是可以用于表示内存的位置的地址信息均适用于本申请施例。Address information: used to indicate the location information of the pre-applied memory. The CPU/program can obtain the specific location of the pre-applied memory through the address information, and store parameters such as GPU temperature, CPU temperature, motherboard temperature, fan speed, etc. in the memory. There are many ways to indicate the address information. The address information can be the starting position and length of the memory, or the starting position and end position of the memory. All address information that can be used to indicate the location of the memory is applicable to the present application embodiment.
焦点窗口(focus window),指拥有焦点的窗口。焦点窗口是唯一可以接收键盘输入的窗口。焦点窗口的确定方式与系统的焦点模式(focus mode)关联。焦点窗口的顶层窗口被称为活动窗口(active window)。同一时间只有一个窗口可以是活动窗口。焦点窗口大概率为用户当前需要使用的窗口。The focus window is the window that has the focus. The focus window is the only window that can receive keyboard input. The way the focus window is determined is related to the system's focus mode. The top window of the focus window is called the active window. Only one window can be the active window at the same time. The focus window is most likely the window that the user needs to use at the moment.
焦点模式,可用于决定鼠标如何使一个窗口获得焦点。一般地,焦点模式可包括三种,分别为:The focus mode can be used to determine how the mouse gives focus to a window. Generally, there are three focus modes:
(1)点击聚焦(click-to focus),在这种模式下,鼠标点击的窗口即可获得焦点。即当鼠标点击一个可以获得焦点的窗口的任意位置,即可激活该窗口,该窗口便被置于所有窗口的最前面,并接收键盘输入。当鼠标点击其他窗口时,该窗口会失去焦点。(1) Click-to focus. In this mode, the window clicked by the mouse will get the focus. That is, when the mouse clicks anywhere on a window that can get the focus, the window will be activated, and the window will be placed in front of all windows and receive keyboard input. When the mouse clicks on other windows, the window will lose the focus.
(2)焦点跟随鼠标(focus-follow-mouse),在这种模式下,鼠标下的窗口可以获取焦点。即当鼠标移到一个可以获得焦点的窗口的范围内,用户不需要点击窗口的某个地方就可以激活这个窗口,接收键盘输入,但该窗口不一定被置于所有窗口的最前面。当鼠标移出这个窗口的范围时,这个窗口也会随之失去焦点。(2) Focus-follow-mouse: In this mode, the window under the mouse can obtain the focus. That is, when the mouse moves into the range of a window that can obtain the focus, the user can activate the window and receive keyboard input without clicking anywhere in the window, but the window is not necessarily placed in the front of all windows. When the mouse moves out of the range of the window, the window will also lose the focus.
(3)草率聚焦(sloppy focus),这种焦点模式与focus-follow-mouse比较类似:当鼠标移到一个可以获得焦点的窗口的范围内,用户不需要点击窗口的某个地方就可以激活这个窗口,接收键盘输入,但该窗口不一定被置于所有窗口的最前面。与focus-follow-mouse不同的是,当鼠标移出这个窗口范围时,焦点并不会随之改变,只有当鼠标移动到别的可以接收焦点的窗口时,系统焦点才改变。(3) Sloppy focus. This focus mode is similar to focus-follow-mouse: when the mouse moves into the range of a window that can receive focus, the user does not need to click anywhere in the window to activate the window and receive keyboard input, but the window is not necessarily placed in the front of all windows. Unlike focus-follow-mouse, when the mouse moves out of the window range, the focus does not change. The system focus changes only when the mouse moves to another window that can receive focus.
进程包括多个线程,线程可以创建窗口。焦点进程为创建焦点窗口的线程所属的进程。A process includes multiple threads, and a thread can create a window. The focus process is the process to which the thread that creates the focus window belongs.
笔记本电脑或便携式电脑(Laptop)的所有芯片或处理器中,CPU(中央处理单元)和GPU(图形处理单元)是功耗最大,性能最难控制的芯片,如何控制CPU、GPU的性能、功耗、发热一直笔记本电脑或便携式电脑(Laptop)性能调控的难点,本申请实施例的目的使基于诸如笔记本电脑等电子设备的用户场景控制显卡性能和功耗,从而实现对整机性能和功耗的控制。Among all the chips or processors of a laptop or portable computer (Laptop), the CPU (central processing unit) and GPU (graphics processing unit) are the chips with the highest power consumption and the most difficult to control performance. How to control the performance, power consumption, and heat generation of the CPU and GPU has always been a difficult point in performance regulation of laptops or portable computers (Laptop). The purpose of the embodiments of the present application is to control the graphics card performance and power consumption based on user scenarios of electronic devices such as laptops, thereby achieving control of the performance and power consumption of the entire machine.
图1为示例性示出的目前一种性能调控方法的模块交互示意图。在图1所示示例中,以调节NV(即NVIDIA)显卡的Dx值(即Dx-Notify中的Dx值)为例说明目前的显卡性能调控流程。Figure 1 is a schematic diagram of module interaction of a current performance control method. In the example shown in Figure 1, adjusting the Dx value of an NV (ie, NVIDIA) graphics card (ie, the Dx value in Dx-Notify) is used as an example to illustrate the current graphics card performance control process.
在本申请中显卡、GPU、图形处理单元或图形处理器具有相同的含义,表示设备中的相同部件。显卡可以分为集成显卡和独立显卡。在本申请实施例中以调节独立显卡的性能为例进行说明。但应当理解的是,本申请实施例公开的性能调控方法也适用于集成显卡。此外,在本申请实施例中以NV显卡为例进行说明,但是本申请实施例公开的性能调控方法也适用于其它显卡。
In this application, graphics card, GPU, graphics processing unit or graphics processor have the same meaning and represent the same component in the device. Graphics cards can be divided into integrated graphics cards and independent graphics cards. In the embodiments of this application, the performance of independent graphics cards is adjusted as an example for explanation. However, it should be understood that the performance control method disclosed in the embodiments of this application is also applicable to integrated graphics cards. In addition, in the embodiments of this application, NV graphics cards are used as an example for explanation, but the performance control method disclosed in the embodiments of this application is also applicable to other graphics cards.
如图1所示,目前电子设备的显卡性能调控方法包括:As shown in FIG1 , current methods for controlling the performance of a graphics card of an electronic device include:
S101,控制器(EC)从显卡外部的温度传感器读取显卡温度。S101, a controller (EC) reads the temperature of a graphics card from a temperature sensor outside the graphics card.
示例性地,控制器(EC)通过例如系统管理总线(“SMBus”)与显卡外部的温度传感器通信连接,并通过系统管理总线(“SMBus”)对温度传感器或其它设备进行轮询来从显卡外部的温度传感器读取独显卡温度。Exemplarily, the controller (EC) is connected to communicate with a temperature sensor outside the graphics card via, for example, a system management bus ("SMBus"), and polls the temperature sensor or other devices via the system management bus ("SMBus") to read the temperature of the graphics card from the temperature sensor outside the graphics card.
S102,控制器(EC)根据显卡温度确定显卡的Dx值。S102, the controller (EC) determines the Dx value of the graphics card according to the temperature of the graphics card.
控制器根据预先设定的温度与Dx值的关系,基于显卡当前温度确定显卡当前的Dx值。例如在显卡当前温度超过D4对应的上限温度时,控制器(EC)确定将显卡Dx值调节为D5,以降低显卡性能,从而降低显卡温度。The controller determines the current Dx value of the graphics card based on the current temperature of the graphics card according to the relationship between the preset temperature and the Dx value. For example, when the current temperature of the graphics card exceeds the upper limit temperature corresponding to D4, the controller (EC) determines to adjust the Dx value of the graphics card to D5 to reduce the performance of the graphics card, thereby reducing the temperature of the graphics card.
S103,控制器(EC)通知BIOS切换显卡Dx值。S103, the controller (EC) notifies the BIOS to switch the graphics card Dx value.
示例性地,控制器(EC)通过62/66IO端口传递数据。BIOS和控制器(EC)预先定义SMI(System Management Interrupt,系统管理中断)中断号,BIOS或者说更具体地BIOS运行时服务通过62/66IO端口向控制器(EC)获取中断号。控制器(EC)确定显卡的Dx值后会产生SCI中断,BIOS运行时服务调用中断号对应的中断服务函数再次通过62/66IO端口读取显卡Dx值。Exemplarily, the controller (EC) transmits data through the 62/66IO port. The BIOS and the controller (EC) predefine the SMI (System Management Interrupt) interrupt number, and the BIOS or more specifically the BIOS runtime service obtains the interrupt number from the controller (EC) through the 62/66IO port. After the controller (EC) determines the Dx value of the graphics card, an SCI interrupt is generated, and the BIOS runtime service calls the interrupt service function corresponding to the interrupt number to read the Dx value of the graphics card again through the 62/66IO port.
S104,BIOS修改Dx值,并通知显卡驱动读取Dx值。S104, BIOS modifies the Dx value and notifies the graphics card driver to read the Dx value.
示例性地,ACPI中指定了内部存储器(即内存)中存储Dx值的存储位置,BIOS读取到Dx值后将该存储位置Dx数值修改为最新数值,然后通知显卡驱动读取最新的Dx值。Exemplarily, ACPI specifies a storage location in the internal memory (ie, memory) for storing Dx values. After reading the Dx value, the BIOS modifies the Dx value at the storage location to the latest value, and then notifies the graphics card driver to read the latest Dx value.
S105,显卡驱动读取Dx值,并根据Dx值对应的功耗控制显卡。S105, the graphics card driver reads the Dx value, and controls the graphics card according to the power consumption corresponding to the Dx value.
具体地,BIOS在修改Dx值后会产生SCI中断,显卡驱动接收到SCI中断(也即事件通知)后调用显卡控制方法(ACPI中定义的显卡control method)读取Dx的当前数值。Specifically, the BIOS will generate an SCI interrupt after modifying the Dx value. After receiving the SCI interrupt (that is, event notification), the graphics card driver calls the graphics card control method (graphics card control method defined in ACPI) to read the current value of Dx.
当读取到Dx的当前数值后,则根据Dx当前数值对应的功耗控制显卡性能。示例性例如当前Dx值为D3,对应的显卡功耗为15W,则显卡驱动控制显卡将其最大功耗限制在15W。When the current value of Dx is read, the graphics card performance is controlled according to the power consumption corresponding to the current value of Dx. For example, if the current Dx value is D3 and the corresponding graphics card power consumption is 15W, the graphics card driver controls the graphics card to limit its maximum power consumption to 15W.
至于Dx的当前数值对应的具体功耗可以从显卡BIOS中获取。As for the specific power consumption corresponding to the current value of Dx, it can be obtained from the graphics card BIOS.
虽然上述显卡性能调控方法可以调控显卡性能,但是只会根据显卡的温度被动进行显卡性能控制,并不会根据场景和需求主动进行显卡性能控制,很多情况下都是设备或显卡温度过高后才进行性能调控,以降低温度,这给用户的体验并不是很好。此外,Dx控制显卡上限值只支持5阶,调节范围比较固定,无法根据具体场景调节显卡的性能参数,这导致部分场景无法给用户提供更好的性能。例如在对CPU性能需要较大的场景(例如编程)中,根据显卡温度通过Dx调节显卡性能可能导致虽然显卡性能需求降低,但是仍然占用较大的功耗指标,这导致笔记本等设备无法提供足够的CPU性能。Although the above-mentioned graphics card performance control method can control the performance of the graphics card, it will only passively control the graphics card performance according to the temperature of the graphics card, and will not actively control the graphics card performance according to the scenario and needs. In many cases, performance control is performed only after the temperature of the device or graphics card is too high to reduce the temperature, which does not provide a very good experience for users. In addition, Dx only supports 5 levels of upper limit value for controlling the graphics card, and the adjustment range is relatively fixed. It is impossible to adjust the performance parameters of the graphics card according to the specific scenario, which results in some scenarios being unable to provide users with better performance. For example, in scenarios that require greater CPU performance (such as programming), adjusting the graphics card performance through Dx according to the graphics card temperature may result in a lower graphics card performance requirement, but still occupying a larger power consumption indicator, which results in devices such as notebooks being unable to provide sufficient CPU performance.
此外,目前一般常用性能调控方法还有在设备设计时根据散热和性能等条件,在BIOS中直接设定TPP&TGP&TDP的数值,显卡在工作过程中根据TPP/TGP/TDP设定数值,自动调整性能或者当游戏/GPU单烤/双烤等需要GPU大性能情况显卡驱动自动调整性能,但在此过程中TPP/TGP/TDP参数并不会进行改变,换言之CPU、显卡性能参数不会根据场景变化,只会根据芯片的功耗进行性能改变,这种方法无法适应不同场景对CPU
和显卡不同的性能需求。In addition, the commonly used performance control methods at present include directly setting the TPP&TGP&TDP values in the BIOS according to the conditions such as heat dissipation and performance when designing the device. The graphics card automatically adjusts the performance according to the TPP/TGP/TDP set values during operation, or when the game/GPU single baking/dual baking requires high GPU performance, the graphics card driver automatically adjusts the performance, but the TPP/TGP/TDP parameters will not change during this process. In other words, the CPU and graphics card performance parameters will not change according to the scene, but will only change according to the power consumption of the chip. This method cannot adapt to the CPU requirements in different scenes. Different performance requirements than graphics cards.
此外,目前还有通过WMI接口设置显卡的TPP和TGP来进行显卡性能控制的方法,这种方法同样TPP、TGP和DB值直接设定,不会根据电子设备当前所处的用户场景动态调整,适用范围较小,并且显卡性能控制精确度会受CPU实际功率影响,并不稳定。In addition, there is currently a method to control the graphics card performance by setting the TPP and TGP of the graphics card through the WMI interface. This method also directly sets the TPP, TGP and DB values, and will not dynamically adjust according to the current user scenario of the electronic device. It has a small scope of application, and the accuracy of graphics card performance control will be affected by the actual CPU power and is not stable.
基于上述原因,本申请实施例提供了一种性能调控方法,通过对设备当前的场景进行识别,当需要进行性能调控时根据具体场景设定TPP、TGP和/或TDP的具体参数或Dx值,使显卡根据当前的TPP、TGP和/或TDP参数或Dx值进行性能调控,从而可以根据场景提供更合理的CPU和GPU性能,不仅更好地满足用户在各种场景下的性能需求,而且可以相对地提高设备的续航,从而提高用户体验。下面对本申请实施例提供的性能调控方法进行详细说明。Based on the above reasons, the embodiment of the present application provides a performance control method, which identifies the current scene of the device, sets the specific parameters or Dx values of TPP, TGP and/or TDP according to the specific scene when performance control is needed, so that the graphics card can perform performance control according to the current TPP, TGP and/or TDP parameters or Dx values, thereby providing more reasonable CPU and GPU performance according to the scene, which not only better meets the performance requirements of users in various scenes, but also can relatively improve the battery life of the device, thereby improving the user experience. The performance control method provided by the embodiment of the present application is described in detail below.
图2为示例性示出的根据本申请实施例的电子设备的硬件结构示意图。应该理解的是,图2所示电子设备100仅是电子设备的一个范例,并且电子设备100可以具有比图中所示的更多的或者更少的部件,可以组合两个或多个的部件,或者可以具有不同的部件配置。图2中所示出的各种部件可以在包括一个或多个信号处理和/或专用集成电路在内的硬件、软件、或硬件和软件的组合中实现。FIG2 is a schematic diagram of the hardware structure of an electronic device according to an embodiment of the present application. It should be understood that the electronic device 100 shown in FIG2 is only an example of an electronic device, and the electronic device 100 may have more or fewer components than those shown in the figure, may combine two or more components, or may have different component configurations. The various components shown in FIG2 may be implemented in hardware, software, or a combination of hardware and software including one or more signal processing and/or application specific integrated circuits.
电子设备100可以包括:处理器110,内部存储器122,外部存储器121,嵌入式控制器(EC)130、独立图形处理器140、BIOS固件闪存150,天线1,无线通信模块160,显示屏170,风扇180,键盘181,温度传感器190等。The electronic device 100 may include: a processor 110, an internal memory 122, an external memory 121, an embedded controller (EC) 130, an independent graphics processor 140, a BIOS firmware flash memory 150, an antenna 1, a wireless communication module 160, a display screen 170, a fan 180, a keyboard 181, a temperature sensor 190, etc.
处理器110例如为中央处理单元(central processing unit,CPU),其可以包括一个或多个处理核心。处理器110还可以包括:控制器,存储器控制器,图形处理器(graphics processing unit,GPU,集成显卡)等。The processor 110 is, for example, a central processing unit (CPU), which may include one or more processing cores. The processor 110 may also include: a controller, a memory controller, a graphics processing unit (GPU, integrated graphics card), etc.
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器或寄存器。A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory or a register.
在一些实施例中,处理器110可以包括接口总线,其可以包括一个或多个接口。接口可以包括系统管理总线(“SMBus”),低引脚数(LPC)总线,串行外设接口(“SPI”)、高清音频(“HDA”)总线、串行高级技术附件(“SATA”)总线、标准化互连(例如,PCIe)和/或通用串行总线(universal serial bus,USB)接口等。In some embodiments, the processor 110 may include an interface bus, which may include one or more interfaces. The interface may include a system management bus ("SMBus"), a low pin count (LPC) bus, a serial peripheral interface ("SPI"), a high-definition audio ("HDA") bus, a serial advanced technology attachment ("SATA") bus, a standardized interconnect (e.g., PCIe) and/or a universal serial bus (USB) interface, etc.
可以理解的是,本申请实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对电子设备100的结构限定。在本申请另一些实施例中,电子设备100也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present application is only a schematic illustration and does not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
无线通信模块160可以提供应用在电子设备100上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT)等无线通信的解决方案。在一些实施例中,电子设备100的天线1和无线通信模块160耦合,使得电子设备100可以通过无线通信技术与网络以及其他设备通信。The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) network), Bluetooth (BT), etc. applied to the electronic device 100. In some embodiments, the antenna 1 of the electronic device 100 is coupled to the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology.
电子设备100通过独立图形处理器(即独立显卡或独立GPU)140或处理器110集成的图形处理器(即集成显卡或集成GPU),显示屏170以及处理器110等实现显示功能。图形处理器(GPU)用于执行数学和几何计算,用于图形渲染。电子设备100可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。
The electronic device 100 implements the display function through an independent graphics processor (i.e., independent graphics card or independent GPU) 140 or a graphics processor integrated in the processor 110 (i.e., integrated graphics card or integrated GPU), a display screen 170, and the processor 110. The graphics processor (GPU) is used to perform mathematical and geometric calculations for graphics rendering. The electronic device 100 may include one or more GPUs that execute program instructions to generate or change display information.
显示屏170用于显示界面,图像,视频等。显示屏170包括显示面板。The display screen 170 is used to display interfaces, images, videos, etc. The display screen 170 includes a display panel.
内部存储器(或主存储器)120可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储电子设备100使用过程中所创建的数据等。此外,内部存储器120可以包括高速随机存取存储器(RAM),例如为DDR(Double Data Rate)RAM,更具体可以为DDR4或DDR5RAM。内部存储器(或主存储器)120可以通过内存总线与处理器110通信连接。The internal memory (or main memory) 120 may include a program storage area and a data storage area. The program storage area may store an operating system, an application required for at least one 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, etc. In addition, the internal memory 120 may include a high-speed random access memory (RAM), such as a DDR (Double Data Rate) RAM, more specifically a DDR4 or DDR5 RAM. The internal memory (or main memory) 120 may be connected to the processor 110 in communication via a memory bus.
外部存储器121例如为固态磁盘、(“SSD”)或硬盘驱动器(“HDD”)或者闪存器件,通用闪存存储器(universal flash storage,UFS)等。外部存储器121可以通过串行高级技术附件(“SATA”)总线或标准化互连(例如,PCIe)与处理器110通信连接。The external memory 121 is, for example, a solid state disk (“SSD”) or a hard disk drive (“HDD”) or a flash memory device, a universal flash storage (UFS), etc. The external memory 121 can be communicatively connected to the processor 110 via a serial advanced technology attachment (“SATA”) bus or a standardized interconnect (e.g., PCIe).
嵌入式控制器(EC)130用于实现键盘控制,触摸板,电源管理,风扇控制等等的功能。控制器130可以通过温度传感器190采样CPU或GPU温度,然后根据CPU或GPU温度依据算法调控风扇。控制器130可以包含独立运行的软件,存放在自己的非易失性介质中。控制器130读取的外部温度传感器的温度也存储在控制器130内部RAM中。控制器120可以通过例如eSPI或LPC总线与处理器110进行连接和通信。The embedded controller (EC) 130 is used to implement functions such as keyboard control, touchpad, power management, fan control, etc. The controller 130 can sample the CPU or GPU temperature through the temperature sensor 190, and then adjust the fan according to the algorithm based on the CPU or GPU temperature. The controller 130 can include independently running software stored in its own non-volatile medium. The temperature of the external temperature sensor read by the controller 130 is also stored in the internal RAM of the controller 130. The controller 120 can be connected and communicated with the processor 110 through, for example, an eSPI or LPC bus.
独立图形处理器140用于执行数学和几何计算,用于图形渲染。独立图形处理器140可以在无3D程序运行时进入低功耗睡眠状态。独立图形处理器140睡眠时,电子设备100的图形渲染工作由处理器110中的图形处理器(即集成显卡或集成GPU)完成。独立图形处理器140可以通过标准化互连(例如,PCIe)与处理器110通信连接。独立图形处理器140可以根据显卡的Dx参数或TPP、TGP参数进行性能调控。The independent graphics processor 140 is used to perform mathematical and geometric calculations for graphics rendering. The independent graphics processor 140 can enter a low-power sleep state when no 3D program is running. When the independent graphics processor 140 is asleep, the graphics rendering work of the electronic device 100 is completed by the graphics processor (i.e., integrated graphics card or integrated GPU) in the processor 110. The independent graphics processor 140 can be connected to the processor 110 through a standardized interconnect (e.g., PCIe). The independent graphics processor 140 can perform performance control according to the Dx parameters or TPP, TGP parameters of the graphics card.
BIOS固件闪存150用于存储BIOS固件,BIOS固件可以为传统BIOS固件,也可以为基于UEFI的BIOS固件。BISO固件闪存150可以采样ROM(只读存储器)或Flash memory(闪存)。BIOS固件包括主板BIOS固件和显卡BIOS固件。The BIOS firmware flash memory 150 is used to store the BIOS firmware, which may be a traditional BIOS firmware or a UEFI-based BIOS firmware. The BIOS firmware flash memory 150 may be a ROM (read-only memory) or a Flash memory (flash memory). The BIOS firmware includes the mainboard BIOS firmware and the graphics card BIOS firmware.
风扇180用于为处理器110、独立图形处理器140等进行散热,以降低器件温度,保证设备运行。电子设备100可以包括一个或多个风扇180。示例性地,电子设备100可以在处理器110附近布置一个风扇,在独立图形处理器140附近布置一个风扇。The fan 180 is used to dissipate heat for the processor 110, the independent graphics processor 140, etc., so as to reduce the temperature of the components and ensure the operation of the device. The electronic device 100 may include one or more fans 180. For example, the electronic device 100 may arrange a fan near the processor 110 and a fan near the independent graphics processor 140.
键盘181用于供电子设备100的用户进行输入。The keyboard 181 is used for input by a user of the electronic device 100 .
温度传感器190用于采集电子设备100的例如处理器110、内部存储器120、独立图形处理器140等器件的温度。电子设备100可以包括一个或多个温度传感器190。示例性地,例如在处理器110外部布置一个或多个温度传感器190,在内部存储器120外部布置一个或多个温度传感器,在独立图形处理器140外部布置一个或多个温度传感器190。温度传感器190可以通过例如系统管理总线(“SMBus”)与处理器110或嵌入式控制器(EC)130通信连接,从而将采集的温度发送至处理器110或嵌入式控制器(EC)130。The temperature sensor 190 is used to collect the temperature of the components of the electronic device 100, such as the processor 110, the internal memory 120, the independent graphics processor 140, etc. The electronic device 100 may include one or more temperature sensors 190. Exemplarily, for example, one or more temperature sensors 190 are arranged outside the processor 110, one or more temperature sensors are arranged outside the internal memory 120, and one or more temperature sensors 190 are arranged outside the independent graphics processor 140. The temperature sensor 190 can be connected to the processor 110 or the embedded controller (EC) 130 through, for example, a system management bus ("SMBus"), so as to send the collected temperature to the processor 110 or the embedded controller (EC) 130.
电子设备100的软件系统可以采用分层架构,事件驱动架构,微核架构,微服务架构,或云架构。本申请实施例以分层架构的Windows系统为例,示例性说明电子设备100的软件结构。The software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture. The embodiment of the present application takes the Windows system of the layered architecture as an example to exemplify the software structure of the electronic device 100.
图3是本申请实施例的电子设备100的软件结构框图。FIG. 3 is a software structure block diagram of the electronic device 100 according to an embodiment of the present application.
电子设备100的分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层
与层之间通过软件接口通信。The layered architecture of the electronic device 100 divides the software into several layers, each with a clear role and division of labor. The layers communicate with each other through software interfaces.
在一些实施例中,将Windows系统分为用户态和内核态。其中,用户态包括应用层以及子系统动态链接库。内核态自下而上分为固件层、硬件抽象层(hardwareabstraction layer,HAL)、内核和驱动层及执行体。In some embodiments, the Windows system is divided into user state and kernel state. The user state includes the application layer and the subsystem dynamic link library. The kernel state is divided from bottom to top into the firmware layer, the hardware abstraction layer (HAL), the kernel and the driver layer, and the executive body.
如图3所示,应用层包括音乐、视频、游戏、办公、性能调控软件等应用程序。应用层还包括环境子系统、调度引擎、系统支持进程、服务进程等。其中,图中仅示出部分应用程序,应用层还可以包括其他应用程序,例如购物应用、浏览器等,本申请不做限定。As shown in Figure 3, the application layer includes applications such as music, video, games, office, performance control software, etc. The application layer also includes an environment subsystem, a scheduling engine, a system support process, a service process, etc. Among them, only some applications are shown in the figure, and the application layer can also include other applications, such as shopping applications, browsers, etc., which are not limited in this application.
环境子系统可以将基本的执行体系统服务的某些子集以特定的形态展示给应用程序,为应用程序提供执行环境。The environment subsystem can present certain subsets of the basic executive system services to the application in a specific form, providing an execution environment for the application.
场景识别引擎可以识别电子设备100所处的用户场景,并确定与该用户场景匹配的基础调度策略(也可称为第二调度策略)。The scene recognition engine can identify the user scene in which the electronic device 100 is located, and determine a basic scheduling strategy (also referred to as a second scheduling strategy) that matches the user scene.
调度引擎可以获取电子设备100的负载情况,并结合电子设备100的负载情况及上述基础调度策略确定符合电子设备100实际运行情况的实际调度策略。The scheduling engine can obtain the load condition of the electronic device 100, and determine the actual scheduling strategy that meets the actual operation condition of the electronic device 100 in combination with the load condition of the electronic device 100 and the above-mentioned basic scheduling strategy.
性能调控应用可以根据电子设备100所处的用户场景对CPU、GPU等进行性能调控。性能调控应用可以为独立应用程序,也可以其它应用(例如计算机管家)集成的软件模块,或者可以集成在操作系统的服务或引擎中。The performance control application can perform performance control on the CPU, GPU, etc. according to the user scenario of the electronic device 100. The performance control application can be an independent application, or a software module integrated with other applications (such as a computer manager), or can be integrated in a service or engine of an operating system.
子系统动态链接库包括API模块,该API模块包括Windows API,Windows原生API、NVAPI等。其中,Windows API,Windows原生API均可以为应用程序提供系统调用入口及内部函数支持,区别在于Windows原生API为Windows系统原生的API。例如,Windows API可包括user.dll、kernel.dll,Windows原生API可包括ntdll,dll。其中,user.dll是Windows用户界面接口,可用于执行创建窗口、发送消息等操作。kernel.dll于为应用程序提供访问内核的接口。ntdll.dll是重要的WindowsNT内核级文件,描述了windows本地NTAPI的接口。当Windows启动时,ntdl1.dll就驻留在内存中特定的写保护区域,使别的程序无法占用这个内存区域。The subsystem dynamic link library includes an API module, which includes Windows API, Windows native API, NVAPI, etc. Among them, Windows API and Windows native API can provide system call entry and internal function support for applications. The difference is that Windows native API is an API native to the Windows system. For example, Windows API may include user.dll and kernel.dll, and 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, ntdl1.dll resides in a specific write-protected area in the memory, so that other programs cannot occupy this memory area.
执行体包括进程管理器、虚拟内存管理器、安全引用监视器、I/O管理器、Windows管理规范(Windows management instrumentation,WMI)、电源管理器、系统事件驱动(operating system event driver,OsEventDriver)节点、系统与芯片驱动(operatingsystem to System on Chip,OS2SOC)节点等。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.
进程管理器用于创建及中止进程和线程。The process manager is used to create and terminate processes and threads.
虚拟内存管理器实现“虚拟内存”。虚拟内存管理器也为高速缓存管理器提供基本的支持。The Virtual Memory Manager implements "virtual memory". The Virtual Memory Manager also provides basic support for the Cache Manager.
安全引用监视器可在本地计算机上执行安全策略,它保护了操作系统资源,执行运行时对象的保护和监视。The Security Reference Monitor enforces security policy on the local computer, protects operating system resources, and performs runtime object protection and monitoring.
I/O管理器执行独立于设备的输入/输出,并进一步处理调用适当的设备驱动程序。The I/O manager performs device-independent input/output and further processes calls appropriate device drivers.
电源管理器可管理所有支持电源状态更改的设备的电源状态更改。The power manager manages power state changes for all devices that support power state changes.
系统事件驱动节点可以与内核和驱动层进行交互,例如与显卡驱动进行交互,在确定存在GPU视频解码事件后,向场景识别引擎上报该GPU视频解码事件。
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 there is a GPU video decoding event, report the GPU video decoding event to the scene recognition engine.
系统与芯片驱动节点可供调度引擎向硬件设备发送调整信息,例如向CPU发送调整PLl和PL2的信息。The system and chip driver nodes may be used by the scheduling engine to send adjustment information to the hardware device, for example, to send information for adjusting PL1 and PL2 to the CPU.
内核和驱动层包括内核以及设备驱动程序。The kernel and driver layer include the kernel and device drivers.
内核是对处理器体系结构的抽象,将执行体与处理器体系结构的差异相隔离,保证系统的可移植性。内核可以进行线程安排和调度、陷阱处理和异常调度、中断处理和调度等。The kernel is an abstraction of the processor architecture, isolating the executive body from the differences in the processor architecture to ensure the portability of the system. The kernel can perform thread scheduling and dispatching, trap handling and exception dispatching, interrupt handling and dispatching, etc.
设备驱动程序运行在内核模式下,为I/O系统和相关硬件之间的接口。设备驱动程序可包括显卡驱动、Intel DTT驱动、鼠标驱动、音视频驱动、摄像头驱动、键盘驱动等。例如,显卡驱动可以驱动GPU运行,Intel DTT驱动可以驱动CPU运行。Device drivers run in kernel mode and are interfaces between the I/O system and related hardware. Device drivers may include graphics card drivers, Intel DTT drivers, mouse drivers, audio and video drivers, camera drivers, keyboard drivers, etc. For example, a graphics card driver can drive the GPU to run, and an Intel DTT driver can drive the CPU to run.
HAL是一个核心态模块,可以隐藏各种与硬件有关的细节,例如I/O接口、中断控制器以及多处理器通信机制等,为运行Windows的不同硬件平台提供统一的服务接口,实现多种硬件平台上的可移植性。需要说明的是,为了维护Windows的可移植性,Windows内部组件和用户编写的设备驱动程序并不直接访问硬件,而是通过调用HAL中的例程。HAL is a kernel-state module that can hide various hardware-related details, such as I/O interfaces, interrupt controllers, and multi-processor communication mechanisms, and provide a unified service interface for different hardware platforms running Windows, achieving portability on multiple hardware platforms. It should be noted that in order to maintain the portability of Windows, Windows internal components and user-written device drivers do not directly access the hardware, but call routines in HAL.
固件层可以包括基本输入输出系统(basic input output system,bios),BIOS是一组固化到计算机主板上一个只读存储器(read only memory,ROM)芯片内的程序,它保存着计算机最重要的基本输入输出的程序、开机后自检程序和系统自启动程序,它可从互补金属氧化物半导体(complementary metal oxide semiconductor,CMOS)中读写系统设置的具体信息。其主要功能是为计算机提供最底层的、最直接的硬件设置和控制。The firmware layer can include the basic input output system (BIOS). BIOS is a set of programs that are fixed to a read-only memory (ROM) chip on the computer motherboard. It stores the most important basic input and output programs of the computer, the self-test program after powering on, and the system self-starting program. It can read and write specific information of system settings from the complementary metal oxide semiconductor (CMOS). Its main function is to provide the lowest-level and most direct hardware settings and control for the computer.
Intel DTT驱动可以通过BIOS向CPU发送指令的。The Intel DTT driver can send instructions to the CPU through the BIOS.
需要说明的是,本申请实施例仅以Windows系统举例来说明,在其他操作系统中(例如安卓系统,IOS系统等),只要各个功能模块实现的功能和本申请的实施例类似也能实现本申请的方案。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.
可以理解的是,图3示出的软件结构中的层以及各层中包含的部件,并不构成对电子设备100的具体限定。在本申请另一些实施例中,电子设备100可以包括比图示更多或更少的层,以及每个层中可以包括更多或更少的部件,本申请不做限定。It is understandable that the layers in the software structure shown in FIG3 and the components contained in each layer do not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer layers than shown in the figure, and each layer may include more or fewer components, which is not limited in the present application.
图4示出了电子设备100对资源进行调度时软件和硬件的工作流程示意图。FIG. 4 is a schematic diagram showing the software and hardware workflow when the electronic device 100 schedules resources.
如图4所示,应用层的场景识别引擎包括系统探针模块、场景识别模块及基础策略匹配管理器。场景识别模块可分别与系统探针模块及基础策略匹配管理器进行交互。场景识别模块可以向系统探针模块发送用于获取探针状态的请求。系统探针模块可以获取电子设备100的运行状态。例如,系统探针模块可以包括电源状态探针、外设状态探针、进程负载探针、音视频状态探针、系统负载探针及系统事件探针等。As shown in FIG4 , the scene recognition engine of the application layer includes a system probe module, a scene recognition module, and a basic strategy matching manager. The scene recognition module can interact with the system probe module and the basic strategy matching manager respectively. The scene recognition module can send a request for obtaining the probe status to the system probe module. The system probe module can obtain the operating status of the electronic device 100. For example, the system probe module can include a power status probe, a peripheral status probe, a process load probe, an audio and video status probe, a system load probe, and a system event probe.
其中,电源状态探针可以向内核态订阅电源状态事件,根据内核态反馈的回调函数确定电源状态,电源状态包括电池(剩余)电量、电源模式等,电源模式可包括交流电源(alternating current,AC)和直流电源(direct current,DC)。例如,电源状态探针可向执行体层的OsEventDriver节点发送订阅电源状态事件的请求,由OsEventDriver节点向执行体层的电源管理器转发该请求。电源管理器可通过该OsEventDriver节点向电源状态探针反馈回调函数。
Among them, the power state probe can subscribe to the power state event from the kernel state, and determine the power state according to the callback function fed back by the kernel state. The power state includes the battery (remaining) power, power mode, etc. The power mode may include alternating current (AC) and direct current (DC). For example, the power state probe can send a request to subscribe to the power state event to the OsEventDriver node of the executive layer, and the OsEventDriver node forwards the request to the power manager of the executive layer. The power manager can feed back the callback function to the power state probe through the OsEventDriver node.
外设状态探针可以向内核态订阅外设事件,根据内核态反馈的回调函数确定外设事件。外设事件包括鼠标滚轮滑动事件、鼠标点击事件、键盘输入事件、麦克风输入事件、摄像头输入事件等。The peripheral state probe can subscribe to peripheral events in the kernel state and determine the peripheral events according to the callback function fed back by the kernel state. Peripheral events include mouse wheel sliding events, mouse click events, keyboard input events, microphone input events, camera input events, etc.
进程负载探针可以向内核态订阅进程负载,根据内核态反馈的回调函数确定进程(例如,第一进程)的负载。The process load probe may subscribe to the process load in the kernel state, and determine the load of the process (eg, the first process) according to the callback function fed back by the kernel state.
系统负载探针可以向内核态订阅系统负载,根据内核态反馈的回调函数确定系统负载。The system load probe can subscribe to the system load in the kernel state and determine the system load based on the callback function fed back by the kernel state.
音视频状态探针可向内核态订阅音视频事件,根据内核态反馈的回调函数确定电子设备100当前存在的音视频事件。音视频事件可包括GPU解码事件等。例如,音视频状态探针可以向执行体层的OsEventDriver节点发送用于订阅GPU解码事件的请求,由OsEventDriver节点向内核和驱动层的显卡驱动转发该请求。显卡驱动可以监控GPU的状态,在监控到GPU在进行解码操作后,通过该OsEventDriver节点向音视频状态探针反馈回调函数。The audio and video status probe can subscribe to audio and video events in the kernel state, and determine the audio and video events currently existing in the electronic device 100 according to the callback function fed back by the kernel state. Audio and video events may include GPU decoding events, etc. For example, the audio and video status probe can send a request for subscribing to GPU decoding events to the OsEventDriver node of the executive layer, and the OsEventDriver node forwards the request to the graphics card driver of the kernel and driver layer. The graphics card driver can monitor the status of the GPU, and after monitoring that the GPU is performing a decoding operation, it feeds back a callback function to the audio and video status probe through the OsEventDriver node.
系统事件探针可以向内核态订阅系统事件,根据内核态反馈的回调函数确定系统事件。系统事件可包括窗口变化事件、进程创建事件、线程创建事件等。例如,系统事件探针可以向执行体层的OsEventDriver节点发送订阅进程创建事件的请求,由OsEventDriver节点向进程管理器转发该请求。进程管理器可在创建进程后,通过该OsEventDriver节点向系统事件探针反馈回调函数。又例如,系统事件探针还向API模块发送订阅焦点窗口变化事件,API模块可监控电子设备100的焦点窗口是否发生变化,并在监控到焦点窗口发生变化时,向系统事件探针反馈回调函数。The system event probe can subscribe to system events in the kernel state and determine the system events based on the callback function fed back by the kernel state. System events may include window change 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 executive layer, and the OsEventDriver node forwards the request to the process manager. After creating the process, the process manager can feed back the callback function to the system event probe through the OsEventDriver node. For another example, the system event probe also sends a subscription focus window change event to the API module. The API module can monitor whether the focus window of the electronic device 100 changes, and when the focus window is monitored to change, it feeds back the callback function to the system event probe.
可见,系统探针模块通过向内核态订阅电子设备100的各种事件,再根据内核态反馈的回调函数确定电子设备100的运行状态,即得到探针状态。系统探针模块得到探针状态后,可向场景识别模块反馈该探针状态。场景识别模块接收到探针状态后,可根据该探针状态确定电子设备100所处的用户场景。该用户场景可包括视频场景、游戏场景、办公场景及社交场景等。用户场景可以反映用户当前的使用需求。例如,场景识别引擎在识别出焦点窗口为视频应用的窗口时,确定出电子设备100处于视频场景,这说明用户需要使用视频应用观看、浏览视频。又例如,场景识别引擎识在识别出焦点窗口为微信TM的聊天窗口时,确定电子设备100处于社交场景。场景识别模块还可向基础策略匹配管理器发送该用户场景。基础策略匹配管理器可根据该用户场景确定基础调度策略(也可称为第二调度策略,具体可以参见下文S301、S302中的说明)。基础策略匹配管理器可向场景识别模块反馈该基础调度策略。场景识别模块可向应用层的调度引擎发送该基础调度策略及用户场景。It can be seen that the system probe module subscribes to various events of the electronic device 100 in the kernel state, and then determines the running state of the electronic device 100 according to the callback function fed back by the kernel state, that is, obtains the probe state. After obtaining the probe state, the system probe module can feed back the probe state to the scene recognition module. After receiving the probe state, the scene recognition module can determine the user scene in which the electronic device 100 is located according to the probe state. The user scene may include a video scene, a game scene, an office scene, and a social scene. The user scene can reflect the user's current usage needs. For example, when the scene recognition engine identifies that the focus window is a window of a video application, it determines that the electronic device 100 is in a video scene, which means that the user needs to use a video application to watch and browse videos. For another example, when the scene recognition engine identifies that the focus window is a chat window of WeChat TM , it determines that the electronic device 100 is in a social scene. The scene recognition module can also send the user scene to the basic policy matching manager. The basic policy matching manager can determine the basic scheduling strategy (also referred to as the second scheduling strategy) according to the user scenario, and specifically refer to the description in S301 and S302 below. The basic policy matching manager can feed back the basic scheduling strategy to the scene recognition module. The scenario recognition module may send the basic scheduling strategy and user scenario to the scheduling engine of the application layer.
如图4所示,调度引擎包括负载管控器、芯片策略融合器以及调度执行器。其中,负载管控器可接收场景识别模块发送的基础调度策略及用户场景。负载管控器还可从系统探针模块获取系统负载,并根据系统负载和用户场景对该基础调度策略进行调整,得到实际调度策略(也可称为第一调度策略,具体可以参见下文S310中的说明)。实际调度策略中包括OS调度策略和第一CPU功耗调度策略(也可称为第一子策略)。其中,负载管控器可向调度执行器发送该OS调度策略,由调度执行器基于该OS调度策略进行调
度。OS调度策略用于调整焦点进程的进程优先级及I/O优先级。示例性的,调度执行器可向进程管理器发送调整焦点进程的进程优先级的指令,响应于该指令,进程管理器对焦点进程的进程优先级进行调整。又例如,调度执行器可向I/O管理器发送调整焦点进程的I/O优先级的指令,响应于该指令,I/O管理器对焦点进程的I/O优先级进行调整。As shown in Figure 4, the scheduling engine includes a load controller, a chip strategy aggregator, and a scheduling executor. Among them, the load controller can receive the basic scheduling strategy and user scenario sent by the scenario recognition module. The load controller can also obtain the system load from the system probe module, and adjust the basic scheduling strategy according to the system load and user scenario to obtain the actual scheduling strategy (also referred to as the first scheduling strategy, please refer to the description in S310 below for details). The actual scheduling strategy includes the OS scheduling strategy and the first CPU power consumption scheduling strategy (also referred to as the first sub-strategy). Among them, the load controller can send the OS scheduling strategy to the scheduling executor, and the scheduling executor will make adjustments based on the OS scheduling strategy. The OS scheduling policy is used to adjust the process priority and I/O priority of the focus process. Exemplarily, the scheduling executor may send an instruction to adjust the process priority of the focus process to the process manager, and in response to the instruction, the process manager adjusts the process priority of the focus process. For another example, the scheduling executor may send an instruction to adjust the I/O priority of the focus process to the I/O manager, and in response to the instruction, the I/O manager adjusts the I/O priority of the focus process.
负载管控器还可向芯片策略融合器发送第一CPU功耗调度策略,芯片策略融合器可基于CPU的芯片平台类型及该第一CPU功耗调度策略,得到第二CPU功耗调度策略(也可称为第二子策略,具体可以参见下文S317~S325中的说明)。CPU的芯片平台类型主要分为两种,分别为(advanced micro devices,AMD)的CPU和
的CPU,这两类CPU对于CPU功耗的调整方式并不相同,因此需要进行区分。The load controller can also send the first CPU power consumption scheduling strategy to the chip strategy fusion device, and the chip strategy fusion device can obtain the second CPU power consumption scheduling strategy (also called the second sub-strategy, see the description in S317 to S325 below) based on the CPU chip platform type and the first CPU power consumption scheduling strategy. There are two main types of CPU chip platforms: (advanced micro devices, AMD) CPU and These two types of CPUs have different ways of adjusting CPU power consumption, so they need to be distinguished.
若CPU的芯片平台类型为AMD(也可以称为第一类型),调度执行器可以向电源管理器发送调整EPP的指令,以调整CPU的EPP。另外,调度执行器还可以向OS2SOC驱动节点发送调整PL1、PL2的指令,以调整CPU的PL1和PL2。If the chip platform type of the CPU is AMD (also called the first type), the scheduling executor can send an instruction to adjust the EPP to the power manager to adjust the EPP of the CPU. In addition, the scheduling executor can also send an instruction to adjust PL1 and PL2 to the OS2SOC driver node to adjust the PL1 and PL2 of the CPU.
若CPU的芯片平台类型为调度执行器可以通过WMI插件向Intel DTT驱动发送该第二CPU功耗调度策略,第二CPU功耗调度策略可包括PL1的最小值、PL1的最大值、PL2、PL2的持续时间及EPP,由Intel DTT驱动CPU基于该第二CPU功耗调度策略运行。If the CPU chip platform type is The scheduling executor can send the second CPU power consumption scheduling policy to the Intel DTT driver through the WMI plug-in. The second CPU power consumption scheduling policy may include the minimum value of PL1, the maximum value of PL1, PL2, the duration of PL2 and EPP. The Intel DTT drives the CPU to run based on the second CPU power consumption scheduling policy.
本申请实施方式所提供的性能调控方法,主要分为两个过程,分别为:(1)确定电子设备所处的用户场景;(2)根据电子设备所处的用户场景确定电子设备的性能参数。下面将结合附图分别说明上述两个过程。The performance control method provided in the embodiment of the present application is mainly divided into two processes, namely: (1) determining the user scenario of the electronic device; and (2) determining the performance parameters of the electronic device according to the user scenario of the electronic device. The above two processes will be described below in conjunction with the accompanying drawings.
下面将以电子设备处于视频播放场景为例,结合图5,对图4所示的电子设备中部分模块的交互过程进行说明。如图5所示,本申请实施例提供的一种性能调控方法,其确定电子设备所处的用户场景的流程如下:The following will take the electronic device in the video playback scenario as an example, and combine with Figure 5 to illustrate the interaction process of some modules in the electronic device shown in Figure 4. As shown in Figure 5, a performance control method provided by an embodiment of the present application determines the user scenario in which the electronic device is located as follows:
S501、系统探针模块向OsEventDriver节点发送订阅进程创建事件的请求。S501. The system probe module sends a request for subscribing to a process creation event to an OsEventDriver node.
如图5所示,场景识别引擎包括系统探针模块,系统探针模块包括系统事件探针。在本申请实施例中,可以由系统事件探针向位于执行体层的OsEventDriver节点发送订阅进程创建事件的请求。其中,订阅进程创建事件的请求也可以称为第一请求。As shown in Figure 5, the scene recognition engine includes a system probe module, and the system probe module includes a system event probe. In an embodiment of the present application, the system event probe can send a request to subscribe to a process creation event to an OsEventDriver node located at the executive layer. The request to subscribe to a process creation event can also be referred to as a first request.
在一种可选的实施方式中,订阅进程创建事件的请求可以携带有进程名称。即场景识别引擎可以仅订阅指定进程的创建事件,减少不相干进程的创建事件的干扰。例如,指定进程可以为视频应用的进程、游戏应用的进程、办公应用的进程、社交应用的进程等等。当然,在其他实施方式中,场景识别引擎也可以不对订阅的进程创建事件做出限制。In an optional implementation, the request for subscribing to a process creation event may carry a process name. That is, the scene recognition engine may only subscribe to the creation event of a specified process, reducing interference from creation events of irrelevant processes. For example, the specified process may be a process of a video application, a process of a game application, a process of an office application, a process of a social application, and so on. Of course, in other implementations, the scene recognition engine may not impose restrictions on the subscribed process creation events.
S502、OsEventDriver节点向进程管理器发送订阅进程创建事件的请求。S502: The OsEventDriver node sends a request for subscribing to a process creation event to the process manager.
进程创建事件的请求可以参考S501的描述,在此不做赘述。The request for the process creation event can refer to the description of S501, which will not be repeated here.
也就是说,场景识别引擎的系统事件探针可以通过OsEventDriver节点向进程管理器发送订阅进程创建事件的请求。That is, the system event probe of the scene recognition engine can send a request to subscribe to the process creation event to the process manager through the OsEventDriver node.
可以理解地,OsEventDriver节点会向进程管理器注册一个回调,注册该回调的作用是当进程管理器创建进程后,可以向OsEventDriver节点返回该进程创建事件。
It can be understood that the OsEventDriver node will register a callback with the process manager. The purpose of registering the callback is that after the process manager creates a process, the process creation event can be returned to the OsEventDriver node.
S503、系统探针模块向OsEventDriver节点发送订阅GPU解码事件的请求。S503: The system probe module sends a request to subscribe to GPU decoding events to the OsEventDriver node.
仍然如图4所示,系统探针模块还包括音视频状态探针。在本申请实施例中,可以由系统探针模块的音视频状态探针向OsEventDriver节点发送订阅GPU解码事件的请求。其中,订阅GPU解码事件的请求也可以称为第三请求。Still as shown in Figure 4, the system probe module also includes an audio and video status probe. In the embodiment of the present application, the audio and video status probe of the system probe module can send a request to subscribe to GPU decoding events to the OsEventDriver node. The request to subscribe to GPU decoding events can also be called a third request.
S504、OsEventDriver节点向显卡驱动发送订阅GPU解码事件的请求。S504. The OsEventDriver node sends a request to subscribe to GPU decoding events to the graphics card driver.
也就是说,场景识别引擎的音视频状态探针可以通过OsEventDriver节点向显卡驱动发送订阅GPU解码事件的请求。同样地,OsEventDriver节点可向显卡驱动注册一个回调,注册该回调的作用是当显卡驱动监控到GPU进行解码操作后,可以向OsEventDriver节点返回该GPU解码事件。That is to say, the audio and video status probe of the scene recognition engine can send a request to subscribe to GPU decoding events to the graphics driver through the OsEventDriver node. Similarly, the OsEventDriver node can register a callback with the graphics driver. The purpose of registering this callback is that when the graphics driver monitors the GPU for decoding operations, it can return the GPU decoding event to the OsEventDriver node.
S505、系统探针模块向API模块发送订阅焦点窗口变化事件的请求。S505: The system probe module sends a request for subscribing to a focus window change event to the API module.
API模块可包括由user32.dll实现的windows用户界面接口,该接口可用于创建窗口。在一种可选的实施方式中,可以由系统探针模块的系统事件探针向API模块的windows用户界面接口发送订阅焦点窗口变化事件的请求。其中,订阅焦点窗口变化事件的请求也可以称为第二请求。The API module may include a windows user interface implemented by user32.dll, which can be used to create a window. In an optional implementation, a system event probe of the system probe module may send a request to subscribe to a focus window change event to the windows user interface of the API module. The request to subscribe to a focus window change event may also be referred to as a second request.
同样地,该系统事件探针可向API模块注册一个回调,注册该回调的作用是当API模块(的windows用户界面接口)监控到焦点窗口发生变化时,可以向系统事件探针返回该焦点窗口变化事件。Similarly, the system event probe can register a callback with the API module. The purpose of registering the callback is that when the API module (windows user interface interface) monitors the focus window change, the focus window change event can be returned to the system event probe.
焦点窗口为拥有焦点的窗口,大概率为用户当前需要使用的窗口。因此,通过监控焦点窗口,可以确定用户的使用需求。例如,焦点窗口为视频应用的窗口,则表明用户需求浏览、播放视频。又例如,焦点窗口为游戏应用的窗口,则表明用户需求打游戏。通过监控焦点窗口是否发生变化,可以确定用户需求是否发生改变。例如,焦点窗口由视频应用的窗口变为游戏应用的窗口,则表明用户当前的需求由看视频变成了打游戏。The focus window is the window with focus, which is most likely the window that the user currently needs to use. Therefore, by monitoring the focus window, the user's usage needs can be determined. For example, if the focus window is the window of a video application, it indicates that the user needs to browse and play videos. For another example, if the focus window is the window of a game application, it indicates that the user needs to play games. By monitoring whether the focus window changes, it can be determined whether the user's needs have changed. For example, if the focus window changes from the window of a video application to the window of a game application, it indicates that the user's current need has changed from watching videos to playing games.
需要说明的是,上述S501、S503及S505之间没有严格的先后顺序,其可以按照图5中所示的顺序依次执行,也可以同时执行,也可以按照S503、S501、S505的顺序依次执行、按照S503、S505、S501的顺序依次执行、按照S505、S501、S503的顺序依次执行或者按照S505、S503、S501的顺序依次执行。相应地,S502、S504及S506之间也没有严格的先后顺序,只要满足S502在S501之后执行、S504在S503之后执行以及S506在S505之后执行即可,在此不做具体限制。It should be noted that there is no strict order between the above S501, S503 and S505. They can be executed in sequence according to the order shown in FIG5, or they can be executed simultaneously, or they can be executed in the order of S503, S501, S505, S503, S505, S501, S505, S501, S503, or S505, S503, S501. Correspondingly, there is no strict order between S502, S504 and S506. As long as S502 is executed after S501, S504 is executed after S503 and S506 is executed after S505, no specific restrictions are made here.
S506、响应于接收到用户开启视频应用的操作,视频应用向进程管理器发送创建进程请求。S506: In response to receiving the user's operation of starting the video application, the video application sends a request to create a process to the process manager.
其中,创建进程请求包括视频应用程序的存储地址。The create process request includes the storage address of the video application.
视频应用可以通过API模块的kernel32.dll接口及Ntdll.dll接口向进程管理器发送创建进程的请求(图未示)。The video application can send a request to create a process to the process manager through the kernel32.dll interface and the Ntdll.dll interface of the API module (not shown).
S507、进程管理器创建视频应用进程。S507: The process manager creates a video application process.
具体的,进程管理器可以通过该存储地址查询到视频应用程序的二进制文件。通过加载视频应用程序的二进制文件,可以创建进程运行的环境,启动视频应用进程。Specifically, the process manager can query the binary file of the video application program through the storage address. By loading the binary file of the video application program, an environment for process operation can be created to start the video application process.
其中,Windows操作系统将一个应用程序的一次运行定义为一个进程。一个进程可以拥有多个线程。窗口是窗口结构的实例,是一种图形用户界面(graphical user interface,
GUI)资源,窗口是由线程创建的,线程可以拥有它所创建的所有窗口。在本申请实施例中,电子设备运行视频应用,则进程管理器需创建该视频应用的进程,即视频应用进程(即第一进程)。视频应用进程包括多个线程,多个线程包括线程1,线程1可用于创建视频应用的主窗口,主窗口为集成有视频应用全部功能按键的窗口。The Windows operating system defines a single run of an application as a process. A process can have multiple threads. A window is an instance of a window structure, which is a graphical user interface (GUI). GUI) resources, a window is created by a thread, and a thread can own all windows it creates. In an embodiment of the present application, the electronic device runs a video application, and the process manager needs to create a process for the video application, that is, a video application process (that is, a first process). The video application process includes multiple threads, and the multiple threads include thread 1. Thread 1 can be used to create the main window of the video application, and the main window is a window that integrates all function keys of the video application.
S508、进程管理器向OsEventDriver节点上报进程创建事件。S508: The process manager reports the process creation event to the OsEventDriver node.
其中,进程创建事件可包括进程管理器所创建的进程的名称。在本申请实施例中,该进程的名称为视频应用进程的名称。当然,若进程管理器创建的是其他应用的进程,该进程的名称也对应为其他应用进程的名称。Among them, the process creation event may include the name of the process created by the process manager. In the embodiment of the present application, the name of the process is the name of the video application process. Of course, if the process manager creates a process of other applications, the name of the process also corresponds to the name of the other application process.
前文已经说明,OsEventDriver节点向进程管理器发送了订阅进程创建事件的请求,且注册了回调。因此,进程管理器在创建视频应用进程后可向OsEventDriver节点上报进程创建事件。As described above, the OsEventDriver node sends a request to the process manager to subscribe to the process creation event and registers a callback. Therefore, after creating the video application process, the process manager can report the process creation event to the OsEventDriver node.
S509、OsEventDriver节点向系统探针模块上报进程创建事件。S509. The OsEventDriver node reports the process creation event to the system probe module.
其中,关于进程创建事件的描述见S508,在此不再赘述。The description of the process creation event is described in S508 and will not be repeated here.
在本申请实施例中,该OsEventDriver节点可向系统探针模块的系统事件探针上报该进程创建事件。In the embodiment of the present application, the OsEventDriver node may report the process creation event to the system event probe of the system probe module.
S510、系统探针模块向场景识别模块发送进程创建事件。S510: The system probe module sends a process creation event to the scene recognition module.
S511、响应于线程1的调用请求,API模块创建窗口1。S511 . In response to the calling request of thread 1 , the API module creates window 1 .
进程管理器创建视频应用进程后,视频应用进程的线程1主动调用API模块的windows用户界面接口创建窗口1。示例性的,如图6中(a)所示,电子设备可以显示窗口601,该窗口601可以为桌面,也可以称为主界面。该窗口601包括视频应用的图标602。电子设备可以接收用户点击该视频应用的图标602的操作,响应于该操作,如图6中的(b)所示,电子设备显示窗口603(即窗口1,也可以称为第一窗口)。在上述过程中,焦点窗口由原本的窗口601变为窗口603。After the process manager creates the video application process, thread 1 of the video application process actively calls the windows user interface interface of the API module to create window 1. Exemplarily, as shown in (a) of FIG. 6 , the electronic device can display window 601, which can be a desktop, or can also be called a main interface. The window 601 includes an icon 602 of the video application. The electronic device can receive an operation of a user clicking on the icon 602 of the video application, and in response to the operation, as shown in (b) of FIG. 6 , the electronic device displays window 603 (i.e., window 1, or can also be called a first window). In the above process, the focus window changes from the original window 601 to window 603.
S512、API模块向系统探针模块上报焦点窗口事件。S512: The API module reports the focus window event to the system probe module.
在本申请实施例中,API模块的windows用户界面接口创建窗口1后,可以获取第一进程(即焦点进程)的名称及第二进程的名称,第一进程为当前的焦点窗口(即窗口1)对应的进程,第二进程为上一个焦点窗口(例如,窗口2)对应的进程。示例性的,窗口1对应的进程为视频应用进程(第一进程),该进程的名称例如为hlive.exe,窗口2对应的进程为windows程序管理器的进程(第二进程),该进程的名称例如为explorer.exe。由于第一进程的名称与第二进程的名称不一致,API模块确定焦点窗口发生变化,向系统探针模块的系统事件探针上报焦点窗口事件。其中,焦点窗口变化事件包括第一进程(即焦点进程)的名称。示例性的,第一进程为视频应用进程,焦点窗口变化事件携带有视频应用进程的名称。In an embodiment of the present application, after the windows user interface of the API module creates window 1, the name of the first process (i.e., the focus process) and the name of the second process can be obtained. The first process is the process corresponding to the current focus window (i.e., window 1), and the second process is the process corresponding to the previous focus window (e.g., window 2). Exemplarily, the process corresponding to window 1 is a video application process (first process), and the name of the process is, for example, hlive.exe, and the process corresponding to window 2 is a process of the windows program manager (second process), and the name of the process is, for example, explorer.exe. Since the name of the first process is inconsistent with the name of the second process, the API module determines that the focus window has changed, and reports the focus window event to the system event probe of the system probe module. Among them, the focus window change event includes the name of the first process (i.e., the focus process). Exemplarily, the first process is a video application process, and the focus window change event carries the name of the video application process.
需要说明的是,在电子设备已经启动视频应用的情况下,电子设备可以不用执行S506~S511。在系统探针模块向API模块发送订阅焦点窗口变化事件的请求后,若用户将焦点窗口切换为视频应用的窗口,API模块同样可以检测到焦点窗口发生变化,并向系统探针模块上报焦点窗口事件。It should be noted that, if the electronic device has already started the video application, the electronic device does not need to execute S506 to S511. After the system probe module sends a request to subscribe to the focus window change event to the API module, if the user switches the focus window to the window of the video application, the API module can also detect the focus window change and report the focus window event to the system probe module.
S513、系统探针模块向场景识别模块发送焦点窗口事件。
S513: The system probe module sends a focus window event to the scene recognition module.
S514、场景识别模块确定第一进程所属的类型为视频类。S514: The scene recognition module determines that the type of the first process is a video type.
电子设备可以预先配置有应用名单,场景识别模块可以查询应用名单中是否包括第一进程。若应用名单中包括第一进程,场景识别模块可以确定第一进程所属的类型。其中,应用名单包括每个应用的进程名称及应用所属的类型。示例性的,应用名单可以如表1所示:The electronic device may be pre-configured with an application list, and the scene recognition module may query whether the application list includes the first process. If the application list includes the first process, the scene recognition module may determine the type of the first process. The application list includes the process name of each application and the type of the application. Exemplarily, the application list may be as shown in Table 1:
表1
Table 1
Table 1
例如,第一进程的名称为hlive.exe,则场景识别模块可以确定第一进程所属的类型为视频类。又例如,第一进程的名称为wechat.exe,则场景识别模块可以确定第一进程所属的类型为社交类。需要说明的是,上述表1仅作为示例,实际上表1还可包括更多应用的进程名称及其所属的类型。For example, if the name of the first process is hlive.exe, the scene recognition module can determine that the type of the first process is video. For another example, if the name of the first process is wechat.exe, the scene recognition module can determine that the type of the first process is social. It should be noted that the above Table 1 is only an example. In fact, Table 1 can also include process names of more applications and their types.
需要说明的是,此步骤的目的在于初步判断电子设备所处的用户场景。电子设备所处的用户场景可包括视频场景、游戏场景、社交场景、办公场景、浏览器场景等等。其中,视频场景进一步可包括视频播放场景、视频浏览场景。社交场景进一步可包括文字聊天场景、语音聊天场景、视频聊天场景等。办公场景进一步可包括文档编辑场景、文档浏览场景、视频会议场景等。浏览器场景可包括浏览网页场景及播放视频场景等。It should be noted that the purpose of this step is to preliminarily determine the user scenario in which the electronic device is located. The user scenario in which the electronic device is located may include video scenarios, game scenarios, social scenarios, office scenarios, browser scenarios, etc. Among them, the video scenario may further include video playback scenarios and video browsing scenarios. The social scenario may further include text chat scenarios, voice chat scenarios, video chat scenarios, etc. The office scenario may further include document editing scenarios, document browsing scenarios, video conferencing scenarios, etc. The browser scenario may include web browsing scenarios and video playback scenarios, etc.
在本步骤中,通过第一进程所属的类型,可以确定电子设备所处的用户场景的类型。例如,若确定第一进程所属的类型为视频类,则可以确定电子设备处于视频场景;又例如,若确定第一进程所属的类型为游戏类,则可以确定电子设备处于游戏场景。为了进一步分析用户需求,场景识别模块还可以进一步结合其他参数(例如,外设事件、GPU运行状态等)来分析电子设备所处的具体场景,以达到分析结果更加准确的效果,其具体内容参见后文,在此暂不描述。In this step, the type of user scenario in which the electronic device is located can be determined by the type to which the first process belongs. For example, if it is determined that the type to which the first process belongs is a video type, it can be determined that the electronic device is in a video scenario; for another example, if it is determined that the type to which the first process belongs is a game type, it can be determined that the electronic device is in a game scenario. In order to further analyze user needs, the scene recognition module can further combine other parameters (for example, peripheral events, GPU operating status, etc.) to analyze the specific scenario in which the electronic device is located, so as to achieve a more accurate analysis result. The specific content is described later and will not be described here.
S515,响应于接收到用户播放视频的操作,视频应用向API模块发送视频播放指令。S515: In response to receiving the user's operation of playing the video, the video application sends a video playing instruction to the API module.
具体的,视频应用可向API模块的DirectX API发送该视频播放指令。该视频播放指令可包括视频的缓存地址。Specifically, the video application may send the video play instruction to the DirectX API of the API module. The video play instruction may include the cache address of the video.
S516、API模块读取视频文件。S516. The API module reads the video file.
API模块可根据视频播放指令中携带的缓存地址,读取对应的视频文件。The API module can read the corresponding video file according to the cache address carried in the video playback instruction.
S517、API模块向显卡驱动发送解码指令。S517. The API module sends a decoding instruction to the graphics card driver.
S518、显卡驱动向GPU发送启动指令。S518: The graphics card driver sends a startup instruction to the GPU.
S519、GPU进行解码。S519: GPU performs decoding.
具体的,GPU可通过GPU video processing引擎对该视频文件进行解码操作。Specifically, the GPU can decode the video file through the GPU video processing engine.
S520、GPU向显卡驱动上报解码事件。
S520. The GPU reports a decoding event to the graphics card driver.
S521、显卡驱动向OsEventDriver节点上报解码事件。S521. The graphics card driver reports a decoding event to the OsEventDriver node.
S522、OsEventDriver节点向系统探针模块上报解码事件。S522. The OsEventDriver node reports the decoding event to the system probe module.
具体的,OsEventDriver节点向系统探针模块的音视频状态探针上报该解码事件。Specifically, the OsEventDriver node reports the decoding event to the audio and video status probe of the system probe module.
S523、系统探针模块向场景识别模块发送解码事件。S523: The system probe module sends a decoding event to the scene recognition module.
S524、场景识别模块向系统探针模块发送指令1。S524. The scene recognition module sends instruction 1 to the system probe module.
其中,指令1指示系统探针模块获取第一进程的GPU占用率。该指令1可携带有第一进程的名称。Instruction 1 instructs the system probe module to obtain the GPU occupancy rate of the first process. The instruction 1 may carry the name of the first process.
S525、系统探针模块向进程管理器发送获取第一进程的GPU占用率的请求。S525. The system probe module sends a request to the process manager to obtain the GPU occupancy rate of the first process.
其中,该获取焦点进程的GPU占用率的请求可以包括第一进程的名称。The request for obtaining the GPU occupancy rate of the focus process may include the name of the first process.
在一种可选的实施方式中,可以由系统探针模块的音视频状态探针向进程管理器发送获取第一进程的GPU占用率的请求。In an optional implementation, the audio and video status probe of the system probe module may send a request for obtaining the GPU occupancy rate of the first process to the process manager.
S526、进程管理器采集第一进程的GPU占用率。S526: The process manager collects the GPU occupancy rate of the first process.
具体的,进程管理器可以通过显卡驱动的图像核心(graphics kernel)接口采集第一进程的GPU占用率。Specifically, the process manager can collect the GPU occupancy rate of the first process through the graphics kernel interface of the graphics card driver.
S527、进程管理器向系统探针模块发送第一进程的GPU占用率。S527: The process manager sends the GPU occupancy rate of the first process to the system probe module.
进程管理器可向系统探针模块的音视频状态探针发送第一进程的GPU占用率。The process manager may send the GPU occupancy rate of the first process to the audio and video status probe of the system probe module.
S528、系统探针模块向场景识别引擎发送第一进程的GPU占用率。S528. The system probe module sends the GPU occupancy rate of the first process to the scene recognition engine.
S529、场景识别模块判断第一进程的GPU占用率是否大于0。S529: The scene recognition module determines whether the GPU occupancy rate of the first process is greater than 0.
其中,若第一进程的GPU占用率大于0,则执行S130。If the GPU occupancy rate of the first process is greater than 0, S130 is executed.
通过第一进程的GPU占用率,可以确定第一进程在运行过程中是否使用GPU,若第一进程的GPU占用率大于0,则可以认为第一进程在运行过程中使用了GPU;若第一进程的GPU占用率为0,则表明第一进程在运行过程中未使用GPU。Through the GPU occupancy rate of the first process, it can be determined whether the first process uses the GPU during operation. If the GPU occupancy rate of the first process is greater than 0, it can be considered that the first process uses the GPU during operation; if the GPU occupancy rate of the first process is 0, it indicates that the first process does not use the GPU during operation.
S530、场景识别模块向系统探针模块发送指令2。S530: The scene recognition module sends instruction 2 to the system probe module.
其中,指令2指示系统探针模块获取第一进程的GPU引擎。该指令2可携带有第一进程的名称。Instruction 2 instructs the system probe module to obtain the GPU engine of the first process. The instruction 2 may carry the name of the first process.
S531、系统探针模块向进程管理器发送获取第一进程的GPU引擎的请求。S531. The system probe module sends a request to the process manager to obtain the GPU engine of the first process.
其中,可以由系统探针模块的音视频状态探针向进程管理器发送获取第一进程的GPU引擎的请求。获取第一进程的GPU引擎的请求包括第一进程的名称。The audio and video status probe of the system probe module may send a request to the process manager to obtain the GPU engine of the first process. The request to obtain the GPU engine of the first process includes the name of the first process.
GPU引擎包括GPU 3D引擎、GPU copy引擎、GPU video encode引擎、GPU video processing引擎。其中,GPU 3D引擎主要负责处理2D或者3D图形。GPU copy引擎主要用于传输数据。GPU video encode引擎主要用于进行编码操作。GPU video processing引擎主要进行解码操作。在一些实施例中,GPU video processing引擎也可以由GPU video decode引擎代替。The GPU engine includes a GPU 3D engine, a GPU copy engine, a GPU video encode engine, and a GPU video processing engine. Among them, the GPU 3D engine is mainly responsible for processing 2D or 3D graphics. The GPU copy engine is mainly used to transmit data. The GPU video encode engine is mainly used for encoding operations. The GPU video processing engine mainly performs decoding operations. In some embodiments, the GPU video processing engine can also be replaced by the GPU video decode engine.
S532、进程管理器获取第一进程的GPU引擎。S532: The process manager obtains the GPU engine of the first process.
具体的,进程管理器可以通过显卡驱动的graphics kernel接口获取第一进程的GPU引擎。Specifically, the process manager can obtain the GPU engine of the first process through the graphics kernel interface of the graphics card driver.
S533、进程管理器向系统探针模块发送消息1,消息1指示第一进程的GPU引擎为GPU video processing引擎。
S533: The process manager sends a message 1 to the system probe module, where the message 1 indicates that the GPU engine of the first process is a GPU video processing engine.
具体的,进程管理器可向系统探针模块的音视频状态探针发送该消息,再由音视频状态将该消息转发给场景识别模块。Specifically, the process manager may send the message to the audio and video status probe of the system probe module, and then the audio and video status forwards the message to the scene recognition module.
S534、系统探针模块向场景识别模块发送消息1。S534. The system probe module sends message 1 to the scene recognition module.
S535、场景识别模块判断第一进程的GPU引擎是否为GPU video processing引擎。S535. The scene recognition module determines whether the GPU engine of the first process is a GPU video processing engine.
若第一进程的GPU引擎为GPU video processing引擎,则执行S529;若第一进程的GPU引擎不为GPU video processing引擎,则执行S530。If the GPU engine of the first process is a GPU video processing engine, execute S529; if the GPU engine of the first process is not a GPU video processing engine, execute S530.
在S514步骤中,场景识别引擎已经确定第一进程所属的类型为视频类,即可以确定电子设备处于视频场景。通过步骤S535,场景识别引擎可以确定第一进程通过GPU执行的具体操作,进而确定用户在使用视频应用的具体操作。例如,若第一进程的GPU引擎为GPU video processing引擎,则表明第一进程在使用GPU进行解码操作,可以认为用户在使用视频应用播放视频。又例如,第一进程的GPU引擎不为GPU video processing引擎,则表明第一进程没有在使用GPU进行解码操作,那么用户大概率在视频应用上浏览视频资源,还未播放视频。In step S514, the scene recognition engine has determined that the type to which the first process belongs is a video class, that is, it can be determined that the electronic device is in a video scene. Through step S535, the scene recognition engine can determine the specific operations performed by the first process through the GPU, and then determine the specific operations of the user using the video application. For example, if the GPU engine of the first process is a GPU video processing engine, it means that the first process is using the GPU for decoding operations, and it can be considered that the user is using the video application to play the video. For another example, if the GPU engine of the first process is not a GPU video processing engine, it means that the first process is not using the GPU for decoding operations, then the user is most likely browsing video resources on the video application and has not yet played the video.
S536、场景识别模块根据第一进程的进程信息确定用户场景为视频播放场景。S536: The scene recognition module determines that the user scene is a video playback scene according to the process information of the first process.
其中,第一进程的进程信息包括第一进程的名称、第一进程所属的应用类型、第一进程的GPU占用率及第一进程使用的GPU引擎等信息。The process information of the first process includes information such as the name of the first process, the application type to which the first process belongs, the GPU occupancy rate of the first process, and the GPU engine used by the first process.
综合上述内容可知,若第一进程(焦点进程)的类型为视频类、第一进程的GPU占用率大于0且第一进程的GPU引擎为GPU video processing引擎,则可以确定电子设备处于视频播放场景。Based on the above content, it can be seen that if the type of the first process (focus process) is video type, the GPU occupancy of the first process is greater than 0, and the GPU engine of the first process is a GPU video processing engine, it can be determined that the electronic device is in a video playback scene.
需要说明的是,上述S501~S536仅以电子设备处于视频场景下的视频播放场景为例进行说明。实际上,电子设备还可以处于其他用户场景(例如,游戏场景、办公场景、社交场景、视频浏览场景、编程场景等)。It should be noted that the above S501 to S536 are only described by taking the video playing scene of the electronic device in the video scene as an example. In fact, the electronic device can also be in other user scenes (for example, game scene, office scene, social scene, video browsing scene, programming scene, etc.).
在一种可选的实施方式中,若场景识别引擎确定第一进程(焦点进程)的类型属于游戏类、CPU的电源模式变为游戏模式(game mode)、第一进程的GPU占用率大于0且第一进程的GPU引擎为GPU 3D引擎,则可以确定电子设备处于游戏场景。In an optional implementation, if the scene recognition engine determines that the type of the first process (focus process) belongs to the game category, the power mode of the CPU is changed to game mode (game mode), the GPU occupancy rate of the first process is greater than 0, and the GPU engine of the first process is a GPU 3D engine, it can be determined that the electronic device is in a game scene.
其中,系统探针模块的电源状态探针可以向电源管理器发送订阅电源模式变化事件的请求。电源管理器可以在电源模块转换为游戏模式(game mode)时,向系统探针模块的电源状态探针上报该电源模式变化事件。如此,场景识别引擎可通过电源模式变化事件确定CPU的电源模式是否为game mode。The power status probe of the system probe module may send a request to the power manager to subscribe to the power mode change event. The power manager may report the power mode change event to the power status probe of the system probe module when the power module is switched to game mode. In this way, the scene recognition engine may determine whether the power mode of the CPU is game mode through the power mode change event.
另外,场景识别引擎获取第一进程的类型的过程可以参阅图5中S501、S502、S505、S506~S514,场景识别引擎判断第一进程的GPU占用率是否大于0且第一进程的GPU引擎是否为GPU 3D引擎的过程参阅S524~S535。区别在于将视频应用更换为游戏应用,在此不再赘述。In addition, the process of the scene recognition engine obtaining the type of the first process can refer to S501, S502, S505, S506-S514 in Figure 5, and the process of the scene recognition engine determining whether the GPU occupancy rate of the first process is greater than 0 and whether the GPU engine of the first process is a GPU 3D engine can refer to S524-S535. The difference is that the video application is replaced with a game application, which will not be repeated here.
下面,再结合图7简单说明电子设备处于办公场景时,其确定自身所处的用户场景的流程。需要说明的是,图7所示的流程图与图5所示的流程图,其原理及流程基本详细,下面仅具体说明两者的不同之处,类似之处不再赘述,详情参见图5中相关步骤的说明。图7示出了本申请实施例提供的一种性能调控方法,其确定电子设备所处的用户场景的流程如下:
Next, in conjunction with FIG. 7, a brief description is given of the process of an electronic device determining the user scenario in which it is located when it is in an office scenario. It should be noted that the principle and process of the flowchart shown in FIG. 7 are basically the same as those of the flowchart shown in FIG. 5. Only the differences between the two are specifically described below, and the similarities are not repeated. For details, please refer to the description of the relevant steps in FIG. 5. FIG. 7 shows a performance control method provided in an embodiment of the present application, and the process of determining the user scenario in which the electronic device is located is as follows:
S701、系统探针模块向OsEventDriver节点发送订阅进程创建事件的请求。S701. The system probe module sends a request to subscribe to a process creation event to an OsEventDriver node.
S702、OsEventDriver节点向进程管理器发送订阅进程创建事件的请求。S702. The OsEventDriver node sends a request to subscribe to a process creation event to the process manager.
S703、系统探针模块向OsEventDriver节点发送订阅外设事件的请求。S703: The system probe module sends a request for subscribing to peripheral events to the OsEventDriver node.
如图4所示,系统探针模块还包括外设状态探针。在本申请实施例中,可以由系统探针模块的外设状态探针向OsEventDriver节点发送订阅外设事件的请求。其中,订阅外设事件的请求也可以称为第四请求。As shown in Figure 4, the system probe module also includes a peripheral status probe. In the embodiment of the present application, the peripheral status probe of the system probe module can send a request to subscribe to peripheral events to the OsEventDriver node. The request to subscribe to peripheral events can also be called a fourth request.
其中,外设事件包括鼠标滚轮滑动、鼠标点击、键盘输入、摄像头输入、麦克风输入等事件。Among them, peripheral events include mouse wheel sliding, mouse clicking, keyboard input, camera input, microphone input and other events.
S704、OsEventDriver节点向外设驱动发送订阅外设事件的请求。S704. The OsEventDriver node sends a request for subscribing to peripheral events to the peripheral driver.
需要说明的是,外设驱动为所有外设的驱动的统称,例如可以包括鼠标驱动、键盘驱动、摄像头驱动、麦克风驱动等。It should be noted that the peripheral driver is a general term for drivers of all peripherals, for example, it may include a mouse driver, a keyboard driver, a camera driver, a microphone driver, etc.
S705、系统探针模块向API模块发送订阅焦点窗口变化事件的请求。S705: The system probe module sends a request for subscribing to a focus window change event to the API module.
S706、响应于接收用户开启办公应用的操作,办公应用向进程管理器发送创建办公应用进程的请求。S706: In response to receiving the user's operation of starting the office application, the office application sends a request for creating an office application process to the process manager.
其中,创建办公应用进程的请求可包括办公应用程序的存储地址。The request for creating an office application process may include a storage address of the office application program.
S707、进程管理器创建办公应用进程。S707: The process manager creates an office application process.
具体的,进程管理器可以通过该存储地址查询到办公应用程序的二进制文件。通过加载办公应用程序的二进制文件,可以创建进程运行的环境,启动视频应用进程。另外,办公应用进程包括线程2,线程2可用于创建办公应用的主窗口。Specifically, the process manager can query the binary file of the office application through the storage address. By loading the binary file of the office application, an environment for process operation can be created to start the video application process. In addition, the office application process includes thread 2, which can be used to create the main window of the office application.
S708、进程管理器向OsEventDriver节点上报进程创建事件。S708: The process manager reports the process creation event to the OsEventDriver node.
S709、OsEventDriver节点向系统探针模块上报进程创建事件。S709. The OsEventDriver node reports the process creation event to the system probe module.
其中,该进程创建事件携带有办公应用进程的名称。The process creation event carries the name of the office application process.
S710、系统探针模块向场景识别模块发送进程创建事件。S710: The system probe module sends a process creation event to the scene recognition module.
S711、响应于线程2的调用请求,API模块创建办公应用窗口。S711. In response to the call request of thread 2, the API module creates an office application window.
S712、API模块向系统探针模块上报焦点窗口事件。S712. The API module reports the focus window event to the system probe module.
其中,焦点窗口事件中携带有第一进程(焦点进程)的名称。可以理解地,在本申请实施例中,第一进程即为办公应用进程。Among them, the focus window event carries the name of the first process (focus process). It can be understood that in the embodiment of the present application, the first process is the office application process.
S713、系统探针模块向场景识别模块发送焦点窗口事件。S713: The system probe module sends a focus window event to the scene recognition module.
S714、场景识别模块确定第一进程所属的类型为办公类。S714: The scene recognition module determines that the type of the first process is office type.
例如,第一进程的名称为word.exe,则可以确定第一进程所属的类型为办公类。For example, if the name of the first process is word.exe, it can be determined that the type of the first process is office type.
S715、响应于用户对外设的操作,外设驱动检测到外设事件。S715: In response to the user's operation on the peripheral device, the peripheral device driver detects a peripheral device event.
S216、外设驱动向OsEventDriver节点上报外设事件。S216: The peripheral driver reports the peripheral event to the OsEventDriver node.
S717、OsEventDriver节点向系统探针模块发送外设事件。S717. The OsEventDriver node sends a peripheral event to the system probe module.
S718、系统探针模块向场景识别模块发送外设事件。S718. The system probe module sends a peripheral event to the scene recognition module.
S719、场景识别模块根据外设事件及第一进程所属的类型确定用户场景。S719: The scene recognition module determines a user scene according to the peripheral event and the type of the first process.
在一种可选的实施方式中,若场景识别引擎确定第一进程(焦点进程)的类型属于办公类,且外设事件为鼠标滚轮滑动事件或点击事件,则可以确定电子设备具体处于办公场景下的文档浏览场景。又或者,若场景识别引擎确定第一进程(焦点进程)的类型
属于办公类,且在接收到键盘输入事件后的预设时间(例如,10秒)内未再次接收到鼠标滚轮滑动事件、鼠标击事件、键盘输入事件,可以确定电子设备具体处于办公场景下的文档浏览场景。In an optional implementation, if the scene recognition engine determines that the type of the first process (focus process) belongs to the office category, and the peripheral event is a mouse wheel sliding event or a click event, it can be determined that the electronic device is specifically in a document browsing scene in an office scene. If the electronic device belongs to the office category and does not receive a mouse wheel sliding event, a mouse click event, or a keyboard input event within a preset time (for example, 10 seconds) after receiving a keyboard input event, it can be determined that the electronic device is specifically in a document browsing scenario under an office scenario.
在一种可选的实施方式中,若场景识别引擎确定第一进程(焦点进程)的类型属于办公类,且接收到键盘输入事件,则可以确定电子设备具体处于办公场景下的文档编辑场景。In an optional implementation, if the scene recognition engine determines that the type of the first process (focus process) belongs to the office category and receives a keyboard input event, it can be determined that the electronic device is specifically in a document editing scene in an office scenario.
在一种可选的实施方式中,若场景识别引擎确定第一进程(焦点进程)的类型属于办公类,且接收到摄像头输入事件(即摄像头处于开启状态且存在视频流输入),可以确定电子设备具体处于办公场景下的视频会议场景。In an optional implementation, if the scene recognition engine determines that the type of the first process (focus process) belongs to the office type, and receives a camera input event (i.e., the camera is on and there is a video stream input), it can be determined that the electronic device is specifically in a video conferencing scene in an office scenario.
电子设备还可以处于社交场景。社交场景包括三个具体场景,分别为:文字聊天场景、语音聊天场景及视频聊天场景。判断电子设备处于社交场景的原理与判断电子设备处于办公场景的原理类似,在此暂不赘述,下面仅说明判断电子设备处于社交场景需要满足的条件。The electronic device can also be in a social scene. The social scene includes three specific scenes, namely: text chat scene, voice chat scene and video chat scene. The principle of judging whether the electronic device is in a social scene is similar to the principle of judging whether the electronic device is in an office scene. We will not go into details here. The following only explains the conditions that need to be met to judge whether the electronic device is in a social scene.
在一种可选的实施方式中,若场景识别引擎确定第一进程(焦点进程)的类型属于社交类,且接收到键盘输入事件,则可以确定电子设备具体处于社交场景下的文字聊天场景。In an optional implementation, if the scene recognition engine determines that the type of the first process (focus process) belongs to the social category and receives a keyboard input event, it can be determined that the electronic device is specifically in a text chat scene under a social scene.
在一种可选的实施方式中,若场景识别引擎确定第一进程(焦点进程)的类型属于社交类,且接收到麦克风输入事件且摄像头处于关闭状态,则可以确定电子设备具体处于社交场景下的语音聊天场景。In an optional implementation, if the scene recognition engine determines that the type of the first process (focus process) is social, and a microphone input event is received and the camera is in an off state, it can be determined that the electronic device is specifically in a voice chat scene in a social scene.
在一种可选的实施方式中,若场景识别引擎确定第一进程(焦点进程)的类型属于社交类,且接收到麦克风输入事件、摄像头输入事件,则可以确定电子设备具体处于社交场景下的视频聊天场景。In an optional implementation, if the scene recognition engine determines that the type of the first process (focus process) belongs to the social category, and receives a microphone input event and a camera input event, it can be determined that the electronic device is specifically in a video chat scene under a social scenario.
上述内容说明了如何识别电子设备所处的用户场景,在确定电子设备所处的用户场景后,电子设备还可根据所处的用户场景确定是否需要进行性能调控,当需要进行性能调控时根据所处的用户场景设定TPP、TGP和/或TDP的具体参数值或Dx值,使显卡根据当前的TPP、TGP和/或TDP参数或Dx值进行性能调控,从而可以根据场景提供更合理的CPU和GPU性能,不仅更好地满足用户在各种场景下的性能需求,而且可以相对地提高设备的续航,从而提高用户体验。The above content explains how to identify the user scenario of the electronic device. After determining the user scenario of the electronic device, the electronic device can also determine whether performance regulation is needed according to the user scenario. When performance regulation is needed, the specific parameter values or Dx values of TPP, TGP and/or TDP are set according to the user scenario, so that the graphics card performs performance regulation according to the current TPP, TGP and/or TDP parameters or Dx values, thereby providing more reasonable CPU and GPU performance according to the scenario, which not only better meets the performance requirements of users in various scenarios, but also can relatively improve the battery life of the device, thereby improving the user experience.
图8为本申请实施例提供的性能调控方法的流程图。FIG8 is a flow chart of a performance control method provided in an embodiment of the present application.
如图8所示,本申请实施例提供的性能调控方法具体包括:As shown in FIG8 , the performance control method provided in the embodiment of the present application specifically includes:
步骤S801,场景识别引擎确定电子设备的用户场景,并将场景信息发送至性能调控应用。Step S801: The scene recognition engine determines the user scene of the electronic device and sends the scene information to the performance control application.
其中,场景信息用于指示电子设备所处的用户场景。示例性的,电子设备可以预先为不同的用户场景分配唯一标识,该场景信息则可包括用户场景所的唯一标识。例如,该标识(例如为V01)可指示电子设备处于视频播放场景。又例如,该标识(例如为V02)可指示电子设备处于视频浏览场景。The scene information is used to indicate the user scene in which the electronic device is located. Exemplarily, the electronic device may pre-assign unique identifiers to different user scenes, and the scene information may include the unique identifier of the user scene. For example, the identifier (e.g., V01) may indicate that the electronic device is in a video playback scene. For another example, the identifier (e.g., V02) may indicate that the electronic device is in a video browsing scene.
关于场景识别模块确定电子设备所处的用户场景的过程,具体参阅S501~S536,在此不再赘述。
Regarding the process of the scene recognition module determining the user scene in which the electronic device is located, please refer to S501 to S536 for details, which will not be repeated here.
步骤S802,性能调控应用根据场景信息确定性能参数的参数值。Step S802: The performance control application determines parameter values of performance parameters according to scenario information.
其中,性能参数包括第一性能参数和第二性能参数。第一性能参数包括CPU的TDP功耗、所述GPU的TGP功耗、所述GPU的TPP功耗和所述GPU的DB功耗中的至少一种。第二性能参数包括GPU的Dx值。The performance parameter includes a first performance parameter and a second performance parameter. The first performance parameter includes at least one of the TDP power consumption of the CPU, the TGP power consumption of the GPU, the TPP power consumption of the GPU, and the DB power consumption of the GPU. The second performance parameter includes the Dx value of the GPU.
示例性地,在本申请实施例中,可以通过测试预先确定各种用户场景的性能需求,例如通过测试确定办公场景所需的性能,并根据该性能确定办公场景下的第一性能参数的参数值,例如确定CPU的TDP功耗、所述GPU的TGP功耗、所述GPU的TPP功耗和所述GPU的DB功耗的具体参数值。Exemplarily, in an embodiment of the present application, the performance requirements of various user scenarios can be predetermined through testing, such as determining the performance required for an office scenario through testing, and determining the parameter value of the first performance parameter in the office scenario based on the performance, such as determining the specific parameter values of the TDP power consumption of the CPU, the TGP power consumption of the GPU, the TPP power consumption of the GPU, and the DB power consumption of the GPU.
示例性地,在本申请实施例中,可以通过建立用户动态测试模型来确定各场景下的性能需求。该动态测试模型可以用于确定电子设备运行各种类型应用时CPU性能、GPU性能等,从而基于这些数据确定电子设备在各场景下的性能需求,进而基于该性能需求确定各种场景下第一性能参数的具体数值。For example, in an embodiment of the present application, the performance requirements in various scenarios can be determined by establishing a user dynamic test model. The dynamic test model can be used to determine the CPU performance, GPU performance, etc. when the electronic device runs various types of applications, thereby determining the performance requirements of the electronic device in various scenarios based on these data, and then determining the specific values of the first performance parameters in various scenarios based on the performance requirements.
通过在各种场景下采用不同的第一性能参数可以使得电子设备在保证当前应用流畅运行的同时降低设备的功耗。示例性地,例如当电子设备处于办公场景时,因为性能需求较低,因此可以设置较低的TGP、TDP、TPP和DB值,在保证办公应用流畅运行的同时,降低设备功耗,延长设备续航。当电子设备处于游戏场景、性能测试场景、3D渲染场景时,GPU性能需求较大,则可以使TPP、DB、TGP值较大,这样可以是GPU提供更高的性能,满足游戏运行需求。当电子设备处于编程场景时,CPU性能需求较大,GPU需要性能较小,则可以使TPP较大,TGP和DB值较小,从而满足编程需求,并降低设备功耗。换言之,在本申请实施例中,根据电子设备所处的场景动态调整第一性能参数的参数值,从而既保证应用的流畅运行,又降低设备的功耗,延长设备续航。并且与目前的电子设备出厂时设定TDP、TGP或TPP值的调控方式相比,可以更好地满足应用的性能需求,根据具体应用合理分配CPU功耗和GPU功耗,提高用户体验。By adopting different first performance parameters in various scenarios, the electronic device can reduce the power consumption of the device while ensuring the smooth operation of the current application. Exemplarily, for example, when the electronic device is in an office scene, because the performance requirements are low, lower TGP, TDP, TPP and DB values can be set to ensure the smooth operation of office applications while reducing the power consumption of the device and extending the battery life of the device. When the electronic device is in a game scene, a performance test scene, or a 3D rendering scene, the GPU performance requirements are large, so the TPP, DB, and TGP values can be large, so that the GPU can provide higher performance to meet the game operation requirements. When the electronic device is in a programming scene, the CPU performance requirements are large, and the GPU needs to have a small performance, so the TPP can be large, and the TGP and DB values can be small, so as to meet the programming requirements and reduce the power consumption of the device. In other words, in an embodiment of the present application, the parameter value of the first performance parameter is dynamically adjusted according to the scene in which the electronic device is located, so as to ensure the smooth operation of the application, reduce the power consumption of the device, and extend the battery life of the device. And compared with the current electronic device factory setting TDP, TGP or TPP value control method, it can better meet the performance requirements of the application, reasonably allocate CPU power consumption and GPU power consumption according to specific applications, and improve user experience.
应当理解的是,对于电子设备而言,基于处理器性能和散热设计TPP一般具有上限值,在本申请实施例中根据电子设备设定TPP、TDP、TGP的具体数值是在TPP上限值之内进行设定。例如电子设备的最大TPP为90W,则可以在性能需求较低的场景中将TPP设置为30W。在性能需要较大的场景中,可以将TPP设置为60W、70W甚至90W等较大数值。并且CPU性能需求较大时使TDP较大,GPU性能需求较大时,使TGP较大。与目前的基于TGP、TDP、TPP的性能调控方式相比可以更灵活的分配CPU和GPU功耗。这是因为采用目前的调控方式,一般直接设定TPP例如为60W,TDP为25W,TGP为35W,由处理器基于TPP、TGP、TDP根据需要自行调节性能,这种方式由于TDP、TGP已经设定使得无法根据需要合理分配CPU和GPU功耗。而采用本实施例的方式,则可以在GPU性能需求较大CPU性能需求较小的场景中将TGP设置为40W,将TDP设置为20W,这样可以更好地满足应用的性能需求。It should be understood that for electronic devices, TPP generally has an upper limit value based on processor performance and heat dissipation design. In the embodiment of the present application, the specific values of TPP, TDP, and TGP set according to the electronic device are set within the TPP upper limit value. For example, if the maximum TPP of the electronic device is 90W, TPP can be set to 30W in a scene with low performance requirements. In a scene with large performance requirements, TPP can be set to a larger value such as 60W, 70W, or even 90W. And when the CPU performance requirement is large, TDP is large, and when the GPU performance requirement is large, TGP is large. Compared with the current performance control method based on TGP, TDP, and TPP, CPU and GPU power consumption can be allocated more flexibly. This is because the current control method generally directly sets TPP to, for example, 60W, TDP to 25W, and TGP to 35W, and the processor adjusts the performance according to the needs based on TPP, TGP, and TDP. This method cannot reasonably allocate CPU and GPU power consumption as needed because TDP and TGP have been set. By adopting the method of this embodiment, in a scenario where the GPU performance requirement is greater and the CPU performance requirement is smaller, the TGP can be set to 40 W and the TDP can be set to 20 W, which can better meet the performance requirements of the application.
还应当理解的是,一般电子设备都配置有均衡模式和性能模式,在性能模式和均衡模式中性能参数上限值不同,当电子设备处于性能模式时则在性能模式下的第一性能参数的上限值内设定各用户场景下第一性能参数的参数值。当电子设备处于均衡模式时则在均衡模式下的第一性能参数的上限值内设定各用户场景下第一性能参数的参数值。例
如在性能模式TGP上限为50W,在均衡模式中TGP上限为30W,则在性能模式下在50W的上限内设定各用户场景的TGP值,在均衡模式下在30W的上限内设定各用户场景的TGP值。It should also be understood that generally electronic devices are configured with a balanced mode and a performance mode, and the upper limits of performance parameters are different in the performance mode and the balanced mode. When the electronic device is in the performance mode, the parameter value of the first performance parameter in each user scenario is set within the upper limit of the first performance parameter in the performance mode. When the electronic device is in the balanced mode, the parameter value of the first performance parameter in each user scenario is set within the upper limit of the first performance parameter in the balanced mode. For example, if the TGP upper limit is 50W in performance mode and 30W in balanced mode, the TGP value of each user scenario is set within the upper limit of 50W in performance mode and within the upper limit of 30W in balanced mode.
进一步地,示例性地,在本申请实施例中,可以通过测试预先确定各种用户场景的性能需求,例如通过测试确定办公场景所需的性能,并根据该性能确定办公场景下的第二性能参数的参数值。通过调节第一性能参数可以更细的调节GPU的性能,为GPU提供更合理的性能。通过调节第二性能参数可以更大幅度或快速地调节GPU性能,以迅速降低(或者增大)GPU性能。Further, exemplarily, in an embodiment of the present application, the performance requirements of various user scenarios can be pre-determined by testing, for example, the performance required for an office scenario can be determined by testing, and the parameter value of the second performance parameter in the office scenario can be determined based on the performance. By adjusting the first performance parameter, the performance of the GPU can be adjusted more finely to provide a more reasonable performance for the GPU. By adjusting the second performance parameter, the GPU performance can be adjusted more significantly or quickly to quickly reduce (or increase) the GPU performance.
需要说明的是,在本申请实施例中可以根据需要根据用户场景的需求调节第一性能参数或第二性能参数。It should be noted that in the embodiment of the present application, the first performance parameter or the second performance parameter can be adjusted as needed according to the requirements of the user scenario.
在一种可选的实施方式中,默认Dx设置为D1(最大GPU功耗),当用户场景发生变化时,通过调节第一性能参数来调节GPU性能。In an optional implementation, Dx is set to D1 (maximum GPU power consumption) by default, and when the user scenario changes, the GPU performance is adjusted by adjusting the first performance parameter.
在一种可选的实施方式中,当用户场景需求的GPU性能很小时,可以将Dx值调节为D4或D5,以直接将GPU性能限制在较小值,从而延长设备续航。In an optional implementation, when the GPU performance required by the user scenario is very small, the Dx value can be adjusted to D4 or D5 to directly limit the GPU performance to a smaller value, thereby extending the battery life of the device.
在一种可选的实施方式中,在当前用户场景的性能需求相对之前用户场景的性能需求增大时,通过调节第一性能参数来使设备提供更大的GPU和CPU性能。In an optional implementation, when the performance requirement of the current user scenario increases relative to the performance requirement of the previous user scenario, the device provides greater GPU and CPU performance by adjusting the first performance parameter.
在一种可选的实施方式中,当电子设备的剩余电池电量不足时,例如小于设定百分比(例如小于20%)时,以将Dx值调节为D4或D5,以直接将GPU性能限制在较小值,从而延长设备续航。In an optional embodiment, when the remaining battery power of the electronic device is insufficient, for example, less than a set percentage (e.g., less than 20%), the Dx value is adjusted to D4 or D5 to directly limit the GPU performance to a smaller value, thereby extending the battery life of the device.
在一种可选的实施方式中,当电子设备的温度过高时,例如大于设定阈值(例如大于90℃)时,以将Dx值调节为D4或D5,以直接将GPU性能限制在较小值,从而延长设备续航。In an optional embodiment, when the temperature of the electronic device is too high, for example, greater than a set threshold (for example, greater than 90°C), the Dx value is adjusted to D4 or D5 to directly limit the GPU performance to a smaller value, thereby extending the battery life of the device.
需要说明的是电子设备的温度包括CPU温度、GPU温度、主板温度等,电子设备的温度过高指的是CPU温度、GPU温度、主板温度等中的一个或多个温度过高。It should be noted that the temperature of the electronic device includes the CPU temperature, GPU temperature, motherboard temperature, etc., and the over-high temperature of the electronic device means that one or more of the CPU temperature, GPU temperature, motherboard temperature, etc. are too high.
步骤S803,性能调控应用通过WMI接口将性能参数的参数值发送至BIOS。Step S803: the performance control application sends the parameter value of the performance parameter to the BIOS through the WMI interface.
当在前述步骤S802中确定性能参数的参数值后,则性能调控应用调用WMI接口将性能参数的参数值发送至BIOS。After the parameter value of the performance parameter is determined in the aforementioned step S802, the performance control application calls the WMI interface to send the parameter value of the performance parameter to the BIOS.
步骤S804,BIOS将性能参数的参数值写入ACPI指的位置,并通知GPU驱动读取性能参数的参数值。Step S804: BIOS writes the parameter value of the performance parameter into the location indicated by ACPI, and notifies the GPU driver to read the parameter value of the performance parameter.
示例性地,ACPI中指定了内部存储器(即内存)中存储第一性能参数和第二性能参数的存储位置,BIOS获取到一性能参数和第二性能参数的参数值后将该存储位置的性能参数修改为最新数值,然后通知GPU驱动读取最新的图形处理器的性能参数。Exemplarily, ACPI specifies the storage location in the internal memory (i.e., the memory) for storing the first performance parameter and the second performance parameter. After the BIOS obtains the parameter values of the first performance parameter and the second performance parameter, it modifies the performance parameter at the storage location to the latest value, and then notifies the GPU driver to read the latest performance parameters of the graphics processor.
第一性能参数的存储位置和第二性能参数的存储位置可以相同,也可以不同。The storage location of the first performance parameter and the storage location of the second performance parameter may be the same or different.
步骤S805,GPU驱动读取性能参数的参数值,并根据性能参数的参数值调控GPU的性能。Step S805: The GPU driver reads the parameter value of the performance parameter, and adjusts the performance of the GPU according to the parameter value of the performance parameter.
具体地,BIOS在修改图形处理器的性能参数的数值后会产生SCI中断,显卡驱动接收到SCI中断(也即事件通知)后调用显卡控制方法(ACPI中定义的显卡control method)读取图形处理器的性能参数的当前数值。
Specifically, after the BIOS modifies the value of the performance parameter of the graphics processor, an SCI interrupt is generated. After receiving the SCI interrupt (ie, event notification), the graphics driver calls the graphics control method (the graphics control method defined in ACPI) to read the current value of the performance parameter of the graphics processor.
当读取到性能参数后,则根据性能参数调控图形处理器的性能。例如当读取到Dx的当前数值后,则根据Dx当前数值对应的功耗控制显卡性能。示例性例如当前Dx值为D3,对应的显卡功耗为15W,则GPU驱动控制显卡将其最大功耗限制在15W。又例如,当读取到TGP、TDP、TPP、DB的当前数值后,根据TGP、TDP、TPP、DB的当前数值控制显卡性能。After the performance parameters are read, the performance of the graphics processor is regulated according to the performance parameters. For example, after the current value of Dx is read, the graphics card performance is controlled according to the power consumption corresponding to the current value of Dx. For example, if the current Dx value is D3 and the corresponding graphics card power consumption is 15W, the GPU driver controls the graphics card to limit its maximum power consumption to 15W. For another example, after the current values of TGP, TDP, TPP, and DB are read, the graphics card performance is controlled according to the current values of TGP, TDP, TPP, and DB.
需要说明的是,当根据TGP、TDP、TPP、DB的当前数值控制显卡性能时,GPU驱动还与CPU驱动通信以获取当前的CPU功耗,并根据当前的TGP、TDP、TPP、DB值调节显卡性能。It should be noted that when controlling the graphics card performance according to the current values of TGP, TDP, TPP, and DB, the GPU driver also communicates with the CPU driver to obtain the current CPU power consumption, and adjusts the graphics card performance according to the current TGP, TDP, TPP, and DB values.
示例性地,例如当前的TGP为40W,TDP为30W,TPP为70W,DB为15W,则GPU驱动可以更加CPU的实际功耗将GPU功耗限制在25W(40-15)和55W(40+15)之间。即当CPU实际功耗较小时,例如CPU实际功耗为15W,则GPU功耗可以在55W内调节,即可以提供最大55W的GPU功耗。又例如CPU实际功耗为30W时,则GPU功耗可以在25W内调节,即可以提供最大25W的GPU功耗,这样可以保证提供足够的CPU性能。For example, if the current TGP is 40W, TDP is 30W, TPP is 70W, and DB is 15W, the GPU driver can limit the GPU power consumption to between 25W (40-15) and 55W (40+15) according to the actual power consumption of the CPU. That is, when the actual power consumption of the CPU is small, for example, the actual power consumption of the CPU is 15W, the GPU power consumption can be adjusted within 55W, that is, a maximum GPU power consumption of 55W can be provided. For another example, when the actual power consumption of the CPU is 30W, the GPU power consumption can be adjusted within 25W, that is, a maximum GPU power consumption of 25W can be provided, which can ensure sufficient CPU performance.
下面结合图9和图10以具体应用为例说明本申请实施例提供的性能调控方法。The performance control method provided in the embodiment of the present application is described below by taking a specific application as an example with reference to FIG. 9 and FIG. 10 .
图9为本申请实施例提供的性能调控方法的示例调控过程。FIG. 9 is an example control process of the performance control method provided in an embodiment of the present application.
如图9所示,本申请实施例提供的性能调控方法的示例调控过程包括:As shown in FIG9 , the exemplary control process of the performance control method provided in the embodiment of the present application includes:
步骤S901,响应于用于操作启动第一应用,在启动所述第一应用之前,所述电子设备的第一性能参数为第一参数值。Step S901, in response to an operation for starting a first application, before starting the first application, a first performance parameter of the electronic device is a first parameter value.
示例性地,第一应用例如编程应用,例如各种编程应用。Exemplarily, the first application is, for example, a programming application, such as various programming applications.
所述第一性能参数包括所述CPU的TDP功耗、所述GPU的TGP功耗、所述GPU的TPP功耗、所述GPU的DB功耗中的至少一种。The first performance parameter includes at least one of TDP power consumption of the CPU, TGP power consumption of the GPU, TPP power consumption of the GPU, and DB power consumption of the GPU.
第一参数值可以是一个参数集合,包含TDP、TPP、TGP、DB的具体数值。示例性地,第一参数值例如为TDP30W、TPP70W、TGP40W,DB15W。通过减小TGP和DB可以有效GPU性能,从而使设备提供充足的CPU性能。The first parameter value may be a parameter set including specific values of TDP, TPP, TGP, and DB. For example, the first parameter value may be TDP30W, TPP70W, TGP40W, and DB15W. By reducing TGP and DB, GPU performance may be effectively improved, thereby enabling the device to provide sufficient CPU performance.
步骤S902,场景识别引擎根据第一应用确定电子设备处于第一用户场景。Step S902: The scene recognition engine determines that the electronic device is in a first user scene according to the first application.
示例性地,第一用户场景为编程场景。关于场景识别模块确定电子设备所处的用户场景的过程,具体参阅S501~S536,在此不再赘述。Exemplarily, the first user scenario is a programming scenario. For details about the process of the scenario recognition module determining the user scenario of the electronic device, please refer to S501 to S536, which will not be described in detail here.
步骤S903,场景识别引擎确定将第一场景信息发送至性能调控应用。Step S903: The scene recognition engine determines to send the first scene information to the performance control application.
示例性的,电子设备可以预先为不同的用户场景分配唯一标识,该场景信息则可包括用户场景所的唯一标识。Exemplarily, the electronic device may pre-assign unique identifiers to different user scenarios, and the scenario information may include the unique identifier of the user scenario.
步骤S904,在第一时间点,性能调控应用根据第一场景信息将第一性能参数调节为第二参数值,第二参数值与第一参数值不同。Step S904: At a first time point, the performance control application adjusts the first performance parameter to a second parameter value according to the first scenario information, where the second parameter value is different from the first parameter value.
第二参数值可以是一个参数集合,包含TDP、TPP、TGP、DB的具体数值。第二参数值与第一参数值不同,指的是第一参数值和第二参数值中,存在至少一个参数的对应数值不同。例如,第一参数值中的TGP数值和第二参数值中的TGP数值不同。The second parameter value may be a parameter set including specific values of TDP, TPP, TGP, and DB. The second parameter value is different from the first parameter value, which means that the corresponding value of at least one parameter in the first parameter value and the second parameter value is different. For example, the TGP value in the first parameter value is different from the TGP value in the second parameter value.
示例性地,第二参数值例如为TDP30W、TPP60W、TGP10W,DB5W。Exemplarily, the second parameter value is, for example, TDP30W, TPP60W, TGP10W, DB5W.
通过减小TGP和DB可以有效GPU性能,从而使设备提供充足的CPU性能。
By reducing TGP and DB, GPU performance can be effectively utilized, thereby allowing the device to provide sufficient CPU performance.
步骤S905,性能调控应用通过WMI接口将第二参数值发送至BIOS。Step S905: the performance control application sends the second parameter value to the BIOS through the WMI interface.
步骤S906,BIOS将第二参数值写入ACPI指的位置,并通知GPU驱动读取第二参数值。Step S906: BIOS writes the second parameter value into the location indicated by ACPI, and notifies the GPU driver to read the second parameter value.
具体地BIOS将第二参数值写入ACPI指的第一性能参数的存储位置,并通知GPU驱动读取第二参数值。Specifically, the BIOS writes the second parameter value into the storage location of the first performance parameter indicated by ACPI, and notifies the GPU driver to read the second parameter value.
步骤S907,GPU驱动读取第二参数值,并根据第二一参数值调控GPU的性能。Step S907: The GPU driver reads the second parameter value and adjusts the performance of the GPU according to the second parameter value.
GPU读取第二参数值的过程参见S805的描述,在此不再赘述。The process of the GPU reading the second parameter value is described in S805 and will not be repeated here.
步骤S908,响应于用于操作启动第二应用。Step S908: starting a second application in response to the user operation.
示例性地,第二应用例如游戏应用,例如3A大型游戏。Exemplarily, the second application is, for example, a game application, such as a 3A large-scale game.
步骤S909,场景识别引擎根据第二应用确定电子设备处于第二用户场景。Step S909: The scene recognition engine determines that the electronic device is in a second user scene according to the second application.
示例性地,第二用户场景为游戏场景。关于场景识别模块确定电子设备所处的用户场景的过程,具体参阅S501~S536,在此不再赘述。Exemplarily, the second user scenario is a game scenario. For details about the process of the scenario recognition module determining the user scenario in which the electronic device is located, refer to S501 to S536, which will not be described in detail here.
步骤S910,场景识别引擎确定将第二场景信息发送至性能调控应用。Step S910: The scene recognition engine determines to send the second scene information to the performance control application.
示例性的,电子设备可以预先为不同的用户场景分配唯一标识,该场景信息则可包括用户场景所的唯一标识。Exemplarily, the electronic device may pre-assign unique identifiers to different user scenarios, and the scenario information may include the unique identifier of the user scenario.
步骤S911,在第二时间点,性能调控应用根据第二场景信息将第一性能参数调节为第三参数值,第三参数值与第二参数值不同。Step S911: at a second time point, the performance control application adjusts the first performance parameter to a third parameter value according to the second scenario information, where the third parameter value is different from the second parameter value.
第三参数值可以是一个参数集合,包含TDP、TPP、TGP、DB的具体数值。第三参数值与第二参数值不同,指的是第三参数值和第二参数值中,存在至少一个参数的对应数值不同。例如,第三参数值中的TGP数值和第二参数值中的TGP数值不同。The third parameter value may be a parameter set including specific values of TDP, TPP, TGP, and DB. The third parameter value is different from the second parameter value, which means that the corresponding value of at least one parameter in the third parameter value and the second parameter value is different. For example, the TGP value in the third parameter value is different from the TGP value in the second parameter value.
示例性地,第三参数值例如为TDP30W、TPP80W、TGP50W,DB15W。通过增大TGP和DB,使得电子设备可以提供充足的GPU性能,提高游戏体验。Exemplarily, the third parameter value is, for example, TDP30W, TPP80W, TGP50W, and DB15W. By increasing TGP and DB, the electronic device can provide sufficient GPU performance and improve the gaming experience.
步骤S912,性能调控应用通过WMI接口将第三参数值发送至BIOS。Step S912: The performance control application sends the third parameter value to the BIOS through the WMI interface.
步骤S913,BIOS将第三参数值写入ACPI指的位置,并通知GPU驱动读取第二参数值。Step S913, BIOS writes the third parameter value into the location indicated by ACPI, and notifies the GPU driver to read the second parameter value.
具体地BIOS将第三参数值写入ACPI指的第一性能参数的存储位置,并通知GPU驱动读取第三参数值。Specifically, the BIOS writes the third parameter value into the storage location of the first performance parameter indicated by ACPI, and notifies the GPU driver to read the third parameter value.
步骤S914,GPU驱动读取第三参数值,并根据第三参数值调控GPU的性能。Step S914: The GPU driver reads the third parameter value and adjusts the performance of the GPU according to the third parameter value.
GPU读取第三参数值的过程参见S805的描述,在此不再赘述。The process of the GPU reading the third parameter value is described in S805 and will not be repeated here.
图10为本申请实施例提供的性能调控方法的又一示例调控过程。FIG. 10 is another example control process of the performance control method provided in an embodiment of the present application.
如图10所示,本申请实施例提供的性能调控方法的示例调控过程包括:As shown in FIG10 , the exemplary control process of the performance control method provided in the embodiment of the present application includes:
步骤S1001,响应于用于操作启动第三应用,在启动所述第三应用之前,所述电子设备的第二性能参数为第四参数值。Step S1001: in response to an operation for starting a third application, before starting the third application, the second performance parameter of the electronic device is a fourth parameter value.
示例性地,第三应用例如办公应用,例如各种办公软件,例如word。Exemplarily, the third application is, for example, an office application, such as various office software, such as Word.
所述第二性能参数包括所述GPU的Dx值。示例性地,所述第四参数值例如为D1。The second performance parameter includes a Dx value of the GPU. Exemplarily, the fourth parameter value is, for example, D1.
步骤S1002,场景识别引擎根据第三应用确定电子设备处于第三用户场景。Step S1002: The scene recognition engine determines that the electronic device is in a third user scene based on a third application.
示例性地,第三用户场景为办公场景。关于场景识别模块确定电子设备所处的用户场景的过程,具体参阅S501~S536,在此不再赘述。
Exemplarily, the third user scenario is an office scenario. For details about the process of the scenario recognition module determining the user scenario in which the electronic device is located, refer to S501 to S536, which will not be described in detail here.
步骤S1003,场景识别引擎确定将第三场景信息发送至性能调控应用。Step S1003: The scene recognition engine determines to send the third scene information to the performance control application.
示例性的,电子设备可以预先为不同的用户场景分配唯一标识,该场景信息则可包括用户场景所的唯一标识。Exemplarily, the electronic device may pre-assign unique identifiers to different user scenarios, and the scenario information may include the unique identifier of the user scenario.
步骤S1004,在第三时间点,性能调控应用根据第三场景信息将第二性能参数调节为第五参数值,第五参数值与第四参数值不同。Step S1004: At a third time point, the performance control application adjusts the second performance parameter to a fifth parameter value according to the third scenario information, where the fifth parameter value is different from the fourth parameter value.
示例性地,第五参数值例如为D4或D5。办公场景下GPU性能需求较低,因此可以通过调节Dx值直接限制GPU性能,以提高设备续航。Exemplarily, the fifth parameter value is, for example, D4 or D5. In office scenarios, the GPU performance requirement is relatively low, so the GPU performance can be directly limited by adjusting the Dx value to improve the device battery life.
步骤S1005,性能调控应用通过WMI接口将第五参数值发送至BIOS。Step S1005: the performance control application sends the fifth parameter value to the BIOS through the WMI interface.
步骤S1006,BIOS将第五参数值写入ACPI指的位置,并通知GPU驱动读取第五参数值。Step S1006, BIOS writes the fifth parameter value into the location indicated by ACPI, and notifies the GPU driver to read the fifth parameter value.
具体地BIOS将第五参数值写入ACPI指的第二性能参数的存储位置,并通知GPU驱动读取第五参数值。第二性能参数的存储位置与第一性能参数的存储位置可以相同,也可以不同。Specifically, the BIOS writes the fifth parameter value into the storage location of the second performance parameter indicated by ACPI, and notifies the GPU driver to read the fifth parameter value. The storage location of the second performance parameter can be the same as or different from the storage location of the first performance parameter.
步骤S1007,GPU驱动读取第五参数值,并根据第五参数值调控GPU的性能。Step S1007: The GPU driver reads the fifth parameter value and adjusts the performance of the GPU according to the fifth parameter value.
GPU读取第五参数值的过程参见S805的描述,在此不再赘述。The process of the GPU reading the fifth parameter value is described in S805 and will not be repeated here.
步骤S1008,响应于用于操作启动第四应用。Step S1008: starting a fourth application in response to the user operation.
示例性地,第四应用例如游戏应用,例如3A大型游戏For example, the fourth application is a game application, such as a 3A large game
步骤S1009,场景识别引擎根据第四应用确定电子设备处于第四用户场景。Step S1009: The scene recognition engine determines that the electronic device is in a fourth user scene based on the fourth application.
示例性地,第四用户场景为游戏场景。关于场景识别模块确定电子设备所处的用户场景的过程,具体参阅S501~S536,在此不再赘述。Exemplarily, the fourth user scenario is a game scenario. For details about the process of the scenario recognition module determining the user scenario in which the electronic device is located, refer to S501 to S536, which will not be described in detail here.
步骤S1010,场景识别引擎确定将第四场景信息发送至性能调控应用。Step S1010: The scene recognition engine determines to send fourth scene information to the performance control application.
示例性的,电子设备可以预先为不同的用户场景分配唯一标识,该场景信息则可包括用户场景所的唯一标识。Exemplarily, the electronic device may pre-assign unique identifiers to different user scenarios, and the scenario information may include the unique identifier of the user scenario.
步骤S1011,在第四时间点,性能调控应用根据第四场景信息将第二性能参数调节为第六参数值,第六参数值与第五参数值不同。Step S1011, at a fourth time point, the performance control application adjusts the second performance parameter to a sixth parameter value according to fourth scenario information, where the sixth parameter value is different from the fifth parameter value.
示例性地,第六参数值例如为D1。Exemplarily, the sixth parameter value is, for example, D1.
步骤S1012,性能调控应用通过WMI接口将第六参数值发送至BIOS。Step S1012: the performance control application sends the sixth parameter value to the BIOS through the WMI interface.
步骤S1013,BIOS将第五参数值写入ACPI指的位置,并通知GPU驱动读取第五参数值。Step S1013, BIOS writes the fifth parameter value into the location indicated by ACPI, and notifies the GPU driver to read the fifth parameter value.
具体地BIOS将第五参数值写入ACPI指的第二性能参数的存储位置,并通知GPU驱动读取第五参数值。Specifically, the BIOS writes the fifth parameter value into the storage location of the second performance parameter indicated by ACPI, and notifies the GPU driver to read the fifth parameter value.
步骤S1014,GPU驱动读取第五参数值,并根据第五参数值调控GPU的性能。Step S1014: The GPU driver reads the fifth parameter value and adjusts the performance of the GPU according to the fifth parameter value.
GPU读取第五参数值的过程参见S805的描述,在此不再赘述。The process of the GPU reading the fifth parameter value is described in S805 and will not be repeated here.
可以理解的是,电子设备为了实现上述功能,其包含了执行各个功能相应的硬件和/或软件模块。结合本文中所公开的实施例描述的各示例的算法步骤,本申请能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。本领域技术人员可以结合实施例对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为
超出本申请的范围。It is understandable that in order to implement the above functions, the electronic device includes hardware and/or software modules corresponding to the execution of each function. In combination with the algorithm steps of each example described in the embodiments disclosed in this article, 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 the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application in combination with the embodiments, but such implementation should not be considered Beyond the scope of this application.
一个示例中,图11示出了本申请实施例的一种装置300的示意性框图。装置300可包括:处理器301和收发器/收发管脚302,可选地,还包括存储器303。In one example, FIG11 shows a schematic block diagram of an apparatus 300 according to an embodiment of the present application. The apparatus 300 may include: a processor 301 and a transceiver/transceiver pin 302 , and optionally, a memory 303 .
装置300的各个组件通过总线304耦合在一起,其中总线304除包括数据总线之外,还包括电源总线、控制总线和状态信号总线。但是为了清楚说明起见,在图中将各种总线都称为总线304。The components of the device 300 are coupled together via a bus 304, wherein the bus 304 includes a power bus, a control bus, and a status signal bus in addition to a data bus. However, for the sake of clarity, all buses are referred to as bus 304 in the figure.
可选地,存储器303可以用于前述方法实施例中的指令。该处理器301可用于执行存储器303中的指令,并控制接收管脚接收信号,以及控制发送管脚发送信号。Optionally, the memory 303 may be used for the instructions in the aforementioned method embodiment. The processor 301 may be used to execute the instructions in the memory 303, and control the receiving pin to receive a signal, and control the sending pin to send a signal.
装置300可以是上述方法实施例中的电子设备或电子设备的芯片。The apparatus 300 may be the electronic device or a chip of the electronic device in the above method embodiment.
其中,上述方法实施例涉及的各步骤的所有相关内容均可以援引到对应功能模块的功能描述,在此不再赘述。Among them, all relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module, and will not be repeated here.
上述本申请实施例提供的一种参数监控方法所执行的步骤,也可以由电子设备100中包括的一种芯片系统来执行,其中,该芯片系统可以包括处理器。该芯片系统可以与存储器耦合,使得该芯片系统运行时调用该存储器中存储的计算机程序,实现上述电子设备100执行的步骤。其中,该芯片系统中的处理器可以是应用处理器也可以是非应用处理器的处理器。The steps performed by the parameter monitoring method provided in the above embodiment of the present application may also be performed by a chip system included in the electronic device 100, wherein the chip system may include a processor. The chip system may be coupled to a memory so that when the chip system is running, the computer program stored in the memory is called to implement the steps performed by the above electronic device 100. The processor in the chip system may be an application processor or a processor other than an application processor.
以上所述,以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的范围。
As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
Claims (10)
- 一种性能调控方法,其特征在于,应用于电子设备,所述电子设备包括中央处理器CPU和图形处理器GPU,所述方法包括:A performance control method is characterized in that it is applied to an electronic device, wherein the electronic device includes a central processing unit (CPU) and a graphics processing unit (GPU), and the method includes:响应于用户操作启动第一应用,在启动所述第一应用之前,所述电子设备的第一性能参数为第一参数值,所述第一性能参数包括所述CPU的TDP功耗、所述GPU的TGP功耗、所述GPU的TPP功耗、所述GPU的DB功耗中的至少一种;In response to a user operation, a first application is started. Before the first application is started, a first performance parameter of the electronic device is a first parameter value, and the first performance parameter includes at least one of a TDP power consumption of the CPU, a TGP power consumption of the GPU, a TPP power consumption of the GPU, and a DB power consumption of the GPU;启动所述第一应用之后,在第一时间点,所述电子设备的第一性能参数调节为第二参数值,所述第二参数值和所述第一参数值不同;After starting the first application, at a first time point, a first performance parameter of the electronic device is adjusted to a second parameter value, and the second parameter value is different from the first parameter value;响应于用户操作,关闭所述第一应用,启动第二应用;In response to a user operation, closing the first application and starting a second application;启动所述第二应用之后,在第二时间点,将所述电子设备的第一性能参数调节为第三参数值,所述第三参数值和所述第二参数值不同。After starting the second application, at a second time point, the first performance parameter of the electronic device is adjusted to a third parameter value, and the third parameter value is different from the second parameter value.
- 根据权利要求1所述的性能调控方法,其特征在于,所述方法还包括:The performance control method according to claim 1, characterized in that the method further comprises:响应于用户操作,启动第三应用,在启动所述第三应用之前,所述电子设备的第二性能参数为第四参数值,所述第二性能参数包括所述GPU的Dx值;In response to a user operation, a third application is started, and before the third application is started, a second performance parameter of the electronic device is a fourth parameter value, and the second performance parameter includes a Dx value of the GPU;启动所述第三应用之后,在第三时间点,将所述电子设备的第二性能参数调节为第五参数值,所述第五参数值与所述第四参数值不同;After starting the third application, at a third time point, adjusting the second performance parameter of the electronic device to a fifth parameter value, the fifth parameter value being different from the fourth parameter value;响应于用户操作,关闭所述第三应用,启动第四应用;In response to a user operation, closing the third application and starting a fourth application;启动所述第四应用之后,在第四时间点,将所述电子设备的第二性能参数调节为第六参数值,所述第六参数值和所述第五参数值不同。After starting the fourth application, at a fourth time point, the second performance parameter of the electronic device is adjusted to a sixth parameter value, and the sixth parameter value is different from the fifth parameter value.
- 根据权利要求1所述的性能调控方法,其特征在于,所述方法还包括:The performance control method according to claim 1, characterized in that the method further comprises:在第五时间点之前,所述电子设备的第二性能参数为第七参数值,所述第二性能参数包括所述GPU的Dx值,所述第五时间点在所述第一时间点和/或所述第二时间点之后;Before a fifth time point, a second performance parameter of the electronic device is a seventh parameter value, the second performance parameter includes a Dx value of the GPU, and the fifth time point is after the first time point and/or the second time point;在第五时间点,将所述电子设备的第二性能参数调节为第八参数值,所述第八参数值与所述第七参数值不同;At a fifth time point, adjusting the second performance parameter of the electronic device to an eighth parameter value, wherein the eighth parameter value is different from the seventh parameter value;所述电子设备在第五时间点的剩余电池电量小于在所述第一时间点和/或所述第二时间点的剩余电池电量,在所述第五时间点所述电子设备未插电;或者The remaining battery power of the electronic device at the fifth time point is less than the remaining battery power at the first time point and/or the second time point, and the electronic device is not plugged in at the fifth time point; or所述电子设备在第五时间点的温度大于在所述第一时间点和/或所述第二时间点的温度。The temperature of the electronic device at the fifth time point is greater than the temperature at the first time point and/or the second time point.
- 根据权利要求1-3中的任意一项所述的性能调控方法,其特征在于,所述方法还包括:The performance control method according to any one of claims 1 to 3, characterized in that the method further comprises:根据所述第应用确定所述电子设备所处的用户场景,根据所述电子设备所处的用户场景确定所述第二参数值的大小;Determining a user scenario of the electronic device according to the first application, and determining a value of the second parameter according to the user scenario of the electronic device;根据所述第二应用确定所述电子设备所处的用户场景,根据所述电子设备所处的用户场景确定所述第三参数值的大小。 The user scenario of the electronic device is determined according to the second application, and the size of the third parameter value is determined according to the user scenario of the electronic device.
- 根据权利要求1所述的性能调控方法,其特征在于,所述方法还包括:The performance control method according to claim 1, characterized in that the method further comprises:将所述第二参数值发送至GPU驱动,所述GPU驱动根据所述第二参数值控制所述GPU的性能;Sending the second parameter value to a GPU driver, wherein the GPU driver controls the performance of the GPU according to the second parameter value;将所述第三参数值发送至所述GPU驱动,所述GPU驱动根据所述第三参数值控制所述GPU的性能。The third parameter value is sent to the GPU driver, and the GPU driver controls the performance of the GPU according to the third parameter value.
- 根据权利要求5所述的性能调控方法,所述电子设备还包括BIOS和ACPI,According to the performance control method of claim 5, the electronic device further comprises BIOS and ACPI,将所述第二参数值发送至GPU驱动,所述GPU驱动根据所述第二参数值控制所述GPU的性能,包括:Sending the second parameter value to a GPU driver, wherein the GPU driver controls the performance of the GPU according to the second parameter value, includes:通过WMI接口将所述第二参数值传输至所述BIOS;Transmitting the second parameter value to the BIOS via a WMI interface;所述BIOS将所述所述第二参数值写入所述ACPI指定的第一性能参数存储位置,并通过所述GPU驱动读取所述第二参数值;The BIOS writes the second parameter value into the first performance parameter storage location specified by the ACPI, and reads the second parameter value through the GPU driver;所述GPU驱动读取所述第二参数值,并根据所述第二参数值控制所述GPU的性能;The GPU driver reads the second parameter value, and controls the performance of the GPU according to the second parameter value;将所述第三参数值发送至GPU驱动,所述GPU驱动根据所述第三参数值控制所述GPU的性能,包括:Sending the third parameter value to a GPU driver, wherein the GPU driver controls the performance of the GPU according to the third parameter value, includes:通过WMI接口将所述第三参数值传输至所述BIOS;Transmitting the third parameter value to the BIOS via a WMI interface;所述BIOS将所述所述第三参数值写入所述ACPI指定的第一性能参数存储位置,并通过所述GPU驱动读取所述第三参数值;The BIOS writes the third parameter value into the first performance parameter storage location specified by the ACPI, and reads the third parameter value through the GPU driver;所述GPU驱动读取所述第三参数值,并根据所述第二参数值控制所述GPU的性能。The GPU driver reads the third parameter value and controls the performance of the GPU according to the second parameter value.
- 根据权利要求2所述的性能调控方法,其特征在于,所述方法还包括:The performance control method according to claim 2, characterized in that the method further comprises:将所述第五参数值发送至GPU驱动,所述GPU驱动根据所述第五参数值控制所述GPU的性能;Sending the fifth parameter value to a GPU driver, wherein the GPU driver controls the performance of the GPU according to the fifth parameter value;将所述第六参数值发送至所述GPU驱动,所述GPU驱动根据所述第六参数值控制所述GPU的性能。The sixth parameter value is sent to the GPU driver, and the GPU driver controls the performance of the GPU according to the sixth parameter value.
- 根据权利要求7所述的性能调控方法,所述电子设备还包括BIOS和ACPI,According to the performance control method of claim 7, the electronic device further comprises BIOS and ACPI,将所述第五参数值发送至GPU驱动,所述GPU驱动根据所述第五参数值控制所述GPU的性能,包括:Sending the fifth parameter value to a GPU driver, wherein the GPU driver controls the performance of the GPU according to the fifth parameter value, includes:通过WMI接口将所述第五参数值传输至所述BIOS;Transmitting the fifth parameter value to the BIOS via a WMI interface;所述BIOS将所述所述第五参数值写入所述ACPI指定的第二性能参数存储位置,并通过所述GPU驱动读取所述第五参数值;The BIOS writes the fifth parameter value into the second performance parameter storage location specified by the ACPI, and reads the fifth parameter value through the GPU driver;所述GPU驱动读取所述第五参数值,并根据所述第五参数值控制所述GPU的性能;The GPU driver reads the fifth parameter value and controls the performance of the GPU according to the fifth parameter value;将所述第六参数值发送至GPU驱动,所述GPU驱动根据所述第六参数值控制所述GPU的性能,包括:Sending the sixth parameter value to a GPU driver, wherein the GPU driver controls the performance of the GPU according to the sixth parameter value, includes:通过WMI接口将所述第六参数值传输至所述BIOS;Transmitting the sixth parameter value to the BIOS via a WMI interface;所述BIOS将所述所述第六参数值写入所述ACPI指定的第二性能参数存储位置,并 通过所述GPU驱动读取所述第六参数值;The BIOS writes the sixth parameter value into the second performance parameter storage location specified by the ACPI, and Reading the sixth parameter value through the GPU driver;所述GPU驱动读取所述第六参数值,并根据所述第六参数值控制所述GPU的性能。The GPU driver reads the sixth parameter value and controls the performance of the GPU according to the sixth parameter value.
- 一种电子设备,其特征在于,包括:存储器和处理器,所述存储器和所述处理器耦合;所述存储器存储有程序指令,所述程序指令由所述处理器执行时,使得所述电子设备执行如权利要求1-8中任意一项所述的性能调控方法。An electronic device, characterized in that it includes: a memory and a processor, wherein the memory and the processor are coupled; the memory stores program instructions, and when the program instructions are executed by the processor, the electronic device executes the performance control method as described in any one of claims 1 to 8.
- 一种计算机可读存储介质,其特征在于,包括计算机程序,其特征在于,当所述计算机程序在电子设备上运行时,使得所述电子设备执行如权利要求1-8中任意一项所述的性能调控方法。 A computer-readable storage medium, characterized in that it includes a computer program, characterized in that when the computer program is run on an electronic device, the electronic device executes the performance control method as described in any one of claims 1 to 8.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211345647.9 | 2022-10-31 | ||
CN202211345647.9A CN117950935A (en) | 2022-10-31 | 2022-10-31 | Performance regulating and controlling method and electronic equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
WO2024093491A1 WO2024093491A1 (en) | 2024-05-10 |
WO2024093491A9 true WO2024093491A9 (en) | 2024-07-18 |
Family
ID=90790960
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2023/116072 WO2024093491A1 (en) | 2022-10-31 | 2023-08-31 | Performance regulation method and electronic device |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN117950935A (en) |
WO (1) | WO2024093491A1 (en) |
Family Cites Families (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20170262955A1 (en) * | 2017-05-26 | 2017-09-14 | Mediatek Inc. | Scene-Aware Power Manager For GPU |
CN106775803A (en) * | 2016-11-14 | 2017-05-31 | 努比亚技术有限公司 | A kind of parameter value adjuster, terminal and method |
CN108491275B (en) * | 2018-03-13 | 2022-12-13 | Oppo广东移动通信有限公司 | Program optimization method, device, terminal and storage medium |
CN109144358A (en) * | 2018-06-13 | 2019-01-04 | 努比亚技术有限公司 | Property regulation method, mobile terminal and computer readable storage medium |
CN109960395B (en) * | 2018-10-15 | 2021-06-08 | 华为技术有限公司 | Resource scheduling method and computer equipment |
CN110045908B (en) * | 2019-03-18 | 2021-02-09 | 华为技术有限公司 | Control method and electronic equipment |
CN112380012A (en) * | 2020-11-16 | 2021-02-19 | Oppo(重庆)智能科技有限公司 | Resource adjusting method and device, terminal equipment and storage medium |
CN112817426B (en) * | 2021-01-22 | 2022-08-02 | Oppo(重庆)智能科技有限公司 | Terminal control method in doze mode, terminal and storage medium |
CN115599513B (en) * | 2022-04-07 | 2023-11-03 | 荣耀终端有限公司 | Resource scheduling method and electronic equipment |
-
2022
- 2022-10-31 CN CN202211345647.9A patent/CN117950935A/en active Pending
-
2023
- 2023-08-31 WO PCT/CN2023/116072 patent/WO2024093491A1/en unknown
Also Published As
Publication number | Publication date |
---|---|
WO2024093491A1 (en) | 2024-05-10 |
CN117950935A (en) | 2024-04-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9361150B2 (en) | Resuming applications and/or exempting applications from suspension | |
US9740645B2 (en) | Reducing latency in a peripheral component interconnect express link | |
JP4878444B2 (en) | Task-oriented processing as an auxiliary computing environment for the main computing environment | |
JP4422017B2 (en) | Method and apparatus for providing a separate power management state | |
US11467650B2 (en) | Selecting a low power state in an electronic device | |
BR112020019436A2 (en) | SYSTEM, APPARATUS AND METHOD FOR OPTIMIZED RESTRICTION OF A PROCESSOR | |
US8607080B2 (en) | Optimizing voltage on a power plane using a host control unit to control a networked voltage regulation module array | |
KR20130049201A (en) | Storage drive management | |
TW200532429A (en) | Computer system power policy adjustment in response to an affirmative indication from a user | |
US20180120920A1 (en) | Thread Importance Based Processor Core Parking And Frequency Selection | |
JP2017519294A (en) | Multi-host power controller (MHPC) for flash memory-based storage devices | |
KR20120115398A (en) | System and method of controlling power in an electronic device | |
US20140282587A1 (en) | Multi-core binary translation task processing | |
CN117539614A (en) | Resource scheduling method and electronic equipment | |
TWI236585B (en) | A method, machine-readable medium, and apparatus for providing performance states | |
JP4833560B2 (en) | Always-on computing device | |
CN110928587A (en) | Control method and control device | |
US11663021B2 (en) | System and method for providing granular processor performance control | |
WO2024093491A9 (en) | Performance regulation method and electronic device | |
CN117130454B (en) | Power consumption adjustment method and electronic equipment | |
US9354812B1 (en) | Dynamic memory utilization in a system on a chip | |
CN116027880A (en) | Resource scheduling method and electronic equipment | |
US7272731B2 (en) | Information handling system having reduced power consumption | |
JP2004164530A (en) | Battery condition reading method by operation system of portable computer | |
CN116028314B (en) | Temperature parameter reading method, electronic device, and computer-readable storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 23884428 Country of ref document: EP Kind code of ref document: A1 |