Performance optimization method and electronic device

By selecting the fast path that directly transmits the execution policy to the CPU, the problem of time-consuming electronic device mapping tables is solved, thereby improving the speed of policy activation, reducing power consumption, and enhancing the user experience.

CN119271032BActive Publication Date: 2025-12-30HONOR DEVICE CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202410236134.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-02-29
Publication Date
2025-12-30
Estimated Expiration
2044-02-29

AI Technical Summary

Technical Problem

When electronic devices execute operating policies, the mapping table takes time, resulting in slow policy implementation and impacting user experience.

Method used

By selecting a faster path for transmission and execution strategies, and utilizing the system and chip driver nodes or Windows management specification interfaces and dynamic tuning technology to drive direct transmission to the CPU, the mapping table can be avoided.

Benefits of technology

It improves the speed at which operational strategies take effect, reduces the power consumption of electronic devices, and enhances the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119271032B_ABST
    Figure CN119271032B_ABST
Patent Text Reader

Abstract

The application discloses a performance optimization method and an electronic device, and relates to the technical field of power electronics. The method comprises the following steps: in the case that the electronic device is in a first running state, the electronic device generates a first running strategy, and transmits the first running strategy to a central processing unit (CPU) of the electronic device through a first path; in the case that the electronic device is in a second running state, the electronic device generates a second running strategy, and transmits the second running strategy to the CPU through a second path; wherein the first running strategy and the second running strategy are used for adjusting the running strategy of the CPU; the time consumption of transmitting the first running strategy through the first path is less than the time consumption of transmitting the second running strategy through the second path. In this way, the path with a faster running strategy taking effect speed requirement is utilized, so that the running strategy taking effect speed can be improved, and the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of power electronics technology, and in particular to a performance optimization method and electronic device. Background Technology

[0002] As the performance of electronic devices improves, their power consumption also increases. To reduce power consumption and / or improve the performance of electronic devices, they can determine and execute appropriate operating strategies based on the operating scenario.

[0003] In conventional solutions, electronic devices contain multiple operating strategies and corresponding mapping tables for strategies that further enhance the device's performance. The device needs to traverse this mapping table to obtain the optimal operating strategy before it can be executed and take effect. However, this mapping process is time-consuming, resulting in slow strategy activation and negatively impacting user experience. Summary of the Invention

[0004] This application provides a performance optimization method and electronic device for reducing power consumption while ensuring certain operating performance, thereby improving user experience.

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

[0006] In a first aspect, a performance optimization method is provided, which is applied to an electronic device, comprising: when the electronic device is in a first operating state, the electronic device generates a first operating strategy and transmits the first operating strategy to the central processing unit (CPU) of the electronic device through a first path; when the electronic device is in a second operating state, the electronic device generates a second operating strategy and transmits the second operating strategy to the CPU through a second path; wherein the first operating strategy and the second operating strategy are used to adjust the operating strategy of the CPU; and the time consumed by transmitting the first operating strategy through the first path is less than the time consumed by transmitting the second operating strategy through the second path.

[0007] In this application, when the electronic device determines that the type of operating strategy corresponding to its current operating scenario is one that requires a faster activation speed, it does not obtain the operating strategy by traversing multiple operating strategies. Instead, it executes the current operating strategy using the fastest path. This approach, utilizing the fastest path for activation, improves the speed at which the operating strategy takes effect and enhances the user experience.

[0008] In conjunction with the first aspect, in one possible design approach, a first operating strategy is transmitted to the central processing unit (CPU) of the electronic device via a first path, including: transmitting the first operating strategy to the CPU via a system and chip driver node; a second operating strategy is transmitted to the CPU via a second path, including: transmitting the second operating strategy to the CPU via the Windows Management Specification Interface and Dynamic Tuning Technology (DTT) driver.

[0009] In this application, when a running policy is issued, it is prioritized. Policies with high urgency are issued through the system and chip driver nodes, while those with lower urgency are issued to the CPU through the Windows Management Specification Interface and Dynamic Tuning Technology (DTT). This allows for the selective use of faster-acting paths when a running policy requires urgent processing, improving the speed of policy implementation and enhancing the user experience.

[0010] In conjunction with the first aspect, in one possible design approach, after the electronic device generates the first operating strategy and before transmitting the first operating strategy to the central processing unit (CPU) of the electronic device via the first path, the method further includes: the electronic device adding a first flag bit to the first operating strategy, the first flag bit being matched with a first operating state; and the electronic device selecting a first path based on the first flag bit.

[0011] That is, the first path is selected based on the flag bit.

[0012] In conjunction with the first aspect, in one possible design approach, after the electronic device generates the second operating strategy and before transmitting the second operating strategy to the CPU via the second path, the method further includes: the electronic device adding a second flag bit to the second operating strategy, the second flag bit being matched with a second operating state; and the electronic device selecting a second path based on the second flag bit.

[0013] That is, the first path is selected based on the flag bit.

[0014] In conjunction with the first aspect, in one possible design approach, the first operating state includes at least one of the following: the electronic device receives a user's operation on the currently focused window or a lag state; the electronic device detects that the chip of the electronic device has fed back information about limited hardware performance; wherein, limited hardware performance means that the operating speed of the chip of the electronic device is limited; and the electronic device is in a performance scenario state, where the performance scenario is a scenario that requires balancing the power consumption and operating performance of the electronic device.

[0015] Electronic devices receive information about user actions or lag status on the currently focused window. This can alter the device's power consumption and / or performance, and such operational states typically require faster response times. Therefore, user actions on the currently focused window received by an electronic device can be termed a Level 1 event.

[0016] The electronic device detects a state where the chip of the electronic device feeds back information indicating that the hardware performance is limited; where the hardware performance is limited means that the operating speed of the chip of the electronic device is restricted, and this operating state generally also requires a faster operating strategy to transmit response.

[0017] Electronic devices operate in a performance-driven scenario, where a balance needs to be struck between power consumption and performance. This scenario typically requires invoking the performance-power consumption model described earlier. This model can generate multiple execution policies in a short period, such as one policy every second. The electronic device must wait for the previous policy to take effect before sending the next policy generated by the model to the kernel for execution. Due to the slow policy activation speed, multiple policies may accumulate in the device before the previous policy has finished executing, hindering user experience. Therefore, this operational state also generally requires a faster policy transmission and response time.

