WO2023221752A1 - Information processing method and electronic device - Google Patents

Information processing method and electronic device Download PDF

Info

Publication number
WO2023221752A1
WO2023221752A1 PCT/CN2023/090786 CN2023090786W WO2023221752A1 WO 2023221752 A1 WO2023221752 A1 WO 2023221752A1 CN 2023090786 W CN2023090786 W CN 2023090786W WO 2023221752 A1 WO2023221752 A1 WO 2023221752A1
Authority
WO
WIPO (PCT)
Prior art keywords
policy
target
cpu
information
scheduling
Prior art date
Application number
PCT/CN2023/090786
Other languages
French (fr)
Chinese (zh)
Inventor
李勇
陶有佳
相超
Original Assignee
荣耀终端有限公司
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 荣耀终端有限公司 filed Critical 荣耀终端有限公司
Publication of WO2023221752A1 publication Critical patent/WO2023221752A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/505Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the load
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/5044Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering hardware capabilities
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/5021Priority

Definitions

  • This application relates to the field of electronic technology, and specifically to an information processing method and electronic equipment.
  • a resource scheduling method that identifies the current user scenario of the electronic device, determines the resource scheduling strategy based on the user scenario and the system load of the electronic device, and sends the resource scheduling strategy to the central processing unit (central processing unit). , CPU), the CPU schedules resources based on resource scheduling strategies, thereby reducing the power consumption of electronic devices, extending battery life, and rationally allocating resources to ensure the smooth operation of applications and improve the performance of electronic devices.
  • the chip platform types of CPUs of different electronic devices may be different. Therefore, when resource scheduling is performed based on the resource scheduling policy, the resource scheduling policy needs to be translated.
  • This application provides an information processing method and electronic device, which can translate scheduling policy information, make the resource scheduling policy information applicable to different CPU chip platform types, and improve the compatibility of electronic devices.
  • this application provides an information processing method.
  • the method is executed by an electronic device.
  • the method includes: obtaining current scene information and first scheduling policy information corresponding to the current scene information; the current scene information represents the current processing of the electronic device.
  • the user scenario corresponding to the business if the chip platform type of the CPU of the electronic device is the first type, determine the target policy identifier corresponding to the first scheduling policy information, and use the CPU of the first type to resource the electronic device according to the target policy identifier.
  • Scheduling if the chip platform type of the CPU of the electronic device is the second type, determine the second scheduling strategy information based on the current scene information and the first scheduling strategy information, and use the second type CPU to schedule the electronic device according to the second scheduling strategy information. Carry out resource scheduling.
  • the scene information may be, for example, a scene number or a scene name.
  • the first scheduling policy information is also called a CPU scheduling policy and is information that needs to be sent to the CPU for execution to schedule resources for the electronic device.
  • the first scheduling policy information may be, for example, first CPU power consumption scheduling information.
  • the policy identifier may be, for example, a policy number or a policy name.
  • the first type can be chip platform.
  • the second type can be (Advanced Micro Devices, AMD) chip platform. That is to say, if the chip platform type of the CPU of the electronic device is an Intel chip platform, the corresponding target policy identifier is determined according to the first scheduling policy information.
  • the target policy identifier can be recognized by the Intel CPU chip, and the Intel CPU chip can schedule resources based on the target policy identifier.
  • the chip platform type of the CPU of the electronic device is an AMD chip platform, based on the current scene information and the first scheduling policy information information to determine the second scheduling policy information.
  • the second scheduling policy information can be recognized by the AMD CPU chip, and the AMD CPU chip can perform resource scheduling based on the second scheduling policy information.
  • the method provided in the first aspect of this application obtains the current scene information and the first scheduling policy information corresponding to the current scene information, and performs different translations on the first scheduling policy information according to the different chip platform types of the CPU.
  • the generated scheduling policy information can be recognized by different types of chip platforms, so that this method of dynamic resource scheduling based on user scenarios can be applied to different types of electronic devices, improving the method compatibility, thereby improving the performance and battery life of different types of electronic devices.
  • the first scheduling policy information includes a long-term turbo power consumption (power limit1, PL1) target value, an energy efficiency ratio (energy performance preference, EPP) target value and an energy performance optimization (energy performance optimize, EPO) switch status
  • the target policy identifier includes the target dynamic tuning technology (DTT) policy identifier and the target EPO policy identifier; determine the target policy identifier corresponding to the first scheduling strategy information, and pass the first type of The CPU performs resource scheduling on electronic devices, including: obtaining the current system load corresponding to the first scheduling policy information; determining the target DTT policy identifier based on the PL1 target value or the current system load; determining the target EPO policy identifier based on the status of the EPO switch; and determining the target DTT policy identifier based on the target DTT
  • the policy identifier adjusts the power of the CPU through the first type of CPU, and adjusts the energy efficiency ratio of the CPU through the first type of CPU according to the target EPO policy identifier and the EPP target value.
  • both power consumption adjustment and energy efficiency are achieved. Ratio adjustment can effectively reduce CPU power consumption and improve the battery life of electronic devices.
  • determining the target DTT policy identifier based on the PL1 target value or the current system load includes: if the first scheduling policy information is policy information corresponding to the default scenario, determining the target DTT policy identifier based on the first correspondence relationship with the current system load.
  • the corresponding target DTT policy identifier; the first correspondence includes a correspondence between at least one default policy identifier and at least one system load, and the at least one default policy identifier includes the target DTT policy identifier; the default scenario refers to other than the preset scenario In user scenarios, the default policy identifier refers to the DTT policy identifier corresponding to the default scenario; if the first scheduling policy information is not the policy information corresponding to the default scenario, then according to the second correspondence relationship, determine the PL1 value corresponding to the closest PL1 target value
  • the target DTT policy identifier; the second correspondence includes the correspondence between multiple non-default policy identifiers and multiple PL1 values, and the multiple non-default policy identifiers include the target DTT policy identifier; the non-default policy identifier refers to the corresponding non-default scenario DTT policy identifier.
  • the first correspondence relationship and the second correspondence relationship can be queried through the policy table.
  • the policy table may include correspondences between some or all of the parameters such as the DTT policy identifier, PL1, PL2, and system load.
  • the policy table can be created and saved by the basic input output system (BIOS) of the electronic device.
  • the policy table may not include the PL1 target value and the PL2 target value. In other words, the policy table may not be established entirely based on the existing PL1 target value and PL2 target value, and there may not be a one-to-one correspondence between the policy identifier and the existing PL1 target value and PL2 target value.
  • the target DTT policy identifier corresponding to the current system load is determined according to the first correspondence relationship, and the policy identifier can be determined quickly and conveniently. If the first scheduling policy information is not the policy information corresponding to the default scenario, the target DTT policy identifier corresponding to the PL1 value closest to the PL1 target value is determined according to the second correspondence relationship.
  • the DTT policy identifier does not need to increase with the increase of the first scheduling policy information, which reduces the number of expansions of the second corresponding relationship in the policy table, saves BIOS capacity, and can ensure that the second corresponding relationship in the policy table is relatively fixed, making it easy to operate. And maintenance.
  • the non-default policy identifier is a DTT policy number
  • the non-default policy identifier includes at least one set of first DTT policy numbers
  • the first DTT policy number includes multiple DTT policy numbers
  • the multiple DTT policies When the numbers are in ascending order, the PL1 step values corresponding to two adjacent DTT policy numbers are equal; according to the second correspondence relationship, the target DTT policy identifier corresponding to the PL1 value closest to the PL1 target value is determined, including: Determine the target PL1 step value and target compensation value based on the PL1 target value; determine the target DTT strategy identification based on the PL1 target value, target PL1 step value, and target compensation value.
  • the non-default policy identifiers are multiple DTT policy numbers sorted from large to small, and the PL1 step values corresponding to two adjacent DTT policy numbers are equal.
  • the target PL1 step value and the target compensation value can be determined based on the PL1 target value, and then the target DTT strategy identifier can be determined based on the PL1 target value, the target PL1 step value, and the target compensation value.
  • the chip platform type of the CPU is: In the case of , ignore PL2 and determine the target DTT strategy number only through the PL1 target value, thereby simplifying the algorithm and improving the efficiency of information translation.
  • determining the target DTT strategy identifier based on the PL1 target value, the target PL1 step value and the target compensation value includes: determining the target DTT strategy identifier through formula (1):
  • step means the target PL1 step value
  • offset1 means the target compensation value
  • formula (1) can be used to quickly determine the policy number corresponding to the PL1 value in the second correspondence relationship that is closest to the PL1 target value in the first scheduling policy information, so that the target DTT policy can be quickly determined identification, there is no need to traverse the second corresponding relationship in the query strategy table, and the efficiency of information translation is improved.
  • the method further includes: determining whether the first scheduling policy information is policy information corresponding to the default scenario according to the current scenario information.
  • determining the target EPO policy identifier according to the state of the EPO switch includes: if the state of the EPO switch is off, determining the preset EPO policy identifier as the target EPO policy identifier; determining the target EPO policy identifier according to the target EPO policy identifier and The EPP target value is used to adjust the energy efficiency ratio of the CPU through the first type of CPU, including: adjusting the energy efficiency ratio of the CPU to the EPP target value through the first type of CPU according to the preset EPO policy identifier.
  • the electronic device when it is determined that the EPO switch is in a closed state, it can be directly determined that the EPO policy identifier is the default EPO policy identifier.
  • the electronic device turns off the DTT adjustment function and directly adjusts the energy efficiency ratio of the CPU to the EPP target value.
  • determining the target EPO policy identifier based on the state of the EPO switch includes: if the state of the EPO switch is on, determining the EPO gear target value based on the EPP target value, and determining the EPO gear target value based on the third corresponding relationship.
  • the third corresponding relationship can also be queried through the policy table.
  • the policy table includes the EPO policy identifier, EPO Correspondence between gear values.
  • the EPO gear target value is determined based on the EPP target value, and the EPO gear value closest to the EPO gear target value is determined based on the third corresponding relationship.
  • Target EPO policy identifier In this way, in the third corresponding relationship in the policy table, the EPO policy identifier does not need to increase with the increase of the first scheduling policy information, reducing the number of expansions of the third corresponding relationship in the policy table, saving BIOS capacity, and ensuring that the third corresponding relationship in the policy table is The three corresponding relationships are relatively fixed, which facilitates operation and maintenance.
  • multiple EPO policies are identified as multiple EPO policy numbers, and when the multiple EPO policy numbers are in ascending order, the EPO gear step values corresponding to two adjacent EPO policy numbers are are equal, according to the third corresponding relationship, determine the target EPO strategy identifier corresponding to the EPO gear value closest to the EPO gear target value, including: determining the target EPO strategy identifier according to formula (2):
  • EPP target value/255 is the EPO gear target value
  • offset2 represents the EPO gear step value
  • formula (2) can be used to quickly determine the EPO Gear value closest to the EPO Gear target value in the third corresponding relationship, so that the target EPO policy identifier can be quickly determined without traversing the query policy table.
  • the third correspondence relationship improves the efficiency of information translation.
  • determining the second scheduling strategy information based on the current scenario information and the first scheduling strategy information includes: determining the data type of the second scheduling strategy information based on the current scenario information; and obtaining the target parameters included in the data type. ; Obtain the initial parameters in the first scheduling strategy information; assign values to the target parameters according to the fourth correspondence and the values of the initial parameters, and obtain the second scheduling strategy information; the fourth correspondence includes at least one parameter in the target parameters and the initial Correspondence of at least one of the parameters.
  • the data type of the second scheduling information represents the type of resource scheduling performed by the electronic device.
  • the target parameters represent the parameter types required by the second type of CPU chip platform when executing resource scheduling corresponding to the first scheduling policy information in the current scenario.
  • the target parameter is assigned a value to obtain the second scheduling strategy information.
  • the obtained second scheduling strategy parameters can be recognized by the second type of CPU chip platform, so that the second type The CPU chip is capable of performing resource scheduling.
  • the initial parameters include PL1 and short-term turbo power consumption (power limit1, PL2)
  • the target parameters include sustained power limit (sustained power limit, SPL) and slow packet power tracking limit (slow PPT limit).
  • SPPT sustained power limit
  • the fourth correspondence includes the correspondence between SPL and PL1, and the correspondence between SPPT and PL2; according to the fourth correspondence and the value of the initial parameter, the target parameter is assigned a value to obtain the second scheduling policy information, including: Assign the value of PL1 to SPL, assign the value of PL2 to SPPT, and obtain the second scheduling policy information.
  • the first scheduling policy information also includes the EPP target value
  • resource scheduling is performed on the electronic device through the second type of CPU according to the second scheduling policy information, including: according to the value of SPL and the value of SPPT, The power of the CPU is adjusted through the second type of CPU; the energy efficiency ratio of the CPU is adjusted through the second type of CPU according to the EPP target value.
  • resource scheduling is performed on the electronic device through the second type of CPU according to the second scheduling policy information, including: obtaining third scheduling policy information, where the third scheduling policy information is an embedded controller ( Scheduling strategy information generated by Embedded Controller (EC); determine the final scheduling strategy information based on the second scheduling strategy information and the third scheduling strategy information; when the chip platform type of the CPU of the electronic device is the second type,
  • the method also includes: obtaining a data level of the first scheduling strategy information based on the current scene information; the data level represents the importance of the second scheduling strategy information in the process of determining the final scheduling strategy information based on the second scheduling strategy information and the third scheduling strategy information. degree.
  • data levels can include low level, normal level and high level.
  • the low level indicates that in the process of deciding the final scheduling policy information based on the second scheduling policy information and the third scheduling policy information, the second scheduling policy information has the lowest importance level or priority level.
  • the second scheduling strategy information can be ignored in the process of deciding the final scheduling strategy information based on the second scheduling strategy information and the third scheduling strategy information, and the decision can be made based only on the third scheduling strategy information. Output the final scheduling policy information.
  • the normal level indicates that in the process of deciding the final scheduling policy information based on the second scheduling policy information and the third scheduling policy information, the importance level or priority level of the second scheduling policy information is medium, which is equivalent to the importance of the third scheduling policy information.
  • the second scheduling strategy information and the third scheduling strategy information are compared or integrated to obtain the final scheduling strategy information.
  • the high level indicates that in the process of deciding the final scheduling policy information based on the second scheduling policy information and the third scheduling policy information, the second scheduling policy information has the highest importance level or priority level.
  • the third scheduling strategy information can be ignored in the process of deciding the final scheduling strategy information based on the second scheduling strategy information and the third scheduling strategy information, and the decision can be made based only on the second scheduling strategy information. Output the final scheduling policy information.
  • the method further includes: obtaining a vendor identification (VID) of the CPU chip of the electronic device; and determining the chip platform type of the CPU of the electronic device based on the VID.
  • VIP vendor identification
  • the chip platform type of the CPU can be determined simply and quickly through VID, thereby improving the efficiency of information translation.
  • the present application provides a device, which is included in an electronic device and has the function of realizing the behavior of the electronic device in the above-mentioned first aspect and possible implementations of the above-mentioned first aspect.
  • Functions can be implemented by hardware, or by hardware executing corresponding software.
  • Hardware or software includes one or more modules or units corresponding to the above functions. For example, receiving module or unit, processing module or unit, etc.
  • this application provides an electronic device.
  • the electronic device includes: a processor, a memory, and an interface; the processor, the memory, and the interface cooperate with each other to enable the electronic device to execute any method in the technical solution of the first aspect.
  • this application provides a chip including a processor.
  • the processor is configured to read and execute the computer program stored in the memory to perform the method of the first aspect and any possible implementation thereof.
  • the chip also includes a memory, and the memory is connected to the processor through circuits or wires.
  • the chip also includes a communication interface.
  • this application provides a computer-readable storage medium.
  • a computer program is stored in the computer-readable storage medium.
  • the processor is caused to execute any one of the technical solutions of the first aspect. method.
  • the present application provides a computer program product.
  • the computer program product includes: computer program code.
  • the computer program code When the computer program code is run on an electronic device, it causes the electronic device to execute any method in the technical solution of the first aspect.
  • Figure 1 is a schematic structural diagram of an electronic device 100 provided by an embodiment of the present application.
  • Figure 2 is a software structure block diagram of another electronic device 100 provided by an embodiment of the present application.
  • Figure 3 is a schematic workflow diagram of an example of software and hardware scheduling of resources by the electronic device 100 provided by the embodiment of the present application;
  • Figure 4 is a schematic flowchart of an example of an information processing method and power consumption scheduling based on translation results provided by an embodiment of the present application;
  • FIG. 5 is a schematic diagram of the interaction of various modules of the electronic device in an example of the information processing method provided by the embodiment of the present application;
  • Figure 6 is a schematic flow chart of an example of determining the DTT policy number and the EPO policy number provided by the embodiment of the present application;
  • Figure 7 is a schematic flowchart of an example of translating first CPU power consumption scheduling information into second CPU power consumption scheduling information provided by an embodiment of the present application
  • FIG. 8 is a schematic structural diagram of an example chip system provided by an embodiment of the present application.
  • first”, “second” and “third” are used for descriptive purposes only and shall not be understood as indicating or implying relative importance or implicitly indicating the quantity of indicated technical features. Thus, features defined as “first”, “second”, and “third” may explicitly or implicitly include one or more of these features.
  • Long-term turbo power consumption refers to the power consumption of the CPU under normal load, which is equivalent to the thermal design power consumption.
  • the CPU's operating power consumption does not exceed PL1 most of the time.
  • Short-term turbo power consumption (power limit2, PL2) refers to the highest power consumption that the CPU can achieve in a short period of time, which has a duration limit. Generally, PL2 is larger than PL1.
  • CPU energy efficiency ratio is used to reflect the scheduling tendency of the CPU, and its value range is 0 ⁇ 255. The smaller the CPU energy efficiency ratio, the CPU tends to have high performance; the higher the CPU energy efficiency ratio, the CPU tends to have low power consumption.
  • DTT Dynamic tuning technology
  • processor and Technology that automatically and dynamically allocates power consumption between independent graphics cards to optimize performance and extend battery life. It can improve CPU and GPU performance and intelligently balance workloads for mixed workloads.
  • EPO Gear Energy efficiency-performance optimization gear
  • EPP CPU energy efficiency ratio
  • the value range of EPO Gear can be 1 to 5. The larger the value, the more energy-efficient the EPP adjustment is. The smaller the value, the more performance-oriented EPP adjustment is.
  • Vendor identification also known as vendor ID, represents the identification code of the technology manufacturer of the device, that is, the manufacturer ID. VID is uniformly compiled and named by the peripheral component interconnect special interest group (PCI-SGI). It is a unique manufacturer identification and no duplicate names are allowed.
  • PCI-SGI peripheral component interconnect special interest group
  • Focus window refers to the window that has focus.
  • the focused window is the only window that can receive keyboard input.
  • the way the focus window is determined is related to the system's focus mode.
  • the top-level window of the focused window is called the active window. Only one window can be active at a time. The focus window is most likely the window that the user currently needs to use.
  • Focus mode can be used to determine how the mouse brings focus to a window.
  • focus modes can include three types, namely:
  • Focus follows the mouse (focus-follow-mouse).
  • the window under the mouse can gain focus. That is, when the mouse moves within the scope of a window that can obtain focus, the user can activate the window and receive keyboard input without clicking somewhere in the window, but the window is not necessarily placed at the front of all windows. When the mouse moves out of the scope of this window, this window will also lose focus.
  • this focus mode is similar to focus-follow-mouse: when the mouse moves within the range of a window that can get focus, the user does not need to click somewhere in the window to activate this A window that receives keyboard input, but the window is not necessarily placed at the front of all windows. Different from focus-follow-mouse, when the mouse moves out of the scope of this window, the focus will not change accordingly. The system focus will only change when the mouse moves to other windows that can receive focus.
  • a process includes multiple threads, and threads can create windows.
  • the focus process is the process to which the thread that created the focus window belongs.
  • Translation refers to converting a certain form of data or information to obtain another form of data or information, which can be recognized by the designated platform.
  • the electronic device can translate the obtained policy parameters to obtain parameters that can be recognized by a certain type of CPU chip platform.
  • a resource scheduling method that identifies the user scenario corresponding to the business currently processed by the electronic device and determines the resource scheduling strategy based on the user scenario and the system load of the electronic device.
  • the CPU schedules the resources based on the resource scheduling strategy. , thereby improving the performance and battery life of electronic devices.
  • different electronic devices may use different CPUs, and the types of CPU chip platforms may be different. Therefore, before the CPU performs resource scheduling based on the resource scheduling policy, the resource scheduling policy needs to be translated.
  • the present application provides an information processing method. After the electronic device determines the user scenario in which the electronic device is currently located and the scheduling policy corresponding to the user scenario, it can perform the scheduling policy according to the chip platform type of the CPU of the electronic device. Translation to adapt to different types of CPU chip platforms, so that this method of dynamic resource scheduling based on user scenarios can be applied to different electronic devices, improve the compatibility of the resource scheduling method, and thus improve the performance of different types of electronic devices. Performance and battery life.
  • the information processing method provided by the embodiment of the present application can be applied to notebook computers, ultra-mobile personal computers (UMPC), netbooks, and personal digital assistants. PDA), mobile phones, tablets, wearable devices, vehicle-mounted devices, augmented reality (AR)/virtual reality (VR) devices and other electronic devices.
  • PDA ultra-mobile personal computers
  • AR augmented reality
  • VR virtual reality
  • the embodiments of this application do not make any specific types of electronic devices. limit.
  • FIG. 1 is a schematic structural diagram of an electronic device 100 provided by an embodiment of the present application.
  • the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, and a wireless communication module 150. Display 160 etc.
  • the structure illustrated in this embodiment does not constitute a specific limitation on the electronic device 100 .
  • the electronic device 100 may include more or fewer components than illustrated, some components may be combined, some components may be separated, or components may be arranged differently.
  • the components illustrated may be implemented in hardware, software, or a combination of software and hardware.
  • the processor 110 may include one or more processing units.
  • the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processing unit (GPU), an image signal processor ( image signal processor (ISP), controller, memory, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural network processing unit (NPU), etc.
  • application processor application processor, AP
  • modem processor graphics processing unit
  • GPU graphics processing unit
  • ISP image signal processor
  • controller memory
  • video codec digital signal processor
  • DSP digital signal processor
  • NPU neural network processing unit
  • different processing units can be independent devices or integrated in one or more processors.
  • the controller may be the nerve center and command center of the electronic device 100 .
  • the controller can generate operation control signals based on the instruction operation code and timing signals to complete the control of fetching and executing instructions.
  • the processor 110 may also be provided with a memory for storing instructions and data.
  • the memory in processor 110 is cache memory. This memory may hold instructions or data that have been recently used or recycled by processor 110 . If the processor 110 needs to use the instructions or data again, it can be called directly from the memory. Repeated access is avoided and the waiting time of the processor 110 is reduced, thus improving the efficiency of the system.
  • processor 110 may include one or more interfaces.
  • the interface can include I2C interface, integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, pulse code modulation (PCM) interface, universal asynchronous receiver/transmitter (UART) interface, mobile industry Processor interface (mobile industry processor interface, MIPI), general-purpose input/output (GPIO) interface, subscriber identity module (subscriber identity module, SIM) interface, and/or USB interface, etc.
  • the interface connection relationships between the modules illustrated in this embodiment are only schematic illustrations and do not constitute a structural limitation of the electronic device 100 .
  • the electronic device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
  • the charging management module 140 is used to receive charging input from the charger.
  • the charger can be a wireless charger or a wired charger. While the charging management module 140 charges the battery 142, it can also provide power to the electronic device through the power management module 141.
  • the power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110.
  • the power management module 141 receives input from the battery 142 and/or the charging management module 140, and supplies power to the processor 110, internal memory 121, external memory, display screen 160, wireless communication module 150, etc.
  • the power management module 141 and the charging management module 140 may also be provided in the same device.
  • the wireless communication module 150 can provide technologies applied to the electronic device 100 including WLAN (such as Wi-Fi), Bluetooth, global navigation satellite system (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), short-range wireless communication technology ( Near field communication (NFC), infrared technology (infrared, IR) and other wireless communication solutions.
  • WLAN such as Wi-Fi
  • Bluetooth global navigation satellite system
  • GNSS global navigation satellite system
  • FM frequency modulation
  • FM frequency modulation, FM
  • NFC Near field communication
  • infrared technology infrared, IR
  • the wireless communication module 150 may be one or more devices integrating at least one communication processing module.
  • the wireless communication module 150 receives electromagnetic waves via an antenna, frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110 .
  • the wireless communication module 150 can also receive the signal to be sent from the processor 110, perform frequency modulation on it, amplify it, and convert it into electromagnetic waves through the antenna for radiation.
  • the electronic device 100 implements display functions through a GPU, a display screen 160, an application processor, and the like.
  • the GPU is an image processing microprocessor and is connected to the display screen 160 and the application processor. GPUs are used to perform mathematical and geometric calculations for graphics rendering.
  • Processor 110 may include one or more GPUs that execute program instructions to generate or alter display information.
  • the display screen 160 is used to display images, videos, etc.
  • the display screen 160 includes a display panel.
  • the external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100.
  • the external memory card communicates with the processor 110 through the external memory interface 120 to implement the data storage function. Such as saving music, videos, etc. files in external memory card.
  • Internal memory 121 may be used to store computer executable program code, which includes instructions.
  • the processor 110 executes instructions stored in the internal memory 121 to execute various functional applications and data processing of the electronic device 100 .
  • the processor 110 can execute instructions stored in the internal memory 121, and the internal memory 121 can include a program storage area and a data storage area.
  • the stored program area can store an operating system, at least one application program required for a function (such as a sound playback function, an image playback function, etc.).
  • the storage data area may store data created during use of the electronic device 100 (such as audio data, phone book, etc.).
  • the internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc.
  • the software system of the above-mentioned electronic device 100 may adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture.
  • This embodiment of the present invention takes a Windows system with a layered architecture as an example to illustrate the software structure of the electronic device 100 .
  • FIG. 2 is a software structure block diagram of an example electronic device 100 according to the embodiment of the present application.
  • the layered architecture divides the software into several layers, and each layer has clear roles and division of labor.
  • the layers communicate through software interfaces.
  • the Windows system is divided into user mode and kernel mode.
  • user mode includes application layer and subsystem dynamic link library.
  • the kernel state is divided into firmware layer, hardware abstraction layer (HAL), kernel and driver layer and execution body from bottom to top.
  • HAL hardware abstraction layer
  • the application layer includes music, video, games, office, social networking and other applications.
  • the application layer also includes the environment subsystem, scene recognition engine, and scheduling engine. Among them, only some applications are shown in the figure, and the application layer may also include other applications, such as shopping applications, browsers, etc., which are not limited in this application.
  • the environment subsystem can present certain subsets of basic execution system services to applications in a specific form, providing an execution environment for applications.
  • the scene recognition engine can identify the user scene in which the electronic device 100 is located, and determine the basis matching the user scene.
  • basic scheduling strategy The scheduling engine can obtain the load condition of the electronic device 100 and determine an actual scheduling strategy that is consistent with the actual operating conditions of the electronic device 100 based on the load condition of the electronic device 100 and the above-mentioned basic scheduling strategy. Among them, the specific content of the scene recognition engine and scheduling engine will be found later and will not be described here.
  • the subsystem dynamic link library includes API modules, which include Windows API, Windows native API, etc.
  • Windows API and Windows native API can provide system call entry and internal function support for applications.
  • Windows native API is an API native to the Windows system.
  • Windows API can include user.dll, kernel.dll, and Windows native API can include ntdll.dll.
  • user.dll is the Windows user interface interface, which can be used to perform operations such as creating windows and sending messages.
  • kernel.dll is used to provide an interface for applications to access the kernel.
  • ntdll.dll is an important Windows NT kernel-level file that describes the Windows local NTAPI interface. When Windows starts, ntdll.dll resides in a specific write-protected area of memory so that other programs cannot occupy this memory area.
  • the execution body includes process manager, virtual memory manager, security reference monitor, I/O manager, Windows management instrumentation (WMI), power manager, operating system event driver (OsEventDriver) node , system and chip driver (operatingsystem to System on Chip, OS2SOC) nodes, etc.
  • WMI Windows management instrumentation
  • OsEventDriver operating system event driver
  • the process manager is used to create and terminate processes and threads.
  • the virtual memory manager implements "virtual memory".
  • the virtual memory manager also provides basic support for the cache manager.
  • the Security Reference Monitor enforces security policies on the local computer, protects operating system resources, and performs runtime object protection and monitoring.
  • the I/O manager performs device-independent input/output and calls the appropriate device driver for further processing.
  • Power Manager manages power state changes for all devices that support power state changes.
  • the system event driver node can interact with the kernel and driver layer, for example, with the graphics card driver. After determining that a GPU video decoding event exists, it reports the GPU video decoding event to the scene recognition engine.
  • System and chip driver nodes allow the scheduling engine to send adjustment information to hardware devices, such as sending information to adjust PL1 and PL2 to the CPU.
  • the kernel and driver layer include the kernel and device drivers.
  • the kernel is an abstraction of the processor architecture, which isolates the differences between the execution body and the processor architecture to ensure the portability of the system.
  • the kernel can perform thread arrangement and scheduling, trap handling and exception scheduling, interrupt handling and scheduling, etc.
  • Device drivers run in kernel mode and are the interface between the I/O system and related hardware.
  • Device drivers can include graphics card drivers, Intel DTT drivers, mouse drivers, audio and video drivers, camera drivers, keyboard drivers, etc.
  • the graphics card driver can drive the GPU to run
  • the Intel DTT driver can drive the CPU to run.
  • HAL is a core module that can hide various hardware-related details, such as I/O interfaces, interrupt controllers, and multi-processor communication mechanisms. It provides a unified service interface for different hardware platforms running Windows and implements a variety of Portability across hardware platforms. It should be noted that in order to maintain the portability of Windows, Windows internal components and user-written device drivers do not access the hardware directly, but by calling routines in the HAL.
  • the firmware layer can include the basic input output system (BIOS).
  • BIOS is a set of programs solidified into a read only memory (ROM) chip on the computer motherboard. It stores the most important basic information of the computer. Input and output programs, self-test programs after power-on and system self-starting programs, which can be complementary Detailed information on reading and writing system settings in complementary metal oxide semiconductor (CMOS). Its main function is to provide the lowest and most direct hardware settings and control for the computer.
  • CMOS complementary metal oxide semiconductor
  • the Intel DTT driver can send instructions to the CPU through the BIOS.
  • FIG. 3 shows a schematic workflow diagram of an example of software and hardware for scheduling resources by the electronic device 100 .
  • the scene recognition engine of the application layer may include a system probe module, a scene recognition module and a basic 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 can send a request to obtain the probe status to the system probe module.
  • the system probe module can obtain the operating status of the electronic device 100 .
  • the system probe module may include a power status probe, a peripheral status probe, a process load probe, an audio and video status probe, a system load probe, a system event probe, etc.
  • the power status probe can subscribe to the power status event from the kernel state and determine the power status according to the callback function fed back by the kernel state.
  • the power status includes battery (remaining) power, power mode, etc.
  • the power mode can include alternating current (AC). ) and direct current (DC).
  • the power status probe can send a request to subscribe to the power status event to the OsEventDriver node of the execution body layer, and the OsEventDriver node forwards the request to the power manager of the execution body layer.
  • the power manager can feedback the callback function to the power status probe through the OsEventDriver node.
  • Peripheral status probes can subscribe to peripheral events from the kernel state and determine peripheral events based on the callback function fed back by the kernel state.
  • Peripheral events include mouse wheel sliding events, mouse click events, keyboard input events, microphone input events, camera input events, etc.
  • the process load probe can subscribe to the process load in the kernel state and determine the process load based on the callback function fed back by the kernel state.
  • the system load probe can subscribe to the system load in the kernel state and determine the system load based on the callback function fed back by the kernel state.
  • the audio and video status probe can subscribe to audio and video events in the kernel state, and determine the audio and video events currently existing in the electronic device 100 based on the callback function fed back by the kernel state.
  • Audio and video events may include GPU decoding events, etc.
  • the audio and video status probe can send a request to subscribe to the GPU decoding event to the OsEventDriver node at the execution layer, and the OsEventDriver node forwards the request to the graphics card driver at the kernel and driver layers.
  • the graphics card driver can monitor the status of the GPU. After monitoring that the GPU is performing a decoding operation, it will feed back the callback function to the audio and video status probe through the OsEventDriver node.
  • System event probes can subscribe to system events from the kernel state and determine system events based on the callback function fed back by the kernel state.
  • System events can include window change events, process creation events, thread creation events, etc.
  • the system event probe can send a request to subscribe to the process creation event to the OsEventDriver node at the execution layer, and the OsEventDriver node forwards the request to the process manager.
  • the process manager can feedback the callback function to the system event probe through the OsEventDriver node.
  • the system event probe also sends the subscription focus window change event to the API module.
  • the API module can monitor whether the focus window of the electronic device 100 changes, and when monitoring that the focus window changes, feed back the callback function to the system event probe.
  • the system probe module obtains the probe status by subscribing to various events of the electronic device 100 in the kernel state, and then determining the operating status of the electronic device 100 based on the callback function fed back by the kernel state. After the system probe module obtains the probe status, it can feed back the probe status to the scene recognition module. After receiving the probe status, the scene recognition module can determine the user scene in which the electronic device 100 is located based on the probe status.
  • user scenarios can include main scenarios and sub-scenarios, with sub-scenarios being subdivided scenarios under the main scenario.
  • the main scene can include video scenes, game scenes, office scenes, social scenes, idle scenes, etc.
  • Video scenes refer to scenes where users use electronic devices to watch videos.
  • Sub-scenes corresponding to the video scene may include video playback scenes, video browsing scenes, etc.
  • Game scenarios refer to scenarios where users use electronic devices to play games.
  • Sub-scenes corresponding to game scenes may include scenes in the game, etc.
  • Office scenarios refer to scenarios where users use electronic devices to work.
  • Sub-scenarios corresponding to office scenarios can include document editing scenarios, document browsing scenarios, video conferencing scenarios, etc.
  • Social scenarios refer to scenarios where users use electronic devices to socialize.
  • Sub-scenes corresponding to social scenes can include text chat scenes, voice chat scenes, video chat scenes, etc.
  • the idle scene refers to the scene where the user does not perform any operations on the electronic device. Idle scenes may not include sub-scenes. Scenes other than the above video scenes, game scenes, office scenes, social scenes and idle scenes are defined as default scenes, and the default scenes may not include sub-scenes.
  • User scenarios can reflect users’ current usage needs. For example, when the scene recognition engine recognizes that the focus window is the window of a video playback application, it determines that the main scene where the electronic device 100 is located is the video scene and the sub-scene is the video playback scene, indicating that the user needs to use the video application to watch and browse videos. For another example, when the scene recognition engine recognizes that the focus window is the text chat window of WeChat TM , it determines that the main scene where the electronic device 100 is located is the social scene and the sub-scene is the text chat scene.
  • the scenario identification module may also send the user scenario to the underlying policy matching manager.
  • the basic policy matching manager can determine the basic scheduling policy according to the user scenario.
  • the basic policy matching manager can feed back the basic scheduling policy to the scene recognition module.
  • the scene recognition module can send the basic scheduling policy and user scenarios to the scheduling engine of the application layer.
  • the scheduling engine includes a load controller, a chip policy fusion device, and a scheduling executor.
  • the load controller can receive the basic scheduling strategy and user scenarios sent by the scene recognition module.
  • the load controller can also obtain the system load from the system probe module, and adjust the basic scheduling strategy according to the system load and user scenarios to obtain the actual scheduling strategy.
  • the load controller may determine the system load level based on the system load.
  • the system load level can include three levels: light, medium, and heavy.
  • Electronic devices can be pre-configured with actual scheduling strategies corresponding to various user scenarios and various system load levels.
  • the actual scheduling policy may include an OS scheduling policy and a CPU scheduling policy (also called the first scheduling policy).
  • the load controller can send the OS scheduling policy to the scheduling executor, and the scheduling executor performs scheduling based on the OS scheduling policy.
  • OS scheduling policy is used to adjust the process priority and I/O priority of the focus process.
  • the scheduling executor may send an instruction to adjust the process priority of the focus process to the process manager, and in response to the instruction, the process manager adjusts the process priority of the focus process.
  • the scheduling executor may send an instruction to adjust the I/O priority of the focus process to the I/O manager. In response to the instruction, the I/O manager adjusts the I/O priority of the focus process.
  • the CPU scheduling policy refers to the scheduling policy that needs to be delivered to the CPU for execution.
  • the CPU scheduling strategy may include a power consumption scheduling strategy or a performance optimization strategy.
  • the power consumption scheduling policy is used to adjust the parameters of the CPU, GPU or other hardware to achieve power consumption adjustment, for example, adjusting the CPU power limit parameter to adjust the CPU power consumption, or adjusting the CPU energy consumption ratio to adjust the CPU power consumption.
  • Performance optimization strategies are used to adjust the parameters of relevant modules in electronic devices or Working mode, etc. to optimize the performance of electronic devices, for example, performance optimization through system temperature tracking adjustment, performance optimization by adjusting fan speed or sound, or performance optimization by adjusting the BIOS working mode, etc.
  • the load controller can send the user scenario and CPU scheduling policy to the chip policy fusion device.
  • the chip policy fusion device translates the CPU scheduling policy according to the chip platform type and user scenario of the CPU to obtain the translated scheduling policy.
  • the chip policy fusion device delivers the translated scheduling policy to the scheduling executor.
  • the scheduling executor can deliver the translated scheduling policy to the CPU through at least one of the OS2SOC driver nodes, WMI, power manager, BIOS, etc. , resource scheduling is implemented by the CPU.
  • the user scenario can be characterized by scenario information.
  • the scenario information can include, for example, a scenario number, a scenario name, etc.
  • the CPU scheduling policy may be characterized by CPU scheduling policy information, which may include, for example, scheduling parameters, scheduling data, etc.
  • the scene information is used as the scene number
  • the CPU scheduling policy information (first scheduling policy information) is used as the first CPU power consumption scheduling information as an example for explanation, where the first CPU power consumption scheduling The information is used to adjust the CPU's power consumption parameters.
  • Other types of CPU scheduling policy information are similar to this and will not be described again.
  • a CPU used in electronic equipment can be (Advanced Micro Devices, AMD) CPU, the chip platform type is AMD; the CPU used in electronic equipment can also be CPU, chip platform type is
  • AMD Advanced Micro Devices
  • chip platform type is
  • These two types of chip platforms adjust CPU power consumption in different ways, so they need to be distinguished.
  • the following embodiments take these two chip platform types as examples to illustrate the information processing method.
  • FIG. 4 is a schematic flowchart of an example of a method for information processing and power consumption scheduling based on translation results provided by an embodiment of the present application.
  • the execution subject of this method is an electronic device.
  • the execution subject can It is the scheduling engine described in the above embodiment.
  • FIG. 5 is a schematic diagram of the interaction of various modules of the electronic device in an example of the information processing method provided by the embodiment of the present application. Please refer to Figure 4 and Figure 5 together.
  • the information processing method may include:
  • the electronic device can deliver the scene number and the first CPU power consumption scheduling information to the chip policy fusion device through the load manager.
  • Scenario numbers are used to characterize user scenarios.
  • the scene number may be composed of numbers, characters, symbols, etc., and this embodiment of the present application does not impose any limitation on this.
  • a unique corresponding relationship between each main scene and the main scene number can be established in advance, and a unique corresponding relationship between each sub-scene and the sub-scene number can be established in advance.
  • the number corresponding to the main scene and the number corresponding to the sub-scene constitute the final scene number. For example, if the main scene is a video scene and the corresponding main scene number is 4, and the sub-scene is a video playback scene and the corresponding sub-scene number is 1, then the scene number corresponding to the user scene can be 4-1. For another example, the scene number corresponding to the default scene may be -1.
  • the first CPU power consumption scheduling information is used to characterize the adjustment method of parameters related to CPU power consumption.
  • the first CPU power consumption scheduling information may include parameters and target values of the parameters.
  • the parameters in the first CPU power consumption scheduling information may include PL1, PL2, EPP and EPO switch status, etc.
  • the target values of the parameters may include the target value of PL1, the target value of PL2, EPP The target value and information characterizing the EPO switch state, etc.
  • EPO switch Used to select whether to turn on the DTT adjustment function when the chip platform type of the CPU is Inter, that is, whether to adjust the power consumption of the CPU through DTT technology according to EPO Gear.
  • the switch state of EPO can include on state and off state.
  • the DTT adjustment function When the EPO switch is on, the DTT adjustment function is turned on, and the CPU adjusts EPP through DTT technology based on the EPO Gear corresponding to the EPP target value (which can be calculated based on the EPP target value).
  • the EPO switch When the EPO switch is turned off, that is, the DTT adjustment function is turned off, the CPU does not perform DTT adjustment, and the system can directly adjust EPP according to the EPP target value. In this case, the EPP target value can be directly sent to the CPU.
  • whether the EPO switch is on can be determined by the return value of the EPO switch status. For example, a return value of 1 indicates that the EPO switch is on, and a return value of 0 indicates that the EPO switch is on.
  • Different scene numbers and different system load levels correspond to different first CPU power consumption scheduling information.
  • the corresponding relationship between the scene number, the system load level and the first CPU power consumption scheduling information can be as shown in Table 1.
  • user scenarios, parameters in the first CPU power consumption scheduling information and the target values corresponding to the parameters in Table 1 are only examples and do not represent the actual situation, nor do they constitute any limitation on this application.
  • user scenarios may include more or fewer types than Table 1.
  • user scenarios may also include idle scenarios, performance measurement scenarios, etc.
  • the first CPU power consumption scheduling information may also include more parameters than Table 1.
  • S402. Determine the chip platform type of the CPU of the electronic device; if the chip platform type of the CPU is (also called the first type), then execute steps S403 and S404; if the chip platform type of the CPU is AMD (also called the second type), then execute steps S405 to S407.
  • the chip policy fusion device can obtain the VID return value from the VID interface in the OS2SOC driver node and determine the chip platform type of the CPU based on the VID return value.
  • the VID return value is 0x8086, indicating that the chip platform type of the CPU is
  • the return value of the VID interface is 0x1022, which indicates that the chip platform type of the CPU is AMD.
  • the strategy number is used to identify the CPU's strategy for adjusting power consumption.
  • policy identifiers such as policy names, can also be used to identify the CPU power consumption adjustment strategy. As long as different strategies can be distinguished, they can be identified. Just identify the platform.
  • the policy number may include a DTT policy number and an EPO policy number.
  • the DTT policy number is also called the DTT policy ID and is used to identify the DTT policy.
  • the DTT policy corresponding to the DTT policy number is used to adjust the values of PL1 and PL2 of the CPU.
  • the EPO policy number also called the EPO policy ID, is used to identify the EPO policy.
  • the EPO policy corresponding to the EPO policy number is used to adjust the EPP of the CPU.
  • a policy table can be built in the BIOS in advance to store the correspondence between the DTT policy number or EPO policy number and the values of the CPU's PL1, PL2, and EPO parameters.
  • the policy table may be as shown in Table 2. It can be understood that the DTT policy number and the EPO policy number can be distinguished by numbers. For example, in Table 2, policy numbers 0 to 21, 40, and 41 represent DTT policy numbers, and policy numbers 50 to 55 represent EPO policy numbers. In addition, please refer to the remarks in Table 2.
  • the user scenarios corresponding to 0, 41 and 42 are the default scenarios. These three policy numbers are also called the default policy numbers.
  • the DTT policy numbers except the default policy number are Other policy numbers are the policy numbers corresponding to non-default scenarios, also called non-default policy numbers.
  • Table 2 the correspondence between the default policy number and the values of the PL1 and PL2 parameters of the CPU and the system load level is also called the first correspondence. Non-default policy number and PL1 of CPU The correspondence between the values of the PL2 parameters is also called the second correspondence.
  • the correspondence between the EPO policy number and the EPO Gear value is also called the third correspondence.
  • the value of EPO Gear can represent the state of the EPO switch. In a specific embodiment, the value of EPO Gear is 0, indicating that the EPO switch is in a closed state, and the value of EPO Gear is 1, 2, 3, 4 or 5, indicating that the EPO switch is in an open state.
  • Table 2 is only an example and does not constitute a limitation on the policy table.
  • the policy table The content may include more or less content than in Table 2, and each policy number and corresponding parameter value may be different from those in Table 2.
  • the chip platform type of the CPU is In the case of , the chip policy fusion device can determine the corresponding policy number based on the scene number and the first CPU power consumption scheduling information. The specific method will be elaborated in subsequent embodiments.
  • the chip platform type of the CPU is In this case, the chip policy fusion device can deliver the policy number to the scheduling executor, and the scheduling executor delivers the policy number to the BIOS through WMI.
  • the BIOS delivers the policy number to the CPU, and the CPU runs based on the policy number.
  • the CPU power consumption parameters defined in the AMD platform are of different types from the parameters in the first CPU power consumption scheduling information.
  • the parameter defined in the AMD platform to characterize short-term Turbo frequency power consumption is sustained power limit (SPL)
  • the parameter to characterize long-term Turbo frequency power consumption is SPPT. That is to say, among the parameters defined in the AMD platform, the parameter corresponding to PL1 in the first CPU power consumption scheduling information is SPL, and the parameter corresponding to PL2 is the slow packet power tracking limit (slow PPT limit, SPPT), where, PPT It is the abbreviation of package power tracking.
  • SPL sustained power limit
  • SPPT slow packet power tracking limit
  • the chip policy fusion device can determine the CPU power consumption parameters defined in the AMD platform that need to be adjusted based on the scene number, and match the power consumption parameters of the CPU defined in the AMD platform with the scene number.
  • the corresponding relationship between the parameters in the CPU power consumption scheduling information is to assign the target value in the first CPU power consumption scheduling information to the corresponding power consumption parameter in the AMD platform to obtain the second CPU power consumption scheduling information.
  • the chip policy fusion device assigns the PL1 target value to SPL and the PL2 target value to SPPT to obtain the second CPU power consumption scheduling information. For details, see the examples described below.
  • the second CPU power consumption scheduling information may not include parameters representing the energy efficiency ratio. That is to say, the EPP in the first CPU power consumption scheduling information does not need to be translated and can be directly sent to the CPU. For details, see step S407.
  • the chip policy fusion device may deliver the second CPU power consumption scheduling information to the scheduling executor.
  • the scheduling executor may deliver the second CPU power consumption scheduling information to the BIOS through WMI.
  • the BIOS delivers the second CPU power consumption scheduling information to the CPU, and the CPU adjusts the power consumption parameters according to the second CPU power consumption scheduling information.
  • the chip policy fusion device can send the EPP target value to the scheduling executor, and the scheduling executor calls the corresponding interface in the power manager, and through the power manager Send the EPP target value to the CPU.
  • the CPU adjusts the CPU's EPP based on the EPP target value.
  • the power manager is also called the processor power module (PPM).
  • the method provided in this embodiment obtains the scene number of the user scene and the scene number corresponding to the first CPU power consumption scheduling information, and determines the chip platform type of the CPU of the electronic device. According to the different chip platform types of the CPU, the first CPU The parameters in the power consumption scheduling information are translated differently to adapt to different types of CPU chip platforms, so that this method of dynamic resource scheduling based on user scenarios can be applied to different electronic devices, improve the compatibility of the method, and then be able to Improve the performance and battery life of different types of electronic devices.
  • the chip platform types of the CPU are as follows: In the case of AMD, the method of translating the first CPU power consumption scheduling information will be described in detail.
  • the chip platform type of the CPU is In the case of , the chip policy fusion device determines the target policy number corresponding to the current first CPU power consumption scheduling information according to the pre-established policy table.
  • a mapping relationship between the policy number and the first CPU power consumption scheduling information can be established based on the first CPU power consumption scheduling information corresponding to each scene number, that is, The policy number corresponds one-to-one with the first CPU power consumption scheduling information.
  • the target policy number corresponding to the current first CPU power consumption scheduling information can be directly determined. If this method is adopted, the policy table needs to be expanded as user scenarios and first CPU power consumption scheduling information increase. Each time a set of first CPU power consumption scheduling information is added, the policy table in the BIOS needs to be expanded. Inconvenient operation.
  • the capacity of the policy table in the BIOS is limited.
  • Each user scenario will have multiple sets of first CPU power consumption scheduling information depending on the system load level (see Table 1). Therefore, as the number of identifiable user scenarios continues to increase, , the policy table will not be able to meet the expansion needs in the future.
  • the information processing method provided in this embodiment determines, based on the first CPU power consumption scheduling information, the policy number corresponding to the PL1 value closest to the PL1 target value in the policy table, and the EPO Gear value closest to the EPO Gear in the policy table The corresponding policy number is used to determine the target policy number. In this way, the number of expansions of the policy table can be reduced, BIOS capacity can be saved, and the policy table can be ensured to be relatively fixed, making operation and maintenance easier.
  • step S403 is to translate the first CPU power consumption scheduling information and output the policy number, including:
  • the target EPO policy number is determined according to the state of the EPO switch and the EPP target value in the first CPU power consumption scheduling information.
  • the chip policy fusion device can determine the PL1 value in the policy table that is closest to the PL1 target value in the first CPU power consumption scheduling information, and determine the policy number corresponding to the closest PL1 value in the policy table as the target DTT policy. Number.
  • the chip platform type of the CPU is: In the case of , ignore PL2 and determine the target DTT strategy number only through the PL1 target value, thereby simplifying the algorithm and improving the efficiency of information translation.
  • the preset EPO strategy number is directly determined as the target EPO strategy number, and the preset EPO strategy number is used to indicate turning off the DTT adjustment function.
  • the chip strategy fusion device can determine the corresponding EPO Gear target value based on the EPP target value, and then determine the EPO Gear value in the strategy table that is closest to the EPO Gear target value, and add it to the strategy table. The strategy number corresponding to the closest EPO Gear value is determined as the target EPO strategy number.
  • FIG. 6 is a schematic flowchart of an example of determining the DTT policy number and the EPO policy number provided by the embodiment of the present application.
  • the execution subject may be the chip policy fusion device shown in Figure 3, which will not be described again.
  • the target DTT policy number and target EPO policy number can be determined according to the following method:
  • Step S601. Determine whether the first CPU power consumption scheduling information is the default policy information; if the first CPU power consumption scheduling policy is the default policy information, execute step S602; if the first CPU power consumption scheduling information is not the default policy information, execute Step S603.
  • the default policy information refers to the CPU power consumption scheduling information corresponding to the default scenario.
  • the scene number it can be determined according to the scene number whether the first CPU power consumption scheduling information is the default policy information. For example, if the scene number of the preset default scene is -1, then the current scene can be judged Whether the number is -1. If so, it indicates that the first CPU power consumption scheduling information is the default policy information. Otherwise, it indicates that the first CPU power consumption scheduling information is not the default policy information.
  • S602. Determine the target DTT policy number according to the system load condition corresponding to the first CPU power consumption scheduling information.
  • the policy table shown in Table 2 includes the policy numbers and power consumption parameters corresponding to the default policies for the three system load levels.
  • the policy number corresponding to the default policy with a system load level of "Heavy” is 0, the policy number corresponding to the default policy with a system load level of "Light” is 40, and the policy number corresponding to the default policy with a system load level of "Medium” is 41 .
  • the corresponding system load level can be determined according to the first CPU power consumption scheduling information, and the policy number corresponding to the default policy of the system load level is determined in the policy table to obtain the target DTT policy number. Specifically, if the system load level corresponding to the first CPU power consumption scheduling information is "heavy”, then determine the target DTT policy number to be 0; if the system load level corresponding to the first CPU power consumption scheduling information is "light”, then determine The target DTT policy number is 40; if the system load level corresponding to the first CPU power consumption scheduling information is "medium”, then the target DTT policy number is determined to be 41.
  • the system load level here can be subscribed to the system load by the chip policy fusion device to the system load probe, and the system load level can be determined based on the system load, or the system load level can be delivered by the load controller along with the scene number to
  • the chip policy fusion device is not limited in the embodiments of this application.
  • the system can also pre-specify a DTT policy number corresponding to a default policy of the system load level (such as a default policy with a load level of "heavy") as the policy number corresponding to all default scenarios. That is to say, as long as the scene number is determined to be -1 and the first CPU power consumption scheduling information is determined to be the default policy information, the specified DTT policy number (for example, 0) is determined as the target DTT policy number without considering the system load. The reason for this is that when the user scenario is the default scenario, the system load is heavy in most cases. Therefore, directly specifying the policy number corresponding to the default policy with a system load level of "heavy" can cover most situations, and It can simplify the information translation process and improve the efficiency of information translation.
  • a default policy of the system load level such as a default policy with a load level of "heavy
  • the PL1 target value in the first CPU power consumption scheduling information can also be determined directly, and if determined The first CPU power consumption scheduling information is the default policy information, and the corresponding policy number can be directly determined.
  • steps S601 and S602 can also be replaced by the following method:
  • the policy number (0) is determined as the target DTT policy number; if not, determine whether the PL1 target value in the first CPU power consumption scheduling information is equal to the PL1 value (12) corresponding to the default policy with the system load level of "light”, If yes, then determine the policy number (40) corresponding to the default policy with the system load level of "light” as the target DTT policy number; if not, determine whether the PL1 target value in the first CPU power consumption scheduling information is equal to the system load level is the value (20) of PL1 corresponding to the default policy of "Medium”. If so, determine the policy number (41) corresponding to the default policy with the system load level of "Medium” as the target DTT policy number.
  • the target DTT policy number is determined according to the following formula (1).
  • step means the PL1 step value in the strategy table (that is, the absolute value of the difference between the PL1 values corresponding to two adjacent DTT strategy numbers).
  • formula (1) can be used to quickly determine the policy number corresponding to the PL1 value in the policy table that is closest to the PL1 target value in the first CPU power consumption scheduling information, so that the target DTT policy can be quickly determined No., there is no need to traverse the query strategy table, which improves the efficiency of information translation.
  • step S604. Determine whether the state of the EPO switch is on. If yes (that is, the state of the EPO switch is on), execute step S605; if not (ie, the state of the EPO switch is on the off state), execute step S606.
  • offset2 indicates the EPO compensation value
  • offset2 can be 50.
  • formula (2) can be used to quickly determine the EPO Gear value in the strategy table that is closest to the EPO Gear target value, so that the target EPO strategy number can be quickly determined without traversing the query strategy table, which improves information translation. efficiency.
  • S606. Determine the preset EPO policy number (50) as the target EPO policy number.
  • the preset EPO policy number is used to indicate turning off the DTT adjustment function.
  • the corresponding EPO policy number is 50, and 50 is directly determined as the target EPO policy number.
  • step S404 may also be performed to adjust the CPU power consumption based on the policy number, which may include the following process:
  • the chip policy fusion device sends the policy number to the scheduling executor, and the scheduling executor sends the policy number to the BIOS through WMI.
  • the BIOS sends the policy number to the CPU, and the CPU runs based on the policy number and adjusts the PL1 of the CPU. and PL2;
  • the chip policy fusion device sends the EPP target value to the scheduling executor, and the scheduling executor calls the power manager
  • the corresponding interface sends the EPP target value to the CPU through the power manager, and the CPU adjusts the EPP of the CPU according to the EPP target value.
  • step S407 For the specific process of 2), please refer to step S407, which will not be described again.
  • a certain policy number in Table 2 can also be designated as a backup policy number in advance.
  • the backup policy number will be delivered to the BIOS by default to ensure normal resource scheduling and improve system stability and reliability.
  • the backup strategy number may be, for example, strategy number 0 in Table 2, and the power parameter corresponding to the backup strategy number also includes the value of EPO Gear.
  • the policy fusion device delivers the backup policy number to the BIOS, and the BIOS delivers the backup policy number to the CPU.
  • the CPU can directly adjust the CPU's PL1, PL2, EPP and other parameters based on the backup policy number.
  • FIG. 7 is a schematic flowchart of an example of translating the first CPU power consumption scheduling information into the second CPU power consumption scheduling information provided by the embodiment of the present application.
  • the above step S405 is to translate the first CPU power consumption scheduling information according to the scene number to obtain the second CPU power consumption scheduling information, including:
  • WMI policy data type also known as WMI policy data type, that is, WMI policy decision date type.
  • the data type is used to represent the type of resource scheduling (or the direction of resource scheduling) of the second scheduling policy information, that is, which type of resource is scheduled.
  • Data types can be predefined by the BIOS.
  • data types can include the following: power limits (power limits) parameters, system temperature tracking (STT) tuning parameters, BIOS fan speed & sound (cool quiet on lap) event notification, BIOS automatic Mode transfer (auto mode transition) event notification (also known as system interrupt event notification), query OS slider event (slider position event), dynamic power slider notification (dynamic power slider notification) event... system reserved.
  • the power limit parameter is used to represent the type of resource scheduling, which is limiting CPU power
  • the system temperature tracking and tuning parameter is used to represent the type of resource scheduling, which is tracking and adjusting system temperature.
  • Other data types will not be described again.
  • the data type can be determined based on the scene number.
  • a mapping relationship between scene numbers and data types can be established in advance, and the data type corresponding to the current scene number is determined based on the mapping relationship.
  • the data type corresponding to scene number 2-1 (the main scene is an office scene and the sub-scene is a document editing scene) is the power limit parameter.
  • a scene number can correspond to one data type or multiple data types.
  • the data type corresponding to a certain scene number may include both power limitation parameters and STT tuning parameters.
  • Each data type may include one or more parameters defined in the AMD chip platform.
  • the second power consumption scheduling information of each data type may include one or more parameters defined in the AMD chip platform.
  • parameter the data type STT tuning parameters include parameters: STT-SkinTempLimit-APU, STT-SkinTempLimit-HS2, STT-M1, STT-M2, STT-M3, STT-M4, STT-M5, STT-M6, etc.
  • the data type power limit parameters include parameters: FPPT, SPPT, SPPT-APUOnly, SPL and STTMinLimint, etc.
  • APU is the abbreviation of Accelerated Processing Units
  • FPPT is the fast full package power tracking limit fast PPT. Abbreviation for limit.
  • the chip policy fusion device can pre-establish a mapping relationship between each data type and included parameters, determine the parameters included in the data type of the current second CPU power consumption scheduling information based on the mapping relationship, and obtain the target parameters.
  • the parameters included in the first scheduling policy information are also called initial parameters.
  • the initial parameters included in the first CPU power consumption scheduling information may include PL1, PL2, EPP, switch status, etc.
  • the correspondence relationship between the target parameter and the initial parameter included in the first CPU power consumption scheduling information (hereinafter referred to as the fourth correspondence relationship) can be obtained.
  • the fourth correspondence may include the correspondence between all target parameters and some or all of the initial parameters, or may only include the correspondence between the target parameters. Correspondence between some parameters and some or all of the initial parameters.
  • the first CPU power consumption scheduling information may include initial parameters and target values corresponding to all target parameters.
  • the target value of the initial parameter can be set to 0 or empty, or to other preset values. That is, regardless of whether there is an actual corresponding value, the initial parameters are included in the first CPU power consumption scheduling information.
  • the first CPU power consumption scheduling information may also include other parameters besides the initial parameters.
  • the fourth correspondence may include correspondences between all target parameters and some or all of the initial parameters. For example, there are 5 target parameters, and 2 of the initial parameters have actual corresponding values. Then, the first CPU power consumption scheduling information may include 5 initial parameters corresponding to the 5 target parameters. For those parameters that do not have actual corresponding values, 3 initial parameters, whose target value is 0 or empty. In this way, the fourth correspondence includes correspondences between 5 target parameters and 5 initial parameters.
  • the first CPU power consumption scheduling information may also include only the initial parameters and target values corresponding to some of the target parameters. Initial parameters that do not have actual corresponding values are not included in the first CPU Power consumption scheduling information.
  • the fourth correspondence includes a correspondence between some of the target parameters and some or all of the initial parameters. Continuing the above example, for example, if there are 5 target parameters and 2 of the initial parameters have actual corresponding values, then the first CPU power consumption scheduling information can only include 2 initial parameters with actual corresponding values, excluding those that do not. 3 parameters that actually correspond to values. In this way, the fourth corresponding relationship includes the corresponding relationship between 2 parameters among the 5 target parameters and the 2 initial parameters.
  • the fourth correspondence includes a correspondence between at least one parameter among the target parameters and at least one parameter among the initial parameters.
  • the target parameters include: FPPT, SPPT, SPPT-APUOnly, SPL and STTMinLimint, etc.
  • the initial parameters include PL1, PL2, EPP, switch status, etc.
  • the fourth corresponding relationship includes SPL, SPPT and initial parameters among the target parameters.
  • the corresponding relationship between PL1 and PL2 in , where SPL corresponds to PL1 and SPPT corresponds to PL2.
  • the value of the parameter of the first CPU power consumption scheduling information (that is, the target value) is assigned to the corresponding target parameter.
  • the fourth corresponding relationship includes the corresponding relationship between all target parameters and some or all of the initial parameters
  • all target parameters can be assigned one by one according to the corresponding relationship.
  • the target parameter when assigning In the process of setting the value, for the target parameter that does not have a corresponding initial parameter in the fourth relationship, the target parameter can be assigned a value of 0, a null value, or other preset values.
  • the PL1 target value is assigned to SPL
  • the PL2 target value is assigned to SPPT
  • 0 or null values are assigned to FPPT, SPPT-APUOnly, and STTMinLimint to obtain the second CPU power consumption scheduling information.
  • the value can be assigned multiple times according to the data type, and a second CPU power consumption scheduling information is generated each time, and the second CPU power consumption scheduling information generated each time is Information is sent to the BIOS. That is to say, when there are multiple data types corresponding to the scene number, multiple second CPU power consumption scheduling information is generated, and the multiple second CPU power consumption scheduling information is sent to the BIOS in multiple times.
  • the data type corresponding to a certain scene number includes both power limitation parameters and STT tuning parameters
  • the power consumption scheduling information A sends the second CPU power consumption scheduling information A to the BIOS.
  • parameters corresponding to the STT tuning parameters can be assigned according to the first CPU power consumption scheduling information, second CPU power consumption scheduling information B is generated, and the second CPU power consumption scheduling information B is sent to the BIOS.
  • multiple second CPU power consumption scheduling information is generated, and the multiple second CPU power consumption scheduling information is sent to the BIOS in multiple times, which can prevent the information translation process Eliminate data confusion and improve the accuracy of information translation.
  • the chip policy fusion device can also generate a data level of the second CPU power consumption scheduling information based on the scenario information, and deliver the data level to the BIOS for convenience Used during BIOS data processing.
  • the specific instructions are as follows:
  • the chip policy fusion unit outputs the second CPU power consumption scheduling information and sends the second CPU power consumption scheduling information to the scheduling executor, and the scheduling executor delivers the second CPU power consumption scheduling information to the BIOS through WMI.
  • the BIOS can have multiple processing methods, such as:
  • the BIOS can directly deliver the second CPU power consumption scheduling information to the CPU, and the CPU adjusts the power consumption according to the second CPU power consumption scheduling information, as described in the above embodiment.
  • the BIOS can also compare or fuse the second CPU power consumption scheduling information with other power consumption scheduling information, decide on the final CPU power consumption scheduling information, and send the final CPU power consumption scheduling information to the CPU, and the CPU will execute the final CPU power consumption scheduling information to adjust power consumption.
  • the embedded controller Embedded Controller, EC
  • SCI system control interrupt
  • the third CPU power consumption scheduling information is sent to the BIOS.
  • the BIOS After receiving the second CPU power consumption scheduling information and the third CPU power consumption scheduling information, the BIOS can decide the final CPU power consumption scheduling information according to the preset decision rules.
  • the information processing method provided by the embodiment of the present application may also include:
  • the chip policy fusion device determines the data level of the second CPU power consumption scheduling information based on the scene number
  • the chip policy fusion device sends the data level to the BIOS.
  • Data level also known as WMI policy data level, i.e. WMI policy decision date level, is used to represent the final scheduling policy information and the final CPU power consumption scheduling information process based on the second scheduling policy information and the third scheduling policy information.
  • the The data level of the second CPU power consumption scheduling information is used to represent the second CPU power consumption scheduling information issued through WMI during the process of deciding the final CPU power consumption scheduling information based on the second CPU power consumption scheduling information and the third CPU power consumption scheduling information. level of importance or priority.
  • the data level may include low level, normal level and high level.
  • the low level is used to indicate that in the process of deciding the final CPU power consumption scheduling information based on the second CPU power consumption scheduling information and the third CPU power consumption scheduling information, the second CPU power consumption scheduling information has the lowest importance level or priority level.
  • the second CPU power consumption scheduling information can be ignored in the process of deciding the final CPU power consumption scheduling information based on the second CPU power consumption scheduling information and the third CPU power consumption scheduling information.
  • the final CPU power consumption scheduling information is determined only based on the third CPU power consumption scheduling information.
  • the normal level is used to represent that in the process of deciding the final CPU power consumption scheduling information based on the second CPU power consumption scheduling information and the third CPU power consumption scheduling information, the importance level or priority level of the second CPU power consumption scheduling information is medium, which is different from that of the third CPU power consumption scheduling information.
  • the CPU power consumption scheduling information is of equal importance.
  • the second CPU power consumption scheduling information and the third CPU power consumption scheduling information are compared or integrated to obtain the final CPU power consumption scheduling information.
  • the high level is used to indicate that in the process of deciding the final CPU power consumption scheduling information based on the second CPU power consumption scheduling information and the third CPU power consumption scheduling information, the second CPU power consumption scheduling information has the highest importance level or priority level.
  • the third CPU power consumption scheduling information can be ignored in the process of deciding the final CPU power consumption scheduling information based on the second CPU power consumption scheduling information and the third CPU power consumption scheduling information.
  • the final CPU power consumption scheduling information is determined only based on the second CPU power consumption scheduling information.
  • the data level can be determined based on the scene number.
  • a mapping relationship between scene numbers and data levels can be established in advance, and the data level corresponding to the current scene number is determined based on the mapping relationship.
  • the data level corresponding to scene number 5-1 (the main scene is the performance evaluation scene and the sub-scenario is the main evaluation scene) is high level.
  • the data level corresponding to scene number -1 (default scene) is low level.
  • the data level corresponding to the default scene can be set to a low level, that is, according to the second CPU function
  • the second CPU power consumption scheduling information can be ignored in the process of determining the final CPU power consumption scheduling information based on the consumption scheduling information and the third CPU power consumption scheduling information, and the final CPU power consumption scheduling information is determined by the third CPU power consumption scheduling information.
  • the data level of the second CPU power consumption scheduling information is also generated according to the scene number, and the data level is sent to the BIOS, so that the BIOS can calculate the second CPU power consumption scheduling information according to the data level and the second CPU power consumption scheduling information.
  • the CPU power consumption scheduling information and the third CPU power consumption scheduling information are decided to generate final CPU power consumption scheduling information.
  • the final CPU power consumption scheduling decision not only refers to a variety of CPU power consumption scheduling information, but also fully considers the importance of various CPU scheduling information to the decision-making in different scenarios, improving the accuracy and accuracy of the final CPU power consumption scheduling. reliability.
  • the electronic device includes corresponding hardware and/or software modules that perform each function.
  • the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is performed by hardware or computer software driving the hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions in conjunction with the embodiments for each specific application, but such implementations should not be considered to be beyond the scope of this application.
  • Embodiments of the present application can divide the electronic device into functional modules according to the above method examples.
  • the electronic device can be divided into functional modules corresponding to each function, such as a detection unit, a processing unit, a display unit, etc., or two or more functions integrated into one module.
  • the above integrated modules can be implemented in the form of hardware or software function modules. It should be noted that the division of modules in the embodiment of the present application is schematic and is only a logical function division. In actual implementation, there may be other division methods.
  • the electronic device provided in this embodiment is used to execute the above information processing method, and therefore can achieve the same effect as the above implementation method.
  • the electronic device may also include processing modules, storage modules and communication modules.
  • the processing module can be used to control and manage the actions of the electronic device.
  • the storage module can be used to support electronic devices to execute stored program codes and data, etc.
  • the communication module can be used to support communication between electronic devices and other devices.
  • the processing module may be a processor or a controller. It may implement or execute the various illustrative logical blocks, modules, and circuits described in connection with this disclosure.
  • a processor can also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and a microprocessor, etc.
  • the storage module may be a memory.
  • the communication module can specifically be a radio frequency circuit, a Bluetooth chip, a Wi-Fi chip and other devices that interact with other electronic devices.
  • the electronic device involved in this embodiment may be a device with the structure shown in Figure 1 .
  • the chip system includes at least one processor 801 and at least one interface circuit 802 .
  • the processor 801 and the interface circuit 802 may be interconnected by wires.
  • interface circuitry 802 may be used to receive signals from other devices, such as memory of an electronic device.
  • interface circuit 802 may be used to send signals to other devices (eg, processor 801).
  • the interface circuit 802 can read instructions stored in the memory and send the instructions to the processor 801 .
  • the electronic device can be caused to perform various steps in the above embodiments.
  • the chip system may also include other discrete devices, which are not specifically limited in the embodiments of this application.
  • Embodiments of the present application also provide a computer-readable storage medium.
  • a computer program is stored in the computer-readable storage medium. When the computer program is executed by a processor, it causes the processor to execute the information processing method of any of the above embodiments.
  • An embodiment of the present application also provides a computer program product.
  • the computer program product When the computer program product is run on a computer, it causes the computer to perform the above related steps to implement the information processing method in the above embodiment.
  • inventions of the present application also provide a device.
  • This device may be a chip, a component or a module.
  • the device may include a connected processor and a memory.
  • the memory is used to store computer execution instructions.
  • the processor can execute computer execution instructions stored in the memory, so that the chip executes the information processing method in each of the above method embodiments.
  • the electronic devices, computer-readable storage media, computer program products or chips provided in this embodiment are all used to execute the corresponding methods provided above. Therefore, the beneficial effects they can achieve can be referred to the above provided The beneficial effects of the corresponding methods will not be described again here.
  • the disclosed devices and methods can be implemented in other ways.
  • the device embodiments described above are only illustrative.
  • the division of modules or units is only a logical function division.
  • there may be other division methods for example, multiple units or components may be combined or can be integrated into another device, or some features can be ignored, or not implemented.
  • the coupling or direct coupling or communication connection between each other shown or discussed may be through some interfaces, and the indirect coupling or communication connection of the devices or units may be in electrical, mechanical or other forms.
  • a unit described as a separate component may or may not be physically separate.
  • a component shown as a unit may be one physical unit or multiple physical units, that is, it may be located in one place, or it may be distributed to multiple different places. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • each functional unit in each embodiment of the present application can be integrated into one processing unit, each unit can exist physically alone, or two or more units can be integrated into one unit.
  • the above integrated units can be implemented in the form of hardware or software functional units.
  • Integrated units may be stored in a readable storage medium if they are implemented in the form of software functional units and sold or used as independent products.
  • the technical solutions of the embodiments of the present application are essentially or contribute to the existing technology, or all or part of the technical solution can be embodied in the form of a software product, and the software product is stored in a storage medium , including several instructions to cause a device (which can be a microcontroller, a chip, etc.) or a processor to execute all or part of the steps of the methods of various embodiments of the present application.
  • the aforementioned storage media include: U disk, mobile hard disk, read only memory (ROM), random access memory (RAM), magnetic disk or optical disk and other media that can store program code.

