Resource scheduling method and related apparatus

By sensing anomalies in the AI ​​performance and power consumption model and scene recognition engine through a heartbeat mechanism, and adjusting the operating strategy, the problem of lag caused by unreasonable parameters in electronic devices was solved, and a balance between performance and power consumption was achieved.

CN118981369BActive Publication Date: 2025-12-09HONOR DEVICE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410841545.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-26
Publication Date
2025-12-09
Estimated Expiration
2044-06-26

AI Technical Summary

Technical Problem

In existing technologies, unreasonable settings of operating parameters in electronic devices can lead to performance issues, stuttering, and negatively impact user experience.

Method used

The heartbeat mechanism detects whether the AI ​​performance power consumption model and scene recognition engine are abnormal, and adjusts the operation strategy to maintain stable performance and reasonable power consumption.

Benefits of technology

It reduces lag in electronic devices, improving user experience and device performance stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118981369B_ABST
    Figure CN118981369B_ABST
Patent Text Reader

Abstract

The resource scheduling method and related device provided by the embodiments of the present application relate to the technical field of terminals. The method comprises the following steps: whether an AI performance power consumption model or a scene recognition engine is abnormal can be perceived based on a heartbeat mechanism, so that the case that the AI performance power consumption model or the scene recognition engine is abnormal is processed, and the electronic device can run using appropriate running parameters, thereby reducing the case of lag.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of terminal, and in particular, to a resource scheduling method and related device. BACKGROUND

[0002] With the improvement of the performance of electronic devices, the power consumption of electronic devices is also increasing. Therefore, it is necessary to consider the performance of electronic devices and try to reduce the power consumption of electronic devices.

[0003] In some implementations, the performance of electronic devices may not be guaranteed due to unreasonable setting of operating parameters of electronic devices, thereby causing the problem of lag, which affects the user experience. SUMMARY

[0004] The resource scheduling method and related device provided by the embodiments of the present application can perceive whether the AI performance power consumption model or the scene recognition engine is abnormal based on the heartbeat mechanism, thereby processing the case where the AI performance power consumption model or the scene recognition engine is abnormal, so that the electronic device can run using appropriate operating parameters, and the case of lag can be reduced.

[0005] In a first aspect, the embodiments of the present application provide a resource scheduling method, which comprises:

[0006] obtaining system state information of an electronic device, the system state information being used to represent the hardware running condition and / or the system running condition when the electronic device operates a focus window; in a case where a first module of the electronic device perceives that a second module of the electronic device is abnormal, executing a first running strategy based on the indication of the first module; wherein the first module is used to determine the first running strategy based on the system state information, the first running strategy including parameters affecting the power consumption and the running performance of the electronic device, the second module is used to determine a second running strategy based on the system state information, the second running strategy including parameters affecting the power consumption of the electronic device; in a case where the second module perceives that the first module is abnormal, executing a third running strategy based on the indication of the second module, the third running strategy being a preset running strategy in the electronic device. In this way, the AI performance power consumption model and the scene recognition engine can perceive whether each other is abnormal, in a case where the AI performance power consumption model is abnormal, the electronic device can run based on the first running strategy issued by the scene recognition engine, in a case where the scene recognition engine is abnormal, the electronic device can run based on the third running strategy issued by the AI performance power consumption model, so that the running performance of the electronic device can be kept stable, and the power consumption is not too high, thereby reducing the case of lag.

[0007] In a possible implementation, before the third running strategy is executed based on the indication of the second module in the case that the second module perceives that the first module is running abnormally, the method further includes: delivering, by the second module, a first message to the first module; and in the case that the second module perceives that the first module is running abnormally, the third running strategy is executed based on the indication of the second module, including: in the case that the second module continuously fails to obtain a second message from the first module for N times, the third running strategy is executed based on the indication of the second module, where N is an integer greater than or equal to 2, and the second message is used to respond to the first message. The second module can determine whether the first module is running normally according to the second message returned by the first module, so that the second module can perceive whether the first module is running abnormally, and thus the second module can be processed in time when the first module is abnormal, so that the running performance of the electronic device remains stable.

[0008] In a possible implementation, the first module records a first identifier, and the first identifier is used to indicate whether the first module is running normally. In the case that the second module continuously fails to obtain the second message from the first module for N times, the third running strategy is executed based on the indication of the second module, including: in the case that the second module continuously fails to obtain the second message from the first module for N times, the second module sets the first identifier to a first value, and the first value is used to indicate that the first module is running abnormally; and the third running strategy is executed based on the indication of the second module according to the first value of the first identifier. In this way, the first identifier is used to record the running state of the first module, which facilitates determining whether the first module is running normally or abnormally, simplifies the execution process of the code in the electronic device, and improves the readability and flexibility of the code, so that the change of the running state of the first module can be expressed concisely, and the abnormal condition of the first module can be processed in time.

[0009] In a possible implementation, after the third running strategy is executed based on the indication of the second module, the method further includes: stopping the second module from working, and the stopping the second module from working includes stopping determining the second running strategy. In this way, when the second module perceives that the first module is abnormal, the second module stops working after the default running parameters are issued, which can make the electronic device run normally and stably based on the default running parameters, and on the other hand, stopping the second module from working can reduce unnecessary execution logic in the electronic device, reduce the computing power, and improve the running performance of the electronic device.

[0010] In a possible implementation, the second module delivers the first message to the first module, including: if the scenario identifier is an identifier corresponding to a power consumption scenario, the second module delivers the first message to the first module, and the first message includes the second running strategy; where the scenario identifier indicates a running scenario corresponding to a last time when the second module delivers a message to the first module, and the power consumption scenario is a running scenario aiming to reduce power consumption of the electronic device; if the scenario identifier is an identifier corresponding to a performance scenario, the second module delivers the first message to the first module, and the first message includes a preset message, where the preset message indicates that the second module is normally running; where the performance scenario is a running scenario aiming to improve running performance of the electronic device. In the case that the second module does not send the second running strategy to the first module, the second module still needs to send the preset message to the first module every preset period, so that the first module can determine that the second module is normally running based on the periodically obtained message of the second module, thereby maintaining the heartbeat connection between the first module and the second module, and enabling the first module to accurately determine the running state of the second module and reduce misjudgment.

[0011] In a possible implementation, the first module records the scenario identifier, and the method further includes: in the case that the current running scenario is switched from the power consumption scenario to the performance scenario, the first module updates the scenario identifier to an identifier corresponding to the performance scenario; the first module delivers the scenario identifier to the second module; in the case that the current running scenario is switched from the performance scenario to the power consumption scenario, the first module updates the scenario identifier to an identifier corresponding to the power consumption scenario; and the first module delivers the scenario identifier to the second module. In this way, the first module can set the scenario identifier based on the current running scenario of the electronic device, and when the first module and the second module interact with each other, the scenario identification engine can carry the scenario identifier, so that the second module can accurately determine the current running scenario of the electronic device based on the scenario identifier.

[0012] In a possible implementation, in the case that the first module of the electronic device perceives that the second module of the electronic device is running abnormally, the first running strategy is executed based on an indication of the first module, including: in the case that the first module exceeds a preset time period for N consecutive times and no first message from the second module is obtained, the first running strategy is executed based on the indication of the first module. The first module can determine whether the second module is normally running according to the first message delivered by the second module. In this way, the first module can perceive whether the second module is running abnormally, so that the first module can timely process when the second module is abnormal, for example, instructing the electronic device to execute the first running strategy, so that the running performance of the electronic device remains stable and the power consumption is not too high.

[0013] In a possible implementation, the second identifier is recorded in the first module, and the second identifier is used to indicate whether the second module is running normally. In a case where the first module exceeds the preset time period for N times continuously and the first message from the second module is not acquired, the first running strategy is executed based on the indication of the first module, including: in a case where the first module exceeds the preset time period for N times continuously and the first message from the second module is not acquired, the second identifier is set to a second value by the first module, and the second value is used to indicate that the second module is running abnormally; and the first running strategy is executed based on the indication of the first module according to the second value of the second identifier. In this way, the second identifier is used to facilitate recording of the running state of the second module, to facilitate judging whether the second module is running normally or abnormally, to simplify the execution process of the code in the electronic device, and to improve the code readability and flexibility, so that the change of the running state of the second module can be expressed concisely, and the case where the second module is abnormal can be processed in time.

[0014] In a possible implementation, the method further includes: in a case where the first module perceives that the second module is running normally, if the current running scenario belongs to a performance scenario, executing the first running strategy based on the indication of the first module; in a case where the first module perceives that the second module is running normally, if the current running scenario belongs to a power consumption scenario, and the target event does not occur in the electronic device, executing the fourth running strategy based on the indication of the first module; the fourth running strategy is a strategy that can make the power consumption of the electronic device lower among the first running strategy and the second running strategy, and the target event is an event that affects the running performance of the electronic device; in a case where the first module perceives that the second module is running normally, if the current running scenario belongs to the power consumption scenario, and the target event occurs in the electronic device, executing the fifth running strategy based on the indication of the first module; the fifth running strategy is a strategy that can make the power consumption of the electronic device higher among the first running strategy and the second running strategy. In this way, in a case where the first module perceives that the second module is running normally, different running strategies are selected according to different current running scenarios, the running parameters of the electronic device can be adjusted flexibly, and the purpose of improving the performance of the electronic device and / or reducing the power consumption of the electronic device is achieved, and the freezing of the electronic device is reduced.

[0015] In a possible implementation, the target event includes one or more of the following events: an operation event of the user on the focus window, a freezing event, or a performance limited event; wherein the operation event includes one or more of the following events: a mouse click event, a keyboard input event, or an event for switching an application. In this way, in the case where the target event occurs, it indicates that the running performance of the electronic device has been reduced, and the running performance of the electronic device needs to be quickly improved, thereby reducing freezing of the electronic device. Since the second module can be used to quickly and reasonably output the first running strategy, the first running strategy can be related to limiting power consumption and improving the running performance of the electronic device, and therefore, the electronic device can output the first running strategy by using the second module, so as to quickly improve the running performance of the electronic device and improve user experience.

[0016] In a possible implementation, before the fourth running strategy is executed based on the indication of the first module, the method further includes: delivering, by the second module, a third message to the first module, the third message including the second running strategy; and after the fourth running strategy is executed based on the indication of the first module, the method further includes: returning, by the first module, a fourth message to the second module, the fourth message being used for responding to the third message, the fourth message including part or all of the content of the fourth running strategy; and re-determining, by the second module, the second running strategy based on the fourth message and the system state information. The second module can adaptively adjust the second running strategy based on the fourth message and the system state information, that is, the second module can learn based on the execution result returned by the first module, so that the learning efficiency of the second module can be higher, and the electronic device can be in a more appropriate running state between performance and power consumption.

[0017] In a possible implementation, the system state information includes one or more of the following information: power state information, peripheral state information, process load information, audio / video state information, system load information, or system event information. Based on the system state information, the first module and the second module can respectively determine a running strategy matched with a current running scenario of the system, so that the electronic device can determine the running strategy of the electronic device based on the first module and the second module, so that the electronic device can maintain a certain running performance on the basis of reducing running power consumption.

[0018] In a second aspect, an apparatus for resource scheduling is provided. The apparatus can be an electronic device, or a chip or chip system in the electronic device. The apparatus can include a processing unit. The processing unit is configured to implement any method described in the first aspect or any possible implementation of the first aspect. When the apparatus is an electronic device, the processing unit can be a processor. The apparatus can further include a storage unit, which can be a memory. The storage unit is configured to store instructions. The processing unit executes the instructions stored in the storage unit to cause the electronic device to implement any method described in the first aspect or any possible implementation of the first aspect. When the apparatus is a chip or chip system in the electronic device, the processing unit can be a processor. The processing unit executes the instructions stored in the storage unit to cause the electronic device to implement any method described in the first aspect or any possible implementation of the first aspect. The storage unit can be a storage unit (e.g., a register, a cache, etc.) in the chip, or a storage unit (e.g., a read-only memory, a random access memory, etc.) in the electronic device and located outside the chip.

[0019] In an example, the processing unit is configured to obtain system state information of the electronic device, and execute the first running strategy based on the indication of the first module, and execute the third running strategy based on the indication of the second module.

[0020] In a possible implementation, the processing unit is configured to deliver the first message to the first module, and execute the third running strategy based on the indication of the second module if the second module fails to obtain the second message from the first module for N consecutive times.

[0021] In a possible implementation, the processing unit is configured to set the first identifier to the first value, and execute the third running strategy based on the indication of the second module according to the first value of the first identifier.

[0022] In a possible implementation, the processing unit is configured to stop the second module.

[0023] In a possible implementation, the processing unit is configured to deliver the first message to the first module if the scenario identifier is the identifier corresponding to the power consumption scenario, and the first message includes the second running strategy, and deliver the first message to the first module if the scenario identifier is the identifier corresponding to the performance scenario, and the first message includes the preset message.

[0024] In a possible implementation, the processing unit is configured to update the scene identifier to an identifier corresponding to the performance scene in a case where the current running scene is switched from the power consumption scene to the performance scene, and is further configured to deliver the scene identifier to the second module, and is specifically configured to update the scene identifier to an identifier corresponding to the power consumption scene in a case where the current running scene is switched from the performance scene to the power consumption scene, and is further configured to deliver the scene identifier from the first module to the second module.

[0025] In a possible implementation, the processing unit is configured to execute the first running strategy based on the indication of the first module in a case where the first module exceeds the preset time period for N times continuously and the first message from the second module is not acquired.

[0026] In a possible implementation, the processing unit is configured to set the second identifier to the second value, and is further configured to execute the first running strategy based on the indication of the first module according to the second value of the second identifier.

[0027] In a possible implementation, the processing unit is configured to execute the first running strategy based on the indication of the first module in a case where the first module perceives that the second module is normally running and the current running scene belongs to the performance scene, and is further configured to execute the fourth running strategy based on the indication of the first module in a case where the first module perceives that the second module is normally running and the current running scene belongs to the power consumption scene and the target event does not occur in the electronic device, and is specifically configured to execute the fifth running strategy based on the indication of the first module in a case where the first module perceives that the second module is normally running and the current running scene belongs to the power consumption scene and the target event occurs in the electronic device.

[0028] In a possible implementation, the target event includes one or more of the following events: an operation event of a user on a focus window, a freezing event, or a performance limited event.

[0029] In a possible implementation, the processing unit is configured to deliver a third message to the first module, the third message including the second running strategy, and is further configured to return a fourth message to the second module, the fourth message being used for responding to the third message, and is specifically configured to redetermine the second running strategy based on the fourth message and system state information.

[0030] In a possible implementation, the system state information includes one or more of the following information: power state information, peripheral state information, process load information, audio / video state information, system load information, or system event information.

[0031] In a third aspect, an electronic device is provided, including one or more processors and a memory coupled to the one or more processors. The memory is configured to store computer program codes including computer instructions. The one or more processors are configured to invoke the computer instructions to perform the method described in the first aspect or any possible implementation manner of the first aspect.

[0032] In a fourth aspect, a computer readable storage medium is provided, which stores computer programs or instructions. When the computer programs or instructions are run on a computer, the computer is caused to perform the method described in the first aspect or any possible implementation manner of the first aspect.

[0033] In a fifth aspect, a computer program product including computer programs is provided. When the computer programs are run on a computer, the computer is caused to perform the method described in the first aspect or any possible implementation manner of the first aspect.

[0034] In a sixth aspect, a chip or chip system is provided, which includes at least one processor and a communication interface. The communication interface and the at least one processor are interconnected by a line. The at least one processor is configured to run computer programs or instructions to perform the method described in the first aspect or any possible implementation manner of the first aspect. The communication interface in the chip can be an input / output interface, a pin or a circuit, etc.

[0035] In a possible implementation, the chip or chip system described above in the application further includes at least one memory storing instructions. The memory can be a storage unit inside the chip, such as a register, a cache, etc., or a storage unit of the chip (such as a read-only memory, a random access memory, etc.).

[0036] It should be understood that the second aspect to the sixth aspect of the application correspond to the technical solution of the first aspect of the application, and the beneficial effects obtained by each aspect and the corresponding feasible implementation manner are similar, which will not be repeated. BRIEF DESCRIPTION OF DRAWINGS

[0037] Figure 1 A schematic diagram of determining a running strategy based on an AI performance power consumption model is provided for the embodiments of the application;

[0038] Figure 2 A schematic diagram of the structure of an electronic device is provided for the embodiments of the application;

[0039] Figure 3 A schematic diagram of the software structure of an electronic device is provided for the embodiments of the application;

[0040] Figure 4 A schematic diagram of interaction between modules in a running strategy issuing process in an electronic device is provided for an embodiment of the present application;

[0041] Figure 5 A schematic diagram of an AI performance power consumption model is provided for an embodiment of the present application;

[0042] Figure 6 A schematic diagram of heartbeat interaction between an AI performance power consumption model and a scene recognition engine is provided for an embodiment of the present application;

[0043] Figure 7 A flowchart of a running strategy issuing process of an electronic device is provided for an embodiment of the present application;

[0044] Figure 8 A module interaction schematic diagram of a running strategy issuing process is provided for an embodiment of the present application;

[0045] Figure 9 A timing diagram of a module interaction process in an electronic device is provided for an embodiment of the present application;

[0046] Figure 10 A schematic diagram of a resource scheduling method is provided for an embodiment of the present application;

[0047] Figure 11 A structural schematic diagram of a chip is provided for an embodiment of the present application. DETAILED DESCRIPTION

[0048] In order to clearly describe the technical solutions of the embodiments of the present application, the following briefly introduces some terms and technologies involved in the embodiments of the present application:

[0049] 1. Power limit (PL): used to limit the power consumption of the central processing unit (CPU) of the electronic device. The level of power consumption limitation of the CPU can be represented in the form of "PL+number". Among them, "number" in "PL+number" can represent a specific level. For example, the levels of power consumption limitation of the CPU according to the number from small to large can include PL1, PL2, PL3, PL4, etc. The smaller the number, the lower the level of power consumption limitation. For ease of description, the embodiments of the present application will be described by taking PL1 and PL2 as examples hereinafter.

[0050] PL1 can be referred to as long-time turbo power consumption, or limit power value, which can represent the power consumption of the CPU under normal load, and the running power consumption of the CPU most of the time does not exceed PL1.

[0051] PL2 can also be referred to as short-term peak power consumption. It can represent the highest power consumption that the CPU can reach in a short time, or can be understood as the upper limit of the CPU performance of the electronic device. Generally, PL2 is greater than PL1.

[0052] 2. CPU energy performance preference (EPP): used to reflect the scheduling tendency of the CPU, which can range from 0 to 255. It can be understood that the smaller the CPU energy performance preference, the more the CPU tends to be high performance; the higher the CPU energy performance preference, the more the CPU tends to be low power consumption.

[0053] 3. Terms

[0054] In the embodiments of the present application, the same items or similar items with basically the same functions and effects are distinguished by using "first", "second", etc. For example, the first chip and the second chip are only used to distinguish different chips, and do not limit the order. Those skilled in the art can understand that "first", "second", etc. do not limit the number and execution order, and "first", "second", etc. also do not limit the difference.

[0055] It should be noted that in the embodiments of the present application, "exemplary" or "for example" is used to represent an example, illustration or description. Any embodiment or design scheme described as "exemplary" or "for example" in the present application should not be interpreted as more preferred or more advantageous than other embodiments or design schemes. Rather, the use of "exemplary" or "for example" is intended to present the relevant concept in a specific manner.

[0056] In the embodiments of the present application, "at least one" means one or more, and "multiple" means two or more. "And / or" describes the association between the associated objects, indicating that there can be three relationships, for example, A and / or B, which can represent the following cases: A exists alone, A and B exist together, and B exists alone, where A and B can be singular or plural. The character " / " generally represents an "or" relationship between the associated objects. "At least one of the following" or similar expressions means any combination of these items, including any combination of single item or multiple items. For example, at least one of a, b, or c, can represent a, b, c, a-b, a-c, b-c, or a-b-c, where a, b, and c can be single or multiple.

[0057] With the improvement of the performance of electronic devices, the power consumption of electronic devices is also getting higher and higher. Therefore, it is necessary to consider the performance of electronic devices and also try to reduce the power consumption of electronic devices.

[0058] In some implementations, such as Figure 1As shown, the electronic device can include an AI performance power consumption model and a scene recognition engine. The AI performance power consumption model can learn system state information, determine a running strategy that matches a current running scene of the system, and send the running strategy to a strategy fusion module. The scene recognition engine can include a scene recognition module, a strategy table, a strategy fusion module, a strategy issuing module, and the like. The scene recognition module can identify a current running scene of the electronic device, find a running strategy that matches the current running scene in the strategy table, and send the running strategy to the strategy fusion module.

[0059] The strategy fusion module can perform fusion analysis on the running strategy issued by the AI performance power consumption model and the running strategy issued by the scene recognition module, output the fused running strategy, and issue the fused running strategy to the strategy issuing module. The strategy issuing module can further control the running parameters of the electronic device. In this way, the electronic device can determine the running strategy of the electronic device based on the AI performance power consumption model and the scene recognition engine.

[0060] However, in some scenarios, if the AI performance power consumption model is abnormal, the electronic device will always use the running strategy A issued by the AI performance power consumption model last time. If the PL1 and the like in the running strategy A issued by the AI performance power consumption model last time are too low, the performance of the electronic device may not be guaranteed, and the problem of lag may occur, thereby affecting the user experience.

[0061] If the strategy fusion module is abnormal, the strategy fusion module cannot issue the fused running strategy. Therefore, the problem of lag may occur due to the fact that the PL1 and the like in the running strategy are too low, thereby affecting the user experience.

[0062] Therefore, the resource scheduling method provided by the embodiments of the present application can perceive whether the AI performance power consumption model or the scene recognition engine is abnormal based on the heartbeat mechanism, so as to handle the abnormal situation of the AI performance power consumption model or the scene recognition engine, so that the electronic device can run with appropriate running parameters, and the problem of lag can be reduced.

[0063] It can be understood that the electronic device in the embodiments of the present application can also be any form of terminal device. For example, the electronic device can include a mobile phone, a tablet computer, a palm computer, a notebook computer, a mobile internet device (MID), a wearable device, a virtual reality (VR) device, an augmented reality (AR) device, a wireless terminal in industrial control, a wireless terminal in self driving, a wireless terminal in remote medical surgery, a wireless terminal in a smart grid, a wireless terminal in transportation safety, a wireless terminal in a smart city, a wireless terminal in a smart home, a cellular phone, a cordless phone, a session initiation protocol (SIP) phone, a wireless local loop (WLL) station, a personal digital assistant (PDA), a handheld device with wireless communication function, a computing device or other processing device connected to a wireless modem, a vehicle-mounted device, a wearable device, an electronic device in a 5G network, or an electronic device in a future evolved public land mobile network (PLMN), and the like. The embodiments of the present application are not limited thereto.

[0064] By way of example and not limitation, in the embodiments of the present application, the electronic device can also be a wearable device. The wearable device can also be referred to as a wearable smart device, which is a general term for devices that are designed and developed by applying wearable technology to daily wear, such as glasses, gloves, watches, clothing, and shoes. The wearable device is a portable device that is directly worn on the body or integrated into the clothes or accessories of the user. The wearable device is not only a hardware device, but also has powerful functions through software support, data interaction, and cloud interaction. The general wearable smart device includes a device with full functions and large size, which can realize complete or partial functions without relying on a smart phone, such as a smart watch or smart glasses, and a device that focuses on a certain application function and needs to be used in cooperation with other devices, such as a smart phone, such as various smart wristbands and smart jewelry for monitoring vital signs.

[0065] In addition, in the embodiments of the present application, the electronic device can also be an electronic device in an internet of things (IoT) system. The IoT is an important part of future information technology development, and its main technical feature is to connect objects through communication technology and network, so as to realize the intelligent network of man-machine interconnection and object-object interconnection.

[0066] The electronic device in the embodiments of the present application can also be referred to as a user equipment (UE), a mobile station (MS), a mobile terminal (MT), an access terminal, a subscriber unit, a subscriber station, a mobile station, a mobile terminal, a remote station, a remote terminal, a mobile device, a user terminal, a terminal, a wireless communication device, a user agent, or a user device, etc.

[0067] In the embodiments of the present application, the electronic device or each network device includes a hardware layer, an operating system layer running on the hardware layer, and an application layer running on the operating system layer. The hardware layer includes CPU, memory management unit (MMU), memory (also known as main memory), and other hardware. The operating system can be any one or more computer operating systems that implement business processing through processes, such as Linux operating system, Unix operating system, Android operating system, iOS operating system, or windows operating system, etc. The application layer includes browser, address book, word processing software, instant messaging software, etc.

[0068] Exemplary, Figure 2 A structural schematic diagram of the electronic device is shown.

[0069] The electronic device can include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charge management module 140, a power management module 141, a battery 142, a wireless communication module 150, and a display screen 160, etc.

[0070] It can be understood that the structure shown in the embodiments of the present application does not constitute a specific limitation on the electronic device. In other embodiments of the present application, the electronic device can include more or fewer components than the diagram, or combine certain components, or split certain components, or different component arrangements. The components shown can be implemented by hardware, software, or a combination of software and hardware.

[0071] The processor 110 can include one or more processing units, for example: the processor 110 can include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Among them, different processing units can be independent devices, or can be integrated in one or more processors.

[0072] In some embodiments, the processor and the CPU can be the same component, and the processor can refer to the CPU, which is one of the core components of the electronic device, responsible for executing various instructions and processing data.

[0073] In other embodiments, the processor and the CPU can 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 not only includes the CPU, but also can include other components such as GPU, memory controller, etc.

[0074] For example, in the embodiments of the present application, the processor can obtain system state information corresponding to the current running scenario, and based on the system state information, obtain a running strategy that can guarantee a certain running performance on the basis of reducing running power consumption. The processor can adjust the running parameters of the CPU and / or GPU, etc. based on the running strategy, to reduce the running power consumption of the electronic device and improve the running performance of the electronic device.

[0075] Among them, the running scenario of the electronic device can include a video scenario, a game scenario, a social scenario, an office scenario, a browser scenario, a smart interconnection scenario, an evaluation scenario, a programming scenario, a super terminal scenario, a design software scenario, a process startup scenario, a large file opening scenario, etc.

[0076] The task corresponding to the video scene can be playing a video, and the video scene can include a video playing scene, a video browsing scene, and a video bullet screen scene. The task corresponding to the game scene can be playing a game. The task corresponding to the social scene can be voice chatting, video chatting, and typing chatting, and the social scene can include a text chatting scene, a voice chatting scene, and a video chatting scene. The task corresponding to the office scene can be editing a document, and the office scene can include a document editing scene, a document browsing scene, and a video conference scene. The task corresponding to the browser scene can be browsing a webpage, and the browser scene can include a webpage browsing scene and a video playing scene. The task corresponding to the smart interconnection scene can be sharing information after multiple electronic devices are interconnected. The task corresponding to the evaluation scene can be experimental analysis on the performance of an electronic device. The task corresponding to the programming scene can be programming. The task corresponding to the super terminal scene can be that an electronic device can operate another electronic device or multiple electronic devices. The task corresponding to the design software scene can be designing software. The task corresponding to the process startup scene can be memory management and task scheduling. The task corresponding to the large file opening scene can be opening a file with a size greater than a preset file size.

[0077] The running strategy can include various running parameters, which can be parameters related to limiting power consumption and / or parameters related to improving the running performance of the electronic device.

[0078] For example, the running strategy can include one or more of the following running parameters: PL1, PL2, EPP, emergency power off (EPO) control switch state information, CPU acceleration switch state 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 state information, CPU minimum frequency, core binding information, and memory cleaning state information.

[0079] In some embodiments, core binding can also be referred to as setting the affinity of a process or thread, which means binding a certain process or thread to run on a specific CPU core. This can improve 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 exclusively occupies the CPU core, and other processes or threads can still run on this core.

[0080] The system state information can also be referred to as running state information. The system state information can be used to represent the hardware running state and / or system running state when the electronic device operates the focus window, which can refer to a window that has a focus. The system state information can include one or more of the following: power state information, peripheral state information, process load information, audio / video state information, system load information, system event information, and the like.

[0081] The power state information can include battery power and / or power mode, etc. The battery power can also be understood as the remaining battery power, and the power mode can include alternating current (AC) and direct current (DC).

[0082] The peripheral state information can include the related information of one or more of the following events: mouse wheel sliding event, mouse clicking event, keyboard input event, microphone input event, camera input event, and the like.

[0083] The process load information can include the average value information of the CPU time proportion occupied by each process in the system. The process load information can reflect the running state of each process in the system.

[0084] The audio / video state information can include the audio / video events currently existing in the electronic device. For example, the audio / video events can include one or more of the following events: GPU decoding event, video event, video frame rate, video subtitle, and the like.

[0085] The system load information can include the information of 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 indicator reflecting the busy degree of the system.

[0086] The system event information can include one or more of the following information: window change information, system lock information, process creation information, thread creation information, and the like.

[0087] It can be understood that the system state information described above is only an example, and the system state information can also be other information used to represent the hardware running state and / or system running state when the electronic device operates the focus window, such as screen brightness, download speed, and the like, but is not limited thereto.

[0088] The interface connection relationship between the modules shown in the embodiments of the present application is only illustrative and does not constitute a limitation on the structure of the electronic device. In other embodiments of the present application, the electronic device can also use different interface connection methods or combinations of multiple interface connection methods in the above embodiments.

[0089] The software system of the electronic device described above can employ a layered architecture, an event-driven architecture, a microkernel architecture, a microservices architecture, or a cloud architecture. Embodiments of the present application exemplarily illustrate the software structure of the electronic device by taking a Windows system with a layered architecture as an example.

[0090] Figure 3 FIG. 1 is a software structure block diagram of an electronic device according to an embodiment of the present application.

[0091] The layered architecture divides the software into several layers, each of which has a clear role and division of labor. Layers communicate with each other through software interfaces. In some embodiments, the Windows system is divided into a user state and a kernel state. The user state can include an application layer and a subsystem dynamic link library. The kernel state can include, from top to bottom, an executive, a kernel and driver layer, a hardware abstraction layer (HAL), and a firmware layer, etc.

[0092] The application layer includes computer manager, office, browser, social, music, video, game, and other application programs. The application programs can include system applications and third-party applications. The application layer can also include an environment subsystem, which can display certain subsets of basic executive system services to the application programs in a specific form, providing an execution environment for the application programs. In embodiments of the present application, the application layer can also include an AI performance power consumption model and a scene recognition engine.

[0093] The AI performance power consumption model can be used to determine a running strategy, which can limit the running power consumption of the electronic device and improve the running performance of the electronic device.

[0094] The scene recognition engine can be used to identify the running scene of the electronic device, and can also determine the running strategy of the electronic device based on the current running scene.

[0095] In some implementations, the AI performance power consumption model and the scene recognition engine can be modules running in the computer manager.

[0096] The subsystem dynamic link library can include an application programming interface (API) module, which includes a Windows API, a Windows native API, and the like. The Windows API and the Windows native API can both provide system call entry and internal function support for an application, with the difference being that the Windows native API is an API native to the Windows system. For example, the Windows API can include user.dll and kernel.dll, and the Windows native API can include ntdll.dll. The user.dll is a Windows user interface interface and can be used to perform operations such as creating a window, sending a message, and the like. The kernel.dll is used to provide an application with an interface for accessing a kernel. The ntdll.dll is an important Windows NT kernel-level file. When Windows starts, the ntdll.dll resides in a specific write-protected area of memory, so that other programs cannot occupy this memory area.

[0097] The execution body can include a process manager, a power manager, a Windows Management Instrumentation (WMI), an operating system event driver (OsEventDriver) node, an operating system to system on chip (OS2SOC) driver node, and the like.

[0098] The process manager is used to create and terminate processes and threads.

[0099] The power manager is used to manage power state changes of devices that support power state changes.

[0100] The WMI is used to manage and monitor the Windows operating system and its related components. It provides a standardized interface so that applications can access system management information in the same way.

[0101] The OsEventDriver node can interact with the kernel and the driver layer, for example, interact with a graphics card driver. After determining that there is a GPU video decoding event, the OsEventDriver node can report the GPU video decoding event to the scene recognition engine.

[0102] The OS2SOC driver node can be used by the scene recognition engine to send running parameters to hardware devices.

[0103] The kernel and the driver layer include a kernel and device drivers.

[0104] The kernel is an abstraction of the processor architecture, which isolates the execution body from the differences of the processor architecture, and ensures the portability of the system. The kernel can perform thread scheduling and control, trap processing and exception management, interrupt processing, and the like.

[0105] The device drivers run in the kernel mode, and are interfaces between the I / O system and the related hardware. The device drivers can include a dynamic tuning technology (DTT) driver, an OS2SOC driver, a graphics card driver, an audio driver, a video driver, a camera driver, a keyboard driver, and the like.

[0106] The DTT can dynamically allocate power consumption between the processor and the graphics card, so as to optimize the performance of the electronic device and prolong the battery life of the electronic device, thereby improving the performance of the CPU and / or the GPU. In the embodiments of the present application, the DTT driver can send instructions to the CPU through the basic input output system (BIOS).

[0107] The HAL is a core state module, which can hide various hardware-related details, such as I / O interfaces, interrupt controllers, and multiprocessor communication mechanisms, and provides a unified service interface for different hardware platforms running Windows, so as to realize the portability on multiple hardware platforms. It should be noted that, in order to maintain the portability of Windows, the internal components of Windows and the device drivers written by the user do not directly access the hardware, but call the routines in the HAL.

[0108] The firmware layer can include the BIOS, a power control table, an ODVP policy, and the like.

[0109] The BIOS is a set of programs that are fixed into the read only memory (ROM) chip of the electronic device, which stores the programs of the basic input and output of the computer, the self-checking program after starting, and the system self-starting program, and can read and write the specific information of the system settings from the complementary metal oxide semiconductor (CMOS). The BIOS can provide the hardware settings and control for the electronic device, so that the system and the application program can access the hardware resources.

[0110] The power control table is configured with the running strategy of the hardware layer of the electronic device. It can be understood that when the chip platform of the electronic device adjusts the running parameters of the electronic device based on the running strategy issued by the upper-layer software, the strategy configured in the power control table also needs to be considered. For example, if the chip is overheated, the chip platform can preferentially adjust the running parameters of the electronic device based on the running strategy configured in the power control table.

[0111] The ODVP strategy can be understood as a strategy of the chip platform, and the ODVP strategy can be used to convert the running strategy issued by the scene recognition engine into a strategy that can be processed by the chip platform. In the embodiment of the present application, the DTT driver can read the ODVP strategy and issue it to the chip platform, so as to adjust various running parameters in the electronic device.

[0112] It should be noted that the embodiments of the present application are only exemplified by the Windows system, and in other operating systems (such as the Android system, the IOS system, etc.), as long as the functions of the various functional modules are similar to the embodiments of the present application, the scheme of the present application can also be implemented.

[0113] In combination with Figure 3 The software module schematic diagram, Figure 4 The schematic diagram of the interaction of various modules in the running strategy issuing process of the electronic device is shown.

[0114] For ease of description, the running strategy A issued by the AI performance and power consumption model in the subsequent embodiments of the present application will be referred to as the running strategy A, the running strategy issued by the scene recognition module will be referred to as the running strategy B, and the running strategy output after the fusion analysis of the strategy fusion module will be referred to as the fusion strategy.

[0115] The scene recognition module in the scene recognition engine can identify the running scene currently in the electronic device based on the system state information, find the running strategy B matched with the current running scene in the strategy table, and send the running strategy B to the strategy fusion module. It can be understood that the running strategy B can include parameters affecting the power consumption of the electronic device and the running performance of the electronic device.

[0116] For example, the scene recognition module can send a request for querying the system state information to the system probe module. The system probe module can subscribe to the kernel event to the kernel layer in response to the request, so as to determine the system state information according to the callback function fed back by the kernel layer, and report to the scene recognition module.

[0117] The system probe module can include various probes, for example, one or more of the following probes: power state probe, peripheral state probe, process load probe, audio / video state probe, system load probe, system event probe, etc. The system probe module can subscribe to the corresponding kernel event to the kernel layer respectively, so as to obtain the corresponding system state information.

[0118] The power state probe can subscribe to power state events from the kernel layer and determine power state information according to a callback function fed back by the kernel layer.

[0119] The peripheral state probe can subscribe to peripheral events from the kernel layer and determine peripheral state information according to a callback function fed back by the kernel layer.

[0120] The process load probe can subscribe to process load events from the kernel layer and determine process load information according to a callback function fed back by the kernel layer.

[0121] The system load probe can subscribe to system load events from the kernel layer and determine system load information according to a callback function fed back by the kernel layer.

[0122] The audio / video state probe can subscribe to audio / video events from the kernel layer and determine audio / video state information currently existing in the electronic device according to a callback function fed back by the kernel layer. For example, the audio / video state probe can send a request for subscribing to GPU decoding information to an OsEventDriver node of the executor, and the OsEventDriver node forwards the request to a graphics card driver of the kernel and the driver layer. After receiving the request, the graphics card driver feeds back a callback function to the audio / video state probe through the OsEventDriver node, so that the audio / video state information is obtained based on the callback function of the audio / video state probe after the GPU is monitored to be performing a decoding operation.

[0123] The system event probe can subscribe to system events from the kernel layer and determine system event information according to a callback function fed back by the kernel layer. For example, the system event probe can send a request for subscribing to process creation information to an OsEventDriver node, and the OsEventDriver node forwards the request to a 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 the system event information is obtained based on the callback function of the system event probe after a process is created. For another example, the system event probe also sends a request for subscribing to focus window change information to an API module, and the API module feeds back a callback function to the system event probe, so that it is monitored whether the focus window of the electronic device changes, and the focus window change information is obtained based on the callback function of the system event probe when the focus window is monitored to change.

[0124] As can be seen, the system probe module can obtain probe state information, i.e., system state information of the electronic device, by subscribing to various events of the electronic device from the kernel layer and then according to a callback function fed back by the kernel layer.

[0125] Further, the scene recognition module can also recognize the running scene of the electronic device based on the obtained system state information through a white list mechanism, and find the running strategy B matched with the current running scene in the strategy table, and send the running strategy B to the strategy fusion module.

[0126] For example, when the system foreground of the electronic device runs an application, the process manager can create a process of the application, and feed back a callback function to the system event probe through the OsEventDriver node, and then the scene recognition module can obtain relevant information about the process based on the system probe module, for example, the relevant information of the process includes the process name of the process and the application name corresponding to the process. For the sake of description, the application process running in the system foreground is referred to as the target process hereinafter.

[0127] In a possible implementation, the electronic device can be pre-configured with an application list, and the scene recognition module can query whether the target process is included in the application list.

[0128] For example, the application list can be as shown in Table 1. The application list can include the application name, the process name of the application, and the running scene to which the application belongs.

[0129] If the target process is included in the application list, the scene recognition module can determine the running scene to which the target process belongs. For example, if the process name of the target process is app1.exe, the scene recognition module can determine that the running scene to which the target process belongs is video. If the process name of the target process is app2.exe, the scene recognition module can determine that the running scene to which the target process belongs is office. Similarly, if the process name of the target process is app4.exe, the scene recognition module can determine that the running scene to which the target process belongs is social, and details are not described herein.

[0130] Table 1

[0131] Application name Process name Running scenario Application 1 app1.exe Video category Application 2 app2.exe Office category Application 3 app3.exe Game category Application 4 app4.exe Social category ...... ...... ......

[0132] It should be noted that Table 1 is only an example, and in fact, Table 1 can also include more or less application names, process names of applications, and running scenes to which the applications belong.

[0133] The AI performance power consumption model can obtain the running scene from the scene recognition engine, and determine the running strategy A matched with the current running scene of the system by learning the system state information, and send the running strategy A to the strategy fusion module. It can be understood that the running strategy A can include parameters affecting the power consumption of the electronic device. The specific implementation of the AI performance power consumption model can be referred to as follows Figure 5 The related description in the corresponding embodiment is not described herein.

[0134] The policy fusion module performs fusion analysis on the running policy A and the running policy B to obtain a fusion policy that can maintain certain running performance on the basis of reducing running power consumption. The policy fusion module can also distribute the fusion policy to the first scheduling engine. In turn, the first scheduling engine can distribute the fusion policy to modules related to the chip platform.

[0135] For example, after the first scheduling engine obtains the fusion policy, it can distribute an instruction to the CPU through the power manager and the BIOS, and the instruction can carry the running parameter 1 in the fusion policy. The first scheduling engine can also distribute an instruction to the DTT driver through WMI, and the instruction can carry the running parameter 2 in the fusion policy. The DTT driver can distribute the received instruction to the CPU through the BIOS. The running parameter 1 and the running parameter 2 can be different running parameters in the fusion policy.

[0136] In some scenarios, the AI performance power consumption model can distribute the running policy A to the second scheduling engine. The second scheduling engine can distribute an instruction to the CPU through the OS2SOC driver node, and the instruction carries the running parameter 3 in the running policy A.

[0137] It can be understood that the first scheduling engine and the second scheduling engine can be two different scheduling engines, and the first scheduling engine and the second scheduling engine can also be understood as two different threads or processes. The first scheduling engine and the second scheduling engine can also be the same scheduling engine, and the instructions distributed in the same thread or process can carry the running parameter 1, the running parameter 2 and / or the running parameter 3 in the running policy, wherein the running parameter 1, the running parameter 2 and the running parameter 3 can be different running parameters in the running policy. In different embodiments, the first scheduling engine and the second scheduling engine can be the same or different, and the embodiments of the present application are not limited.

[0138] Figure 5 A schematic diagram of an AI performance power consumption model in an electronic device is shown.

[0139] The AI performance power consumption model can include (5.1) a perception middle station, (5.2) a learning middle station, and (5.3) a decision-making middle station.

[0140] (5.1) Perception Middle Station

[0141] The perception middle station can include a data center, a fence module, a snapshot module, and a meta-capability acquisition module, etc.

[0142] In a possible implementation, the meta-capability obtaining module can send a request for querying system state information to a system probe module of the scene recognition engine, and the system probe module can report the system state information to the meta-capability obtaining module in response to the request. The system probe module can include various probes, and details can be referred to Figure 4 The related description of the system probe module in the corresponding embodiments will not be repeated. For example, the meta-capability obtaining module can obtain power state information through a power state probe, obtain peripheral state information through a peripheral state probe, obtain process load information through a process load probe, obtain audio / video state information through an audio / video state probe, obtain system load information through a system load probe, obtain system event information through a system event probe, and so on.

[0143] The meta-capability obtaining module can send the system state information to the data center for storage. The meta-capability obtaining module can also be configured to determine the first event or the second event, and after obtaining the first event or the second event, the meta-capability obtaining module can send the first event or the second event to the fence module, so that the fence module can trigger the decision hub to obtain the system state information from the perception hub using the first event or the second event. The meta-capability obtaining module can also send the system state information corresponding to the current running scene to the snapshot module, so that the decision hub can quickly obtain the system state information corresponding to the current running scene from the snapshot module.

[0144] The first event is an event that affects the running performance of the electronic device. The first event can be used to trigger the electronic device to use the running strategy A determined by the AI performance power consumption model.

[0145] The first event can include one or more of the following events: a user operation event on the current focus window, a freezing event, a performance limited event, or a performance power consumption model training event, and so on. The operation event can include one or more of a mouse click event, a keyboard input event, or an operation event for switching applications. The performance limited event is an event in which the hardware performance feedback by the hardware of the electronic device is limited. The hardware performance limitation can be that the running speed of the chip of the electronic device is limited. In some embodiments, the performance limited event can also be referred to as a chip performance limited event.

[0146] The second event is an event that affects the power consumption of the electronic device. The second event can also include an event generated by the electronic device after the user uses the electronic device, and the event generally does not affect the running performance of the electronic device, but affects the power consumption of the electronic device. For example, the second event can be a focus window size change, a CPU / GPU / network usage rate change, an AC or DC mode conversion, a PL1 setting not taking effect, and the power of the electronic device being less than a preset value.

[0147] It can be understood that if the electronic device occurs the first event, the decision middle station can determine the running strategy A by calling the performance power consumption model, and issue the running strategy A to the scheduling engine, so that the electronic device runs according to the running strategy A. If the electronic device occurs the second event, the decision middle station can determine the running strategy A by calling the performance power consumption model, and send the running strategy A to the scene recognition engine, and then the scene recognition engine can compare the running strategy A and the running strategy B, and issue the fused strategy after comparison to the scheduling engine, so that the electronic device runs according to the fused strategy. Wherein, the scheduling engine can be Figure 4 The first scheduling engine or the second scheduling engine in the corresponding embodiment.

[0148] (5.2) Learning middle station.

[0149] The perception middle station can send the system state information to the learning middle station. The learning middle station can train the performance power consumption model by using the system state information. The performance power consumption model can be used to represent the mapping relationship between the system state information of the running scene and the running strategy.

[0150] (5.3) Decision middle station.

[0151] In a possible implementation, the decision middle station can issue the running strategy A to the scheduling engine.

[0152] For example, the perception middle station can determine the first event. In response to the first event, the perception middle station can trigger the decision middle station to obtain the system state information from the perception middle station.

[0153] The decision middle station can obtain the system state information from the perception middle station under the trigger of the first event. The decision middle station can also call the performance power consumption model trained by the learning middle station, input the system state information into the trained performance power consumption model, obtain the running strategy A, and issue the running strategy A to the scheduling engine.

[0154] The scheduling engine can schedule based on the running strategy A, so as to control the running parameters of the electronic device. For example, the scheduling engine can send an instruction to the CPU through the OS2SOC drive node, and the instruction carries the running parameter 3 in the running strategy A, so that the electronic device can maintain a certain running performance on the basis of reducing the running power consumption.

[0155] It can be understood that in the case of the first event, it is indicated that the running performance of the electronic device has been reduced, and the running performance of the electronic device needs to be quickly improved, so as to reduce the freezing of the electronic device. Since the performance power consumption model can be used to quickly and reasonably output the running strategy A, which can be related to limiting power consumption and improving the running performance of the electronic device, the electronic device can output the running strategy A by using the performance power consumption model, so as to quickly improve the running performance of the electronic device and improve the user experience.

[0156] In another possible implementation, the decision middle station can send the running strategy A to the scene recognition engine.

[0157] For example, the perception middle station can determine the second event. In response to the second event, the perception middle station can trigger the decision middle station to obtain the system state information from the perception middle station.

[0158] The decision middle station can send the running strategy A to the scene recognition engine under the triggering of the second event. The running strategy A can include the current running scene, the running strategy corresponding to the current running scene determined by the decision middle station by calling the performance power consumption model, and performance power consumption model forced information. The performance power consumption model forced information can include forced degree information of the performance power consumption model call and a forced reason. For example, the forced degree information of the performance power consumption model call is to compare the running strategies obtained in two ways, and the forced reason is the triggering of the second event.

[0159] The scene recognition engine can obtain a fused strategy after comparison by comparing the running strategy A and the running strategy B, and send the fused strategy to the scheduling engine.

[0160] The scheduling engine can perform scheduling based on the fused strategy, so as to control the electronic device. For example, the scheduling engine can send an instruction to the CPU through the power manager and the BIOS, and the instruction carries the running parameter 1 in the fused strategy. The scheduling engine can also send an instruction to the Intel DTT driver through the WMI, and the instruction carries the running parameter 2 in the fused strategy, so that the electronic device can maintain a certain running performance on the basis of reducing the running power consumption.

[0161] It can be understood that since the strategy output by the AI performance power consumption model is more inclined to reduce the power consumption of the electronic device and improve the endurance of the electronic device, if the scene recognition module identifies that the current running scene of the electronic device is a performance scene, it means that the current electronic device has a higher requirement for the running performance, and the strategy fusion module can preferentially consider the running strategy B output by the scene recognition module and send the running strategy B to the system. The performance scene can be understood as a running scene that considers the running performance of the electronic device while reducing the power consumption of the electronic device, for example, a programming scene, a video scene, a game scene, a large file opening scene, etc.

[0162] In addition, compared with the strategy output by the scene recognition module, the strategy output by the AI performance power consumption model is more refined. For example, the scene recognition module identifies that the current scene is a browser scene, and the scene recognition module can query the strategy corresponding to the browser scene from the strategy table. Assuming that the strategy table is configured with 3 grades of browser scene corresponding strategies, including PL1 of 45W corresponding to light load, PL1 of 15W corresponding to medium load, and PL1 of 9W corresponding to heavy load, the running strategy B issued by the scene recognition module can only be 45W, 15W or 9W. The running strategy A output by the AI performance power consumption model can set the PL1 with finer granularity. Assuming that the AI performance power consumption model can set the PL1 with an adjustment granularity of 1W, for example, the PL1 can be set to 9W, 8W, 7W, 6W, etc.

[0163] Therefore, if the scene recognition module identifies that the current running scene of the system is a power consumption scene, it means that the current electronic device has relatively low requirements on running performance, and the strategy fusion module can issue the running strategy A to the scheduling engine, thereby improving the adjustment accuracy of the running parameter. The power consumption scene can be understood as a running scene mainly for the purpose of reducing the power consumption of the electronic device, such as an office scene, a social scene, etc.

[0164] Figure 6 A schematic diagram of heartbeat interaction between the AI performance power consumption model and the scene recognition engine is shown.

[0165] The AI performance power consumption model and the scene recognition engine can communicate based on inter process communication (IPC) messages, thereby establishing a heartbeat mechanism.

[0166] The AI performance power consumption model can time through a first timer, and send a running strategy A to the scene recognition engine every preset period. The period of the first timer is the preset period. The scene recognition engine can time through a second timer, and detect whether the running strategy A can be obtained every preset period. The period of the second timer can also be the preset period. The preset period can be pre-set by the electronic device, for example, the preset period can include 3 seconds (s), and the specific value of the preset period is not limited in the embodiments of the present application.

[0167] After the scene recognition engine obtains the running strategy A, the scene recognition engine can perform fusion analysis on the running strategy A and the running strategy B to obtain a fusion strategy, and send the fusion strategy to the scheduling engine; the scene recognition engine can also return an execution result to the AI performance power consumption model. The execution result can include information in the fusion strategy, and the fusion strategy can include running scene and running parameter information. In a possible implementation, the running parameter can be represented in the form of a key-value pair, for example, can include an identifier of PL1 and a value corresponding to the PL1, an identifier of EPP and a value corresponding to the EPP, and the like.

[0168] It can be understood that, in a case where the running scene is a performance scene, the AI performance power consumption model can not send the running strategy A to the scene recognition engine, but the AI performance power consumption model still needs to send a preset message to the scene recognition engine every preset period, which can be used to indicate that the AI performance power consumption model is running normally, or can be used to indicate that the AI performance power consumption model does not send the running strategy A, or can be used to indicate that the scene recognition engine does not need to consider the running strategy A when sending the running strategy, and the like. After the scene recognition engine sends the running strategy B, the scene recognition engine can still return an execution result to the AI performance power consumption model, to indicate that the scene recognition engine is running normally.

[0169] In this way, the scene recognition engine can periodically obtain the running strategy A or the preset message of the AI performance power consumption model, and determine whether the AI performance power consumption model is running normally according to a period of obtaining the running strategy A or the preset message, that is, the scene recognition engine can perceive whether the AI performance power consumption model is running abnormally. The AI performance power consumption model can also determine whether the scene recognition engine is running normally according to the execution result returned by the scene recognition engine, that is, the AI performance power consumption model can perceive whether the scene recognition engine is running abnormally.

[0170] Based on this, the scene recognition engine and the AI performance power consumption model can perceive whether the other is running normally, so that when the scene recognition engine or the AI performance power consumption model appears an abnormal condition, the scene recognition engine or the AI performance power consumption model can be processed in time, so that the running performance of the electronic device remains stable, and the power consumption is not too high.

[0171] In addition, the AI performance power consumption model can also adaptively adjust the running strategy A according to the execution result returned by the scene recognition engine. For example, assuming that the PL1 in the running strategy A sent by the AI performance power consumption model is set to 10W, but the PL1 in the execution result returned by the scene recognition engine is 9W, then the AI performance power consumption model will not repeatedly set the PL1 to 9W next time when sending the running strategy A, and the AI performance power consumption model can set the PL1 to 8W or a lower value. That is, the AI performance power consumption model can learn based on the execution result returned by the scene recognition engine, so that the learning efficiency of the AI performance power consumption model is higher, and the electronic device can be in a more appropriate running state between performance and power consumption.

[0172] Exemplarily, Figure 7 A flowchart of the electronic device issuing a running strategy is shown. The flowchart can include (7.1) initialization of a heartbeat flag, (7.2) a scene recognition branch, (7.3) an AI performance power consumption model branch, (7.4) updating of the heartbeat flag, (7.5) fusion decision of the strategy, (7.6) issuing and execution of the strategy.

[0173] (7.1) Initialization of the heartbeat flag.

[0174] In order to better record whether the AI performance power consumption model and the scene recognition engine are running normally, the electronic device can record the heartbeat flag AIHeartFlag of the AI performance power consumption model and the heartbeat flag TurboHeartFlag of the scene recognition engine based on the heartbeat connection established between the AI performance power consumption model and the scene recognition engine.

[0175] In a possible implementation, the scene recognition engine can record the heartbeat flag AIHeartFlag of the AI performance power consumption model and initialize it, for example, the heartbeat flag AIHeartFlag can be initialized to 1. The AI performance power consumption model can record the heartbeat flag TurboHeartFlag of the scene recognition engine and initialize it, for example, the heartbeat flag TurboHeartFlag can be initialized to 1.

[0176] It can be understood that the heartbeat flag of the AI performance power consumption model and the heartbeat flag of the scene recognition engine can also be represented by other fields respectively, and the heartbeat flag AIHeartFlag and the heartbeat flag TurboHeartFlag can also be initialized to other values respectively, which are not limited by the embodiments of the application. For ease of description, the initial values of the heartbeat flag AIHeartFlag and the heartbeat flag TurboHeartFlag are both taken as 1 in the following description.

[0177] (7.2) Scene recognition branch.

[0178] In a possible implementation, in the policy table of the scene recognition engine, different running scenes can correspond to respective policy identifiers tendency, and the scene recognition module can acquire the corresponding policy identifier tendency based on the running scene in which the electronic device is currently located.

[0179] For example, if the running scene in which the electronic device is currently located is the power consumption scene, the corresponding policy identifier tendency can be 0; if the running scene in which the electronic device is currently located is the performance scene, the corresponding policy identifier tendency can be 1. The value of the policy identifier tendency can be set by the electronic device in the policy table in advance, and the policy identifier tendency can also have other values, which are not limited by the embodiments of the present application.

[0180] It can be understood that when the policy identifier tendency is 0, it indicates that the electronic device is currently in the power consumption scene, and the scene recognition engine can comprehensively consider the running strategy A and the running strategy B to output the fusion strategy. When the policy identifier tendency is 1, it indicates that the electronic device is currently in the performance scene, and since the strategy output by the AI performance power consumption model is more inclined to reduce the power consumption of the electronic device, the scene recognition engine can preferentially adopt the running strategy B, wherein the running strategy B can include parameters affecting the power consumption of the electronic device and parameters affecting the running performance of the electronic device.

[0181] (7.3) AI performance power consumption model branch.

[0182] The AI performance power consumption model can output the running strategy A by learning the system state information. The running strategy A can include parameters affecting the power consumption of the electronic device. The AI performance power consumption model can also send the running strategy A to the scene recognition engine through the IPC message.

[0183] (7.4) Update of the heartbeat flag.

[0184] It can be understood that the electronic device can update the value of the heartbeat flag AIHeartFlag when the AI performance power consumption model is running abnormally, and the electronic device can also update the value of the heartbeat flag TurboHeartFlag when the scene recognition engine is running abnormally.

[0185] For example, the scene recognition engine can detect whether the running strategy A can be obtained every preset period. If the scene recognition engine can obtain the running strategy A or the preset message every preset period, it indicates that the AI performance power consumption model is running normally. If the scene recognition engine does not obtain the running strategy A or the preset message in the preset period, the scene recognition engine can accumulate a first count value, which can be used to represent the number of times that the running strategy A or the preset message is not obtained continuously. If the first count value reaches a first preset number of times, it indicates that the AI performance power consumption model may have a running exception. At this time, the scene recognition engine can set the heartbeat flag AIHeartFlag of the AI performance power consumption model to 0.

[0186] The initial value of the first count value can be pre-set by the electronic device, for example, the initial value of the first count value can be 0, or other values. The first preset number of times can be pre-set by the electronic device, for example, the first preset number of times can be 3 times, or other values. The initial value of the first count value and the value of the first preset number of times are not limited by the embodiments of the present application. For ease of description, the initial value of the first count value is 0 and the first preset number of times is 3 times are taken as examples for description.

[0187] It can be understood that in the case that the scene recognition engine can obtain the running strategy A or the preset message every preset period, the scene recognition engine can set the first count value to 0, or the scene recognition engine can judge whether the current first count value is 0. If the first count value is 0, it is not necessary to set. If the first count value is not 0, the first count value is set to 0. The scene recognition engine can also set the heartbeat flag AIHeartFlag to 1, or the scene recognition engine can judge whether the current heartbeat flag AIHeartFlag is 1. If the first count value is 1, it is not necessary to set. If the heartbeat flag AIHeartFlag is not 1, the heartbeat flag AIHeartFlag is set to 1.

[0188] After the AI performance power consumption model sends the running strategy A or the preset message to the scene recognition engine, the AI performance power consumption model can detect whether the scene recognition engine returns the execution result. If the AI performance power consumption model detects that the scene recognition engine can return the execution result, it indicates that the scene recognition engine is running normally. If the AI performance power consumption model detects that the scene recognition engine does not return the execution result, the AI performance power consumption model can accumulate a second count value, which can be used to represent the number of times that the scene recognition engine does not return the execution result continuously. If the second count value reaches a second preset number of times, it indicates that the scene recognition engine may have a running exception. At this time, the AI performance power consumption model can set the heartbeat flag TurboHeartFlag of the scene recognition engine to 0.

[0189] The initial value of the second count value can be pre-set by the electronic device, for example, the initial value of the second count value can be 0, or other values; the second preset number of times can be pre-set by the electronic device, for example, the second preset number of times can include 3 times, or other values, the first preset number of times and the second preset number of times can be the same or different, and the initial value of the second count value and the value of the second preset number of times are not limited in the embodiments of the present application. For ease of description, the initial value of the second count value is 0 and the second preset number of times is 3 times in the following description.

[0190] It can be understood that in the case that the AI performance power consumption model can detect the execution result returned by the scene recognition engine, the AI performance power consumption model can set the second count value to 0, or the AI performance power consumption model can judge whether the current second count value is 0, if the second count value is 0, it is not necessary to set, if the second count value is not 0, the second count value is set to 0. The AI performance power consumption model can also set the heartbeat flag TurboHeartFlag to 1, or the AI performance power consumption model can judge whether the current heartbeat flag TurboHeartFlag is 1, if the second count value is 1, it is not necessary to set, if the heartbeat flag TurboHeartFlag is not 1, the heartbeat flag TurboHeartFlag is set to 1.

[0191] (7.5) Fusion decision of the strategy.

[0192] In the embodiments of the present application, according to different values of the heartbeat flag AIHeartFlag, the heartbeat flag TurboHeartFlag and the strategy identifier tendency, the electronic device can have different running strategies.

[0193] Case 1: The heartbeat flag TurboHeartFlag is equal to 0.

[0194] When the AI performance power consumption model sends the running strategy A, if it is judged that the heartbeat flag TurboHeartFlag is equal to 0, it indicates that the scene recognition engine may have running abnormity, the AI performance power consumption model can perceive the abnormity of the scene recognition engine, and further judge whether each running parameter in the current electronic device is the default running parameter.

[0195] If each running parameter in the current electronic device is the default running parameter, the AI performance power consumption model can stop working. The default running parameter can be pre-set by the electronic device, and the default values of each parameter in the default running parameter are not limited in the embodiments of the present application.

[0196] If each running parameter in the current electronic device is not the default running parameter, the AI performance power consumption model can set each running parameter in the electronic device to the default running parameter through the scheduling engine. After the default running parameter is issued to the scheduling engine, the AI performance power consumption model can stop working.

[0197] In the embodiments of the present application, the stop working of the AI performance power consumption model can be understood as that the AI performance power consumption model does not execute learning logic and does not send the running strategy A, but the process corresponding to the AI performance power consumption model can continue to run.

[0198] In this way, when the AI performance power consumption model perceives that the scene recognition engine is abnormal, the AI performance power consumption model stops working after issuing the default running parameter. On the one hand, the electronic device can make the electronic device normally and stably run based on the default running parameter. On the other hand, the stop working of the AI performance power consumption model can reduce unnecessary execution logic in the electronic device, reduce computing power, and improve the running performance of the electronic device.

[0199] Case 2: the heartbeat flag TurboHeartFlag is equal to 1, and the strategy identifier lastStrategy tendency corresponding to the last time when the scene recognition engine issues the fusion strategy is equal to 0.

[0200] In the embodiments of the present application, the strategy identifier lastStrategy tendency corresponding to the last time when the scene recognition engine issues the fusion strategy can also be referred to as the last strategy identifier lastStrategy tendency.

[0201] It can be understood that during the running of the electronic device, when the scene recognition engine detects that the current running scene changes, for example, from the power consumption scene to the performance scene, or from the performance scene to the power consumption scene, the scene recognition engine can update the strategy identifier tendency. For example, if the current running scene changes from the power consumption scene to the performance scene, the scene recognition engine can set the strategy identifier tendency to 1; if the current running scene changes from the power consumption scene to the power consumption scene, the scene recognition engine can set the strategy identifier tendency to 0.

[0202] When the value of the strategy identification tendency changes, the scene recognition engine can update the value of the last strategy identification lastStrategy tendency to the value of the changed strategy identification tendency. When the scene recognition engine interacts with the AI performance power consumption model, the scene recognition engine can carry the last strategy identification lastStrategy tendency, so that the AI performance power consumption model can accurately determine the current running scene of the electronic device based on the lastStrategy tendency.

[0203] For example, when the AI performance power consumption model sends the running strategy A, if it is determined that the heartbeat flag TurboHeartFlag is equal to 1, indicating that the scene recognition engine is running normally, the AI performance power consumption model can further determine the last strategy identification lastStrategy tendency.

[0204] If the last strategy identification lastStrategy tendency is equal to 0, it indicates that the current running scene is a power consumption scene, and the power consumption scene has not exited, that is, from the time when the last strategy identification lastStrategy tendency is set to 0 to the current time, the electronic device has been maintained in the power consumption scene. Therefore, the AI performance power consumption model can send the running strategy A to the scene recognition engine, and then the scene recognition engine can perform fusion analysis based on the running strategy A and the running strategy B to obtain a fusion strategy, and send the fusion strategy to the scheduling engine.

[0205] If the last strategy identification lastStrategy tendency is equal to 1, it indicates that the current running scene is a performance scene, and the performance scene has not exited, that is, from the time when the last strategy identification lastStrategy tendency is set to 1 to the current time, the electronic device has been maintained in the performance scene. Therefore, the AI performance power consumption model can not send the running strategy A to the scene recognition engine. The scene recognition engine can send the running strategy B to the scheduling engine.

