CN117950935A - Performance regulating and controlling method and electronic equipment - Google Patents

Performance regulating and controlling method and electronic equipment Download PDF

Info

Publication number
CN117950935A
CN117950935A CN202211345647.9A CN202211345647A CN117950935A CN 117950935 A CN117950935 A CN 117950935A CN 202211345647 A CN202211345647 A CN 202211345647A CN 117950935 A CN117950935 A CN 117950935A
Authority
CN
China
Prior art keywords
performance
parameter value
gpu
electronic device
application
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211345647.9A
Other languages
Chinese (zh)
Inventor
相超
刘鹏程
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honor Device Co Ltd
Original Assignee
Honor Device Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202211345647.9A priority Critical patent/CN117950935A/en
Priority to PCT/CN2023/116072 priority patent/WO2024093491A1/en
Publication of CN117950935A publication Critical patent/CN117950935A/en
Pending legal-status Critical Current

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Power Sources (AREA)

Abstract

The application provides a performance regulation and control method and electronic equipment, and relates to the technical field of computers. According to the scheme, the performance requirements of the electronic equipment can be determined according to the current user scene of the electronic equipment, the performance parameters of the electronic equipment are adjusted according to the performance requirements of the electronic equipment, the performance parameters comprise at least one of TDP power consumption of a CPU, TGP power consumption of a GPU, TPP power consumption of the GPU and DB power consumption of the GPU, and a display card can perform performance adjustment and control according to the current TDP, TPP, TGP and/or DB power consumption, so that more reasonable CPU and GPU performances can be provided according to the scene, the performance requirements of users in various scenes can be better met, and the endurance of the equipment can be relatively improved, so that the user experience is improved.

Description