Abstract

Provided in the embodiments of the present application are an information processing method and an electronic device. The method comprises: acquiring current scenario information and first scheduling policy information corresponding to the current scenario information, wherein the current scenario information represents a user scenario corresponding to a service which is currently processed by an electronic device; if the chip platform type of a central processing unit (CPU) of the electronic device is a first type, determining a target policy identifier corresponding to the first scheduling policy information, and performing resource scheduling on the electronic device according to the target policy identifier and by means of the CPU of the first type; and if the chip platform type of the CPU of the electronic device is a second type, determining second scheduling policy information according to the current scenario information and the first scheduling policy information, and performing resource scheduling on the electronic device according to the second scheduling policy information and by means of the CPU of the second type. The method can be suitable for electronic devices of different CPU chip platform types.

Description

信息处理方法和电子设备Information processing methods and electronic devices
本申请要求于2022年06月28日提交国家知识产权局、申请号为202210745011.7、申请名称为“信息处理方法和电子设备”的中国专利申请的优先权,以及要求于2022年05月16日提交国家知识产权局、申请号为202210530863.4、申请名称为“参数转译方法和电子设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application requires the priority of the Chinese patent application with the application number 202210745011.7 and the application name "Information Processing Method and Electronic Device" submitted to the State Intellectual Property Office on June 28, 2022, and requires submission on May 16, 2022 The State Intellectual Property Office has the right of priority to the Chinese patent application with application number 202210530863.4 and the application title "Parameter Translation Method and Electronic Device", the entire content of which is incorporated into this application by reference.
技术领域Technical field
本申请涉及电子技术领域,具体涉及一种信息处理方法和电子设备。This application relates to the field of electronic technology, and specifically to an information processing method and electronic equipment.
背景技术Background technique
当今社会,电子设备已成为人们日常生活和工作中必不可少的物品。电子设备较优的性能以及在移动场景下较长的续航能给用户带来不一样的体验。性能和续航的提升,主要在于电子设备的资源调度。In today's society, electronic devices have become indispensable items in people's daily life and work. The superior performance of electronic devices and long battery life in mobile scenarios can bring different experiences to users. The improvement of performance and battery life mainly lies in the resource scheduling of electronic devices.
相关技术中,存在一种资源调度方法,通过识别电子设备当前的用户场景,并结合用户场景和电子设备的系统负载等确定资源调度策略,将资源调度策略下发至中央处理器(central processing unit,CPU),CPU基于资源调度策略对资源进行调度,从而降低电子设备的功耗,延长续航,并能够合理分配资源,保证应用程序的流畅运行,提高电子设备的性能。In related technology, there is a resource scheduling method that identifies the current user scenario of the electronic device, determines the resource scheduling strategy based on the user scenario and the system load of the electronic device, and sends the resource scheduling strategy to the central processing unit (central processing unit). , CPU), the CPU schedules resources based on resource scheduling strategies, thereby reducing the power consumption of electronic devices, extending battery life, and rationally allocating resources to ensure the smooth operation of applications and improve the performance of electronic devices.
然而,不同电子设备的CPU的芯片平台类型可能不同,因此,在基于资源调度策略进行资源调度时,需要对资源调度策略进行转译。However, the chip platform types of CPUs of different electronic devices may be different. Therefore, when resource scheduling is performed based on the resource scheduling policy, the resource scheduling policy needs to be translated.
发明内容Contents of the invention
本申请提供了一种信息处理方法和电子设备,能够对调度策略信息进行转译,使资源调度策略信息适用不同的CPU芯片平台类型,提高电子设备的兼容性。This application provides an information processing method and electronic device, which can translate scheduling policy information, make the resource scheduling policy information applicable to different CPU chip platform types, and improve the compatibility of electronic devices.
第一方面,本申请提供一种信息处理方法,所述方法由电子设备执行,所述方法包括:获取当前场景信息和当前场景信息对应的第一调度策略信息;当前场景信息表征电子设备当前处理的业务所对应的用户场景;若电子设备的CPU的芯片平台类型为第一类型,则确定第一调度策略信息对应的目标策略标识,根据目标策略标识通过第一类型的CPU对电子设备进行资源调度;若电子设备的CPU的芯片平台类型为第二类型,则根据当前场景信息和第一调度策略信息,确定第二调度策略信息,根据第二调度策略信息通过第二类型的CPU对电子设备进行资源调度。In a first aspect, this application provides an information processing method. The method is executed by an electronic device. The method includes: obtaining current scene information and first scheduling policy information corresponding to the current scene information; the current scene information represents the current processing of the electronic device. The user scenario corresponding to the business; if the chip platform type of the CPU of the electronic device is the first type, determine the target policy identifier corresponding to the first scheduling policy information, and use the CPU of the first type to resource the electronic device according to the target policy identifier. Scheduling; if the chip platform type of the CPU of the electronic device is the second type, determine the second scheduling strategy information based on the current scene information and the first scheduling strategy information, and use the second type CPU to schedule the electronic device according to the second scheduling strategy information. Carry out resource scheduling.
具体的,场景信息例如可以为场景号或场景名称等。第一调度策略信息也称为CPU调度策略,为需要下发至CPU执行以对电子设备进行资源调度的信息。可选的,第一调度策略信息例如可以为第一CPU功耗调度信息。策略标识例如可以为策略号或策略名称等。Specifically, the scene information may be, for example, a scene number or a scene name. The first scheduling policy information is also called a CPU scheduling policy and is information that needs to be sent to the CPU for execution to schedule resources for the electronic device. Optionally, the first scheduling policy information may be, for example, first CPU power consumption scheduling information. The policy identifier may be, for example, a policy number or a policy name.
可选,第一类型可以为芯片平台。第二类型可以为 (Advanced Micro Devices,AMD)芯片平台。也就是说,若电子设备的CPU的芯片平台类型为Intel芯片平台,则根据第一调度策略信息确定对应的目标策略标识。目标策略标识能够被Intel CPU芯片识别,Intel CPU芯片能够根据目标策略标识进行资源调度。若电子设备的CPU的芯片平台类型为AMD芯片平台,则根据当前场景信息和第一调度策略信 息,确定第二调度策略信息。第二调度策略信息能够被AMD CPU芯片识别,AMD CPU芯片能够根据第二调度策略信息进行资源调度。Optional, the first type can be chip platform. The second type can be (Advanced Micro Devices, AMD) chip platform. That is to say, if the chip platform type of the CPU of the electronic device is an Intel chip platform, the corresponding target policy identifier is determined according to the first scheduling policy information. The target policy identifier can be recognized by the Intel CPU chip, and the Intel CPU chip can schedule resources based on the target policy identifier. If the chip platform type of the CPU of the electronic device is an AMD chip platform, based on the current scene information and the first scheduling policy information information to determine the second scheduling policy information. The second scheduling policy information can be recognized by the AMD CPU chip, and the AMD CPU chip can perform resource scheduling based on the second scheduling policy information.
换句话说,本申请第一方面提供的方法,通过获取当前场景信息和当前场景信息对应的第一调度策略信息,根据CPU的芯片平台类型的不同,对第一调度策略信息进行不同的转译,以适配不同类型的CPU芯片平台。这样,在根据用户场景进行动态资源调度时,生成的调度策略信息能够被不同类型的芯片平台识别,从而使这种根据用户场景进行动态资源调度的方法能够适用不同类型的电子设备,提高该方法的兼容性,进而能够提升不同类型的电子设备的性能和续航能力。In other words, the method provided in the first aspect of this application obtains the current scene information and the first scheduling policy information corresponding to the current scene information, and performs different translations on the first scheduling policy information according to the different chip platform types of the CPU. To adapt to different types of CPU chip platforms. In this way, when dynamic resource scheduling is performed based on user scenarios, the generated scheduling policy information can be recognized by different types of chip platforms, so that this method of dynamic resource scheduling based on user scenarios can be applied to different types of electronic devices, improving the method compatibility, thereby improving the performance and battery life of different types of electronic devices.
一种可能的实现方式中,第一调度策略信息中包括长时睿频功耗(power limit1,PL1)目标值、能效比(energy performance preference,EPP)目标值和能效性能优化(energy performance optimize,EPO)开关的状态,目标策略标识包括目标动态调谐技术(dynamic tuning technology,DTT)策略标识和目标EPO策略标识;确定第一调度策略信息对应的目标策略标识,根据目标策略标识通过第一类型的CPU对电子设备进行资源调度,包括:获取第一调度策略信息对应的当前系统负载;根据PL1目标值或当前系统负载确定目标DTT策略标识;根据EPO开关的状态确定目标EPO策略标识;根据目标DTT策略标识通过第一类型的CPU调整CPU的功率,并根据目标EPO策略标识和EPP目标值,通过第一类型的CPU调整CPU的能效比。In a possible implementation, the first scheduling policy information includes a long-term turbo power consumption (power limit1, PL1) target value, an energy efficiency ratio (energy performance preference, EPP) target value and an energy performance optimization (energy performance optimize, EPO) switch status, the target policy identifier includes the target dynamic tuning technology (DTT) policy identifier and the target EPO policy identifier; determine the target policy identifier corresponding to the first scheduling strategy information, and pass the first type of The CPU performs resource scheduling on electronic devices, including: obtaining the current system load corresponding to the first scheduling policy information; determining the target DTT policy identifier based on the PL1 target value or the current system load; determining the target EPO policy identifier based on the status of the EPO switch; and determining the target DTT policy identifier based on the target DTT The policy identifier adjusts the power of the CPU through the first type of CPU, and adjusts the energy efficiency ratio of the CPU through the first type of CPU according to the target EPO policy identifier and the EPP target value.
该实现方式中,通过确定目标DTT策略标识,并根据目标DTT策略标识调整CPU功耗,通过确定目标EPO标识,并根据目标EPO标识调整CPU能效比,既实现了功耗调整,又实现了能效比调整,能够有效降低CPU功耗,提升电子设备续航能力。In this implementation, by determining the target DTT policy identifier and adjusting the CPU power consumption according to the target DTT policy identifier, and by determining the target EPO identifier and adjusting the CPU energy efficiency ratio according to the target EPO identifier, both power consumption adjustment and energy efficiency are achieved. Ratio adjustment can effectively reduce CPU power consumption and improve the battery life of electronic devices.
一种可能的实现方式中,根据PL1目标值或当前系统负载确定目标DTT策略标识,包括:若第一调度策略信息为默认场景对应的策略信息,则根据第一对应关系,确定与当前系统负载对应的目标DTT策略标识;第一对应关系中包括至少一个默认策略标识与至少一个系统负载的对应关系,至少一个默认策略标识中包括目标DTT策略标识;默认场景是指除预设场景外的其他用户场景,默认策略标识是指默认场景对应的DTT策略标识;若第一调度策略信息不为默认场景对应的策略信息,则根据第二对应关系,确定与PL1目标值最接近的PL1值对应的目标DTT策略标识;第二对应关系中包括多个非默认策略标识与多个PL1值的对应关系,多个非默认策略标识中包括目标DTT策略标识;非默认策略标识是指非默认场景对应的DTT策略标识。In one possible implementation, determining the target DTT policy identifier based on the PL1 target value or the current system load includes: if the first scheduling policy information is policy information corresponding to the default scenario, determining the target DTT policy identifier based on the first correspondence relationship with the current system load. The corresponding target DTT policy identifier; the first correspondence includes a correspondence between at least one default policy identifier and at least one system load, and the at least one default policy identifier includes the target DTT policy identifier; the default scenario refers to other than the preset scenario In user scenarios, the default policy identifier refers to the DTT policy identifier corresponding to the default scenario; if the first scheduling policy information is not the policy information corresponding to the default scenario, then according to the second correspondence relationship, determine the PL1 value corresponding to the closest PL1 target value The target DTT policy identifier; the second correspondence includes the correspondence between multiple non-default policy identifiers and multiple PL1 values, and the multiple non-default policy identifiers include the target DTT policy identifier; the non-default policy identifier refers to the corresponding non-default scenario DTT policy identifier.
可选的,第一对应关系和第二对应关系可以通过策略表查询。策略表中可以包括DTT策略标识、PL1、PL2以及系统负载等参数中的部分或全部的对应关系。策略表可以由电子设备的基本输入输出系统(basic input output system,BIOS)建立和保存。其中,策略表中可以不包括PL1目标值和PL2目标值。也就是说,策略表可以不完全根据已有的PL1目标值和PL2目标值建立,策略标识与已有的PL1目标值和PL2目标值未必存在一一对应关系。Optionally, the first correspondence relationship and the second correspondence relationship can be queried through the policy table. The policy table may include correspondences between some or all of the parameters such as the DTT policy identifier, PL1, PL2, and system load. The policy table can be created and saved by the basic input output system (BIOS) of the electronic device. The policy table may not include the PL1 target value and the PL2 target value. In other words, the policy table may not be established entirely based on the existing PL1 target value and PL2 target value, and there may not be a one-to-one correspondence between the policy identifier and the existing PL1 target value and PL2 target value.
该实现方式中,在第一调度策略信息为默认场景对应的策略信息的情况下,根据第一对应关系,确定与当前系统负载对应的目标DTT策略标识,能够快速方便的确定出策略标识。在第一调度策略信息不为默认场景对应的策略信息的情况下,根据第二对应关系,确定与PL1目标值最接近的PL1值对应的目标DTT策略标识。这样,策略表中的第三对应 关系中,DTT策略标识无需跟随第一调度策略信息的增加而增加,减少策略表中第二对应关系的扩充次数,节约BIOS容量,且能够保证策略表中第二对应关系的相对固定,便于操作和维护。In this implementation, when the first scheduling policy information is the policy information corresponding to the default scenario, the target DTT policy identifier corresponding to the current system load is determined according to the first correspondence relationship, and the policy identifier can be determined quickly and conveniently. If the first scheduling policy information is not the policy information corresponding to the default scenario, the target DTT policy identifier corresponding to the PL1 value closest to the PL1 target value is determined according to the second correspondence relationship. In this way, the third correspondence in the policy table In the relationship, the DTT policy identifier does not need to increase with the increase of the first scheduling policy information, which reduces the number of expansions of the second corresponding relationship in the policy table, saves BIOS capacity, and can ensure that the second corresponding relationship in the policy table is relatively fixed, making it easy to operate. And maintenance.
一种可能的实现方式中,非默认策略标识为DTT策略号,非默认策略标识中包括至少一组第一DTT策略号,第一DTT策略号中包括多个DTT策略号,且多个DTT策略号按照从小到大的顺序时,相邻两个DTT策略号对应的PL1步进值相等;根据第二对应关系,确定与PL1目标值最接近的PL1值对应的目标DTT策略标识,包括::根据PL1目标值确定目标PL1步进值和目标补偿值;根据PL1目标值、目标PL1步进值和目标补偿值确定目标DTT策略标识。In a possible implementation, the non-default policy identifier is a DTT policy number, the non-default policy identifier includes at least one set of first DTT policy numbers, the first DTT policy number includes multiple DTT policy numbers, and the multiple DTT policies When the numbers are in ascending order, the PL1 step values corresponding to two adjacent DTT policy numbers are equal; according to the second correspondence relationship, the target DTT policy identifier corresponding to the PL1 value closest to the PL1 target value is determined, including: Determine the target PL1 step value and target compensation value based on the PL1 target value; determine the target DTT strategy identification based on the PL1 target value, target PL1 step value, and target compensation value.
也就是说,策略表中,非默认策略标识为多个由大到小排序的DTT策略号,且相邻两个DTT策略号对应的PL1步进值相等。在这种情况下,可以根据PL1目标值确定目标PL1步进值和目标补偿值,再根据PL1目标值、目标PL1步进值和目标补偿值确定目标DTT策略标识。该实现方式中,考虑到极少数场景CPU才会运行在短时睿频状态下,因而在CPU的芯片平台类型为的情况下,忽略PL2,仅通过PL1目标值确定目标DTT策略号,从而简化算法,提高信息转译效率。That is to say, in the policy table, the non-default policy identifiers are multiple DTT policy numbers sorted from large to small, and the PL1 step values corresponding to two adjacent DTT policy numbers are equal. In this case, the target PL1 step value and the target compensation value can be determined based on the PL1 target value, and then the target DTT strategy identifier can be determined based on the PL1 target value, the target PL1 step value, and the target compensation value. In this implementation, considering that the CPU will run in the short-term turbo frequency state in very few scenarios, the chip platform type of the CPU is: In the case of , ignore PL2 and determine the target DTT strategy number only through the PL1 target value, thereby simplifying the algorithm and improving the efficiency of information translation.
一种可能的实现方式中,根据PL1目标值、目标PL1步进值和目标补偿值确定目标DTT策略标识,包括:通过公式(1)确定目标DTT策略标识:
In a possible implementation, determining the target DTT strategy identifier based on the PL1 target value, the target PL1 step value and the target compensation value includes: determining the target DTT strategy identifier through formula (1):
其中,表示向下取整,step表示目标PL1步进值,offset1表示目标补偿值。in, It means rounding down, step means the target PL1 step value, and offset1 means the target compensation value.
该实现方式中,通过公式(1)能够快速的确定出第二对应关系中与第一调度策略信息中的PL1目标值最接近的PL1值对应的策略号,从而能够快速的确定出目标DTT策略标识,无需遍历查询策略表中的第二对应关系,提高信息转译效率。In this implementation, formula (1) can be used to quickly determine the policy number corresponding to the PL1 value in the second correspondence relationship that is closest to the PL1 target value in the first scheduling policy information, so that the target DTT policy can be quickly determined identification, there is no need to traverse the second corresponding relationship in the query strategy table, and the efficiency of information translation is improved.
一种可能的实现方式中,该方法还包括:根据当前场景信息确定第一调度策略信息是否为默认场景对应的策略信息。In a possible implementation, the method further includes: determining whether the first scheduling policy information is policy information corresponding to the default scenario according to the current scenario information.
一种可能的实现方式中,根据EPO开关的状态确定目标EPO策略标识,包括:若EPO开关的状态为关闭状态,则将预设EPO策略标识确定为目标EPO策略标识;根据目标EPO策略标识和EPP目标值,通过第一类型的CPU调整CPU的能效比,包括:根据预设EPO策略标识,通过第一类型的CPU调整CPU的能效比为EPP目标值。In one possible implementation, determining the target EPO policy identifier according to the state of the EPO switch includes: if the state of the EPO switch is off, determining the preset EPO policy identifier as the target EPO policy identifier; determining the target EPO policy identifier according to the target EPO policy identifier and The EPP target value is used to adjust the energy efficiency ratio of the CPU through the first type of CPU, including: adjusting the energy efficiency ratio of the CPU to the EPP target value through the first type of CPU according to the preset EPO policy identifier.
也就是说,在确定EPO开关为关闭状态的情况下,直接能够确定出EPO策略标识为预设EPO策略标识。在确定EPO策略标识为预设EPO策略标识的情况下,电子设备关闭DTT调节功能,直接将CPU的能效比调整为EPP目标值。That is to say, when it is determined that the EPO switch is in a closed state, it can be directly determined that the EPO policy identifier is the default EPO policy identifier. When it is determined that the EPO policy identifier is the preset EPO policy identifier, the electronic device turns off the DTT adjustment function and directly adjusts the energy efficiency ratio of the CPU to the EPP target value.
一种可能的实现方式中,根据EPO开关的状态确定目标EPO策略标识,包括:若EPO开关的状态为打开状态,则根据EPP目标值确定EPO档位目标值,并根据第三对应关系,确定与EPO档位目标值最接近的EPO档位值对应的目标EPO策略标识;第三对应关系中包括多个EPO策略标识与多个EPO档位值的对应关系,多个EPO策略标识中包括目标EPO策略标识;根据目标EPO策略标识和EPP目标值,通过第一类型的CPU调整CPU的能效比,包括:根据目标EPO策略标识对应的EPO档位值,基于DTT,通过第一类型的CPU调整CPU的能效比。In one possible implementation, determining the target EPO policy identifier based on the state of the EPO switch includes: if the state of the EPO switch is on, determining the EPO gear target value based on the EPP target value, and determining the EPO gear target value based on the third corresponding relationship. The target EPO strategy identifier corresponding to the EPO gear value closest to the EPO gear target value; the third correspondence includes the correspondence between multiple EPO strategy identifiers and multiple EPO gear values, and the multiple EPO strategy identifiers include the target EPO policy identifier; according to the target EPO policy identifier and EPP target value, adjust the energy efficiency ratio of the CPU through the first type of CPU, including: according to the EPO gear value corresponding to the target EPO policy identifier, based on DTT, adjust through the first type of CPU CPU energy efficiency ratio.
可选的,第三对应关系也可以通过策略表查询。策略表中包括EPO策略标识、EPO 档位值的对应关系。Optionally, the third corresponding relationship can also be queried through the policy table. The policy table includes the EPO policy identifier, EPO Correspondence between gear values.
该实现方式中,在EPO开关的状态为打开状态的情况下,根据EPP目标值确定EPO档位目标值,并根据第三对应关系确定与EPO档位目标值最接近的EPO档位值对应的目标EPO策略标识。这样,策略表中的第三对应关系中,EPO策略标识无需跟随第一调度策略信息的增加而增加,减少策略表中第三对应关系的扩充次数,节约BIOS容量,且能够保证策略表中第三对应关系的相对固定,便于操作和维护。In this implementation, when the EPO switch is in the open state, the EPO gear target value is determined based on the EPP target value, and the EPO gear value closest to the EPO gear target value is determined based on the third corresponding relationship. Target EPO policy identifier. In this way, in the third corresponding relationship in the policy table, the EPO policy identifier does not need to increase with the increase of the first scheduling policy information, reducing the number of expansions of the third corresponding relationship in the policy table, saving BIOS capacity, and ensuring that the third corresponding relationship in the policy table is The three corresponding relationships are relatively fixed, which facilitates operation and maintenance.
一种可能的实现方式中,多个EPO策略标识为多个EPO策略号,,且多个EPO策略号按照从小到大的顺序时,相邻两个EPO策略号对应的EPO档位步进值相等,根据第三对应关系,确定与EPO档位目标值最接近的EPO档位值对应的目标EPO策略标识,包括:根据公式(2)确定目标EPO策略标识:
In one possible implementation, multiple EPO policies are identified as multiple EPO policy numbers, and when the multiple EPO policy numbers are in ascending order, the EPO gear step values corresponding to two adjacent EPO policy numbers are are equal, according to the third corresponding relationship, determine the target EPO strategy identifier corresponding to the EPO gear value closest to the EPO gear target value, including: determining the target EPO strategy identifier according to formula (2):
其中,表示向下取整,EPP目标值/255为EPO档位目标值,offset2表示EPO档位步进值。in, It means rounding down, EPP target value/255 is the EPO gear target value, and offset2 represents the EPO gear step value.
该实现方式中,通过公式(2)能够快速的确定出第三对应关系中与EPO Gear目标值最接近的EPO Gear值,从而能够快速的确定出目标EPO策略标识,无需遍历查询策略表中的第三对应关系,提高信息转译效率。In this implementation, formula (2) can be used to quickly determine the EPO Gear value closest to the EPO Gear target value in the third corresponding relationship, so that the target EPO policy identifier can be quickly determined without traversing the query policy table. The third correspondence relationship improves the efficiency of information translation.
一种可能的实现方式中,根据当前场景信息和第一调度策略信息,确定第二调度策略信息,包括:根据当前场景信息确定第二调度策略信息的数据类型;获取数据类型中包括的目标参数;获取第一调度策略信息中的初始参数;根据第四对应关系和初始参数的值,对目标参数赋值,得到第二调度策略信息;第四对应关系中包括目标参数中的至少一个参数和初始参数中的至少一个参数的对应关系。In one possible implementation, determining the second scheduling strategy information based on the current scenario information and the first scheduling strategy information includes: determining the data type of the second scheduling strategy information based on the current scenario information; and obtaining the target parameters included in the data type. ; Obtain the initial parameters in the first scheduling strategy information; assign values to the target parameters according to the fourth correspondence and the values of the initial parameters, and obtain the second scheduling strategy information; the fourth correspondence includes at least one parameter in the target parameters and the initial Correspondence of at least one of the parameters.
可选的,第二调度信息的数据类型表征电子设备执行资源调度的类型。目标参数表征第二类型的CPU芯片平台在当前场景下执行第一调度策略信息对应的资源调度时所需要的参数类型。该实现方式中,根据第四对应关系和初始参数的值,对目标参数赋值,得到第二调度策略信息,得到的第二调度策略参数能够被第二类型的CPU芯片平台识别,使第二类型的CPU芯片能够执行资源调度。Optionally, the data type of the second scheduling information represents the type of resource scheduling performed by the electronic device. The target parameters represent the parameter types required by the second type of CPU chip platform when executing resource scheduling corresponding to the first scheduling policy information in the current scenario. In this implementation, according to the fourth corresponding relationship and the value of the initial parameter, the target parameter is assigned a value to obtain the second scheduling strategy information. The obtained second scheduling strategy parameters can be recognized by the second type of CPU chip platform, so that the second type The CPU chip is capable of performing resource scheduling.
一种可能的实现方式中,初始参数包括PL1和短时睿频功耗(power limit1,PL2),目标参数包括持续功率限制(sustained power limit,SPL)和慢整包功率跟踪限制(slow PPT limit,SPPT),第四对应关系包括SPL和PL1的对应关系,以及SPPT与PL2的对应关系;根据第四对应关系和初始参数的值,对目标参数赋值,得到第二调度策略信息,包括:将PL1的值赋值至SPL,将PL2的值赋值至SPPT,得到第二调度策略信息。In one possible implementation, the initial parameters include PL1 and short-term turbo power consumption (power limit1, PL2), and the target parameters include sustained power limit (sustained power limit, SPL) and slow packet power tracking limit (slow PPT limit). , SPPT), the fourth correspondence includes the correspondence between SPL and PL1, and the correspondence between SPPT and PL2; according to the fourth correspondence and the value of the initial parameter, the target parameter is assigned a value to obtain the second scheduling policy information, including: Assign the value of PL1 to SPL, assign the value of PL2 to SPPT, and obtain the second scheduling policy information.
一种可能的实现方式中,第一调度策略信息中还包括EPP目标值,根据第二调度策略信息通过第二类型的CPU对电子设备进行资源调度,包括:根据SPL的值和SPPT的值,通过第二类型的CPU调整CPU的功率;根据EPP目标值,通过第二类型的CPU调整CPU的能效比。In a possible implementation, the first scheduling policy information also includes the EPP target value, and resource scheduling is performed on the electronic device through the second type of CPU according to the second scheduling policy information, including: according to the value of SPL and the value of SPPT, The power of the CPU is adjusted through the second type of CPU; the energy efficiency ratio of the CPU is adjusted through the second type of CPU according to the EPP target value.
一种可能的实现方式中,根据第二调度策略信息通过第二类型的CPU对电子设备进行资源调度,包括:获取第三调度策略信息,第三调度策略信息为电子设备的嵌入式控制器(Embedded Controller,EC)生成的调度策略信息;根据第二调度策略信息和第三调度策略信息,确定最终调度策略信息;在电子设备的CPU的芯片平台类型为第二类型的情况下, 该方法还包括:根据当前场景信息获取第一调度策略信息的数据等级;数据等级表征根据第二调度策略信息和第三调度策略信息确定最终调度策略信息的过程中,第二调度策略信息的重要程度。In one possible implementation, resource scheduling is performed on the electronic device through the second type of CPU according to the second scheduling policy information, including: obtaining third scheduling policy information, where the third scheduling policy information is an embedded controller ( Scheduling strategy information generated by Embedded Controller (EC); determine the final scheduling strategy information based on the second scheduling strategy information and the third scheduling strategy information; when the chip platform type of the CPU of the electronic device is the second type, The method also includes: obtaining a data level of the first scheduling strategy information based on the current scene information; the data level represents the importance of the second scheduling strategy information in the process of determining the final scheduling strategy information based on the second scheduling strategy information and the third scheduling strategy information. degree.
可选的,数据等级可以包括低等级(low level)、正常等级(normal level)和高等级(high level)。Optionally, data levels can include low level, normal level and high level.
低等级表征根据第二调度策略信息和第三调度策略信息决策最终调度策略信息过程中,第二调度策略信息的重要等级或优先等级最低。在一个具体的实施例中,数据等级为低等级时,根据第二调度策略信息和第三调度策略信息决策最终调度策略信息过程中可以忽略第二调度策略信息,仅根据第三调度策略信息决策出最终的调度策略信息。The low level indicates that in the process of deciding the final scheduling policy information based on the second scheduling policy information and the third scheduling policy information, the second scheduling policy information has the lowest importance level or priority level. In a specific embodiment, when the data level is low, the second scheduling strategy information can be ignored in the process of deciding the final scheduling strategy information based on the second scheduling strategy information and the third scheduling strategy information, and the decision can be made based only on the third scheduling strategy information. Output the final scheduling policy information.
正常等级表征根据第二调度策略信息和第三调度策略信息决策最终调度策略信息过程中,第二调度策略信息的重要等级或优先等级为中等,与第三调度策略信息的重要程度相当,将第二调度策略信息和第三调度策略信息比较或融合得到最终的调度策略信息。The normal level indicates that in the process of deciding the final scheduling policy information based on the second scheduling policy information and the third scheduling policy information, the importance level or priority level of the second scheduling policy information is medium, which is equivalent to the importance of the third scheduling policy information. The second scheduling strategy information and the third scheduling strategy information are compared or integrated to obtain the final scheduling strategy information.
高等级表征根据第二调度策略信息和第三调度策略信息决策最终调度策略信息过程中,第二调度策略信息的重要等级或优先等级最高。在一个具体的实施例中,数据等级为高等级时,根据第二调度策略信息和第三调度策略信息决策最终调度策略信息过程中可以忽略第三调度策略信息,仅根据第二调度策略信息决策出最终的调度策略信息。The high level indicates that in the process of deciding the final scheduling policy information based on the second scheduling policy information and the third scheduling policy information, the second scheduling policy information has the highest importance level or priority level. In a specific embodiment, when the data level is a high level, the third scheduling strategy information can be ignored in the process of deciding the final scheduling strategy information based on the second scheduling strategy information and the third scheduling strategy information, and the decision can be made based only on the second scheduling strategy information. Output the final scheduling policy information.
一种可能的实现方式中,该方法还包括:获取电子设备的CPU芯片的供应商标识(vendor identification,VID);根据VID确定电子设备的CPU的芯片平台类型。In a possible implementation, the method further includes: obtaining a vendor identification (VID) of the CPU chip of the electronic device; and determining the chip platform type of the CPU of the electronic device based on the VID.
该实现方式中,通过VID能够简单、快速的确定CPU的芯片平台类型,提高信息转译的效率。In this implementation, the chip platform type of the CPU can be determined simply and quickly through VID, thereby improving the efficiency of information translation.
第二方面,本申请提供一种装置,该装置包含在电子设备中,该装置具有实现上述第一方面及上述第一方面的可能实现方式中电子设备行为的功能。功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。硬件或软件包括一个或多个与上述功能相对应的模块或单元。例如,接收模块或单元、处理模块或单元等。In a second aspect, the present application provides a device, which is included in an electronic device and has the function of realizing the behavior of the electronic device in the above-mentioned first aspect and possible implementations of the above-mentioned first aspect. Functions can be implemented by hardware, or by hardware executing corresponding software. Hardware or software includes one or more modules or units corresponding to the above functions. For example, receiving module or unit, processing module or unit, etc.
第三方面,本申请提供一种电子设备,电子设备包括:处理器、存储器和接口;处理器、存储器和接口相互配合,使得电子设备执行第一方面的技术方案中任意一种方法。In a third aspect, this application provides an electronic device. The electronic device includes: a processor, a memory, and an interface; the processor, the memory, and the interface cooperate with each other to enable the electronic device to execute any method in the technical solution of the first aspect.
第四方面,本申请提供一种芯片,包括处理器。处理器用于读取并执行存储器中存储的计算机程序,以执行第一方面及其任意可能的实现方式中的方法。In a fourth aspect, this application provides a chip including a processor. The processor is configured to read and execute the computer program stored in the memory to perform the method of the first aspect and any possible implementation thereof.
可选的,芯片还包括存储器,存储器与处理器通过电路或电线连接。Optionally, the chip also includes a memory, and the memory is connected to the processor through circuits or wires.
进一步可选的,芯片还包括通信接口。Further optionally, the chip also includes a communication interface.
第五方面,本申请提供一种计算机可读存储介质,计算机可读存储介质中存储了计算机程序,当计算机程序被处理器执行时,使得该处理器执行第一方面的技术方案中任意一种方法。In a fifth aspect, this application provides a computer-readable storage medium. A computer program is stored in the computer-readable storage medium. When the computer program is executed by a processor, the processor is caused to execute any one of the technical solutions of the first aspect. method.
第六方面,本申请提供一种计算机程序产品,计算机程序产品包括:计算机程序代码,当计算机程序代码在电子设备上运行时,使得该电子设备执行第一方面的技术方案中任意一种方法。In a sixth aspect, the present application provides a computer program product. The computer program product includes: computer program code. When the computer program code is run on an electronic device, it causes the electronic device to execute any method in the technical solution of the first aspect.
附图说明Description of the drawings
图1是本申请实施例提供的一例电子设备100的结构示意图;Figure 1 is a schematic structural diagram of an electronic device 100 provided by an embodiment of the present application;
图2是本申请实施例提供的另一例电子设备100的软件结构框图; Figure 2 is a software structure block diagram of another electronic device 100 provided by an embodiment of the present application;
图3是本申请实施例提供的一例电子设备100对资源进行调度的软件及硬件的工作流程示意图;Figure 3 is a schematic workflow diagram of an example of software and hardware scheduling of resources by the electronic device 100 provided by the embodiment of the present application;
图4是本申请实施例提供的一例信息处理方法及根据转译结果进行功耗调度的流程示意图;Figure 4 is a schematic flowchart of an example of an information processing method and power consumption scheduling based on translation results provided by an embodiment of the present application;
图5是本申请实施例提供的一例信息处理方法中电子设备各模块的交互示意图;Figure 5 is a schematic diagram of the interaction of various modules of the electronic device in an example of the information processing method provided by the embodiment of the present application;
图6是本申请实施例提供的一例确定DTT策略号和EPO策略号的流程示意图;Figure 6 is a schematic flow chart of an example of determining the DTT policy number and the EPO policy number provided by the embodiment of the present application;
图7是本申请实施例提供的一例将第一CPU功耗调度信息转译为第二CPU功耗调度信息的流程示意图;Figure 7 is a schematic flowchart of an example of translating first CPU power consumption scheduling information into second CPU power consumption scheduling information provided by an embodiment of the present application;
图8是本申请实施例提供的一例芯片系统的结构示意图。FIG. 8 is a schematic structural diagram of an example chip system provided by an embodiment of the present application.
具体实施方式Detailed ways
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行描述。其中,在本申请实施例的描述中,除非另有说明,“/”表示或的意思,例如,A/B可以表示A或B;本文中的“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,在本申请实施例的描述中,“多个”是指两个或多于两个。The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application. Among them, in the description of the embodiments of this application, unless otherwise stated, "/" means or, for example, A/B can mean A or B; "and/or" in this article is only a way to describe related objects. The association relationship means that there can be three relationships. For example, A and/or B can mean: A alone exists, A and B exist simultaneously, and B alone exists. In addition, in the description of the embodiments of this application, "plurality" refers to two or more than two.
以下,术语“第一”、“第二”、“第三”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”、“第三”的特征可以明示或者隐含地包括一个或者更多个该特征。Hereinafter, the terms “first”, “second” and “third” are used for descriptive purposes only and shall not be understood as indicating or implying relative importance or implicitly indicating the quantity of indicated technical features. Thus, features defined as "first", "second", and "third" may explicitly or implicitly include one or more of these features.
在本申请说明书中描述的参考“一个实施例”或“一些实施例”等意味着在本申请的一个或多个实施例中包括结合该实施例描述的特定特征、结构或特点。由此,在本申请说明书中的不同之处出现的语句“在一个实施例中”、“在一些实施例中”、“在其他一些实施例中”、“在另外一些实施例中”等不是必然都参考相同的实施例,而是意味着“一个或多个但不是所有的实施例”,除非是以其他方式另外特别强调。术语“包括”、“包含”、“具有”及它们的变形都意味着“包括但不限于”,除非是以其他方式另外特别强调。Reference in this specification to "one embodiment" or "some embodiments" or the like means that a particular feature, structure or characteristic described in connection with the embodiment is included in one or more embodiments of the application. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. appearing in different places in the description of this application are not Reference is necessarily to the same embodiment, but rather to "one or more but not all embodiments" unless otherwise specifically emphasized. The terms “including,” “includes,” “having,” and variations thereof all mean “including but not limited to,” unless otherwise specifically emphasized.
为更好地理解本申请实施例,以下对实施例中可能涉及的术语或概念进行解释说明。In order to better understand the embodiments of the present application, terms or concepts that may be involved in the embodiments are explained below.
长时睿频功耗(power limit1,PL1),指CPU在正常负载下的功耗,相当于热设计功耗,CPU绝大部分时间的运行功耗不超过PL1。Long-term turbo power consumption (power limit1, PL1) refers to the power consumption of the CPU under normal load, which is equivalent to the thermal design power consumption. The CPU's operating power consumption does not exceed PL1 most of the time.
短时睿频功耗(power limit2,PL2),指CPU在短时间内可达到的最高功耗,其具有持续时间限制。一般地,PL2大于PL1。Short-term turbo power consumption (power limit2, PL2) refers to the highest power consumption that the CPU can achieve in a short period of time, which has a duration limit. Generally, PL2 is larger than PL1.
CPU能效比(energy performance preference,EPP),用于反映CPU的调度倾向,其取值范围为0~255。CPU能效比越小,则表明CPU趋向于高性能;CPU能效比越高,则表明CPU趋向于低功耗。CPU energy efficiency ratio (EPP) is used to reflect the scheduling tendency of the CPU, and its value range is 0~255. The smaller the CPU energy efficiency ratio, the CPU tends to have high performance; the higher the CPU energy efficiency ratio, the CPU tends to have low power consumption.
动态调谐技术(dynamic tuning technology,DTT),是公司在 处理器和独立显卡之间自动并动态分配功耗,以优化性能并延长电池续航时间的技术,其可以使CPU和GPU的性能得到提升,智能混合工作负载功率平衡。Dynamic tuning technology (DTT), is The company is in processor and Technology that automatically and dynamically allocates power consumption between independent graphics cards to optimize performance and extend battery life. It can improve CPU and GPU performance and intelligently balance workloads for mixed workloads.
能效-性能优化挡位(energy performance optimize gear,EPO Gear)用来表征DTT调节CPU能效比(EPP)的力度。可选的,EPO Gear的取值范围可以为1~5,值越大,调节EPP时越倾向能效;值越小,调节EPP时越倾向性能。 Energy efficiency-performance optimization gear (EPO Gear) is used to represent the strength of DTT in adjusting the CPU energy efficiency ratio (EPP). Optionally, the value range of EPO Gear can be 1 to 5. The larger the value, the more energy-efficient the EPP adjustment is. The smaller the value, the more performance-oriented EPP adjustment is.
供应商标识(vendor identification,VID),又称vendor ID,是代表设备的技术厂商的识别码,即厂商ID。VID是由外围部件互连专业组(peripheral component interconnect special interest group,PCI-SGI)统一编制命名的,是唯一的厂商标识,不允许重名。Vendor identification (VID), also known as vendor ID, represents the identification code of the technology manufacturer of the device, that is, the manufacturer ID. VID is uniformly compiled and named by the peripheral component interconnect special interest group (PCI-SGI). It is a unique manufacturer identification and no duplicate names are allowed.
焦点窗口(focus window),指拥有焦点的窗口。焦点窗口是唯一可以接收键盘输入的窗口。焦点窗口的确定方式与系统的焦点模式(focus mode)关联。焦点窗口的顶层窗口被称为活动窗口(active window)。同一时间只有一个窗口可以是活动窗口。焦点窗口大概率为用户当前需要使用的窗口。Focus window refers to the window that has focus. The focused window is the only window that can receive keyboard input. The way the focus window is determined is related to the system's focus mode. The top-level window of the focused window is called the active window. Only one window can be active at a time. The focus window is most likely the window that the user currently needs to use.
焦点模式,可用于决定鼠标如何使一个窗口获得焦点。一般地,焦点模式可包括三种,分别为:Focus mode can be used to determine how the mouse brings focus to a window. Generally, focus modes can include three types, namely:
(1)点击聚焦(click-to focus),在这种模式下,鼠标点击的窗口即可获得焦点。即当鼠标点击一个可以获得焦点的窗口的任意位置,即可激活该窗口,该窗口便被置于所有窗口的最前面,并接收键盘输入。当鼠标点击其他窗口时,该窗口会失去焦点。(1) Click-to focus. In this mode, the window clicked by the mouse can gain focus. That is, when the mouse clicks anywhere on a window that can get focus, the window can be activated, and the window will be placed at the front of all windows and receive keyboard input. When the mouse clicks on another window, the window loses focus.
(2)焦点跟随鼠标(focus-follow-mouse),在这种模式下,鼠标下的窗口可以获取焦点。即当鼠标移到一个可以获得焦点的窗口的范围内,用户不需要点击窗口的某个地方就可以激活这个窗口,接收键盘输入,但该窗口不一定被置于所有窗口的最前面。当鼠标移出这个窗口的范围时,这个窗口也会随之失去焦点。(2) Focus follows the mouse (focus-follow-mouse). In this mode, the window under the mouse can gain focus. That is, when the mouse moves within the scope of a window that can obtain focus, the user can activate the window and receive keyboard input without clicking somewhere in the window, but the window is not necessarily placed at the front of all windows. When the mouse moves out of the scope of this window, this window will also lose focus.
(3)草率聚焦(sloppy focus),这种焦点模式与focus-follow-mouse比较类似:当鼠标移到一个可以获得焦点的窗口的范围内,用户不需要点击窗口的某个地方就可以激活这个窗口,接收键盘输入,但该窗口不一定被置于所有窗口的最前面。与focus-follow-mouse不同的是,当鼠标移出这个窗口范围时,焦点并不会随之改变,只有当鼠标移动到别的可以接收焦点的窗口时,系统焦点才改变。(3) Sloppy focus, this focus mode is similar to focus-follow-mouse: when the mouse moves within the range of a window that can get focus, the user does not need to click somewhere in the window to activate this A window that receives keyboard input, but the window is not necessarily placed at the front of all windows. Different from focus-follow-mouse, when the mouse moves out of the scope of this window, the focus will not change accordingly. The system focus will only change when the mouse moves to other windows that can receive focus.
进程包括多个线程,线程可以创建窗口。焦点进程为创建焦点窗口的线程所属的进程。A process includes multiple threads, and threads can create windows. The focus process is the process to which the thread that created the focus window belongs.
转译,指对某个形式的数据或信息进行转换处理,得到另一个形式的数据或信息,该另一个形式的数据或信息可以被指定平台所识别。例如,电子设备可以对获得的策略参数进行转译,得到某一类型的CPU芯片平台能够识别的参数。Translation refers to converting a certain form of data or information to obtain another form of data or information, which can be recognized by the designated platform. For example, the electronic device can translate the obtained policy parameters to obtain parameters that can be recognized by a certain type of CPU chip platform.
以下对本申请实施例提供的信息处理方法进行说明。The information processing method provided by the embodiment of the present application is described below.
相关技术中,存在一种资源调度方法,通过识别电子设备当前所处理的业务对应的用户场景,并结合用户场景和电子设备的系统负载等确定资源调度策略,CPU基于资源调度策略对资源进行调度,从而提升电子设备的性能和续航能力。然而,不同电子设备选用的CPU可能不同,CPU的芯片平台类型不同。因此,在CPU基于资源调度策略进行资源调度之前,需要对资源调度策略进行转译。In related technology, there is a resource scheduling method that identifies the user scenario corresponding to the business currently processed by the electronic device and determines the resource scheduling strategy based on the user scenario and the system load of the electronic device. The CPU schedules the resources based on the resource scheduling strategy. , thereby improving the performance and battery life of electronic devices. However, different electronic devices may use different CPUs, and the types of CPU chip platforms may be different. Therefore, before the CPU performs resource scheduling based on the resource scheduling policy, the resource scheduling policy needs to be translated.
有鉴于此,本申请提供一种信息处理方法,在电子设备确定出当前电子设备所处的用户场景以及用户场景对应的调度策略后,能够根据电子设备的CPU的芯片平台类型,对调度策略进行转译,以适配不同类型的CPU芯片平台,从而使得这种根据用户场景进行动态资源调度的方法能够适用不同的电子设备,提高该资源调度方法的兼容性,进而能够提升不同类型的电子设备的性能和续航能力。In view of this, the present application provides an information processing method. After the electronic device determines the user scenario in which the electronic device is currently located and the scheduling policy corresponding to the user scenario, it can perform the scheduling policy according to the chip platform type of the CPU of the electronic device. Translation to adapt to different types of CPU chip platforms, so that this method of dynamic resource scheduling based on user scenarios can be applied to different electronic devices, improve the compatibility of the resource scheduling method, and thus improve the performance of different types of electronic devices. Performance and battery life.
本申请实施例提供的信息处理方法可以应用于笔记本电脑、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本、个人数字助理(personal digital assistant, PDA)、手机、平板电脑、可穿戴设备、车载设备、增强现实(augmented reality,AR)/虚拟现实(virtual reality,VR)设备等电子设备上,本申请实施例对电子设备的具体类型不作任何限制。The information processing method provided by the embodiment of the present application can be applied to notebook computers, ultra-mobile personal computers (UMPC), netbooks, and personal digital assistants. PDA), mobile phones, tablets, wearable devices, vehicle-mounted devices, augmented reality (AR)/virtual reality (VR) devices and other electronic devices. The embodiments of this application do not make any specific types of electronic devices. limit.
示例性的,图1是本申请实施例提供的一例电子设备100的结构示意图。电子设备100可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,无线通信模块150,显示屏160等。For example, FIG. 1 is a schematic structural diagram of an electronic device 100 provided by an embodiment of the present application. The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, and a wireless communication module 150. Display 160 etc.
可以理解的是,本实施例示意的结构并不构成对电子设备100的具体限定。在另一些实施例中,电子设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。It can be understood that the structure illustrated in this embodiment does not constitute a specific limitation on the electronic device 100 . In other embodiments, the electronic device 100 may include more or fewer components than illustrated, some components may be combined, some components may be separated, or components may be arranged differently. The components illustrated may be implemented in hardware, software, or a combination of software and hardware.
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processingunit,GPU),图像信号处理器(image signal processor,ISP),控制器,存储器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processing unit (GPU), an image signal processor ( image signal processor (ISP), controller, memory, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural network processing unit (NPU), etc. . Among them, different processing units can be independent devices or integrated in one or more processors.
控制器可以是电子设备100的神经中枢和指挥中心。控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。The controller may be the nerve center and command center of the electronic device 100 . The controller can generate operation control signals based on the instruction operation code and timing signals to complete the control of fetching and executing instructions.
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in processor 110 is cache memory. This memory may hold instructions or data that have been recently used or recycled by processor 110 . If the processor 110 needs to use the instructions or data again, it can be called directly from the memory. Repeated access is avoided and the waiting time of the processor 110 is reduced, thus improving the efficiency of the system.
在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括I2C接口,集成电路内置音频(inter-integrated circuit sound,I2S)接口,脉冲编码调制(pulsecode modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purpose input/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或USB接口等。In some embodiments, processor 110 may include one or more interfaces. The interface can include I2C interface, integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, pulse code modulation (PCM) interface, universal asynchronous receiver/transmitter (UART) interface, mobile industry Processor interface (mobile industry processor interface, MIPI), general-purpose input/output (GPIO) interface, subscriber identity module (subscriber identity module, SIM) interface, and/or USB interface, etc.
可以理解的是,本实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对电子设备100的结构限定。在另一些实施例中,电子设备100也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。It can be understood that the interface connection relationships between the modules illustrated in this embodiment are only schematic illustrations and do not constitute a structural limitation of the electronic device 100 . In other embodiments, the electronic device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
充电管理模块140用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。充电管理模块140为电池142充电的同时,还可以通过电源管理模块141为电子设备供电。The charging management module 140 is used to receive charging input from the charger. Among them, the charger can be a wireless charger or a wired charger. While the charging management module 140 charges the battery 142, it can also provide power to the electronic device through the power management module 141.
电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110,内部存储器121,外部存储器,显示屏160,和无线通信模块150等供电。在一些实施例中,电源管理模块141和充电管理模块140也可以设置于同一个器件中。 The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and/or the charging management module 140, and supplies power to the processor 110, internal memory 121, external memory, display screen 160, wireless communication module 150, etc. In some embodiments, the power management module 141 and the charging management module 140 may also be provided in the same device.
无线通信模块150可以提供应用在电子设备100上的包括WLAN(如Wi-Fi),蓝牙,全球导航卫星系统(global navigation satellite system,GNSS),调频(frequencymodulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。例如,本申请实施例中,电子设备100可以通过无线通信模块150与终端设备(如无线耳机100)建立蓝牙连接。The wireless communication module 150 can provide technologies applied to the electronic device 100 including WLAN (such as Wi-Fi), Bluetooth, global navigation satellite system (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), short-range wireless communication technology ( Near field communication (NFC), infrared technology (infrared, IR) and other wireless communication solutions. For example, in this embodiment of the present application, the electronic device 100 can establish a Bluetooth connection with a terminal device (such as the wireless headset 100) through the wireless communication module 150.
无线通信模块150可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块150经由天线接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块150还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线转为电磁波辐射出去。The wireless communication module 150 may be one or more devices integrating at least one communication processing module. The wireless communication module 150 receives electromagnetic waves via an antenna, frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110 . The wireless communication module 150 can also receive the signal to be sent from the processor 110, perform frequency modulation on it, amplify it, and convert it into electromagnetic waves through the antenna for radiation.
电子设备100通过GPU,显示屏160,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏160和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。The electronic device 100 implements display functions through a GPU, a display screen 160, an application processor, and the like. The GPU is an image processing microprocessor and is connected to the display screen 160 and the application processor. GPUs are used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or alter display information.
显示屏160用于显示图像,视频等。该显示屏160包括显示面板。The display screen 160 is used to display images, videos, etc. The display screen 160 includes a display panel.
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展电子设备100的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement the data storage function. Such as saving music, videos, etc. files in external memory card.
内部存储器121可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。处理器110通过运行存储在内部存储器121的指令,从而执行电子设备100的各种功能应用以及数据处理。例如,在本申请实施例中,处理器110可以通过执行存储在内部存储器121中的指令,内部存储器121可以包括存储程序区和存储数据区。Internal memory 121 may be used to store computer executable program code, which includes instructions. The processor 110 executes instructions stored in the internal memory 121 to execute various functional applications and data processing of the electronic device 100 . For example, in the embodiment of the present application, the processor 110 can execute instructions stored in the internal memory 121, and the internal memory 121 can include a program storage area and a data storage area.
其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储电子设备100使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。Among them, the stored program area can store an operating system, at least one application program required for a function (such as a sound playback function, an image playback function, etc.). The storage data area may store data created during use of the electronic device 100 (such as audio data, phone book, etc.). In addition, the internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc.
上述电子设备100的软件系统可以采用分层架构,事件驱动架构,微核架构,微服务架构,或云架构。本发明实施例以分层架构的Windows系统为例,示例性说明电子设备100的软件结构。The software system of the above-mentioned electronic device 100 may adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture. This embodiment of the present invention takes a Windows system with a layered architecture as an example to illustrate the software structure of the electronic device 100 .
示例性的,图2为本申请实施例的一例电子设备100的软件结构框图。Illustratively, FIG. 2 is a software structure block diagram of an example electronic device 100 according to the embodiment of the present application.
分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,将Windows系统分为用户态和内核态。其中,用户态包括应用层以及子系统动态链接库。内核态自下而上分为固件层、硬件抽象层(hardware abstraction layer,HAL)、内核和驱动层及执行体。The layered architecture divides the software into several layers, and each layer has clear roles and division of labor. The layers communicate through software interfaces. In some embodiments, the Windows system is divided into user mode and kernel mode. Among them, user mode includes application layer and subsystem dynamic link library. The kernel state is divided into firmware layer, hardware abstraction layer (HAL), kernel and driver layer and execution body from bottom to top.
如图2所示,应用层包括音乐、视频、游戏、办公、社交等应用程序。应用层还包括环境子系统、场景识别引擎以及调度引擎等。其中,图中仅示出部分应用程序,应用层还可以包括其他应用程序,例如购物应用、浏览器等,本申请不做限定。As shown in Figure 2, the application layer includes music, video, games, office, social networking and other applications. The application layer also includes the environment subsystem, scene recognition engine, and scheduling engine. Among them, only some applications are shown in the figure, and the application layer may also include other applications, such as shopping applications, browsers, etc., which are not limited in this application.
环境子系统可以将基本的执行体系统服务的某些子集以特定的形态展示给应用程序,为应用程序提供执行环境。The environment subsystem can present certain subsets of basic execution system services to applications in a specific form, providing an execution environment for applications.
场景识别引擎可以识别电子设备100所处的用户场景,并确定与该用户场景匹配的基 础调度策略。调度引擎可以获取电子设备100的负载情况,并结合电子设备100的负载情况及上述基础调度策略确定符合电子设备100实际运行情况的实际调度策略。其中,关于场景识别引擎和调度引擎的具体内容见后文,在此暂不描述。The scene recognition engine can identify the user scene in which the electronic device 100 is located, and determine the basis matching the user scene. basic scheduling strategy. The scheduling engine can obtain the load condition of the electronic device 100 and determine an actual scheduling strategy that is consistent with the actual operating conditions of the electronic device 100 based on the load condition of the electronic device 100 and the above-mentioned basic scheduling strategy. Among them, the specific content of the scene recognition engine and scheduling engine will be found later and will not be described here.
子系统动态链接库包括API模块,该API模块包括Windows API,Windows原生API等。其中,Windows API,Windows原生API均可以为应用程序提供系统调用入口及内部函数支持,区别在于Windows原生API为Windows系统原生的API。例如,Windows API可包括user.dll、kernel.dll,Windows原生API可包括ntdll.dll。其中,user.dll是Windows用户界面接口,可用于执行创建窗口、发送消息等操作。kernel.dll用于为应用程序提供访问内核的接口。ntdll.dll是重要的Windows NT内核级文件,描述了windows本地NTAPI的接口。当Windows启动时,ntdll.dll就驻留在内存中特定的写保护区域,使别的程序无法占用这个内存区域。The subsystem dynamic link library includes API modules, which include Windows API, Windows native API, etc. Among them, Windows API and Windows native API can provide system call entry and internal function support for applications. The difference is that Windows native API is an API native to the Windows system. For example, Windows API can include user.dll, kernel.dll, and Windows native API can include ntdll.dll. Among them, user.dll is the Windows user interface interface, which can be used to perform operations such as creating windows and sending messages. kernel.dll is used to provide an interface for applications to access the kernel. ntdll.dll is an important Windows NT kernel-level file that describes the Windows local NTAPI interface. When Windows starts, ntdll.dll resides in a specific write-protected area of memory so that other programs cannot occupy this memory area.
执行体包括进程管理器、虚拟内存管理器、安全引用监视器、I/O管理器、Windows管理规范(Windows management instrumentation,WMI)、电源管理器、系统事件驱动(operating system event driver,OsEventDriver)节点、系统与芯片驱动(operatingsystem to System on Chip,OS2SOC)节点等。The execution body includes process manager, virtual memory manager, security reference monitor, I/O manager, Windows management instrumentation (WMI), power manager, operating system event driver (OsEventDriver) node , system and chip driver (operatingsystem to System on Chip, OS2SOC) nodes, etc.
进程管理器用于创建及中止进程和线程。The process manager is used to create and terminate processes and threads.
虚拟内存管理器实现“虚拟内存”。虚拟内存管理器也为高速缓存管理器提供基本的支持。The virtual memory manager implements "virtual memory". The virtual memory manager also provides basic support for the cache manager.
安全引用监视器可在本地计算机上执行安全策略,它保护了操作系统资源,执行运行时对象的保护和监视。The Security Reference Monitor enforces security policies on the local computer, protects operating system resources, and performs runtime object protection and monitoring.
I/O管理器执行独立于设备的输入/输出,并进一步处理调用适当的设备驱动程序。The I/O manager performs device-independent input/output and calls the appropriate device driver for further processing.
电源管理器可管理所有支持电源状态更改的设备的电源状态更改。Power Manager manages power state changes for all devices that support power state changes.
系统事件驱动节点可以与内核和驱动层进行交互,例如与显卡驱动进行交互,在确定存在GPU视频解码事件后,向场景识别引擎上报该GPU视频解码事件。The system event driver node can interact with the kernel and driver layer, for example, with the graphics card driver. After determining that a GPU video decoding event exists, it reports the GPU video decoding event to the scene recognition engine.
系统与芯片驱动节点可供调度引擎向硬件设备发送调整信息,例如向CPU发送调整PL1和PL2的信息。System and chip driver nodes allow the scheduling engine to send adjustment information to hardware devices, such as sending information to adjust PL1 and PL2 to the CPU.
内核和驱动层包括内核以及设备驱动程序。The kernel and driver layer include the kernel and device drivers.
内核是对处理器体系结构的抽象,将执行体与处理器体系结构的差异相隔离,保证系统的可移植性。内核可以进行线程安排和调度、陷阱处理和异常调度、中断处理和调度等。The kernel is an abstraction of the processor architecture, which isolates the differences between the execution body and the processor architecture to ensure the portability of the system. The kernel can perform thread arrangement and scheduling, trap handling and exception scheduling, interrupt handling and scheduling, etc.
设备驱动程序运行在内核模式下,为I/O系统和相关硬件之间的接口。设备驱动程序可包括显卡驱动、Intel DTT驱动、鼠标驱动、音视频驱动、摄像头驱动、键盘驱动等。例如,显卡驱动可以驱动GPU运行,Intel DTT驱动可以驱动CPU运行。Device drivers run in kernel mode and are the interface between the I/O system and related hardware. Device drivers can include graphics card drivers, Intel DTT drivers, mouse drivers, audio and video drivers, camera drivers, keyboard drivers, etc. For example, the graphics card driver can drive the GPU to run, and the Intel DTT driver can drive the CPU to run.
HAL是一个核心态模块,可以隐藏各种与硬件有关的细节,例如I/O接口、中断控制器以及多处理器通信机制等,为运行Windows的不同硬件平台提供统一的服务接口,实现多种硬件平台上的可移植性。需要说明的是,为了维护Windows的可移植性,Windows内部组件和用户编写的设备驱动程序并不直接访问硬件,而是通过调用HAL中的例程。HAL is a core module that can hide various hardware-related details, such as I/O interfaces, interrupt controllers, and multi-processor communication mechanisms. It provides a unified service interface for different hardware platforms running Windows and implements a variety of Portability across hardware platforms. It should be noted that in order to maintain the portability of Windows, Windows internal components and user-written device drivers do not access the hardware directly, but by calling routines in the HAL.
固件层可以包括基本输入输出系统(basic input output system,BIOS),BIOS是一组固化到计算机主板上一个只读存储器(read only memory,ROM)芯片内的程序,它保存着计算机最重要的基本输入输出的程序、开机后自检程序和系统自启动程序,它可从互补 金属氧化物半导体(complementary metal oxide semiconductor,CMOS)中读写系统设置的具体信息。其主要功能是为计算机提供最底层的、最直接的硬件设置和控制。Intel DTT驱动可以通过BIOS向CPU发送指令。The firmware layer can include the basic input output system (BIOS). The BIOS is a set of programs solidified into a read only memory (ROM) chip on the computer motherboard. It stores the most important basic information of the computer. Input and output programs, self-test programs after power-on and system self-starting programs, which can be complementary Detailed information on reading and writing system settings in complementary metal oxide semiconductor (CMOS). Its main function is to provide the lowest and most direct hardware settings and control for the computer. The Intel DTT driver can send instructions to the CPU through the BIOS.
需要说明的是,本申请实施例仅以Windows系统举例来说明,在其他操作系统中(例如安卓系统,IOS系统等),只要各个功能模块实现的功能和本申请的实施例类似也能实现本申请的方案。It should be noted that the embodiments of the present application are only explained using the Windows system as an example. In other operating systems (such as Android systems, IOS systems, etc.), as long as the functions implemented by each functional module are similar to those of the embodiments of the present application, the present application can also be implemented. Program to apply for.
为了便于理解,在对本申请实施例提供的信息处理方法的具体过程进行阐述之前,首先结合图1和图2的结构,示例性的说明电子设备100实现资源调度的一种可能的软件及硬件结构和工作流程。需要说明的是,本实施例仅为示例,并不造成对该方法以及电子设备100具体结构的任何限定。For ease of understanding, before elaborating on the specific process of the information processing method provided by the embodiment of the present application, a possible software and hardware structure for the electronic device 100 to implement resource scheduling is first exemplarily described in conjunction with the structures of FIG. 1 and FIG. 2 and workflow. It should be noted that this embodiment is only an example and does not cause any limitation on the method and the specific structure of the electronic device 100 .
图3示出了一例电子设备100对资源进行调度的软件及硬件的工作流程示意图。FIG. 3 shows a schematic workflow diagram of an example of software and hardware for scheduling resources by the electronic device 100 .
如图3所示,应用层的场景识别引擎可以包括系统探针模块、场景识别模块及基础策略匹配管理器。场景识别模块可分别与系统探针模块及基础策略匹配管理器进行交互。场景识别模块可以向系统探针模块发送获取探针状态的请求。系统探针模块可以获取电子设备100的运行状态。例如,系统探针模块可以包括电源状态探针、外设状态探针、进程负载探针、音视频状态探针、系统负载探针及系统事件探针等。As shown in Figure 3, the scene recognition engine of the application layer may include a system probe module, a scene recognition module and a basic 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 can send a request to obtain the probe status to the system probe module. The system probe module can obtain the operating status of the electronic device 100 . For example, the system probe module may include a power status probe, a peripheral status probe, a process load probe, an audio and video status probe, a system load probe, a system event probe, etc.
其中,电源状态探针可以向内核态订阅电源状态事件,根据内核态反馈的回调函数确定电源状态,电源状态包括电池(剩余)电量、电源模式等,电源模式可包括交流电源(alternating current,AC)和直流电源(direct current,DC)。例如,电源状态探针可向执行体层的OsEventDriver节点发送订阅电源状态事件的请求,由OsEventDriver节点向执行体层的电源管理器转发该请求。电源管理器可通过该OsEventDriver节点向电源状态探针反馈回调函数。Among them, the power status probe can subscribe to the power status event from the kernel state and determine the power status according to the callback function fed back by the kernel state. The power status includes battery (remaining) power, power mode, etc. The power mode can include alternating current (AC). ) and direct current (DC). For example, the power status probe can send a request to subscribe to the power status event to the OsEventDriver node of the execution body layer, and the OsEventDriver node forwards the request to the power manager of the execution body layer. The power manager can feedback the callback function to the power status probe through the OsEventDriver node.
外设状态探针可以向内核态订阅外设事件,根据内核态反馈的回调函数确定外设事件。外设事件包括鼠标滚轮滑动事件、鼠标点击事件、键盘输入事件、麦克风输入事件、摄像头输入事件等。Peripheral status probes can subscribe to peripheral events from the kernel state and determine peripheral events based on the callback function fed back by the kernel state. Peripheral events include mouse wheel sliding events, mouse click events, keyboard input events, microphone input events, camera input events, etc.
进程负载探针可以向内核态订阅进程负载,根据内核态反馈的回调函数确定进程的负载。The process load probe can subscribe to the process load in the kernel state and determine the process load based on the callback function fed back by the kernel state.
系统负载探针可以向内核态订阅系统负载,根据内核态反馈的回调函数确定系统负载。The system load probe can subscribe to the system load in the kernel state and determine the system load based on the callback function fed back by the kernel state.
音视频状态探针可向内核态订阅音视频事件,根据内核态反馈的回调函数确定电子设备100当前存在的音视频事件。音视频事件可包括GPU解码事件等。例如,音视频状态探针可向执行体层的OsEventDriver节点发送订阅GPU解码事件的请求,由OsEventDriver节点向内核和驱动层的显卡驱动转发该请求。显卡驱动可以监控GPU的状态,在监控到GPU在进行解码操作后,通过该OsEventDriver节点向音视频状态探针反馈回调函数。The audio and video status probe can subscribe to audio and video events in the kernel state, and determine the audio and video events currently existing in the electronic device 100 based on the callback function fed back by the kernel state. Audio and video events may include GPU decoding events, etc. For example, the audio and video status probe can send a request to subscribe to the GPU decoding event to the OsEventDriver node at the execution layer, and the OsEventDriver node forwards the request to the graphics card driver at the kernel and driver layers. The graphics card driver can monitor the status of the GPU. After monitoring that the GPU is performing a decoding operation, it will feed back the callback function to the audio and video status probe through the OsEventDriver node.
系统事件探针可以向内核态订阅系统事件,根据内核态反馈的回调函数确定系统事件。系统事件可包括窗口变化事件、进程创建事件、线程创建事件等。例如,系统事件探针可向执行体层的OsEventDriver节点发送订阅进程创建事件的请求,由OsEventDriver节点向进程管理器转发该请求。进程管理器可在创建进程后,通过该OsEventDriver节点向系统事件探针反馈回调函数。又例如,系统事件探针还向API模块发送订阅焦点窗口变化事件, API模块可监控电子设备100的焦点窗口是否发生变化,并在监控到焦点窗口发生变化时,向系统事件探针反馈回调函数。System event probes can subscribe to system events from the kernel state and determine system events based on the callback function fed back by the kernel state. System events can include window change events, process creation events, thread creation events, etc. For example, the system event probe can send a request to subscribe to the process creation event to the OsEventDriver node at the execution layer, and the OsEventDriver node forwards the request to the process manager. After creating a process, the process manager can feedback the callback function to the system event probe through the OsEventDriver node. For another example, the system event probe also sends the subscription focus window change event to the API module. The API module can monitor whether the focus window of the electronic device 100 changes, and when monitoring that the focus window changes, feed back the callback function to the system event probe.
可见,系统探针模块通过向内核态订阅电子设备100的各种事件,再根据内核态反馈的回调函数确定电子设备100的运行状态,即得到探针状态。系统探针模块得到探针状态后,可向场景识别模块反馈该探针状态。场景识别模块接收到探针状态后,可根据该探针状态确定电子设备100所处的用户场景。It can be seen that the system probe module obtains the probe status by subscribing to various events of the electronic device 100 in the kernel state, and then determining the operating status of the electronic device 100 based on the callback function fed back by the kernel state. After the system probe module obtains the probe status, it can feed back the probe status to the scene recognition module. After receiving the probe status, the scene recognition module can determine the user scene in which the electronic device 100 is located based on the probe status.
可选的,用户场景可以包括主场景和子场景,子场景为主场景下的细分场景。主场景可以包括视频场景、游戏场景、办公场景、社交场景及空闲(idle)场景等。视频场景是指用户使用电子设备观看视频的场景。视频场景对应的子场景可以包括视频播放场景、视频浏览场景等。游戏场景是指用户使用电子设备打游戏的场景。游戏场景对应的子场景可以包括游戏中场景等。办公场景是指用户使用电子设备办公的场景。办公场景对应的子场景可以包括文档编辑场景、文档浏览场景、视频会议场景等。社交场景是指用户使用电子设备进行社交的场景。社交场景对应的子场景可以包括文字聊天场景、语音聊天场景、视频聊天场景等。空闲场景是指用户对电子设备无任何操作的场景。空闲场景可以不包括子场景。除上述视频场景、游戏场景、办公场景、社交场景和空闲场景之外的其他场景,定义为默认场景,默认场景可以不包括子场景。Optionally, user scenarios can include main scenarios and sub-scenarios, with sub-scenarios being subdivided scenarios under the main scenario. The main scene can include video scenes, game scenes, office scenes, social scenes, idle scenes, etc. Video scenes refer to scenes where users use electronic devices to watch videos. Sub-scenes corresponding to the video scene may include video playback scenes, video browsing scenes, etc. Game scenarios refer to scenarios where users use electronic devices to play games. Sub-scenes corresponding to game scenes may include scenes in the game, etc. Office scenarios refer to scenarios where users use electronic devices to work. Sub-scenarios corresponding to office scenarios can include document editing scenarios, document browsing scenarios, video conferencing scenarios, etc. Social scenarios refer to scenarios where users use electronic devices to socialize. Sub-scenes corresponding to social scenes can include text chat scenes, voice chat scenes, video chat scenes, etc. The idle scene refers to the scene where the user does not perform any operations on the electronic device. Idle scenes may not include sub-scenes. Scenes other than the above video scenes, game scenes, office scenes, social scenes and idle scenes are defined as default scenes, and the default scenes may not include sub-scenes.
用户场景可以反映用户当前的使用需求。例如,场景识别引擎在识别出焦点窗口为视频播放应用的窗口时,确定出电子设备100所处的主场景为视频场景,子场景为视频播放场景,说明用户需要使用视频应用观看、浏览视频。又例如,场景识别引擎识在识别出焦点窗口为微信TM的文字聊天窗口时,确定电子设备100所处的主场景为社交场景,子场景为文字聊天场景。场景识别模块还可向基础策略匹配管理器发送该用户场景。基础策略匹配管理器可根据该用户场景确定基础调度策略。基础策略匹配管理器可向场景识别模块反馈基础调度策略。场景识别模块可向应用层的调度引擎发送该基础调度策略及用户场景。User scenarios can reflect users’ current usage needs. For example, when the scene recognition engine recognizes that the focus window is the window of a video playback application, it determines that the main scene where the electronic device 100 is located is the video scene and the sub-scene is the video playback scene, indicating that the user needs to use the video application to watch and browse videos. For another example, when the scene recognition engine recognizes that the focus window is the text chat window of WeChat TM , it determines that the main scene where the electronic device 100 is located is the social scene and the sub-scene is the text chat scene. The scenario identification module may also send the user scenario to the underlying policy matching manager. The basic policy matching manager can determine the basic scheduling policy according to the user scenario. The basic policy matching manager can feed back the basic scheduling policy to the scene recognition module. The scene recognition module can send the basic scheduling policy and user scenarios to the scheduling engine of the application layer.
如图3所示,调度引擎包括负载管控器、芯片策略融合器以及调度执行器。其中,负载管控器可接收场景识别模块发送的基础调度策略及用户场景。负载管控器还可从系统探针模块获取系统负载,并根据系统负载和用户场景对该基础调度策略进行调整,得到实际调度策略。在一种可选的实施方式中,负载管控器可根据系统负载确定系统负载等级。可选的,系统负载等级可以包括轻、中、重三个等级。电子设备可预先配置各种用户场景和各种系统负载等级下对应的实际调度策略。As shown in Figure 3, the scheduling engine includes a load controller, a chip policy fusion device, and a scheduling executor. Among them, the load controller can receive the basic scheduling strategy and user scenarios sent by the scene recognition module. The load controller can also obtain the system load from the system probe module, and adjust the basic scheduling strategy according to the system load and user scenarios to obtain the actual scheduling strategy. In an optional implementation, the load controller may determine the system load level based on the system load. Optionally, the system load level can include three levels: light, medium, and heavy. Electronic devices can be pre-configured with actual scheduling strategies corresponding to various user scenarios and various system load levels.
实际调度策略中可以包括OS调度策略和CPU调度策略(也称为第一调度策略)。其中,负载管控器可向调度执行器发送该OS调度策略,由调度执行器基于该OS调度策略进行调度。OS调度策略用于调整焦点进程的进程优先级及I/O优先级。示例性的,调度执行器可向进程管理器发送调整焦点进程的进程优先级的指令,响应于该指令,进程管理器对焦点进程的进程优先级进行调整。又例如,调度执行器可向I/O管理器发送调整焦点进程的I/O优先级的指令,响应于该指令,I/O管理器对焦点进程的I/O优先级进行调整。The actual scheduling policy may include an OS scheduling policy and a CPU scheduling policy (also called the first scheduling policy). The load controller can send the OS scheduling policy to the scheduling executor, and the scheduling executor performs scheduling based on the OS scheduling policy. OS scheduling policy is used to adjust the process priority and I/O priority of the focus process. For example, the scheduling executor may send an instruction to adjust the process priority of the focus process to the process manager, and in response to the instruction, the process manager adjusts the process priority of the focus process. For another example, the scheduling executor may send an instruction to adjust the I/O priority of the focus process to the I/O manager. In response to the instruction, the I/O manager adjusts the I/O priority of the focus process.
CPU调度策略是指需要下发至CPU执行的调度策略。CPU调度策略可以包括功耗调度策略,也可以包括性能优化策略。其中,功耗调度策略用于调整CPU、GPU或其他硬件的参数以实现功耗调整,例如通过调整CPU的功率限制参数调整CPU功耗,或者通过调整CPU的能耗比调整CPU功耗等。性能优化策略用于调整电子设备中相关模块的参数或 工作模式等以优化电子设备的性能,例如,通过系统温度跟踪调整进行性能优化,通过调整风扇转速或声音进行性能优化,或者通过调整BIOS的工作模式进行性能优化等。The CPU scheduling policy refers to the scheduling policy that needs to be delivered to the CPU for execution. The CPU scheduling strategy may include a power consumption scheduling strategy or a performance optimization strategy. Among them, the power consumption scheduling policy is used to adjust the parameters of the CPU, GPU or other hardware to achieve power consumption adjustment, for example, adjusting the CPU power limit parameter to adjust the CPU power consumption, or adjusting the CPU energy consumption ratio to adjust the CPU power consumption. Performance optimization strategies are used to adjust the parameters of relevant modules in electronic devices or Working mode, etc. to optimize the performance of electronic devices, for example, performance optimization through system temperature tracking adjustment, performance optimization by adjusting fan speed or sound, or performance optimization by adjusting the BIOS working mode, etc.
负载管控器可以向芯片策略融合器发送用户场景和CPU调度策略,芯片策略融合器根据CPU的芯片平台类型和用户场景对该CPU调度策略进行转译,得到转译后的调度策略。芯片策略融合器将转译后的调度策略下发至调度执行器,调度执行器可以通过OS2SOC驱动节点、WMI、电源管理器、BIOS等中的至少一种,将转译后的调度策略下发至CPU,由CPU实现资源调度。The load controller can send the user scenario and CPU scheduling policy to the chip policy fusion device. The chip policy fusion device translates the CPU scheduling policy according to the chip platform type and user scenario of the CPU to obtain the translated scheduling policy. The chip policy fusion device delivers the translated scheduling policy to the scheduling executor. The scheduling executor can deliver the translated scheduling policy to the CPU through at least one of the OS2SOC driver nodes, WMI, power manager, BIOS, etc. , resource scheduling is implemented by the CPU.
需要说明的是,本申请实施例中,用户场景可以通过场景信息来表征,场景信息例如可以包括场景号、场景名称等。CPU调度策略可以通过CPU调度策略信息来表征,CPU调度策略信息中例如可以包括调度参数、调度数据等。It should be noted that in this embodiment of the present application, the user scenario can be characterized by scenario information. The scenario information can include, for example, a scenario number, a scenario name, etc. The CPU scheduling policy may be characterized by CPU scheduling policy information, which may include, for example, scheduling parameters, scheduling data, etc.
另外,本申请以下实施例中,均以场景信息为场景号,以CPU调度策略信息(第一调度策略信息)为第一CPU功耗调度信息为例进行说明,其中,第一CPU功耗调度信息用于调整CPU的功耗参数。其他类型的CPU调度策略信息与此类似,不作赘述。In addition, in the following embodiments of the present application, the scene information is used as the scene number, and the CPU scheduling policy information (first scheduling policy information) is used as the first CPU power consumption scheduling information as an example for explanation, where the first CPU power consumption scheduling The information is used to adjust the CPU's power consumption parameters. Other types of CPU scheduling policy information are similar to this and will not be described again.
下面将以具有图3所示结构的电子设备为例,结合附图,对本申请实施例提供的信息处理方法实现对第一CPU功耗调度信息进行转译的过程进行具体阐述。Taking the electronic device with the structure shown in FIG. 3 as an example and combining the drawings, the process of translating the first CPU power consumption scheduling information by the information processing method provided by the embodiment of the present application will be described in detail below.
如上实施例所述,不同电子设备使用的CPU可能不同,CUP的芯片平台类型可能不同。例如,电子设备所使用的CPU可以为(Advanced Micro Devices,AMD)的CPU,芯片平台类型为AMD;电子设备所使用的CPU也可以为的CPU,芯片平台类型为这两类芯片平台对于CPU功耗的调整方式并不相同,因此需要进行区分。以下实施例以这两种芯片平台类型为例对信息处理方法进行说明。As mentioned in the above embodiments, different electronic devices may use different CPUs, and the chip platform types of the CUP may be different. For example, a CPU used in electronic equipment can be (Advanced Micro Devices, AMD) CPU, the chip platform type is AMD; the CPU used in electronic equipment can also be CPU, chip platform type is These two types of chip platforms adjust CPU power consumption in different ways, so they need to be distinguished. The following embodiments take these two chip platform types as examples to illustrate the information processing method.
示例性的,图4是本申请实施例提供的一例信息处理及根据转译结果进行功耗调度的方法的流程示意图,该方法的执行主体为电子设备,在一个具体的实施例中,执行主体可以为上述实施例中所述的调度引擎。示例性的,图5为本申请实施例提供的一例信息处理方法中电子设备各模块的交互示意图。请一并参见图4和图5,该信息处理方法可以包括:Exemplarily, FIG. 4 is a schematic flowchart of an example of a method for information processing and power consumption scheduling based on translation results provided by an embodiment of the present application. The execution subject of this method is an electronic device. In a specific embodiment, the execution subject can It is the scheduling engine described in the above embodiment. Exemplarily, FIG. 5 is a schematic diagram of the interaction of various modules of the electronic device in an example of the information processing method provided by the embodiment of the present application. Please refer to Figure 4 and Figure 5 together. The information processing method may include:
S401、获取电子设备所处的用户场景的场景号和场景号对应的第一CPU功耗调度信息。S401. Obtain the scene number of the user scene in which the electronic device is located and the first CPU power consumption scheduling information corresponding to the scene number.
参见图5,可选的,电子设备可以通过负载管理器将场景号和第一CPU功耗调度信息下发至芯片策略融合器。Referring to Figure 5, optionally, the electronic device can deliver the scene number and the first CPU power consumption scheduling information to the chip policy fusion device through the load manager.
场景号用于表征用户场景。场景号可以由数字、文字或符号等组成,本申请实施例对此不做任何限定。可选的,可以预先建立每个主场景与主场景编号的唯一对应关系,并建立每个子场景与子场景编号的唯一对应关系。主场景对应的编号和子场景对应的编号组成最终的场景号。例如,主场景为视频场景,对应的主场景编号为4,子场景为视频播放场景,对应子场景编号为1,则用户场景对应的场景号可以为4-1。又例如,默认场景对应的场景号可以为-1。Scenario numbers are used to characterize user scenarios. The scene number may be composed of numbers, characters, symbols, etc., and this embodiment of the present application does not impose any limitation on this. Optionally, a unique corresponding relationship between each main scene and the main scene number can be established in advance, and a unique corresponding relationship between each sub-scene and the sub-scene number can be established in advance. The number corresponding to the main scene and the number corresponding to the sub-scene constitute the final scene number. For example, if the main scene is a video scene and the corresponding main scene number is 4, and the sub-scene is a video playback scene and the corresponding sub-scene number is 1, then the scene number corresponding to the user scene can be 4-1. For another example, the scene number corresponding to the default scene may be -1.
第一CPU功耗调度信息用于表征对CPU功耗相关的参数的调整方式。第一CPU功耗调度信息中可以包括参数和参数的目标值。可选的,第一CPU功耗调度信息中的参数可以包括PL1、PL2、EPP和EPO开关(switch)状态等,对应的,参数的目标值可以包括PL1的目标值、PL2的目标值、EPP的目标值和表征EPO开关状态的信息等。其中,EPO开关 用于在CPU的芯片平台类型为Inter的情况下选择是否打开DTT调节功能,即是否根据EPO Gear,通过DTT技术调节CPU的功耗。EPO的开关状态可以包括打开状态和关状态。当EPO开关处于打开状态,即打开DTT调节功能,由CPU根据EPP目标值对应的EPO Gear(可根据EPP目标值计算得到),通过DTT技术调节EPP。当EPO开关处于关闭状态,即关闭DTT调节功能,CPU不进行DTT调节,系统可以直接根据EPP目标值调节EPP,这种情况下可以直接将EPP目标值下发至CPU。在一个具体的实施例中,可以通过EPO开关状态的返回值确定EPO开关是否打开,例如,返回值为1表示EPO开关处于打开状态,返回值为0表示EPO开关处于关闭状态。The first CPU power consumption scheduling information is used to characterize the adjustment method of parameters related to CPU power consumption. The first CPU power consumption scheduling information may include parameters and target values of the parameters. Optionally, the parameters in the first CPU power consumption scheduling information may include PL1, PL2, EPP and EPO switch status, etc. Correspondingly, the target values of the parameters may include the target value of PL1, the target value of PL2, EPP The target value and information characterizing the EPO switch state, etc. Among them, EPO switch Used to select whether to turn on the DTT adjustment function when the chip platform type of the CPU is Inter, that is, whether to adjust the power consumption of the CPU through DTT technology according to EPO Gear. The switch state of EPO can include on state and off state. When the EPO switch is on, the DTT adjustment function is turned on, and the CPU adjusts EPP through DTT technology based on the EPO Gear corresponding to the EPP target value (which can be calculated based on the EPP target value). When the EPO switch is turned off, that is, the DTT adjustment function is turned off, the CPU does not perform DTT adjustment, and the system can directly adjust EPP according to the EPP target value. In this case, the EPP target value can be directly sent to the CPU. In a specific embodiment, whether the EPO switch is on can be determined by the return value of the EPO switch status. For example, a return value of 1 indicates that the EPO switch is on, and a return value of 0 indicates that the EPO switch is on.
不同的场景号和不同的系统负载等级对应的第一CPU功耗调度信息不同。在一个实施例中,场景号、系统负载等级和第一CPU功耗调度信息的对应关系可以如表1所示。Different scene numbers and different system load levels correspond to different first CPU power consumption scheduling information. In one embodiment, the corresponding relationship between the scene number, the system load level and the first CPU power consumption scheduling information can be as shown in Table 1.
表1

Table 1

需要说明的是,表1中用户场景、第一CPU功耗调度信息中的参数和参数对应的目标值等仅为示例,并不代表实际情况,也不构成对本申请的任何限定。实际上,用户场景可以包括比表1更多或更少的类型,例如,在一些实施例中,用户场景还可以包括空闲场景、性能测评场景等。第一CPU功耗调度信息中也可以包括比表1更多的参数。It should be noted that the user scenarios, parameters in the first CPU power consumption scheduling information and the target values corresponding to the parameters in Table 1 are only examples and do not represent the actual situation, nor do they constitute any limitation on this application. In fact, user scenarios may include more or fewer types than Table 1. For example, in some embodiments, user scenarios may also include idle scenarios, performance measurement scenarios, etc. The first CPU power consumption scheduling information may also include more parameters than Table 1.
S402、确定电子设备的CPU的芯片平台类型;若CPU的芯片平台类型为(也称为第一类型),则执行步骤S403和S404;若CPU的芯片平台类型为AMD(也称为第二类型),则执行步骤S405至S407。S402. Determine the chip platform type of the CPU of the electronic device; if the chip platform type of the CPU is (also called the first type), then execute steps S403 and S404; if the chip platform type of the CPU is AMD (also called the second type), then execute steps S405 to S407.
参见图5,可选的,芯片策略融合器可以通过从OS2SOC驱动节点中的VID接口获取VID返回值,根据VID返回值来确定CPU的芯片平台类型。例如,VID返回值为0x8086,表示CPU的芯片平台类型为VID接口的返回值为0x1022,表示CPU的芯片平台类型为AMD。Referring to Figure 5, optionally, the chip policy fusion device can obtain the VID return value from the VID interface in the OS2SOC driver node and determine the chip platform type of the CPU based on the VID return value. For example, the VID return value is 0x8086, indicating that the chip platform type of the CPU is The return value of the VID interface is 0x1022, which indicates that the chip platform type of the CPU is AMD.
S403、对第一CPU功耗调度信息进行转译,输出策略号。S403. Translate the first CPU power consumption scheduling information and output the policy number.
策略号用于标识CPU实现功耗调整的策略。当然,也可以通过其他的策略标识,例如策略名称等,对CPU实现功耗调整的策略进行标识,只要能够区分不同的策略,能被平台识别即可。The strategy number is used to identify the CPU's strategy for adjusting power consumption. Of course, other policy identifiers, such as policy names, can also be used to identify the CPU power consumption adjustment strategy. As long as different strategies can be distinguished, they can be identified. Just identify the platform.
可选的,策略号可以包括DTT策略号和EPO策略号。Optionally, the policy number may include a DTT policy number and an EPO policy number.
DTT策略号也称为DTT策略ID,用于标识DTT策略。DTT策略号对应的DTT策略用于调整CPU的PL1和PL2的值。The DTT policy number is also called the DTT policy ID and is used to identify the DTT policy. The DTT policy corresponding to the DTT policy number is used to adjust the values of PL1 and PL2 of the CPU.
EPO策略号,也称为EPO策略ID,用于标识EPO策略。EPO策略号对应的EPO策略用于调整CPU的EPP。The EPO policy number, also called the EPO policy ID, is used to identify the EPO policy. The EPO policy corresponding to the EPO policy number is used to adjust the EPP of the CPU.
可以理解地,DTT策略号与CPU的功耗参数可以存在映射关系,EPO策略号与CPU的EPO Gear可以存在映射关系。可选的,可以预先在BIOS中构建一张策略表,用于存储DTT策略号或EPO策略号与CPU的PL1、PL2和EPO等参数的值的对应关系。在一个实施例中,策略表可以如表2所示。可以理解,DTT策略号和EPO策略号可以通过编号区分。例如,表2中,策略号0至21、40、41表示DTT策略号,策略号50至55表示EPO策略号。另外,参见表2中的备注,DTT策略号中,0、41和42对应的用户场景为默认场景,这三个策略号也称为默认策略号,DTT策略号中除默认策略号之外的其他策略号为非默认场景对应的策略号,也称为非默认策略号。表2中,默认策略号与CPU的PL1、PL2参数的值以及系统负载等级的对应关系也称为第一对应关系。非默认策略号与CPU的PL1、 PL2参数的值的对应关系也称为第二对应关系。EPO策略号与EPO Gear值的对应关系也称为第三对应关系。其中,第三对应关系中,EPO Gear的值能够表征EPO开关的状态。在一个具体的实施例中,EPO Gear的值为0,表示EPO开关处于关闭状态,EPO Gear的值为1、2、3、4或5,表示EPO开关处于打开状态。It can be understood that there may be a mapping relationship between the DTT policy number and the power consumption parameter of the CPU, and there may be a mapping relationship between the EPO policy number and the EPO Gear of the CPU. Optionally, a policy table can be built in the BIOS in advance to store the correspondence between the DTT policy number or EPO policy number and the values of the CPU's PL1, PL2, and EPO parameters. In one embodiment, the policy table may be as shown in Table 2. It can be understood that the DTT policy number and the EPO policy number can be distinguished by numbers. For example, in Table 2, policy numbers 0 to 21, 40, and 41 represent DTT policy numbers, and policy numbers 50 to 55 represent EPO policy numbers. In addition, please refer to the remarks in Table 2. Among the DTT policy numbers, the user scenarios corresponding to 0, 41 and 42 are the default scenarios. These three policy numbers are also called the default policy numbers. The DTT policy numbers except the default policy number are Other policy numbers are the policy numbers corresponding to non-default scenarios, also called non-default policy numbers. In Table 2, the correspondence between the default policy number and the values of the PL1 and PL2 parameters of the CPU and the system load level is also called the first correspondence. Non-default policy number and PL1 of CPU The correspondence between the values of the PL2 parameters is also called the second correspondence. The correspondence between the EPO policy number and the EPO Gear value is also called the third correspondence. Among them, in the third correspondence relationship, the value of EPO Gear can represent the state of the EPO switch. In a specific embodiment, the value of EPO Gear is 0, indicating that the EPO switch is in a closed state, and the value of EPO Gear is 1, 2, 3, 4 or 5, indicating that the EPO switch is in an open state.
表2
Table 2
可以理解,表2仅为一种示例,并不构成对策略表的限定。实际应用中,策略表中的 内容可以包括比表2更多或更少的内容,且各个策略号及对应的参数值可以与表2中不同。It can be understood that Table 2 is only an example and does not constitute a limitation on the policy table. In actual application, the policy table The content may include more or less content than in Table 2, and each policy number and corresponding parameter value may be different from those in Table 2.
可选的,在CPU的芯片平台类型为的情况下,芯片策略融合器可以基于场景号和第一CPU功耗调度信息确定对应的策略号,具体方法在后续实施例中进行详细阐述。Optional, the chip platform type of the CPU is In the case of , the chip policy fusion device can determine the corresponding policy number based on the scene number and the first CPU power consumption scheduling information. The specific method will be elaborated in subsequent embodiments.
S404、基于策略号调整CPU功耗。S404. Adjust CPU power consumption based on the policy number.
可选的,参见图5,在CPU的芯片平台类型为的情况下,芯片策略融合器可以将策略号下发至调度执行器,由调度执行器通过WMI将策略号下发至BIOS。BIOS将策略号下发至CPU,由CPU基于策略号运行。Optional, see Figure 5, the chip platform type of the CPU is In this case, the chip policy fusion device can deliver the policy number to the scheduling executor, and the scheduling executor delivers the policy number to the BIOS through WMI. The BIOS delivers the policy number to the CPU, and the CPU runs based on the policy number.
S405、根据场景号对第一CPU功耗调度信息进行转译,得到第二CPU功耗调度信息。S405. Translate the first CPU power consumption scheduling information according to the scene number to obtain the second CPU power consumption scheduling information.
具体的,AMD平台中定义的CPU的功耗参数与第一CPU功耗调度信息中的参数的类型不同。例如,AMD平台中定义的表征短时睿频功耗的参数为持续功率限制(sustained power limit,SPL),表征长时睿频功耗的参数为SPPT。也就是说,AMD平台中定义的参数中与第一CPU功耗调度信息中PL1对应的参数为SPL,与PL2对应的参数为慢整包功率跟踪限制(slow PPT limit,SPPT),其中,PPT是整包功率跟踪package power tracking的缩写。Specifically, the CPU power consumption parameters defined in the AMD platform are of different types from the parameters in the first CPU power consumption scheduling information. For example, the parameter defined in the AMD platform to characterize short-term Turbo frequency power consumption is sustained power limit (SPL), and the parameter to characterize long-term Turbo frequency power consumption is SPPT. That is to say, among the parameters defined in the AMD platform, the parameter corresponding to PL1 in the first CPU power consumption scheduling information is SPL, and the parameter corresponding to PL2 is the slow packet power tracking limit (slow PPT limit, SPPT), where, PPT It is the abbreviation of package power tracking.
另外,不同的用户场景下,AMD平台中定义的需要调整的CPU功耗参数不同。因而,在CPU的芯片平台类型为AMD的情况下,芯片策略融合器可以根据场景号确定AMD平台中定义的需要调整的CPU功耗参数,并根据AMD平台中定义的CPU的功耗参数与第一CPU功耗调度信息中的参数的对应关系,将第一CPU功耗调度信息中的目标值赋值至AMD平台中对应的功耗参数,得到第二CPU功耗调度信息。例如,根据某一场景号,确定需要调整的CPU功耗参数包括SPL和SPPT,则芯片策略融合器将PL1目标值赋值至SPL,将PL2目标值赋值至SPPT,得到第二CPU功耗调度信息。具体的,参见后述实施例。In addition, under different user scenarios, the CPU power consumption parameters defined in the AMD platform that need to be adjusted are different. Therefore, when the chip platform type of the CPU is AMD, the chip policy fusion device can determine the CPU power consumption parameters defined in the AMD platform that need to be adjusted based on the scene number, and match the power consumption parameters of the CPU defined in the AMD platform with the scene number. The corresponding relationship between the parameters in the CPU power consumption scheduling information is to assign the target value in the first CPU power consumption scheduling information to the corresponding power consumption parameter in the AMD platform to obtain the second CPU power consumption scheduling information. For example, based on a certain scene number, it is determined that the CPU power consumption parameters that need to be adjusted include SPL and SPPT, then the chip policy fusion device assigns the PL1 target value to SPL and the PL2 target value to SPPT to obtain the second CPU power consumption scheduling information. . For details, see the examples described below.
其中,第二CPU功耗调度信息中可以不包括表征能效比的参数。也就是说,第一CPU功耗调度信息中的EPP无需转译,可以直接下发至CPU,具体参见步骤S407。The second CPU power consumption scheduling information may not include parameters representing the energy efficiency ratio. That is to say, the EPP in the first CPU power consumption scheduling information does not need to be translated and can be directly sent to the CPU. For details, see step S407.
S406、基于第二CPU功耗调度信息调整CPU功耗。S406. Adjust CPU power consumption based on the second CPU power consumption scheduling information.
可选的,参见图5,在CPU的芯片平台类型为AMD的情况下,芯片策略融合器可以将第二CPU功耗调度信息下发至调度执行器。调度执行器可以将第二CPU功耗调度信息通过WMI下发至BIOS。BIOS将第二CPU功耗调度信息下发至CPU,由CPU根据第二CPU功耗调度信息调整功耗参数。Optionally, referring to Figure 5, when the chip platform type of the CPU is AMD, the chip policy fusion device may deliver the second CPU power consumption scheduling information to the scheduling executor. The scheduling executor may deliver the second CPU power consumption scheduling information to the BIOS through WMI. The BIOS delivers the second CPU power consumption scheduling information to the CPU, and the CPU adjusts the power consumption parameters according to the second CPU power consumption scheduling information.
S407、基于第一CPU功耗调度信息中的EPP目标值,调整CPU的EPP。S407. Adjust the EPP of the CPU based on the EPP target value in the first CPU power consumption scheduling information.
参见图5,对于第一CPU功耗调度信息中的EPP目标值,芯片策略融合器可以将EPP目标值下发至调度执行器,调度执行器调用电源管理器中的相应接口,通过电源管理器将EPP目标值下发至CPU。CPU根据EPP目标值调整CPU的EPP。其中,电源管理器也称为处理器电源模块(processor power module,PPM)。Referring to Figure 5, for the EPP target value in the first CPU power consumption scheduling information, the chip policy fusion device can send the EPP target value to the scheduling executor, and the scheduling executor calls the corresponding interface in the power manager, and through the power manager Send the EPP target value to the CPU. The CPU adjusts the CPU's EPP based on the EPP target value. Among them, the power manager is also called the processor power module (PPM).
本实施例提供的方法,通过获取用户场景的场景号和场景号对应第一CPU功耗调度信息,并确定电子设备的CPU的芯片平台类型,根据CPU的芯片平台类型的不同,对第一CPU功耗调度信息中参数进行不同的转译,以适配不同类型的CPU芯片平台,从而使得这种根据用户场景进行动态资源调度的方法能够适用不同的电子设备,提高该方法的兼容性,进而能够提升不同类型的电子设备的性能和续航能力。 The method provided in this embodiment obtains the scene number of the user scene and the scene number corresponding to the first CPU power consumption scheduling information, and determines the chip platform type of the CPU of the electronic device. According to the different chip platform types of the CPU, the first CPU The parameters in the power consumption scheduling information are translated differently to adapt to different types of CPU chip platforms, so that this method of dynamic resource scheduling based on user scenarios can be applied to different electronic devices, improve the compatibility of the method, and then be able to Improve the performance and battery life of different types of electronic devices.
下面结合附图,对CPU的芯片平台类型分别为和AMD情况下,第一CPU功耗调度信息的转译方法进行具体的说明。Combined with the figures below, the chip platform types of the CPU are as follows: In the case of AMD, the method of translating the first CPU power consumption scheduling information will be described in detail.
1)CPU的芯片平台类型为 1) The chip platform type of the CPU is
在CPU的芯片平台类型为的情况下,芯片策略融合器根据预先建立的策略表,确定与当前的第一CPU功耗调度信息对应的目标策略号。The chip platform type of the CPU is In the case of , the chip policy fusion device determines the target policy number corresponding to the current first CPU power consumption scheduling information according to the pre-established policy table.
可以理解,建立策略表以及根据策略表确定目标策略号的方式有多种。在一种可能的实现方式中,在BIOS中建立策略表时,可以根据各个场景号对应的第一CPU功耗调度信息,建立策略号与第一CPU功耗调度信息的映射关系,也即,策略号与第一CPU功耗调度信息一一对应。这种情况下,根据映射关系,能够直接确定出当前的第一CPU功耗调度信息对应的目标策略号。若采用这种方式,策略表需要随着用户场景和第一CPU功耗调度信息的增加进行扩充,每增加一组第一CPU功耗调度信息,就需要对BIOS中的策略表进行一次扩充,操作不便。而且,BIOS中策略表的容量有限,每个用户场景根据系统负载等级的不同会有多组第一CPU功耗调度信息(可参见表1),因而,随着可识别的用户场景的不断增加,策略表后续将无法满足扩充需求。It can be understood that there are many ways to establish a policy table and determine a target policy number based on the policy table. In a possible implementation, when establishing the policy table in the BIOS, a mapping relationship between the policy number and the first CPU power consumption scheduling information can be established based on the first CPU power consumption scheduling information corresponding to each scene number, that is, The policy number corresponds one-to-one with the first CPU power consumption scheduling information. In this case, according to the mapping relationship, the target policy number corresponding to the current first CPU power consumption scheduling information can be directly determined. If this method is adopted, the policy table needs to be expanded as user scenarios and first CPU power consumption scheduling information increase. Each time a set of first CPU power consumption scheduling information is added, the policy table in the BIOS needs to be expanded. Inconvenient operation. Moreover, the capacity of the policy table in the BIOS is limited. Each user scenario will have multiple sets of first CPU power consumption scheduling information depending on the system load level (see Table 1). Therefore, as the number of identifiable user scenarios continues to increase, , the policy table will not be able to meet the expansion needs in the future.
本实施例中提供的信息处理方法,根据第一CPU功耗调度信息,确定策略表中与PL1目标值最接近的PL1值对应的策略号,以及策略表中与EPO Gear最接近的EPO Gear值对应的策略号,从而确定目标策略号。这样,减少策略表扩充次数,能够节约BIOS容量,且能够保证策略表的相对固定,便于操作和维护。The information processing method provided in this embodiment determines, based on the first CPU power consumption scheduling information, the policy number corresponding to the PL1 value closest to the PL1 target value in the policy table, and the EPO Gear value closest to the EPO Gear in the policy table The corresponding policy number is used to determine the target policy number. In this way, the number of expansions of the policy table can be reduced, BIOS capacity can be saved, and the policy table can be ensured to be relatively fixed, making operation and maintenance easier.
本实施例提供的信息处理方法具体过程如下:The specific process of the information processing method provided by this embodiment is as follows:
在一个实施例中,上述步骤S403、对第一CPU功耗调度信息进行转译,输出策略号,包括:In one embodiment, the above step S403 is to translate the first CPU power consumption scheduling information and output the policy number, including:
基于策略表,根据第一CPU功耗调度信息中的PL1目标值,确定目标DTT策略号;Based on the policy table, determine the target DTT policy number according to the PL1 target value in the first CPU power consumption scheduling information;
根据第一CPU功耗调度信息中的EPO开关的状态和EPP目标值,确定目标EPO策略号。The target EPO policy number is determined according to the state of the EPO switch and the EPP target value in the first CPU power consumption scheduling information.
具体的,芯片策略融合器可以确定策略表中与第一CPU功耗调度信息中的PL1目标值最接近的PL1值,将策略表中该最接近的PL1值对应的策略号确定为目标DTT策略号。Specifically, the chip policy fusion device can determine the PL1 value in the policy table that is closest to the PL1 target value in the first CPU power consumption scheduling information, and determine the policy number corresponding to the closest PL1 value in the policy table as the target DTT policy. Number.
该实现方式中,考虑到极少数场景CPU才会运行在短时睿频状态下,因而在CPU的芯片平台类型为的情况下,忽略PL2,仅通过PL1目标值确定目标DTT策略号,从而简化算法,提高信息转译效率。In this implementation, considering that the CPU will run in the short-term turbo frequency state in very few scenarios, the chip platform type of the CPU is: In the case of , ignore PL2 and determine the target DTT strategy number only through the PL1 target value, thereby simplifying the algorithm and improving the efficiency of information translation.
另外,在EPO开关为关闭状态的情况下,直接将预设EPO策略号确定为目标EPO策略号,预设EPO策略号用于指示关闭DTT调节功能。在EPO开关为打开状态的情况下,芯片策略融合器可以根据EPP目标值能够确定出对应的EPO Gear目标值,进而确定策略表中与EPO Gear目标值最接近的EPO Gear值,将策略表中该最接近的EPO Gear值对应的策略号确定为目标EPO策略号。In addition, when the EPO switch is in a closed state, the preset EPO strategy number is directly determined as the target EPO strategy number, and the preset EPO strategy number is used to indicate turning off the DTT adjustment function. When the EPO switch is on, the chip strategy fusion device can determine the corresponding EPO Gear target value based on the EPP target value, and then determine the EPO Gear value in the strategy table that is closest to the EPO Gear target value, and add it to the strategy table. The strategy number corresponding to the closest EPO Gear value is determined as the target EPO strategy number.
示例性的,图6为本申请实施例提供的一例确定DTT策略号和EPO策略号的流程示意图。本实施例中,执行主体可以为图3中所示的芯片策略融合器,不再赘述。如图6所示,在策略表为表2的情况下,可以按照以下方法确定目标DTT策略号和目标EPO策略号: Illustratively, FIG. 6 is a schematic flowchart of an example of determining the DTT policy number and the EPO policy number provided by the embodiment of the present application. In this embodiment, the execution subject may be the chip policy fusion device shown in Figure 3, which will not be described again. As shown in Figure 6, when the policy table is Table 2, the target DTT policy number and target EPO policy number can be determined according to the following method:
S601、确定第一CPU功耗调度信息是否为默认策略信息;若第一CPU功耗调度策略为默认策略信息,则执行步骤S602;若第一CPU功耗调度信息不为默认策略信息,则执行步骤S603。S601. Determine whether the first CPU power consumption scheduling information is the default policy information; if the first CPU power consumption scheduling policy is the default policy information, execute step S602; if the first CPU power consumption scheduling information is not the default policy information, execute Step S603.
默认策略信息是指默认场景对应的CPU功耗调度信息。The default policy information refers to the CPU power consumption scheduling information corresponding to the default scenario.
可选的,在一种实现方式中,可以根据场景号判断第一CPU功耗调度信息是否为默认策略信息,例如,若预先设定的默认场景的场景号为-1,则可以判断当前场景号是否为-1,若是,则表明第一CPU功耗调度信息为默认策略信息,否则表明第一CPU功耗调度信息不为默认策略信息。Optionally, in an implementation manner, it can be determined according to the scene number whether the first CPU power consumption scheduling information is the default policy information. For example, if the scene number of the preset default scene is -1, then the current scene can be judged Whether the number is -1. If so, it indicates that the first CPU power consumption scheduling information is the default policy information. Otherwise, it indicates that the first CPU power consumption scheduling information is not the default policy information.
S602、根据第一CPU功耗调度信息对应的系统负载情况确定目标DTT策略号。S602. Determine the target DTT policy number according to the system load condition corresponding to the first CPU power consumption scheduling information.
如上所述,表2所示的策略表中包括三种系统负载等级的默认策略对应的策略号和功耗参数。系统负载等级为“重”的默认策略对应的策略号为0,系统负载等级为“轻”的默认策略对应的策略号为40,系统负载等级为“中”的默认策略对应的策略号为41。As mentioned above, the policy table shown in Table 2 includes the policy numbers and power consumption parameters corresponding to the default policies for the three system load levels. The policy number corresponding to the default policy with a system load level of "Heavy" is 0, the policy number corresponding to the default policy with a system load level of "Light" is 40, and the policy number corresponding to the default policy with a system load level of "Medium" is 41 .
可选的,可以根据第一CPU功耗调度信息确定对应的系统负载等级,在策略表中确定该系统负载等级的默认策略对应的策略号,得到目标DTT策略号。具体的,若第一CPU功耗调度信息对应的系统负载等级为“重”,则确定目标DTT策略号为0;若第一CPU功耗调度信息对应的系统负载等级为“轻”,则确定目标DTT策略号为40;若第一CPU功耗调度信息对应的系统负载等级为“中”,则确定目标DTT策略号为41。Optionally, the corresponding system load level can be determined according to the first CPU power consumption scheduling information, and the policy number corresponding to the default policy of the system load level is determined in the policy table to obtain the target DTT policy number. Specifically, if the system load level corresponding to the first CPU power consumption scheduling information is "heavy", then determine the target DTT policy number to be 0; if the system load level corresponding to the first CPU power consumption scheduling information is "light", then determine The target DTT policy number is 40; if the system load level corresponding to the first CPU power consumption scheduling information is "medium", then the target DTT policy number is determined to be 41.
可选的,此处的系统负载等级可以由芯片策略融合器向系统负载探针订阅系统负载,根据系统负载确定系统负载等级,也可以由负载管控器将系统负载等级随场景号一同下发至芯片策略融合器,本申请实施例对此不做限定。Optionally, the system load level here can be subscribed to the system load by the chip policy fusion device to the system load probe, and the system load level can be determined based on the system load, or the system load level can be delivered by the load controller along with the scene number to The chip policy fusion device is not limited in the embodiments of this application.
另外一种可能的实现方式中,系统也可以预先指定一个系统负载等级的默认策略(如负载等级为“重”的默认策略)对应的DTT策略号作为所有默认场景对应的策略号。也就是说,只要确定场景号为-1,确定第一CPU功耗调度信息为默认策略信息,就将指定的DTT策略号(例如0)确定为目标DTT策略号,而无需考虑系统负载情况。这样做的原因是,用户场景为默认场景时,多数情况下,系统负载均为重负载,因而,直接指定系统负载等级为“重”的默认策略对应的策略号能够覆盖大部分的情况,且能够简化信息转译过程,提高信息转译效率。In another possible implementation, the system can also pre-specify a DTT policy number corresponding to a default policy of the system load level (such as a default policy with a load level of "heavy") as the policy number corresponding to all default scenarios. That is to say, as long as the scene number is determined to be -1 and the first CPU power consumption scheduling information is determined to be the default policy information, the specified DTT policy number (for example, 0) is determined as the target DTT policy number without considering the system load. The reason for this is that when the user scenario is the default scenario, the system load is heavy in most cases. Therefore, directly specifying the policy number corresponding to the default policy with a system load level of "heavy" can cover most situations, and It can simplify the information translation process and improve the efficiency of information translation.
可选的,在另一种实现方式中,在确定第一CPU功耗调度信息是否为默认策略信息时,也可以直接确定第一CPU功耗调度信息中的PL1目标值来确定,且若确定第一CPU功耗调度信息为默认策略信息,可以直接确定出对应的策略号。Optionally, in another implementation manner, when determining whether the first CPU power consumption scheduling information is the default policy information, the PL1 target value in the first CPU power consumption scheduling information can also be determined directly, and if determined The first CPU power consumption scheduling information is the default policy information, and the corresponding policy number can be directly determined.
也就是说,上述步骤S601和步骤S602也可以通过下述方式替换:That is to say, the above steps S601 and S602 can also be replaced by the following method:
确定第一CPU功耗调度信息中的PL1目标值是否等于系统负载等级为“重”的默认策略对应的PL1的值(35);若是,则将系统负载等级为“重”的默认策略对应的策略号(0)确定为目标DTT策略号;若否,则确定第一CPU功耗调度信息中的PL1目标值是否等于系统负载等级为“轻”的默认策略对应的PL1的值(12),若是,则将系统负载等级为“轻”的默认策略对应的策略号(40)确定为目标DTT策略号;若否,则确定第一CPU功耗调度信息中的PL1目标值是否等于系统负载等级为“中”的默认策略对应的PL1的值(20),若是,则将系统负载等级为“中”的默认策略对应的策略号(41)确定为目标DTT策略号。 Determine whether the PL1 target value in the first CPU power consumption scheduling information is equal to the value of PL1 corresponding to the default policy with a system load level of "heavy"(35); if so, set the PL1 target value corresponding to the default policy with a system load level of "heavy" The policy number (0) is determined as the target DTT policy number; if not, determine whether the PL1 target value in the first CPU power consumption scheduling information is equal to the PL1 value (12) corresponding to the default policy with the system load level of "light", If yes, then determine the policy number (40) corresponding to the default policy with the system load level of "light" as the target DTT policy number; if not, determine whether the PL1 target value in the first CPU power consumption scheduling information is equal to the system load level is the value (20) of PL1 corresponding to the default policy of "Medium". If so, determine the policy number (41) corresponding to the default policy with the system load level of "Medium" as the target DTT policy number.
S603、根据第一CPU功耗调度信息中的PL1目标值,通过计算公式(1)确定目标DTT策略号。S603. According to the PL1 target value in the first CPU power consumption scheduling information, determine the target DTT policy number through calculation formula (1).
也就是说,若步骤S602中判断的结果为第一CPU功耗调度信息不为默认策略信息,则通过下述公式(1)确定目标DTT策略号。
That is to say, if the result of the judgment in step S602 is that the first CPU power consumption scheduling information is not the default policy information, the target DTT policy number is determined according to the following formula (1).
其中,表示向下取整,step表示策略表中的PL1步进值(即相邻两个DTT策略号对应的PL1值的差值的绝对值),在PL1目标值小于45的情况下,step=2,在PL1目标值大于或等于45的情况下,step=5。in, It means rounding down, and step means the PL1 step value in the strategy table (that is, the absolute value of the difference between the PL1 values corresponding to two adjacent DTT strategy numbers). When the PL1 target value is less than 45, step=2 , when the PL1 target value is greater than or equal to 45, step=5.
offset1表示DTT补偿值,在PL1目标值小于45的情况下,offset1=-1,在PL1目标值大于或等于45的情况下,offset1=9。offset1 represents the DTT compensation value. When the PL1 target value is less than 45, offset1=-1. When the PL1 target value is greater than or equal to 45, offset1=9.
举例:假设第一CPU功耗调度信息中,PL1目标值为8,则step=2,offset1=-1, Example: Assume that in the first CPU power consumption scheduling information, the PL1 target value is 8, then step=2, offset1=-1,
该实现方式中,通过公式(1)能够快速的确定出策略表中与第一CPU功耗调度信息中的PL1目标值最接近的PL1值对应的策略号,从而能够快速的确定出目标DTT策略号,无需遍历查询策略表,提高信息转译效率。In this implementation, formula (1) can be used to quickly determine the policy number corresponding to the PL1 value in the policy table that is closest to the PL1 target value in the first CPU power consumption scheduling information, so that the target DTT policy can be quickly determined No., there is no need to traverse the query strategy table, which improves the efficiency of information translation.
S604、判断EPO开关的状态是否为打开状态;若是(即EPO开关的状态为打开状态),则执行步骤S605;若否(即EPO开关的状态为关闭状态),则执行步骤S606。S604. Determine whether the state of the EPO switch is on. If yes (that is, the state of the EPO switch is on), execute step S605; if not (ie, the state of the EPO switch is on the off state), execute step S606.
可选的,可以确定EPO开关参数的返回值是否为1,若返回值为1,则确定EPO开关为打开状态;若返回值为0,则确定EPO开关为关闭状态。Optionally, you can determine whether the return value of the EPO switch parameter is 1. If the return value is 1, it is determined that the EPO switch is in the on state; if the return value is 0, it is determined that the EPO switch is in the off state.
S605、根据第一CPU功耗调度信息中的EPP目标值,通过公式(2)确定EPO策略号。
S605. According to the EPP target value in the first CPU power consumption scheduling information, determine the EPO policy number through formula (2).
其中,表示向下取整,255为EPP的最大取值,offset2表示EPO补偿值,offset2可以为50。in, Indicates rounding down, 255 is the maximum value of EPP, offset2 indicates the EPO compensation value, and offset2 can be 50.
举例:假设第一CPU功耗调度信息中,EPO开关状态为打开,EPP目标值为127,则 Example: Assume that in the first CPU power consumption scheduling information, the EPO switch status is on and the EPP target value is 127, then
该实现方式中,通过公式(2)能够快速的确定出策略表中与EPO Gear目标值最接近的EPO Gear值,从而能够快速的确定出目标EPO策略号,无需遍历查询策略表,提高信息转译效率。In this implementation, formula (2) can be used to quickly determine the EPO Gear value in the strategy table that is closest to the EPO Gear target value, so that the target EPO strategy number can be quickly determined without traversing the query strategy table, which improves information translation. efficiency.
S606、将预设EPO策略号(50)确定为目标EPO策略号,预设EPO策略号用于指示关闭DTT调节功能。S606. Determine the preset EPO policy number (50) as the target EPO policy number. The preset EPO policy number is used to indicate turning off the DTT adjustment function.
具体的,表2所示的策略表中,EPO开关的状态为关闭状态的情况下,对应的EPO策略号为50,直接将50确定为目标EPO策略号。Specifically, in the policy table shown in Table 2, when the status of the EPO switch is off, the corresponding EPO policy number is 50, and 50 is directly determined as the target EPO policy number.
而且,在EPO开关的状态是否为关闭状态的情况下,还可以执行步骤S404、基于策略号调整CPU功耗,可以包括下述过程:Moreover, if the status of the EPO switch is off, step S404 may also be performed to adjust the CPU power consumption based on the policy number, which may include the following process:
1)芯片策略融合器将策略号下发至调度执行器,由调度执行器通过WMI将策略号下发至BIOS,BIOS将策略号下发至CPU,由CPU基于策略号运行,调整CPU的PL1和PL2;1) The chip policy fusion device sends the policy number to the scheduling executor, and the scheduling executor sends the policy number to the BIOS through WMI. The BIOS sends the policy number to the CPU, and the CPU runs based on the policy number and adjusts the PL1 of the CPU. and PL2;
2)芯片策略融合器将EPP目标值下发至调度执行器,调度执行器调用电源管理器中 的相应接口,通过电源管理器将EPP目标值下发至CPU,CPU根据EPP目标值调整CPU的EPP。2) The chip policy fusion device sends the EPP target value to the scheduling executor, and the scheduling executor calls the power manager The corresponding interface sends the EPP target value to the CPU through the power manager, and the CPU adjusts the EPP of the CPU according to the EPP target value.
其中,2)的具体过程可以参见步骤S407,不再赘述。For the specific process of 2), please refer to step S407, which will not be described again.
除此之外,在一种可能的实现方式中,还可以预先将表2中的某一策略号指定为备用策略号。当系统或算法等出现故障,无法按照上述算法获取策略号的情况下,默认将备用策略号下发至BIOS,以保证资源调度的正常进行,提高系统稳定性和可靠性。备用策略号例如可以为表2中的策略号0,且备用策略号对应的功率参数中还包括EPO Gear的值。策略融合器将备用策略号下发至BIOS,BIOS将备用策略号下发至CPU,CPU可直接根据应备用策略号调整CPU的PL1、PL2和EPP等参数。In addition, in a possible implementation manner, a certain policy number in Table 2 can also be designated as a backup policy number in advance. When a system or algorithm failure occurs and the policy number cannot be obtained according to the above algorithm, the backup policy number will be delivered to the BIOS by default to ensure normal resource scheduling and improve system stability and reliability. The backup strategy number may be, for example, strategy number 0 in Table 2, and the power parameter corresponding to the backup strategy number also includes the value of EPO Gear. The policy fusion device delivers the backup policy number to the BIOS, and the BIOS delivers the backup policy number to the CPU. The CPU can directly adjust the CPU's PL1, PL2, EPP and other parameters based on the backup policy number.
2)CPU的芯片平台类型为AMD2) The chip platform type of the CPU is AMD
示例性的,图7为本申请实施例提供的一例将第一CPU功耗调度信息转译为第二CPU功耗调度信息的流程示意图。如图7所示,在一个实施例中,上述步骤S405、根据场景号对第一CPU功耗调度信息进行转译,得到第二CPU功耗调度信息,包括:Illustratively, FIG. 7 is a schematic flowchart of an example of translating the first CPU power consumption scheduling information into the second CPU power consumption scheduling information provided by the embodiment of the present application. As shown in Figure 7, in one embodiment, the above step S405 is to translate the first CPU power consumption scheduling information according to the scene number to obtain the second CPU power consumption scheduling information, including:
S701、根据场景号确定第二CPU功耗调度信息的数据类型。S701. Determine the data type of the second CPU power consumption scheduling information according to the scene number.
数据类型,也称为WMI策略数据类型,即WMI policy decision date type。数据类型用于表征第二调度策略信息对资源调度的类型(或称为资源调度的方向),即对哪一类型的资源进行调度。Data type, also known as WMI policy data type, that is, WMI policy decision date type. The data type is used to represent the type of resource scheduling (or the direction of resource scheduling) of the second scheduling policy information, that is, which type of resource is scheduled.
数据类型可由BIOS预先定义。可选的,数据类型可以包括以下几种:功率限制(power limits)参数、系统温度跟踪(system temperature tracking,STT)调优参数、BIOS风扇转速&声音(cool quiet on lap)事件通知、BIOS自动模式传输(auto mode transition)事件通知(或称为系统中断事件通知)、查询OS滑块事件(slider position event)、动态电源滑块通知(dynamic power slider notification)事件……系统保留。其中,功率限制参数用于表征资源调度的类型为限制CPU功率,系统温度跟踪调优参数用于表征资源调度的类型为跟踪和调整系统温度。其他的数据类型不做赘述。Data types can be predefined by the BIOS. Optional, data types can include the following: power limits (power limits) parameters, system temperature tracking (STT) tuning parameters, BIOS fan speed & sound (cool quiet on lap) event notification, BIOS automatic Mode transfer (auto mode transition) event notification (also known as system interrupt event notification), query OS slider event (slider position event), dynamic power slider notification (dynamic power slider notification) event... system reserved. Among them, the power limit parameter is used to represent the type of resource scheduling, which is limiting CPU power, and the system temperature tracking and tuning parameter is used to represent the type of resource scheduling, which is tracking and adjusting system temperature. Other data types will not be described again.
可选的,不同的用户场景,对资源的调度方向不同,需要芯片策略融合器输出的第二调度策略信息的数据类型不同。因此,可以根据场景号确定数据类型。在一个具体的实施例中,可以预先建立场景号和数据类型的映射关系,根据该映射关系确定当前场景号对应的数据类型。例如,场景号2-1(主场景为办公场景,子场景为文档编辑场景)对应的数据类型为功率限制参数。需要说明的是,一个场景号可以对应一种数据类型,也可以对应多种数据类型。例如,某一场景号对应的数据类型可以既包括功率限制参数,又包括STT调优参数。Optionally, different user scenarios have different resource scheduling directions and require different data types of the second scheduling policy information output by the chip policy fusion device. Therefore, the data type can be determined based on the scene number. In a specific embodiment, a mapping relationship between scene numbers and data types can be established in advance, and the data type corresponding to the current scene number is determined based on the mapping relationship. For example, the data type corresponding to scene number 2-1 (the main scene is an office scene and the sub-scene is a document editing scene) is the power limit parameter. It should be noted that a scene number can correspond to one data type or multiple data types. For example, the data type corresponding to a certain scene number may include both power limitation parameters and STT tuning parameters.
S702、确定数据类型中包括的目标参数。S702. Determine the target parameters included in the data type.
每一种数据类型可以包括AMD芯片平台中定义的一种或多种参数,换句话说,每一种数据类型的第二功耗调度信息中可以包括AMD芯片平台中定义的一种或多种参数。例如,数据类型STT调优参数包括参数:STT-SkinTempLimit-APU、STT-SkinTempLimit-HS2、STT-M1、STT-M2、STT-M3、STT-M4、STT-M5、STT-M6等等。又例如,数据类型功率限制参数包括参数:FPPT、SPPT、SPPT-APUOnly、SPL和STTMinLimint等。其中,APU为加速处理器Accelerated Processing Units的缩写,FPPT为快整包功率跟踪限制fast PPT  limit的缩写。Each data type may include one or more parameters defined in the AMD chip platform. In other words, the second power consumption scheduling information of each data type may include one or more parameters defined in the AMD chip platform. parameter. For example, the data type STT tuning parameters include parameters: STT-SkinTempLimit-APU, STT-SkinTempLimit-HS2, STT-M1, STT-M2, STT-M3, STT-M4, STT-M5, STT-M6, etc. For another example, the data type power limit parameters include parameters: FPPT, SPPT, SPPT-APUOnly, SPL and STTMinLimint, etc. Among them, APU is the abbreviation of Accelerated Processing Units, and FPPT is the fast full package power tracking limit fast PPT. Abbreviation for limit.
可选的,芯片策略融合器可以预先建立各个数据类型与所包括的参数的映射关系,根据该映射关系确定当前第二CPU功耗调度信息的数据类型中所包括的参数,得到目标参数。Optionally, the chip policy fusion device can pre-establish a mapping relationship between each data type and included parameters, determine the parameters included in the data type of the current second CPU power consumption scheduling information based on the mapping relationship, and obtain the target parameters.
S703、获取目标参数与第一CPU功耗调度信息中所包括的参数的对应关系。S703. Obtain the corresponding relationship between the target parameter and the parameters included in the first CPU power consumption scheduling information.
第一调度策略信息中所包括的参数也称为初始参数。如上实施例所述,第一CPU功耗调度信息中所包括的初始参数可以包括PL1、PL2、EPP和开关状态等。The parameters included in the first scheduling policy information are also called initial parameters. As described in the above embodiment, the initial parameters included in the first CPU power consumption scheduling information may include PL1, PL2, EPP, switch status, etc.
可以理解,AMD芯片平台中定义的参数与第一CPU功耗调度信息的参数可以存在对应关系。因而,可以获取目标参数与第一CPU功耗调度信息中所包括的初始参数的对应关系(下称为第四对应关系)。It can be understood that there may be a corresponding relationship between parameters defined in the AMD chip platform and parameters of the first CPU power consumption scheduling information. Therefore, the correspondence relationship between the target parameter and the initial parameter included in the first CPU power consumption scheduling information (hereinafter referred to as the fourth correspondence relationship) can be obtained.
需要说明的是,根据第一CPU功耗调度信息中所包括的初始参数的不同,第四对应关系中可以包括所有目标参数与部分或全部初始参数的对应关系,也可以仅包括目标参数中的部分参数与初始参数中的部分或全部的对应关系。It should be noted that, depending on the initial parameters included in the first CPU power consumption scheduling information, the fourth correspondence may include the correspondence between all target parameters and some or all of the initial parameters, or may only include the correspondence between the target parameters. Correspondence between some parameters and some or all of the initial parameters.
具体的,一种可能的实现方式中,第一CPU功耗调度信息中可以包括所有目标参数对应的初始参数及目标值。对于一些不存在实际对应值的初始参数,可以令该初始参数的目标值0或为空,或者为其他预设值。即,无论是否存在实际对应值,初始参数均包括在第一CPU功耗调度信息中。当然,第一CPU功耗调度信息中还可以包括除初始参数之外的其他参数。采用这种实现方式时,第四对应关系中可以包括所有目标参数与部分或全部初始参数的对应关系。例如,目标参数5个,初始参数中存在实际对应值的参数包括2个,则,第一CPU功耗调度信息中可以包括5个目标参数对应的5个初始参数,对于不存在实际对应值的3个初始参数,令其目标值为0或为空。如此,第四对应关系中包括5个目标参数与5个初始参数的对应关系。Specifically, in a possible implementation manner, the first CPU power consumption scheduling information may include initial parameters and target values corresponding to all target parameters. For some initial parameters that do not have actual corresponding values, the target value of the initial parameter can be set to 0 or empty, or to other preset values. That is, regardless of whether there is an actual corresponding value, the initial parameters are included in the first CPU power consumption scheduling information. Of course, the first CPU power consumption scheduling information may also include other parameters besides the initial parameters. When this implementation is adopted, the fourth correspondence may include correspondences between all target parameters and some or all of the initial parameters. For example, there are 5 target parameters, and 2 of the initial parameters have actual corresponding values. Then, the first CPU power consumption scheduling information may include 5 initial parameters corresponding to the 5 target parameters. For those parameters that do not have actual corresponding values, 3 initial parameters, whose target value is 0 or empty. In this way, the fourth correspondence includes correspondences between 5 target parameters and 5 initial parameters.
另一种可能的实现方式中,第一CPU功耗调度信息中也可以只包括目标参数中的部分参数对应的初始参数及目标值,对于不存在实际对应值的初始参数不包括在第一CPU功耗调度信息中。采用这种实现方式时,第四对应关系中包括目标参数中的部分参数与初始参数中的部分或全部的对应关系。继续上述例子,例如,目标参数5个,初始参数中存在实际对应值的参数包括2个,则第一CPU功耗调度信息中仅可以包括存在实际对应值的2个初始参数,不包括不存在实际对应值的3个参数。如此,第四对应关系中包括5个目标参数中的2个参数与2个初始参数的对应关系。In another possible implementation, the first CPU power consumption scheduling information may also include only the initial parameters and target values corresponding to some of the target parameters. Initial parameters that do not have actual corresponding values are not included in the first CPU Power consumption scheduling information. When this implementation is adopted, the fourth correspondence includes a correspondence between some of the target parameters and some or all of the initial parameters. Continuing the above example, for example, if there are 5 target parameters and 2 of the initial parameters have actual corresponding values, then the first CPU power consumption scheduling information can only include 2 initial parameters with actual corresponding values, excluding those that do not. 3 parameters that actually correspond to values. In this way, the fourth corresponding relationship includes the corresponding relationship between 2 parameters among the 5 target parameters and the 2 initial parameters.
总而言之,第四对应关系中包括目标参数中的至少一个参数与初始参数中的至少一个参数的对应关系。本实施例中,目标参数包括:FPPT、SPPT、SPPT-APUOnly、SPL和STTMinLimint等,而初始参数包括PL1、PL2、EPP和开关状态等,第四对应关系包括目标参数中SPL、SPPT和初始参数中的PL1、PL2的对应关系,其中,SPL对应PL1,SPPT对应PL2。In summary, the fourth correspondence includes a correspondence between at least one parameter among the target parameters and at least one parameter among the initial parameters. In this embodiment, the target parameters include: FPPT, SPPT, SPPT-APUOnly, SPL and STTMinLimint, etc., while the initial parameters include PL1, PL2, EPP, switch status, etc., and the fourth corresponding relationship includes SPL, SPPT and initial parameters among the target parameters. The corresponding relationship between PL1 and PL2 in , where SPL corresponds to PL1 and SPPT corresponds to PL2.
S704、根据该对应关系以及第一CPU功耗调度信息,对目标参数进行赋值,生成第二CPU功耗调度信息。S704. According to the corresponding relationship and the first CPU power consumption scheduling information, assign a value to the target parameter and generate the second CPU power consumption scheduling information.
具体的,根据该对应关系,将第一CPU功耗调度信息的参数的值(即目标值)赋值至对应的目标参数。具体的,在第四对应关系中包括所有目标参数与部分或全部初始参数的对应关系的情况下,可以按照该对应关系,对所有目标参数进行一一赋值。在第四对应关系中仅包括目标参数中的部分参数与初始参数中的部分或全部的对应关系的情况下,在赋 值的过程中,对于第四关系中不存在对应的初始参数的目标参数,可以对该目标参数赋0值、赋空值或赋其他预设的值。本实施例中,将PL1目标值赋值至SPL,将PL2目标值赋值至SPPT,对FPPT、SPPT-APUOnly和STTMinLimint赋0值或赋空值,得到第二CPU功耗调度信息。Specifically, according to the corresponding relationship, the value of the parameter of the first CPU power consumption scheduling information (that is, the target value) is assigned to the corresponding target parameter. Specifically, in the case where the fourth corresponding relationship includes the corresponding relationship between all target parameters and some or all of the initial parameters, all target parameters can be assigned one by one according to the corresponding relationship. In the case where the fourth correspondence only includes the correspondence between some of the parameters in the target parameters and some or all of the initial parameters, when assigning In the process of setting the value, for the target parameter that does not have a corresponding initial parameter in the fourth relationship, the target parameter can be assigned a value of 0, a null value, or other preset values. In this embodiment, the PL1 target value is assigned to SPL, the PL2 target value is assigned to SPPT, and 0 or null values are assigned to FPPT, SPPT-APUOnly, and STTMinLimint to obtain the second CPU power consumption scheduling information.
需要说明的是,在场景号对应的数据类型为多个时,可以按照数据类型分多次赋值,每次生成一个第二CPU功耗调度信息,并将每次生成的第二CPU功耗调度信息发送至BIOS。也就是说,在场景号对应的数据类型为多个时,生成多个第二CPU功耗调度信息,多个第二CPU功耗调度信息分多次发送至BIOS。例如,在某一场景号对应的数据类型既包括功率限制参数,又包括STT调优参数,则可以先根据第一CPU功耗调度信息对功率限制参数所对应的参数进行赋值,生成第二CPU功耗调度信息A,将第二CPU功耗调度信息A发送至BIOS。之后,可以根据第一CPU功耗调度信息对STT调优参数对应的参数进行赋值,生成第二CPU功耗调度信息B,将第二CPU功耗调度信息B发送至BIOS。It should be noted that when the scene number corresponds to multiple data types, the value can be assigned multiple times according to the data type, and a second CPU power consumption scheduling information is generated each time, and the second CPU power consumption scheduling information generated each time is Information is sent to the BIOS. That is to say, when there are multiple data types corresponding to the scene number, multiple second CPU power consumption scheduling information is generated, and the multiple second CPU power consumption scheduling information is sent to the BIOS in multiple times. For example, if the data type corresponding to a certain scene number includes both power limitation parameters and STT tuning parameters, you can first assign values to the parameters corresponding to the power limitation parameters based on the first CPU power consumption scheduling information to generate the second CPU The power consumption scheduling information A sends the second CPU power consumption scheduling information A to the BIOS. Afterwards, parameters corresponding to the STT tuning parameters can be assigned according to the first CPU power consumption scheduling information, second CPU power consumption scheduling information B is generated, and the second CPU power consumption scheduling information B is sent to the BIOS.
该实现方式中,在场景号对应的数据类型为多个时,生成多个第二CPU功耗调度信息,多个第二CPU功耗调度信息分多次发送至BIOS,这样能够防止信息转译过程中数据混乱,提高信息转译的准确性。In this implementation, when there are multiple data types corresponding to the scene number, multiple second CPU power consumption scheduling information is generated, and the multiple second CPU power consumption scheduling information is sent to the BIOS in multiple times, which can prevent the information translation process Eliminate data confusion and improve the accuracy of information translation.
以上实施例对CPU的芯片平台类型为AMD的情况下对第一CPU功耗调度信息进行转译,输出第二CPU功耗调度信息的过程进行了说明。除了生成第二CPU功耗调度信息之外,在一些实施例中,芯片策略融合器还可以根据场景信息生成第二CPU功耗调度信息的数据等级,并将数据等级下发至BIOS,以便于BIOS数据处理时使用。具体说明如下:The above embodiment explains the process of translating the first CPU power consumption scheduling information and outputting the second CPU power consumption scheduling information when the chip platform type of the CPU is AMD. In addition to generating the second CPU power consumption scheduling information, in some embodiments, the chip policy fusion device can also generate a data level of the second CPU power consumption scheduling information based on the scenario information, and deliver the data level to the BIOS for convenience Used during BIOS data processing. The specific instructions are as follows:
芯片策略融合器输出第二CPU功耗调度信息,并将第二CPU功耗调度信息发送至调度执行器,由调度执行器通过WMI将第二CPU功耗调度信息下发至BIOS。BIOS在接收到第二CPU功耗调度信息之后,可以有多种处理方法,例如:The chip policy fusion unit outputs the second CPU power consumption scheduling information and sends the second CPU power consumption scheduling information to the scheduling executor, and the scheduling executor delivers the second CPU power consumption scheduling information to the BIOS through WMI. After receiving the second CPU power consumption scheduling information, the BIOS can have multiple processing methods, such as:
①BIOS可以直接将第二CPU功耗调度信息下发至CPU,由CPU根据第二CPU功耗调度信息调整功耗,如上述实施例所述。① The BIOS can directly deliver the second CPU power consumption scheduling information to the CPU, and the CPU adjusts the power consumption according to the second CPU power consumption scheduling information, as described in the above embodiment.
②BIOS也可以将第二CPU功耗调度信息与其他的功耗调度信息对比或融合,决策出最终的CPU功耗调度信息,并将最终的CPU功耗调度信息发送至CPU,由CPU执行最终的CPU功耗调度信息,调整功耗。② The BIOS can also compare or fuse the second CPU power consumption scheduling information with other power consumption scheduling information, decide on the final CPU power consumption scheduling information, and send the final CPU power consumption scheduling information to the CPU, and the CPU will execute the final CPU power consumption scheduling information to adjust power consumption.
具体的,在调度执行器通过WMI将第二CPU功耗调度信息下发至BIOS的同时,嵌入式控制器(Embedded Controller,EC)也可以通过系统控制中断(system control interrupt,SCI)通道下发第三CPU功耗调度信息至BIOS。BIOS在接收到第二CPU功耗调度信息和第三CPU功耗调度信息后,可以按照预设决策规则,决策出最终的CPU功耗调度信息。Specifically, while the scheduling executor sends the second CPU power consumption scheduling information to the BIOS through WMI, the embedded controller (Embedded Controller, EC) can also send it through the system control interrupt (system control interrupt, SCI) channel. The third CPU power consumption scheduling information is sent to the BIOS. After receiving the second CPU power consumption scheduling information and the third CPU power consumption scheduling information, the BIOS can decide the final CPU power consumption scheduling information according to the preset decision rules.
上述第②种情况下,在图7所述实施例的基础上,本申请实施例提供的信息处理方法还可以包括:In the above ② case, based on the embodiment shown in Figure 7, the information processing method provided by the embodiment of the present application may also include:
芯片策略融合器根据场景号确定第二CPU功耗调度信息的数据等级;The chip policy fusion device determines the data level of the second CPU power consumption scheduling information based on the scene number;
芯片策略融合器将数据等级发送至BIOS。The chip policy fusion device sends the data level to the BIOS.
数据等级,也称为WMI策略数据等级,即WMI policy decision date level,用于表征根据第二调度策略信息和第三调度策略信息决策最终调度策略信息最终CPU功耗调度信息过程中,通过WMI下发的第二调度策略信息的重要等级或优先等级。本实施例中,第 二CPU功耗调度信息的数据等级用于表征根据第二CPU功耗调度信息和第三CPU功耗调度信息决策最终CPU功耗调度信息过程中,通过WMI下发的第二CPU功耗调度信息的重要等级或优先等级。可选的,数据等级可以包括低等级(low level)、正常等级(normal level)和高等级(high level)。Data level, also known as WMI policy data level, i.e. WMI policy decision date level, is used to represent the final scheduling policy information and the final CPU power consumption scheduling information process based on the second scheduling policy information and the third scheduling policy information. The importance level or priority level of the second scheduling policy information sent. In this embodiment, the The data level of the second CPU power consumption scheduling information is used to represent the second CPU power consumption scheduling information issued through WMI during the process of deciding the final CPU power consumption scheduling information based on the second CPU power consumption scheduling information and the third CPU power consumption scheduling information. level of importance or priority. Optionally, the data level may include low level, normal level and high level.
低等级用于表征根据第二CPU功耗调度信息和第三CPU功耗调度信息决策最终CPU功耗调度信息过程中,第二CPU功耗调度信息的重要等级或优先等级最低。在一个具体的实施例中,数据等级为低等级时,根据第二CPU功耗调度信息和第三CPU功耗调度信息决策最终CPU功耗调度信息过程中可以忽略第二CPU功耗调度信息,仅根据第三CPU功耗调度信息决策出最终的CPU功耗调度信息。The low level is used to indicate that in the process of deciding the final CPU power consumption scheduling information based on the second CPU power consumption scheduling information and the third CPU power consumption scheduling information, the second CPU power consumption scheduling information has the lowest importance level or priority level. In a specific embodiment, when the data level is low level, the second CPU power consumption scheduling information can be ignored in the process of deciding the final CPU power consumption scheduling information based on the second CPU power consumption scheduling information and the third CPU power consumption scheduling information. The final CPU power consumption scheduling information is determined only based on the third CPU power consumption scheduling information.
正常等级用于表征根据第二CPU功耗调度信息和第三CPU功耗调度信息决策最终CPU功耗调度信息过程中,第二CPU功耗调度信息的重要等级或优先等级为中等,与第三CPU功耗调度信息的重要程度相当,将第二CPU功耗调度信息和第三CPU功耗调度信息比较或融合得到最终的CPU功耗调度信息。The normal level is used to represent that in the process of deciding the final CPU power consumption scheduling information based on the second CPU power consumption scheduling information and the third CPU power consumption scheduling information, the importance level or priority level of the second CPU power consumption scheduling information is medium, which is different from that of the third CPU power consumption scheduling information. The CPU power consumption scheduling information is of equal importance. The second CPU power consumption scheduling information and the third CPU power consumption scheduling information are compared or integrated to obtain the final CPU power consumption scheduling information.
高等级用于表征根据第二CPU功耗调度信息和第三CPU功耗调度信息决策最终CPU功耗调度信息过程中,第二CPU功耗调度信息的重要等级或优先等级最高。在一个具体的实施例中,数据等级为高等级时,根据第二CPU功耗调度信息和第三CPU功耗调度信息决策最终CPU功耗调度信息过程中可以忽略第三CPU功耗调度信息,仅根据第二CPU功耗调度信息决策出最终的CPU功耗调度信息。The high level is used to indicate that in the process of deciding the final CPU power consumption scheduling information based on the second CPU power consumption scheduling information and the third CPU power consumption scheduling information, the second CPU power consumption scheduling information has the highest importance level or priority level. In a specific embodiment, when the data level is high level, the third CPU power consumption scheduling information can be ignored in the process of deciding the final CPU power consumption scheduling information based on the second CPU power consumption scheduling information and the third CPU power consumption scheduling information. The final CPU power consumption scheduling information is determined only based on the second CPU power consumption scheduling information.
可选的,数据等级可以根据场景号确定。在一个具体的实施例中,可以预先建立场景号和数据等级的映射关系,根据该映射关系确定当前场景号对应的数据等级。例如,场景号5-1(主场景为性能测评场景,子场景为测评主场景)对应的数据等级为高等级。又例如,场景号-1(默认场景)对应的数据等级为低等级。具体的,由于默认场景表明当前场景为几种预设场景之外的其他场景,相当于无法获知当前的具体场景,因而可以将默认场景对应的数据等级设置为低等级,即根据第二CPU功耗调度信息和第三CPU功耗调度信息决策最终CPU功耗调度信息过程中可以忽略第二CPU功耗调度信息,由第三CPU功耗调度信息决定最终CPU功耗调度信息。Optionally, the data level can be determined based on the scene number. In a specific embodiment, a mapping relationship between scene numbers and data levels can be established in advance, and the data level corresponding to the current scene number is determined based on the mapping relationship. For example, the data level corresponding to scene number 5-1 (the main scene is the performance evaluation scene and the sub-scenario is the main evaluation scene) is high level. For another example, the data level corresponding to scene number -1 (default scene) is low level. Specifically, since the default scene indicates that the current scene is other than several preset scenes, which means that the current specific scene cannot be known, the data level corresponding to the default scene can be set to a low level, that is, according to the second CPU function The second CPU power consumption scheduling information can be ignored in the process of determining the final CPU power consumption scheduling information based on the consumption scheduling information and the third CPU power consumption scheduling information, and the final CPU power consumption scheduling information is determined by the third CPU power consumption scheduling information.
本实施例中,除第二CPU功耗调度信息之外,还根据场景号生成第二CPU功耗调度信息的数据等级,并将数据等级下发至BIOS,以便于BIOS根据数据等级、第二CPU功耗调度信息和第三CPU功耗调度信息决策生成最终CPU功耗调度信息。如此,使得最终CPU功耗调度的决策不仅参考了多种CPU功耗调度信息,而且充分考虑了不同场景下各种CPU调度信息对决策的重要程度,提高了最终CPU功耗调度的准确性和可靠性。In this embodiment, in addition to the second CPU power consumption scheduling information, the data level of the second CPU power consumption scheduling information is also generated according to the scene number, and the data level is sent to the BIOS, so that the BIOS can calculate the second CPU power consumption scheduling information according to the data level and the second CPU power consumption scheduling information. The CPU power consumption scheduling information and the third CPU power consumption scheduling information are decided to generate final CPU power consumption scheduling information. In this way, the final CPU power consumption scheduling decision not only refers to a variety of CPU power consumption scheduling information, but also fully considers the importance of various CPU scheduling information to the decision-making in different scenarios, improving the accuracy and accuracy of the final CPU power consumption scheduling. reliability.
上文详细介绍了本申请实施例提供的信息处理方法的示例。可以理解的是,电子设备为了实现上述功能,其包含了执行各个功能相应的硬件和/或软件模块。本领域技术人员应该很容易意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,本申请能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。本领域技术人员可以结合实施例对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。 The above describes in detail examples of the information processing methods provided by the embodiments of the present application. It can be understood that, in order to implement the above functions, the electronic device includes corresponding hardware and/or software modules that perform each function. Persons skilled in the art should easily realize that, with the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is performed by hardware or computer software driving the hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions in conjunction with the embodiments for each specific application, but such implementations should not be considered to be beyond the scope of this application.
本申请实施例可以根据上述方法示例对电子设备进行功能模块的划分,例如,可以对应各个功能划分为各个功能模块,例如检测单元、处理单元、显示单元等,也可以将两个或两个以上的功能集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。需要说明的是,本申请实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。Embodiments of the present application can divide the electronic device into functional modules according to the above method examples. For example, the electronic device can be divided into functional modules corresponding to each function, such as a detection unit, a processing unit, a display unit, etc., or two or more functions integrated into one module. The above integrated modules can be implemented in the form of hardware or software function modules. It should be noted that the division of modules in the embodiment of the present application is schematic and is only a logical function division. In actual implementation, there may be other division methods.
需要说明的是,上述方法实施例涉及的各步骤的所有相关内容均可以援引到对应功能模块的功能描述,在此不再赘述。It should be noted that all relevant content of each step involved in the above method embodiment can be quoted from the functional description of the corresponding functional module, and will not be described again here.
本实施例提供的电子设备,用于执行上述信息处理方法,因此可以达到与上述实现方法相同的效果。The electronic device provided in this embodiment is used to execute the above information processing method, and therefore can achieve the same effect as the above implementation method.
在采用集成的单元的情况下,电子设备还可以包括处理模块、存储模块和通信模块。其中,处理模块可以用于对电子设备的动作进行控制管理。存储模块可以用于支持电子设备执行存储程序代码和数据等。通信模块,可以用于支持电子设备与其他设备的通信。In the case of integrated units, the electronic device may also include processing modules, storage modules and communication modules. Among them, the processing module can be used to control and manage the actions of the electronic device. The storage module can be used to support electronic devices to execute stored program codes and data, etc. The communication module can be used to support communication between electronic devices and other devices.
其中,处理模块可以是处理器或控制器。其可以实现或执行结合本申请公开内容所描述的各种示例性的逻辑方框,模块和电路。处理器也可以是实现计算功能的组合,例如包含一个或多个微处理器组合,数字信号处理(digital signal processing,DSP)和微处理器的组合等等。存储模块可以是存储器。通信模块具体可以为射频电路、蓝牙芯片、Wi-Fi芯片等与其他电子设备交互的设备。The processing module may be a processor or a controller. It may implement or execute the various illustrative logical blocks, modules, and circuits described in connection with this disclosure. A processor can also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and a microprocessor, etc. The storage module may be a memory. The communication module can specifically be a radio frequency circuit, a Bluetooth chip, a Wi-Fi chip and other devices that interact with other electronic devices.
在一个实施例中,当处理模块为处理器,存储模块为存储器时,本实施例所涉及的电子设备可以为具有图1所示结构的设备。In one embodiment, when the processing module is a processor and the storage module is a memory, the electronic device involved in this embodiment may be a device with the structure shown in Figure 1 .
本申请实施例还提供一种芯片系统,如图8所示,该芯片系统包括至少一个处理器801和至少一个接口电路802。处理器801和接口电路802可通过线路互联。例如,接口电路802可用于从其它装置(例如电子设备的存储器)接收信号。又例如,接口电路802可用于向其它装置(例如处理器801)发送信号。示例性的,接口电路802可读取存储器中存储的指令,并将该指令发送给处理器801。当所述指令被处理器801执行时,可使得电子设备执行上述实施例中的各个步骤。当然,该芯片系统还可以包含其他分立器件,本申请实施例对此不作具体限定。An embodiment of the present application also provides a chip system. As shown in FIG. 8 , the chip system includes at least one processor 801 and at least one interface circuit 802 . The processor 801 and the interface circuit 802 may be interconnected by wires. For example, interface circuitry 802 may be used to receive signals from other devices, such as memory of an electronic device. As another example, interface circuit 802 may be used to send signals to other devices (eg, processor 801). For example, the interface circuit 802 can read instructions stored in the memory and send the instructions to the processor 801 . When the instructions are executed by the processor 801, the electronic device can be caused to perform various steps in the above embodiments. Of course, the chip system may also include other discrete devices, which are not specifically limited in the embodiments of this application.
本申请实施例还提供了一种计算机可读存储介质,计算机可读存储介质中存储了计算机程序,当计算机程序被处理器执行时,使得处理器执行上述任一实施例的信息处理方法。Embodiments of the present application also provide a computer-readable storage medium. A computer program is stored in the computer-readable storage medium. When the computer program is executed by a processor, it causes the processor to execute the information processing method of any of the above embodiments.
本申请实施例还提供了一种计算机程序产品,当该计算机程序产品在计算机上运行时,使得计算机执行上述相关步骤,以实现上述实施例中的信息处理方法。An embodiment of the present application also provides a computer program product. When the computer program product is run on a computer, it causes the computer to perform the above related steps to implement the information processing method in the above embodiment.
另外,本申请的实施例还提供一种装置,这个装置具体可以是芯片,组件或模块,该装置可包括相连的处理器和存储器;其中,存储器用于存储计算机执行指令,当装置运行时,处理器可执行存储器存储的计算机执行指令,以使芯片执行上述各方法实施例中的信息处理方法。In addition, embodiments of the present application also provide a device. This device may be a chip, a component or a module. The device may include a connected processor and a memory. The memory is used to store computer execution instructions. When the device is running, The processor can execute computer execution instructions stored in the memory, so that the chip executes the information processing method in each of the above method embodiments.
其中,本实施例提供的电子设备、计算机可读存储介质、计算机程序产品或芯片均用于执行上文所提供的对应的方法,因此,其所能达到的有益效果可参考上文所提供的对应的方法中的有益效果,此处不再赘述。Among them, the electronic devices, computer-readable storage media, computer program products or chips provided in this embodiment are all used to execute the corresponding methods provided above. Therefore, the beneficial effects they can achieve can be referred to the above provided The beneficial effects of the corresponding methods will not be described again here.
通过以上实施方式的描述,所属领域的技术人员可以了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配 由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。Through the description of the above embodiments, those skilled in the art can understand that for the convenience and simplicity of description, only the division of the above functional modules is used as an example. In actual applications, the above functions can be allocated according to needs. It is completed by different functional modules, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.
在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个装置,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of modules or units is only a logical function division. In actual implementation, there may be other division methods, for example, multiple units or components may be combined or can be integrated into another device, or some features can be ignored, or not implemented. On the other hand, the coupling or direct coupling or communication connection between each other shown or discussed may be through some interfaces, and the indirect coupling or communication connection of the devices or units may be in electrical, mechanical or other forms.
作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是一个物理单元或多个物理单元,即可以位于一个地方,或者也可以分布到多个不同地方。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。A unit described as a separate component may or may not be physically separate. A component shown as a unit may be one physical unit or multiple physical units, that is, it may be located in one place, or it may be distributed to multiple different places. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application can be integrated into one processing unit, each unit can exist physically alone, or two or more units can be integrated into one unit. The above integrated units can be implemented in the form of hardware or software functional units.
集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个可读取存储介质中。基于这样的理解,本申请实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该软件产品存储在一个存储介质中,包括若干指令用以使得一个设备(可以是单片机,芯片等)或处理器(processor)执行本申请各个实施例方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。Integrated units may be stored in a readable storage medium if they are implemented in the form of software functional units and sold or used as independent products. Based on this understanding, the technical solutions of the embodiments of the present application are essentially or contribute to the existing technology, or all or part of the technical solution can be embodied in the form of a software product, and the software product is stored in a storage medium , including several instructions to cause a device (which can be a microcontroller, a chip, etc.) or a processor to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage media include: U disk, mobile hard disk, read only memory (ROM), random access memory (RAM), magnetic disk or optical disk and other media that can store program code.
以上内容,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求的保护范围为准。 The above contents are only specific embodiments of the present application, but the protection scope of the present application is not limited thereto. Any person familiar with the technical field can easily think of changes or replacements within the technical scope disclosed in the present application, and should are covered by the protection scope of this application. Therefore, the protection scope of this application should be subject to the protection scope of the claims.