[0018] In conjunction with the first aspect, in one possible design approach, the action event includes one or more of the following: mouse click event, keyboard input event, or action event for switching applications.

[0019] In conjunction with the first aspect, in one possible design approach, the second operating state includes the electronic device being in a power consumption scenario state and the electronic device being in a state where the user performs a preset operation on the currently focused window.

[0020] In conjunction with the first aspect, in one possible design approach, performance scenarios include programming scenarios, video scenarios, gaming scenarios, or file opening scenarios exceeding a preset file size.

[0021] In a second aspect, an electronic device is provided, the electronic device comprising: a memory and one or more processors;

[0022] The memory is used to store computer program code, which includes computer instructions; when the computer instructions are executed by the processor, the electronic device performs the control method of the electronic device as in any of the possible design schemes in the first aspect.

[0023] Thirdly, a computer-readable storage medium is provided, including computer instructions; when the computer instructions are executed on an electronic device, they cause the electronic device to perform a control method of the electronic device as described in any of the possible design embodiments of the first aspect.

[0024] Fourthly, a computer program product is provided that, when run on a computer, causes the computer to perform a control method for an electronic device as described in any of the possible design schemes of the first aspect.

[0025] The technical effects of any of the design methods in the second, third, and fourth aspects can be found in the technical effects of different design methods in the first aspect, and will not be repeated here. Attached Figure Description

[0026] Figure 1 A schematic diagram illustrating the interaction principle of a module related to operation strategy control in an electronic device 100 is shown.

[0027] Figure 2 A schematic diagram of a module related to operation strategy control in an electronic device 100 is shown;

[0028] Figure 3 A schematic diagram illustrating the workflow of the software and hardware used by the electronic device 100 to control its operating strategy is shown.

[0029] Figure 4 This illustration shows a schematic diagram of the software and hardware workflows of the electronic device 100 controlling the operation strategy in an embodiment of this application.

[0030] Figure 5 A flowchart illustrating a performance optimization method is shown.

[0031] Figure 6 A schematic diagram of the structure of an electronic device 100 provided in an embodiment of this application is shown. Detailed Implementation

[0032] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this embodiment, unless otherwise stated, "a plurality of" means two or more.

[0033] To ensure clarity and conciseness in the description of the following embodiments, a brief introduction to the relevant concepts or technologies is given first:

[0034] To ensure clarity and conciseness in the description of the following embodiments, a brief introduction to the relevant concepts or technologies is given first:

[0035] (1) Focus window: This refers to the window that has the focus. The focus is the position where the cursor is currently active. In other words, the focus window is the window where the cursor is currently active; it is the current operation window and can receive keyboard input. Generally, the window whose title bar is not grayed out is the focus window.

[0036] (2) Operating Scenario: The operating scenario describes the context in which an electronic device responds to user operations to perform a task in the focus window. Here, the task refers to the execution content related to the functions provided by the focus window. For example, the operating scenarios of an electronic device may include video scenarios, game scenarios, social scenarios, office scenarios, browser scenarios, smart interconnection scenarios, evaluation scenarios, programming scenarios, super terminal scenarios, design software scenarios, process startup scenarios, large file opening scenarios, etc.

[0037] The tasks corresponding to video scenarios can be playing videos; the tasks corresponding to gaming scenarios can be playing games; the tasks corresponding to social scenarios can be voice chat, video chat, text chat, etc.; the tasks corresponding to office scenarios can be editing documents; the tasks corresponding to browser scenarios can be browsing web pages; the tasks corresponding to smart interconnection scenarios can be sharing information after multiple electronic devices are interconnected; the tasks corresponding to evaluation scenarios can be experimentally analyzing the performance of electronic devices; the tasks corresponding to programming scenarios can be programming; the tasks corresponding to super terminal scenarios can be electronic devices operating one or more other electronic devices; the tasks corresponding to software design scenarios can be designing software; the tasks corresponding to process startup scenarios can be memory management, task scheduling, etc.; and the tasks corresponding to opening large files can be opening files that exceed the preset file size, etc.

[0038] The video scenarios can be further divided into video playback scenarios, video browsing scenarios, and video comment scenarios. The social scenarios can be further divided into text chat scenarios, voice chat scenarios, and video chat scenarios. The office scenarios can be further divided into document editing scenarios, document browsing scenarios, and video conferencing scenarios; these scenarios can also be referred to as refined office software operation scenarios. The browser scenarios can include web browsing scenarios and video playback scenarios.

[0039] (3) Power consumption scenarios: These are operating scenarios that aim to reduce the power consumption of electronic devices, such as office scenarios and social scenarios.

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

[0041] (5) Power Limit (PL) is used to limit the power consumption of the Central Processing Unit (CPU) in electronic devices. It is generally expressed as "PL + number" to indicate the level of power limit for the CPU. The "number" in "PL + number" represents the specific level. For example, there are four levels of power limit for the CPU, from smallest to largest: PL1, PL2, PL3, and PL4. The smaller the number, the lower the power limit level. This application mainly relates to PL1 and PL2, which will be described below.

[0042] (6)PL1, also known as long-term turbo power consumption, is the CPU's power consumption when under long-term load.

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

[0044] (8) CPU Energy Performance Preference (EPP) is used to reflect the CPU's scheduling tendency, and its value ranges from 0 to 255. The lower the CPU EPP, the more the CPU tends to perform well; the higher the CPU EPP, the more the CPU tends to consume less power.

[0045] (9) Power limit: A threshold for the CPU to release maximum power. If this threshold is exceeded, the processor will reduce its frequency.

[0046] (10) BIOS (Basic Input / Output System) is short for ROM-BIOS, which is a set of programs embedded in electronic devices that provide the lowest-level and most direct hardware control. It is the hub connecting software programs and hardware devices. In layman's terms, BIOS is a "converter" or interface between hardware and software programs (although it is itself just a program), responsible for handling the immediate requirements of the hardware and executing the software's operational requirements for the hardware.

