Resource scheduling method and related device

Through the heartbeat mechanism, the abnormalities of the AI ​​performance power consumption model and scene recognition engine are sensed, and the operation strategy is adjusted, which solves the performance guarantee and power consumption control problems caused by unreasonable settings of electronic equipment operation parameters, and achieves stable operation and low power consumption, reducing card To improve user experience.

CN118981369AActive Publication Date: 2024-11-19HONOR DEVICE CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

The existing technology is difficult to effectively solve the performance guarantee problems and power consumption control problems caused by unreasonable setting of operating parameters of electronic devices, resulting in lag and affecting user experience.

Method used

The heartbeat mechanism is used to sense whether the AI ​​performance power consumption model and scene recognition engine are abnormal. Through corresponding operation strategy processing, ensure that the electronic equipment operates under appropriate operating parameters and reduces lag.

Benefits of technology

By perceiving abnormalities and handling them in time, the operating performance of electronic devices can be kept stable, avoid excessive power consumption, reduce lag, and improve user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118981369A_ABST
    Figure CN118981369A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a resource scheduling method and a related device, and relates to the technical field of terminals. The method comprises the steps that whether an AI performance power consumption model or a scene recognition engine is abnormal or not can be sensed based on a heartbeat mechanism, so that the situation that the AI performance power consumption model or the scene recognition engine is abnormal is processed, the electronic equipment can operate by using proper operating parameters, and the situation of lagging is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of terminal technology, and in particular to a resource scheduling method and related devices. Background Art

[0002] As the performance of electronic devices improves, the power consumption of electronic devices is also increasing. Therefore, it is necessary to reduce the power consumption of electronic devices as much as possible while considering the performance of electronic devices.

[0003] In some implementations, the performance of the electronic device may not be guaranteed due to unreasonable settings of the operating parameters of the electronic device, resulting in lag problems and affecting the user experience. Summary of the invention

[0004] The resource scheduling method and related device provided in the embodiments of the present application can sense whether an abnormality occurs in the AI ​​performance power consumption model or the scene recognition engine based on the heartbeat mechanism, thereby processing the abnormality of the AI ​​performance power consumption model or the scene recognition engine, so that the electronic device can run with appropriate operating parameters and reduce the occurrence of freezes.

[0005] In a first aspect, an embodiment of the present application provides a resource scheduling method, the method comprising:

[0006] Obtaining 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; when the first module of the electronic device senses that the second module of the electronic device is operating abnormally, executing the first operation strategy based on the instruction of the first module; wherein the first module is used to determine the first operation strategy based on the system status information, the first operation strategy includes parameters affecting the power consumption of the electronic device and the operating performance of the electronic device, and the second module is used to determine the second operation strategy based on the system status information, the second operation strategy includes parameters affecting the power consumption of the electronic device; when the second module senses that the first module is operating abnormally, executing the third operation strategy based on the instruction of the second module, the third operation strategy is the operation strategy preset in the electronic device. In this way, the AI ​​performance power consumption model and the scene recognition engine can sense whether each other is abnormal, when the AI ​​performance power consumption model is abnormal, the electronic device can operate based on the first operation strategy issued by the scene recognition engine, and when the scene recognition engine is abnormal, the electronic device can operate based on the third operation strategy issued by the AI ​​performance power consumption model, so that the operating performance of the electronic device can be kept stable, and the power consumption is not too high, thereby reducing the occurrence of freezes.

[0007] In a possible implementation, before the second module senses that the first module is operating abnormally, and executes the third operation strategy based on the instruction of the second module, it also includes: the second module transmits the first message to the first module; when the second module senses that the first module is operating abnormally, the third operation strategy is executed based on the instruction of the second module, including: when the second module fails to obtain the second message from the first module for N consecutive times, the third operation strategy is executed based on the instruction 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. The second module can judge whether the first module is operating normally according to the second message returned by the first module, so that the second module can sense whether the first module is operating abnormally, so that when the first module is abnormal, the second module can handle it in time, so that the operation performance of the electronic device remains stable.

[0008] In a possible implementation, a first identifier is recorded in the second module, and the first identifier is used to indicate whether the first module is operating normally. When the second module fails to obtain the second message from the first module for N consecutive times, a third operation strategy is executed based on the instruction of the second module, including: when the second module fails to obtain the second message from the first module for N consecutive 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 operating abnormally; according to the first value of the first identifier, the third operation strategy is executed based on the instruction of the second module. In this way, the use of the first identifier facilitates recording the operating status of the first module, facilitates judging whether the first module is operating normally or abnormally, simplifies the execution process of the code in the electronic device, improves the readability and flexibility of the code, and can concisely indicate the changes in the operating status of the first module, and promptly handle the abnormal situation of the first module.

[0009] In a possible implementation, after executing the third operation strategy based on the instruction of the second module, it also includes: stopping the second module from working, and stopping working includes stopping determining the second operation strategy. In this way, when the second module senses that an abnormality has occurred in the first module, the second module stops working after sending the default operation parameters. On the one hand, the electronic device can operate normally and stably based on the default operation parameters. On the other hand, stopping the second module can reduce unnecessary execution logic in the electronic device, reduce computing power, and improve the operation performance of the electronic device.

[0010] In a possible implementation, the second module transmits a first message to the first module, including: if the scenario identifier is an identifier corresponding to the power consumption scenario, the second module transmits the first message to the first module, and the first message includes a second operation strategy; wherein the scenario identifier is used to indicate the operation scenario corresponding to the last time the second module transmitted a message to the first module, and the power consumption scenario is an operation scenario for the purpose of reducing the power consumption of the electronic device; if the scenario identifier is an identifier corresponding to the performance scenario, the second module transmits the first message to the first module, and the first message includes a preset message, and the preset message is used to indicate that the second module is operating normally; wherein the performance scenario is an operation scenario for the purpose of improving the operating performance of the electronic device. In the case where the second module does not send the second operation 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 judge that the second model is operating normally based on the periodically obtained message of the second module, so that the heartbeat connection can continue to be maintained between the first module and the second module, so that the first module can accurately judge the operating status of the second module and reduce the situation of misjudgment.

[0011] In a possible implementation, a scene identifier is recorded in the first module, and the method further includes: when the current operating scene switches from the power consumption scene to the performance scene, the first module updates the scene identifier to the identifier corresponding to the performance scene; the first module transmits the scene identifier to the second module; when the current operating scene switches from the performance scene to the power consumption scene, the first module updates the scene identifier to the identifier corresponding to the power consumption scene; the first module transmits the scene identifier to the second module. In this way, the first module can set the scene identifier based on the current operating scene of the electronic device, and when the first module and the second module perform message interaction, the scene recognition engine can carry the scene identifier, so that the second module can accurately determine the current operating scene of the electronic device based on the scene identifier.

[0012] In a possible implementation, when the first module of the electronic device senses that the second module of the electronic device is operating abnormally, the first operation strategy is executed based on the instruction of the first module, including: when the first module exceeds the preset time period N times continuously and does not obtain the first message from the second module, the first operation strategy is executed based on the instruction of the first module. The first module can determine whether the second module is operating normally according to the first message transmitted by the second module. In this way, the first module can sense whether the second module has an abnormal operation, so that when an abnormal situation occurs in the second module, the first module can handle it in time, such as instructing the electronic device to execute the first operation strategy, so that the operating performance of the electronic device remains stable and the power consumption is not too high.

[0013] In a possible implementation, a second identifier is recorded in the first module, and the second identifier is used to indicate whether the second module is operating normally. When the first module exceeds the preset time period N times in a row and does not obtain the first message from the second module, the first operation strategy is executed based on the instruction of the first module, including: when the first module exceeds the preset time period N times in a row and does not obtain the first message from the second module, the first module sets the second identifier to a second value, and the second value is used to indicate that the second module is operating abnormally; according to the second value of the second identifier, the first operation strategy is executed based on the instruction of the first module. In this way, the use of the second identifier facilitates recording the operating status of the second module, facilitates judging whether the second module is operating normally or abnormally, simplifies the execution process of the code in the electronic device, improves the readability and flexibility of the code, and can concisely indicate the changes in the operating status of the second module, and promptly handle the abnormal situation of the second module.

[0014] In a possible implementation, the method further includes: when the first module senses that the second module is operating normally, if the current operating scenario belongs to the performance scenario, the first operating strategy is executed based on the instruction of the first module; when the first module senses that the second module is operating normally, if the current operating scenario belongs to the power consumption scenario, and the electronic device has not had a target event, the fourth operating strategy is executed based on the instruction of the first module; wherein the fourth operating strategy is a strategy that can make the power consumption of the electronic device lower in the first operating strategy and the second operating strategy, and the target event is an event that affects the operating performance of the electronic device; when the first module senses that the second module is operating normally, if the current operating scenario belongs to the power consumption scenario, and the electronic device has a target event, the fifth operating strategy is executed based on the instruction of the first module; wherein the fifth operating strategy is a strategy that can make the power consumption of the electronic device higher in the first operating strategy and the second operating strategy. In this way, when the first module senses that the second module is operating normally, different operating strategies are selected according to different current operating scenarios, and the operating parameters of the electronic device can be flexibly adjusted, so as to achieve the purpose of improving the performance of the electronic device and / or reducing the power consumption of the electronic device, and reduce the jamming of the electronic device.

[0015] In one possible implementation, the target event includes one or more of the following events: an operation event of the user on the focus window, a freeze 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. In this way, when the target event occurs, it means that the operating performance of the electronic device has been reduced, and it is necessary to quickly improve the operating performance of the electronic device to reduce the freeze of the electronic device. Since the second module can be used to quickly and reasonably output the first operating strategy, the first operating strategy can be related to limiting power consumption and improving the operating performance of the electronic device. Therefore, the electronic device can use the second module to output the first operating strategy, thereby quickly improving the operating performance of the electronic device and improving the user experience.

[0016] In a possible implementation, before executing the fourth operation strategy based on the instruction of the first module, it also includes: the second module transmits a third message to the first module, and the third message includes the second operation strategy; after executing the fourth operation strategy based on the instruction of the first module, it also includes: the first module returns a fourth message to the second module, the fourth message is used to respond to the third message, and the fourth message includes part or all of the content of the fourth operation strategy; the second module re-determines the second operation strategy based on the fourth message and the system status information. The second module can adaptively adjust the second operation strategy based on the fourth message and the system status 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 suitable operation state between performance and power consumption.

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

[0018] In a second aspect, an embodiment of the present application provides a device for resource scheduling, which may be an electronic device, or a chip or chip system in an electronic device. The device may include a processing unit. The processing unit is used to implement any method related to processing performed by the electronic device in the first aspect or any possible implementation of the first aspect. When the device is an electronic device, the processing unit may be a processor. The device may also include a storage unit, which may be a memory. The storage unit is used to store instructions, and the processing unit executes the instructions stored in the storage unit so that the electronic device implements a method described in the first aspect or any possible implementation of the first aspect. When the device is a chip or chip system in an electronic device, the processing unit may be a processor. The processing unit executes the instructions stored in the storage unit so that the electronic device implements a method described in the first aspect or any possible implementation of the first aspect. The storage unit may be a storage unit in the chip (for example, a register, a cache, etc.), or a storage unit in the electronic device located outside the chip (for example, a read-only memory, a random access memory, etc.).

[0019] Exemplarily, the processing unit is used to obtain system status information of the electronic device; it is also used to execute the first operation strategy based on the instruction of the first module, and it is also used to execute the third operation strategy based on the instruction of the second module.

[0020] In one possible implementation, the processing unit is used to transmit the first message to the first module, and is also used to execute the third operation strategy based on the instruction of the second module when 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 used to set the first identifier to a first value, and is also used to execute the third operation strategy based on the instruction of the second module according to the first value of the first identifier.

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

[0023] In one possible implementation, the processing unit is used to transmit a first message to the first module if the scenario identifier is an identifier corresponding to the power consumption scenario, and the first message includes a second operation strategy; and is also used to transmit a first message to the first module if the scenario identifier is an identifier corresponding to the performance scenario, and the first message includes a preset message.

[0024] In one possible implementation, the processing unit is used to update the scene identifier to an identifier corresponding to the performance scenario when the current operating scenario is switched from the power consumption scenario to the performance scenario; and is also used to pass the scene identifier to the second module; specifically, it is also used to update the scene identifier to an identifier corresponding to the power consumption scenario when the current operating scenario is switched from the performance scenario to the power consumption scenario; and is also used by the first module to pass the scene identifier to the second module.

[0025] In a possible implementation, the processing unit is configured to execute the first operation strategy based on an instruction of the first module when the first module fails to obtain the first message from the second module for N consecutive times exceeding a preset time period.

[0026] In a possible implementation, the processing unit is used to set the second identifier to a second value; and is also used to execute the first operation strategy based on the instruction of the first module according to the second value of the second identifier.

[0027] In one possible implementation, the processing unit is used to, when the first module senses that the second module is operating normally, if the current operating scenario belongs to a performance scenario, execute the first operating strategy based on the instruction of the first module; it is also used to, when the first module senses that the second module is operating normally, if the current operating scenario belongs to a power consumption scenario, and no target event occurs in the electronic device, execute the fourth operating strategy based on the instruction of the first module; specifically, it is also used to, when the first module senses that the second module is operating normally, if the current operating scenario belongs to a power consumption scenario, and a target event occurs in the electronic device, execute the fifth operating strategy based on the instruction of the first module.

[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 freeze event, or a performance limitation event.

[0029] In one possible implementation, the processing unit is used to transmit a third message to the first module, wherein the third message includes a second operating strategy; and is also used to return a fourth message to the second module, wherein the fourth message is used to respond to the third message; and is specifically used to redetermine the second operating strategy based on the fourth message and system status information.

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

[0031] In a third aspect, an embodiment of the present application provides an electronic device, comprising one or more processors and a memory, wherein the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code includes computer instructions, and the one or more processors are used to call computer instructions to execute the method described in the first aspect or any possible implementation of the first aspect.

[0032] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which a computer program or instructions are stored. When the computer program or instructions are run on a computer, the computer executes the method described in the first aspect or any possible implementation of the first aspect.

[0033] In a fifth aspect, an embodiment of the present application provides a computer program product including a computer program. When the computer program runs on a computer, the computer executes the method described in the first aspect or any possible implementation manner of the first aspect.

[0034] In a sixth aspect, the present application provides a chip or a chip system, the chip or chip system comprising at least one processor and a communication interface, the communication interface and the at least one processor are interconnected by a line, and the at least one processor is used to run a computer program or instruction to execute the method described in the first aspect or any possible implementation 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 present application further includes at least one memory, in which instructions are stored. The memory may be a storage unit inside the chip, such as a register, a cache, etc., or a storage unit of the chip (e.g., a read-only memory, a random access memory, etc.).

[0036] It should be understood that the second to sixth aspects of the present application correspond to the technical solutions of the first aspect of the present application, and the beneficial effects achieved by each aspect and the corresponding feasible implementation methods are similar and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 A schematic diagram of determining an operation strategy based on an AI performance and power consumption model provided in an embodiment of the present application;

[0038] Figure 2 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;

[0039] Figure 3 A schematic diagram of the software structure of an electronic device provided in an embodiment of the present application;

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

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

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

[0043] Figure 7 A schematic diagram of a process for an electronic device to issue an operation strategy according to an embodiment of the present application;

[0044] Figure 8 A schematic diagram of module interaction provided by an operation strategy according to an embodiment of the present application;

[0045] Fig. 9 A timing diagram of the interaction process of various modules in an electronic device provided in an embodiment of the present application;

[0046] Fig.10 A schematic diagram of a resource scheduling method provided in an embodiment of the present application;

[0047] Fig.11 A schematic diagram of the structure of a chip provided in an embodiment of the present application. DETAILED DESCRIPTION

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

[0049] 1. Power limit (PL): used to limit the power consumption of the central processing unit (CPU) of an electronic device. The level of power consumption limit on the CPU can be expressed in the form of "PL+number". Among them, the "number" in "PL+number" can represent a specific level. For example, the levels of power consumption limit on the CPU from small to large may include PL1, PL2, PL3, PL4, etc. The smaller the number, the lower the level of power consumption limit. For the convenience of description, the embodiments of this application will be described later using PL1 and PL2 as examples.

[0050] PL1 can be called long-term turbo power consumption or extreme power value, which indicates the power consumption of the CPU under normal load. The CPU's operating power consumption does not exceed PL1 most of the time.

[0051] PL2 can also be called short-term turbo power consumption. It can indicate the maximum power consumption that the CPU can reach in a short period of time, and can also be understood as the upper limit of the CPU performance of an electronic device. Generally, PL2 is greater than PL1.

[0052] 2. CPU energy performance preference (EPP): It is used to reflect the CPU scheduling tendency, and its value range can be 0 to 255. It can be understood that the smaller the CPU energy efficiency ratio, the higher the CPU energy efficiency ratio, the lower the CPU power consumption.

[0053] 3. Terminology

[0054] In the embodiments of the present application, words such as "first" and "second" are used to distinguish the same or similar items with substantially the same functions and effects. For example, the first chip and the second chip are only used to distinguish different chips, and their order is not limited. Those skilled in the art can understand that words such as "first" and "second" do not limit the quantity and execution order, and words such as "first" and "second" do not necessarily limit them to be different.

[0055] It should be noted that in the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.

[0056] In the embodiments of the present application, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, a--c, bc, or abc, where a, b, c can be single or multiple.

[0057] As the performance of electronic devices improves, the power consumption of electronic devices is also increasing. Therefore, it is necessary to reduce the power consumption of electronic devices as much as possible while considering the performance of electronic devices.

[0058] In some implementations, such as Figure 1As shown, the electronic device may include an AI performance power consumption model and a scene recognition engine, wherein the AI ​​performance power consumption model can determine the operation strategy that matches the current operation scenario of the system by learning the system status information, and send the operation strategy to the policy fusion module. The scene recognition engine may include a scene recognition module, a policy table, a policy fusion module, a policy delivery module, etc. The scene recognition module can identify the current operation scenario of the electronic device, search the policy table for the operation strategy that matches the current operation scenario, and send the operation strategy to the policy fusion module.

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

[0060] However, in some scenarios, if an abnormality occurs in the AI ​​performance and power consumption model, the electronic device will continue to use the operating strategy A that was last issued by the AI ​​performance and power consumption model. If the parameters such as PL1 in the operating strategy A that was last issued by the AI ​​performance and power consumption model are set too low, the performance of the electronic device may not be guaranteed, resulting in lag problems, which affects the user experience.

[0061] If an exception occurs in the strategy fusion module, the strategy fusion module will not be able to send down the fused operating strategy. Therefore, the performance of the electronic device may not be guaranteed due to the low setting of parameters such as PL1 in the operating strategy, resulting in lag problems, thus affecting the user experience.

[0062] In view of this, the resource scheduling method provided in the embodiment of the present application can sense whether an abnormality occurs in the AI ​​performance power consumption model or the scene recognition engine based on the heartbeat mechanism, thereby processing the abnormality of the AI ​​performance power consumption model or the scene recognition engine, so that the electronic device can run with appropriate operating parameters and reduce the occurrence of freezes.

[0063] It can be understood that the electronic device of the embodiment of the present application can also be a terminal device in any form. For example, the electronic device may include: a mobile phone, a tablet computer, a PDA, a laptop 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 wireless communication device, ... assistant, PDA), handheld devices with wireless communication capabilities, computing devices or other processing devices connected to a wireless modem, vehicle-mounted devices, wearable devices, electronic devices in 5G networks, or electronic devices in future evolved public land mobile communication networks (public landmobile network, PLMN), etc., and the embodiments of the present application are not limited to this.

[0064] As an example but not limitation, in the embodiments of the present application, the electronic device may also be a wearable device. Wearable devices may also be referred to as wearable smart devices, which are a general term for wearable devices that are intelligently designed and developed using wearable technology for daily wear, such as glasses, gloves, watches, clothing, and shoes. A wearable device is a portable device that is worn directly on the body or integrated into the user's clothes or accessories. Wearable devices are not only hardware devices, but also powerful functions achieved through software support, data interaction, and cloud interaction. Broadly speaking, wearable smart devices include full-featured, large-sized, and fully or partially independent of smartphones, such as smart watches or smart glasses, as well as devices that only focus on a certain type of application function and need to be used in conjunction with other devices such as smartphones, such as various types of smart bracelets and smart jewelry for vital sign monitoring.

[0065] In addition, in the embodiments of the present application, the electronic device may also be an electronic device in an Internet of Things (IoT) system. IoT is an important part of the future development of information technology. Its main technical feature is to connect objects to the network through communication technology, thereby realizing an intelligent network that interconnects people and machines and things.

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

[0067] In an embodiment 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 hardware such as a CPU, a memory management unit (MMU), and a memory (also called main memory). The operating system can be any one or more computer operating systems that implement business processing through processes, such as Linux operating systems, Unix operating systems, Android operating systems, iOS operating systems, or windows operating systems. The application layer includes applications such as browsers, address books, word processing software, and instant messaging software.

[0068] For example, Figure 2 A schematic structural diagram of an electronic device is shown.

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

[0070] It is to be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device. In other embodiments of the present application, the electronic device may include more or fewer components than shown in the figure, or combine certain components, or split certain components, or arrange the components differently. The illustrated components may be implemented by hardware, software, or a combination of software and hardware.

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

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

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

[0074] For example, in an embodiment of the present application, the processor can obtain system status information corresponding to the current operation scenario, and based on the system status information, obtain an operation strategy that can reduce the operation power consumption while ensuring a certain operation performance. The processor can adjust the operation parameters of the CPU and / or GPU based on the operation strategy to reduce the operation power consumption of the electronic device and improve the operation performance of the electronic device.

[0075] Among them, the operating scenarios of electronic devices may include video scenes, game scenes, social scenes, office scenes, browser scenes, smart interconnection scenes, evaluation scenes, programming scenes, hyperterminal scenes, design software scenes, process startup scenes, large file opening scenes, etc.

[0076] The task corresponding to the video scene may be playing a video, and the video scene may include a video playing scene, a video browsing scene, and a video barrage scene. The task corresponding to the game scene may be playing a game. The task corresponding to the social scene may be voice chat, video chat, typing chat, etc., and the social scene may include a text chat scene, a voice chat scene, a video chat scene, etc. The task corresponding to the office scene may be editing a document, and the office scene may include a document editing scene, a document browsing scene, a video conferencing scene, etc. The task corresponding to the browser scene may be browsing a web page, and the browser scene may include browsing a web page scene, playing a video scene, etc. The task corresponding to the smart interconnection scene may be sharing information after multiple electronic devices are interconnected; the task corresponding to the evaluation scene may be experimental analysis of the performance of an electronic device; the task corresponding to the programming scene may be programming; the task corresponding to the hyperterminal scene may be that an electronic device can operate one or more other electronic devices; the task corresponding to the design software scene may be designing software; the task corresponding to the process startup scene may be memory management, task scheduling, etc.; the large file opening scene may be a file opening scene that exceeds a preset file size, etc.

[0077] The operation policy may include various operation parameters, and the operation parameters may be parameters related to limiting power consumption and / or parameters related to improving the operation performance of the electronic device.

[0078] Exemplarily, the operation strategy may include one or more of the following operation parameters: PL1, PL2, EPP, emergency power off (EPO) control switch status information, CPU acceleration switch status information, fan speed, discrete graphics processing unit (DGPU) overspeed value, video memory overclocking value, integrated graphics processing unit (IGPU) minimum frequency, IGPU maximum frequency, DGPU minimum frequency, DGPU maximum frequency, energy-saving display status information, CPU minimum frequency, core binding information and memory cleanup status information, etc.

[0079] In some embodiments, core binding can also be referred to as setting the affinity of a process or thread, which means binding a process or thread to a specific CPU core to run. Doing so can improve performance because the process or thread only runs on the bound CPU core, reducing the time to switch between multiple cores. However, 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] System status information may also be referred to as operating status information. System status information may be used to indicate the hardware operating status and / or system operating status when the electronic device operates a focus window, and the focus window may refer to a window with focus. The system status information may include one or more of the following: power status information, peripheral status information, process load information, audio and video status information, system load information, or system event information.

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

[0082] The peripheral device status information may include relevant information of one or more of the following events: relevant information of a mouse wheel sliding event, a mouse clicking event, a keyboard input event, a microphone input event, or a camera input event.

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

[0084] The audio and video state information may include audio and video events currently existing in the electronic device. For example, the audio and video events may include one or more of the following events: GPU decoding events, video events, video frame rates, or video subtitles.

[0085] The system load information may include information on the total number of processes currently being executed by the CPU and waiting to be executed by the CPU. The system load information may be an indicator reflecting the busyness of the system.

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

[0087] It is understandable that the system status information described above is only an example, and the system status information may also be other information used to represent the hardware operating status and / or system operating status when the electronic device operates the focus window, such as screen brightness, download speed, etc., but is not limited to this.

[0088] The interface connection relationship between the modules illustrated in the embodiment of the present invention is only for illustrative purposes and does not constitute a structural limitation on the electronic device. In other embodiments of the present application, the electronic device may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.

[0089] The software system of the electronic device may adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture. The embodiment of the present invention takes a Windows system with a layered architecture as an example to exemplify the software structure of the electronic device.

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

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

[0092] The application layer includes computer housekeeper, office, browser, social, music, video, game and other applications. Applications 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 applications in a specific form and provide an execution environment for applications. In the embodiment 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 an operating strategy that can limit the operating power consumption of the electronic device and improve the operating performance of the electronic device.

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

[0095] In some embodiments, the AI ​​performance power consumption model and the scene recognition engine may be modules running in a computer manager.

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

[0097] The executive body may include a process manager, a power manager, Windows management instrumentation (WMI), an operating system event driver (OsEventDriver) node, an operating system to system on chip (OS2SOC) driver node, etc.

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

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

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

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

[0102] The OS2SOC driver node allows the scene recognition engine to send operating parameters to hardware devices.

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

[0104] The kernel is an abstraction of the processor architecture, isolating the executive body from the differences in the processor architecture to ensure the portability of the system. The kernel can perform thread scheduling and control, trap processing and exception management, interrupt processing, etc.

[0105] Device drivers run in kernel mode and are interfaces between the I / O system and related hardware. Device drivers may include dynamic tuning technology (DTT) drivers, OS2SOC drivers, graphics drivers, audio drivers, video drivers, camera drivers, keyboard drivers, etc.

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

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

[0108] The firmware layer may include BIOS, power control table, ODVP policy, etc.

[0109] BIOS is a set of programs embedded in the read-only memory (ROM) chip of electronic devices. It stores the computer's basic input and output programs, the self-test program after powering on, and the system self-starting program. It can read and write specific information of system settings from complementary metal oxide semiconductor (CMOS). BIOS can provide hardware settings and control for electronic devices, allowing the system and applications to access hardware resources.

[0110] The power control table is configured with the operation strategy of the electronic device hardware level. It is understandable that when the chip platform of the electronic device adjusts the operation parameters of the electronic device based on the operation strategy issued by the upper-level 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 give priority to adjusting the operation parameters of the electronic device based on the operation strategy configured in the power control table.

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

[0112] It should be noted that the embodiments of the present application are only illustrated using the Windows system as an example. In other operating systems (such as the Android system, the IOS system, etc.), as long as the functions implemented by each functional module are similar to those in the embodiments of the present application, the solutions of the present application can also be implemented.

[0113] Combination Figure 3 Schematic diagram of software modules, Figure 4 A schematic diagram showing the interaction of various modules during the delivery of an operation strategy in an electronic device.

[0114] For the sake of ease of description, the embodiment of the present application will subsequently refer to the operating strategy issued by the AI ​​performance and power consumption model as operating strategy A, the operating strategy issued by the scene recognition module as operating strategy B, and the operating strategy output by the strategy fusion module after fusion analysis as fusion strategy.

[0115] The scene recognition module in the scene recognition engine can identify the current operating scene of the electronic device based on the system state information, and search the policy table for an operating strategy B that matches the current operating scene, and send the operating strategy B to the policy fusion module. It is understandable that the operating strategy B may include parameters that affect the power consumption of the electronic device and the operating performance of the electronic device.

[0116] Exemplarily, the scene recognition module may send a request to query the system status information to the system probe module. In response to the request, the system probe module may subscribe to kernel events from the kernel layer to determine the system status information according to the callback function fed back by the kernel layer and report it to the scene recognition module.

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

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

[0119] The peripheral status probe can subscribe to peripheral events from the kernel layer and determine the peripheral status information based on the callback function fed back by the kernel layer.

[0120] The process load probe can subscribe to the process load event from the kernel layer and determine the process load information according to the 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 the system load information based on the callback function fed back by the kernel layer.

[0122] The audio and video status probe can subscribe to audio and video events from the kernel layer, and determine the current audio and video status information of the electronic device based on the callback function fed back by the kernel layer. For example, the audio and video status probe can send a request to subscribe to GPU decoding information to the OsEventDriver node of the executive body, and the OsEventDriver node forwards the request to the graphics card driver of the kernel and driver layer. After receiving the request, the graphics card driver feeds back the callback function to the audio and video status probe through the OsEventDriver node, so that after monitoring that the GPU is performing a decoding operation, the audio and video status information can be obtained based on the callback function of the audio and video status probe.

[0123] The system event probe can subscribe to system events from the kernel layer and determine the system event information based on the callback function fed back by the kernel layer. For example, the system event probe can send a request to subscribe to process creation information to the OsEventDriver node, and the OsEventDriver node forwards the request to the process manager. After receiving the request, the process manager feeds back the callback function to the system event probe through the OsEventDriver node, so that after the process is created, the system event information is obtained based on the system event probe feedback callback function. For another example, the system event probe also sends a request to subscribe to the focus window change information to the API module, and the API module feeds back the callback function to the system event probe to monitor whether the focus window of the electronic device has changed, and when the focus window is monitored to change, the focus window change information is obtained based on the system event probe feedback callback function.

[0124] It can be seen that the system probe module can obtain the probe status, that is, the system status information of the electronic device, by subscribing to various events of the electronic device from the kernel layer and then obtaining the probe status according to the callback function fed back by the kernel layer.

[0125] Furthermore, the scene recognition module can also identify the current operating scene of the electronic device through the whitelist mechanism based on the acquired system status information, search the policy table for the operating strategy B that matches the current operating scene, and send the operating strategy B to the policy fusion module.

[0126] For example, when an application is running in the system foreground of an electronic device, 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. Then, the scene recognition module can obtain relevant information about the process based on the system probe module, such as the relevant information of the process including the process name of the process and the application name corresponding to the process. For the convenience of description, the application process running in the system foreground is referred to as the target process.

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

[0128] Exemplarily, the application list may be as shown in Table 1. The application list may include the application name, the process name of the application, and the running scenario 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 the video class. 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 the office class. 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 the social class, which will not be repeated.

[0130] Table 1

[0131] Application Name Process Name Run the scenario Application 1 app1.exe Video Application 2 app2.exe Office Application 3 app3.exe Games Application 4 app4.exe Social ...... ...... ......

[0132] It should be noted that Table 1 is only an example. In fact, Table 1 may also include more or fewer application names, application process names, and the running scenarios to which they belong.

[0133] The AI ​​performance power consumption model can obtain the operating scenario from the scene recognition engine, and by learning the system status information, determine the operating strategy A that matches the current operating scenario of the system, and send the operating strategy A to the strategy fusion module. It can be understood that the operating strategy A may include parameters that affect the power consumption of the electronic device. The specific implementation of the AI ​​performance power consumption model can refer to the following Figure 5 The relevant descriptions in the corresponding embodiments will not be repeated here.

[0134] The strategy fusion module performs a fusion analysis on operation strategy A and operation strategy B to obtain a fusion strategy that can maintain a certain operation performance while reducing the operation power consumption. The strategy fusion module can also send the fusion strategy to the first scheduling engine. Then the first scheduling engine can send the fusion strategy to the module related to the chip platform.

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

[0136] In some scenarios, the AI ​​performance power consumption model can send operation strategy A to the second scheduling engine. The second scheduling engine can send instructions to the CPU through the OS2SOC driver node, and the instructions carry the operation parameter 3 in the operation strategy 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 instructions are issued in the same thread or process. The instructions issued can carry operating parameters 1, operating parameters 2 and / or operating parameters 3 in the operating strategy, wherein operating parameters 1, operating parameters 2 and operating parameters 3 can be different operating parameters in the operating strategy. 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 thereto.

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

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

[0140] (5.1) Perception center.

[0141] The perception middle platform 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 acquisition module may send a request for querying system status information to the system probe module of the scene recognition engine, and the system probe module may report the system status information to the meta-capability acquisition module in response to the request. The system probe module may include multiple probes, which may be specifically referred to in Figure 4 The relevant description of the system probe module in the corresponding embodiment is not repeated here. For example, the meta-capability acquisition module can obtain power status information through a power status probe, obtain peripheral status information through a peripheral status probe, obtain process load information through a process load probe, obtain audio and video status information through an audio and video status probe, obtain system load information through a system load probe, obtain system event information through a system event probe, etc.

[0143] The meta-capability acquisition module can send system status information to the data center for storage. The meta-capability acquisition module can also be used to determine the first event or the second event. After obtaining the first event or the second event, the first event or the second event can also be sent to the fence module, so that the fence module can use the first event or the second event to trigger the decision-making center to obtain system status information from the perception center. The meta-capability acquisition module can also send the system status information corresponding to the current running scenario to the snapshot module, so that the decision-making center can quickly obtain the system status information corresponding to the current running scenario from the snapshot module.

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

[0145] The first event may include one or more of the following events: user operation events on the current focus window, freeze events, performance limited events, or performance power consumption model training events, etc. Among them, the operation event may 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 of the electronic device is limited as fed back by the hardware. The limited hardware performance may be that the operating speed of the chip of the electronic device is limited. In some embodiments, the performance limited event may 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 may also include an event generated by the electronic device after the user uses the electronic device, and the event generally does not affect the operating performance of the electronic device, but affects the power consumption of the electronic device. Exemplarily, the second event may be a change in the size of the focus window, a change in the CPU / GPU / network usage, a conversion between AC and DC modes, a PL1 setting not taking effect, or a power level of the electronic device being less than a preset value.

[0147] It is understandable that if the electronic device has a first event, the decision-making center can determine the operation strategy A by calling the performance power consumption model, and send the operation strategy A to the scheduling engine, so that the electronic device operates according to the operation strategy A. If the electronic device has a second event, the decision-making center can determine the operation strategy A by calling the performance power consumption model, and send the operation strategy A to the scene recognition engine, and then the scene recognition engine can compare the operation strategy A and the operation strategy B, and send the compared fusion strategy to the scheduling engine, so that the electronic device operates according to the fusion strategy. Among them, the scheduling engine can be Figure 4 The first scheduling engine or the second scheduling engine in the corresponding embodiment.

[0148] (5.2) Learning the middle platform.

[0149] The perception center can send system status information to the learning center. The learning center can use the system status information to train the performance power consumption model. The performance power consumption model can be used to represent the mapping relationship between the system status information of the running scenario and the running strategy.

[0150] (5.3) Decision-making platform.

[0151] In a possible implementation, the decision-making center may send the operation strategy A to the scheduling engine.

[0152] Exemplarily, the perception middle station may determine a first event. In response to the first event, the perception middle station may trigger the decision middle station to obtain system status information from the perception middle station.

[0153] The decision-making platform can obtain system status information from the perception platform when the first event is triggered. The decision-making platform can also call the performance power consumption model trained by the learning platform, input the system status information into the trained performance power consumption model, obtain operation strategy A, and send operation strategy A to the scheduling engine.

[0154] The scheduling engine can perform scheduling based on the operation strategy A, thereby controlling the operation parameters of the electronic device. For example, the scheduling engine can send an instruction to the CPU through the OS2SOC driver node, and the instruction carries the operation parameter 3 in the operation strategy A, so that the electronic device can maintain a certain operation performance while reducing the operation power consumption.

[0155] It is understandable that when the first event occurs, it indicates that the operating performance of the electronic device has been reduced, and it is necessary to quickly improve the operating performance of the electronic device, thereby reducing the jamming of the electronic device. Since the performance power consumption model can be used to quickly and reasonably output the operating strategy A, the operating strategy A can be related to limiting power consumption and improving the operating performance of the electronic device. Therefore, the electronic device can use the performance power consumption model to output the operating strategy A, thereby quickly improving the operating performance of the electronic device and improving the user experience.

[0156] In another possible implementation, the decision-making center may send the operation strategy A to the scene recognition engine.

[0157] Exemplarily, the perception middle station may determine a second event. In response to the second event, the perception middle station may trigger the decision middle station to obtain system status information from the perception middle station.

[0158] The decision-making center can send operation strategy A to the scene recognition engine when triggered by the second event. Among them, operation strategy A may include the current operation scenario, the decision-making center calls the performance power consumption model to determine the operation strategy corresponding to the current operation scenario, and the mandatory information of the performance power consumption model. The mandatory information of the performance power consumption model may include the mandatory degree information of the performance power consumption model call and the mandatory reason. For example, the mandatory degree information of the performance power consumption model call is the operation strategy obtained by comparing the two methods, and the mandatory reason is triggered by the second event.

[0159] The scene recognition engine can obtain a compared fusion strategy by comparing operation strategy A and operation strategy B, and send the fusion strategy to the scheduling engine.

[0160] The scheduling engine can perform scheduling based on the fusion strategy to control the electronic device. For example, the scheduling engine can send instructions to the CPU through the power manager and BIOS, and the instructions carry the operating parameter 1 in the fusion strategy. The scheduling engine can also send instructions to the Intel DTT driver through WMI, and the instructions carry the operating parameter 2 in the fusion strategy, so that the electronic device can maintain a certain operating performance while reducing the operating power consumption.

[0161] It is understandable that since the strategy output by the AI ​​performance power consumption model is more inclined to reduce the power consumption of electronic devices and improve the endurance of electronic devices, if the scene recognition module recognizes that the current operation scenario of the electronic device is a performance scenario, it means that the current electronic device has high requirements for operation performance. Then the strategy fusion module can give priority to the operation strategy B output by the scene recognition module and send the operation strategy B to the system. Among them, the performance scenario can be understood as an operation scenario that takes into account the operation performance of electronic devices while reducing the power consumption of electronic devices, such as programming scenarios, video scenarios, game scenarios, large file opening scenarios, 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 detailed. For example, the scene recognition module recognizes 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 browser scene corresponding strategies, including PL1 of 45W for light load, PL1 of 15W for medium load, and PL1 of 9W for heavy load, the PL1 in the operation strategy B issued by the scene recognition module can only be 45W, 15W or 9W. The operation strategy A output by the AI ​​performance power consumption model can set PL1 with a finer granularity. Assuming that the AI ​​performance power consumption model can set PL1 with an adjustment granularity of 1W, for example, PL1 can be set to 9W, 8W, 7W, 6W, etc.

[0163] Therefore, if the scene recognition module recognizes that the current operating scenario of the system is a power consumption scenario, it means that the current electronic device has relatively low requirements for operating performance, and the policy fusion module can send the operating strategy A to the scheduling engine to improve the adjustment accuracy of the operating parameters. Among them, the power consumption scenario can be understood as an operating scenario mainly for the purpose of reducing the power consumption of electronic devices, such as office scenarios, social scenarios, etc.

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