Claims (16)

  1. 一种信息处理方法,所述方法由电子设备执行,其特征在于,所述方法包括:An information processing method, the method is executed by an electronic device, characterized in that the method includes:
    获取当前场景信息和所述当前场景信息对应的第一调度策略信息;所述当前场景信息表征所述电子设备当前处理的业务所对应的用户场景;Obtain current scene information and first scheduling policy information corresponding to the current scene information; the current scene information represents the user scene corresponding to the service currently processed by the electronic device;
    若所述电子设备的中央处理器CPU的芯片平台类型为第一类型,则确定所述第一调度策略信息对应的目标策略标识,根据所述目标策略标识通过所述第一类型的CPU对所述电子设备进行资源调度;If the chip platform type of the central processing unit CPU of the electronic device is the first type, the target policy identifier corresponding to the first scheduling strategy information is determined, and the CPU of the first type is configured according to the target policy identifier. The above-mentioned electronic equipment performs resource scheduling;
    若所述电子设备的CPU的芯片平台类型为第二类型,则根据所述当前场景信息和所述第一调度策略信息,确定第二调度策略信息,根据所述第二调度策略信息通过所述第二类型的CPU对所述电子设备进行资源调度。If the chip platform type of the CPU of the electronic device is the second type, the second scheduling strategy information is determined according to the current scene information and the first scheduling strategy information, and the second scheduling strategy information is used according to the second scheduling strategy information. The second type of CPU performs resource scheduling on the electronic device.
  2. 根据权利要求1所述的方法,其特征在于,所述第一调度策略信息中包括长时睿频功耗PL1目标值、能效比EPP目标值和能效性能优化EPO开关的状态,所述目标策略标识包括目标动态调谐技术DTT策略标识和目标EPO策略标识;所述确定所述第一调度策略信息对应的目标策略标识,根据所述目标策略标识通过所述第一类型的CPU对所述电子设备进行资源调度,包括:The method according to claim 1, characterized in that the first scheduling strategy information includes a long-term turbo power consumption PL1 target value, an energy efficiency ratio EPP target value and an energy efficiency performance optimization EPO switch state, and the target strategy The identifier includes a target dynamic tuning technology DTT policy identifier and a target EPO policy identifier; the target policy identifier corresponding to the first scheduling strategy information is determined, and the electronic device is configured by the first type of CPU according to the target policy identifier. Perform resource scheduling, including:
    获取所述第一调度策略信息对应的当前系统负载;Obtain the current system load corresponding to the first scheduling policy information;
    根据所述PL1目标值或所述当前系统负载确定所述目标DTT策略标识;Determine the target DTT policy identifier according to the PL1 target value or the current system load;
    根据所述EPO开关的状态确定所述目标EPO策略标识;Determine the target EPO policy identifier according to the state of the EPO switch;
    根据所述目标DTT策略标识通过所述第一类型的CPU调整CPU的功率,并根据所述目标EPO策略标识和所述EPP目标值,通过所述第一类型的CPU调整CPU的能效比。The power of the CPU is adjusted through the first type of CPU according to the target DTT policy identifier, and the energy efficiency ratio of the CPU is adjusted through the first type of CPU according to the target EPO policy identifier and the EPP target value.
  3. 根据权利要求2所述的方法,其特征在于,所述根据所述PL1目标值或所述当前系统负载确定所述目标DTT策略标识,包括:The method of claim 2, wherein determining the target DTT policy identifier according to the PL1 target value or the current system load includes:
    若所述第一调度策略信息为默认场景对应的策略信息,则根据第一对应关系,确定与所述当前系统负载对应的所述目标DTT策略标识;所述第一对应关系中包括至少一个默认策略标识与至少一个系统负载的对应关系,所述至少一个默认策略标识中包括所述目标DTT策略标识;所述默认场景是指除预设场景外的其他用户场景,所述默认策略标识是指所述默认场景对应的DTT策略标识;If the first scheduling policy information is the policy information corresponding to the default scenario, the target DTT policy identifier corresponding to the current system load is determined according to the first correspondence relationship; the first correspondence relationship includes at least one default The corresponding relationship between the policy identifier and at least one system load. The at least one default policy identifier includes the target DTT policy identifier; the default scenario refers to other user scenarios except the preset scenario, and the default policy identifier refers to The DTT policy identifier corresponding to the default scenario;
    若所述第一调度策略信息不为所述默认场景对应的策略信息,则根据第二对应关系,确定与所述PL1目标值最接近的PL1值对应的所述目标DTT策略标识;所述第二对应关系中包括多个非默认策略标识与多个PL1值的对应关系,所述多个非默认策略标识中包括所述目标DTT策略标识;所述非默认策略标识是指非默认场景对应的DTT策略标识。If the first scheduling policy information is not the policy information corresponding to the default scenario, determine the target DTT policy identifier corresponding to the PL1 value closest to the PL1 target value according to the second correspondence relationship; the third The second corresponding relationship includes a corresponding relationship between multiple non-default policy identifiers and multiple PL1 values. The multiple non-default policy identifiers include the target DTT policy identifier; the non-default policy identifier refers to the corresponding non-default scenario. DTT policy identifier.
  4. 根据权利要求3所述的方法,其特征在于,所述非默认策略标识为DTT策略号,所述非默认策略标识中包括至少一组第一DTT策略号,所述第一DTT策略号中包括多个DTT策略号,且所述多个DTT策略号按照从小到大的顺序时,相邻两个DTT策略号对应的PL1步进值相等;所述根据所述第二对应关系,确定与所述PL1目标值最接近的PL1值对应的所述目标DTT策略标识,包括:The method according to claim 3, characterized in that the non-default policy identifier is a DTT policy number, the non-default policy identifier includes at least a group of first DTT policy numbers, and the first DTT policy number includes When there are multiple DTT policy numbers, and the multiple DTT policy numbers are in ascending order, the PL1 step values corresponding to two adjacent DTT policy numbers are equal; according to the second corresponding relationship, it is determined that the The target DTT policy identifier corresponding to the PL1 value closest to the PL1 target value includes:
    根据所述PL1目标值确定目标PL1步进值和目标补偿值;Determine the target PL1 step value and the target compensation value according to the PL1 target value;
    根据所述PL1目标值、所述目标PL1步进值和所述目标补偿值确定所述目标DTT策略标识。 The target DTT strategy identifier is determined according to the PL1 target value, the target PL1 step value and the target compensation value.
  5. 根据权利要求4所述的方法,其特征在于,所述根据所述PL1目标值、所述目标PL1步进值和所述目标补偿值确定所述目标DTT策略标识,包括:The method of claim 4, wherein determining the target DTT strategy identifier based on the PL1 target value, the target PL1 step value and the target compensation value includes:
    通过公式(1)确定所述目标DTT策略标识:
    The target DTT policy identifier is determined through formula (1):
    其中,表示向下取整,step表示所述目标PL1步进值,offset1表示所述目标补偿值。in, means rounding down, step means the target PL1 step value, and offset1 means the target compensation value.
  6. 根据权利要求3至5中任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 3 to 5, characterized in that the method further includes:
    根据所述当前场景信息确定所述第一调度策略信息是否为所述默认场景对应的策略信息。Determine whether the first scheduling policy information is policy information corresponding to the default scene according to the current scene information.
  7. 根据权利要求2所述的方法,其特征在于,所述根据所述EPO开关的状态确定所述目标EPO策略标识,包括:The method of claim 2, wherein determining the target EPO policy identifier according to the state of the EPO switch includes:
    若所述EPO开关的状态为关闭状态,则将预设EPO策略标识确定为所述目标EPO策略标识;If the state of the EPO switch is a closed state, determine the preset EPO policy identifier as the target EPO policy identifier;
    所述根据所述目标EPO策略标识和所述EPP目标值,通过所述第一类型的CPU调整CPU的能效比,包括:The step of adjusting the energy efficiency ratio of the CPU through the first type of CPU according to the target EPO policy identifier and the EPP target value includes:
    根据所述预设EPO策略标识,通过所述第一类型的CPU调整CPU的能效比为所述EPP目标值。According to the preset EPO policy identifier, the energy efficiency ratio of the CPU is adjusted to the EPP target value by the first type of CPU.
  8. 根据权利要求2所述的方法,其特征在于,所述根据所述EPO开关的状态确定所述目标EPO策略标识,包括:The method of claim 2, wherein determining the target EPO policy identifier according to the state of the EPO switch includes:
    若所述EPO开关的状态为打开状态,则根据所述EPP目标值确定EPO档位目标值,并根据第三对应关系,确定与所述EPO档位目标值最接近的EPO档位值对应的所述目标EPO策略标识;所述第三对应关系中包括多个EPO策略标识与多个EPO档位值的对应关系,所述多个EPO策略标识中包括所述目标EPO策略标识;If the state of the EPO switch is an open state, determine the EPO gear target value according to the EPP target value, and determine the EPO gear value corresponding to the EPO gear value closest to the EPO gear target value according to the third corresponding relationship. The target EPO policy identifier; the third corresponding relationship includes a corresponding relationship between multiple EPO policy identifiers and multiple EPO gear values, and the multiple EPO policy identifiers include the target EPO policy identifier;
    所述根据所述目标EPO策略标识和所述EPP目标值,通过所述第一类型的CPU调整CPU的能效比,包括:The step of adjusting the energy efficiency ratio of the CPU through the first type of CPU according to the target EPO policy identifier and the EPP target value includes:
    根据所述目标EPO策略标识对应的EPO档位值,基于DTT,通过所述第一类型的CPU调整CPU的能效比。According to the EPO gear value corresponding to the target EPO policy identifier and based on DTT, the energy efficiency ratio of the CPU is adjusted through the first type of CPU.
  9. 根据权利要求8所述的方法,其特征在于,所述多个EPO策略标识为多个EPO策略号,且所述多个EPO策略号按照从小到大的顺序时,相邻两个EPO策略号对应的EPO档位步进值相等,所述根据所述第三对应关系,确定与所述EPO档位目标值最接近的EPO档位值对应的所述目标EPO策略标识,包括:The method according to claim 8, characterized in that the plurality of EPO policy identifiers are multiple EPO policy numbers, and when the multiple EPO policy numbers are in order from small to large, two adjacent EPO policy numbers The corresponding EPO gear step values are equal. According to the third correspondence relationship, determining the target EPO strategy identifier corresponding to the EPO gear value closest to the EPO gear target value includes:
    根据公式(2)确定所述目标EPO策略标识:
    The target EPO policy identifier is determined according to formula (2):
    其中,表示向下取整,EPP目标值/255为所述EPO档位目标值,offset2表示所述EPO档位步进值。in, Indicates rounding down, EPP target value/255 is the EPO gear target value, and offset2 represents the EPO gear step value.
  10. 根据权利要求1所述的方法,其特征在于,所述根据所述当前场景信息和所述第一调度策略信息,确定第二调度策略信息,包括:The method of claim 1, wherein determining the second scheduling policy information based on the current scene information and the first scheduling policy information includes:
    根据所述当前场景信息确定所述第二调度策略信息的数据类型;Determine the data type of the second scheduling policy information according to the current scene information;
    获取所述数据类型中包括的目标参数;Obtain the target parameters included in the data type;
    获取所述第一调度策略信息中的初始参数; Obtain initial parameters in the first scheduling policy information;
    根据第四对应关系和所述初始参数的值,对所述目标参数赋值,得到所述第二调度策略信息;所述第四对应关系中包括所述目标参数中的至少一个参数和所述初始参数中的至少一个参数的对应关系。According to the fourth corresponding relationship and the value of the initial parameter, the target parameter is assigned a value to obtain the second scheduling policy information; the fourth corresponding relationship includes at least one parameter in the target parameter and the initial parameter. Correspondence of at least one of the parameters.
  11. 根据权利要求10所述的方法,其特征在于,所述初始参数包括PL1和短时睿频功耗PL2,所述目标参数包括持续功率限制SPL和慢整包功率跟踪限制SPPT,所述第四对应关系包括所述SPL和所述PL1的对应关系,以及所述SPPT与所述PL2的对应关系;The method according to claim 10, wherein the initial parameters include PL1 and short-term turbo power consumption PL2, the target parameters include continuous power limit SPL and slow packet power tracking limit SPPT, and the fourth The corresponding relationship includes the corresponding relationship between the SPL and the PL1, and the corresponding relationship between the SPPT and the PL2;
    所述根据第四对应关系和所述初始参数的值,对所述目标参数赋值,得到所述第二调度策略信息,包括:Assigning a value to the target parameter according to the fourth corresponding relationship and the value of the initial parameter to obtain the second scheduling policy information includes:
    将所述PL1的值赋值至所述SPL,将所述PL2的值赋值至所述SPPT,得到所述第二调度策略信息。Assign the value of the PL1 to the SPL, and assign the value of the PL2 to the SPPT to obtain the second scheduling policy information.
  12. 根据权利要求11所述的方法,其特征在于,所述第一调度策略信息中还包括EPP目标值,所述根据所述第二调度策略信息通过所述第二类型的CPU对所述电子设备进行资源调度,包括:The method according to claim 11, characterized in that the first scheduling policy information also includes an EPP target value, and the second type of CPU uses the second type of CPU to adjust the electronic device according to the second scheduling policy information. Perform resource scheduling, including:
    根据所述SPL的值和所述SPPT的值,通过所述第二类型的CPU调整CPU的功率;According to the value of the SPL and the value of the SPPT, adjust the power of the CPU by the second type of CPU;
    根据所述EPP目标值,通过所述第二类型的CPU调整CPU的能效比。According to the EPP target value, the energy efficiency ratio of the CPU is adjusted by the second type of CPU.
  13. 根据权利要求10至12中任一项所述的方法,其特征在于,所述根据所述第二调度策略信息通过所述第二类型的CPU对所述电子设备进行资源调度,包括:The method according to any one of claims 10 to 12, wherein the resource scheduling of the electronic device through the second type of CPU according to the second scheduling policy information includes:
    获取第三调度策略信息,所述第三调度策略信息为所述电子设备的嵌入式控制器生成的调度策略信息;Obtain third scheduling policy information, where the third scheduling policy information is scheduling policy information generated by the embedded controller of the electronic device;
    根据所述第二调度策略信息和所述第三调度策略信息,确定最终调度策略信息;Determine final scheduling policy information according to the second scheduling policy information and the third scheduling policy information;
    在所述电子设备的CPU的芯片平台类型为所述第二类型的情况下,所述方法还包括:In the case where the chip platform type of the CPU of the electronic device is the second type, the method further includes:
    根据所述当前场景信息获取所述第一调度策略信息的数据等级;所述数据等级表征根据所述第二调度策略信息和所述第三调度策略信息确定所述最终调度策略信息的过程中,所述第二调度策略信息的重要程度。Obtain the data level of the first scheduling policy information according to the current scene information; the data level represents the process of determining the final scheduling policy information based on the second scheduling policy information and the third scheduling policy information, The importance of the second scheduling policy information.
  14. 根据权利要求1至13中任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1 to 13, characterized in that the method further includes:
    获取所述电子设备的CPU芯片的供应商标识;Obtain the supplier identification of the CPU chip of the electronic device;
    根据所述供应商标识确定所述电子设备的CPU的芯片平台类型。The chip platform type of the CPU of the electronic device is determined according to the supplier identification.
  15. 一种电子设备,其特征在于,包括:处理器、存储器和接口;An electronic device, characterized by including: a processor, a memory and an interface;
    所述处理器、所述存储器和所述接口相互配合,使得所述电子设备执行如权利要求1至14中任一项所述的方法。The processor, the memory and the interface cooperate with each other so that the electronic device performs the method according to any one of claims 1 to 14.
  16. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储了计算机程序,当所述计算机程序被处理器执行时,使得所述处理器执行权利要求1至14中任一项所述的方法。 A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium. When the computer program is executed by a processor, the processor is caused to execute any one of claims 1 to 14. method described in the item.