[0206] It should be noted that in the case that the last strategy tendency is equal to 1 and the AI performance power consumption model does not send the running strategy A to the scene recognition engine, the AI performance power consumption model still needs to send a preset message to the scene recognition engine every preset period. The preset message can be used to indicate that the AI performance power consumption model is running normally, or can be used to indicate that the AI performance power consumption model does not send the running strategy A, or can be used to indicate that the scene recognition engine does not need to consider the running strategy A when issuing the running strategy. After the scene recognition engine issues the running strategy B, the scene recognition engine can still return an execution result to the AI performance power consumption model, which is used to indicate that the scene recognition engine is running normally, and the AI performance power consumption model can also learn based on the execution result.

[0207] Case 3: The heartbeat flag AIHeartFlag is equal to 1, and the strategy tendency is equal to 1.

[0208] If the scene recognition engine judges that the heartbeat flag AIHeartFlag is equal to 1, it indicates that the AI performance power consumption model is running normally. At this time, the scene recognition engine can determine the current running scene according to the current strategy tendency tendency.

[0209] If the current strategy tendency tendency is equal to 1, it indicates that the current running scene is a performance scene. Since the strategy output by the AI performance power consumption model is more inclined to reduce the power consumption of the electronic device, the scene recognition engine can preferentially select the running strategy B, thereby improving the performance of the electronic device.

[0210] If the current strategy tendency tendency is equal to 0, it indicates that the current running scene is a power consumption scene. The scene recognition engine can then perform fusion analysis on the running strategy A and the running strategy B to obtain a fusion strategy and issue it to the scheduling engine.

[0211] In one possible implementation, if tendency is equal to 0 and the first event does not occur in the electronic device, the scene recognition engine can select the strategy that can make the power consumption of the electronic device lower in the running strategy A and the running strategy B as the fusion strategy and issue it to the scheduling engine. In this way, when an event that affects the running performance of the electronic device does not occur, a running strategy with lower power consumption can be used, thereby reducing the power consumption of the electronic device.

[0212] In another possible implementation, if the tendency is equal to 0 and the first event occurs in the electronic device, the scene recognition engine can select the running strategy that can make the power consumption of the electronic device higher between the running strategy A and the running strategy B as the fusion strategy, and deliver the running strategy to the scheduling engine. In this way, when the event that affects the running performance of the electronic device occurs, the running strategy with higher power consumption can be used, so that the performance of the electronic device can be appropriately improved, and the freezing of the electronic device can be reduced.

[0213] It can be understood that in the case where the first event occurs, it indicates that the running performance of the electronic device has been reduced, and the running performance of the electronic device needs to be quickly improved, so as to reduce the freezing of the electronic device. Since the AI performance power consumption model can be used to quickly and reasonably output the running strategy A, which can be related to limiting power consumption and improving the running performance of the electronic device, the electronic device can output the running strategy A by using the AI performance power consumption model, so as to quickly improve the running performance of the electronic device and improve the user experience.

[0214] Case 4: The heartbeat flag AIHeartFlag is equal to 0, and the strategy identifier tendency is equal to 0 or 1.

[0215] If the scene recognition engine judges that the heartbeat flag AIHeartFlag is equal to 0, it indicates that the AI performance power consumption model may run abnormally, and the scene recognition engine can perceive the abnormality of the AI performance power consumption model. At this time, no matter whether the current strategy identifier tendency is 0 or 1, the scene recognition engine selects the running strategy B sent by the scene recognition module. That is, when the AI performance power consumption model runs abnormally, no matter whether it is a power consumption scene or a performance scene, the scene recognition engine selects the running strategy B sent by the scene recognition module.

[0216] In this way, in the case where the scene recognition engine perceives that the AI performance power consumption model runs abnormally, the scene recognition engine still has the ability to adjust the running strategy according to the running scene, so that in the power consumption scene, the electronic device will not always use the running strategy A last issued by the AI performance power consumption model. Further, when the PL1 and other parameters in the running strategy A last issued by the AI performance power consumption model are set too low, the scene recognition engine can issue the running strategy B to the scheduling engine, so that the performance of the electronic device can be in a stable state, the freezing condition can be reduced, and the user experience can be improved.

[0217] It can be understood that after the AI performance power consumption model runs abnormally, the AI performance power consumption model can be re-run when the electronic device is restarted next time, or the AI performance power consumption model can be triggered to run by the scene recognition engine as needed, or the AI performance power consumption model can be started to run after a period of time. The timing of starting the AI performance power consumption model to run is not limited in the embodiments of the present application.

[0218] (7.6) Running strategy issuing and execution.

[0219] As shown in Figure 8 , in a possible implementation, the scene recognition engine can issue the running strategy to the BIOS of the firmware layer through the interface of the WMI service, the BIOS can send the corresponding ODVP strategy to the DTT driver, the DTT driver can issue the ODVP strategy to the chip platform, and finally write the ODVP strategy into the hardware to take effect.

[0220] Figure 9 A timing diagram showing the interaction process of each module in the electronic device is shown. The interaction process can include (9.1) the process of heartbeat flag initialization, (9.2) the process of heartbeat message interaction, and (9.3) the process of exception detection.

[0221] (9.1) The process of heartbeat flag initialization.

[0222] The AI performance power consumption model of the electronic device can initialize the heartbeat flag TurboHeartFlag of the scene recognition engine to 1; the scene recognition engine of the electronic device can initialize the heartbeat flag AIHeartFlag of the AI performance power consumption model to 1. For details of the initialization process of the heartbeat flag, refer to Figure 7 the related description in (7.1) the initialization of the heartbeat flag of the corresponding embodiment, which will not be repeated here.

[0223] (9.2) The process of heartbeat message interaction.

[0224] The scene recognition module in the scene recognition engine can identify the running scene in which the electronic device is currently located, and find the running strategy B matched with the current running scene in the strategy table, and send the running strategy B to the strategy fusion module. For details of the process of identifying the running scene by the scene recognition engine and sending the running strategy B by the scene recognition engine, refer to Figure 4 the related description in the corresponding embodiment, which will not be repeated here.

[0225] The AI performance power consumption model can obtain the running scene from the scene recognition engine, and learn the system state information through the performance power consumption model, determine the running strategy A matched with the current running scene of the system, and send the running strategy A to the strategy fusion module. For details of the specific implementation of the performance power consumption model learning, refer to Figure 5 the related description in the corresponding embodiment, which will not be repeated here.

[0226] The policy fusion module performs fusion analysis on the running policy A and the running policy B to obtain a fusion policy that can maintain certain running performance on the basis of reducing running power consumption. The policy fusion module can also issue the fusion policy to the scheduling engine. The scheduling engine can then schedule the running parameters of the electronic device based on the fusion policy.

[0227] It can be understood that the AI performance power consumption model can periodically send the running policy A to the scene recognition engine. The scene recognition engine can determine whether the AI performance power consumption model is normally running according to the period of obtaining the running policy A. The scene recognition engine can issue the fusion policy to the scheduling engine and can also return the execution result to the AI performance power consumption model. The AI performance power consumption model can determine whether the scene recognition engine is normally running according to the execution result returned by the scene recognition engine, and can also perform model learning based on the execution result. The specific process of perceiving whether the other is normally running, and the process of performing model learning based on the execution result, can be referred to the description of the corresponding embodiments, which will not be repeated here. Figure 6

[0228] It can be understood that the process of the AI performance power consumption model sending the running policy A to the policy fusion module in (9.2) and the process of the scene recognition module sending the running policy B to the policy fusion module can not distinguish the execution order. The AI performance power consumption model sending the running policy A and the scene recognition module sending the running policy B can be executed in parallel, and the process of the AI performance power consumption model sending the running policy A can also be earlier or later than the process of the scene recognition module sending the running policy B, which is not limited by the embodiments of the present application. In addition, the flow of the heartbeat message interaction in (9.2) only represents the execution flow of one time, and in fact can represent multiple executions.

[0229] (9.3) Abnormal detection flow.

[0230] The AI performance power consumption model can detect whether the scene recognition engine is running abnormally according to the heartbeat flag TurboHeartFlag and the value of the last strategy identification lastStrategy tendency. If the scene recognition engine is running abnormally, the AI performance power consumption model can make corresponding processing, so that the electronic device can stably run.

[0231] For example, if the AI performance power consumption model determines that TurboHeartFlag is equal to 1, indicating that the scene recognition engine is normally running, the AI performance power consumption model can further determine the value of the last strategy identification lastStrategy tendency.

[0232] ​If the last strategy tendency lastStrategy tendency is equal to 0, it indicates that the current running scenario is a power consumption scenario, and the AI performance and power consumption model can send a running strategy A to the scenario identification engine. If the last strategy tendency lastStrategy tendency is equal to 1, it indicates that the current running scenario is a performance scenario, and the AI performance and power consumption model can not send a running strategy A to the scenario identification engine, but send a preset message.

[0233] For the case where TurboHeartFlag is equal to 1, and the judgment process of the last strategy tendency lastStrategy tendency, please refer to Figure 7 The related description of case 2 in the fusion decision of the (7.5) strategy of the corresponding embodiment will not be repeated.

[0234] If the AI performance and power consumption model judges that TurboHeartFlag is equal to 0, it indicates that the scenario identification engine may have a running exception, and the AI performance and power consumption model can further judge whether each running parameter in the electronic device is a default running parameter.

[0235] If each running parameter in the electronic device is a default running parameter, the AI performance and power consumption model can stop working. If each running parameter in the electronic device is not a default running parameter, the AI performance and power consumption model can set each running parameter in the electronic device to a default running parameter through the scheduling engine. After issuing the default running parameter to the scheduling engine, the AI performance and power consumption model can stop working.

[0236] For the case where TurboHeartFlag is equal to 0, please refer to Figure 7 The related description of case 1 in the fusion decision of the (7.5) strategy of the corresponding embodiment will not be repeated.

[0237] The scenario identification engine can detect whether the AI performance and power consumption model runs abnormally according to the value of the heartbeat flag AIHeartFlag and the strategy tendency tendency. If the AI performance and power consumption model runs abnormally, the scenario identification engine can make corresponding processing, so that the electronic device can run stably.

[0238] For example, if the scenario identification engine judges that the heartbeat flag AIHeartFlag is equal to 0, it indicates that the AI performance and power consumption model may have a running exception. At this time, no matter whether the current strategy tendency tendency is 0 or 1, the scenario identification engine issues a running strategy B to the scheduling engine.

[0239] For the case where AIHeartFlag is equal to 0, please refer to Figure 7The relevant description of case 4 in the fusion decision of strategy (7.5) in the corresponding embodiment will not be repeated.

[0240] If the scene recognition engine determines that the AIHeartFlag heartbeat flag is equal to 1, it means that the AI ​​performance power consumption model is running normally. At this time, the scene recognition engine can determine the current running scene based on the policy flag tendency.

[0241] If the policy flag `tendency` equals 1, it indicates that the current operating scenario is a performance scenario. The scenario recognition engine can prioritize running policy B and send it to the scheduling engine. If the policy flag `tendency` equals 0, it indicates that the current operating scenario is a power consumption scenario. In this case, the scenario recognition engine can perform a fusion analysis on running policy A and running policy B to obtain a fusion policy, which is then sent to the scheduling engine.

[0242] For details regarding the case where AIHeartFlag equals 1, please refer to... Figure 7 The relevant description of case 3 in the fusion decision of strategy (7.5) in the corresponding embodiment will not be repeated.

[0243] Understandably, the four scenarios described above do not distinguish the order of execution. The AI ​​performance and power consumption model and the scene recognition engine can determine the operating or abnormal scenario based on heartbeat flags and policy identifiers, and issue different operating strategies for different scenarios. In this way, when the AI ​​performance and power consumption model malfunctions, the scene recognition engine can handle it promptly, or vice versa, thus maintaining stable electronic device performance and preventing excessive power consumption, reducing the likelihood of lag.

[0244] The methods of this application will be described in detail below through specific embodiments. The following embodiments can be combined with each other or implemented independently, and the same or similar concepts or processes may not be described again in some embodiments.

[0245] Figure 10 This application illustrates a resource scheduling method according to an embodiment of the present application, applied to an electronic device. The method includes:

[0246] S1001. Obtain the system status information of the electronic device. The system status information is used to indicate the hardware operation status and / or system operation status when the electronic device operates the focus window.

[0247] In this embodiment of the application, the system status information can be referred to Figure 3 The relevant descriptions of system status information in the corresponding embodiments will not be repeated here.

[0248] S1002, in a case where the first module of the electronic device perceives that the second module of the electronic device is running abnormally, performing a first running strategy based on an indication of the first module; wherein the first module is configured to determine the first running strategy based on system state information, the first running strategy including parameters affecting power consumption of the electronic device and running performance of the electronic device, and the second module is configured to determine a second running strategy based on the system state information, the second running strategy including parameters affecting power consumption of the electronic device.

[0249] In the embodiments of the present application, the first module can be understood as the scene recognition engine in the above embodiments. The second module can be understood as the AI performance power consumption model in the above embodiments.

[0250] The first running strategy can be understood as the running strategy B determined by the scene recognition engine in the above embodiments, and the second running strategy can be understood as the running strategy A determined by the AI performance power consumption model in the above embodiments.

[0251] The process in which the first module perceives that the second module is running abnormally can refer to the related description in the corresponding embodiments of Figure 6 and the related description of case 4 in the fusion decision of the (7.5) strategy of the corresponding embodiments, which will not be repeated here. Figure 7

[0252] S1003, in a case where the second module perceives that the first module is running abnormally, performing a third running strategy based on an indication of the second module, the third running strategy being a preset running strategy in the electronic device.

[0253] In the embodiments of the present application, the preset running strategy in the electronic device can be understood as Figure 7 the default running parameter of case 1 in the fusion decision of the (7.5) strategy of the corresponding embodiments.

[0254] The process in which the second module perceives that the first module is running abnormally can refer to the related description in the corresponding embodiments of Figure 6 and the related description of case 1 in the fusion decision of the (7.5) strategy of the corresponding embodiments, which will not be repeated here. Figure 7 The resource scheduling method, the AI performance power consumption model and the scene recognition engine provided in the embodiments of the present application can perceive whether each other is abnormal. When the AI performance power consumption model is abnormal, the electronic device can run based on the first running strategy issued by the scene recognition engine. When the scene recognition engine is abnormal, the electronic device can run based on the third running strategy issued by the AI performance power consumption model. In this way, the running performance of the electronic device can be kept stable, and the power consumption is not too high, so as to reduce the situation of lag.

[0255] Optionally, in

[0256] Figure 10 ​​On the basis of the corresponding embodiment, before the third running strategy is executed based on the indication of the second module in the case that the second module perceives that the first module is running abnormally, the second module can further deliver a first message to the first module; in the case that the second module perceives that the first module is running abnormally, the third running strategy can be executed based on the indication of the second module, which can include: in the case that the second module continuously fails to obtain a second message from the first module for N times, the third running strategy is executed based on the indication of the second module, where the second message is used to respond to the first message, and N is an integer greater than or equal to 2.

[0257] In the embodiment of the application, the first message can be understood as Figure 6 In the corresponding embodiment, the running strategy A or the preset message sent by the AI performance power consumption model to the scene recognition engine. The second message can be understood as Figure 6 In the corresponding embodiment, the execution result returned by the scene recognition engine to the AI performance power consumption model.

[0258] The process in which the second module perceives that the first module is running abnormally can refer to Figure 6 the related description in the corresponding embodiment, and Figure 7 the related description of case 1 in the fusion decision of the (7.5) strategy of the corresponding embodiment, which will not be repeated. Wherein, N can be understood as Figure 7 the second preset number of times in the corresponding embodiment. For example, N can take a value of 3, or other values, which are not limited in the embodiment of the application.

[0259] The second module can determine whether the first module is running normally according to the second message returned by the first module, so that the second module can perceive whether the first module is running abnormally, so that the second module can be processed in time when the first module is abnormal, so that the running performance of the electronic device remains stable, and the power consumption is not too high.

[0260] Optionally, in the Figure 10 On the basis of the corresponding embodiment, the first identifier is recorded in the second module, and the first identifier is used to indicate whether the first module is running normally. In the case that the second module continuously fails to obtain the second message from the first module for N times, the third running strategy can be executed based on the indication of the second module, which can include: in the case that the second module continuously fails to obtain the second message from the first module for N times, the second module sets the first identifier to a first value, and the first value is used to indicate that the first module is running abnormally; and the third running strategy is executed based on the indication of the second module according to the first value of the first identifier.

[0261] In the embodiment of the application, the first identifier can be understood as Figure 7The heartbeat flag TurboHeartFlag corresponding to the scenario recognition engine in the embodiment. The first value is used to represent that the first module is running abnormally, for example, the first value can be Figure 7 The heartbeat flag TurboHeartFlag corresponding to the embodiment is 0. For details of the process in which the second module sets the first identifier to the first value, reference can be made to Figure 7 For related descriptions in the updating of the heartbeat flag (7.4) of the corresponding embodiment, no longer be repeated.

[0262] It can be understood that using the first identifier facilitates recording the running state of the first module, facilitating judging whether the first module is running normally or abnormally, simplifying the execution flow of the code in the electronic device, and improving the code readability and flexibility, so that the change of the running state of the first module can be simply represented, and the case that the first module is abnormal can be processed in time.

[0263] Optionally, in the embodiment of the application, Figure 10 On the basis of the corresponding embodiment, after the third running strategy is executed based on the indication of the second module, the method can further include: stopping the second module from working, and the stopping from working includes stopping from determining the second running strategy.

[0264] In the embodiment of the application, after the second module instructs the electronic device to execute the third running strategy, the second module can stop executing. The stopping from working can be understood as that the second module does not execute the learning logic and does not send the second running strategy, but the process corresponding to the second module can continue to run.

[0265] In this way, when the second module perceives that the first module is abnormal, the second module stops working after issuing the default running parameter, on the one hand, the electronic device can be normally and stably run based on the default running parameter, and on the other hand, the second module stops working, which can reduce unnecessary execution logic in the electronic device, reduce the computing power, and improve the running performance of the electronic device.

[0266] Optionally, in the embodiment of the application, Figure 10 On the basis of the corresponding embodiment, the second module delivering the first message to the first module can include: if the scenario identifier is an identifier corresponding to a power consumption scenario, the second module delivers the first message to the first module, and the first message includes the second running strategy; wherein the scenario identifier is used to represent the running scenario corresponding to the last time when the second module delivers the message to the first module, and the power consumption scenario is a running scenario for the purpose of reducing the power consumption of the electronic device; if the scenario identifier is an identifier corresponding to a performance scenario, the second module delivers the first message to the first module, and the first message includes a preset message, and the preset message is used to represent that the second module is normally running; wherein the performance scenario is a running scenario for the purpose of improving the running performance of the electronic device.

[0267] In the embodiment of the application, the scenario identifier can be understood asFigure 7 The last strategy tendency in the corresponding embodiment is not described again.

[0268] The power consumption scenario may include, for example, an office scenario, a social scenario, and the like. The performance scenario may include, for example, a programming scenario, a video scenario, a game scenario, a large file opening scenario, and the like. The specific division of scenarios may be pre-set by the electronic device, and the embodiments of the present application are not limited.

[0269] The implementation of the first message based on the scenario identification by the second module may refer to the description of the first module in the corresponding embodiment. Figure 7 The related description of case 2 in the fusion decision of the (7.5) strategy of the corresponding embodiment is not described again.

[0270] In the case where the second module does not send the second running strategy to the first module, the second module still needs to send the preset message to the first module every preset period. In this way, the first module can determine the normal operation of the second module based on the periodically obtained message of the second module, so as to continue to maintain the heartbeat connection between the first module and the second module, so that the first module can accurately determine the running state of the second module and reduce the misjudgment.

[0271] Optionally, in the corresponding embodiment, Figure 10 On the basis of the corresponding embodiment, the scenario identification is recorded in the first module, and the method further includes: in the case where the current running scenario is switched from the power consumption scenario to the performance scenario, the first module updates the scenario identification to the identification corresponding to the performance scenario; the first module delivers the scenario identification to the second module; in the case where the current running scenario is switched from the performance scenario to the power consumption scenario, the first module updates the scenario identification to the identification corresponding to the power consumption scenario; and the first module delivers the scenario identification to the second module.

[0272] In the embodiments of the present application, the process of setting the scenario identification by the first module may refer to the description of the first module in the corresponding embodiment. Figure 7 The related description of case 2 in the fusion decision of the (7.5) strategy of the corresponding embodiment is not described again.

[0273] The first module can set the scenario identification based on the current running scenario of the electronic device. When the first module and the second module interact with each other, the scenario identification engine can carry the scenario identification, so that the second module can accurately determine the current running scenario of the electronic device based on the scenario identification.

[0274] Optionally, in the corresponding embodiment, Figure 10On the basis of the corresponding embodiment, in a case where the first module of the electronic device perceives that the second module of the electronic device is running abnormally, performing the first running strategy based on the indication of the first module can include: in a case where the first module exceeds the preset time period for N consecutive times and no first message from the second module is acquired, performing the first running strategy based on the indication of the first module.

[0275] In the embodiment of the application, N can be understood as Figure 7 the first preset number of times in the corresponding embodiment. For example, N can take a value of 3, or other values. The preset time period can be understood as Figure 6 the preset period in the corresponding embodiment. The preset time period can be pre-set by the electronic device, for example, the preset time period can include 3s, and the specific value of the preset time period is not limited in the embodiment of the application.

[0276] The first module can determine whether the second module is running normally according to the first message delivered by the second module. In this way, the first module can perceive whether the second module is running abnormally, so that the first module can be processed in time when the second module is abnormal, for example, the electronic device is instructed to perform the first running strategy, so that the running performance of the electronic device remains stable and the power consumption is not too high.

[0277] Optionally, in Figure 10 On the basis of the corresponding embodiment, the second identifier is recorded in the first module, and the second identifier is used to indicate whether the second module is running normally. In a case where the first module exceeds the preset time period for N consecutive times and no first message from the second module is acquired, performing the first running strategy based on the indication of the first module can include: in a case where the first module exceeds the preset time period for N consecutive times and no first message from the second module is acquired, the first module sets the second identifier to a second value, and the second value is used to indicate that the second module is running abnormally; and performing the first running strategy based on the indication of the first module according to the second value of the second identifier.

[0278] In the embodiment of the application, the second identifier can be understood as Figure 7 the heartbeat flag AIHeartFlag of the AI performance power consumption model in the corresponding embodiment. The second value is used to indicate that the second module is running abnormally, for example, the second value can be Figure 7 the heartbeat flag AIHeartFlag is 0 in the corresponding embodiment. The specific process in which the first module sets the second identifier to the second value can be referred to Figure 7 the related description of the updating of the heartbeat flag in (7.4) of the corresponding embodiment, which will not be repeated.

[0279] It can be understood that using the second identifier facilitates recording the running state of the second module, facilitating judging whether the second module runs normally or abnormally, simplifying the execution flow of the code in the electronic device, and improving code readability and flexibility, so that the change of the running state of the second module can be simply represented, and the case of abnormality of the second module can be processed in time.

[0280] Optionally, in the corresponding embodiment, Figure 10 Based on the corresponding embodiment, the method can further include: in the case that the first module perceives that the second module runs normally, if the current running scenario belongs to a performance scenario, executing a first running strategy based on the indication of the first module; in the case that the first module perceives that the second module runs normally, if the current running scenario belongs to a power consumption scenario, and the target event does not occur in the electronic device, executing a fourth running strategy based on the indication of the first module; wherein the fourth running strategy is a strategy that can make the power consumption of the electronic device lower among the first running strategy and the second running strategy, and the target event is an event that affects the running performance of the electronic device; in the case that the first module perceives that the second module runs normally, if the current running scenario belongs to the power consumption scenario, and the target event occurs in the electronic device, executing a fifth running strategy based on the indication of the first module; wherein the fifth running strategy is a strategy that can make the power consumption of the electronic device higher among the first running strategy and the second running strategy.

[0281] In the embodiment of the application, the target event can be understood as the above Figure 5 The first event in the corresponding embodiment will not be described again.

[0282] In the case that the first module perceives that the second module runs normally, if the current running scenario belongs to a performance scenario, the process of executing the first running strategy based on the indication of the first module can refer to Figure 7 In case 3 in the fusion decision of the (7.5) strategy of the corresponding embodiment, the related description of the heartbeat flag AIHeartFlag being equal to 1 and the strategy identifier tendency being equal to 1 will not be described again.

[0283] In the case that the first module perceives that the second module runs normally, if the current running scenario belongs to a power consumption scenario, the process of executing the first running strategy based on the indication of the first module can refer to Figure 7 In case 3 in the fusion decision of the (7.5) strategy of the corresponding embodiment, the related description of the heartbeat flag AIHeartFlag being equal to 1 and the strategy identifier tendency being equal to 0 will not be described again.

[0284] It can be understood that in the case that the first module perceives that the second module runs normally, different running strategies are selected according to different current running scenarios, the running parameters of the electronic device can be flexibly adjusted, so that the purpose of improving the performance of the electronic device and / or reducing the power consumption of the electronic device is achieved, and the freezing of the electronic device is reduced.

[0285] Optional, in Figure 10 Based on the corresponding embodiments, the target event includes one or more of the following events: user operation event on the focused window, lag event, or performance limitation event; wherein, the operation event includes one or more of the following events: mouse click event, keyboard input event, or event for switching applications.

[0286] In this embodiment of the application, the target event can be understood as described above. Figure 5 The relevant description of the first event in the corresponding embodiment will not be repeated here.

[0287] Understandably, the occurrence of the target event indicates a degraded performance of the electronic device, necessitating rapid improvement to reduce lag. Since the second module can quickly and appropriately output a first operating strategy, which is related to power consumption limits and performance enhancement, the electronic device can utilize this strategy to quickly improve its performance and enhance the user experience.