[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 be timed by a first timer, and an operation strategy A is sent to the scene recognition engine every preset period, and the period of the first timer is a preset period. The scene recognition engine can be timed by a second timer to detect whether the operation strategy A can be obtained every preset period, and the period of the second timer can also be a preset period. Among them, 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 operation strategy A, it can perform a fusion analysis on operation strategy A and operation strategy B to obtain a fusion strategy, and send the fusion strategy to the scheduling engine; the scene recognition engine can also return the execution result to the AI ​​performance power consumption model. The execution result may include information in the fusion strategy, which may include information such as operation scenarios and operation parameters. In a possible implementation, the operation parameters can be expressed in the form of key-value pairs, for example, the identifier of PL1 and the value corresponding to PL1, the identifier of EPP and the value corresponding to EPP, etc.

[0168] It is understandable that when the operation scenario is a performance scenario, the AI ​​performance power consumption model may not send operation 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 at a preset period. The preset message can be used to indicate that the AI ​​performance power consumption model is running normally, or it can be used to indicate that the AI ​​performance power consumption model has not sent operation strategy A, or it can also indicate that the scene recognition engine does not need to consider operation strategy A when issuing the operation strategy. After issuing operation strategy B, the scene recognition engine can still return the 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 operation strategy A or preset message of the AI ​​performance power consumption model, and judge whether the AI ​​performance power consumption model is running normally according to the period of obtaining the operation strategy A or the preset message, that is, the scene recognition engine can sense whether the AI ​​performance power consumption model has abnormal operation. The AI ​​performance power consumption model can also judge 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 sense whether the scene recognition engine has abnormal operation.

[0170] Based on this, the scene recognition engine and the AI ​​performance power consumption model can sense whether each other is operating normally, so that when abnormal situations occur in the scene recognition engine or the AI ​​performance power consumption model, they can be processed in time, so that the operating 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 operation strategy A according to the execution results returned by the scene recognition engine. For example, assuming that in the operation strategy A sent by the AI ​​performance power consumption model, PL1 is set to 10W, but in the execution result returned by the scene recognition engine, PL1 is 9W, then the next time the AI ​​performance power consumption model sends the operation strategy A, PL1 will not be repeatedly set to 9W, and the AI ​​performance power consumption model can set PL1 to 8W or a lower value. In other words, the AI ​​performance power consumption model can learn based on the execution results 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 operating state between performance and power consumption.

[0172] For example, Figure 7 The schematic diagram of the process of issuing an operation strategy for an electronic device is shown. The process may include (7.1) initialization of the heartbeat flag, (7.2) scene recognition branch, (7.3) AI performance power consumption model branch, (7.4) heartbeat flag update (7.5) strategy fusion decision, and (7.6) strategy issuance and execution.

[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 operating 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 may record the heartbeat flag AIHeartFlag of the AI ​​performance power consumption model and initialize it, for example, the heartbeat flag AIHeartFlag may be initialized to 1. The AI ​​performance power consumption model may record the heartbeat flag TurboHeartFlag of the scene recognition engine and initialize it, for example, the heartbeat flag TurboHeartFlag may be initialized to 1.

[0176] It is understandable 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, and the heartbeat flag AIHeartFlag and the heartbeat flag TurboHeartFlag can also be initialized to other values, which are not limited in the embodiments of the present application. For the sake of ease of description, the following explanation is given by taking the initial values ​​of the heartbeat flag AIHeartFlag and the heartbeat flag TurboHeartFlag as 1 as an example.

[0177] (7.2) Scene recognition branch.

[0178] In a possible implementation, in the policy table of the scene recognition engine, different operating scenarios may correspond to their own policy identifiers, and the scene recognition module may obtain the corresponding policy identifiers, based on the current operating scenario of the electronic device.

[0179] For example, if the current operating scenario of the electronic device is a power consumption scenario, the corresponding policy identifier tendency may be 0; if the current operating scenario of the electronic device is a performance scenario, the corresponding policy identifier tendency may be 1. The value of the policy identifier tendency may be pre-set in the policy table by the electronic device, and the policy identifier tendency may also have other values, which are not limited in the embodiments of the present application.

[0180] It can be understood that when the policy identifier tendency is 0, it means that the electronic device is currently in the power consumption scenario, and the scene recognition engine can comprehensively consider operation strategy A and operation strategy B to output the fusion strategy. When the policy identifier tendency is 1, it means that the electronic device is currently in the performance scenario. 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 give priority to operation strategy B, where the operation strategy B can include parameters that affect the power consumption of the electronic device and parameters that affect the operating performance of the electronic device.

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

[0182] The AI ​​performance power consumption model can output an operation strategy A by learning the system status information. The operation strategy A may include parameters that affect the power consumption of the electronic device. The AI ​​performance power consumption model can also send the operation strategy A to the scene recognition engine through an IPC message.

[0183] (7.4) Update of heartbeat flag.

[0184] It is understandable that the electronic device can update the value of the heartbeat flag AIHeartFlag when the AI ​​performance power consumption model operates abnormally; the electronic device can also update the value of the heartbeat flag TurboHeartFlag when the scene recognition engine operates abnormally.

[0185] Exemplarily, the scene recognition engine can detect whether it can obtain operation strategy A every preset period. If the scene recognition engine can obtain operation strategy A or a preset message every preset period, it means that the AI ​​performance power consumption model is running normally. If the scene recognition engine does not obtain operation strategy A or a preset message in the preset period, the scene recognition engine can accumulate a first count value, which can be used to indicate the number of consecutive times that operation strategy A or a preset message has not been obtained. If the first count value reaches the first preset number of times, it means that the AI ​​performance power consumption model may have an abnormal operation. 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 preset 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 preset by the electronic device, for example, the first preset number of times can be 3, or other values. The specific initial value of the first count value and the value of the first preset number of times are not limited in the embodiment of the present application. For the convenience of description, the following description is taken as an example that the initial value of the first count value is 0 and the first preset number of times is 3.

[0187] It is understandable that, when the scene recognition engine can obtain the operation 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 determine whether the current first count value is 0. If the first count value is 0, it does not need to be set. If the first count value is not 0, it is necessary to set the first count value to 0. The scene recognition engine can also set the heartbeat flag AIHeartFlag to 1, or the scene recognition engine can determine whether the current heartbeat flag AIHeartFlag is 1. If the first count value is 1, it does not need to be set. If the heartbeat flag AIHeartFlag is not 1, it is necessary to set the heartbeat flag AIHeartFlag to 1.

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

[0189] Among them, the initial value of the second count value can be preset 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 preset 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 specific initial value of the second count value and the value of the second preset number of times are not limited in the embodiment of the present application. For the convenience of description, the following description is taken as an example that the initial value of the second count value is 0 and the second preset number of times is 3 times.

[0190] It is understandable that, when 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 determine whether the current second count value is 0. If the second count value is 0, it does not need to be set. If the second count value is not 0, it is necessary to set the second count value 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 determine whether the current heartbeat flag TurboHeartFlag is 1. If the second count value is 1, it does not need to be set. If the heartbeat flag TurboHeartFlag is not 1, it is necessary to set the heartbeat flag TurboHeartFlag to 1.

[0191] (7.5) Strategy fusion decision.

[0192] In the embodiment of the present application, the electronic device may have different operating strategies according to different values ​​of the heartbeat flag AIHeartFlag, the heartbeat flag TurboHeartFlag and the strategy flag tendency.

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

[0194] When the AI ​​performance power consumption model sends operation strategy A, if it is judged that the heartbeat flag TurboHeartFlag is equal to 0, it means that the scene recognition engine may have an operation abnormality. The AI ​​performance power consumption model can perceive the abnormality of the scene recognition engine and further determine whether the various operating parameters in the current electronic device are the default operating parameters.

[0195] If the various operating parameters in the current electronic device are default operating parameters, the AI ​​performance power consumption model can stop working. Among them, the default operating parameters can be pre-set by the electronic device, and the default values ​​of each parameter in the specific default operating parameters are not limited in the embodiment of the present application.

[0196] If the various operating parameters in the current electronic device are not the default operating parameters, the AI ​​performance power consumption model can set the various operating parameters in the electronic device to the default operating parameters through the scheduling engine. After sending the default operating parameters to the scheduling engine, the AI ​​performance power consumption model can stop working.

[0197] In the embodiment of the present application, the AI ​​performance power consumption model stops working, which can be understood as the AI ​​performance power consumption model does not execute the learning logic and does not send the operation 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 has an abnormality, the AI ​​performance power consumption model stops working after issuing the default operating parameters. On the one hand, the electronic device can operate normally and stably based on the default operating parameters. On the other hand, when the AI ​​performance power consumption model stops working, it can reduce unnecessary execution logic in the electronic device, reduce computing power, and improve the operating performance of the electronic device.

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

[0200] In the embodiment of the present application, the strategy identifier lastStrategy tendency corresponding to the last time the scene recognition engine issued a fusion strategy may also be referred to as the last strategy identifier lastStrategy tendency.

[0201] It is understandable that during the operation of the electronic device, when the scene recognition engine detects that the current operating scene has changed, for example, from a power consumption scene to a performance scene, or from a performance scene to a power consumption scene, the scene recognition engine can update the policy identifier tendency. Exemplarily, if the current operating scene changes from a power consumption scene to a performance scene, the scene recognition engine can set the policy identifier tendency to 1; if the current operating scene changes from a power consumption scene to a power consumption scene, the scene recognition engine can set the policy identifier tendency to 0.

[0202] When the value of the strategy identifier tendency changes, the scene recognition engine can update the value of the last strategy identifier lastStrategy tendency to the value of the changed strategy identifier tendency. When the scene recognition engine interacts with the AI ​​performance power consumption model through messages, the scene recognition engine can carry the last strategy identifier lastStrategytendency, so that the AI ​​performance power consumption model can accurately judge the current operating scenario of the electronic device based on lastStrategy tendency.

[0203] Exemplarily, 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, it means that the scene recognition engine is running normally, then the AI ​​performance power consumption model can further determine the last strategy flag lastStrategy tendency.

[0204] If the last strategy indicator lastStrategy tendency is equal to 0, it means that the current operation scenario is a power consumption scenario, and the power consumption scenario has not been exited, that is, from the moment when the last strategy indicator lastStrategy tendency was set to 0 to the current moment, the electronic device has been maintaining the power consumption scenario. Therefore, the AI ​​performance power consumption model can send operation strategy A to the scene recognition engine, and then the scene recognition engine can perform a fusion analysis based on operation strategy A and operation strategy B to obtain a fusion strategy, and send the fusion strategy to the scheduling engine.

[0205] If the last strategy indicator lastStrategy tendency is equal to 1, it means that the current operation scene is the performance scene, and the performance scene has not been exited, that is, from the moment when the last strategy indicator lastStrategy tendency was set to 1 to the current moment, the electronic device has been maintained in the performance scene. Therefore, the AI ​​performance power consumption model may not send operation strategy A to the scene recognition engine. The scene recognition engine can send operation strategy B to the scheduling engine.

[0206] It should be noted that when the last strategy indicator lastStrategy tendency is equal to 1 and the AI ​​performance power consumption model does not send operation 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 at a preset period. The preset message can be used to indicate that the AI ​​performance power consumption model is running normally, or it can be used to indicate that the AI ​​performance power consumption model has not sent operation strategy A, or it can be used to indicate that the scene recognition engine does not need to consider operation strategy A when issuing the operation strategy. After issuing operation strategy B, the scene recognition engine can still return the execution result to the AI ​​performance power consumption model 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 policy flag tendency is equal to 1.

[0208] If the scene recognition engine determines that the heartbeat flag AIHeartFlag 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 operating scenario based on the current policy identifier tendency.

[0209] If the current strategy flag tendency is equal to 1, it means that the current operating scenario is a performance scenario. Since the strategy output by the AI ​​performance power consumption model is more inclined to reduce the power consumption of electronic devices, the scene recognition engine can give priority to operating strategy B to improve the performance of electronic devices.

[0210] If the current policy identifier tendency is equal to 0, it means that the current operating scenario is a power consumption scenario. Then the scenario recognition engine can perform a fusion analysis on the operating strategy A and the operating strategy B to obtain a fusion strategy and send it to the scheduling engine.

[0211] In a possible implementation, if tendency is equal to 0 and the electronic device does not have the first event, the scene recognition engine can select the strategy that can make the electronic device consume less power from the operation strategy A and the operation strategy B as the fusion strategy, and send it to the scheduling engine. In this way, when no event that affects the operation performance of the electronic device occurs, the operation strategy with lower power consumption can be adopted, thereby reducing the power consumption of the electronic device.

[0212] In another possible implementation, if tendency is equal to 0 and the first event occurs in the electronic device, the scene recognition engine can select the operation strategy that can make the electronic device consume more power among operation strategy A and operation strategy B as the fusion strategy, and send it to the scheduling engine. In this way, when an event occurs that affects the operation performance of the electronic device, an operation strategy with higher power consumption can be adopted, thereby appropriately improving the performance of the electronic device and reducing the jamming of the electronic device.

[0213] It is understandable that when the first event occurs, it indicates that the operating performance of the electronic device has been reduced, and it is necessary to quickly improve the operating performance of the electronic device to reduce the lag of the electronic device. Since the AI ​​performance power consumption model can be used to quickly and reasonably output the operating strategy A, the operating strategy A can be related to limiting power consumption and improving the operating performance of the electronic device. Therefore, the electronic device can use the AI ​​performance power consumption model to output the operating strategy A, thereby quickly improving the operating performance of the electronic device and improving the user experience.

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

[0215] If the scene recognition engine determines that the heartbeat flag AIHeartFlag is equal to 0, it means that the AI ​​performance power consumption model may be running abnormally. The scene recognition engine can sense the abnormality of the AI ​​performance power consumption model. At this time, regardless of whether the current policy flag tendency is 0 or 1, the scene recognition engine selects running policy B. In other words, when the AI ​​performance power consumption model runs abnormally, regardless of whether the current scenario is power consumption or performance, the scene recognition engine selects running policy B sent by the scene recognition module.

[0216] In this way, when the scene recognition engine perceives that the AI ​​performance power consumption model is running abnormally, the scene recognition engine can still have the ability to adjust the operation strategy according to the operation scenario, so that in the power consumption scenario, the electronic device will not always use the operation strategy A last issued by the AI ​​performance power consumption model. Furthermore, when the parameters such as PL1 in the operation strategy A last issued by the AI ​​performance power consumption model are set too low, the scene recognition engine can issue the operation strategy B to the scheduling engine, so that the performance of the electronic device can be in a stable state, reduce the occurrence of freezes, and improve the user experience.

[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 the next time the electronic device is restarted, or the scene recognition engine can trigger the AI ​​performance power consumption model to run as needed, or the AI ​​performance power consumption model can be started after a period of time. The specific timing of starting the AI ​​performance power consumption model is not limited in the embodiments of the present application.

[0218] (7.6) Issuance and execution of operation strategies.

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

[0220] Fig. 9 The timing diagram of the interaction process of each module in the electronic device is shown. The interaction process may include (9.1) a process of initializing a heartbeat flag, (9.2) a process of interacting with a heartbeat message, and (9.3) an anomaly detection process.

[0221] (9.1) Heartbeat flag initialization process.

[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. The specific initialization process of the heartbeat flag can be referred to Figure 7 The relevant description of the initialization of the heartbeat flag in (7.1) of the corresponding embodiment will not be repeated here.

[0223] (9.2) Heartbeat message interaction process.

[0224] The scene recognition module in the scene recognition engine can identify the current operating scene of the electronic device, search the policy table for the operating strategy B that matches the current operating scene, and send the operating strategy B to the policy fusion module. The specific process of the scene recognition engine identifying the operating scene and the scene recognition engine sending the operating strategy B can be referred to Figure 4 The relevant descriptions in the corresponding embodiments are not repeated here.

[0225] The AI ​​performance power consumption model can obtain the operating scenario from the scenario recognition engine, learn the system status information through the performance power consumption model, determine the operating strategy A that matches the current operating scenario of the system, and send the operating strategy A to the strategy fusion module. The specific implementation of the performance power consumption model learning can refer to Figure 5 The relevant descriptions in the corresponding embodiments will not be repeated here.

[0226] The strategy fusion module performs a fusion analysis on operation strategy A and operation strategy B to obtain a fusion strategy that can reduce the operation power consumption while maintaining a certain operation performance. The strategy fusion module can also send the fusion strategy to the scheduling engine. Then the scheduling engine can schedule the operation parameters of the electronic device based on the fusion strategy.

[0227] It is understandable that the AI ​​performance power consumption model can periodically send operation strategy A to the scene recognition engine. The scene recognition engine can determine whether the AI ​​performance power consumption model is operating normally based on the period of obtaining operation strategy A. The scene recognition engine can send the fusion strategy 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 operating normally based on the execution result returned by the scene recognition engine, and can also perform model learning based on the execution result. The specific process of mutual perception of whether each other is operating normally, and the process of model learning based on the execution result, can refer to Figure 6 The description in the corresponding embodiment will not be repeated here.

[0228] It can be understood that the process of the AI ​​performance power consumption model sending operation policy A to the policy fusion module and the process of the scene recognition module sending operation policy B to the policy fusion module in (9.2) can be executed in the same order. The AI ​​performance power consumption model sending operation policy A and the scene recognition module sending operation policy B can be executed in parallel, and the process of the AI ​​performance power consumption model sending operation policy A can also be earlier or later than the process of the scene recognition module sending operation policy B, which is not limited in the embodiments of the present application. In addition, the process of the heartbeat message interaction in (9.2) only exemplifies an execution process once, and can actually be represented as including multiple executions.

[0229] (9.3) Anomaly detection process.

[0230] The AI ​​performance power consumption model can detect whether the scene recognition engine is running abnormally according to the value of the heartbeat flag TurboHeartFlag and the last strategy flag 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 run stably.

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

[0232] If the last strategy identifier lastStrategy tendency is equal to 0, it means that the current operating scenario is a power consumption scenario, and the AI ​​performance power consumption model can send operating strategy A to the scene recognition engine. If the last strategy identifier lastStrategytendency is equal to 1, it means that the current operating scenario is a performance scenario, and the AI ​​performance power consumption model may not send operating strategy A to the scene recognition engine, but send a preset message.

[0233] For details about the situation where TurboHeartFlag is equal to 1 and the judgment process of the last strategy flag lastStrategytendency, please refer to Figure 7 The description of situation 2 in the fusion decision of the strategy (7.5) of the corresponding embodiment will not be repeated here.

[0234] If the AI ​​performance power consumption model determines that TurboHeartFlag is equal to 0, it means that the scene recognition engine may have an abnormal operation. The AI ​​performance power consumption model can further determine whether the various operating parameters in the current electronic device are the default operating parameters.

[0235] If the various operating parameters in the electronic device are the default operating parameters, the AI ​​performance power consumption model can stop working. If the various operating parameters in the electronic device are not the default operating parameters, the AI ​​performance power consumption model can set the various operating parameters in the electronic device to the default operating parameters through the scheduling engine. After sending the default operating parameters to the scheduling engine, the AI ​​performance power consumption model can stop working.

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

[0237] The scene recognition engine can detect whether there is any abnormality in the operation of the AI ​​performance and power consumption model based on the values ​​of the heartbeat flag AIHeartFlag and the policy flag tendency. If the AI ​​performance and power consumption model operates abnormally, the scene recognition engine can make corresponding processing so that the electronic device can operate stably.

[0238] For example, if the scene recognition engine determines that the heartbeat flag AIHeartFlag is equal to 0, it means that the AI ​​performance power consumption model may have an operating abnormality. At this time, regardless of whether the current policy flag tendency is 0 or 1, the scene recognition engine sends operating strategy B to the scheduling engine.

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

[0240] If the scene recognition engine determines that the heartbeat flag AIHeartFlag 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 operating scenario based on the policy identifier tendency.

[0241] If the policy flag tendency is equal to 1, it means that the current operation scenario is a performance scenario, and the scenario recognition engine can give priority to operation strategy B and send it to the scheduling engine. If the policy flag tendency is equal to 0, it means that the current operation scenario is a power consumption scenario, and the scenario recognition engine can perform a fusion analysis on operation strategies A and B to obtain a fusion strategy and send it to the scheduling engine.

[0242] For details about the situation where AIHeartFlag is equal to 1, please refer to Figure 7 The description of situation 3 in the fusion decision of the strategy (7.5) of the corresponding embodiment will not be repeated here.

[0243] It is understandable that the above four situations do not distinguish the order of execution in implementation. The AI ​​performance power consumption model and the scene recognition engine can judge the operation scene or abnormal scene according to the heartbeat mark and policy mark, and issue different operation strategies for different operation scenes or abnormal scenes. In this way, when the AI ​​performance power consumption model is abnormal, the scene recognition engine can handle it in time, or when the scene recognition engine is abnormal, the AI ​​performance power consumption model can handle it in time, so that the operation performance of the electronic device remains stable, and the power consumption is not too high, reducing the occurrence of electronic device jams.

[0244] The following specific embodiments are used to describe the method of the present application in detail. The following embodiments may be combined with each other or implemented independently, and the same or similar concepts or processes may not be described in detail in some embodiments.

[0245] Fig.10 The resource scheduling method of an embodiment of the present application is shown, which is applied to an electronic device. The method includes:

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

[0247] In the embodiment of the present application, the system status information can refer to Figure 3 The relevant description about the system status information in the corresponding embodiment will not be repeated here.

[0248] S1002. When the first module of the electronic device senses that the second module of the electronic device is operating abnormally, execute a first operating strategy based on the instruction of the first module; wherein the first module is used to determine the first operating strategy based on system status information, and the first operating strategy includes parameters that affect the power consumption of the electronic device and the operating performance of the electronic device; and the second module is used to determine the second operating strategy based on the system status information, and the second operating strategy includes parameters that affect the power consumption of the electronic device.

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

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

[0251] The process of the first module sensing the abnormal operation of the second module can be referred to Figure 6 The relevant description in the corresponding embodiment, and Figure 7 The relevant description of situation 4 in the fusion decision of the strategy (7.5) of the corresponding embodiment will not be repeated here.

[0252] S1003: When the second module senses that the first module operates abnormally, execute a third operation strategy based on an instruction of the second module, where the third operation strategy is an operation strategy preset in the electronic device.

[0253] In the embodiment of the present application, the operation strategy preset in the electronic device can be understood as Figure 7 The default operating parameters of Case 1 in the fusion decision of the strategy (7.5) of the corresponding embodiment.

[0254] The process of the second module sensing the abnormal operation of the first module can be referred to Figure 6 The relevant description in the corresponding embodiment, and Figure 7 The relevant description of situation 1 in the fusion decision of the strategy (7.5) of the corresponding embodiment will not be repeated here.

[0255] In the resource scheduling method provided in the embodiment of the present application, the AI ​​performance power consumption model and the scene recognition engine can sense whether abnormalities occur in each other. When an abnormality occurs in the AI ​​performance power consumption model, the electronic device can operate based on the first operating strategy issued by the scene recognition engine. When an abnormality occurs in the scene recognition engine, the electronic device can operate based on the third operating strategy issued by the AI ​​performance power consumption model. In this way, the operating performance of the electronic device can be kept stable and the power consumption will not be too high, thereby reducing the occurrence of freezes.

[0256] Optional, in Fig.10On the basis of the corresponding embodiments, when the second module senses that the first module is operating abnormally, before executing the third operating strategy based on the instruction of the second module, it may also include: the second module transmits a first message to the first module; when the second module senses that the first module is operating abnormally, executing the third operating strategy based on the instruction of the second module, it may include: when the second module fails to obtain the second message from the first module for N consecutive times, executing the third operating strategy based on the instruction 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.

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

[0258] The process of the second module sensing the abnormal operation of the first module can be referred to Figure 6 The relevant description in the corresponding embodiment, and Figure 7 The description of case 1 in the fusion decision of the strategy (7.5) of the corresponding embodiment is not repeated here. Figure 7 The second preset number of times in the corresponding embodiment. For example, N can be 3, or other values, which are not limited in the embodiment of the present application.

[0259] The second module can determine whether the first module is operating normally based on the second message returned by the first module. In this way, the second module can sense whether the first module has an operating abnormality, so that when an abnormality occurs in the first module, the second module can handle it in time, so that the operating performance of the electronic device remains stable and the power consumption is not too high.

[0260] Optional, in Fig.10 On the basis of the corresponding embodiment, a first identifier is recorded in the second module, and the first identifier is used to indicate whether the first module is operating normally. When the second module fails to obtain the second message from the first module for N consecutive times, a third operation strategy is executed based on the instruction of the second module. It may include: when the second module fails to obtain the second message from the first module for N consecutive 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 operating abnormally; according to the first value of the first identifier, the third operation strategy is executed based on the instruction of the second module.

[0261] In the embodiment of the present application, the first identifier can be understood as Figure 7The heartbeat flag TurboHeartFlag of the scene recognition engine in the corresponding embodiment. The first value is used to indicate that the first module is running abnormally. For example, the first value can be Figure 7 In the corresponding embodiment, the heartbeat flag TurboHeartFlag is 0. For the specific process of setting the first flag to the first value in the second module, please refer to Figure 7 The relevant description of updating the heartbeat flag in (7.4) of the corresponding embodiment will not be repeated here.

[0262] It can be understood that the use of the first identifier facilitates recording the operating status of the first module, facilitates judging whether the first module is operating 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 changes in the operating status of the first module can be concisely indicated, and abnormal situations in the first module can be handled in a timely manner.

[0263] Optional, in Fig.10 On the basis of the corresponding embodiment, after executing the third operation strategy based on the instruction of the second module, it can also include: stopping the second module from working, and stopping the working includes stopping determining the second operation strategy.

[0264] In the embodiment of the present application, after the second module instructs the electronic device to execute the third operation strategy, the second module can stop executing. Here, stopping working can be understood as the second module not executing the learning logic and not sending the second operation strategy, but the process corresponding to the second module can continue to run.

[0265] In this way, when the second module senses that an abnormality has occurred in the first module, the second module stops working after sending the default operating parameters. On the one hand, the electronic device can operate normally and stably based on the default operating parameters. On the other hand, when the second module stops working, unnecessary execution logic in the electronic device can be reduced, computing power can be reduced, and the operating performance of the electronic device can be improved.

[0266] Optional, in Fig.10 On the basis of the corresponding embodiments, the second module transmits the first message to the first module, which may include: if the scenario identifier is an identifier corresponding to the power consumption scenario, the second module transmits the first message to the first module, and the first message includes a second operating strategy; wherein, the scenario identifier is used to indicate the operating scenario corresponding to the last time the second module transmitted a message to the first module, and the power consumption scenario is an operating scenario for the purpose of reducing the power consumption of the electronic device; if the scenario identifier is an identifier corresponding to the performance scenario, the second module transmits the first message to the first module, and the first message includes a preset message, and the preset message is used to indicate that the second module is operating normally; wherein, the performance scenario is an operating scenario for the purpose of improving the operating performance of the electronic device.

[0267] In the embodiment of the present application, the scene identification can be understood as Figure 7 The last strategy indicator lastStrategy tendency in the corresponding embodiment will not be described in detail.

[0268] The power consumption scenarios may include office scenarios, social scenarios, etc. The performance scenarios may include programming scenarios, video scenarios, game scenarios, large file opening scenarios, etc. The specific distinction of scenarios may be pre-set by the electronic device, and the embodiments of the present application do not limit this.

[0269] The specific second module determines the implementation of the first message based on the scenario identifier, which can be referred to Figure 7 The description of situation 2 in the fusion decision of the strategy (7.5) of the corresponding embodiment will not be repeated here.

[0270] In the case where the second module does not send the second operating strategy to the first module, the second module still needs to send a preset message to the first module at a preset period. In this way, the first module can judge that the second model is operating normally based on the periodically obtained messages of the second module, thereby being able to continue to maintain a heartbeat connection between the first module and the second module, so that the first module can accurately judge the operating status of the second module and reduce the possibility of misjudgment.

[0271] Optional, in Fig.10 On the basis of the corresponding embodiment, the scene identifier is recorded in the first module, and the method may also include: when the current operating scene is switched from the power consumption scene to the performance scene, the first module updates the scene identifier to the identifier corresponding to the performance scene; the first module passes the scene identifier to the second module; when the current operating scene is switched from the performance scene to the power consumption scene, the first module updates the scene identifier to the identifier corresponding to the power consumption scene; the first module passes the scene identifier to the second module.

[0272] In the embodiment of the present application, the process of setting the scene identifier in the first module can refer to Figure 7 The description of situation 2 in the fusion decision of the strategy (7.5) of the corresponding embodiment will not be repeated here.

[0273] The first module can set a scene identifier based on the current operating scene of the electronic device. When the first module interacts with the second module through messages, the scene recognition engine can carry the scene identifier, so that the second module can accurately determine the current operating scene of the electronic device based on the scene identifier.

[0274] Optional, in Fig.10On the basis of the corresponding embodiments, when the first module of the electronic device senses that the second module of the electronic device is operating abnormally, executing the first operating strategy based on the instruction of the first module may include: when the first module fails to obtain the first message from the second module for N consecutive times exceeding the preset time period, executing the first operating strategy based on the instruction of the first module.

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

[0276] The first module can determine whether the second module is operating normally according to the first message transmitted by the second module. In this way, the first module can sense whether the second module is operating abnormally, so that when the second module is abnormal, the first module can handle it in time, such as instructing the electronic device to execute the first operating strategy, so that the operating performance of the electronic device remains stable and the power consumption is not too high.

[0277] Optional, in Fig.10 On the basis of the corresponding embodiment, a second identifier is recorded in the first module, and the second identifier is used to indicate whether the second module is operating normally. When the first module exceeds the preset time period N times in a row and does not obtain the first message from the second module, the first operation strategy is executed based on the instruction of the first module. It may include: when the first module exceeds the preset time period N times in a row and does not obtain the first message from the second module, the first module sets the second identifier to a second value, and the second value is used to indicate that the second module is operating abnormally; according to the second value of the second identifier, the first operation strategy is executed based on the instruction of the first module.

[0278] In the embodiment of the present 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 In the corresponding embodiment, the heartbeat flag AIHeartFlag is 0. For the specific process of the first module setting the second flag to the second value, please refer to Figure 7 The relevant description of updating the heartbeat flag in (7.4) of the corresponding embodiment will not be repeated here.

[0279] It can be understood that the use of the second identifier facilitates recording the operating status of the second module, facilitates judging whether the second module is operating normally or abnormally, simplifies the execution process of the code in the electronic device, and improves the readability and flexibility of the code, thereby concisely indicating the changes in the operating status of the second module and promptly handling abnormal situations in the second module.

[0280] Optional, in Fig.10 On the basis of the corresponding embodiments, the method may further include: when the first module senses that the second module is operating normally, if the current operating scenario belongs to the performance scenario, executing the first operating strategy based on the instruction of the first module; when the first module senses that the second module is operating normally, if the current operating scenario belongs to the power consumption scenario, and the target event has not occurred in the electronic device, executing the fourth operating strategy based on the instruction of the first module; wherein the fourth operating strategy is a strategy in the first operating strategy and the second operating strategy that can make the electronic device consume less power, and the target event is an event that affects the operating performance of the electronic device; when the first module senses that the second module is operating normally, if the current operating scenario belongs to the power consumption scenario, and the target event has occurred in the electronic device, executing the fifth operating strategy based on the instruction of the first module; wherein the fifth operating strategy is a strategy in the first operating strategy and the second operating strategy that can make the electronic device consume more power.

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

[0282] In the case where the first module perceives that the second module is operating normally, if the current operating scenario belongs to the performance scenario, the process of executing the first operating strategy based on the instruction of the first module can refer to Figure 7 In the fusion decision of the strategy (7.5) in the corresponding embodiment, in case 3, the heartbeat flag AIHeartFlag is equal to 1, and the relevant description of the strategy identifier tendency is equal to 1 is not repeated here.

[0283] When the first module senses that the second module is operating normally, if the current operating scenario belongs to the power consumption scenario, you can refer to Figure 7 In the fusion decision of the strategy (7.5) in the corresponding embodiment, in case 3, the heartbeat flag AIHeartFlag is equal to 1, and the policy identifier tendency is equal to 0, and the relevant description is not repeated here.

[0284] It can be understood that when the first module senses that the second module is operating normally, different operating strategies can be selected according to different current operating scenarios, and the operating parameters of the electronic device can be flexibly adjusted to achieve the purpose of improving the performance of the electronic device and / or reducing the power consumption of the electronic device, thereby reducing the lag of the electronic device.

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

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

[0287] It is understandable that when the target event occurs, it indicates that the operating performance of the electronic device has been reduced, and it is necessary to quickly improve the operating performance of the electronic device, thereby reducing the jamming of the electronic device. Since the second module can be used to quickly and reasonably output the first operating strategy, the first operating strategy can be related to limiting power consumption and improving the operating performance of the electronic device. Therefore, the electronic device can use the second module to output the first operating strategy, thereby quickly improving the operating performance of the electronic device and improving the user experience.

[0288] Optional, in Fig.10 On the basis of the corresponding embodiments, before executing the fourth operation strategy based on the instruction of the first module, it may also include: the second module transmits a third message to the first module, and the third message includes the second operation strategy; after executing the fourth operation strategy based on the instruction of the first module, it may also include: 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 content of the fourth operation strategy; the second module redetermines the second operation strategy based on the fourth message and system status information.

[0289] In the embodiment of the present application, the third message can be understood as Figure 6 The corresponding embodiment of the AI ​​performance power consumption model sends the operation strategy A to the scene recognition engine. The fourth message can be understood as Figure 6 The execution result returned by the scene recognition engine to the AI ​​performance power consumption model in the corresponding embodiment. The execution result may include information in the fourth operation strategy, and the fourth operation strategy may include information such as operation scenarios and operation parameters. In a possible implementation, the operation parameters may be expressed in the form of key-value pairs, for example, including 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. That is, the second module can learn based on the execution results returned by the first module. In this way, the learning efficiency of the second module can be higher and the electronic device can be in a more appropriate operating state between performance and power consumption.

[0291] Optional, in Fig.10 Based on the corresponding embodiments, the system status information includes one or more of the following information: power status information, peripheral status information, process load information, audio and video status information, system load information or system event information, etc.

[0292] In an embodiment of the present application, based on the system status information, the first module and the second module can respectively determine the operating strategies that match the current operating scenario of the system. In this way, the electronic device can determine the operating strategy of the electronic device based on the first module and the second module, so that the electronic device can maintain a certain operating performance while reducing the operating 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 used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0294] The above mainly introduces the solution provided by the embodiment of the present application from the perspective of the method. In order to achieve the above functions, it includes hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should easily appreciate that, in combination with the method steps of each example described in the embodiment disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present application.

[0295] The embodiment of the present application can divide the functional modules of the device implementing the method according to the above method example. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one processing module. The integrated module can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiment of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation.

[0296] like Fig.11FIG. 11 is a schematic diagram of a chip structure provided by 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 implementations, 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 embodiment of the present application can be applied to the processor 1101, or implemented by the processor 1101. The processor 1101 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware or software instructions in the processor 1101. The above processor 1101 can be a general-purpose processor (for example, a microprocessor or a conventional processor), a digital signal processor (digital signal processing, DSP), an application specific integrated circuit (application specific integrated circuit, ASIC), a field-programmable gate array (field-programmable gate array, FPGA) or other programmable logic devices, discrete gates, transistor logic devices or discrete hardware components. The processor 1101 can implement or execute the methods, steps and logic block diagrams related to each processing disclosed in the embodiment of the present application.

[0299] The steps of the method disclosed in the embodiment of the present application can be directly embodied as being executed by a hardware decoding processor, or being executed by a combination of hardware and software modules in the decoding processor. Among them, the software module can be located in a mature storage medium in the field such as a random access memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable read only memory (EEPROM). The storage medium is located in the memory 1104, and the processor 1101 reads the information in the memory 1104 and completes the steps of the above method in combination with its hardware.

[0300] The processor 1101 , the memory 1104 , and the communication interface 1103 may communicate with each other via the communication line 1102 .

[0301] In the above embodiments, the instructions stored in the memory for execution by the processor may be implemented in the form of a computer program product, wherein the computer program product may be pre-written in the memory, or may be downloaded and installed in the memory in the form of software.

[0302] The embodiment of the present application also provides a computer program product including one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network or other programmable device. The computer instructions may 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 may be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a server or data center that includes one or more available media integrated. For example, the available medium may include a magnetic medium (e.g., a floppy disk, a hard disk or a tape), an optical medium (e.g., a digital versatile disc (DVD)), or a semiconductor medium (e.g., a solid state disk (SSD)), etc.

[0303] The present application also provides 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. Computer-readable media may include computer storage media and communication media, and may also include any medium that can transfer a computer program from one place to another. The storage medium may be any target medium that can be accessed by a computer.

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

[0305] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processing unit of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

Claims

1. A resource scheduling method, applied to electronic equipment, characterized in that: The method comprises: Acquiring system status information of the electronic device, wherein the system status information is used to indicate hardware operation status and / or system operation status when the electronic device operates a focus window; When the first module of the electronic device senses that the second module of the electronic device operates abnormally, executing a first operation strategy based on an instruction of the first module; The first module is used to determine the first operation strategy based on the system status information, and the first operation strategy includes parameters that affect the power consumption of the electronic device and the operation performance of the electronic device; the second module is used to determine the second operation strategy based on the system status information, and the second operation strategy includes parameters that affect the power consumption of the electronic device; When the second module senses that the first module operates abnormally, a third operation strategy is executed based on an instruction of the second module, where the third operation strategy is an operation strategy preset in the electronic device.

2. The method according to claim 1, characterized in that Before executing the third operation strategy based on the instruction of the second module when the second module senses that the first module is operating abnormally, the method further includes: The second module transmits a first message to the first module; When the second module senses that the first module operates abnormally, executing the third operation strategy based on the instruction of the second module includes: When the second module fails to obtain the second message from the first module for N consecutive times, the third operation strategy is executed based on the instruction 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 according to claim 2, characterized in that The second module records a first identifier, the first identifier is used to indicate whether the first module operates normally, and when the second module fails to obtain the second message from the first module for N consecutive times, executing the third operation strategy based on the instruction of the second module includes: In the case where the second module fails to obtain the second message from the first module for N consecutive times, the second module sets the first identifier to a first value, where the first value is used to indicate that the first module is operating abnormally; According to the first value of the first identifier, the third operation strategy is executed based on the instruction of the second module.

4. The method according to any one of claims 1 to 3, characterized in that: After executing the third operation strategy based on the instruction of the second module, the method further includes: The second module is stopped from working, and the stopping of working includes stopping determining the second operation strategy.

5. The method according to claim 2 or 3, characterized in that: The second module transmits a first message to the first module, including: If the scenario identifier is an identifier corresponding to the power consumption scenario, the second module transmits the first message to the first module, and the first message includes the second operation strategy; wherein the scenario identifier is used to indicate the operation scenario corresponding to the last time the second module transmitted a message to the first module, and the power consumption scenario is an operation 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 transmits the first message to the first module, and the first message includes a preset message, and the preset message is used to indicate that the second module is operating normally; wherein the performance scenario is an operating scenario for the purpose of improving the operating performance of the electronic device.

6. The method according to claim 5, characterized in that The first module records the scene identifier, and the method further includes: When the current operation 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 transmits the scene identifier to the second module; When 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; The first module transmits the scene identifier to the second module.

7. The method according to any one of claims 1 to 6, characterized in that: When the first module of the electronic device senses that the second module of the electronic device operates abnormally, executing the first operation strategy based on the instruction of the first module includes: When the first module fails to obtain the first message from the second module for N consecutive times exceeding the preset time period, the first operation strategy is executed based on the instruction of the first module.

8. The method according to claim 7, characterized in that The first module records a second identifier, the second identifier is used to indicate whether the second module is operating normally, and when the first module fails to obtain the first message from the second module for N consecutive times exceeding a preset time period, executing the first operation strategy based on an instruction of the first module includes: When the first module fails to obtain the first message from the second module for N consecutive times exceeding the preset time period, the first module sets the second identifier to a second value, where the second value is used to indicate that the second module is operating abnormally; According to the second value of the second identifier, the first operation strategy is executed based on the instruction of the first module.

9. The method according to any one of claims 1 to 8, characterized in that: The method further comprises: When the first module senses that the second module is operating normally, if the current operating scenario belongs to the performance scenario, executing the first operating strategy based on the instruction of the first module; In the case where the first module senses that the second module is operating normally, if the current operating scenario belongs to the power consumption scenario and the target event does not occur in the electronic device, a fourth operating strategy is executed based on the instruction of the first module; wherein the fourth operating strategy is a strategy among the first operating strategy and the second operating strategy that can reduce the power consumption of the electronic device, and the target event is an event that affects the operating performance of the electronic device; When the first module senses that the second module is operating normally, if the current operating scenario belongs to the power consumption scenario and the target event occurs in the electronic device, the fifth operating strategy is executed based on the instruction of the first module; wherein the fifth operating strategy is a strategy between the first operating strategy and the second operating strategy that can make the power consumption of the electronic device higher.

10. The method according to claim 9, characterized in that The target event includes one or more of the following events: a user operation event on the focus window, a freeze event, or a performance limitation 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.

11. The method according to claim 9 or 10, characterized in that: Before executing the fourth operation strategy based on the instruction of the first module, the method further includes: The second module transmits a third message to the first module, wherein the third message includes the second operation strategy; After executing the fourth operation strategy based on the instruction of the first module, the method further includes: The first module returns a fourth message to the second module, where the fourth message is used to respond to the third message, and the fourth message includes part or all of the content of the fourth operation strategy; The second module redetermines the second operation strategy based on the fourth message and the system status information.

12. The method according to any one of claims 1 to 11, characterized in that: The system status information includes one or more of the following information: power status information, peripheral status information, process load information, audio and video status information, system load information or system event information.

13. An electronic device, characterized in that: The electronic device comprises: one or more processors and a memory; The memory is coupled to the one or more processors, and the memory is used to store computer program codes, wherein the computer program codes include computer instructions, and the one or more processors call the computer instructions to enable the electronic device to execute the method according to any one of claims 1 to 12.

14. A chip system, characterized in that: The chip system is applied to an electronic device, and the chip system includes one or more processors, and the one or more processors are used to call computer instructions so that the electronic device executes the method as described in any one of claims 1-12.

15. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes computer instructions, and when the computer instructions are executed on an electronic device, the electronic device executes the method according to any one of claims 1 to 12.

16. A computer program product, characterized in that The computer program product comprises a computer program code, and when the computer program code is run on an electronic device, the electronic device is caused to perform the method according to any one of claims 1 to 12.

Citation Information

Patent Citations

  • Control method and electronic equipment

    CN113886180A

  • Information processing method, device and terminal

    CN114598929A

  • Server management method and device, equipment and medium

    CN114936125A

  • Application redundancy method and device, equipment and storage medium

    CN115694749A

  • Resource scheduling method, electronic equipment and storage medium

    CN116028206A