PCT/CN2023/090786 2022-05-16 2023-04-26 Information processing method and electronic device WO2023221752A1 (en)

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
CN202210530863 2022-05-16
CN202210530863.4 2022-05-16
CN202210745011.7 2022-06-28
CN202210745011.7A CN117112191A (en) 2022-05-16 2022-06-28 Information processing method and electronic device

Publications (1)

Publication Number Publication Date
WO2023221752A1 true WO2023221752A1 (en) 2023-11-23

Family

ID=88804415

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/090786 WO2023221752A1 (en) 2022-05-16 2023-04-26 Information processing method and electronic device

Country Status (2)

Country Link
CN (1) CN117112191A (en)
WO (1) WO2023221752A1 (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102073545A (en) * 2011-02-28 2011-05-25 中国人民解放军国防科学技术大学 Process scheduling method and device for preventing screen jam of user interface in operating system
US20160077576A1 (en) * 2014-09-17 2016-03-17 Abhinav R. Karhu Technologies for collaborative hardware and software scenario-based power management
CN106095592A (en) * 2016-05-31 2016-11-09 广东欧珀移动通信有限公司 A kind of prospect application scenarios synchronous method and device, system
CN110489228A (en) * 2019-07-16 2019-11-22 华为技术有限公司 A kind of method and electronic equipment of scheduling of resource
CN112948133A (en) * 2021-04-08 2021-06-11 广东琴智科技研究院有限公司 Resource scheduling management method and device and cloud platform
CN114443256A (en) * 2022-04-07 2022-05-06 荣耀终端有限公司 Resource scheduling method and electronic equipment

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107861816B (en) * 2017-10-31 2022-10-28 Oppo广东移动通信有限公司 Resource allocation method and device
CN111625337A (en) * 2020-05-28 2020-09-04 浪潮电子信息产业股份有限公司 Task scheduling method and device, electronic equipment and readable storage medium
CN112378047A (en) * 2020-09-14 2021-02-19 华北电力大学 Multi-scene-oriented load-adjustable resource aggregation method, system, equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102073545A (en) * 2011-02-28 2011-05-25 中国人民解放军国防科学技术大学 Process scheduling method and device for preventing screen jam of user interface in operating system
US20160077576A1 (en) * 2014-09-17 2016-03-17 Abhinav R. Karhu Technologies for collaborative hardware and software scenario-based power management
CN106095592A (en) * 2016-05-31 2016-11-09 广东欧珀移动通信有限公司 A kind of prospect application scenarios synchronous method and device, system
CN110489228A (en) * 2019-07-16 2019-11-22 华为技术有限公司 A kind of method and electronic equipment of scheduling of resource
CN112948133A (en) * 2021-04-08 2021-06-11 广东琴智科技研究院有限公司 Resource scheduling management method and device and cloud platform
CN114443256A (en) * 2022-04-07 2022-05-06 荣耀终端有限公司 Resource scheduling method and electronic equipment

Also Published As

Publication number Publication date
CN117112191A (en) 2023-11-24

Similar Documents

Publication Publication Date Title
WO2023193497A1 (en) Resource scheduling method and electronic device
EP3886385A1 (en) Device, system and method to dynamically prioritize a data flow based on user interest in a task
WO2017052985A1 (en) Accessory-based power distribution
CN116028205B (en) Resource scheduling method and electronic equipment
WO2023221752A1 (en) Information processing method and electronic device
CN116025580B (en) Method for adjusting rotation speed of fan and electronic equipment
CN116027879B (en) Method for determining parameters, electronic device and computer readable storage medium
CN116028210B (en) Resource scheduling method, electronic equipment and storage medium
CN117130454A (en) Power consumption adjustment method and electronic equipment
CN116028211A (en) Display card scheduling method, electronic equipment and computer readable storage medium
US20220414027A1 (en) Platform framework standby operation
CN116027880B (en) Resource scheduling method and electronic equipment
CN116055443B (en) Method for identifying social scene, electronic equipment and computer readable storage medium
CN116028005B (en) Audio session acquisition method, device, equipment and storage medium
CN116028207B (en) Scheduling policy determination method, device, equipment and storage medium
CN116028208B (en) System load determining method, device, equipment and storage medium
CN110658901B (en) Distribution method and device
US11316343B2 (en) Interactive user control of power utilization
CN116028209B (en) Resource scheduling method, electronic equipment and storage medium
CN116089055B (en) Resource scheduling method and device
WO2023221720A1 (en) Resource scheduling method and apparatus
CN116027878B (en) Power consumption adjustment method and electronic equipment
CN117270670B (en) Power consumption control method and electronic equipment
CN117950935A (en) Performance regulating and controlling method and electronic equipment
CN117130772A (en) Resource scheduling method, electronic equipment and storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23806704

Country of ref document: EP

Kind code of ref document: A1