Performance regulating and controlling method and electronic equipment
Technical Field
The application relates to the technical field of intelligent terminals, in particular to a performance regulation and control method and electronic equipment.
Background
With the continuous development of electronic technology, electronic devices such as notebook computers or portable computers (Laptop) have been widely developed as common devices in daily life of people. There are various configurations of notebook computers on the market, for example, many notebook computers are equipped with independent graphics cards in order to provide higher performance. The addition of an independent graphics card generally means an increase in power consumption of the device, and in view of the mobile attribute of the notebook computer, endurance is always a focus of attention of the user. How to optimize the performance, endurance, heat generation, etc. of electronic devices such as notebook computers or portable computers (Laptop) has been a focus of attention of users.
Disclosure of Invention
In order to solve the technical problems, the application provides a parameter performance regulation and control method and electronic equipment. In the performance regulation and control method, the performance parameters of the electronic equipment can be regulated according to the current user scene of the electronic equipment, so that the display card can carry out performance regulation and control according to the current TDP, TPP, TGP and/or DB power consumption, more reasonable CPU and GPU performances can be provided according to the scene, the performance requirements of users in various scenes can be better met, and the endurance of the equipment can be relatively improved, so that the user experience is improved.
In a first aspect, the present application provides a performance adjustment method, applied to an electronic device, where the electronic device includes a central processing unit CPU and a graphics processing unit GPU, the method includes:
Starting a first application in response to user operation, wherein before the first application is started, a first performance parameter of the electronic device is a first parameter value, and the first performance parameter comprises 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;
After the first application is started, 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;
responding to user operation, closing the first application, and starting a second application;
after the second application is started, at a second point in time, the first performance parameter of the electronic device is adjusted to a third parameter value, which is different from the second parameter value.
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 is adjusted according to the performance requirement of the electronic device, wherein the first performance parameter comprises at least one of TDP power consumption of a CPU, TGP power consumption of a GPU, TPP power consumption of the GPU and DB power consumption of the GPU, so that the display card can perform performance regulation and control according to the current TDP, TPP, TGP and/or DB power consumption, thereby providing more reasonable CPU and GPU performances according to scenes, better meeting the performance requirements of users in various scenes, and relatively improving the endurance of the device, so as to improve the user experience.
According to the first aspect, or any implementation manner of the first aspect, the method further includes:
In response to a user operation, starting a third application, wherein before the third application is started, a second performance parameter of the electronic device is a fourth parameter value, and the second performance parameter comprises a Dx value of the GPU;
After the third application is started, at a third point in time, adjusting a second performance parameter of the electronic device to a fifth parameter value, the fifth parameter value being different from the fourth parameter value;
Responding to the user operation, closing the third application, and starting a fourth application;
After the fourth application is started, at a fourth point in time, the second performance parameter of the electronic device is adjusted to a sixth parameter value, which is different from the fifth parameter value.
According to the setting, the performance requirement of the electronic equipment can be determined according to the current user scene of the electronic equipment, the second performance parameter of the electronic equipment is adjusted according to the performance requirement of the electronic equipment, and comprises the Dx value of the GPU, so that the display card can perform performance regulation and control according to the power consumption corresponding to the current Dx value, and therefore more reasonable GPU performance can be provided according to the scene, the performance requirements of users in various scenes can be better met, and the endurance of the equipment can be relatively improved, so that the user experience is improved.
According to the first aspect, or any implementation manner of the first aspect, the method further includes:
Before a fifth point in time, a second performance parameter of the electronic device is a seventh parameter value, the second performance parameter comprising a Dx value of the GPU, the fifth point in time being after the first point in time and/or the second point in time;
At a fifth point in time, adjusting a second performance parameter of the electronic device to an eighth parameter value, the eighth parameter value being different from the seventh parameter value;
The remaining battery power of the electronic equipment at a fifth time point is smaller than the remaining battery power at the first time point and/or the second time point, and the electronic equipment is not plugged in at the fifth time point; or alternatively
The temperature of the electronic device at the fifth point in time is greater than the temperature at the first point in time and/or the second point in time.
By the arrangement, when the temperature of the electronic equipment is too high or the electric quantity is insufficient, the power consumption of the GPU is limited to reduce the heating or the electric quantity consumption of the equipment, and the endurance of the equipment is improved.
According to the first aspect, or any implementation manner of the first aspect, the method further includes:
Determining a user scene of the electronic equipment according to the first application, and determining the magnitude of the second parameter value according to the user scene of the electronic equipment;
and determining a user scene of the electronic equipment according to the second application, and determining the magnitude of the third parameter value according to the user scene of the electronic equipment.
By the arrangement, the performance parameters of the electronic equipment can be adjusted according to the current user scene of the electronic equipment, so that the display card can perform performance adjustment and control according to the current TDP, TPP, TGP and/or DB power consumption, more reasonable CPU and GPU performances can be provided according to the scene, the performance requirements of users in various scenes can be better met, and the endurance of the equipment can be relatively improved, so that the user experience is improved.
According to the first aspect, or any implementation manner of the first aspect, the method further includes:
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;
And sending the third parameter value to the GPU driver, wherein the GPU driver controls the performance of the GPU according to the third parameter value.
By the arrangement, the display card can perform performance regulation and control according to the current TDP, TPP, TGP and/or DB power consumption, so that more reasonable CPU and GPU performances can be provided according to scenes, the performance requirements of users in various scenes can be better met, and the endurance of the equipment can be relatively improved, so that the user experience is improved.
In accordance with the first aspect, or any implementation manner of the first aspect, the electronic device further includes a BIOS and an 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, and the GPU driver comprises:
transmitting the second parameter value to the BIOS through a WMI interface;
the BIOS writes the second parameter value into a first performance parameter storage position appointed 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, and the GPU driver comprises:
Transmitting the third parameter value to the BIOS through a WMI interface;
The BIOS writes the third parameter value into a first performance parameter storage position appointed by the ACPI, and reads the second parameter value through the GPU driver;
and the GPU driver reads the third parameter value and controls the performance of the GPU according to the third parameter value.
The current parameter value of the first performance parameter can be sent to the GPU driver through the WMI interface and the BIOS, the GPU driver is ensured to stably and timely acquire the current parameter value, and performance regulation and control are carried out according to the current parameter value.
According to the first aspect, or any implementation manner of the first aspect, the method further includes:
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;
And sending the sixth parameter value to the GPU driver, wherein the GPU driver controls the performance of the GPU according to the sixth parameter value.
By the arrangement, the display card can perform performance regulation and control according to the current Dx value, so that more reasonable CPU and GPU performances can be provided according to scenes, the performance requirements of users in various scenes can be better met, the endurance of equipment can be relatively improved, and the user experience is improved.
In accordance with the first aspect, or any implementation manner of the first aspect, the electronic device further includes a BIOS and an ACPI,
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, and the GPU driver comprises:
transmitting the fifth parameter value to the BIOS through a WMI interface;
the BIOS writes the fifth parameter value into a second performance parameter storage position appointed 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, the GPU driver controlling performance of the GPU according to the sixth parameter value, comprising:
transmitting the sixth parameter value to the BIOS through a WMI interface;
The BIOS writes the sixth parameter value into a second performance parameter storage position appointed by the ACPI, and reads the sixth parameter value through the GPU driver;
And the GPU driver reads the sixth parameter value and controls the performance of the GPU according to the sixth parameter value.
The current parameter value of the second performance parameter can be sent to the GPU driver through the WMI interface and the BIOS, the GPU driver is ensured to stably and timely acquire the current parameter value, and performance regulation and control are carried out according to the current parameter value.
In a second aspect, the present application provides an electronic device comprising: a memory and a processor, the memory and the processor coupled; the memory stores program instructions that, when executed by the processor, cause the electronic device to perform the performance tuning method of the first aspect or any possible implementation of the first aspect.
In a third aspect, the application provides a computer readable medium storing a computer program comprising instructions for performing the method of 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 performing the method of the first aspect or any possible implementation of the first aspect.
In a fifth aspect, the present application provides a chip comprising processing circuitry, transceiver pins. Wherein the transceiver pin and the processing circuit communicate with each other via an internal connection path, the processing circuit performing the method of the first aspect or any one of the possible implementation manners of the first aspect to control the receiving pin to receive signals and to control the transmitting pin to transmit signals.
Drawings
FIG. 1 is a schematic diagram illustrating the modular interaction of one current temperature monitoring method;
Fig. 2 is a schematic diagram of a hardware structure of an exemplary electronic device;
FIG. 3 is a schematic diagram of a software architecture of an exemplary electronic device;
FIG. 4 is a schematic diagram illustrating interactions between software modules according to an embodiment of the present application;
fig. 5 is a schematic diagram of signal interaction provided in an embodiment of the present application;
FIG. 6 is an interface diagram provided by an embodiment of the present application;
FIG. 7 is a schematic diagram of another signal interaction according to an embodiment of the present application;
FIG. 8 is a flowchart of a performance adjustment method according to an embodiment of the present application;
FIG. 9 is an exemplary tuning process of a performance tuning method provided by an embodiment of the application;
FIG. 10 is a further example tuning process of a performance tuning method provided by an embodiment of the application;
Fig. 11 shows a schematic block diagram of an apparatus of an embodiment of the application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
The term "and/or" is herein merely an association relationship describing an associated object, meaning that there may be three relationships, e.g., a and/or B, may represent: a exists alone, A and B exist together, and B exists alone.
The terms first and second and the like in the description and in the claims of embodiments of the application, are used for distinguishing between different objects and not necessarily for describing a particular sequential order of objects. For example, the first target object and the second target object, etc., are used to distinguish between different target objects, and are not used to describe a particular order of target objects.
In embodiments of the application, words such as "exemplary" or "such as" are used to mean serving as an example, instance, or illustration. Any embodiment or design described herein as "exemplary" or "e.g." in an embodiment should not be taken as preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "such as" is intended to present related concepts in a concrete fashion.
In the description of the embodiments of the present application, unless otherwise indicated, the meaning of "a plurality" means two or more. For example, the plurality of processing units refers to two or more processing units; the plurality of systems means two or more systems.
For clarity of the following description of various embodiments, a brief introduction to related concepts or technologies is first presented:
Motherboard BIOS: basic Input Output System, basic input output system. BIOS is a set of programs solidified on a ROM chip on the main board in the computer, and it stores the most important basic input and output programs of the computer, system setting information, power-on self-checking program and system start-up bootstrap program. The BIOS main function is to provide the lowest, most direct hardware setup and control for the computer. The interfaces provided by the BIOS to the operating system include BS (Boot Services) and RT (run time Services).
Display card BIOS: the BIOS is also called VGA BIOS or Video BIOS, and is mainly used for storing a control program between the display chip and the driver program, and controlling various working states of the display card, including core working frequency, video memory working frequency, power consumption limit, working voltage, video memory time sequence and other core parameters. The display card BIOS chip is used for storing the display card BIOS program, and the display card BIOS is stored in the BIOS chip, like the main board BIOS, but not in the disk.
NVAPI: NVAPI an interface for third party invocation provided by NVIDIA (inflight/huida) manufacturers is used to monitor the temperature, performance parameters etc. of the graphics card.
ACPI: advanced Configuration and Power Interface, advanced configuration and power interface, ACPI is an interface between system hardware/firmware (BIOS) and OS (operating system) and OS applications. In other words, the BIOS provides operating system to hardware communication through a unified interface, and ACPI is one implementation of such a unified interface in the BIOS. ACPI provides two types of data structures for the Operating System (OS): data tables and definition blocks. They are interfaces for the OS (operating system) to interact with BIOS/EFI firmware. The data table stores raw data and is used by the device driver. The definition block is made up of bytecodes executable by an interpreter. The data table portion of which is responsible for generation by firmware (BIOS/EFI) for information describing various aspects of the system hardware. The ACPI interface contains a number of predefined tables whose definitions are stored in the BIOS chip, generated by the BIOS into memory, and submitted to the operating system.
ACPI Control Method: ACPI control methods, like functions in the C language, the function of AML is called Method. According to the ACPI specification, the BIOS provides some standard Method for OS calls, such as_PTS, _WAK, etc. The control method defines how the OS performs a simple hardware task. For example, the OS invokes the control method (ControlMethod) to read the temperature of a high-temperature zone.
WMI: windows management instrumentation, windows management Specification, provides a unified interface to any local or remote application or script that obtains management data from a computer system, network, or enterprise. The unified interface design eliminates the need for WMI client applications and scripts to invoke a variety of operating system Application Programming Interfaces (APIs).
NVIDIADYNAMIC BOOST (dynamic enhancement): the method is a new technology, and can more intelligently distribute power for the CPU and the GPU of the notebook computer, so that the power consumption utilization efficiency of the notebook computer is improved on the premise of limited power consumption, and the overall performance of the notebook computer is improved.
Dx-Notify: the performance control interface reserved by the NVIDIA (Inlet Weida) display card supports the performance control of 5 steps of D1-D5, the GPU performance corresponding to each step is different, the performance corresponding to D1-D5 can be set in the Video BIOS, the D1 performance is the strongest, and the D5 performance is the weakest.
SCI: system Control Interrupt, system control interrupts. One IRQ (interrupt request), dedicated to ACPI power management, requires OS (operating system) support.
SMI: SYSTEM MANAGEMENT Interrupt, system management Interrupt, special Interrupt to enter SMM (SYSTEM MANAGEMENT Mode ) using system.
SMM: SYSTEM MANAGEMENT Mode, system management Mode, which is a standard architectural feature that is unified for all Intel processors, provides the same execution environment as a System Management Interrupt (SMI) handler in the traditional IA-32 architecture.
TGP: total Graphics Power, generally refers to the performance/power consumption of the entire graphics card.
TDP: CPU THERMAL DESIGN Power, heat dissipation design Power consumption, meaning "when the processor reaches maximum load, the released heat" (unit is W), is an index reflecting the heat release of a processor, and TDP is an index reflecting the heat release of the processor, and is the maximum heat limit that the cooling system of the computer must have the capability to dissipate.
TPP power consumption: total Processor Power, full processor power consumption, for notebooks, generally refers to CPU power consumption+gpu power consumption.
DB Power consumption: the dynamic power consumption of the display card, namely, the upper limit and the lower limit of the dynamic adjustment on the TGP power consumption of the display card, for example, the TGP power consumption is 40W, the DB power consumption is 15W, and the display card driving can limit the display card power consumption to between 25W and 55W according to the current power consumption/actual power consumption of the CPU.
Single/double baking: the baking machine is a stability test of a computer, the single baking is a pressure test of independently running a certain component by software (such as AIDA64 Extreme), for example, the single baking of a GPU and an FPU is realized by the software, and the double baking is realized by the software, so that the two tests are simultaneously carried out, and the full load work of the CPU and the GPU is generally indicated.
Address information: the CPU/program can acquire the specific position of the pre-applied memory through the address information, and store parameters such as GPU temperature, CPU temperature, mainboard temperature, fan rotation speed and the like in the memory, and the address information can be the starting position and length of the memory, the starting position and the last position of the memory, and any address information which can be used for representing the position of the memory is applicable to the embodiment of the application.
A focus window (focus window) refers to a window having focus. The focus window is the only window that can receive keyboard input. The manner in which the focus window is determined is associated with the focus mode (focus mode) of the system. The top level window of the focus window is called an active window (active window). Only one window at a time may be an active window. The focus window is a window which is needed to be used by the user at present with high probability.
The focus mode may be used to determine how the mouse brings a window into focus. In general, the focus modes may include three types, respectively:
(1) Click-to-focus (click-to-focus) in this mode, the window that the mouse clicks on gets focus. I.e. when the mouse clicks on any position of a window where focus is available, the window is activated, placed in front of all windows and receives keyboard input. When the mouse clicks on other windows, the window loses focus.
(2) The focus follows the mouse (focus-mouse), in which mode a window under the mouse can acquire focus. I.e. when the mouse is moved to a range of windows where focus is available, the user does not need to click somewhere on the window to activate the window, receive keyboard input, but the window is not necessarily placed at the forefront of all windows. When the mouse moves out of the range of this window, this window will also lose focus.
(3) Grass focus (sloppy focus), this focus mode is relatively similar to focus-mouse: when the mouse is moved to a window where focus is available, the user may activate the window without clicking somewhere on the window, receiving keyboard input, but the window is not necessarily positioned at the forefront of all windows. Unlike focus-focus, focus does not change when the mouse moves out of this window, but only when the mouse moves into another window that can receive focus.
A process includes multiple threads, which may create a window. The focus process is the process to which the thread that created the focus window belongs.
Among all chips or processors of a notebook computer or a portable computer (Laptop), a CPU (central processing unit) and a GPU (graphics processing unit) are chips with the largest power consumption and the most difficult performance to control, and how to control the performance, the power consumption and the heat of the CPU and the GPU.
FIG. 1 is a schematic diagram illustrating the modular interaction of one present performance tuning methodology. In the example shown in fig. 1, the current graphics card performance adjustment procedure is illustrated by adjusting the Dx value (i.e., the Dx value in Dx-Notify) of the NV (i.e., NVIDIA) graphics card.
In the present application, a graphics card, GPU, graphics processing unit or graphics processor have the same meaning, representing the same components in the device. The graphic cards may be divided into integrated graphic cards and independent graphic cards. In the embodiment of the application, the performance of the independent display card is regulated by taking an example as an explanation. However, it should be understood that the performance adjustment method disclosed in the embodiment of the present application is also applicable to an integrated graphics card. In addition, in the embodiment of the present application, an NV video card is taken as an example for illustration, but the performance adjustment and control method disclosed in the embodiment of the present application is also applicable to other video cards.
As shown in fig. 1, the current method for adjusting and controlling the performance of a graphics card of an electronic device includes:
S101, a controller (EC) reads the temperature of the display card from a temperature sensor outside the display card.
Illustratively, a controller (EC) is communicatively coupled to a temperature sensor external to the graphics card via, for example, a system management bus ("SMBus") and polls the temperature sensor or other device via the system management bus ("SMBus") to read the unique graphics card temperature from the temperature sensor external to the graphics card.
S102, a controller (EC) determines the Dx value of the display card according to the temperature of the display card.
And the controller determines the current Dx value of the display card based on the current temperature of the display card according to the relation between the preset temperature and the Dx value. For example, when the current temperature of the display card exceeds the upper limit temperature corresponding to D4, the controller (EC) determines to adjust the value Dx of the display card to D5, so as to reduce the performance of the display card, thereby reducing the temperature of the display card.
S103, the controller (EC) informs the BIOS to switch the Dx value of the display card.
Illustratively, the controller (EC) communicates data through 62/66IO ports. The BIOS and controller (EC) pre-define the SMI (SYSTEM MANAGEMENT Interrupt) Interrupt number, and the BIOS or more specifically the BIOS runtime services obtain the Interrupt number from the controller (EC) through the 62/66IO port. SCI interrupt is generated after the controller (EC) determines the Dx value of the display card, and the interrupt service function corresponding to the service call interrupt number is read out from the Dx value of the display card through the 62/66IO port again when the BIOS operates.
S104, the BIOS modifies the Dx value and informs the display card driver to read the Dx value.
Illustratively, a storage location in the ACPI where the Dx value is stored is specified in the internal memory (i.e., the memory), and after the BIOS reads the Dx value, the BIOS modifies the Dx value of the storage location to the latest value, and then notifies the graphics card driver to read the latest Dx value.
S105, the display card drives and reads the Dx value, and the display card is controlled according to the power consumption corresponding to the Dx value.
Specifically, the BIOS generates a SCI interrupt after modifying the Dx value, and the display card driver invokes a display card control method (ACPI) to read the current value of Dx after receiving the SCI interrupt (i.e. event notification).
And after the current value of Dx is read, controlling the performance of the display card according to the power consumption corresponding to the current value of Dx. For example, when the current Dx value is D3 and the power consumption of the corresponding graphics card is 15W, the graphics card driving controls the graphics card to limit the maximum power consumption to 15W.
The specific power consumption corresponding to the current value of Dx can be obtained from the graphics card BIOS.
Although the display card performance can be regulated and controlled by the display card performance regulating method, the display card performance can be passively controlled only according to the temperature of the display card, and the display card performance can not be actively controlled according to the scene and the requirement, in many cases, the performance can be regulated and controlled only after the temperature of equipment or the display card is too high, so that the temperature is reduced, and the experience of a user is not very good. In addition, the Dx control display card upper limit value only supports 5 steps, the adjusting range is relatively fixed, and the performance parameters of the display card cannot be adjusted according to specific scenes, so that better performance cannot be provided for users in part of scenes. For example, in a scenario where there is a large need for CPU performance (e.g., programming), adjusting the graphics card performance by Dx according to the graphics card temperature may result in a reduced graphics card performance requirement, but still occupies a large power consumption index, which may result in devices such as notebooks not providing sufficient CPU performance.
In addition, the general performance regulation and control method at present also directly sets the values of TPP & TGP & TDP in BIOS according to the conditions of heat dissipation, performance and the like when the equipment is designed, and the display card automatically regulates the performance according to the set values of TPP/TGP/TDP in the working process or drives the display card to automatically regulate the performance when the game/GPU single-baking/double-baking and the like require the GPU to have large performance, but the TPP/TGP/TDP parameters are not changed in the process, in other words, the performance parameters of the CPU and the display card are not changed according to the scene, and only the performance of the CPU and the display card is changed according to the power consumption of the chip, so the method cannot adapt to the different performance requirements of different scenes on the CPU and the display card.
In addition, at present, there is a method for controlling the performance of the display card by setting the TPP and the TGP of the display card through the WMI interface, and the method also has the advantages that the TPP, the TGP and the DB values are directly set, the dynamic adjustment can not be carried out according to the current user scene of the electronic equipment, the application range is smaller, the performance control accuracy of the display card can be influenced by the actual power of the CPU, and the method is unstable.
Based on the above reasons, the embodiment of the application provides a performance regulation and control method, by identifying the current scene of the device, setting specific parameters or Dx values of TPP, TGP and/or TDP according to the specific scene when performance regulation and control is required, so that the display card can perform performance regulation and 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, better meeting the performance requirements of users in various scenes, and relatively improving the endurance of the device, thereby improving the user experience. The performance control method provided by the embodiment of the application is described in detail below.
Fig. 2 is a schematic diagram illustrating a 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 fig. 2 is only one example of an electronic device, and that the electronic device 100 may have more or fewer components than shown in the figures, may combine two or more components, or may have a different configuration of components. The various components shown in fig. 2 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: processor 110, internal memory 122, external memory 121, embedded Controller (EC) 130, stand-alone graphics processor 140, BIOS firmware flash 150, antenna 1, wireless communication module 160, display 170, fan 180, keyboard 181, temperature sensor 190, etc.
The processor 110 is, for example, a central processing unit (central processing unit, CPU) that may include one or more processing cores. The processor 110 may further include: a controller, a memory controller, a graphics processor (graphics processing unit, GPU, integrated graphics card), etc.
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 or register.
In some embodiments, processor 110 may include an interface bus, which may include one or more interfaces. The interfaces 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 (universal serial bus, USB) interface, among others.
It should be understood that the interfacing relationship between the modules illustrated in the embodiments of the present application is only illustrative, and is not meant to limit the structure of the electronic device 100. In other embodiments of the present application, the electronic device 100 may also employ different interfacing manners in the above embodiments, or a combination of multiple interfacing manners.
The wireless communication module 160 may provide solutions for wireless communication including wireless local area networks (wireless local area networks, WLANs), such as wireless fidelity (WIRELESS FIDELITY, wi-Fi) networks, bluetooth (BT), etc., as applied to the electronic device 100. In some embodiments, the antenna 1 and the wireless communication module 160 of the electronic device 100 are coupled such that the electronic device 100 may communicate with a network and other devices through wireless communication techniques.
The electronic device 100 implements display functions through a stand-alone graphics processor (i.e., stand-alone graphics card or stand-alone GPU) 140 or a graphics processor integrated with the processor 110 (i.e., integrated graphics card or integrated GPU), the display 170, and the processor 110. Graphics Processors (GPUs) are used to perform mathematical and geometric calculations for graphics rendering. Electronic device 100 may include one or more GPUs that execute program instructions to generate or change display information.
The display 170 is used to display interfaces, images, videos, and the like. The display 170 includes a display panel.
The internal memory (or main memory) 120 may include a storage program area and a storage data area. The storage program area may store an application program (such as a sound playing function, an image playing function, etc.) required for at least one function of the operating system, etc. The storage data area may store data created during use of the electronic device 100, etc. In addition, the internal memory 120 may include a high-speed Random Access Memory (RAM), such as DDR (Double Data Rate) RAM, and more particularly may be DDR4 or DDR5 RAM. The internal memory (or main memory) 120 may be communicatively coupled to the processor 110 via a memory bus.
The external memory 121 is, for example, a solid state disk, ("SSD") or hard disk drive ("HDD") or a flash memory device, a universal flash memory (universal flash storage, UFS), or the like. The external memory 121 may be communicatively coupled to the processor 110 via a serial advanced technology attachment ("SATA") bus or a standardized interconnect (e.g., PCIe).
The Embedded Controller (EC) 130 is used to implement functions of keyboard control, touch pad, power management, fan control, and the like. The controller 130 may sample the CPU or GPU temperature through the temperature sensor 190 and then regulate the fan according to an algorithm based on the CPU or GPU temperature. The controller 130 may comprise software that runs independently and is stored on its own non-volatile medium. The temperature of the external temperature sensor read by the controller 130 is also stored in the RAM inside the controller 130. The controller 120 may be coupled to and in communication with the processor 110 via, 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 may enter a low power sleep state when no 3D program is running. While the stand-alone graphics processor 140 is asleep, the graphics rendering work of the electronic device 100 is done by the graphics processor (i.e., integrated graphics card or integrated GPU) in the processor 110. The stand-alone graphics processor 140 may be communicatively coupled to the processor 110 via a standardized interconnect (e.g., PCIe). The independent graphics processor 140 may perform performance adjustment according to Dx parameters or TPP and TGP parameters of the graphics card.
The BIOS firmware flash 150 is used to store BIOS firmware, which may be conventional BIOS firmware or UEFI-based BIOS firmware. The BISO firmware Flash memory 150 may sample a ROM (read only memory) or a Flash memory. The BIOS firmware comprises main board BIOS firmware and display card BIOS firmware.
The fan 180 is used to dissipate heat for the processor 110, the independent graphics processor 140, etc. to reduce the device temperature and ensure the operation of the apparatus. The electronic device 100 may include one or more fans 180. Illustratively, the electronic device 100 may have one fan disposed near the processor 110 and one fan disposed 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 devices of the electronic device 100, such as the processor 110, the internal memory 120, the stand-alone graphics processor 140, and the like. The electronic device 100 may include one or more temperature sensors 190. Illustratively, one or more temperature sensors 190 are disposed external to the processor 110, one or more temperature sensors are disposed external to the internal memory 120, and one or more temperature sensors 190 are disposed external to the stand-alone graphics processor 140, for example. The temperature sensor 190 may be communicatively coupled to the processor 110 or Embedded Controller (EC) 130 via, for example, a system management bus ("SMBus") to send the collected temperature to the processor 110 or Embedded Controller (EC) 130.
The software system of the electronic device 100 may employ a layered architecture, an event driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture. The embodiment of the present application exemplifies a Windows system of a layered architecture, and illustrates a software structure of the electronic device 100.
Fig. 3 is a software configuration block diagram of the electronic device 100 according to the embodiment of the present application.
The layered architecture of the electronic device 100 divides the software into several layers, each with a distinct role and division of labor. The layers communicate with each other through a software interface.
In some embodiments, windows systems are classified into a user mode and a kernel mode. The user mode comprises an application layer and a subsystem dynamic link library. The kernel mode is divided into a firmware layer, a hardware abstraction layer (hardwareabstraction layer, HAL), a kernel and a driving layer and an executing body from bottom to top.
As shown in FIG. 3, the application layer includes applications such as music, video, games, office, performance regulating software, and the like. The application layer also includes environment subsystems, scheduling engines, system support processes, service processes, and the like. Wherein only a part of application programs are shown in the figure, the application layer can also comprise other application programs, such as shopping application, browser and the like, and the application is not limited.
The environment subsystem may expose certain subsets of the basic executive services to the application in a particular modality, providing an execution environment for the application.
The scenario recognition engine may recognize a user scenario in which the electronic device 100 is located and determine a base scheduling policy (also referred to as a second scheduling policy) that matches the user scenario.
The scheduling engine may obtain the load condition of the electronic device 100, and determine an actual scheduling policy according to the actual operation condition of the electronic device 100 by combining the load condition of the electronic device 100 and the basic scheduling policy.
The performance adjustment application may perform performance adjustment on the CPU, GPU, etc. according to the user scenario in which the electronic device 100 is located. The performance tuning application may be a stand-alone application, a software module that may be integrated with other applications (e.g., a computer housekeeping), or may be integrated in a service or engine of an operating system.
The subsystem dynamic link library comprises an API module comprising Windows API, windows native API, NVAPI, etc. The Windows APIs, which can provide system call entry and internal function support for the application program, are different in that they are Windows system native APIs. For example, windows APIs may include user. Dll, kernel. Dll, and Windows native APIs may include ntdll, dll. The user. Dll is a Windows user interface, and can be used for performing operations such as creating a window, sending a message, and the like. kernel. Dll provides an interface for applications to access the kernel. ntdll.dll is an important windows nt kernel level file that describes the interface of windows local NTAPI. When Windows is started, ntdl1.Dll resides in a particular write-protected region of memory, making it impossible for other programs to occupy this memory region.
The executives include a process manager, a virtual memory manager, a secure reference monitor, an I/O manager, windows management specifications (Windows management instrumentation, WMI), a power manager, a system event driver (SYSTEM EVENT DRIVER, osEventDriver) node, a system and chip driver (operatingsystem to System on Chip, OS2 SOC) node, and the like.
The process manager is used to create and suspend 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 may execute a security policy on the local computer that protects operating system resources, performs protection and monitoring of runtime objects.
The I/O manager performs device independent input/output and further processes call the appropriate device drivers.
The power manager may manage power state changes for all devices that support power state changes.
The system event driven node may interact with the kernel and the driver layer, for example, with a graphics card driver, and after determining that a GPU video decoding event exists, report the GPU video decoding event to the scene recognition engine.
The system and chip driver nodes may be used by the scheduler engine to send adjustment information to the hardware device, such as information to adjust PLl and PL2 to the CPU.
The kernel and driver layer includes a kernel and a device driver.
The kernel is an abstraction of the processor architecture, separates the difference between the executable and the processor architecture, and ensures the portability of the system. The kernel may perform thread scheduling and scheduling, trap handling and exception scheduling, interrupt handling and scheduling, etc.
The device driver operates in kernel mode as an interface between the I/O system and the associated hardware. The device drivers may include graphics card drivers, intel DTT drivers, mouse drivers, audio video drivers, camera drivers, keyboard drivers, and the like. For example, the graphics driver may drive the GPU to run and the Intel DTT driver may drive the CPU to run.
The HAL is a core state module, which can hide various details related to hardware, such as an I/O interface, an interrupt controller, a multiprocessor communication mechanism and the like, provide uniform service interfaces for different hardware platforms running Windows, and realize portability on various hardware platforms. It should be noted that, in order to maintain portability of Windows, the Windows internal components and the device driver written by the user do not directly access the hardware, but rather by calling the routine in the HAL.
The firmware layer may include a basic input output system (basic input output system, BIOS, which is a set of programs that are embedded in a Read Only Memory (ROM) chip on the motherboard of the computer, which holds the most important basic input output programs, post-boot self-test programs, and system self-start programs of the computer, which can read and write specific information of the system settings from the complementary metal oxide semiconductor (complementary metal oxide semiconductor, CMOS). Its main function is to provide the lowest, most direct hardware setup and control for the computer.
The Intel DTT driver may send instructions to the CPU via the BIOS.
It should be noted that, the embodiment of the present application is only illustrated by a Windows system, and in other operating systems (such as an android system, an IOS system, etc.), the scheme of the present application can be implemented as long as the functions implemented by the respective functional modules are similar to those implemented by the embodiment of the present application.
It will be appreciated that the layers and components contained in the layers in the software structure shown in fig. 3 do not constitute a specific limitation on the electronic device 100. In other embodiments of the application, electronic device 100 may include more or fewer layers than shown and may include more or fewer components per layer, as the application is not limited.
Fig. 4 shows a schematic of the workflow of software and hardware when the electronic device 100 schedules resources.
As shown in fig. 4, the application layer scene recognition engine includes a system probe module, a scene recognition module, and a base policy matching manager. The scene recognition module can interact with the system probe module and the basic policy matching manager respectively. The scene recognition module may send a request to the system probe module to obtain the probe status. The system probe module may acquire the operating state of the electronic device 100. For example, the system probe modules may include a power state probe, a peripheral state probe, a process load probe, an audio video state probe, a system load probe, a system event probe, and the like.
The power state probe may subscribe to a kernel state for a power state event, determine a power state according to a callback function fed back by the kernel state, where the power state includes a battery (remaining) power, a power mode, and the like, and the power mode may include an alternating current (ALTERNATING CURRENT, AC) power and a Direct Current (DC) power. For example, the power state probe may send a request to the OsEventDriver node of the execution body layer to subscribe to a power state event, which is forwarded by the OsEventDriver node to the power manager of the execution body layer. The power manager may feed back a callback function to the power state probe through the OsEventDriver node.
The peripheral state probe can subscribe a peripheral event to the kernel state, and the peripheral event is determined according to a callback function fed back by the kernel state. Peripheral events include mouse wheel slide events, mouse click events, keyboard input events, microphone input events, camera input events, and the like.
The process load probe may subscribe to the process load from kernel states and determine the load of the process (e.g., the first process) according to the callback function fed back from kernel states.
The system load probe can subscribe the system load to the kernel state, and the system load is determined according to a callback function fed back by the kernel state.
The audio and video status probe may subscribe to the kernel mode for audio and video events, and determine the audio and video events currently existing in the electronic device 100 according to the callback function fed back by the kernel mode. The audio video events may include GPU decoding events, and the like. For example, the audio video status probe may send a request to the OsEventDriver node of the executive layer to subscribe to GPU decode events, which is forwarded by the OsEventDriver node to the graphics card driver of the kernel and driver layers. The graphics card driver can monitor the state of the GPU, and after the GPU is monitored to perform decoding operation, a callback function is fed back to the audio and video state probe through the OsEventDriver node.
The system event probe can subscribe to the kernel state for system events, and the system events are determined according to a callback function fed back by the kernel state. The system events may include window change events, process creation events, thread creation events, and the like. For example, the system event probe may send a request to the OsEventDriver node of the executive layer to subscribe to a process creation event, which is forwarded by the OsEventDriver node to the process manager. The process manager may feed back callback functions to the system event probes through the OsEventDriver node after the process is created. For another example, the system event probe may also send a subscribe to focus window change event to the API module, which may monitor whether the focus window of the electronic device 100 has changed, and when it is monitored that the focus window has changed, feed back a callback function to the system event probe.
It can be seen that the system probe module subscribes to various events of the electronic device 100 from the kernel mode, and then determines the running state of the electronic device 100 according to the callback function fed back from the kernel mode, so as to obtain the probe state. After the system probe module obtains the probe state, the probe state can be fed back to the scene recognition module. After the scene recognition module receives the probe state, the scene recognition module can determine the user scene where 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, a social scene, and the like. The user context may reflect the current use needs of the user. For example, when the scene recognition engine recognizes the focus window as a window of the video application, it determines that the electronic device 100 is in a video scene, which indicates that the user needs to view and browse the video using the video application. For another example, the scene recognition engine recognizes that the electronic device 100 is in a social scene when the focus window is recognized as a chat window of WeChat TM. The scene recognition module may also send the user scene to the base policy matching manager. The base policy matching manager may determine a base scheduling policy (which may also be referred to as a second scheduling policy, see for details the description in S301, S302 below) from the user scenario. The base policy matching manager may feed back the base scheduling policy to the scene recognition module. The scene recognition module may send the base scheduling policy and the user scene to a scheduling engine of the application layer.
As shown in fig. 4, the scheduling engine includes a load manager, a chip policy aggregator, and a scheduling executor. The load management controller can receive the basic scheduling strategy and the user scene sent by the scene identification module. The load manager may also obtain the system load from the system probe module, and adjust the basic scheduling policy according to the system load and the user scenario, to obtain an actual scheduling policy (which may also be referred to as a first scheduling policy, see the description in S310 below for details). The actual scheduling policy includes an OS scheduling policy and a first CPU power consumption scheduling policy (which may also be referred to as a first sub-policy). The load manager may send the OS scheduling policy to the scheduling executor, and the scheduling executor may schedule based on the OS scheduling policy. The OS scheduling policy is used to adjust the process priority and I/O priority of the focal process. For example, the schedule executor may send an instruction to the process manager to adjust the process priority of the focal process, in response to which the process manager adjusts the process priority of the focal process. For another example, the scheduling executor may send an instruction to the I/O manager to adjust the I/O priority of the focal process, in response to which the I/O manager adjusts the I/O priority of the focal process.
The load manager may also send a first CPU power consumption scheduling policy to the chip policy aggregator, which may obtain a second CPU power consumption scheduling policy (also referred to as a second sub-policy, see the description in S317-S325 below) based on the chip platform type of the CPU and the first CPU power consumption scheduling policy. The chip platform types of the CPU are mainly divided into two types, namely Chaowei semiconductor company(Advanced micro devices, AMD) CPU and Intel/>These two types of CPUs are different in the adjustment manner of CPU power consumption, and therefore need to be distinguished.
If the type of the chip platform of the CPU is AMD (also referred to as a first type), the scheduling executor may send an instruction to adjust EPP to the power manager to adjust EPP of the CPU. In addition, the schedule executor may also send instructions to the OS2SOC driving node to adjust PL1, PL2 to adjust PL1 and PL2 of the CPU.
If the type of the chip platform of the CPU is IntelThe scheduling executor may send the second CPU power consumption scheduling policy to the Intel DTT driver through the WMI plug-in, where the second CPU power consumption scheduling policy may include a minimum value of PL1, a maximum value of PL1, durations of PL2 and PL2, and EPP, and the CPU is operated by the Intel DTT driver based on the second CPU power consumption scheduling policy.
The performance regulation and control method provided by the embodiment of the application is mainly divided into two processes, namely: (1) determining a user scene in which the electronic device is located; (2) And determining the performance parameters of the electronic equipment according to the user scene where the electronic equipment is located. The above two processes will be respectively described below with reference to the drawings.
The following will take an example that the electronic device is in a video playing scene, and refer to fig. 5, to describe an interaction process of a part of modules in the electronic device shown in fig. 4. As shown in fig. 5, a flow of determining a user scenario where an electronic device is located in the performance adjusting method provided by the embodiment of the present application is as follows:
s501, the system probe module sends a request for subscribing to a process creation event to the OsEventDriver node.
As shown in fig. 5, the scene recognition engine includes a system probe module that includes a system event probe. In an embodiment of the present application, a request to subscribe to a process creation event may be sent by a system event probe to a OsEventDriver node located at the executable layer. Wherein the request to subscribe to a process creation event may also be referred to as a first request.
In an alternative embodiment, the request to subscribe to a process creation event may carry a process name. That is, the scene recognition engine may subscribe to only the creation events of the specified process, reducing interference of the 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 embodiments, the scenario recognition engine may not limit the subscribed process creation events.
The OsEventDriver node sends a request to the process manager to subscribe to a process creation event.
The request of the process creation event may refer to the description of S501, which is not described herein.
That is, the system event probe of the scene recognition engine may send a request to the process manager through the OsEventDriver node to subscribe to the process creation event.
It will be appreciated that the OsEventDriver node will register a callback with the process manager, the role of which is to return the process creation event to the OsEventDriver node after the process manager creates the process.
S503, the system probe module sends a request for subscribing the GPU decoding event to the OsEventDriver node.
As also shown in fig. 4, the system probe module further includes an audio-visual status probe. In the embodiment of the application, the audio and video status probe of the system probe module can send a request for subscribing the GPU decoding event to the OsEventDriver node. Wherein, the request to subscribe to the GPU decode event may also be referred to as a third request.
And S504, the OsEventDriver node sends a request for subscribing the GPU decoding event to the display card driver.
That is, the audio video status probe of the scene recognition engine may send a request to the graphics card driver through the OsEventDriver node to subscribe to GPU decode events. Similarly, the OsEventDriver node may register a callback with the graphics card driver, where the role of registering the callback is to return the GPU decoding event to the OsEventDriver node when the graphics card driver monitors that the GPU performs the decoding operation.
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 may be used to create a window. In an alternative embodiment, a request to subscribe to a focus window change event may be sent by a system event probe of the system probe module to a windows user interface of the API module. Wherein the request to subscribe to the focus window change event may also be referred to as a second request.
Likewise, the system event probe may register a callback with the API module, where the role of registering the callback is to return the focus window change event to the system event probe when the (windows user interface of the) API module monitors that the focus window has changed.
The focus window is a window with focus, and the high probability is a window which is needed to be used by a user currently. Thus, by monitoring the focus window, the user's need for use can be determined. For example, the focus window is a window of the video application, which indicates that the user needs to browse and play the video. As another example, the focus window is a window of a gaming application, indicating that the user desires to play a game. By monitoring whether the focus window changes, it can be determined whether the user's needs have changed. For example, the focus window changes from the window of the video application to the window of the game application, indicating that the user's current needs change from watching video to playing a game.
The above-mentioned steps S501, S503 and S505 are not strictly sequential, and may be sequentially performed in the order shown in fig. 5, or may be simultaneously performed, or may be sequentially performed in the order of S503, S501 and S505, sequentially performed in the order of S503, S505 and S501, sequentially performed in the order of S505, S501 and S503, or sequentially performed in the order of S505, S503 and S501. Accordingly, there is no strict order among S502, S504, and S506, as long as it is satisfied that S502 is performed after S501, S504 is performed after S503, and S506 is performed after S505, and no specific limitation is made herein.
S506, responding to the received operation of starting the video application by the user, and sending a process creation request to a process manager by the video application.
Wherein the creation process request includes a storage address of the video application.
The video application may send a request to create a process to a process manager (not shown) through the kernel32.Dll interface and the ntdll interface of the API module.
S507, the process manager creates a video application process.
Specifically, the process manager may query the binary file of the video application through the storage address. By loading the binary file of the video application program, a process running environment can be created, and the video application process is started.
Wherein the Windows operating system defines a run of an application as a process. A process may own multiple threads. A window is an example of a window structure, a graphical user interface (GRAPHICAL USER INTERFACE, GUI) resource, a window is created by a thread, and a thread can own all the windows it creates. In the embodiment of the application, when the electronic device runs the video application, the process manager needs to create a process of the video application, namely, a video application process (namely, a first process). The video application process comprises a plurality of threads, the plurality of threads comprise a thread 1, the thread 1 can be used for creating a main window of the video application, and the main window is a window integrated with all function keys of the video application.
S508, the process manager reports the process creation event to the OsEventDriver node.
Wherein the process creation event may include a name of the process created by the process manager. In the embodiment of the application, the name of the process is the name of the video application process. Of course, if the process manager creates a process of another application, the name of the process corresponds to the name of the process of the other application.
As already described above, the OsEventDriver node sent a request to the process manager to subscribe to the process creation event and registered the callback. Thus, the process manager may report a process creation event to the OsEventDriver node after creating the video application process.
And S509, osEventDriver nodes report the process creation event to the system probe module.
The description of the process creation event is S508, and is not described herein.
In the embodiment of the present application, the OsEventDriver node may report the process creation event to a system event probe of the system probe module.
S510, the system probe module sends a process creation event to the scene recognition module.
S511, in response to the call request of the thread 1, the API module creates the window 1.
After the process manager creates the video application process, the thread 1 of the video application process actively calls the windows user interface creation window 1 of the API module. For example, as shown in fig. 6 (a), the electronic device may display a window 601, where the window 601 may be a desktop, and may also be referred to as a main interface. The window 601 includes an icon 602 of a video application. The electronic device may receive an operation in which the user clicks 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 a window 603 (i.e., window 1, which may also be referred to as a first window). In the above procedure, the focus window is changed from the original window 601 to the window 603.
S512, the API module reports the focus window event to the system probe module.
In the embodiment of the present application, after creating window 1, the windows user interface of the API module may obtain the name of the first process (i.e. the focus process) and the name of the second process, where 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 last focus window (e.g. window 2). Illustratively, the process corresponding to the window 1 is a video application process (first process), the name of which is, for example, hlive. Exe, and the process corresponding to the window 2 is a process (second process) of a windows program manager, the name of which is, for example, explorer. Exe. And because the name of the first process is inconsistent with the name of the second process, the API module determines that the focus window changes, and reports a focus window event to a system event probe of the system probe module. Wherein the focus window change event includes the name of the first process (i.e., the focus process). Illustratively, the first process is a video application process, and the focus window change event carries a name of the video application process.
Note that, in the case where the electronic device has already started the video application, the electronic device may not execute S506 to S511. After the system probe module sends a request for subscribing 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 that the focus window changes 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.
S514, the scene recognition module determines that the type to which the first process belongs is a video type.
The electronic device may be preconfigured 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 a type to which the first process belongs. The application list comprises the process name of each application and the type of the application. By way of example, the application list may be as shown in Table 1:
TABLE 1
Application of Process name Type(s)
Glory video hlive.exe Video class
word word.exe Office class
Shooting game shot.exe Game class
WeChat TM wechat.exe Social class
…… …… ……
For example, the name of the first process is hlive. Exe, the scene recognition module may determine that the type to which the first process belongs is a video class. For another example, the name of the first process is wechat. Exe, the scene recognition module may determine that the type to which the first process belongs is a social class. It should be noted that, table 1 is only used as an example, and in fact, table 1 may further include process names of more applications and types to which the process names belong.
It should be noted that the purpose of this step is to primarily determine the user scenario in which the electronic device is located. The user scene in which the electronic device is located may include a video scene, a game scene, a social scene, an office scene, a browser scene, and so forth. The video scene further comprises a video playing scene and a video browsing scene. The social scenes may further include text chat scenes, voice chat scenes, video chat scenes, and so on. The office scenes further may include document editing scenes, document browsing scenes, video conferencing scenes, and the like. The browser scene may include a browse web scene, a play video scene, and the like.
In this step, the type of the user scene where the electronic device is located may be determined by the type to which the first process belongs. For example, if the type to which the first process belongs is determined to be a video class, it may be determined that the electronic device is in a video scene; for another example, if it is determined that the type to which the first process belongs is a game class, it may be determined that the electronic device is in a game scene. In order to further analyze the user requirements, the scene recognition module may further analyze the specific scene where the electronic device is located by combining other parameters (such as a peripheral event, a GPU running state, etc.), so as to achieve an effect that the analysis result is more accurate, and the specific content is described in the following text.
And S515, in response to receiving the operation of playing the video by the user, the video application sends a video playing instruction to the API module.
Specifically, the video application may send the video play instruction to the DirectX API of the API module. The video play instruction may include a cache address of the video.
S516, 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 playing instruction.
S517, the API module sends a decoding instruction to the display card driver.
S518, the display card drives to send a starting instruction to the GPU.
S519, the GPU decodes.
Specifically, the GPU may perform decoding operations on the video file via the GPU video processing engine.
S520, the GPU reports the decoding event to the display card driver.
S521, the display card driver reports the decoding event to the OsEventDriver node.
And the OsEventDriver node reports the decoding event to the system probe module.
Specifically, the OsEventDriver node reports the decoding event to an audio/video status probe of the system probe module.
S523, the system probe module sends a decoding event to the scene recognition module.
S524, the scene recognition module sends an instruction 1 to the system probe module.
The instruction 1 indicates the system probe module to acquire the GPU occupancy rate of the first process. The instruction 1 may carry the name of the first process.
S525, the system probe module sends a request for acquiring the GPU occupancy rate of the first process to the process manager.
Wherein the request for obtaining the GPU occupancy of the focal process may include the name of the first process.
In an alternative embodiment, a request to obtain the GPU occupancy of the first process may be sent by an audio video status probe of the system probe module to the process manager.
S526, the process manager collects the GPU occupancy rate of the first process.
Specifically, the process manager may collect the GPU occupancy of the first process through a graphics card driven graphics core (GRAPHICS KERNEL) interface.
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 of the first process to the audio-video status probe of the system probe module.
S528, the system probe module sends the GPU occupancy rate of the first process to the scene recognition engine.
S529, the scene recognition module judges whether the GPU occupancy rate of the first process is larger than 0.
If the GPU occupancy rate of the first process is greater than 0, S130 is executed.
Whether the first process uses the GPU in the running process can be determined through the GPU occupancy rate of the first process, and if the GPU occupancy rate of the first process is greater than 0, the first process can be considered to use the GPU in the running process; if the GPU occupancy rate of the first process is 0, the first process is indicated to not use the GPU in the running process.
S530, the scene recognition module sends an instruction 2 to the system probe module.
Wherein instruction 2 instructs the system probe module to acquire the GPU engine of the first process. The instruction 2 may carry the name of the first process.
S531, the system probe module sends a request for acquiring the GPU engine of the first process to the process manager.
The audio and video status probe of the system probe module can send a request for acquiring the GPU engine of the first process to the process manager. The request to acquire the GPU engine of the first process includes the name of the first process.
The GPU engines comprise a GPU 3D engine, a GPU copy engine, a GPU video encoding engine and a GPU video processing engine. Wherein the GPU 3D engine is mainly responsible for processing 2D or 3D graphics. The GPU copy engine is mainly used for transmitting data. The GPU video encoding engine is mainly used for encoding operation. The GPU video processing engine performs mainly decoding operations. In some embodiments, GPU video processing engines may also be replaced by GPU video decoding engines.
S532, the process manager obtains the GPU engine of the first process.
Specifically, the process manager may obtain the GPU engine of the first process through the GRAPHICS KERNEL interface driven by the graphics card.
S533, the process manager sends a message 1 to the system probe module, wherein the message 1 indicates that the GPU engine of the first process is GPU video processing engines.
Specifically, the process manager may send the message to an audio/video status probe of the system probe module, and then forward the message to the scene recognition module by the audio/video status.
S534, the system probe module sends a message 1 to the scene recognition module.
S535, the scene recognition module judges whether the GPU engine of the first process is GPU video processing engines.
If the GPU engine of the first process is GPU video processing engines, then executing S529; if the GPU engine of the first process is not GPU video processing engines, then S530 is performed.
In step S514, the scene recognition engine has determined that the type to which the first process belongs is a video class, i.e., can determine that the electronic device is in a video scene. Through step S535, the scene recognition engine may determine a specific operation performed by the first process through the GPU, and further determine a specific operation of the user using the video application. For example, if the GPU engine of the first process is GPU video processing, it indicates that the first process is using the GPU to perform decoding operation, and the user can be considered to play video using the video application. For another example, if the GPU engine of the first process is not GPU video processing, it indicates that the first process is not using the GPU to perform decoding operations, then the user has a high probability of browsing video resources on the video application, and not yet playing video.
S536, the scene recognition module determines that the user scene is a video playing scene according to the process information of the first process.
The process information of the first process comprises 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 a GPU engine used by the first process.
In summary, if the type of the first process (focus process) is a video type, the GPU occupancy rate of the first process is greater than 0, and the GPU engine of the first process is GPU video processing, it can be determined that the electronic device is in a video playing scene.
The above-described S501 to S536 will be described by taking a video playing scene in which the electronic device is in a video scene as an example. Indeed, the electronic device may also be in other user scenarios (e.g., gaming scenarios, office scenarios, social scenarios, video browsing scenarios, programming scenarios, etc.).
In an alternative embodiment, if the scene recognition engine determines that the type of the first process (focus process) belongs to the game class, the power mode of the CPU is changed to the 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 may be determined that the electronic device is in the game scene.
Wherein the power state probes of the system probe module may send a request to the power manager to subscribe to a power mode change event. The power manager may report the power mode change event to a power state probe of the system probe module when the power module transitions to a game mode (game mode). As such, the scene recognition engine can determine whether the power mode of the CPU is a game mode through the power mode change event.
In addition, the process of the scene recognition engine obtaining the type of the first process may refer to S501, S502, S505, S506 to S514 in fig. 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 refers to S524 to S535. The difference is that the video application is replaced with a game application, and the description thereof is omitted.
Next, a flow of determining a user scenario where the electronic device is located when the electronic device is in an office scenario will be briefly described with reference to fig. 7. It should be noted that, the principle and flow of the flowchart shown in fig. 7 and the flowchart shown in fig. 5 are basically detailed, and only the differences between the two are specifically described below, and the details of the differences are not described in detail, and refer to the description of the related steps in fig. 5. Fig. 7 shows a flow of determining a user scenario where an electronic device is located according to an embodiment of the present application, where the flow is as follows:
s701, the system probe module sends a request for subscribing to a process creation event to the OsEventDriver node.
The S702, osEventDriver node sends a request to the process manager to subscribe to a process creation event.
S703, the system probe module sends a request for subscribing the peripheral event to the OsEventDriver node.
As shown in fig. 4, the system probe module further includes a peripheral status probe. In the embodiment of the application, a request for subscribing to the peripheral event can be sent to the OsEventDriver node by a peripheral state probe of the system probe module. Wherein the request to subscribe to a peripheral event may also be referred to as a fourth request.
The external events comprise mouse wheel sliding, mouse clicking, keyboard input, camera input, microphone input and the like.
The S704, osEventDriver node sends a request to the peripheral driver to subscribe to a peripheral event.
The peripheral driver is a generic term for driving all peripheral devices, and may include, for example, a mouse driver, a keyboard driver, a camera driver, a microphone driver, and the like.
S705, the system probe module sends a request for subscribing to the focus window change event to the API module.
S706, responding to the operation of receiving the user opening the office application, and sending a request for creating the office application process to the process manager by the office application.
Wherein the request to create the office application process may include a storage address of the office application program.
S707, the process manager creates an office application process.
Specifically, the process manager may query the binary file of the office application through the storage address. By loading the binary file of the office application program, a process running environment can be created, and the video application process is started. In addition, the office application process includes thread 2, thread 2 being available to create a main window of the office application.
S708, the process manager reports a process creation event to the OsEventDriver node.
The S709 and OsEventDriver nodes report the process creation event to the system probe module.
Wherein 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.
S711, responding to the call request of the thread 2, and creating an office application window by the API module.
S712, 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 appreciated that in the embodiment of the present application, the first process is an office application process.
S713, the system probe module sends a focus window event to the scene recognition module.
S714, the scene recognition module determines that the type to which the first process belongs is an office class.
For example, the name of the first process is word. Exe, it may be determined that the type to which the first process belongs is an office class.
S715, responding to the operation of the user on the peripheral, and detecting a peripheral event by the peripheral driver.
And S216, the peripheral driver reports a peripheral event to the OsEventDriver node.
The S717, osEventDriver node sends a peripheral event to the system probe module.
S718, the system probe module sends a peripheral event to the scene recognition module.
S719, the scene recognition module determines the user scene according to the type of the peripheral event and the first process.
In an alternative embodiment, if the scene recognition engine determines that the type of the first process (focus process) belongs to an office class and the peripheral event is a mouse wheel sliding event or a clicking event, it may be determined that the electronic device is specifically in a document browsing scene under the office scene. Or if the scene recognition engine determines that the type of the first process (focus process) belongs to an office class, and the mouse wheel sliding event, the mouse click event and the keyboard input event are not received again within a preset time (for example, 10 seconds) after the keyboard input event is received, it may be determined that the electronic device is specifically in a document browsing scene under the office scene.
In an alternative embodiment, if the scene recognition engine determines that the type of the first process (focus process) belongs to an office class and receives a keyboard input event, it may determine that the electronic device is specifically in a document editing scene in the office scene.
In an alternative embodiment, if the scene recognition engine determines that the type of the first process (focus process) belongs to an office class and receives a camera input event (i.e., the camera is in an on state and there is a video stream input), it may be determined that the electronic device is specifically in a video conference scene under the office scene.
The electronic device may also be in a social context. The social scene comprises three specific scenes, namely: text chat scene, voice chat scene and video chat scene. The principle of judging that the electronic device is in the social scene is similar to the principle of judging that the electronic device is in the office scene, and is not described herein, and only the conditions which need to be met when judging that the electronic device is in the social scene are described below.
In an alternative embodiment, if the scene recognition engine determines that the type of the first process (focus process) belongs to the social class and receives the keyboard input event, it may determine that the electronic device is specifically in a text chat scene under the social scene.
In an alternative embodiment, if the scene recognition engine determines that the type of the first process (focus process) belongs to the social class, and the microphone input event is received and the camera is in the off state, it may be determined that the electronic device is specifically in a voice chat scene under the social scene.
In an alternative embodiment, if the scene recognition engine determines that the type of the first process (focus process) belongs to the social class and receives a microphone input event and a camera input event, it may determine that the electronic device is specifically in a video chat scene under the social scene.
The above description describes how to identify a user scene where an electronic device is located, after determining the user scene where the electronic device is located, the electronic device may further determine whether performance adjustment is required according to the user scene where the electronic device is located, and when performance adjustment is required, specific parameter values or Dx values of TPP, TGP and/or TDP are set according to the user scene where the electronic device is located, so that a graphics card performs performance adjustment according to current TPP, TGP and/or TDP parameters or Dx values, thereby providing more reasonable CPU and GPU performance according to the scene, not only better meeting performance requirements of users in various scenes, but also relatively improving endurance of the device, and thus improving user experience.
Fig. 8 is a flowchart of a performance adjustment method according to an embodiment of the present application.
As shown in fig. 8, the performance adjustment method provided by the embodiment of the present application specifically includes:
in step S801, the scene recognition engine determines a user scene of the electronic device, and sends scene information to the performance adjustment application.
The scene information is used for indicating a user scene where the electronic equipment is located. For example, the electronic device may pre-assign unique identifiers to different user scenarios, and the scenario information may include the unique identifiers of the user scenarios. For example, the identification (e.g., V01) may indicate that the electronic device is in a video playback scene. For another example, the identification (e.g., V02) may indicate that the electronic device is in a video browsing scenario.
Regarding the process of determining the user scene where the electronic device is located by the scene recognition module, refer to S501 to S536 specifically, and are not described herein again.
In step S802, the performance adjustment application determines parameter values of performance parameters according to the scene information.
Wherein the performance parameters include a first performance parameter and a second performance parameter. 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. The second performance parameter includes a Dx value for the GPU.
Illustratively, in the embodiment of the present application, the performance requirements of various user scenarios may be predetermined through testing, for example, the performance required by an office scenario may be determined through testing, and the parameter value of the first performance parameter in the office scenario may be determined according to the performance, for example, 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 may be determined.
Illustratively, in embodiments of the present application, the performance requirements in each scenario may be determined by building a user dynamic test model. The dynamic test model can be used for determining CPU performance, GPU performance and the like when the electronic equipment runs various types of applications, so that the performance requirements of the electronic equipment in various scenes are determined based on the data, and further, specific numerical values of first performance parameters in various scenes are determined based on the performance requirements.
By adopting different first performance parameters in various scenes, the electronic equipment can ensure the smooth operation of the current application and simultaneously reduce the power consumption of the equipment. For example, when the electronic device is in an office scenario, for example, because the performance requirement is low, the low TGP, TDP, TPP and DB values can be set, so that the power consumption of the device is reduced and the cruising time of the device is prolonged while the smooth running of the office application is ensured. When the electronic equipment is in a game scene, a performance test scene and a 3D rendering scene, the GPU performance requirement is larger, and then TPP, DB, TGP values can be larger, so that higher performance can be provided for the GPU, and the game running requirement is met. When the electronic equipment is in a programming scene, the CPU performance requirement is larger, the GPU performance requirement is smaller, the TPP is larger, the TGP and DB values are smaller, thereby meeting the programming requirement and reducing the equipment power consumption. In other words, in the embodiment of the application, the parameter value of the first performance parameter is dynamically adjusted according to the scene where the electronic equipment is located, so that the smooth operation of the application is ensured, the power consumption of the equipment is reduced, and the endurance of the equipment is prolonged. Compared with the existing regulation and control mode of setting TDP, TGP or TPP values when the electronic equipment leaves the factory, the method can better meet the performance requirements of the application, reasonably distributes CPU power consumption and GPU power consumption according to specific application, and improves user experience.
It should be appreciated that for electronic devices, the TPP is generally designed to have an upper limit based on processor performance and heat dissipation, and in embodiments of the present application the specific value set TPP, TDP, TGP according to the electronic device is set within the upper limit of the TPP. For example, the maximum TPP of the electronic device is 90W, the TPP may be set to 30W in a scenario where the performance requirement is low. In a scenario where performance needs to be large, the TPP may be set to a large value of 60W, 70W, or even 90W. And when the CPU performance requirement is larger, the TDP is larger, and when the GPU performance requirement is larger, the TGP is larger. Compared with the current performance regulation mode based on TGP, TDP, TPP, the CPU and GPU power consumption can be allocated more flexibly. The method is characterized in that the current regulation and control mode is adopted, TPP is generally set to be 60W, TDP is set to be 25W, TGP is set to be 35W, performance is automatically regulated by a processor based on TPP, TGP, TDP according to requirements, and the mode cannot reasonably distribute CPU and GPU power consumption according to requirements due to the fact that TDP and TGP are set. By adopting the mode of the embodiment, the TGP can be set to 40W and the TDP can be set to 20W in the scene of larger GPU performance requirement and smaller CPU performance requirement, so that the performance requirement of the application can be better met.
It should also be understood that a typical electronic device is configured with an equalization mode and a performance mode in which the performance parameter upper limit is different, and 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 equipment is in the balanced mode, parameter values of the first performance parameters in each user scene are set in the upper limit value of the first performance parameters in the balanced mode. For example, if the TGP upper limit is 50W in the performance mode and the TGP upper limit is 30W in the equalization mode, the TGP value of each user scene is set within the upper limit of 50W in the performance mode and the TGP value of each user scene is set within the upper limit of 30W in the equalization mode.
Further, in an embodiment of the present application, the performance requirements of various user scenarios may be predetermined by testing, for example, determining the performance required for an office scenario by testing, and determining the parameter value of the second performance parameter in the office scenario according to the performance. The performance of the GPU can be adjusted more finely by adjusting the first performance parameter, and more reasonable performance is provided for the GPU. GPU performance may be adjusted more or more quickly by adjusting the second performance parameter to rapidly reduce (or increase) GPU performance.
It should be noted that in the embodiment of the present application, the first performance parameter or the second performance parameter may be adjusted according to the needs of the user scenario.
In an alternative embodiment, the default Dx is set to D1 (maximum GPU power consumption) and GPU performance is adjusted by adjusting the first performance parameter when a user scene changes.
In an alternative embodiment, when the GPU performance required by the user scene is small, the Dx value may be adjusted to D4 or D5 to directly limit the GPU performance to a smaller value, thereby extending the device endurance.
In an alternative embodiment, the device is enabled to provide greater GPU and CPU performance by adjusting the first performance parameter as the performance requirements of the current user scene increase relative to the performance requirements of the previous user scene.
In an alternative embodiment, when the remaining battery power of the electronic device is insufficient, for example, less than a set percentage (for example, less than 20%), the Dx value is adjusted to D4 or D5, so as to directly limit the GPU performance to a smaller value, thereby prolonging the device endurance.
In an alternative embodiment, when the temperature of the electronic device is too high, for example, greater than a set threshold (e.g., greater than 90 ℃), the Dx value is adjusted to D4 or D5 to directly limit the GPU performance to a smaller value, thereby extending the device endurance.
It should be noted that the temperature of the electronic device includes a CPU temperature, a GPU temperature, a motherboard temperature, and the like, and that the temperature of the electronic device is too high refers to that one or more of the CPU temperature, the GPU temperature, the motherboard temperature, and the like is too high.
In step S803, the performance adjustment application sends the parameter value of the performance parameter to the BIOS through the WMI interface.
After determining the parameter value of the performance parameter in the aforementioned step S802, the performance control application invokes the WMI interface to send the parameter value of the performance parameter to the BIOS.
In step S804, the BIOS writes the parameter value of the performance parameter into the location indicated by the ACPI, and notifies the GPU driver to read the parameter value of the performance parameter.
Illustratively, a storage location in the internal memory (i.e., the memory) is specified in the ACPI, where the first performance parameter and the second performance parameter are stored, and after the BIOS obtains the parameter values of the first performance parameter and the second performance parameter, the BIOS modifies the performance parameter of the storage location to the latest value, and then notifies the GPU driver to read the latest performance parameter 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.
In step S805, the GPU driver reads the parameter value of the performance parameter, and adjusts and controls the performance of the GPU according to the parameter value of the performance parameter.
Specifically, the BIOS generates an SCI interrupt after modifying the value of the performance parameter of the graphics processor, and the graphics driver invokes a graphics control method (ACPI) to read the current value of the performance parameter of the graphics processor after receiving the SCI interrupt (i.e., event notification).
And after the performance parameters are read, regulating and controlling the performance of the graphics processor according to the performance parameters. For example, after the current value of Dx is read, the performance of the display card is controlled according to the power consumption corresponding to the current value of Dx. For example, when the current Dx value is D3 and the power consumption of the corresponding graphics card is 15W, the GPU driver controls the graphics card to limit the maximum power consumption to 15W. For another example, after reading the current value of TGP, TDP, TPP, DB, the graphics card performance is controlled according to the current value of TGP, TDP, TPP, DB.
It should be noted that, when the graphics card performance is controlled according to the current value of TGP, TDP, TPP, 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, DB value.
Illustratively, for example, with a current TGP of 40W, a TDP of 30W, a TPP of 70W, and a DB of 15W, the GPU driver may limit the GPU power consumption to between 25W (40-15) and 55W (40+15) with more CPU real power consumption. 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, the maximum GPU power consumption of 55W can be provided. For example, when the actual power consumption of the CPU is 30W, the GPU power consumption can be adjusted within 25W, that is, the maximum GPU power consumption of 25W can be provided, so that sufficient CPU performance can be ensured to be provided.
The following describes a performance adjustment method according to an embodiment of the present application with reference to fig. 9 and 10.
FIG. 9 is an exemplary tuning process of a performance tuning method provided by an embodiment of the application.
As shown in fig. 9, an exemplary regulation process of the performance regulation method provided by the embodiment of the present application includes:
In step S901, in response to the operation for starting the first application, the first performance parameter of the electronic device is a first parameter value before the first application is started.
Illustratively, 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, DB power consumption of the GPU.
The first parameter value may be a set of parameters including a specific value of TDP, TPP, TGP, DB. The first parameter value is, for example, TDP30W, TPP, 70, W, TGP, 40W, DB15W. By reducing TGP and DB, the GPU performance can be made efficient, allowing the device to provide adequate CPU performance.
In step S902, the scene recognition engine determines that the electronic device is in a first user scene according to the first application.
Illustratively, the first user scenario is a programming scenario. Regarding the process of determining the user scene where the electronic device is located by the scene recognition module, refer to S501 to S536 specifically, and are not described herein again.
In step S903, the scene recognition engine determines to send the first scene information to the performance tuning application.
For example, the electronic device may pre-assign unique identifiers to different user scenarios, and the scenario information may include the unique identifiers of the user scenarios.
In step S904, at a first time point, the performance adjustment application adjusts the first performance parameter to a second parameter value according to the first scenario information, the second parameter value being different from the first parameter value.
The second parameter value may be a set of parameters including the specific value of TDP, TPP, TGP, DB. The second parameter value being different from the first parameter value means that there is a corresponding difference in at least one parameter from the first parameter value and the second parameter value. For example, the TGP value in the first parameter value and the TGP value in the second parameter value are different.
The second parameter value is, for example, TDP30W, TPP60W, TGP W, DB5W.
By reducing TGP and DB, the GPU performance can be made efficient, allowing the device to provide adequate CPU performance.
In step S905, the performance adjustment application sends the second parameter value to the BIOS through the WMI interface.
In step S906, the BIOS writes the second parameter value to the location of the ACPI finger, and notifies the GPU driver to read the second parameter value.
Specifically, the BIOS writes the second parameter value to a storage location of the first performance parameter of the ACPI finger and notifies the GPU driver to read the second parameter value.
In step S907, the GPU driver reads the second parameter value, and adjusts the performance of the GPU according to the second parameter value.
The process of the GPU reading the second parameter value is described in S805, and will not be described in detail herein.
Step S908, a second application is launched in response to the operation for operation.
Illustratively, the second application is a gaming application, such as a 3A large game.
In step S909, the scene recognition engine determines that the electronic device is in a second user scene according to the second application.
Illustratively, the second user scenario is a game scenario. Regarding the process of determining the user scene where the electronic device is located by the scene recognition module, refer to S501 to S536 specifically, and are not described herein again.
In step S910, the scene recognition engine determines to send the second scene information to the performance tuning application.
For example, the electronic device may pre-assign unique identifiers to different user scenarios, and the scenario information may include the unique identifiers of the user scenarios.
In step S911, at a second point in time, the performance tuning application adjusts the first performance parameter to a third parameter value according to the second scenario information, the third parameter value being different from the second parameter value.
The third parameter value may be a set of parameters including the specific value of TDP, TPP, TGP, DB. The third parameter value being different from the second parameter value means that there is a corresponding difference in at least one parameter from the third parameter value and the second parameter value. For example, the TGP value in the third parameter value and the TGP value in the second parameter value are different.
The third parameter value is, for example, TDP30W, TPP, 80, W, TGP, 50W, DB15W. By increasing TGP and DB, the electronic device may provide sufficient GPU performance, enhancing the gaming experience.
In step S912, the performance tuning application sends the third parameter value to the BIOS through the WMI interface.
In step S913, the BIOS writes the third parameter value to the location of the ACPI finger, and notifies the GPU driver to read the second parameter value.
Specifically, the BIOS writes the third parameter value to a storage location of the first performance parameter of the ACPI finger and notifies the GPU driver to read the third parameter value.
In step S914, the GPU driver reads the third parameter value, and adjusts the performance of the GPU according to the third parameter value.
The process of the GPU reading the third parameter value is described in S805, and will not be described in detail herein.
FIG. 10 is a further example tuning process of a performance tuning method provided by an embodiment of the application.
As shown in fig. 10, an exemplary regulation process of the performance regulation method provided by the embodiment of the present application includes:
In step S1001, in response to the operation for starting the third application, the second performance parameter of the electronic device is a fourth parameter value before starting the third application.
Illustratively, 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 for the GPU. The fourth parameter value is illustratively D1.
In step S1002, the scene recognition engine determines that the electronic device is in a third scene according to the third application.
Illustratively, the third user scene is an office scene. Regarding the process of determining the user scene where the electronic device is located by the scene recognition module, refer to S501 to S536 specifically, and are not described herein again.
In step S1003, the scene recognition engine determines to send the third scene information to the performance tuning application.
For example, the electronic device may pre-assign unique identifiers to different user scenarios, and the scenario information may include the unique identifiers of the user scenarios.
In step S1004, at a third time point, the performance adjustment application adjusts the second performance parameter to a fifth parameter value according to the third scenario information, the fifth parameter value being different from the fourth parameter value.
The fifth parameter value is, for example, D4 or D5. The GPU performance requirement is lower in office scenes, so that the GPU performance can be directly limited by adjusting the Dx value, and the equipment endurance is improved.
In step S1005, the performance tuning application sends the fifth parameter value to the BIOS through the WMI interface.
In step S1006, BIOS writes the fifth parameter value to the location of the ACPI finger and informs the GPU driver to read the fifth parameter value.
Specifically, the BIOS writes the fifth parameter value to a storage location of the second performance parameter of the ACPI finger and notifies the GPU driver to read the fifth parameter value. The storage location of the second performance parameter may be the same as or different from the storage location of the first performance parameter.
In step S1007, the GPU driver reads the fifth parameter value, and adjusts the performance of the GPU according to the fifth parameter value.
The process of the GPU reading the fifth parameter value is described in S805, and will not be described in detail herein.
Step S1008, a fourth application is started in response to the operation for operation.
Illustratively, the fourth application is a gaming application, such as a 3A large game
In step S1009, the scene recognition engine determines that the electronic device is in a fourth user scene according to the fourth application.
Illustratively, the fourth user scenario is a game scenario. Regarding the process of determining the user scene where the electronic device is located by the scene recognition module, refer to S501 to S536 specifically, and are not described herein again.
In step S1010, the scene recognition engine determines to send fourth scene information to the performance tuning application.
For example, the electronic device may pre-assign unique identifiers to different user scenarios, and the scenario information may include the unique identifiers of the user scenarios.
In step S1011, at a fourth time point, the performance adjustment application adjusts the second performance parameter to a sixth parameter value according to the fourth scenario information, the sixth parameter value being different from the fifth parameter value.
Illustratively, the sixth parameter value is, for example, D1.
In step S1012, the performance tuning application sends the sixth parameter value to the BIOS through the WMI interface.
In step S1013, the BIOS writes the fifth parameter value to the location of the ACPI finger, and notifies the GPU driver to read the fifth parameter value.
Specifically, the BIOS writes the fifth parameter value to a storage location of the second performance parameter of the ACPI finger and notifies the GPU driver to read the fifth parameter value.
In step S1014, the GPU driver reads the fifth parameter value, and adjusts the performance of the GPU according to the fifth parameter value.
The process of the GPU reading the fifth parameter value is described in S805, and will not be described in detail herein.
It will be appreciated that the electronic device, in order to achieve the above-described functions, includes corresponding hardware and/or software modules that perform the respective functions. The present application can be implemented in hardware or a combination of hardware and computer software, in conjunction with the example algorithm steps described in connection with the embodiments disclosed herein. Whether a function is implemented as hardware or computer software driven hardware depends upon the particular application and design constraints imposed on the solution. Those skilled in the art may implement the described functionality using different approaches for each particular application in conjunction with the embodiments, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In one example, FIG. 11 shows a schematic block diagram of an apparatus 300 of an embodiment of the application. The apparatus 300 may include: processor 301 and transceiver/transceiving pin 302, optionally, also include memory 303.
The various components of the apparatus 300 are coupled together by a bus 304, where the bus 304 includes a power bus, a control bus, and a status signal bus in addition to a data bus. For clarity of illustration, however, the various buses are referred to in the figures as bus 304.
Alternatively, the memory 303 may be used for instructions in the method embodiments described above. The processor 301 may be used to execute instructions in the memory 303 and control the receive pins to receive signals and the transmit pins to transmit signals.
The apparatus 300 may be an electronic device or a chip of an electronic device in the above-described method embodiments.
All relevant contents of each step related to the above method embodiment may be cited to the functional description of the corresponding functional module, which is not described herein.
The steps of a parameter monitoring method provided in the foregoing embodiments of the present application may also be performed by a chip system included in the electronic device 100, where the chip system may include a processor. The chip system may be coupled to a memory such that the chip system, when running, invokes a computer program stored in the memory, implementing the steps performed by the electronic device 100 described above. The processor in the chip system can be an application processor or a non-application processor.
The above embodiments are only for illustrating the technical solution of the present application, and not for limiting the same; although the application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the application.

Claims (10)

1. A performance tuning method, applied to an electronic device, the electronic device including a central processing unit CPU and a graphics processing unit GPU, the method comprising:
Starting a first application in response to user operation, wherein before the first application is started, a first performance parameter of the electronic device is a first parameter value, and the first performance parameter comprises 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;
after the first application is started, 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;
responding to user operation, closing the first application, and starting a second application;
after the second application is started, at a second point in time, the first performance parameter of the electronic device is adjusted to a third parameter value, which is different from the second parameter value.
2. The performance tuning method of claim 1, further comprising:
In response to a user operation, starting a third application, wherein before the third application is started, a second performance parameter of the electronic device is a fourth parameter value, and the second performance parameter comprises a Dx value of the GPU;
After the third application is started, at a third point in time, adjusting a second performance parameter of the electronic device to a fifth parameter value, the fifth parameter value being different from the fourth parameter value;
Responding to the user operation, closing the third application, and starting a fourth application;
After the fourth application is started, at a fourth point in time, the second performance parameter of the electronic device is adjusted to a sixth parameter value, which is different from the fifth parameter value.
3. The performance tuning method of claim 1, further comprising:
Before a fifth point in time, a second performance parameter of the electronic device is a seventh parameter value, the second performance parameter comprising a Dx value of the GPU, the fifth point in time being after the first point in time and/or the second point in time;
At a fifth point in time, adjusting a second performance parameter of the electronic device to an eighth parameter value, the eighth parameter value being different from the seventh parameter value;
The remaining battery power of the electronic equipment at a fifth time point is smaller than the remaining battery power at the first time point and/or the second time point, and the electronic equipment is not plugged in at the fifth time point; or alternatively
The temperature of the electronic device at the fifth point in time is greater than the temperature at the first point in time and/or the second point in time.
4. A performance tuning method according to any one of claims 1-3, further comprising:
determining a user scene of the electronic equipment according to the first application, and determining the magnitude of the second parameter value according to the user scene of the electronic equipment;
and determining a user scene of the electronic equipment according to the second application, and determining the magnitude of the third parameter value according to the user scene of the electronic equipment.
5. The performance tuning method of claim 1, further comprising:
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;
And sending the third parameter value to the GPU driver, wherein the GPU driver controls the performance of the GPU according to the third parameter value.
6. The performance tuning method of claim 5, wherein the electronic device further comprises 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, and the GPU driver comprises:
transmitting the second parameter value to the BIOS through a WMI interface;
the BIOS writes the second parameter value into a first performance parameter storage position appointed 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, and the GPU driver comprises:
Transmitting the third parameter value to the BIOS through a WMI interface;
the BIOS writes the third parameter value into a first performance parameter storage position appointed by the ACPI, and reads the third parameter value through the GPU driver;
And the GPU driver reads the third parameter value and controls the performance of the GPU according to the second parameter value.
7. The performance tuning method of claim 2, wherein the method further comprises:
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;
And sending the sixth parameter value to the GPU driver, wherein the GPU driver controls the performance of the GPU according to the sixth parameter value.
8. The performance tuning method of claim 7, wherein the electronic device further comprises BIOS and ACPI,
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, and the GPU driver comprises:
transmitting the fifth parameter value to the BIOS through a WMI interface;
the BIOS writes the fifth parameter value into a second performance parameter storage position appointed by the ACPI, and reads the fifth 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, the GPU driver controlling performance of the GPU according to the sixth parameter value, comprising:
transmitting the sixth parameter value to the BIOS through a WMI interface;
The BIOS writes the sixth parameter value into a second performance parameter storage position appointed by the ACPI, and reads the sixth parameter value through the GPU driver;
And the GPU driver reads the sixth parameter value and controls the performance of the GPU according to the sixth parameter value.
9. An electronic device, comprising: a memory and a processor, the memory and the processor coupled; the memory stores program instructions that, when executed by the processor, cause the electronic device to perform the performance tuning method of any one of claims 1-8.
10. A computer readable storage medium comprising a computer program, characterized in that the computer program, when run on an electronic device, causes the electronic device to perform the performance tuning method according to any one of claims 1-8.
CN202211345647.9A 2022-10-31 2022-10-31 Performance regulating and controlling method and electronic equipment Pending CN117950935A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202211345647.9A CN117950935A (en) 2022-10-31 2022-10-31 Performance regulating and controlling method and electronic equipment
PCT/CN2023/116072 WO2024093491A1 (en) 2022-10-31 2023-08-31 Performance regulation method and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211345647.9A CN117950935A (en) 2022-10-31 2022-10-31 Performance regulating and controlling method and electronic equipment

Publications (1)

Publication Number Publication Date
CN117950935A true CN117950935A (en) 2024-04-30

Family

ID=90790960

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211345647.9A Pending CN117950935A (en) 2022-10-31 2022-10-31 Performance regulating and controlling method and electronic equipment

Country Status (2)

Country Link
CN (1) CN117950935A (en)
WO (1) WO2024093491A1 (en)

Family Cites Families (6)

* Cited by examiner, † Cited by third party
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
CN108628652B (en) * 2018-03-13 2023-02-28 Oppo广东移动通信有限公司 User interface rendering method and device and terminal
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
CN115599513B (en) * 2022-04-07 2023-11-03 荣耀终端有限公司 Resource scheduling method and electronic equipment

Also Published As

Publication number Publication date
WO2024093491A1 (en) 2024-05-10

Similar Documents

Publication Publication Date Title
CN115599513B (en) Resource scheduling method and electronic equipment
TWI599960B (en) Performing power management in a multicore processor
US9600330B2 (en) Method and system for regulation and control of a multi-core central processing unit
RU2624563C2 (en) Operational performance control of the solid-state storages
US8752060B2 (en) Multi-CPU domain mobile electronic device and operation method thereof
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
DE102009045953B4 (en) System and method for utilizing resources in an information handling system
US11467650B2 (en) Selecting a low power state in an electronic device
WO2014065970A1 (en) Modal workload scheduling in a hetergeneous multi-processor system on a chip
EP2972826B1 (en) Multi-core binary translation task processing
CN116028205B (en) Resource scheduling method and electronic equipment
DE102020130910A1 (en) SYSTEM, DEVICE AND METHOD FOR DYNAMIC ENERGY STATE SCALING OF A VOLTAGE REGULATOR FOR A PROCESSOR
WO2023221752A1 (en) Information processing method and electronic device
CN116027879B (en) Method for determining parameters, electronic device and computer readable storage medium
CN117130454A (en) Power consumption adjustment method and electronic equipment
CN117950935A (en) Performance regulating and controlling method and electronic equipment
US20220214965A1 (en) System and method for storage class memory tiering
CN113867963A (en) Electronic equipment and processing method
CN116027878B (en) Power consumption adjustment method and electronic equipment
CN116028314B (en) Temperature parameter reading method, electronic device, and computer-readable storage medium
CN116027880B (en) Resource scheduling method and electronic equipment
CN116055443B (en) Method for identifying social scene, electronic equipment and computer readable storage medium
CN116028209B (en) Resource scheduling method, electronic equipment and storage medium
CN116028005B (en) Audio session acquisition method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination