Performance optimization method and electronic equipment
By introducing a multi-path transmission operation strategy in electronic devices, and selecting faster paths to improve the effectiveness of the operation strategy, the problem of slow operation strategy in the existing technology is solved, improving user experience and reducing power consumption.
Patent Information
- Application Number
- CN202410236134.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-29
- Publication Date
- 2025-01-07
- Estimated Expiration
- 2044-02-29
AI Technical Summary
Existing electronic devices are slow to take effect in operation strategies, which affects the user experience, especially in operation scenarios where fast response is required, such as user operation focus windows or hardware performance is limited.
The operation strategy is transmitted by introducing two paths into electronic devices: one is to drive nodes through the system and chip, and the other is to drive through the Windows management specification interface and dynamic tuning technology DTT, which is selected based on the urgency of the operation strategy and the scenario requirements of the operation strategy. Faster paths to improve the speed of operational strategies.
It improves the operation strategy's effectiveness speed, reduces user waiting time, reduces the power consumption of electronic devices, improves user experience, and avoids the accumulation of operation strategy and unnecessary data transmission power consumption.
Smart Images

Figure CN119271032A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of power electronics technology, and in particular to a performance optimization method and electronic equipment. Background Art
[0002] As the performance of electronic devices improves, the power consumption of electronic devices is also increasing. In order to reduce the power consumption of electronic devices and / or improve the operating performance of electronic devices, electronic devices can determine corresponding operating strategies based on the operating scenarios in which the electronic devices are located, and execute the determined operating strategies.
[0003] In conventional solutions, there are multiple operation strategies in the electronic device, and corresponding mapping tables related to the operation strategies for further improving the operation performance of the electronic device. The electronic device needs to traverse the mapping table to obtain the operation strategy for further improving the operation performance of the electronic device, and then execute the operation strategy to make the operation strategy effective. However, the electronic device mapping table will take a certain amount of time, resulting in a low speed of operation strategy effectiveness, affecting the user experience. Summary of the invention
[0004] The embodiments of the present application provide a performance optimization method and an electronic device for reducing operating power consumption while ensuring certain operating performance and improving user experience.
[0005] To achieve the above objectives, the embodiments of the present 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 a 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 for transmitting the first operating strategy through the first path is less than the time consumed for transmitting the second operating strategy through the second path.
[0007] In the present application, when the electronic device determines that the type of operation policy corresponding to the current operation scenario of the electronic device is a type that requires a faster operation policy to take effect, the operation policy is not obtained by traversing multiple operation policies by the electronic device, but the current operation policy is executed using a faster path. In this way, by using a path that requires a faster operation policy to take effect, the operation policy can be increased in speed and the user experience can be improved.
[0008] In combination with the first aspect, in a possible design method, a first operating strategy is transmitted to a central processing unit (CPU) of an electronic device through a first path, including: transmitting the first operating strategy to the CPU through a system and chip driver node; a second operating strategy is transmitted to the CPU through a second path, including: transmitting the second operating strategy to the CPU through a Windows Management Specification interface and a dynamic tuning technology (DTT) driver.
[0009] In this application, when the operation policy is issued, the operation policy is prioritized. The one with high urgency requirement is issued through the system and chip driver node. The one with low urgency requirement is issued to the CPU through the Windows management specification interface and dynamic tuning technology DTT driver. In this way, when the operation policy needs to be processed urgently, the path with faster operation policy effectiveness speed can be selectively used, which can improve the operation policy effectiveness speed and enhance the user experience.
[0010] In combination with the first aspect, in a possible design, after the electronic device generates a first operating strategy and before transmitting the first operating strategy to a central processing unit (CPU) of the electronic device through a first path, the method further includes: the electronic device adds a first flag bit to the first operating strategy, and the first flag bit matches the first operating state; and the electronic device selects a first path based on the first flag bit.
[0011] That is, the first path is selected based on the flag bit.
[0012] In combination with the first aspect, in one possible design, after the electronic device generates a second operating strategy and before transmitting the second operating strategy to the CPU through a second path, the method also includes: the electronic device adds a second flag bit to the second operating strategy, and the second flag bit matches the second operating state; the electronic device selects the second path based on the second flag bit.
[0013] That is, the first path is selected based on the flag bit.
[0014] In combination with the first aspect, in a possible design method, the first operating state includes at least one of the following: a state in which the electronic device receives an operation of the user on the current focus window or a stuck state; a state in which the electronic device detects that the chip of the electronic device feedbacks hardware performance limitation information; wherein the hardware performance limitation means that the operating speed of the chip of the electronic device is limited; and the electronic device is in a performance scenario, and the performance scenario is a scenario that needs to balance the power consumption and operating performance of the electronic device.
[0015] The electronic device receives the state of the user's operation on the current focus window, or the freeze state. This may change the power consumption and / or performance of the electronic device. This operating state generally requires a faster operation strategy transmission response. Based on this, the electronic device receiving the user's operation on the current focus window can be called a first-level event.
[0016] The electronic device detects a state in which the chip of the electronic device feeds back information about hardware performance limitation; wherein the hardware performance limitation means that the operating speed of the chip of the electronic device is limited, and this operating state generally also requires a faster operating strategy transmission response.
[0017] The electronic device is in a state of a performance scenario, and the performance scenario is a scenario that needs to balance the power consumption and operating performance of the electronic device. This scenario generally requires calling the performance power consumption model introduced above. The performance power consumption model can generate multiple operating strategies in a short time, for example, one operating strategy is generated every 1 second. And the electronic device needs to wait for the previous operating strategy to take effect before sending the next operating strategy generated by the performance power consumption model to the kernel state for execution. Since the operating strategy takes effect at a low speed, there is a situation where the previous operating strategy has not been executed yet, and the performance power consumption model has generated multiple operating strategies. These operating strategies are accumulated in the electronic device and cannot be executed, and the operating strategy takes effect slowly, affecting the user experience. Therefore, this operating state generally also has a faster operating strategy transmission response requirement.
[0018] In combination with the first aspect, in a possible design manner, the operation event includes: one or more of a mouse click event, a keyboard input event, or an operation event for switching applications.
[0019] In combination with the first aspect, in a possible design, the second operating state includes a state where the electronic device is in a power consumption scenario, and a state where the electronic device is in a state where the user performs a preset operation on the current focus window.
[0020] In combination with the first aspect, in one possible design approach, the performance scenario includes a programming scenario, a video scenario, a game scenario, or a file opening scenario that exceeds 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 executes a control method for an electronic device in any possible design manner in the first aspect.
[0023] In a third aspect, a computer-readable storage medium is provided, comprising computer instructions; when the computer instructions are executed on an electronic device, the electronic device executes a method for controlling an electronic device in any possible design manner as in the first aspect.
[0024] In a fourth aspect, a computer program product is provided. When the computer program product is run on a computer, the computer is caused to execute a method for controlling an electronic device in any possible design manner as in the first aspect.
[0025] Among them, the technical effects brought about by any design method in the second aspect, the third aspect and the fourth aspect can refer to the technical effects brought about by different design methods in the first aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 A schematic diagram showing the interaction principle of modules 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 of the workflow of software and hardware for the electronic device 100 to control the operation strategy is shown;
[0029] Figure 4 A schematic diagram of the workflow of software and hardware for the electronic device 100 to control the operation strategy in an embodiment of the present application is shown;
[0030] Figure 5 A schematic flow chart of a performance optimization method is shown;
[0031] Figure 6 A schematic structural diagram of an electronic device 100 provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0032] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this embodiment, unless otherwise specified, "plurality" means two or more.
[0033] In order to make the description of the following embodiments clear and concise, a brief introduction to the relevant concepts or technologies is first given:
[0034] In order to make the description of the following embodiments clear and concise, a brief introduction to the relevant concepts or technologies is first given:
[0035] (1) Focus window refers to the window with focus. The focus is the position where the cursor is currently activated. That is, the focus window is the window where the cursor is currently activated. The focus window is the current operation window and can receive keyboard input. In general, the window with a non-gray title bar is the focus window.
[0036] (2) Operation scenario: The operation scenario is used to describe the scenario in which the electronic device responds to the user's operation to perform a task in the focus window, where the task refers to the execution content related to the function provided by the focus window. For example, the operation scenario of the electronic device may include video scenario, game scenario, social scenario, office scenario, browser scenario, smart interconnection scenario, evaluation scenario, programming scenario, hyperterminal scenario, design software scenario, process startup scenario, large file opening scenario, etc.
[0037] The task corresponding to the video scene may be playing videos; the task corresponding to the game scene may be playing games; the task corresponding to the social scene may be voice chat, video chat, typing chat, etc.; the task corresponding to the office scene may be editing documents; the task corresponding to the browser scene may be browsing the web; the task corresponding to the smart interconnection scene may be sharing information after multiple electronic devices are interconnected, and the task corresponding to the evaluation scene may be experimental analysis of the performance of electronic devices; the task corresponding to the programming scene may be programming; the task corresponding to the super terminal scene may be that an electronic device can operate one or more other electronic devices, the task corresponding to the design software scene may be designing software, and the task corresponding to the process startup scene may be memory management, task scheduling, etc.; the large file opening scene may be a file opening scene that exceeds the preset file size, etc.
[0038] Among them, the video scene can further include video playback scene, video browsing scene, video barrage scene. The social scene can further include text chat scene, voice chat scene, video chat scene, etc. The office scene can further include document editing scene, document browsing scene, video conferencing scene, etc. These scenes can also be called office software operation refinement scenes. The browser scene can include web browsing scene and video playback scene, etc.
[0039] (3) Power consumption scenarios: Power consumption scenarios are operating scenarios whose main purpose is 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 a preset file size), etc.
[0041] (5) Power Limit (PL), which is used to limit the power consumption of the central processing unit (CPU) in electronic devices. Generally, the level of power consumption limitation on the CPU can be expressed in the form of "PL+number". Among them, the "number" in "PL+number" represents a specific level. For example, there are four levels of power consumption limitation on the CPU from small to large, namely PL1, PL2, PL3, and PL4. The smaller the number, the lower the power consumption limitation level. The embodiments of the present application mainly involve PL1 and PL2, and PL1 and PL2 are mainly introduced below.
[0042] (6) PL1, also known as long-term turbo power consumption, is the power consumption that the CPU will maintain at when under load for a long time.
[0043] (7) PL2, also known as short-term turbo power consumption. Generally, PL2 is greater than PL1 and is the maximum power consumption that the CPU can achieve under short-term load, which is also the upper limit of the CPU performance of electronic devices.
[0044] (8) CPU energy performance preference (EPP) is used to reflect the CPU scheduling tendency, and its value range is 0 to 255. The smaller the CPU energy performance preference, the higher the CPU energy performance preference, the lower the CPU power consumption.
[0045] (9) Power consumption wall: A threshold at which the CPU releases maximum power. If this threshold is exceeded, the processor will run at a reduced frequency.
[0046] (10) BIOS (Basic Input / Output System) is short for ROM-BIOS, which is a read-only memory basic input / output system. It is actually a set of programs that are embedded in electronic devices and provide the lowest level and most direct hardware control for electronic devices. It is the hub between software programs and hardware devices. In layman's terms, BIOS is a "converter" or interface between hardware and software programs (although it is also just a program itself), responsible for solving the immediate requirements of hardware and executing the specific hardware operation requirements according to the software.
[0047] As described in the background technology above, in conventional solutions, there are multiple operation strategies in the electronic device, and corresponding mapping tables related to the operation strategies for further improving the operation performance of the electronic device. The electronic device needs to traverse the mapping table to obtain the operation strategy for further improving the operation performance of the electronic device, and then execute the operation strategy to make the operation strategy effective. However, the electronic device mapping table will take a certain amount of time, resulting in a low speed of operation strategy effectiveness, affecting the user experience.
[0048] The following will explain in detail the impact of the slow implementation speed of the operation strategy.
[0049] Figure 1 FIG. 1 is a schematic diagram showing the interaction principle of modules related to operation strategy control in an electronic device 100. Figure 1 As shown, the electronic device 100 may include a scene recognition engine, a scheduling engine, a perception middle station, a learning middle station, and a decision middle station. In some embodiments, the scene recognition engine, the scheduling engine, the perception middle station, the learning middle station, and the decision middle station may be Figure 1 The processor 110 of the illustrated embodiment is used to implement modules of corresponding functions.
[0050] Among them, the scene recognition engine may include a system probe module.
[0051] The scene recognition engine is used to identify the operating scene of the electronic device.
[0052] The perception middle station is used to obtain the operating status information of the electronic device in the operating scenario; wherein the operating status information is used to characterize the hardware operating status and / or system operating status when the electronic device operates the focus window.
[0053] For example, the operation status information may include one or more of power status information, peripheral status information, process load information, audio and video status information, system load information, or system event information, etc. Among them, the power status information, peripheral status information, and audio and video status information can be considered as hardware operation status; process load information, system load information, and system event information can be considered as system operation status.
[0054] The power state information may include one or more of battery (remaining) power, power mode, etc. The power mode may include alternating current (AC) and direct current (DC).
[0055] The peripheral device status information may include one or more of a mouse wheel sliding event, a mouse click event, a keyboard input event, a microphone input event, or a camera input event.
[0056] The process load information includes the average information of the proportion of CPU time occupied by each process in the system. The process load information can reflect the running status of each process in the system, including system core processes and other user processes.
[0057] The audio and video state information includes the audio and video events currently existing in the electronic device 100. The audio and video events may include one or more of GPU decoding events, video events, video frame rates, or video subtitles.
[0058] The system load information includes the total number of processes currently being executed by the CPU and waiting to be executed by the CPU. The system load information can be an important indicator reflecting the busyness of the system.
[0059] The system event information may include one or more of window change information, system lock information, process creation information, or thread creation information.
[0060] The operating status information described above is only an example. The operating status information may also be other information used to characterize the hardware operating status and / or system operating status when the electronic device operates the focus window, such as screen brightness, download speed, etc., but is not limited thereto.
[0061] The learning platform is used to train the performance power consumption model; the performance power consumption model is used to determine the operation strategy for limiting the operation power consumption of the electronic device and improving the operation performance of the electronic device.
[0062] The decision-making platform is used to determine the operation strategy using the trained performance power consumption model. The operation strategy includes the target value of the operation parameter. The performance power consumption model is used to characterize the mapping relationship between the operation status information of the operation scenario and the operation strategy.
[0063] The scheduling engine is used to control the electronic device using the operation strategy.
[0064] S1 to S6 are the process of training the performance power consumption model, obtaining the operation strategy using the trained performance power consumption model, and controlling the electronic device using the operation strategy. The following will specifically introduce the role of the scene recognition engine and scheduling engine, perception middle station, learning middle station and decision middle station in the embodiment of this application.
[0065] S1: The perception center can obtain operating status information from the system probe module in the scene recognition engine.
[0066] The perception center can obtain the running status information through the system probe module in the scene recognition engine. Among them, the system probe module can include multiple types of probes. Correspondingly, the perception center can obtain the required running status information through the multiple types of probes included in the system probe. For example, multiple types of probes can include power status probes, peripheral status probes, process load probes, audio and video status probes, system load probes, and system event probes. Among them, the power status probe can be used to detect power status information; the peripheral status probe can be used to detect peripheral status information; the process load probe can be used to detect process load information; the audio and video status probe can be used to detect audio and video status information; the system load probe can be used to detect system load information; the system event probe is used to detect system event information. Among them, the information detected by each probe can also be called probe status information, that is, the probe status information detected by each probe can be used as running status information.
[0067] In some embodiments, the perception center station may send a request to the system probe module for querying the operation status information, so that the system probe module may respond to the request and report the operation status information to the perception center station.
[0068] It is understandable that S1 in the embodiment of the present application can be executed in the model training stage or in the model use stage. If executed in the model training stage, the following S2 can be executed after S1 is executed. If executed in the model use stage, the following S3 can be executed after S1 is executed.
[0069] S2: The perception center can send the operating status information obtained from the system probe module to the learning center. The learning center can use the operating status information to train the performance power consumption model.
[0070] The specific training process of the performance power consumption model will be described below.
[0071] S3: The perception middle station determines the first event. Then, the perception middle station can respond to the first event and trigger the decision-making middle station to obtain the running status information from the perception middle station.
[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 an operating strategy using the performance power consumption model.
[0073] The first event may include one or more of a first-level event, a performance-limited event, or a performance-power consumption model training event. The first-level event may include an operation event of a user on the current focus window, and / or a freeze event. Exemplarily, the operation event may include one or more of a mouse click event, a keyboard input event, or an operation event for switching applications.
[0074] The performance-limited event is an event in which the hardware performance of the electronic device is limited, as reported by the hardware of the electronic device. The hardware performance limitation may be that the operating speed of the chip of the electronic device is limited. Based on this, the performance-limited event may also be referred to as a chip performance-limited event.
[0075] The performance power consumption model training event is an event for training the performance power consumption model.
[0076] S4: When triggered by the first event, the decision-making center obtains the operating status information from the perception center.
[0077] S5: When triggered by the first event, the decision-making middle station calls the trained performance power consumption model from the learning middle station, and inputs the operating status information obtained from the perception middle station into the trained performance power consumption model to obtain an operating strategy that can reduce operating power consumption while ensuring a certain operating performance.
[0078] The operation strategy includes various operation parameters, and the operation parameters may be parameters of the electronic device related to limiting power consumption and improving operation performance of the electronic device.
[0079] The operation strategy may include a combination of one or more operation parameters including PL1, PL2, EPP, emergency power off (EPO) control switch status information, CPU acceleration (Turbo) switch status information, fan speed, discrete graphics processing unit (DGPU) overspeed value, video memory overclocking value, integrated graphics processing unit (IGPU) minimum frequency, IGPU maximum frequency, DGPU minimum frequency, DGPU maximum frequency, energy-saving display status information, CPU minimum frequency, core binding information and memory cleaning status information.
[0080] Binding a core, also known as setting the affinity of a process or thread, means binding a process or thread to a specific CPU core to run. Doing so can improve performance because the process or thread only runs on the bound CPU core, reducing the time to switch between multiple cores. However, binding a core does not mean that the process or thread exclusively occupies the CPU core, and other processes or threads can still run on this core.
[0081] In this way, the operation strategy output by the performance power consumption model can reduce the operation power consumption of the electronic device while ensuring a certain operation performance, thereby improving the user experience.
[0082] S6: The decision-making platform sends the operation strategy obtained by using the performance and power consumption model to the scheduling engine.
[0083] The decision-making center sends the operation strategy obtained by using the performance and power consumption model to the scheduling engine, so that the scheduling engine can control the electronic equipment based on the operation strategy.
[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 is that, under the triggering of certain events (hereinafter referred to as the second event), the decision-making center can instruct the scene recognition engine to compare the two operation strategies and obtain a specific solution for the target value of the operation parameter in the current operation strategy to be executed. For details, see the contents of S7 and S8. The contents of S7 and S8 are as follows:
[0085] S7: Under the triggering of the second event, the decision-making center sends an operation policy request to the scene recognition engine. Among them, the operation policy request includes the current operation scenario, the decision-making center calls the performance power consumption model to determine the operation policy corresponding to the current operation scenario, and the mandatory information of the performance power consumption model. The mandatory information of the performance power consumption model includes the mandatory degree information of the performance power consumption model call and the mandatory reason. For example, the mandatory degree information of the performance power consumption model call is the operation policy obtained by comparing the two methods, and the mandatory reason is triggered by the second event.
[0086] If the mandatory degree information called by the performance power consumption model is an operation strategy obtained by comparing two methods, and the mandatory reason is triggered by the second event, the scene recognition engine can compare the operation strategy corresponding to the current operation scene obtained by calling the performance power consumption model and the operation strategy corresponding to the current operation scene pre-stored in the scene recognition engine to obtain the compared operation strategy, so that the electronic device can control the electronic device based on the compared operation strategy. This solution will be described in detail below.
[0087] S8: The scene recognition engine feeds back the compared operation strategy to the decision-making center.
[0088] The scene recognition engine feeds back the compared operation strategy to the decision-making center. Then, the above S6 can be replaced by: the decision-making center sends the compared operation strategy to the scheduling engine. In this way, the scheduling engine can control the electronic device based on the operation strategy.
[0089] That is to say, if the first event occurs, the decision-making center can determine the operation strategy corresponding to the current operation scenario only by calling the performance power consumption model, and report it to the scheduling engine so that it controls the operation of the electronic device according to the operation strategy. If the second event occurs, the decision-making center not only needs to determine the operation strategy corresponding to the current operation scenario by calling the performance power consumption model, but also needs to trigger the scene recognition engine to obtain the pre-stored operation strategy corresponding to the current operation scenario, and obtain the compared operation strategy by comparing the two operation strategies, and report it to the scheduling engine so that it can control the operation of the electronic device based on the compared operation strategy.
[0090] In addition, compared to Figure 1 The embodiment shown, Figure 2 The implementation of the perception middle station is specifically described in the illustrated embodiment.
[0091] The perception center station may include a meta-capability acquisition module, which is used to implement the operation of acquiring operation status information from the system probe module.
[0092] Specifically, the meta-capability acquisition module can send the acquired operating status information to the data center included in the perception center for storage. The meta-capability acquisition module can also be used to determine the first event or the second event. In addition, after the meta-capability acquisition module acquires the first event or the second event, it can also send the first event or the second event to the fence module of the perception center, so that the fence module can use the first event to trigger the decision center to obtain the operating status information from the perception center.
[0093] The meta-capability acquisition module can also send the operating status information corresponding to the current operating scenario to the snapshot module, so that the decision-making middle station can quickly obtain the operating status information corresponding to the current operating scenario from the snapshot module in the perception middle station.
[0094] exist Figure 1 and Figure 2 In the process, the scheduling engine needs to call the bottom layer (such as the kernel state structure) to execute the operation strategy. After the execution is completed, the feedback message of the successful execution of the operation strategy is fed back to the perception center. However, if the operation strategy cannot be executed for a long time because the operation strategy takes effect slowly, the perception platform will send the operation status information originally sent to the learning center and the perception center to the learning center and the perception center again, which will generate unnecessary data transmission power consumption, increase the power consumption of electronic devices, and affect the user experience.
[0095] On the other hand, the performance power consumption model can generate multiple operation strategies in a short period of time, for example, one operation strategy is generated every 1 second. And the electronic device needs to wait for the previous operation strategy to take effect before sending the next operation strategy generated by the performance power consumption model to the kernel state for execution. Since the operation strategy takes effect at a low speed, there is a problem that the previous operation strategy has not been executed yet, and the performance power consumption model has generated multiple operation strategies. These operation strategies are accumulated in the electronic device and cannot be executed, and the operation strategy takes effect slowly, affecting the user experience.
[0096] Combine the following Figure 3 , introducing a solution for an electronic device to obtain an operation strategy by traversing multiple operation strategies.
[0097] Figure 3 A schematic diagram of the workflow of software and hardware for the electronic device 100 to control operating parameters is shown.
[0098] like Figure 3 As shown, the scene recognition engine may be located at the application layer of the electronic device. In addition to the system probe module, the scene recognition engine may also include a scene recognition module and a scene strategy configuration module.
[0099] The scene recognition module can determine the current operating scene. The operating scene may include a video scene, a game scene, an office scene, and a social scene. For example, when the scene recognition engine recognizes that the focus window is a window of a video application, it determines that the electronic device 100 is in a video scene. For another example, when the scene recognition engine recognizes that the focus window is a WeChat window, it determines that the electronic device 100 is in a video scene. TM When a chat window is displayed, it is determined that the electronic device 100 is in a social scene. The scene recognition module may also send the operation scene to the scene policy configuration module. The scene policy configuration module may determine the operation parameters according to the operation scene. The scene policy configuration module may feed back the operation parameters to the scene recognition module. The scene recognition module may send the operation parameters and the operation scene to the scheduling engine of the application layer.
[0100] The scene recognition module determines the current operating scene is a prior art and will not be described in detail here.
[0101] As mentioned above Figure 2 As described in , the scene recognition engine can store the mapping relationship between the operation scene and the operation strategy. After the scene recognition module recognizes the operation scene, the operation strategy can be directly obtained from the mapping relationship.
[0102] The role of the perception platform and the above Figure 1 and Figure 2 The same, no longer repeat here.
[0103] In some embodiments, the scene recognition module may send a request for querying the running status information to the system probe module, so that the system probe module may report the running status information to the scene recognition module in response to the request.
[0104] The system probe module can subscribe to kernel events in the kernel state, so as to determine the running state information according to the callback function fed back by the kernel state, and report it to the scene recognition module. Specifically: the multiple types of probes included in the system probe module can subscribe to the corresponding kernel events in the kernel state respectively, so as to obtain the corresponding running state information.
[0105] For example, the power state probe may subscribe to the power state event from the kernel state, and determine the power state information according to the callback function fed back by the kernel state.
[0106] For example, the kernel state may include: a subsystem dynamic link library, an executive body, a kernel and driver layer, a HAL, a firmware layer, and a hardware layer. The power state probe may send a request to subscribe to the power state event to the system event driver (OsEventDriver) node of the executive body in the kernel state, and the OsEventDriver node forwards the request to the power manager of the executive body. After receiving the request, the power manager may feed back a callback function to the power state probe through the OsEventDriver node to implement the subscription of the power state event.
[0107] The peripheral status probe can subscribe to peripheral events in the kernel state and determine the peripheral status information based on the callback function fed back by the kernel state.
[0108] The process load probe can subscribe to the process load event in the kernel state and determine the process load information according to the callback function fed back by the kernel state.
[0109] The system load probe can subscribe to system load events in the kernel state and determine the system load information based on the callback function fed back by the kernel state.
[0110] The audio and video status probe can subscribe to audio and video events in the kernel state, and determine the current audio and video status information of the electronic device 100 according to the callback function fed back by the kernel state.
[0111] For example, the audio and video status probe can send a request to subscribe to GPU decoding information to the OsEventDriver node of the executive body, and the OsEventDriver node forwards the request to the graphics driver of the kernel and driver layer. After receiving the request, the graphics driver feeds back a callback function to the audio and video status probe through the OsEventDriver node, so that after monitoring that the GPU is performing a decoding operation, the audio and video status information is obtained based on the callback function of the audio and video status probe.
[0112] The system event probe can subscribe to system events in the kernel state and determine the system event information according to the callback function fed back by the kernel state. The system event information can include one or more of window change information, system lock information, process creation information, or thread creation information.
[0113] For example, the system event probe may send a request to subscribe to the process creation information to the OsEventDriver node of the executable body, and the OsEventDriver node forwards the request to the process manager. After receiving the request, the process manager feeds back a callback function to the system event probe through the OsEventDriver node, so that after the process is created, the system event information is obtained based on the system event probe feedback callback function. For another example, the system event probe also sends a request to subscribe to the focus window change information to the API module, and the API module feeds back a callback function to the system event probe to monitor whether the focus window of the electronic device 100 has changed, and when the focus window is monitored to change, the focus window change information is obtained based on the system event probe feedback callback function.
[0114] It can be seen that the system probe module subscribes to various events of the electronic device 100 in the kernel state, and then obtains the probe state according to the callback function fed back by the kernel state, that is, obtains the operating state information of the electronic device 100.
[0115] In some embodiments, the decision-making platform can obtain the operating scenario from the scenario recognition module. Figure 2 or Figure 2 The learning platform in the program calls the trained performance and power consumption model and converts it from Figure 1 or Figure 2 The operating status information obtained by the perception middle station in the system is input into the trained performance power consumption model to obtain an operating strategy that can reduce the operating power consumption and ensure a certain operating performance. The decision-making middle station can send the operating strategy to the scheduling engine, the scheduling engine receives the operating strategy, and the scheduling engine performs scheduling based on the operating strategy. In an embodiment of the present application, the scheduling engine can send instructions to the CPU through the power manager and BIOS, and the instruction carries the operating parameter 1 in the operating strategy. The scheduling engine can send instructions to the Intel DTT driver through WMI, and the instruction carries the operating parameter 2 in the operating strategy, and then the Intel DTT driver can send the received instructions to the CPU through the BIOS. The scheduling engine can send instructions to the CPU through the system and chip (OS2SOC) driver node, and the instruction carries the operating parameter 2 in the operating strategy. Among them, operating parameter 1, operating parameter 2 and operating parameter 3 can be different operating parameters in the operating strategy.
[0116] In an embodiment of the present application, the scheduling engine can send instructions to the Intel DTT driver through Windows Management Instrumentation (WMI), where the instructions are used to instruct the execution of an operation strategy. Then, the Intel DTT driver can send the received instructions to the CPU through the BIOS.
[0117] The scheduling engine can execute the operation strategy in different ways. There are two main types of CPU chip platforms: (Advanced Micro Devices, AMD) CPU and The two types of CPUs have different receiving paths for running strategies, so they need to be distinguished. It is understandable that the chip platform types of CPUs are not limited to these two types. With the development of technology, there may be more types, which are not limited here.
[0118] The following chip platform types are The strategy is described in further detail.
[0119] If the CPU chip platform type is The scheduling engine can send an operation policy to the Intel DTT driver through the WMI plug-in. The operation policy may include PL1 and EPP, and the Intel DTT driver CPU executes the operation policy.
[0120] The following introduces the dynamic tuning technology (DTT).
[0121] 1.1. The scheduling engine determines the dynamic tuning technology strategy number according to the operation strategy.
[0122] Dynamic tuning technology (DTT) is The company Processor and A technology that automatically and dynamically allocates power consumption between discrete graphics cards to optimize performance and extend battery life. It can improve the performance of the CPU and GPU and balance power for intelligent mixed workloads.
[0123] It can be understood that there can be a mapping relationship between the DTT policy number and the scheduling policy corresponding to the running policy. A DTT policy table will be constructed in the BIOS, and the scheduling policy corresponding to any running policy can be mapped to a DTT policy number in the DTT policy table through the parameters (PL1`, PL2`, EPP`) therein, as shown in Table 1.
[0124] Among them, the DTT policy number can be used to identify a DTT policy, and the DTT policy corresponding to the DTT policy number is used to adjust 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. Energy Performance Optimize Gear (EPO Gear) is used to characterize the strength of DTT's adjustment of the CPU energy efficiency ratio (EPP). The value range is 1 to 5. The larger the value, the more energy efficiency is favored when adjusting EPP; the smaller the value, the more performance is favored when adjusting EPP.
[0125] Table 1
[0126]
[0127] It should be noted that Table 1 only shows the correspondence between some PL1', PL2', EPP' and DTT policy numbers, and may actually include more information than Table 1. For example, if the scheduling policy corresponding to the operation policy indicates that PL1' is -1, PL2' is -1 and EPP' is -1, it can be determined that the DTT policy number is 0, and its corresponding PL1_MINI is 30, PL1_MAX is 40, PL2 is 95, PL2_TIME is 28, and EPO Gear is 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] It can be understood that the Intel DTT driver can send the DTT policy number to the CPU through the BIOS.
[0131] 1.4. The CPU runs based on the DTT strategy number.
[0132] It can be seen that if the CPU chip platform type is The scheduling engine may send an instruction to adjust the EPP to the power manager through the scheduling engine, and the power manager may adjust the EPP of the CPU.
[0133] If the CPU chip platform type is The scheduling engine can then determine the scheduling policy corresponding to the running policy to obtain the DTT policy number, and send the DTT policy number to the Intel DTT driver through the BIOS through the scheduling engine, so that the CPU runs based on the DTT policy number to achieve the effect of adjusting power consumption.
[0134] From the above, we can see that there are multiple operation strategies in the Intel DTT driver, as well as corresponding mapping tables of DTT strategies that further improve the operation performance of electronic devices. Electronic devices need to traverse the mapping table to obtain the DTT strategy that further improves the operation performance of electronic devices, and then execute the DTT strategy to make the DTT strategy effective. However, it takes a certain amount of time for electronic devices to traverse the mapping table, resulting in a low speed of effectiveness of the DTT strategy corresponding to the operation strategy, which affects the user experience.
[0135] In order to solve the above problems, the embodiment of the present application proposes a performance optimization method. Specifically, when the electronic device determines that the type of operation strategy corresponding to the current operation scenario of the electronic device is a type that requires a faster operation strategy to take effect, the operation strategy is not obtained by traversing multiple operation strategies by the electronic device, but the current operation strategy is executed using a faster path. For example, Figure 4 A schematic diagram of the workflow of software and hardware for the electronic device 100 to control the operation strategy in an embodiment of the present application is shown. Figure 4 and Figure 3 The difference is that Figure 4 There are two operation policy transmission paths. Among them, path 1 is the path for the scheduling engine to transmit operation policy 1 to the CPU through the Windows Management Specification interface and the dynamic tuning technology DTT driver. Path 2 is the path for the scheduling engine to transmit operation policy 2 to the CPU through the system and chip driver node. Since it is not necessary to traverse the mapping table of the DTT policy through path 2, the time to reach the CPU through path 2 is faster than the time to reach the CPU through path 1. In this way, by using the path that requires a faster operation policy to take effect, the speed at which the operation policy takes effect can be increased, thereby improving the user experience.
[0136] Moreover, since the operation strategy takes effect quickly and can be executed in a short time, the perception platform does not need to send the operation status information originally sent to the learning middle station and the perception middle station again. This will avoid unnecessary data transmission power consumption, reduce the power consumption of electronic devices, and improve user experience.
[0137] On the other hand, even if the performance power consumption model can generate multiple operation policies in a short period of time, for example, one operation policy is generated every 1 second. And the electronic device needs to wait for the previous operation policy to take effect before sending the next operation policy generated by the performance power consumption model to the kernel state for execution. Since the operation policy takes effect at a high speed, it can reduce the situation where the previous operation policy has not been executed yet, and the performance power consumption model has generated multiple operation policies to a certain extent, and reduce the situation where the operation policies are piled up in the electronic device and cannot be executed. The operation policy can take effect in time, improving the user experience.
[0138] Exemplarily, the electronic device in the embodiments of the present application may be a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC) device, or the like, and the embodiments of the present application do not impose any particular limitation on the specific form of the electronic device.
[0139] Figure 5 FIG. 1 shows a flow chart of a performance optimization method. Figure 5 As shown, the process includes the following steps:
[0140] S501: The electronic device determines the operating state of the electronic device.
[0141] From the above description, it can be seen that in order to improve the effectiveness speed of the electronic device operation strategy, a path transmission transportation strategy that reaches the CPU faster is generally selected.
[0142] In some embodiments, it can be considered that not all running states require a faster path to the CPU, and generally there are running states that require a faster running policy transmission response.
[0143] For example, the electronic device receives the state of the user's operation on the current focus window, or the freeze state. This may change the power consumption and / or performance of the electronic device. This operating state generally requires a faster operation strategy transmission response. Based on this, the electronic device receiving the user's operation on the current focus window can be called a first-level event.
[0144] In another example, an electronic device detects a state in which a chip of the electronic device feeds back information about hardware performance limitation; wherein hardware performance limitation means that the operating speed of the chip of the electronic device is limited, and this operating state generally also requires a faster operating strategy transmission response.
[0145] For another example, an electronic device is in a performance scenario, where the power consumption and operating performance of the electronic device need to be balanced. This scenario generally requires calling the performance power consumption model introduced above. The performance power consumption model can generate multiple operating strategies in a short period of time, for example, one operating strategy is generated every 1 second. And the electronic device needs to wait for the previous operating strategy to take effect before sending the next operating strategy generated by the performance power consumption model to the kernel state for execution. Since the operating strategy takes effect at a low speed, there is a situation where the previous operating strategy has not been executed yet, and the performance power consumption model has generated multiple operating strategies. These operating strategies are accumulated in the electronic device and cannot be executed, and the operating strategy takes effect slowly, affecting the user experience. Therefore, this operating state generally also has a faster operating strategy transmission response requirement.
[0146] It can be understood that the above operating state can be called the first operating state.
[0147] In other operating states (which may be referred to as second operating states), generally, there is no need to transmit a faster operating strategy to respond to demand. The existing path transmission transportation strategy may be used.
[0148] Optionally, the second operating state includes at least any one of the following:
[0149] The electronic device is in a power consumption scenario; wherein the power consumption scenario is a scenario where the power consumption of the electronic device needs to be limited.
[0150] The electronic device is in the state of an AI feature scene; wherein the AI feature scene is to identify the preset operation of the user on the current focus window. The preset operation is pre-stored by the electronic device, and if the operation of the user on the current focus window is identified as the preset operation, it is determined that the electronic device is in the state of an AI feature scene, and the preset operation is different from the operation of the user on the current focus window in the first running state.
[0151] When the electronic device is in the first operating state, the electronic device generates operating strategy 2, see S502 for details. When the electronic device is in the second operating state, the electronic device generates operating strategy 1, see S503 for details.
[0152] S502: The electronic device generates an operation strategy 2.
[0153] Operation strategy 2 may also be referred to as a first operation strategy.
[0154] S503: The electronic device generates an operation strategy 1.
[0155] Operation strategy 1 may also be referred to as a second operation strategy.
[0156] S504: The electronic device determines the type of operation strategy corresponding to the current operation state of the electronic device.
[0157] In some embodiments, after the electronic device generates an operation strategy, before transmitting the operation strategy to the central processing unit CPU of the electronic device through the transmission path, the electronic device can add a flag bit to the operation strategy, the flag bit matches the first operation state, and the flag bit is used to indicate the path type selected by the electronic device.
[0158] Specifically, in some embodiments, after the electronic device generates operation strategy 2, before transmitting operation strategy 2 to the central processing unit CPU of the electronic device through path 2 (which can be called the first path), the electronic device can add a first flag bit to the operation strategy 2, and the first flag bit matches the first operating state; the electronic device selects path 2 based on the first flag bit.
[0159] After the electronic device generates operation strategy 1, before transmitting operation strategy 1 to the CPU through path 1 (which can be called the second path), the electronic device can add a second flag bit to operation strategy 1, and the second flag bit matches the second operation state; the electronic device selects path 1 based on the second flag bit.
[0160] A program code related to the type of operation strategy is shown below.
[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 above code, POLICY-TYPE-AI-ONE-LEVEL=0X00 indicates that the type of the running policy is a level one event, and the flag bit may be 0X00, which may be the first flag bit.
[0169] POLICY-TYPE-AI-PERF-LIMIT=0X01 indicates that the type of the operation policy is a performance-limited type, and the flag bit is 0X01, which may be the first flag bit.
[0170] POLICY-TYPE-AI-CHARATER=0X02 indicates that the type of the operation policy is the AI feature type, and the flag bit is 0X02, which may be the second flag bit.
[0171] POLICY-TYPE-HSPP-POWER-SCENE=0X03 indicates that the type of the operation policy is the power consumption scenario type, and the flag bit is 0X03, which may be the second flag bit.
[0172] POLICY-TYPE-HSPP-PERF-SCENE=0X04 indicates that the type of the running policy is the performance scenario type, and the flag bit is 0X04, which may be the first flag bit.
[0173] S505: The electronic device determines whether the thermal strategy is triggered.
[0174] It can be understood that the thermal strategy is an operation strategy of the electronic device based on factors such as power endurance and heat dissipation. Generally, in order to improve the operation performance of the electronic device and reduce power consumption, the thermal strategy has a higher processing priority and will be executed first. Therefore, when the operation state is the first operation state, if the electronic device determines that the thermal strategy is not triggered, the electronic device can execute the current operation strategy through a faster path, see S506 for details. If the electronic device determines that the operation strategy is triggered, the electronic device can exit the execution of the current operation strategy.
[0175] S506: Transmitting operation strategy 2 to the CPU of the electronic device via path 2.
[0176] S507: Transmitting operation strategy 1 to the CPU of the electronic device via path 1.
[0177] In different operating states, the operating strategies generated by the electronic device have different requirements for the effectiveness speed. When the electronic device is in the first operating state, the electronic device generates operating strategy 2, and transmits operating strategy 2 to the central processing unit CPU of the electronic device through path 2; when the electronic device is in the second operating state, the electronic device generates operating strategy 1, and can transmit operating strategy 1 to the CPU through path 1. Among them, operating strategy 2 and operating strategy 1 are used to adjust the operating strategy of the CPU; the time consumed to transmit operating strategy 2 through path 2 is less than the time consumed to transmit operating strategy 1 through path 1.
[0178] Transmitting operation strategy 2 to the central processing unit CPU of the electronic device through path 2 may be transmitting operation strategy 2 to the CPU through the system and chip driver node; transmitting operation strategy 1 to the CPU through path 1 may be transmitting operation strategy 1 to the CPU through the Windows Management Specification interface and the dynamic tuning technology DTT driver.
[0179] It can be understood that, from the above, dynamic tuning technology (DTT) is The company Processor and The technology of automatically and dynamically allocating power consumption between independent graphics cards to optimize performance and extend battery life can improve the performance of CPU and GPU and balance the power of intelligent mixed workloads. Therefore, although transmitting the transportation strategy through path 2 will cause the operation strategy to reach the CPU more slowly, the operation strategy can be improved in the direction of better operation performance of electronic devices based on DTT technology, thereby improving the operation performance of electronic devices.
[0180] The present application provides a performance optimization method, when the operation policy is issued, the operation policy is prioritized and issued through the system and chip driver node driving mode for the high urgency requirement, and issued to the CPU through the Windows management specification interface and dynamic tuning technology DTT driver for the low urgency requirement. In this way, when the operation policy needs to be processed urgently, the path with faster operation policy effectiveness speed can be selectively used, which can improve the operation policy effectiveness speed and enhance the user experience.
[0181] Please refer to Figure 6 , is a structural diagram of an electronic device 100 provided in an embodiment of the present 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 to be understood that the structure illustrated in this embodiment does not constitute a specific limitation on the electronic device 100. In other embodiments, the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or separate some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0184] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0185] In some embodiments, the processor and the central processing unit (CPU) may refer to the same component. The processor generally 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 may refer to a more complete system. For example, the processor may be a system on a chip (SoC), which includes not only the CPU but also other components such as a GPU, a memory controller, etc.
[0187] In the embodiment of the present application, the operating parameters may be parameters related to the CPU and GPU. The processor may obtain the operating status information corresponding to the current operating scenario, and based on the operating status information, obtain the target value of the operating parameter that can ensure a certain operating performance while reducing the operating power consumption. Then, the processor may adjust the operating parameters of the CPU and GPU based on the target value of the operating parameter to reduce the operating power consumption of the electronic device and ensure the operating performance of the electronic device.
[0188] The controller may be the nerve center and command center of the electronic device 100. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.
[0189] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, 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. The interface 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 is used to receive charging input from a 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 power the electronic device through 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, and provides power to the processor 110, the internal memory 121, the external memory, the display screen 160, and the wireless communication module 150. In some embodiments, the power management module 141 and the charging management module 140 can also be set in the same device.
[0193] The wireless communication module 150 can provide wireless communication solutions including WLAN (such as Wi-Fi), Bluetooth, global navigation satellite system (GNSS), frequency modulation (FM), near field communication technology (NFC), infrared technology (IR), etc. for application in the electronic device 100.
[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, modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110. The wireless communication module 150 may also receive a signal to be sent from the processor 110, modulate the frequency of the signal, amplify the signal, and convert it into electromagnetic waves for radiation via the antenna.
[0195] The electronic device 100 implements the display function through a GPU, a display screen 160, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 160 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change 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 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 a data storage function, such as storing music, video and other files in the external memory card.
[0198] The internal memory 121 may be used to store computer executable program codes, which include instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121. For example, in an embodiment of the present application, the processor 110 may execute the instructions stored in the internal memory 121, and the internal memory 121 may include a program storage area and a data storage area.
[0199] The program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the electronic device 100 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.
[0200] An embodiment of the present application also provides a computer storage medium, which includes computer instructions. When the computer instructions are executed on the above-mentioned electronic device, the electronic device executes each function or step executed by the mobile phone in the above-mentioned method embodiment.
[0201] The embodiment of the present application also provides a computer program product. When the computer program product is run on a computer, the computer is enabled to execute each function or step executed by the mobile phone in the above method embodiment.
[0202] It is understandable that the electronic device provided in the embodiment of the present application includes a hardware structure and / or software module corresponding to each function in order to realize the above functions. Those skilled in the art should easily realize that, in conjunction with the units and algorithm steps of each example described in the embodiment disclosed herein, the embodiment of the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the embodiment of the present application.
[0203] The embodiment of the present application can divide the functional modules of the above-mentioned electronic device according to the above-mentioned method example. For example, each functional module can be divided corresponding to each function, or two or more functions can be integrated into one processing module. The above-mentioned integrated module can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiment of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation.
[0204] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0205] In the several embodiments provided in the present 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 schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0206] The units described as separate components may or may not be physically separated, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0207] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0208] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium, including several instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.
[0209] The above contents are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application shall be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
Claims
1. A performance optimization method, the method being applied to electronic equipment, characterized in that: include: 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 a 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; The first operation strategy and the second operation strategy are used to adjust the operation strategy of the CPU; the time consumed to transmit the first operation strategy through the first path is less than the time consumed to transmit the second operation strategy through the second path.
2. The method according to claim 1, characterized in that The transmitting the first operation strategy to the central processing unit (CPU) of the electronic device through the first path includes: Transmitting the first operation strategy to the CPU through a system and chip driver node; The transmitting the second operation strategy to the CPU through the second path includes: The second operation strategy is transmitted to the CPU through the Windows Management Specification interface and the dynamic tuning technology DTT driver.
3. The method according to claim 1 or 2, characterized in that: After the electronic device generates the first operation strategy, and before transmitting the first operation strategy to the central processing unit (CPU) of the electronic device through the first path, the method further includes: The electronic device adds a first flag bit to the first operation strategy, and the first flag bit matches the first operation state; The electronic device selects the first path based on the first flag bit.
4. The method according to any one of claims 1 to 3, characterized in that After the electronic device generates the second operation strategy, and before transmitting the second operation strategy to the CPU through the second path, the method further includes: The electronic device adds a second flag bit to the second operation strategy, and the second flag bit matches the second operation state; The electronic device selects the second path based on the second flag bit.
5. The method according to any one of claims 1 to 4, characterized in that The first operating state includes at least one of the following: The electronic device receives a state or a freeze state of an operation on the current focus window by a user; The electronic device detects a state in which a chip of the electronic device feeds back information about hardware performance limitation; wherein the hardware performance limitation means that the operating speed of the chip of the electronic device is limited; Furthermore, the electronic device is in a state of a performance scenario, and the performance scenario is a scenario that requires balancing the power consumption and operating performance of the electronic device.
6. The method according to any one of claims 1 to 5, characterized in that The second operating state includes a state where the electronic device is in a power consumption scenario and a state where the electronic device is in a user's preset operation on a current focus window; wherein the power consumption scenario is a scenario where the power consumption of the electronic device needs to be limited.
7. The method according to any one of claims 1 to 5, characterized in that The performance scenarios include programming scenarios, video scenarios, game scenarios, or scenarios where a file exceeding a preset file size is opened.
8. An electronic device, characterized in that: The electronic device comprises: a memory and one or more processors; The memory is used to store computer program codes, and the computer program codes include computer instructions; when the computer instructions are executed by the processor, the electronic device executes the method as described in any one of claims 1 to 7.
9. A computer-readable storage medium, characterized in that: including computer instructions; When the computer instructions are executed on an electronic device, the electronic device is caused to execute the method as claimed in any one of claims 1 to 7.
10. A computer program product, characterized in that When the computer program product is run on a computer, the computer is caused to execute the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Resource scheduling method and electronic equipment
CN110489228A
Task scheduling method and device, equipment and storage medium
CN115080212A
Resource scheduling method, electronic equipment and storage medium
CN116028210A
Resource scheduling method and device
CN116089055A
AI model calculation kernel scheduling method and device, equipment and storage medium
CN117271098A