[0288] Optional, in Figure 10 Based on the corresponding embodiment, before executing the fourth operating strategy based on the instruction of the first module, it may further include: the second module transmitting a third message to the first module, the third message including the second operating strategy; after executing the fourth operating strategy based on the instruction of the first module, it may further include: the first module returning a fourth message to the second module, the fourth message being used to respond to the third message, the fourth message including part or all of the content of the fourth operating strategy; the second module redetermining the second operating strategy based on the fourth message and system status information.

[0289] In this embodiment of the application, the third message can be understood as... Figure 6 In the corresponding embodiment, the AI ​​performance power consumption model sends operation strategy A to the scene recognition engine. The fourth message can be understood as... Figure 6 In the corresponding embodiment, the scene recognition engine returns the execution result to the AI ​​performance and power consumption model. This execution result may include information from the fourth running strategy, which may include information such as the running scenario and running parameters. In a possible implementation, the running parameters may be represented in the form of key-value pairs, such as the identifier of PL1 and the value corresponding to PL1, the identifier of EPP and the value corresponding to EPP, etc.

[0290] The second module can adaptively adjust the second operating strategy based on the fourth message and system status information. In other words, the second module can learn based on the execution results returned by the first module. This makes the learning efficiency of the second module higher and allows the electronic device to operate in a more suitable state between performance and power consumption.

[0291] Optionally, in Figure 10 Based on the corresponding embodiments, the system state information comprises one or more of the following: power state information, peripheral state information, process load information, audio / video state information, system load information, system event information, and the like.

[0292] In the embodiments of the present application, based on the system state information, the first module and the second module can respectively determine the running strategy matched with the current running scene of the system. In this way, the electronic device can determine the running strategy of the electronic device based on the first module and the second module, so that the electronic device can maintain a certain running performance on the basis of reducing the running power consumption.

[0293] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties, and the collection, use and processing of related data need to comply with relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation portal for user to select authorization or refusal.

[0294] The above mainly introduces the scheme provided by the embodiments of the present application from the perspective of method. In order to realize the above functions, it contains the hardware structure and / or software module corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the method steps of each example described in the embodiments disclosed in the present text, the present application can be realized in the form of hardware or the combination of hardware and computer software. Whether a certain function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical scheme. Professional technicians can use different methods to realize the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.

[0295] The embodiments of the present application can divide the function modules of the device for realizing the method according to the above method examples, for example, each function module can be divided corresponding to each function, or two or more functions can be integrated in one processing module. The integrated module can be realized in the form of hardware or in the form of software function module. It should be noted that the division of modules in the embodiments of the present application is illustrative, and is only a logical function division. When actually implemented, there can be another division manner.

[0296] As Figure 11Fig. 1 shows a structural diagram of a chip according to an embodiment of the present application. The chip 1100 includes one or more (including two) processors 1101, a communication line 1102, a communication interface 1103, and a memory 1104.

[0297] In some embodiments, the memory 1104 stores the following elements: executable modules or data structures, or a subset thereof, or an extended set thereof.

[0298] The method described in the above embodiments of the present application can be applied to the processor 1101 or implemented by the processor 1101. The processor 1101 can be an integrated circuit chip having a processing capability of signals. In the implementation process, each step of the above method can be completed by an integrated logic circuit or an instruction in the form of software in the processor 1101. The processor 1101 described above can be a general-purpose processor (for example, a microprocessor or a conventional processor), a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, or discrete hardware components, the processor 1101 can implement or execute the disclosed processing-related methods, steps, and logic block diagrams in the embodiments of the present application.

[0299] The steps of the method disclosed in the embodiments of the present application can be directly embodied as a hardware coding processor for execution, or a combination of hardware and software modules in the coding processor for execution. Among them, the software module can be located in a storage medium in the art mature, such as random access memory, read-only memory, programmable read-only memory, or electrically erasable programmable read-only memory (EEPROM) and the like. The storage medium is located in the memory 1104, and the processor 1101 reads the information in the memory 1104, and combines the hardware to complete the steps of the above method.

[0300] The processor 1101, the memory 1104, and the communication interface 1103 can communicate through the communication line 1102.

[0301] In the above embodiments, the instructions stored in the memory for the processor to execute can be implemented in the form of a computer program product. Among them, the computer program product can be written in the memory in advance, or downloaded and installed in the memory in the form of software.

[0302] The embodiments of the present application further provide a computer program product including one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions according to the embodiments of the present application are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions can be transmitted from a website, a computer, a server or a data center of one site to a website, a computer, a server or a data center of another site through a wired (such as a coaxial cable, an optical fiber, a digital subscriber line (DSL) or a wireless (such as infrared, wireless, microwave, etc.)) mode. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, a data center, etc. including one or more available media sets. For example, the available media can include magnetic media (such as a floppy disk, a hard disk or a magnetic tape), optical media (such as a digital versatile disc (DVD)), or semiconductor media (such as a solid state disk (SSD)) and the like.

[0303] The embodiments of the present application further provide a computer-readable storage medium. The methods described in the above embodiments can be implemented in whole or in part by software, hardware, firmware or any combination thereof. The computer-readable medium can include a computer storage medium and a communication medium, and can also include any medium that can transfer a computer program from one place to another. The storage medium can be any target medium accessible by a computer.

[0304] As a possible design, the computer-readable medium can include a compact disc read-only memory (CD-ROM), RAM, ROM, EEPROM or other optical disk storage; the computer-readable medium can include a magnetic disk storage or other magnetic disk storage device. Moreover, any connection line can also be appropriately referred to as a computer-readable medium. For example, if software is transmitted from a website, a server or other remote source using a coaxial cable, an optical fiber cable, a twisted pair, a DSL or a wireless technology (such as infrared, radio and microwave), the coaxial cable, the optical fiber cable, the twisted pair, the DSL or the wireless technology such as infrared, radio and microwave are included in the definition of the medium. As used herein, the disk and the optical disk include a compact disc (CD), a laser disc, an optical disc, a digital versatile disc (DVD), a floppy disk and a Blu-ray disc, wherein the disk is usually reproduced in a magnetic manner, and the optical disk is optically reproduced by laser.

[0305] The embodiments of the present application are described with reference to the flowchart and / or block diagram of the method, device (system) and computer program product according to the embodiments of the present application. It should be understood that each flow and / or block in the flowchart and / or block diagram, as well as a combination of flows and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing apparatus to produce a machine, so that the instructions executed by the computer or other programmable data processing apparatus generate a device that implements the functions specified in the flowchart and / or block diagram block or blocks. Figure 1 The flowchart and / or block diagram can include one or more flow or blocks that represent a device, device component, means for performing functions specified in the flowchart and / or block diagram block or blocks, and / or a combination of the flow or blocks. Figure 1 The flowchart and / or block diagram can include one or more flow or blocks that represent a device, device component, means for performing functions specified in the flowchart and / or block diagram block or blocks, and / or a combination of the flow or blocks.

Claims

1. A resource scheduling method applied to electronic devices, characterized in that, The method comprises: obtaining system state information of the electronic device, the system state information being used to represent hardware running conditions and / or system running conditions when the electronic device operates a focus window; in a case where a first module of the electronic device perceives that a second module of the electronic device is running abnormally, executing a first running strategy based on an indication of the first module; wherein the first module is used to determine the first running strategy based on the system state information, the first running strategy comprising parameters affecting power consumption of the electronic device and running performance of the electronic device, the second module is used to determine a second running strategy based on the system state information, the second running strategy comprising parameters affecting power consumption of the electronic device; the first module is a scene recognition engine, and the second module is an AI performance power consumption model; in a case where the second module perceives that the first module is running abnormally, executing a third running strategy based on an indication of the second module, the third running strategy being a preset running strategy in the electronic device; before the case where the second module perceives that the first module is running abnormally, the third running strategy is executed based on the indication of the second module, the method further comprises: if a scene identifier is an identifier corresponding to a power consumption scene, the second module delivers a first message to the first module, the first message comprising the second running strategy; wherein the scene identifier is used to represent a running scene corresponding to a last time when the second module delivers a message to the first module, and the power consumption scene is a running scene aiming to reduce power consumption of the electronic device; if the scene identifier is an identifier corresponding to a performance scene, the second module delivers a first message to the first module, the first message comprising a preset message, the preset message being used to represent normal running of the second module; wherein the performance scene is a running scene aiming to improve running performance of the electronic device.

2. The method of claim 1, wherein, the case where the second module perceives that the first module is running abnormally, the third running strategy is executed based on the indication of the second module, comprising: in a case where the second module does not acquire a second message from the first module for N consecutive times, the third running strategy is executed based on the indication of the second module, wherein the second message is used to respond to the first message, and N is an integer greater than or equal to 2.

3. The method of claim 2, wherein, the second module records a first identifier, the first identifier being used to represent whether the first module is running normally, the case where the second module does not acquire the second message from the first module for N consecutive times, the third running strategy is executed based on the indication of the second module, comprising: in the case where the second module does not acquire the second message from the first module for N consecutive times, the second module sets the first identifier to a first value, the first value being used to represent that the first module is running abnormally; the third running strategy is executed based on the indication of the second module according to the first value of the first identifier.

4. The method according to any one of claims 1 to 3, characterized in that, The method further comprises: stopping the second module from working, wherein the stopping comprises stopping the second module from determining the second running strategy.

5. The method according to claim 2 or 3, characterized in that, The first module records the scene identifier, and the method further comprises: In a case where the current running scene is switched from the power consumption scene to the performance scene, the first module updates the scene identifier to an identifier corresponding to the performance scene; The first module delivers the scene identifier to the second module; In a case where the current running scene is switched from the performance scene to the power consumption scene, the first module updates the scene identifier to an identifier corresponding to the power consumption scene; The first module delivers the scene identifier to the second module.

6. The method according to any one of claims 1 to 3, characterized in that, The method further comprises: In a case where the first module continuously exceeds the preset time period for N times and no first message from the second module is obtained, the first module executes the first running strategy based on an indication of the first module.

7. The method of claim 6, wherein, The first module records a second identifier, and the second identifier is used to indicate whether the second module is normally running, and the method further comprises: In a case where the first module continuously exceeds the preset time period for N times and no first message from the second module is obtained, the first module sets the second identifier to a second value, and the second value is used to indicate that the second module is abnormally running; The method further comprises:

8. The method according to any of claims 1 to 3, 7, characterized in that, In a case where the first module senses that the second module is normally running, if the current running scene belongs to a performance scene, the first module executes the first running strategy based on an indication of the first module; In a case where the first module senses that the second module is normally running, if the current running scene belongs to a power consumption scene and no target event occurs in the electronic device, the first module executes a fourth running strategy based on an indication of the first module, wherein the fourth running strategy is a strategy that can make the power consumption of the electronic device lower among the first running strategy and the second running strategy, and the target event is an event that affects the running performance of the electronic device; In a case where the first module senses that the second module is normally running, if the current running scene belongs to the power consumption scene and the target event occurs in the electronic device, the first module executes a fifth running strategy based on an indication of the first module, wherein the fifth running strategy is a strategy that can make the power consumption of the electronic device higher among the first running strategy and the second running strategy. ​ 9. The method of claim 8, wherein, The target event includes one or more of the following events: a user operation event on the focus window, a frame freezing event, or a performance limited event; wherein the operation event includes one or more of the following events: a mouse click event, a keyboard input event, or an event for switching applications.

10. The method of claim 8, wherein, Before executing the fourth running strategy based on the indication of the first module, the method further includes: The second module delivers a third message to the first module, and the third message includes the second running strategy; After executing the fourth running strategy based on the indication of the first module, the method further includes: The first module returns a fourth message to the second module, and the fourth message is used to respond to the third message, and the fourth message includes part or all of the fourth running strategy; The second module re-determines the second running strategy based on the fourth message and the system state information.

11. The method according to any one of claims 1-3, 7, 9-10, characterized in that, The system state information includes one or more of the following information: power state information, peripheral state information, process load information, audio / video state information, system load information, or system event information.

12. An electronic device, comprising: The electronic device includes one or more processors and a memory; The memory is coupled to the one or more processors, and the memory is configured to store computer program code including computer instructions, and the one or more processors are configured to invoke the computer instructions to cause the electronic device to perform the method of any one of claims 1-11.

13. A chip system, characterized by The chip system is applied to an electronic device, and the chip system includes one or more processors configured to invoke computer instructions to cause the electronic device to perform the method of any one of claims 1-11.

14. A computer-readable storage medium, characterized in that, The computer readable storage medium includes computer instructions configured to cause an electronic device to perform the method of any one of claims 1-11 when the computer instructions are executed on the electronic device.

15. A computer program product, characterised in that, The computer program product includes computer program code configured to cause an electronic device to perform the method of any one of claims 1-11 when the computer program code is executed on the electronic device.

Citation Information

Patent Citations

  • Resource scheduling method, electronic equipment and storage medium

    CN116028206A

  • EPS system, operation method and vehicle

    CN118124668A