[0047] As described in the background section, in conventional solutions, electronic devices contain multiple operating strategies and corresponding mapping tables related to strategies that further enhance the device's performance. The electronic device needs to traverse this mapping table to obtain the operating strategy that improves its performance before it can execute that strategy to make it effective. However, the mapping table process is time-consuming, resulting in slow strategy activation and impacting user experience.

[0048] The impact of slow implementation of the running strategy will be explained in detail below.

[0049] Figure 1 A schematic diagram illustrating the interaction principle of a module related to operation strategy control in an electronic device 100 is shown. For example... Figure 1 As shown, the electronic device 100 may include a scene recognition engine, a scheduling engine, a perception platform, a learning platform, and a decision platform. In some embodiments, the scene recognition engine, scheduling engine, perception platform, learning platform, and decision platform may be... Figure 1 The modules in the processor 110 of the illustrated embodiment are used to implement the corresponding functions.

[0050] The scene recognition engine may include a system probe module.

[0051] The scene recognition engine is used to identify the operating scene of an electronic device.

[0052] The perception platform is used to acquire the operating status information of electronic devices in the operating scenario; the operating status information is used to characterize the hardware operation and / or system operation when the electronic device operates the focus window.

[0053] For example, operational status information may include one or more of the following: power status information, peripheral device status information, process load information, audio / video status information, system load information, or system event information. Among these, the power status information, peripheral device status information, and audio / video status information can be considered as hardware operational status; the process load information, system load information, and system event information can be considered as system operational status.

[0054] The power status information may include one or more of the following: battery (remaining) power, power mode, etc. The power mode may include alternating current (AC) power and direct current (DC) power.

[0055] Peripheral status information may include one or more of the following: mouse wheel scroll events, mouse click events, keyboard input events, microphone input events, or camera input events.

[0056] Process load information includes the average percentage of CPU time used by each process in the system. Process load information reflects the operational status of each process in the system, including system kernel processes and other user processes.

[0057] The audio and video status information includes the audio and video events currently existing on the electronic device 100. Audio and video events may include one or more of the following: GPU decoding events, video events, video frame rates, or video subtitles.

[0058] System load information includes the total number of processes currently being executed by the CPU and those waiting to be executed by the CPU. System load information can be an important indicator of the system's workload level.

[0059] System event information may include one or more of the following: window change information, system lock information, process creation information, or thread creation information.

[0060] The running status information described above is just an example. Running status information can also be other information used to characterize the hardware operation and / or system operation when the electronic device operates the focus window, such as screen brightness, download speed, etc., but is not limited to these.

[0061] The learning platform is used to train the performance and power consumption model; the performance and power consumption model is used to determine the operating strategies that limit the operating power consumption of electronic devices and improve the operating performance of electronic devices.

[0062] The decision-making platform uses a trained performance-power consumption model to determine the operating strategy. This strategy includes target values ​​for the operating parameters. The performance-power consumption model characterizes the mapping relationship between the operating state information of the operating scenario and the operating strategy.

[0063] The scheduling engine is used to control electronic devices using runtime strategies.

[0064] S1 to S6 represent the process of training the performance and power consumption model, obtaining the operating strategy using the trained performance and power consumption model, and controlling the electronic device using the operating strategy. The roles of the scene recognition engine, scheduling engine, perception platform, learning platform, and decision platform in this embodiment will be described in detail below.

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

[0066] The perception platform can acquire operational status information through the system probe module in the scene recognition engine. This system probe module can include multiple types of probes. Correspondingly, the perception platform can obtain the required operational status information through these various probes. For example, these probes can include power status probes, peripheral device status probes, process load probes, audio / video status probes, system load probes, and system event probes. Specifically, power status probes can detect power status information; peripheral device status probes can detect peripheral device status information; process load probes can detect process load information; audio / video status probes can detect audio / video status information; system load probes can detect system load information; and system event probes can detect system event information. The information detected by each probe can also be called probe status information; that is, the probe status information detected by each probe can be used as operational status information.

[0067] In some embodiments, the perception platform can send a request to the system probe module to query operational status information. In response, the system probe module can report operational status information to the perception platform.

[0068] It is understood that S1 in the embodiments of this application can be executed during the model training phase or during the model usage phase. If executed during the model training phase, S2 can be executed after S1. If executed during the model usage phase, S3 can be executed after S1.

[0069] S2: The perception platform can send the operational status information obtained from the system probe module to the learning platform. The learning platform can then use the operational status information to train a performance and power consumption model.

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

[0071] S3: The perception platform determines the first event. Then, in response to the first event, the perception platform can trigger the decision platform to obtain operational status information from the perception platform.

[0072] The first event is an event that affects the operating performance of the electronic device. The first event can be used to trigger the electronic device to determine its operating strategy using a performance-power consumption model.

[0073] The first event can include one or more of the following: a primary event, a performance-constrained event, or a performance-power model training event. A primary event can include user actions on the currently focused window, and / or lag events. For example, an action event can include one or more of the following: a mouse click event, a keyboard input event, or an action event for switching applications.

[0074] A performance-limited event is an event in which the hardware performance of an electronic device is limited, based on hardware feedback. Specifically, hardware performance limitation can manifest as a limitation on the operating speed of the electronic device's chip. Therefore, a performance-limited event can also be called a chip performance-limited event.

[0075] The performance power consumption model training event is the event that trains the performance power consumption model.

[0076] S4: When the decision-making platform is triggered by the first event, it obtains the operational status information from the perception platform.

[0077] S5: When triggered by the first event, the decision-making platform calls the trained performance and power consumption model from the learning platform and inputs the operating status information obtained from the perception platform into the trained performance and power consumption model to obtain an operating strategy that can reduce operating power consumption while ensuring a certain operating performance.

[0078] This operating strategy includes various operating parameters, which can be parameters of the electronic device related to limiting power consumption and improving the operating performance of the electronic device.

[0079] The operating strategy may include a combination of one or more operating parameters from PL1, PL2, EPP, emergency power off (EPO) control switch status information, CPU turbo switch status information, fan speed, discrete graphics processing unit (DGPU) overclocking value, video memory overclocking value, integrated graphics processing unit (IGPU) minimum frequency, IGPU maximum frequency, DGPU minimum frequency, DGPU maximum frequency, power saving display status information, CPU minimum frequency, core binding information, and memory cleanup status information.

[0080] Core binding, also known as setting process or thread affinity, refers to binding a process or thread to a specific CPU core to run on. This improves performance because the process or thread only runs on the bound CPU core, reducing the time spent switching between multiple cores. However, core binding does not mean that the process or thread has exclusive access to that CPU core; other processes or threads can still run on that core.

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

[0082] S6: The decision-making platform sends the running strategy obtained using the performance and power consumption model to the scheduling engine.

[0083] The decision-making platform sends the operating strategy obtained using the performance and power consumption model to the scheduling engine, so that the scheduling engine can control electronic devices based on the operating strategy.

[0084] Figure 2 A module related to operation strategy control in an electronic device 100 is shown. Figure 2 and Figure 1 In comparison, the difference lies in the fact that, triggered by certain events (the second event below), the decision-making platform can instruct the scene recognition engine to compare the two operating strategies and obtain a specific scheme for the target value of the operating parameters in the currently to-be-executed operating strategy. See S7 and S8 for details. The contents of S7 and S8 are as follows:

[0085] S7: Upon triggering the second event, the decision-making platform sends a runtime strategy request to the scene recognition engine. This request includes the current runtime scene, the runtime strategy determined by the decision-making platform using the performance-power consumption model, and mandatory information for the performance-power consumption model. The mandatory information includes the degree of mandatory application of the performance-power consumption model and the reason for the mandatory application. For example, the degree of mandatory application might be a comparison of runtime strategies obtained through two different methods, and the reason for the mandatory application might be the triggering of the second event.

[0086] If the enforcement information invoked by the performance power consumption model is to compare the operating strategies obtained through two methods, and the enforcement reason is the triggering of a second event, then the scene recognition engine can compare the operating strategy corresponding to the current operating scenario obtained by invoking the performance power consumption model with the operating strategy corresponding to the current operating scenario pre-stored in the scene recognition engine to obtain the compared operating strategy, so that the electronic device can control the electronic device based on the compared operating strategy. This scheme will be described in detail below.

[0087] S8: The scene recognition engine feeds back the compared operating strategy to the decision-making platform.

[0088] The scene recognition engine feeds back the compared operating strategy to the decision-making platform. Then, step S6 above can be replaced by the decision-making platform sending the compared operating strategy to the scheduling engine. In this way, the scheduling engine can control electronic devices based on the operating strategy.

[0089] In other words, if the first event occurs, the decision-making platform can determine the operating strategy corresponding to the current operating scenario simply by calling the performance and power consumption model, and report it to the scheduling engine so that the engine can control the operation of electronic devices according to that strategy. If the second event occurs, the decision-making platform not only needs to determine the operating strategy corresponding to the current operating scenario by calling the performance and power consumption model, but also needs to trigger the scenario recognition engine to obtain the pre-stored operating strategy corresponding to the current operating scenario, compare the two operating strategies, obtain the compared operating strategy, and report it to the scheduling engine so that the engine can control the operation of electronic devices based on the compared operating strategy.

[0090] In addition, compared to Figure 1 The embodiment shown, Figure 2 The implementation of the perception platform is explained in detail in the illustrated embodiment.

[0091] The perception platform may include a meta-capability acquisition module. This module is used to acquire operational status information from the system probe module.

[0092] Specifically, the meta-capability acquisition module can send the acquired operational status information to the data center included in the perception platform for storage. The meta-capability acquisition module can also be used to determine a first event or a second event. Furthermore, after acquiring the first event or the second event, the meta-capability acquisition module can send it to the fence module of the perception platform, so that the fence module can trigger the decision platform to retrieve operational status information from the perception center using the first event.

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

[0094] exist Figure 1 and Figure 2 In the process, the scheduling engine needs to call underlying mechanisms (such as kernel-level structures) to execute the running policy. After execution, it sends a feedback message to the perception platform indicating that the running policy has been successfully executed. However, if the running policy fails to execute for an extended period due to slow activation speed, the perception platform will resend the running status information originally sent to the learning and perception platforms. This results in unnecessary data transmission power consumption, increases the power consumption of electronic devices, and negatively impacts the user experience.

[0095] On the other hand, the performance-power consumption model can generate multiple execution policies in a short period of time, such as one policy every second. Furthermore, the electronic device needs to wait for the previous execution policy to take effect before sending the next policy generated by the performance-power consumption model to the kernel for execution. Because the execution policy takes effect slowly, there is a problem where the previous policy hasn't finished executing before the performance-power consumption model has already generated multiple policies, causing these policies to accumulate in the electronic device and become unexecuted. This slow policy implementation negatively impacts the user experience.

[0096] The following is combined Figure 3 This paper introduces a scheme for obtaining the operating strategy by traversing multiple operating strategies of electronic devices.

[0097] Figure 3 A schematic diagram of the software and hardware workflow for controlling operating parameters by electronic device 100 is shown.

[0098] like Figure 3 As shown, the scene recognition engine described above can reside in the application layer of the electronic device. In addition to the system probe module, the scene recognition engine may also include a scene recognition module and a scene policy configuration module.

[0099] The scene recognition module can determine the current operating scene. Operating scenes can include video scenes, game scenes, office scenes, and social scenes, etc. For example, when the scene recognition engine identifies the focused window as a video application window, it determines that the electronic device 100 is in a video scene. Another example is when the scene recognition engine identifies the focused window as WeChat... TM When a chat window is accessed, the electronic device 100 is determined to be in a social scenario. The scenario recognition module can also send this scenario to the scenario policy configuration module. The scenario policy configuration module can determine the operating parameters based on this scenario. The scenario policy configuration module can then send these operating parameters back to the scenario recognition module. The scenario recognition module can then send these operating parameters and the scenario to the application layer's scheduling engine.

[0100] The scene recognition module determines that the current operating scene is based on existing technology, which will not be elaborated further here.

[0101] As mentioned above Figure 2 As introduced in the article, the scene recognition engine can store the mapping relationship between running scenes and running strategies. After the scene recognition module identifies the running scene, it can directly obtain the running strategy from this mapping relationship.

[0102] The role of the perception platform is related to the above. Figure 1 and Figure 2 The similarities are not repeated here.

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

[0104] The system probe module can subscribe to kernel events in kernel mode to determine runtime status information based on callback functions fed back from kernel mode, and then report this information to the scene recognition module. Specifically, the system probe module includes multiple types of probes, each of which can subscribe to corresponding kernel events in kernel mode to obtain the corresponding runtime status information.

[0105] For example, a power status probe can subscribe to power status events in kernel space and determine power status information based on callback functions fed back from kernel space.

[0106] For example, kernel mode can include: subsystem dynamic link libraries, the executable, the kernel and driver layers, the HAL, the firmware layer, and the hardware layer. The power state probe can send a request to subscribe to power state events to the system event driver (OsEventDriver) node of the executable in kernel mode. The OsEventDriver node then forwards this request to the power manager of the executable. Upon receiving the request, the power manager can send a callback function back to the power state probe through the OsEventDriver node, thus implementing the subscription to power state events.

[0107] Peripheral status probes can subscribe to peripheral events in kernel mode and determine peripheral status information based on callback functions fed back from kernel mode.

[0108] Process load probes can subscribe to process load events in kernel space and determine process load information based on callback functions fed back from kernel space.

[0109] The system load probe can subscribe to system load events in kernel mode and determine system load information based on the callback functions fed back from kernel mode.

[0110] The audio and video status probe can subscribe to audio and video events in the kernel space and determine the current audio and video status information of the electronic device 100 based on the callback function fed back from the kernel space.

[0111] For example, the audio / video status probe can send a request to the OsEventDriver node of the execution entity to subscribe to GPU decoding information. The OsEventDriver node then forwards this request to the GPU driver in the kernel and driver layer. After receiving the request, the GPU driver sends a callback function back to the audio / video status probe through the OsEventDriver node, so that after monitoring the GPU performing decoding operations, it can obtain audio / video status information based on the callback function of the audio / video status probe.

[0112] System event probes can subscribe to system events in kernel mode and determine system event information based on callback functions returned by kernel mode. System event information may include one or more of the following: window change information, system lock information, process creation information, or thread creation information.

[0113] For example, a system event probe can send a request to the OsEventDriver node of the executor to subscribe to process creation information. The OsEventDriver node then forwards this request to the process manager. Upon receiving the request, the process manager sends a callback function back to the system event probe through the OsEventDriver node, so that system event information can be obtained based on the callback function after the process is created. As another example, the system event probe can also send a request to the API module to subscribe to focus window change information. The API module sends a callback function back to the system event probe to monitor whether the focus window of the electronic device 100 has changed, and when a change is detected, obtains the focus window change information based on the callback function.

[0114] As can be seen, the system probe module subscribes to various events of the electronic device 100 in the kernel state, and then obtains the probe status based on the callback function fed back by the kernel state, thus obtaining the operating status information of the electronic device 100.

[0115] In some embodiments, the decision-making platform can obtain the operating scenario from the scenario recognition module. The decision-making platform can then, upon triggering a first event, obtain the operating scenario from... Figure 2 or Figure 2 The learning platform in the middle calls the trained performance and power consumption model and will from Figure 1 or Figure 2 The perception platform in the system inputs the operating status information into the trained performance-power consumption model to obtain an operating strategy that reduces power consumption while maintaining a certain level of performance. The decision platform can send this operating strategy to the scheduling engine, which receives the strategy and performs scheduling based on it. In this embodiment, the scheduling engine can send instructions to the CPU through the power manager and BIOS, carrying operating parameter 1 from the operating strategy. The scheduling engine can also send instructions to the Intel DTT driver through WMI, carrying operating parameter 2 from the operating strategy. The Intel DTT driver can then send the received instructions to the CPU through the BIOS. Alternatively, the scheduling engine can send instructions to the CPU through the System-on-Chip (OS2SOC) driver node, carrying operating parameter 2 from the operating strategy. Operating parameters 1, 2, and 3 can be different operating parameters within the operating strategy.

[0116] In this embodiment, the scheduling engine can send instructions to the Intel DTT driver through Windows Management Instrumentation (WMI). These instructions are used to instruct the execution of the running policy. Then, the Intel DTT driver can send the received instructions to the CPU through the BIOS.

[0117] The scheduling engine can execute execution policies in different ways. CPU chip platform types are mainly divided into two categories: CPUs from Advanced Micro Devices, AMD, and These two types of CPUs have different receiving paths for their operating strategies, so they need to be distinguished. It's understandable that CPU chip platform types are not limited to these two; with technological advancements, many more may exist, which will not be limited here.

[0118] The following describes the chip platform type. The strategy will be described in more detail.

[0119] If the CPU chip platform type is The scheduling engine can send execution policies to the Intel DTT driver through the WMI plugin. The execution policies can include PL1 and EPP, and the Intel DTT driver CPU will execute the execution policy.

[0120] The following section introduces dynamic tuning technology (DTT).

[0121] 1.1 The scheduling engine determines the dynamic tuning technology strategy number based on the running strategy.

[0122] Dynamic tuning technology (DTT) is The company processor and The technology automatically and dynamically allocates power consumption among discrete graphics cards to optimize performance and extend battery life, which can improve the performance of CPU and GPU and intelligently balance power for mixed workloads.

[0123] Understandably, there can be a mapping relationship between DTT policy numbers and the scheduling policies corresponding to the running policies. A DTT policy table is built in the BIOS, and the scheduling policy corresponding to any running policy can be mapped to a certain DTT policy number in the DTT policy table through its parameters (PL1', PL2', EPP'), as shown in Table 1.

[0124] The DTT strategy number identifies a DTT strategy, which adjusts the CPU's PL1_MINI, PL1_MAX, PL2, PL2_TIME, and EPO Gear. PL1_MINI is the minimum value of PL1, PL1_MAX is the maximum value of PL1, and PL2_TIME is the duration of PL2. The Energy Performance Optimize Gear (EPO Gear) characterizes the degree to which DTT adjusts the CPU's Energy Efficiency Ratio (EPP), ranging from 1 to 5. A higher value indicates a greater emphasis on energy efficiency when adjusting EPP, while a lower value indicates a greater emphasis on performance.

[0125] Table 1

[0126]

[0127] It should be noted that Table 1 only shows a partial correspondence between PL1', PL2', EPP', and DTT policy numbers; in reality, it may include more information than Table 1 shows. For example, if the scheduling policy corresponding to the running policy indicates that PL1' is -1, PL2' is -1, and EPP' is -1, then the DTT policy number can be determined to be 0, with PL1_MINI being 30, PL1_MAX being 40, PL2 being 95, PL2_TIME being 28, and EPO Gear being 3.

[0128] 1.2 The scheduling engine sends the DTT policy number to the Intel DTT driver.

[0129] 1.3 The Intel DTT driver sends the DTT policy number to the CPU.

[0130] Understandably, this Intel DTT driver can send the DTT policy number to the CPU via the BIOS.

[0131] 1.4 The CPU operates based on the DTT policy number.

[0132] It can be seen that if the CPU chip platform type is The scheduling engine can send instructions to the power manager to adjust the EPP, and the power manager can adjust the CPU's EPP.

[0133] If the CPU chip platform type is The scheduling engine can then determine the scheduling policy corresponding to the running policy, obtain the DTT policy number, and send the DTT policy number to the Intel DTT driver through the BIOS, so that the CPU runs based on the DTT policy number, thereby achieving the effect of adjusting power consumption.

[0134] As shown above, the Intel DTT driver contains multiple execution policies and corresponding mapping tables for DTT policies that further improve the performance of electronic devices. Electronic devices need to traverse this mapping table to obtain the appropriate DTT policy before executing it for it to take effect. However, traversing the mapping table takes time, resulting in slow activation of the corresponding DTT policies and impacting the user experience.

[0135] To address the above issues, this application proposes a performance optimization method. Specifically, when the electronic device determines that the type of operating strategy corresponding to its current operating scenario requires a faster activation speed, it does not obtain the operating strategy by traversing multiple operating strategies, but instead uses the fastest path to execute the current operating strategy. For example, Figure 4 This illustration shows a schematic diagram of the software and hardware workflows of the electronic device 100 controlling the operation strategy in an embodiment of this application. Figure 4 and Figure 3 The difference is that, Figure 4 There are two paths for transmitting the execution policy. Path 1 is the path where the scheduling engine transmits execution policy 1 to the CPU through the Windows Management Specification Interface and the Dynamic Tuning Technology (DTT) driver. Path 2 is the path where the scheduling engine transmits execution policy 2 to the CPU through the system and chip driver nodes. Since path 2 does not require traversing the DTT policy mapping table, the time to reach the CPU via path 2 is faster than the time to reach the CPU via path 1. Thus, using the path with faster execution policy activation speed can improve the speed of policy activation and enhance the user experience.

[0136] Moreover, since the operating strategy takes effect quickly and can be executed in a short time, the perception platform does not need to resend the operating status information that was originally sent to the learning platform and the perception platform to the learning platform and the perception platform. This will avoid unnecessary data transmission power consumption, reduce the power consumption of electronic devices, and improve the user experience.

[0137] On the other hand, even if the performance power consumption model can generate multiple execution policies in a short period of time, such as one policy every second, the electronic device still needs to wait for the previous execution policy to take effect before sending the next execution policy generated by the performance power consumption model to the kernel for execution. Because the execution policy takes effect relatively quickly, the occurrence of multiple execution policies generated by the performance power consumption model before the previous policy has finished executing can be reduced to some extent. This reduces the possibility of execution policies piling up in the electronic device and failing to execute, ensuring that execution policies take effect promptly and improving the user experience.

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

[0139] Figure 5 A flowchart illustrating a performance optimization method is shown. For example... Figure 5 As shown, the process includes the following steps:

[0140] S501: Electronic device determines the operating state of the electronic device.

[0141] As can be seen from the above description, in order to improve the speed at which the operating strategy of electronic devices takes effect, the strategy is generally transmitted via a path that reaches the CPU faster.

[0142] In some embodiments, it may be considered that not all running states need to reach the CPU via a fast path; generally, running states with faster execution strategies for transmitting response requirements are preferred.

[0143] For example, an electronic device receives information about the user's action on the currently focused window, or whether the window is lagging. This can alter the device's power consumption and / or performance, and such operating states typically require faster response times. Therefore, an action received by an electronic device from a user on the currently focused window can be termed a Level 1 event.

[0144] For example, an electronic device may detect a state where its chip is reporting limited hardware performance. This limited hardware performance refers to a restriction on the operating speed of the chip, and such an operating state generally requires a faster operating strategy to transmit response.

[0145] For example, an electronic device might be in a performance-driven scenario, where power consumption and performance need to be balanced. This scenario typically requires invoking the performance-power consumption model described earlier. This model can generate multiple execution policies in a short period, such as one policy every second. The electronic device must wait for the previous policy to take effect before sending the next policy generated by the performance-power consumption model to the kernel for execution. Because the policy activation speed is slow, multiple policies might be generated before the previous policy has finished executing, causing them to accumulate in the electronic device and become unexecutable. This slow policy activation negatively impacts the user experience. Therefore, this type of operation also generally requires a faster policy transmission and response time.

[0146] It is understandable that the above operating state can be called the first operating state.

[0147] In other operating states (which can be referred to as the second operating state), a faster operating strategy is generally not required to transmit response requests. Existing paths can be used to transmit the transportation strategy.

[0148] Optionally, the second running state includes at least one of the following:

[0149] The electronic device is in a power consumption scenario; where the power consumption scenario is a scenario in which the power consumption of the electronic device needs to be limited.

[0150] The electronic device is in an AI-featured scene state; where the AI-featured scene is the recognition of a user's preset operation on the currently focused window. This preset operation is pre-stored by the electronic device. If the user's operation on the currently focused window is recognized as a preset operation, then the electronic device is determined to be in an AI-featured scene state. This preset operation is different from the user's operation on the currently focused window in the first operating state.

[0151] When the electronic device is in the first operating state, it generates operating strategy 2, as detailed in S502. When the electronic device is in the second operating state, it generates operating strategy 1, as detailed in S503.

[0152] S502: Electronic device generation and operation strategy 2.

[0153] Running strategy 2 can also be called the first running strategy.

[0154] S503: Electronic device generation and operation strategy 1.

[0155] Running strategy 1 can also be called the second running strategy.

[0156] S504: The electronic device determines the type of operating strategy corresponding to the current operating state of the electronic device.

[0157] In some embodiments, after the electronic device generates an operating policy and before transmitting the operating policy to the central processing unit (CPU) of the electronic device via a transmission path, the electronic device can add a flag bit to the operating policy. The flag bit matches a first operating state and is used to indicate the path type selected by the electronic device.

[0158] Specifically, in some embodiments, after the electronic device generates the running strategy 2, but before transmitting the running strategy 2 to the central processing unit (CPU) of the electronic device via path 2 (which may be referred to as the first path), the electronic device may add a first flag bit to the running strategy 2, the first flag bit being matched with a first running state; the electronic device selects path 2 based on the first flag bit.

[0159] After the electronic device generates operating strategy 1, before transmitting operating strategy 1 to the CPU via path 1 (which can be called the second path), the electronic device can add a second flag bit to operating strategy 1. The second flag bit matches the second operating state. The electronic device selects path 1 based on the second flag bit.

[0160] The following is a piece of program code related to the type of execution strategy.

[0161] Typedef enum class-HNSDK-POLICY-TYPE

[0162] {POLICY-TYPE-AI-ONE-LEVEL=0X00,

[0163] POLICY-TYPE-AI-PERF-LIMIT=0X01,

[0164] POLICY-TYPE-AI-CHARATER=0X02,

[0165] POLICY-TYPE-HSPP-POWER-SCENE=0X03,

[0166] POLICY-TYPE-HSPP-PERF-SCENE=0X04,},

[0167] HNSDK-POLICY-TYPE;

[0168] As shown in the code above, POLICY-TYPE-AI-ONE-LEVEL=0X00 indicates that the flag bit for the type of the running strategy is a level 1 event, which can be 0X00 and can be the first flag bit.

[0169] The flag POLICY-TYPE-AI-PERF-LIMIT = 0X01 indicates that the type of the running strategy is performance-limited. This flag can be the first flag.

[0170] POLICY-TYPE-AI-CHARATER=0X02 indicates that the type of the running strategy is AI, and the type flag is 0X02. This flag can be the second flag.

[0171] POLICY-TYPE-HSPP-POWER-SCENE = 0X03 indicates that the type of the running strategy is a power consumption scenario. This flag can be the second flag.

[0172] POLICY-TYPE-HSPP-PERF-SCENE = 0X04 indicates that the type of the running strategy is a performance scenario. The flag bit is 0X04 and this flag bit can be the first flag bit.

[0173] S505: Electronic devices determine whether a thermal strategy has been triggered.

[0174] It is understandable that thermal strategies are operational policies implemented by electronic devices based on factors such as power consumption and heat dissipation. Generally, to improve the performance of electronic devices and reduce power consumption, thermal strategies have a higher processing priority and are executed first. Therefore, in the first operating state, if the electronic device determines that the thermal strategy has not been triggered, it can execute the current operating strategy through a faster path, as detailed in S506. If the electronic device determines that the operating strategy has been triggered, it can exit the execution of the current operating strategy.

[0175] S506: Transmit the execution strategy 2 to the CPU of the electronic device via path 2.

[0176] S507: Transmit the execution strategy 1 to the CPU of the electronic device via path 1.

[0177] The required activation speed of the operating strategy generated by the electronic device varies depending on its operating state. In the first operating state, the electronic device generates operating strategy 2 and transmits it to the CPU via path 2. In the second operating state, the electronic device generates operating strategy 1 and transmits it to the CPU via path 1. Operating strategy 2 and operating strategy 1 are used to adjust the CPU's operating strategy. The time taken to transmit operating strategy 2 via path 2 is less than the time taken to transmit operating strategy 1 via path 1.

[0178] The transmission of operation strategy 2 to the central processing unit (CPU) of the electronic device via path 2 can be achieved through the system and chip driver nodes; the transmission of operation strategy 1 to the CPU via path 1 can be achieved through the Windows Management Specification Interface or the Dynamic Tuning Technology (DTT) driver.

[0179] As can be understood from the above, dynamic tuning technology (DTT) is... The company processor and The technology that automatically and dynamically allocates power consumption among discrete graphics cards to optimize performance and extend battery life can improve the performance of both the CPU and GPU, and achieve intelligent power balancing for mixed workloads. Therefore, although transmitting the transport strategy via path 2 results in a slower time for the execution strategy to reach the CPU, it can be improved based on DTT technology to optimize the execution strategy for the better performance of electronic devices, thus enhancing the overall performance of the electronic devices.

[0180] This application provides a performance optimization method that prioritizes execution policies when they are issued. Policies with high urgency are issued via system-chip driver nodes, while those with lower urgency are issued to the CPU via the Windows Management Specification Interface (WMI) and Dynamic Tuning Technology (DTT). This allows for selective use of faster-acting paths when urgent processing is required, improving policy implementation speed and enhancing user experience.

[0181] Please refer to Figure 6 This is a schematic diagram of the structure of an electronic device 100 provided in an embodiment of this application.

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

[0183] It is 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, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0184] Processor 110 may include one or more processing units, such as: application processor (AP), modem processor, graphics processing unit (GPU), image signal processor (ISP), controller, memory, video codec, digital signal processor (DSP), baseband processor, and / or neural network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.

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

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

[0187] In this embodiment, the operating parameters can be parameters related to the CPU and GPU. The processor can obtain the operating status information corresponding to the current operating scenario, and based on this operating status information, obtain target values ​​for the operating parameters that reduce power consumption while ensuring a certain level of operating performance. Then, the processor can adjust the operating parameters of the CPU and GPU based on the target values ​​of the operating parameters to reduce the power consumption of the electronic device and ensure its operating performance.

[0188] The controller can be the nerve center and command center of the electronic device 100. The controller can generate operation control signals according to the instruction opcode and timing signals to complete the control of fetching and executing instructions.

[0189] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can retrieve it directly from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

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

[0191] The charging management module 140 receives charging input from a charger, which can be a wireless charger or a wired charger. While charging the battery 142, the charging management module 140 can also supply power to the electronic device via the power management module 141.

[0192] 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 to power the processor 110, internal memory 121, external memory, display screen 160, and wireless communication module 150, etc. In some embodiments, the power management module 141 and the charging management module 140 may also be housed in the same device.

[0193] The wireless communication module 150 can provide solutions for wireless communication applications on the electronic device 100, including WLAN (such as Wi-Fi), Bluetooth, global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR) technology, etc.

[0194] 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, performs frequency modulation and filtering of the electromagnetic wave signal, and sends the processed signal to the processor 110. The wireless communication module 150 may also receive signals to be transmitted from the processor 110, perform frequency modulation and amplification on them, and then convert them into electromagnetic waves for radiation via the antenna.

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

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

[0197] The external storage 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 storage interface 120 to perform data storage functions. For example, music, video, and other files can be saved on the external memory card.

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

[0199] The program storage area can store the operating system, at least one application program required for a function (such as sound playback, image playback, etc.). The data storage area can store data created during the use of the electronic device 100 (such as audio data, phonebook, etc.). Furthermore, the internal memory 121 can 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.

[0200] This application also provides a computer storage medium that includes computer instructions. When the computer instructions are executed on the electronic device, the electronic device causes the electronic device to perform various functions or steps performed by the mobile phone in the above method embodiment.

[0201] This application also provides a computer program product that, when run on a computer, causes the computer to perform the various functions or steps performed by the mobile phone in the above method embodiments.

[0202] It is understood that the electronic device provided in this application embodiment includes hardware structures and / or software modules corresponding to perform each function in order to achieve the above-mentioned functions. Those skilled in the art should readily recognize that, in conjunction with the units and algorithm steps of the various examples described in the embodiments disclosed herein, the embodiments of this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed by hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the embodiments of this application.

[0203] This application embodiment can divide the above-described electronic device into functional modules based on the method example described above. For example, each function can be divided into its own functional modules, or two or more functions can be integrated into one processing module. The integrated modules can be implemented in hardware or as software functional modules. It should be noted that the module division in this application embodiment is illustrative and only represents one logical functional division; other division methods may be used in actual implementation.

[0204] Through the above description of the embodiments, those skilled in the art can clearly understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0205] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

[0206] The units described as separate components may or may not be physically separate. A component shown as a unit can be one or more physical units; that is, it can be located in one place or distributed in multiple different locations. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0207] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0208] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, essentially or in other words, the parts that contribute to the prior art, or all or part of the technical solutions, can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0209] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A performance optimization method, the method being applied to an electronic device, characterized in that, The method comprises the following steps: In the case that the electronic device is in a first running state, the electronic device generates a first running strategy, and transmits the first running strategy to a central processing unit (CPU) of the electronic device through a first path, wherein the first path transmits the running strategy through a system and chip driver node; In the case that the electronic device is in a second running state, the electronic device generates a second running strategy, and transmits the second running strategy to the CPU through a second path, wherein the second path transmits the running strategy through a Windows management specification interface and a dynamic tuning technology (DTT) driver; The first running strategy and the second running strategy are used to adjust the running strategy of the CPU; the time consumed for transmitting the first running strategy through the system and chip driver node is less than the time consumed for transmitting the second running strategy through the Windows management specification interface and the DTT driver; The first running state includes the case that the electronic device has a fast response running strategy demand, at least including the state that the electronic device receives a user operation on a current focus window, or the state that the electronic device is in a lag state.

2. The method of claim 1, wherein, After the electronic device generates the first running strategy, before the electronic device transmits the first running strategy to the CPU through the first path, the method further comprises the following steps: The electronic device adds a first flag bit to the first running strategy, wherein the first flag bit matches the first running state; The electronic device selects the first path based on the first flag bit.

3. The method according to claim 1 or 2, characterized in that, After the electronic device generates the second running strategy, before the electronic device transmits the second running strategy to the CPU through the second path, the method further comprises the following steps: The electronic device adds a second flag bit to the second running strategy, wherein the second flag bit matches the second running state; The electronic device selects the second path based on the second flag bit.

4. The method according to claim 1 or 2, characterized in that, The first running state includes at least one of the following: The state that the electronic device receives a user operation on the current focus window or the lag state; The state that the electronic device detects that the chip of the electronic device feeds back hardware performance limited information; wherein the hardware performance limitation is that the running speed of the chip of the electronic device is limited; And the state that the electronic device is in a performance scenario, wherein the performance scenario is a scenario that needs to balance the power consumption and running performance of the electronic device.

5. The method according to claim 1 or 2, characterized in that, The second running state includes the state that the electronic device is in a power consumption scenario, and the state that the electronic device is in a preset user operation on a current focus window; wherein the power consumption scenario is a scenario that needs to limit the power consumption of the electronic device.

6. The method of claim 4, wherein, The performance scenario includes a programming scenario, a video scenario, a game scenario or a file opening scenario of a file exceeding a preset file size.

7. An electronic device, comprising: The electronic device comprises a memory and one or more processors. The memory is configured to store computer program code including computer instructions; when the computer instructions are executed by the processor, the electronic device performs the method in any one of claims 1-6.

8. A computer-readable storage medium, characterized in that, including computer instructions; when the computer instructions run on the electronic device, the electronic device performs the method in any one of claims 1-6.

9. A computer program product, characterised in that, when the computer program product runs on the computer, the computer performs the method in any one of claims 1-6.

Citation Information

Patent Citations

  • Resource scheduling method, electronic equipment and storage medium

    CN116028210A