Control method and related device

By configuring multiple control methods and heartbeat command mechanisms in electronic devices, and switching control methods according to communication status, the problem of insufficient flexibility of the temperature control management interval method in the prior art is solved, and more efficient control and resource utilization are achieved.

CN119271013AActive Publication Date: 2025-01-07HONOR DEVICE CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202410381767.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-03-29
Publication Date
2025-01-07
Estimated Expiration
2044-03-29

AI Technical Summary

Technical Problem

In the prior art, the performance flexibility of controlling electronic devices using the thermostatic management interval (thermal zone) method is insufficient, and it is difficult to flexibly switch the control method according to actual conditions, resulting in control failure risk and waste of resources.

Method used

At least two control methods are configured in electronic devices, and appropriate control methods are selected through heartbeat commands and communication status judgments, ensuring that the control methods are switched when the communication between the hardware layer and the decision-making layer are normal or abnormal, reducing the risk of control failure and improving resource utilization Rate.

Benefits of technology

It improves the control flexibility and resource utilization of electronic devices, reduces the risk of control failure, and enhances the accuracy and timeliness of hardware operation status.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119271013A_ABST
    Figure CN119271013A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a control method and a related device, and relates to the technical field of terminals. The method is applied to the electronic equipment, the electronic equipment comprises a first decision-making layer, a second decision-making layer and a hardware layer, the first decision-making layer is a layer between the second decision-making layer and the hardware layer, and the method comprises the following steps: when the first decision-making layer determines that communication between the hardware layer and the second decision-making layer is normal, determining that the first decision-making layer is normal; and the first decision-making layer indicates to control the running state of hardware in the hardware layer by adopting the first control mode. Or, under the condition that the first decision-making layer determines that the communication between the hardware layer and the second decision-making layer is abnormal, the first decision-making layer indicates to adopt the second control mode to control the running state of the hardware in the hardware layer. Therefore, at least two control modes are configured on the electronic equipment, and one control mode is selectively used for controlling the electronic equipment, so that the control flexibility of the electronic equipment can be improved.
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 control method and related devices. Background Art

[0002] With the rapid development of terminal technology, how to control the performance of terminals is becoming more and more important. At present, the performance of electronic devices is mainly controlled by thermal zone. The thermal framework is a set of architectures related to temperature control, which controls the performance of electronic devices based on temperature.

[0003] However, the flexibility of performance control of electronic equipment using thermal zones needs to be further improved. Summary of the invention

[0004] The present application provides a control method and related devices, which are applied in the field of terminal technology. By configuring at least two control modes for an electronic device and selectively using one of the control modes to control the electronic device, the control flexibility of the electronic device can be improved.

[0005] In a first aspect, an embodiment of the present application provides a control method, which is applied to an electronic device, wherein the electronic device includes a first decision layer, a second decision layer, and a hardware layer, wherein the first decision layer is a layer between the second decision layer and the hardware layer, and the method includes:

[0006] When the first decision layer determines that the communication between the hardware layer and the second decision layer is normal, the first decision layer instructs to use the first control method to control the operating state of the hardware in the hardware layer. Alternatively, when the first decision layer determines that the communication between the hardware layer and the second decision layer is abnormal, the first decision layer instructs to use the second control method to control the operating state of the hardware in the hardware layer.

[0007] In the first control mode, the second decision layer participates in the control of the operating state of the hardware in the hardware layer. In the second control mode, the second decision layer does not participate in the control of the operating state of the hardware in the hardware layer.

[0008] In an embodiment of the present application, when the communication between the hardware layer and the second decision layer is normal, the second decision layer participates in the control of the operating state of the hardware in the hardware layer, and when the communication between the hardware layer and the second decision layer is abnormal, the second decision layer does not participate in the control of the operating state of the hardware in the hardware layer. In this way, one of at least two control methods can be selected according to actual conditions to control the electronic device, thereby improving the control flexibility of the electronic device.

[0009] In combination with the first aspect, in a possible implementation manner, the method further includes:

[0010] The first decision layer obtains a first heartbeat instruction from the hardware layer; the first decision layer transmits a second heartbeat instruction to the second decision layer in response to the first heartbeat instruction; then, when the first decision layer obtains a third heartbeat instruction within the first target time period, it determines that the communication between the hardware layer and the second decision layer is normal, or when the first decision layer does not obtain the third heartbeat instruction within the first target time period, it determines that the communication between the hardware layer and the second decision layer is abnormal.

[0011] The first target time period is calculated from the time when the first decision layer transmits the second heartbeat instruction to the second decision layer, and the third heartbeat instruction includes an instruction fed back by the second decision layer in response to the second heartbeat instruction.

[0012] The first target time period may be set as required, for example, to 5 seconds, 10 seconds, etc. Optionally, it may be set based on the time required for the heartbeat instruction.

[0013] In the embodiment of the present application, the hardware layer, the first decision layer and the second decision layer can transmit heartbeat instructions to each other, so that it can be timely determined whether the second decision layer is in a normal operating state, that is, whether the communication between the hardware layer and the second decision layer is normal. In this way, when the second decision layer is in an abnormal operating state, it can be known in time, so that the control mode of the electronic device can be switched from the first control mode to the second control mode in time, reducing the risk of control failure of the electronic device. In addition, the hardware layer reuses the first decision layer as an interface for communicating with the second decision layer. In this way, even if there is no communication interface between the hardware layer and the second decision layer, the communication between the hardware layer and the second decision layer can be realized, thereby realizing the transmission of the operating parameters of the hardware in the hardware layer and the heartbeat instructions to the second decision layer, so that the adjustment of the framework inside the electronic device can be reduced.

[0014] In combination with the first aspect, in a possible implementation manner, the hardware layer includes a controller at least for acquiring and transmitting a heartbeat instruction, the first heartbeat instruction is cyclically transmitted by the controller at a first time interval, and the method further includes:

[0015] The first decision layer transmits a fourth heartbeat instruction to the controller in response to the third heartbeat instruction, and the controller obtains the time of receiving the fourth heartbeat instruction as the starting time of the first time interval.

[0016] The first time interval can be set as required, such as 300 milliseconds, etc., and is not limited here. It should be noted that the shorter the first time interval is, the more timely it is to find that the second decision layer has entered an abnormal state.

[0017] In this embodiment, the first decision layer transmits the fourth heartbeat instruction to the controller, so that the controller can continue to transmit the first heartbeat instruction only when it determines that the second decision layer is in normal operating state. Thereby, the waste of transmission resources caused by the controller continuing to transmit the first heartbeat instruction when the second decision layer is in abnormal state, that is, the second decision layer cannot respond to the heartbeat instruction, can be reduced, thereby improving the resource utilization of the electronic device.

[0018] In conjunction with the first aspect, in a possible implementation manner, after the first decision layer determines that the communication between the hardware layer and the second decision layer is abnormal, the method further includes:

[0019] The first decision layer obtains a fifth heartbeat instruction from the second decision layer, where the fifth heartbeat instruction includes an instruction transmitted when the second decision layer switches from an abnormal operation state to a normal operation state;

[0020] The first decision layer transmits a sixth heartbeat instruction to the hardware layer in response to the fifth heartbeat instruction;

[0021] When the first decision layer obtains the seventh heartbeat instruction, it determines that the communication between the hardware layer and the second decision layer switches from abnormal communication to normal communication, and the seventh heartbeat instruction includes an instruction fed back by the hardware layer in response to the sixth heartbeat instruction.

[0022] Among them, the fifth heartbeat instruction can be an instruction initiated when the second decision layer finds that it has switched from an abnormal operating state to a normal operating state. It should be noted that the fifth heartbeat instruction can be an instruction that is transmitted once when the second decision layer switches to a normal operating state, or it can be an instruction that is transmitted cyclically after the second decision layer switches to a normal operating state, that is, when the second decision layer returns to a normal operating state, the fifth heartbeat instruction is continuously transmitted, so that it can be timely known whether the second decision layer will be offline again.

[0023] In an embodiment of the present application, when the second decision layer finds that it has switched from an abnormal operating state to a normal operating state, it informs the first decision layer and the hardware layer through a heartbeat instruction. In this way, the communication between the hardware layer and the second decision layer can be restored to normal, that is, the second decision layer can be discovered in time when it has restored to a normal operating state, thereby switching to the first control mode in time. As a result, the timeliness of the control mode switching can be improved.

[0024] In combination with the first aspect, in a possible implementation manner, the fifth heartbeat instruction is cyclically transmitted by the second decision layer at a second time interval, and the method further includes:

[0025] The first decision layer transmits the eighth heartbeat instruction to the second decision layer in response to the seventh heartbeat instruction, and the second decision layer obtains the time of the eighth heartbeat instruction as the starting time of the second time interval.

[0026] The second time interval can be set as required and is not limited here. It should be noted that the shorter the second time interval is, the more timely it is to find that the second decision-making layer has re-entered the abnormal operation state.

[0027] In this embodiment, the first decision layer transmits the eighth heartbeat instruction to the second decision layer, so that the second decision layer can continue to transmit the fifth heartbeat instruction only after determining that the second decision layer is in normal operation. This can reduce the waste of transmission resources caused by the abnormal communication link between the second decision layer and the first decision layer, that is, when the second decision layer cannot obtain the heartbeat instruction, the second decision layer still continues to transmit the fifth heartbeat instruction, thereby improving the resource utilization of the electronic device.

[0028] In combination with the first aspect, in a possible implementation manner, the electronic device further includes a control system for controlling hardware in the hardware layer, and after the first decision layer determines that communication between the hardware layer and the second decision layer is abnormal, the method further includes:

[0029] The second decision layer sends control commands to the first decision layer and the control system respectively. The control commands are generated by the second decision layer in normal operation when controlling by the second control method. The control commands indicate commands for controlling the operating status of the hardware in the hardware layer. When the first decision layer obtains the control commands from the second decision layer, it determines that the communication between the hardware layer and the second decision layer switches from abnormal to normal communication.

[0030] In an embodiment of the present application, the second decision layer sends control commands to the first decision layer and the control system respectively. Therefore, even if the second decision layer cannot know that it has entered an abnormal operating state and has not transmitted the fifth heartbeat instruction, the first decision layer can promptly know that the second decision layer has recovered from the abnormal operating state to the normal operating state, thereby improving the timeliness and accuracy of confirming the status of the second decision layer.

[0031] In combination with the first aspect, in a possible implementation manner, the operating state of hardware in the hardware layer is controlled by using a first control method, including:

[0032] The first decision layer obtains an operating parameter set from the hardware layer, and the operating parameter set includes operating parameters of part or all of the hardware during the operation of the electronic device; the first decision layer transmits the operating parameter set to the second decision layer; and the second decision layer controls the operating status of the hardware in the hardware layer based on the operating parameter set.

[0033] In combination with the first aspect, in a possible implementation manner, the second decision layer includes a first performance decision module and a deployment module, the first performance decision module is configured with one or more first performance control algorithms, the deployment module is configured to deploy a performance control strategy generated by the first performance decision module, the electronic device also includes a control system for controlling hardware in the hardware layer, and the second decision layer controls the operating state of the hardware in the hardware layer based on the operating parameter set, including:

[0034] The first performance decision module calls at least one first performance control algorithm, processes all operating parameters in the operating parameter set through at least one first performance control algorithm, and obtains a first performance control strategy for the electronic device; the deployment module generates a control command based on the first performance control strategy, and transmits the control command to the control system; the control system controls the operating status of the hardware in the hardware layer based on the control command.

[0035] In an embodiment of the present application, all operating parameters in an operating parameter set are processed by at least one first performance control algorithm, that is, the control strategy of the electronic device can be determined by more operating parameters, thereby improving the control accuracy of the electronic device.

[0036] In combination with the first aspect, in a possible implementation manner, the hardware layer includes a controller at least for obtaining operating parameters of first hardware in the hardware layer, and the first decision layer obtains the operating parameter set from the hardware layer, including:

[0037] An operating parameter of the first hardware from the controller is obtained, and an operating parameter of the second hardware from the hardware layer is obtained.

[0038] In the embodiment of the present application, operating parameters collected from different sources can be obtained, so that the control strategy of the electronic device can be determined by more operating parameters, thereby improving the control accuracy of the electronic device.

[0039] In combination with the first aspect, in a possible implementation, the first decision layer includes a second performance decision module, the second performance decision module is configured with a second performance control algorithm, and the second control method is used to control the operating state of the hardware in the hardware layer, including:

[0040] The second performance decision module calls a second performance control algorithm, processes part of the operating parameters in the operating parameter set through the second performance control algorithm, and obtains a second performance control strategy for the electronic device;

[0041] The first decision layer controls the operating state of the hardware in the hardware layer based on the second performance control strategy.

[0042] In an embodiment of the present application, some operating parameters in the operating parameter set are processed by a second performance control algorithm, that is, the control strategy of the electronic device is determined by fewer parameters. In this way, fewer computing power resources are required, thereby saving the computing power resources required to control the electronic device.

[0043] In combination with the first aspect, in a possible implementation manner, when the first decision layer determines that the communication between the hardware layer and the second decision layer is normal, the first decision layer instructs to control the operating state of the hardware in the hardware layer using the first control method, including:

[0044] When the first decision layer determines that the communication between the hardware layer and the second decision layer is normal and the temperature of the electronic device is lower than the first temperature threshold, the first decision layer instructs to control the operating state of the hardware in the hardware layer using the first control method.

[0045] In combination with the first aspect, in a possible implementation manner, when the first decision layer determines that the communication between the hardware layer and the second decision layer is abnormal, the first decision layer instructs to use the second control method to control the operating state of the hardware in the hardware layer, including:

[0046] When the first decision layer determines that the communication between the hardware layer and the second decision layer is abnormal and the temperature of the electronic device is lower than the first temperature threshold, the first decision layer instructs to control the operating state of the hardware in the hardware layer using the second control method.

[0047] In combination with the first aspect, in a possible implementation manner, the method further includes:

[0048] When the first decision layer determines that the temperature of the electronic device is higher than the second temperature threshold, the first decision layer instructs to control the operating state of the hardware in the hardware layer using a third control method.

[0049] Among them, the second temperature threshold is greater than or equal to the first temperature threshold, and in the third control mode, the first decision layer and the second decision layer do not participate in the control of the operating state of the hardware in the hardware layer.

[0050] The third control method may be a simpler control method than the first control method.

[0051] In an embodiment of the present application, when the first decision layer determines that the temperature of the electronic device is higher than the second temperature threshold, the electronic device is controlled by a third control method, and the third control method can be a simpler control method compared to the first control method. In this way, the computing power resources required to control the electronic device can be reduced.

[0052] In the second aspect, an embodiment of the present application provides a control device, which may be an electronic device, or a chip or chip system in an electronic device. The control device may include a display unit and a processing unit. When the control device is an electronic device, the display unit may be a display screen. The display unit is used to perform the display step so that the electronic device implements a control method described in the first aspect or any possible implementation of the first aspect. When the control device is an electronic device, the processing unit may be a processor. The control 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 control method described in the first aspect or any possible implementation of the first aspect. When the control 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 control 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.).

[0053] In a third aspect, an embodiment of the present application provides an electronic device, including a processor and a memory, the memory being used to store code instructions, and the processor being used to run the code instructions to execute the method described in the first aspect or any possible implementation of the first aspect.

[0054] 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.

[0055] 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.

[0056] 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.

[0057] 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.).

[0058] 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

[0059] Figure 1 is a structural block diagram of an electronic device provided in an embodiment of the present application;

[0060] Figure 2 A schematic diagram of confirming whether a software layer is operating normally provided in an embodiment of the present application;

[0061] Figure 3 A flow chart of a control method provided in an embodiment of the present application;

[0062] Figure 4 A flow chart of another control method provided in an embodiment of the present application;

[0063] Figure 5 A flow chart of another control method provided in an embodiment of the present application;

[0064] Figure 6 A flow chart of another control method provided in an embodiment of the present application;

[0065] Figure 7 A flow chart of another control method provided in an embodiment of the present application;

[0066] Figure 8 A schematic diagram of the structure of a chip provided in an embodiment of the present application. DETAILED DESCRIPTION

[0067] 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:

[0068] 1. Advanced RISC Machine (ARM) is a 32-bit RISC processor architecture. The ARM architecture is suitable for mobile communications and other electronic devices that require high portability. ARM processors are widely used in embedded systems and a variety of consumer electronic products, such as smartphones, tablets, multimedia players, and computers.

[0069] The main feature of the ARM architecture is that it uses a unique ARM instruction set system and is optimized for different application scenarios. The design goal of the ARM architecture is to run at the highest possible clock frequency and reduce uncommon instructions, thereby reducing chip complexity and power consumption. In addition, ARM processors usually have a large number of registers to facilitate the rapid execution of instructions in the program.

[0070] In general, the ARM architecture is a reduced instruction set computer structure, but it is not a simple single-cycle instruction system. On the contrary, most instructions of the ARM processor are fixed-length, which can speed up the execution of common operations.

[0071] 2. Basic Input Output System (BIOS) is a set of programs fixed to a read-only memory (ROM) chip on the motherboard of the computer. It stores the most important basic input and output programs of the computer, the self-test program after power-on, and the system self-starting program. It can read and write specific information of system settings from the read-write chip (complementary metal oxide semiconducto, CMOS). Its main function is to provide the lowest-level and most direct hardware settings and control for the computer. In addition, BIOS also provides some system parameters to the operating system. Changes in system hardware are hidden by BIOS, and programs use BIOS functions instead of directly controlling hardware. In some systems, the abstraction layer provided by BIOS is ignored and hardware components are directly controlled.

[0072] 3. The embedded controller (EC) is a separate processor that manages the entire system before and during the boot process. The BIOS starts running only after the EC initializes the internal physical environment. In a PC, the EC is always on, whether you are booting or shutting down the computer, unless you completely remove the battery and adapter. In the shutdown state, the EC keeps running and waits for the user's boot information. After booting up, the EC also controls the keyboard controller, charging indicator light, fan and other various indicator lights, and even controls the system's standby and hibernation states.

[0073] 4. Other terms

[0074] 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.

[0075] 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.

[0076] 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.

[0077] 5. Electronic equipment

[0078] The electronic device of the embodiment of the present application may include a handheld device, a vehicle-mounted device, etc. with a data processing function. For example, some electronic devices are: mobile phones, tablet computers, PDAs, personal computers (PCs), mobile internet devices (MIDs), wearable devices, virtual reality (VR) devices, augmented reality (AR) devices, wireless terminals in industrial control, wireless terminals in self driving, wireless terminals in remote medical surgery, wireless terminals in smart grids, wireless terminals in transportation safety, wireless terminals in smart cities, wireless terminals in smart homes, cellular phones, cordless phones, session initiation protocol (SIP) phones, wireless local loop (WLL) stations, personal digital assistants (PDAs), handheld devices with wireless communication capabilities, computing devices or other processing devices connected to wireless modems, vehicle-mounted devices, wearable devices, terminal devices in 5G networks or future evolved public land mobile communication networks (PLANs). The embodiments of the present application do not limit this.

[0079] 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.

[0080] In addition, in the embodiments of the present application, the electronic device can also be a terminal device in the 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.

[0081] The electronic devices in the embodiments of the present application may also be referred to as: terminal equipment, 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.

[0082] 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 central processing unit (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 system, Unix operating system, Android operating system, iOS operating system, or Windows operating system. The application layer includes applications such as browsers, address books, word processing software, and instant messaging software.

[0083] The following embodiments illustrate the scenarios of the embodiments of the present application.

[0084] In some example situations, when an electronic device is performing some large tasks, such as video rendering tasks, or high frame rate display tasks for game screens, the hardware in the electronic device may be in a high-load state. For example, the central processing unit (CPU) and graphics processing unit (GPU) may be in a high-load state. The hardware in a high-load state generates more heat. As the heat accumulates, the temperature of the electronic device gradually rises. If the temperature of the electronic device is too high, there is a risk of burning. Therefore, it is necessary to control the performance of the electronic device to reduce the temperature of the electronic device, such as limiting the frequency of the CPU.

[0085] In the related art, the performance of electronic devices is mainly controlled by using a thermal zone. The thermal framework is a set of architectures related to temperature control, which controls the performance of electronic devices based on temperature.

[0086] However, the related art mainly controls the performance of electronic devices in a thermal zone manner, that is, in the related art, only one control method is used to control the performance of electronic devices, so the flexibility of controlling the electronic devices is insufficient.

[0087] In view of this, an embodiment of the present application proposes a control method and related devices, by configuring at least two control modes in an electronic device, and selecting one of the control modes to control the operating state of the hardware in the electronic device according to the operating conditions of the electronic device. In this way, the flexibility of controlling the electronic device can be improved.

[0088] In order to better understand the embodiments of the present application, the structure of the electronic device in the embodiments of the present application is introduced below:

[0089] Electronic devices can adopt layered architecture, event-driven architecture, microkernel architecture, microservice architecture, cloud architecture, or ARM architecture.

[0090] This embodiment takes the Windows operating system of ARM architecture as an example to illustrate the structure of the electronic device.

[0091] Figure 1 It is a structural block diagram of an electronic device provided in an embodiment of the present application. The layered architecture divides the software into several layers, each layer has a clear role and division of labor, and the layers communicate with each other through software interfaces or hardware interfaces. In some embodiments, the electronic device is divided into multiple layers, from bottom to top, they are hardware layer, BIOS layer, software core layer and operating system turbo (OS Turbo) layer.

[0092] Among them, the hardware layer may include EC, CPU, GPU, battery, battery charging module, wireless local area network (WLAN) module, display, chip, chip built-in temperature sensor, onboard sensor, fan module, keyboard and optical fiber temperature sensor (Distributed Temperature Sensing, DTS) for collecting power supply temperature, etc. EC may include a module for collecting information of the temperature sensor (tsensor) built into the chip, a module for collecting hot key information of the keyboard, an interface for controlling the fan speed, and a heartbeat module 1 (also known as the first heartbeat module), etc. EC is deployed with a fan table, which can define the mapping relationship between temperature and speed, so as to control the fan speed based on temperature.

[0093] The BIOS layer includes an original equipment manufacturer (OEM) table module, a BIOS device information module, and an escape mechanism module. The OEM table module records information required by the software core layer, such as information required by the power consumption performance decision module.

[0094] Among them, the BIOS device information module, which can also be called the BIOS device parameter module, can record the status information transmitted by each hardware, including but not limited to temperature sensor information (for example, indicating the temperature collected by the temperature sensor), battery capacity information (for example, indicating the remaining battery capacity), fan speed information (for example, indicating the current fan speed), power supply status information (for example, indicating whether DC or AC is currently used), screen information (for example, indicating whether the screen is open or closed), electronic device lid information (for example, indicating whether the lid of the electronic device is open or closed), electronic device cooling information (for example, indicating the current cooling method of the electronic device), WLAN information (for example, indicating the network resources of the WLAN), Open Digital Video (ODVx) information (for example, indicating the data volume or frame rate of the video displayed by the electronic device), EC source code language (acpi source language, ASL) information (for example, indicating the ASL code called by the EC), CPU information (for example, indicating the current CPU frequency, the number of cores currently used), GPU information (for example, indicating the current GPU frequency), display information (for example, indicating whether the display is turned on or the display brightness of the display) and WLAN information (for example, indicating the data transmission rate of the WLAN), etc. The escape mechanism module may include an extended thermal zone mechanism for controlling electronic devices, a heartbeat mechanism for transmitting heartbeat instructions, etc. The heartbeat mechanism may be implemented by a heartbeat module 2 (also called a second heartbeat module).

[0095] Among them, the core software layer (also called the policy optimization layer, or simply the software layer) may include a power consumption performance decision module, a power consumption performance deployment module (also referred to as a deployment module) and an interface module. The power consumption performance decision module may include a decision module 1, a decision module 2, a decision module 3 and a decision module 4, and the performance decision algorithm (also referred to as a performance control algorithm) configured by each processing module (also referred to as a decision module) may be different. The power consumption performance deployment module can generate control commands for controlling the hardware in the hardware layer. For example, the control command may include but is not limited to a CPU frequency modulation command, a CPU core dialing command, a GPU frequency modulation command, a fan control command, a charging rate control command, a backlight brightness command, a WLAN rate control command, and a CPU capacity limitation command. The interface module may include but is not limited to a performance power consumption control interface for issuing control commands (which may be referred to as a power consumption control interface, a performance control interface or a control interface), a BIOS interface for communicating with the BIOS layer, a windows interface for communicating with the windows system, and an OS Turbo interface for communicating with the OS Turbo layer.

[0096] Among them, the BIOS interface may include an interface for obtaining an OEM table, an interface for obtaining information from a BIOS device information module, and an interface for transmitting a heartbeat instruction. Optionally, the BIOS interface may also be used as an interface for transmitting instructions to the BIOS layer, that is, the BIOS interface may be used as a heartbeat module 3 (also known as a third heartbeat module) for transmitting a heartbeat instruction to the BIOS. The performance power consumption control interface for issuing control commands may include but is not limited to a GPU software development kit (SDK), Bluetooth and WLAN drivers, and an inbox driver for power path management (PPM). The information that the windows interface can obtain may include but is not limited to the workload of the windows system, the power slider information of the windows system (for example, indicating the performance level selected by the user), and the game mode of the windows system. The OS Turbo interface may obtain a new OEM table and a new ODVx from the OS Turbo layer, and the new OEM table may replace the OEM table from the BIOS layer, that is, the core software layer controls the hardware of the electronic device based on the new OEM table. The new ODVx may replace the ODVx from the BIOS layer.

[0097] OS Turbo is a system-level performance and power optimization engine. It is based on Windows system, applications and drivers, BIOS firmware and other related technologies, and uses software and hardware collaboration to go deep into the bottom layer of the PC. By superimposing algorithms and capabilities, it optimizes the underlying processes of the CPU and GPU. Optionally, the OS Turbo layer can be configured with a scene recognition mechanism to identify the usage scenarios of electronic devices and a chip tuning mechanism to optimize chip capabilities.

[0098] In an embodiment of the present application, the core software layer establishes performance and power consumption optimization decision-making and deployment capabilities. PC developers or OSTurbo input OEM tables based on predefined policies of the core software layer as needed. The core software layer collects system information and makes performance and power consumption optimization decisions and executes them according to the OEM table. The BIOS layer can establish the PC developer OEM table reporting, system information collection and active reporting capabilities, including reporting the OEM table during the boot process, passively collecting temperature sensor information, battery capacity, power status, lid device status and other information. EC layer: deploy the fan table predefined by the PC developer, poll and collect system information, and actively report to the BIOS layer when the threshold exceeds the limit, and provide a fan speed setting interface, etc.

[0099] In this embodiment, the electronic device is configured with at least two control modes to control the electronic device, including a first control mode and a second control mode, wherein in the first control mode, the software layer participates in the control of the hardware in the hardware layer. However, the software layer may have abnormal conditions, such as the software layer stopping running due to uninstallation, or the system freezing causing the software layer to temporarily stop running, etc. At this time, the electronic device can be controlled by the second control mode, and in the second control mode, the software layer does not participate in the control of the hardware in the hardware layer, so that the control of the electronic device can be sustained.

[0100] Optionally, whether the software layer is operating normally may be determined by transmitting heartbeat instructions and control commands.

[0101] See also Figure 2 , Figure 2 A schematic diagram of confirming whether the software layer is running normally is provided in an embodiment of the present application. Figure 2As shown, the EC initiates a heartbeat instruction to trigger the BIOS layer to initiate a heartbeat instruction to the software layer. Then, if the software layer operates normally, the software layer will respond to the heartbeat instruction to the BIOS layer based on the acquired heartbeat instruction, triggering the BIOS layer to transmit a response heartbeat instruction to the EC. In addition, if the software layer cannot operate normally at this time, that is, when the operation is abnormal, the software layer can initiate a reverse heartbeat instruction to the BIOS layer when it knows that it has recovered from abnormal operation to normal operation, triggering the BIOS layer to initiate a reverse heartbeat instruction to the EC, and then the EC can transmit a reverse response heartbeat instruction to the BIOS layer, triggering the BIOS to transmit a reverse response heartbeat instruction to the software layer. In this way, the software layer can know that the BIOS layer and the EC layer have received the reverse heartbeat instruction initiated by the software layer. In addition, it is possible that the software layer cannot know that it has entered an abnormal operating state, which may not trigger the software layer to initiate a reverse heartbeat instruction to the BIOS layer. Therefore, the embodiment of the present application sets up a control distribution mechanism of a system-on-a-chip (SOC). That is, when the software layer sends a control command to the SOC, it also synchronously sends the control command to the BIOS. In this way, even if the software layer cannot know that it has entered an abnormal operating state, it will send a control command to the BIOS layer when it recovers to a normal operating state. Then, when the BIOS layer obtains the control command, it can also know that the software layer has recovered to a normal operating state.

[0102] In addition, the software layer may also obtain the first operating parameter read from the EC and the second operating parameter read from the BIOS layer.

[0103] The following embodiments provide exemplary descriptions of a software layer being in a normal operating state, and a software layer being in a stopped operating state and then switching back to an abnormal operating state.

[0104] First, the following describes how to control the performance of electronic equipment when the software layer is in normal operation.

[0105] See also Figure 3 , Figure 3 1 is a flow chart of a control method provided in an embodiment of the present application. Figure 3 The methods shown may include:

[0106] S302. Turn on the electronic equipment.

[0107] S304: The first parameter acquisition module in the EC obtains first operating parameters of each first hardware of the electronic device.

[0108] The first parameter acquisition module may refer to a module for acquiring operating parameters of hardware. In this embodiment, the first parameter acquisition module may be used to acquire operating parameters of hardware that has a communication link with the EC. Optionally, the first hardware may include, but is not limited to, a temperature sensor and a keyboard. The operating parameters of the temperature sensor may include the temperature information it acquires, and the operating parameters of the keyboard may include whether a hot key combination is triggered and what hot key combination is triggered. Exemplarily, the first parameter acquisition module may be as follows: Figure 1 The temperature acquisition module and hot key acquisition module in the EC shown in the figure can be used to read the information of the temperature sensor built into the chip, and the hot key acquisition module in the EC can be used to read the information of the keyboard of the electronic device, so as to determine which hot key of the electronic device is triggered, thereby determining the operating state of the electronic device. For example, the electronic device is configured to use shortcut key 1 (such as ctrl) + shortcut key 2 (such as Z) to turn on the performance mode, and shortcut key 1 + shortcut key 3 (such as X) to turn on the power saving mode. In this way, if the EC detects the hot key combination of shortcut key 1 + shortcut key 2, the module with performance control capability can determine that the electronic device is in performance mode.

[0109] Optionally, the first parameter acquisition module may be a first operating parameter that is acquired at a certain frequency, which is related to the performance and acquisition method of the first parameter acquisition module, and no limitation is imposed on the specific acquisition frequency and acquisition method.

[0110] S306. The first parameter collection module in the EC transmits the first operating parameter to the BIOS layer.

[0111] In this embodiment, the EC can transmit the first operating parameter to the BIOS layer according to a certain period, for example, a transmission period synchronized with the acquisition frequency of the first operating parameter, or the period of EC transmitting the first operating parameter is greater than the acquisition frequency of the first operating parameter.

[0112] S308. The first heartbeat module in the EC transmits a first heartbeat initiation instruction to the BIOS layer.

[0113] Optionally, the first heartbeat module can transmit the first heartbeat initiation instruction to the BIOS layer according to a certain period, or it can transmit the first heartbeat initiation instruction after a certain time interval after obtaining the response instruction, or it can transmit the first heartbeat initiation instruction to the BIOS layer when the first operating parameter is collected, and there is no limitation here.

[0114] Generally, both the EC and BIOS layers are in normal operation, that is, the communication between the EC and BIOS layers is always connected. In this embodiment, the first heartbeat module in the EC transmits the first heartbeat instruction to the BIOS layer to trigger the BIOS layer to continue transmitting the heartbeat instruction to the software layer, so as to determine whether the software layer is alive. It can also be understood as determining whether the software layer can operate normally, or whether the communication between the software layer and the EC is normal, or whether the communication between the BIOS layer and the software layer is normal.

[0115] S310: A second parameter acquisition module in the BIOS layer acquires second operating parameters of each second hardware of the electronic device.

[0116] The second parameter acquisition module may refer to a module for acquiring operating parameters of hardware. In this embodiment, the second parameter acquisition module may be used to acquire operating parameters of hardware that has a communication link with the BIOS layer. Optionally, the second hardware may include but is not limited to hardware other than the first hardware, such as an onboard temperature sensor, a DTS sensor, a battery, a fan, and a lid device. The second operating parameters may refer to Figure 1 The information description related to the BIOS device information module in the BIOS is not repeated here. For example, the electronic device lid device information indicates the operating parameters of the lid device.

[0117] S312: The second heartbeat module in the BIOS layer transmits a second heartbeat initiate instruction to the software layer based on the first heartbeat initiate instruction.

[0118] S314: The third heartbeat module in the software layer transmits a first response heartbeat instruction to the BIOS layer based on the second initiating heartbeat instruction.

[0119] In this embodiment, if the software layer is in a normal working state, the software layer can transmit the first response heartbeat instruction to the BIOS layer.

[0120] S316. The second heartbeat module in the BIOS layer notifies the second parameter collection module.

[0121] In this embodiment, after the second heartbeat module in the BIOS layer obtains the first response heartbeat instruction, it can determine that the software layer is in normal operation, and then notify the second parameter acquisition module, so as to transmit the first operating parameters and the second operating parameters to the software layer through the second parameter acquisition module.

[0122] S318. The second parameter acquisition module in the BIOS layer transmits the first operating parameter and the second operating parameter to the software layer.

[0123] In this embodiment, the first operating parameter and the second operating parameter may be packaged together and transmitted to the software layer.

[0124] S320: A software performance decision module in the software layer generates a first performance control strategy for the electronic device based on the first operating parameter and the second operating parameter.

[0125] Among them, the first performance control strategy may include one or more solutions related to performance control. For example, adjusting the CPU frequency, adjusting the GPU frequency, adjusting the charging rate, adjusting the display brightness, adjusting the WLAN data transmission rate, adjusting the fan speed, etc. can be adjusted according to the required performance, and are not limited here. Exemplarily, the electronic device has turned on the performance mode, and is currently executing a game task that does not require networking, then the CPU frequency can be increased, the GPU frequency can be increased, the WLAN data transmission rate can be reduced, etc. Exemplarily, the electronic device has turned on the performance mode, and is currently executing a game task that requires networking, and the temperature is high at this time, then the CPU frequency can be increased, the GPU frequency can be increased, the WLAN data transmission rate can be increased, the display brightness can be reduced, and the charging rate can be reduced. Exemplarily, the electronic device has turned on the power saving mode, then the CPU frequency can be reduced, the GPU frequency can be reduced, the display brightness can be reduced, and the charging rate can be increased.

[0126] Optionally, the first operating parameter and the second operating parameter may form a parameter set, and the software performance decision module may generate a first performance control strategy for the electronic device based on some or all of the parameters in the parameter set.

[0127] It is understandable that how to generate the first performance control strategy based on the first operating parameter and the second operating parameter can be determined according to an actual algorithm, and is not limited here. Figure 1 The power consumption performance decision module is shown.

[0128] In a possible implementation, the software performance decision module is configured with at least one performance control algorithm, and one of the performance control algorithms can be called according to actual conditions to generate a first performance control strategy. Optionally, the performance control algorithm may include but is not limited to performance control algorithm 1 configured in decision module 1, performance control algorithm 2 configured in decision module 2, performance control algorithm 3 configured in decision module 3, and performance control algorithm 4 configured in decision module 4.

[0129] S322. The software performance decision module in the software layer transmits the first performance control strategy to the performance deployment module in the software layer.

[0130] S324. The performance deployment module in the software layer generates a control command based on the first performance control strategy.

[0131] In this embodiment, exemplarily, the first performance control strategy includes increasing the CPU frequency, and then generating a control command for adjusting the CPU frequency.

[0132] S326. Transmit control commands to the control system and BIOS layer.

[0133] In this embodiment, the control system may be a SOC, and the operating state of the hardware is controlled by the SOC. Exemplarily, when the control system obtains a control command to reduce the CPU frequency, the frequency of the CPU is controlled to be reduced.

[0134] S328. The second heartbeat module in the BIOS layer transmits a second heartbeat response instruction to the EC based on the first heartbeat response instruction.

[0135] S330 , the EC responds to the second response heartbeat instruction and returns to execute step S308 .

[0136] In this embodiment, the EC may retransmit the first heartbeat initiation instruction to the BIOS layer after obtaining the second heartbeat response instruction, thereby initiating a new round of judgment on whether the software layer is running normally. Optionally, after the EC obtains the second heartbeat response instruction, it may retransmit the first heartbeat initiation instruction to the BIOS layer at a certain interval.

[0137] In another possible implementation, the EC may start timing after transmitting the first heartbeat initiation instruction for the first time, and transmit the first heartbeat initiation instruction for the second time after a certain period of time.

[0138] It is understandable that the EC retransmits the first initiating heartbeat instruction to the BIOS layer only after obtaining the second response heartbeat instruction. In this way, the waste of instruction transmission caused by the software layer being unable to respond to the heartbeat but still transmitting the heartbeat instruction to the software layer can be reduced, thereby improving the resource utilization of the system.

[0139] It should be noted that, in this embodiment, the cycle of the EC transmitting the first heartbeat instruction can be set by counting the abnormal frequency of the software layer. Exemplarily, the higher the abnormal frequency, the shorter the cycle of the EC transmitting the first heartbeat instruction, that is, the shorter the interval time of the EC transmitting the first heartbeat instruction, the higher the frequency of transmitting the first heartbeat instruction, so that the abnormality of the software layer can be discovered in time, and the control mode can be switched in time.

[0140] In another possible implementation, S308, the first heartbeat module in the EC transmits the first initiation heartbeat instruction to the BIOS layer, and S310, the second parameter acquisition module in the BIOS layer obtains the second operating parameters of each second hardware of the electronic device, which can be independent of each other, that is, there is no execution order constraint between S308 and S310, that is, the transmission of the operating parameters and the transmission of the heartbeat instruction are independent.

[0141] In another possible implementation, step S316, the second heartbeat module in the BIOS layer notifies the second parameter acquisition module, which is not necessary, that is, the second parameter acquisition module transmits the first operating parameter and the second operating parameter to the software layer after obtaining the first operating parameter, so that the software layer can obtain the parameters in time, thereby determining the control strategy in time. By setting step S316, the parameters can be transmitted only when it is determined that the software layer is in a normal operating state. In this way, the situation where the software layer is in an abnormal state and still transmits parameters to the software layer, resulting in a waste of resources required for transmitting parameters, can be reduced, thereby improving the resource utilization of the system.

[0142] In another possible implementation, in S318, the step of transmitting the first operating parameter and the second operating parameter to the software layer by the second parameter acquisition module in the BIOS layer can also choose to send the first operating parameter and the second operating parameter in time-sharing, without sending the first operating parameter and the second operating parameter together in a package for transmission.

[0143] It is understandable that, generally speaking, the higher the performance, the higher the power consumption. Therefore, control of performance can also be understood as control of power consumption.

[0144] The following is an example of a software layer being in a stopped state and then switching back to an abnormal state. The software layer being in a stopped state and then switching back to an abnormal state can be divided into at least the following situations:

[0145] Case 1: The software layer learns that it has entered an abnormal operating state;

[0146] Case 2: The software layer is not aware that it has entered an abnormal operating state.

[0147] Therefore, the above situations are explained respectively.

[0148] First, the specific implementation of the present application is described using scenario 1.

[0149] See also Figure 4 , Figure 4 A flow chart of another control method provided in an embodiment of the present application. Figure 4 The methods shown may include:

[0150] S402. Turn on the electronic equipment.

[0151] S404: The first parameter acquisition module in the EC obtains first operating parameters of each first hardware of the electronic device.

[0152] S406. The first parameter collection module in the EC transmits the first operating parameter to the BIOS layer.

[0153] S408. The first heartbeat module in the EC transmits a first heartbeat initiation instruction to the BIOS layer.

[0154] S410: A second parameter acquisition module in the BIOS layer acquires second operating parameters of each second hardware of the electronic device.

[0155] S412: The second heartbeat module in the BIOS layer transmits a second heartbeat initiate instruction to the software layer based on the first heartbeat initiate instruction.

[0156] Among them, S402-S412 can refer to the description of the above embodiment and will not be described in detail here.

[0157] S414: The second heartbeat module in the BIOS layer starts timing.

[0158] In this embodiment, the timing may be started after the second heartbeat initiation instruction is transmitted.

[0159] S416: The second heartbeat module in the BIOS layer determines whether the accumulated timing time reaches a preset time.

[0160] In this embodiment, the preset time is used to evaluate whether the software layer has not responded to the heartbeat instruction for a long time, and then determine whether the software layer is in a normal operating state. Optionally, the preset time can be set according to actual conditions, for example, set to 10 seconds.

[0161] S418: If the accumulated time reaches the preset time, the second heartbeat module in the BIOS layer determines whether the first response heartbeat instruction is obtained.

[0162] S420: If the second heartbeat module in the BIOS layer does not obtain the first response heartbeat instruction, the BIOS performance decision module in the BIOS layer is notified.

[0163] In this embodiment, if the second heartbeat module reaches the preset time when the accumulated timing time reaches the preset time and the first response heartbeat instruction is not obtained, it can be considered that the software layer is in an abnormal operating state. At this time, the operating state of the hardware of the electronic device is controlled by the BIOS performance decision module.

[0164] Optionally, if a first response heartbeat instruction is obtained, execute step S426.

[0165] S422: The BIOS performance decision module in the BIOS layer generates a second performance control strategy for the electronic device based on the first operating parameter.

[0166] In another possible implementation, the BIOS performance decision module may also generate a second performance control strategy for the electronic device based on the second operating parameter. Figure 1 An extended thermalzone mechanism module. In general, since the performance of the BIOS layer is poorer than that of the software layer, optionally, the operating parameters on which the BIOS performance decision module makes decisions may be fewer than the operating parameters on which the software performance decision module makes decisions. Optionally, the performance control algorithms (also known as performance decision algorithms) configured by the software performance decision module and the BIOS performance decision may be different. Exemplarily, the complexity of the algorithm configured by the software performance decision module is higher than the complexity of the algorithm configured by the BIOS performance decision.

[0167] Optionally, the BIOS performance decision module can refer to the relevant description of the software performance decision module, which is not repeated here.

[0168] In a possible implementation, the BIOS performance decision module may be configured with a performance control algorithm, and the BIOS performance decision module may generate a second performance control strategy based on the performance control algorithm configured therein.

[0169] Exemplarily, the performance control algorithm may be an extended thermal zone mechanism, that is, the performance of the electronic device is controlled by simulating the thermal zone mechanism through the BIOS performance decision module. For example, the speed of the fan is controlled based on the temperature of the electronic device. The higher the temperature, the higher the speed, so that the heat dissipation of the CPU and GPU is better, the performance of the CPU and GPU can be better exerted, and the performance of the electronic device is improved.

[0170] It is understandable that if the BIOS layer is configured with an interface connected to the control system, the BIOS layer can generate a control command based on the second performance control strategy and transmit it to the control system.

[0171] S424. The third heartbeat module in the software layer transmits a third heartbeat initiation instruction to the BIOS layer.

[0172] In this embodiment, the software layer recovers from the abnormal operating state to the normal operating state. At this time, the communication between the software layer and the BIOS layer and the EC can be restored to normal. At this time, the third heartbeat module in the software layer transmits the third heartbeat instruction to the BIOS layer, thereby notifying the BIOS layer and the EC that the software layer has recovered to the normal operating state.

[0173] S426: The second heartbeat module in the BIOS layer notifies the second parameter collection module.

[0174] S428. The second parameter acquisition module in the BIOS layer transmits the first operating parameter and the second operating parameter to the software layer.

[0175] S430: A software performance decision module in the software layer generates a first performance control strategy for the electronic device based on the first operating parameter and the second operating parameter.

[0176] Among them, S426-S430 can refer to the description of the above embodiment and will not be repeated here.

[0177] S432: The second heartbeat module in the BIOS layer transmits a fourth initiate heartbeat instruction to the EC based on the third initiate heartbeat instruction.

[0178] S434. The first heartbeat module in the EC transmits a third response heartbeat instruction to the BIOS layer based on the fourth initiation heartbeat instruction.

[0179] In this embodiment, optionally, when the EC obtains the fourth initiate heartbeat instruction, it may restart transmitting the first initiate heartbeat instruction to the EC.

[0180] S436. The second heartbeat module in the BIOS layer transmits a fourth heartbeat response instruction to the software layer based on the third heartbeat response instruction.

[0181] In this embodiment, when the software layer obtains the fourth response heartbeat instruction, it can determine that the BIOS layer and the EC have learned that it has recovered to a normal operating state.

[0182] S438. After obtaining the fourth response heartbeat instruction, the software layer responds to the fourth response heartbeat instruction and may return to execute step S424.

[0183] Optionally, after obtaining the fourth response heartbeat instruction, the software layer may retransmit the third initiation heartbeat instruction after a certain period of time.

[0184] In another possible implementation, step S426, in which the second heartbeat module in the BIOS layer notifies the second parameter acquisition module, may not be necessary, and the second parameter acquisition module may be replaced by continuously transmitting the first operating parameter and the second operating parameter.

[0185] In another possible implementation, S438, after the software layer obtains the fourth response heartbeat instruction, it may or may not return to execute step S424. However, through step S438, after an abnormal operation occurs in the software layer, it can be determined in time through a two-way heartbeat whether an abnormality occurs again in the software layer.

[0186] The above embodiment describes the specific implementation of the present application based on scenario 1. The following describes the specific implementation of the present application based on scenario 2.

[0187] See also Figure 5 , Figure 5 A flowchart of another control method provided in an embodiment of the present application.

[0188] S502. Turn on the electronic device.

[0189] S504: The first parameter acquisition module in the EC obtains first operating parameters of each first hardware of the electronic device.

[0190] S506. The first parameter collection module in the EC transmits the first operating parameter to the BIOS layer.

[0191] S508. The first heartbeat module in the EC transmits a first heartbeat initiation instruction to the BIOS layer.

[0192] S510: A second parameter acquisition module in the BIOS layer acquires second operating parameters of each second hardware of the electronic device.

[0193] S512: The second heartbeat module in the BIOS layer transmits a second heartbeat initiate instruction to the software layer based on the first heartbeat initiate instruction.

[0194] S514: The second heartbeat module in the BIOS layer starts timing.

[0195] S516: The second heartbeat module in the BIOS layer determines whether the accumulated timing time reaches a preset time.

[0196] S518: If the accumulated time reaches the preset time, the second heartbeat module in the BIOS layer determines whether the first response heartbeat instruction is obtained.

[0197] S520: If the second heartbeat module in the BIOS layer does not obtain the first response heartbeat instruction, the BIOS performance decision module in the BIOS layer is notified.

[0198] S522: The BIOS performance decision module in the BIOS layer generates a second performance control strategy for the electronic device based on the first operating parameter.

[0199] S524. The second parameter acquisition module in the BIOS layer transmits the first operating parameter and the second operating parameter to the software layer.

[0200] In this embodiment, even if the software layer is in an abnormal operating state, the BIOS layer can continue to transmit the first operating parameter and the second operating parameter to the software layer, so that the software layer can generate a control command in time when it recovers to a normal operating state.

[0201] S526: The software performance decision module in the software layer generates a first performance control strategy for the electronic device based on the first operating parameter and the second operating parameter.

[0202] S528. The software performance decision module in the software layer transmits the first performance control strategy to the performance deployment module in the software layer.

[0203] S530. The performance deployment module in the software layer generates a control command based on the first performance control strategy.

[0204] Among them, S502-S530 can refer to the description of the above embodiment and will not be described in detail here.

[0205] S532. The performance deployment module in the software layer transmits control commands to the control system and BIOS layer.

[0206] It is understandable that the software layer may not be able to predict when an abnormality will occur. Therefore, for example, an abnormality may occur before the first performance control strategy is generated, or before the first performance control strategy is transmitted, or before a control command is generated, or before a control command is issued. However, no matter what the situation is, as long as the software layer is restored to a normal operating state, the next step of processing will be continued based on the original step. In this way, the software layer will eventually issue a control command, and when the BIOS layer obtains the control command, it can be known that the software layer has been restored to a normal operating state.

[0207] S534: The second heartbeat module in the BIOS layer notifies the EC.

[0208] In the embodiment of the present application, after receiving the control command, the BIOS can know that the software layer has recovered to a normal operating state, and then notify the EC. Optionally, a notification command can be transmitted to the EC to instruct the software layer to recover to a normal operating state.

[0209] S536. EC returns to execute step S508.

[0210] In this embodiment, the EC returns to execute step 508 so that the status of the software layer can be monitored.

[0211] In another possible implementation, step S534, in which the second heartbeat module in the BIOS layer notifies the EC, may not be necessary. The EC then cyclically transmits the first initiating heartbeat instruction, and the running status of the software layer can be timely known based on the response heartbeat instruction.

[0212] In general, the software layer may recover from lag by the following processes:

[0213] Processing method 1: Send soc performance control command.

[0214] Processing method 2: Execute active heartbeat.

[0215] After receiving any processing, the BIOS layer initiates an autonomous heartbeat. After confirming that the software layer is working properly, the BIOS layer and EC switch back to the first control mode, that is, the EC+BIOS mode. The control mode switching between BIOS and EC is transparent to the software layer, and the software layer always maintains the first control mode. If it is confirmed that the software layer is running abnormally, the second control mode is maintained, that is, the control mode of the software layer + BIOS layer + EC.

[0216] The following embodiments further illustrate the conditions for when to use the software layer and when to use the BIOS layer to make decisions.

[0217] First, the specific implementation of when to use the first decision-making layer to make decisions is further explained.

[0218] See also Figure 6 , Figure 6 A flowchart of another control method provided in an embodiment of the present application.

[0219] like Figure 6 As shown, if the software layer is in normal operation, the temperature of the electronic device can be determined at this time. If the temperature of the electronic device is lower than temperature point A (for example, 95 degrees), the performance of the electronic device is controlled through the software layer; if the temperature of the electronic device is higher than temperature point A and lower than temperature point B (for example, 98 degrees), the performance of the electronic device is controlled through the thermal zone mechanism. If the temperature of the electronic device is higher than temperature point B, the electronic device is forcibly powered off.

[0220] Optionally, the thermal zone mechanism may be implemented by EC, or by other layers except the software layer and the BIOS layer, which is not limited here.

[0221] Optionally, the temperature of the electronic device may be obtained by averaging the acquired temperature values ​​through the BIOS layer, or one of the temperature values ​​may be selected as the temperature value of the electronic device.

[0222] The manner in which the software layer controls the performance of the electronic device can refer to the description of the above embodiment and will not be elaborated here.

[0223] Secondly, the specific implementation of when to use the second decision-making layer to make decisions is further explained.

[0224] See also Figure 7 , Figure 7 A flowchart of another control method provided in an embodiment of the present application.

[0225] like Figure 7 As shown, if the software layer is in an abnormal operation state, then if the temperature of the electronic device is lower than temperature point A, the performance of the electronic device is controlled by the BIOS layer based on the extended thermal zone mechanism. If the temperature of the electronic device is higher than temperature point A and lower than temperature point B (for example, 98 degrees), the performance of the electronic device is controlled by the thermal zone mechanism. If the temperature of the electronic device is higher than temperature point B, the electronic device is forcibly powered off.

[0226] It should be noted that the extended thermal zone mechanism and the thermal zone mechanism may be the same or different mechanisms. For example, the extended thermal zone mechanism may be based on more parameters and different strategies than the thermal zone mechanism.

[0227] The manner in which the BIOS layer controls the performance of the electronic device can be referred to the description of the above embodiment and will not be elaborated here.

[0228] In this embodiment, the temperature is divided into multiple intervals, and different methods are selected to control the performance of the electronic device according to the temperature interval in which the electronic device is located, so that the control flexibility can be further improved. In addition, according to the real-time status of the system including the system temperature, the system performance and temperature can be flexibly controlled to achieve full coverage of control at any temperature.

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

[0230] The present application provides a control method, which may include:

[0231] When the first decision layer determines that the communication between the hardware layer and the second decision layer is normal, the first decision layer instructs to use the first control method to control the operating status of the hardware in the hardware layer; wherein, in the first control method, the second decision layer participates in the control of the operating status of the hardware in the hardware layer.

[0232] When the first decision layer determines that the communication between the hardware layer and the second decision layer is abnormal, the first decision layer instructs the use of the second control method to control the operating status of the hardware in the hardware layer; wherein, in the second control method, the second decision layer does not participate in the control of the operating status of the hardware in the hardware layer.

[0233] In this embodiment, the first decision layer can be as follows Figure 1 The BIOS layer shown, the second decision layer can be as follows Figure 1 The software layer shown in FIG. 1 and the hardware layer can be as follows: Figure 1 The layers shown. Whether the communication between the hardware layer and the second decision layer is normal can be determined by whether the communication between the EC in the hardware layer and the second decision layer is normal. It can be understood that the layer for executing the control function can be selected according to actual needs, and no limitation is made here. How the first decision layer determines whether the communication between the hardware layer and the second decision layer is normal can be referred to Figure 3-Figure 5 In addition, how the first decision layer participates in the control of the operating state of the hardware in the hardware layer, and how the second decision layer participates in the control of the operating state of the hardware in the hardware layer, can be referred to Figure 3-Figure 5 The relevant description is not repeated here.

[0234] In another possible implementation, the life span of the hardware of the electronic device and other conditions may also be controlled.

[0235] In another possible implementation, when the first control method is adopted for control, the first decision layer and the second decision layer can also be combined to control the electronic device, for example, the performance control strategies generated by the first decision layer and the second decision layer are integrated to obtain a fused performance control strategy.

[0236] In another possible implementation, the first decision layer may be combined with other modules to control the electronic device.

[0237] In a possible implementation, the control method further includes:

[0238] The first decision layer obtains a first heartbeat instruction from the hardware layer; the first decision layer transmits a second heartbeat instruction to the second decision layer in response to the first heartbeat instruction; when the first decision layer obtains a third heartbeat instruction within the first target time period, it determines that the communication between the hardware layer and the second decision layer is normal, or when the first decision layer does not obtain the third heartbeat instruction within the first target time period, it determines that the communication between the hardware layer and the second decision layer is abnormal.

[0239] The first target time period is calculated from the time when the first decision layer transmits the second heartbeat instruction to the second decision layer, and the third heartbeat instruction includes an instruction fed back by the second decision layer in response to the second heartbeat instruction.

[0240] In another possible implementation, the second decision layer may broadcast a heartbeat instruction. When the first decision layer obtains the heartbeat instruction broadcast by the first decision layer, it confirms that the second decision layer is in a normal operating state; if the first decision layer does not obtain the heartbeat instruction broadcast by the second decision layer for a long time, it confirms that the second decision layer is in an abnormal operating state.

[0241] In a possible implementation, the control method further includes: the hardware layer includes a controller at least for acquiring and transmitting a heartbeat instruction, the first heartbeat instruction is cyclically transmitted by the controller at a first time interval, and the method further includes:

[0242] The first decision layer transmits a fourth heartbeat instruction to the controller in response to the third heartbeat instruction, and the controller obtains the time of receiving the fourth heartbeat instruction as the starting time of the first time interval.

[0243] The controller may be, for example, Figure 1 EC in.

[0244] In another possible implementation, the first decision layer may not respond to the third heartbeat instruction, and the controller may retransmit the first heartbeat instruction.

[0245] In a possible implementation, after the first decision layer determines that the communication between the hardware layer and the second decision layer is abnormal, the method further includes:

[0246] The first decision layer obtains the fifth heartbeat instruction from the second decision layer, and the fifth heartbeat instruction includes the instruction transmitted by the second decision layer when switching from an abnormal operating state to a normal operating state; the first decision layer responds to the fifth heartbeat instruction and transmits the sixth heartbeat instruction to the hardware layer; when the first decision layer obtains the seventh heartbeat instruction, it determines that the communication between the hardware layer and the second decision layer switches from abnormal communication to normal communication, and the seventh heartbeat instruction includes the instruction fed back by the hardware layer in response to the sixth heartbeat instruction.

[0247] In another possible implementation, the second decision layer may broadcast instructions when it returns to normal operation. When the first decision layer reacquires the instructions broadcast by the second decision layer, it confirms that the second decision layer returns to normal operation.

[0248] In a possible implementation manner, the fifth heartbeat instruction is cyclically transmitted by the second decision layer at a second time interval, and the method further includes:

[0249] The first decision layer transmits the eighth heartbeat instruction to the second decision layer in response to the seventh heartbeat instruction, and the second decision layer obtains the time of the eighth heartbeat instruction as the starting time of the second time interval.

[0250] In another possible implementation, the first decision layer may not transmit the second heartbeat instruction, and the second decision layer may transmit the heartbeat instruction to the first decision layer at a certain time to prove that it maintains a normal operating state.

[0251] Exemplarily, the first heartbeat instruction may be, for example, Figure 3-Figure 5 The first heartbeat instruction in the example is Figure 3-Figure 5The second heartbeat instruction initiating the heartbeat instruction, the third heartbeat instruction may be, for example, Figure 3-Figure 5 The first response heartbeat instruction in; the fourth heartbeat instruction may be, for example, Figure 3-Figure 5 The second response heartbeat instruction in; the fifth heartbeat instruction may be, for example, Figure 3-Figure 5 The third heartbeat instruction in the initiation; the sixth heartbeat instruction may be, for example, Figure 3-Figure 5 The fourth heartbeat instruction in the initiation; the seventh heartbeat instruction may be, for example, Figure 3-Figure 5 The third response heartbeat instruction in; the eighth heartbeat instruction may be, for example, Figure 3-Figure 5 The fourth response heartbeat instruction in.

[0252] In a possible implementation, the electronic device further includes a control system for controlling hardware in the hardware layer, and after the first decision layer determines that the communication between the hardware layer and the second decision layer is abnormal, the method further includes:

[0253] The second decision layer sends control commands to the first decision layer and the control system respectively. The control commands are generated by the second decision layer in normal operation when controlling by the second control method. The control commands indicate commands for controlling the operating status of the hardware in the hardware layer. When the first decision layer obtains the control commands from the second decision layer, it determines that the communication between the hardware layer and the second decision layer switches from abnormal to normal communication.

[0254] The control system may be, for example, a SOC.

[0255] In another possible implementation manner, the second decision layer may not transmit the control command to the first decision layer.

[0256] In a possible implementation, the first control mode is used to control the operating state of the hardware in the hardware layer, including:

[0257] The first decision layer obtains an operating parameter set from the hardware layer, and the operating parameter set includes operating parameters of part or all of the hardware during the operation of the electronic device; the first decision layer transmits the operating parameter set to the second decision layer; and the second decision layer controls the operating status of the hardware in the hardware layer based on the operating parameter set.

[0258] The operating parameter set may include operating parameters read by the BIOS and / or operating parameters read by the EC.

[0259] In a possible implementation, the second decision layer includes a first performance decision module and a deployment module, the first performance decision module is configured with one or more first performance control algorithms, the deployment module is configured to deploy a performance control strategy generated by the first performance decision module, the electronic device also includes a control system for controlling hardware in the hardware layer, and the second decision layer controls the operating state of the hardware in the hardware layer based on the operating parameter set, including:

[0260] The first performance decision module calls at least one first performance control algorithm, processes all operating parameters in the operating parameter set through at least one first performance control algorithm, and obtains a first performance control strategy for the electronic device; the deployment module generates a control command based on the first performance control strategy, and transmits the control command to the control system; the control system controls the operating status of the hardware in the hardware layer based on the control command.

[0261] Exemplarily, the first performance decision module may be, for example Figure 3-Figure 5 The software performance decision module in the second performance decision module may be, for example, Figure 3-Figure 5 BIOS performance decision module in.

[0262] In another possible implementation manner, some operating parameters in the operating parameter set may be processed by at least one first performance control algorithm.

[0263] In another possible implementation, the first performance decision module and the deployment module may also be the same module.

[0264] In a possible implementation, the hardware layer includes a controller at least for obtaining operating parameters of first hardware in the hardware layer, and the first decision layer obtains the operating parameter set from the hardware layer, including:

[0265] An operating parameter of the first hardware from the controller is obtained, and an operating parameter of the second hardware from the hardware layer is obtained.

[0266] In another possible implementation manner, the first decision layer may also only obtain the operating parameters of the first hardware from the controller or the operating parameters of the second hardware from the hardware layer.

[0267] In a possible implementation, the first decision layer includes a second performance decision module, the second performance decision module is configured with a second performance control algorithm, and the second control method is used to control the operating state of the hardware in the hardware layer, including:

[0268] The second performance decision module calls the second performance control algorithm, processes some operating parameters in the operating parameter set through the second performance control algorithm, and obtains the second performance control strategy of the electronic device; the first decision layer controls the operating status of the hardware in the hardware layer based on the second performance control strategy.

[0269] The second performance control algorithm may be, for example, an extended thermal zone mechanism.

[0270] In a possible implementation, when the first decision layer determines that the communication between the hardware layer and the second decision layer is normal, the first decision layer instructs to control the operating state of the hardware in the hardware layer using the first control method, including:

[0271] When the first decision layer determines that the communication between the hardware layer and the second decision layer is normal and the temperature of the electronic device is lower than the first temperature threshold, the first decision layer instructs to control the operating state of the hardware in the hardware layer using the first control method.

[0272] The first temperature threshold may be temperature point A, for example.

[0273] In another possible implementation, the first control method may be used to control the operating state of the hardware in the hardware layer at all temperatures.

[0274] In a possible implementation, when the first decision layer determines that the communication between the hardware layer and the second decision layer is abnormal, the first decision layer instructs to use the second control method to control the operating state of the hardware in the hardware layer, including:

[0275] When the first decision layer determines that the communication between the hardware layer and the second decision layer is abnormal and the temperature of the electronic device is lower than the first temperature threshold, the first decision layer instructs to control the operating state of the hardware in the hardware layer using the second control method.

[0276] In another possible implementation, the second control method may be used to control the operating state of the hardware in the hardware layer at all temperatures.

[0277] In one possible implementation, when the first decision layer determines that the temperature of the electronic device is higher than the second temperature threshold, the first decision layer instructs the use of a third control method to control the operating state of the hardware in the hardware layer; wherein the second temperature threshold is greater than or equal to the first temperature threshold, and in the third control method, the first decision layer and the second decision layer do not participate in the control of the operating state of the hardware in the hardware layer.

[0278] Among them, the third control method can be, for example, Figure 6-Figure 7 Thermal zone mechanism in.

[0279] In another possible implementation, a third decision layer having the same capability as the second decision layer may be provided, and the third control method is implemented through the third decision layer.

[0280] It should be noted that the module names involved in the embodiments of the present application can be defined as other names as long as the functions of each module can be achieved, and there is no specific restriction on the names of the modules.

[0281] 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 the embodiments of the present 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.

[0282] The control method of the embodiment of the present application has been described above, and the device for executing the above method provided by the embodiment of the present application is described below. Those skilled in the art can understand that the method and the device can be combined and referenced with each other, and the relevant device provided by the embodiment of the present application can execute the steps in the above list sorting method.

[0283] The control method provided in the embodiment of the present application can be applied to electronic devices with communication functions. The electronic devices include terminal devices, and the specific device form of the terminal devices can refer to the above related descriptions, which will not be repeated here.

[0284] An embodiment of the present application provides a terminal device, which includes: a processor and a memory; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory, so that the terminal device executes the above method.

[0285] like Figure 8 A schematic diagram of the structure of a chip provided in an embodiment of the present application. The chip 800 includes one or more (including two) processors 801 , a communication line 802 , a communication interface 803 and a memory 804 .

[0286] In some implementations, the memory 804 stores the following elements: executable modules or data structures, or a subset thereof, or an extended set thereof.

[0287] The method described in the above embodiment of the present application can be applied to the processor 801, or implemented by the processor 801. The processor 801 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 801. The above processor 801 can be a general 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 801 can implement or execute the methods, steps and logic block diagrams related to each processing disclosed in the embodiment of the present application.

[0288] The steps of the method described in the embodiment of the present application can be directly embodied as being executed by a hardware decoding processor, or can be 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 804, and the processor 801 reads the information in the memory 804 and completes the steps of the above method in combination with its hardware.

[0289] The processor 801 , the memory 804 , and the communication interface 803 may communicate with each other via the communication line 802 .

[0290] 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.

[0291] The embodiments of the present application also provide a computer-readable storage medium. The computer-readable storage medium stores a computer program. The above method is implemented when the computer program is executed by the processor. The method described in the above embodiment can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. If implemented in software, the function can be stored as one or more instructions or codes on a computer-readable medium or transmitted on a computer-readable medium. Computer-readable media can include computer storage media and communication media, and can also include any medium that can transfer a computer program from one place to another. The storage medium can be any target medium that can be accessed by a computer.

[0292] In one possible implementation, a computer-readable medium may include RAM, ROM, compact disc read-only memory (CD-ROM) or other optical disk storage, disk storage or other magnetic storage devices, or any other medium that is intended to carry or store the required program code in the form of instructions or data structures and can be accessed by a computer. Moreover, any connection is appropriately referred to as a computer-readable medium. For example, if a coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL) or wireless technology (such as infrared, radio and microwave) is used to transmit software from a website, server or other remote source, 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. Disks and optical disks as used herein include optical disks, laser disks, optical disks, digital versatile disks (DVD), floppy disks and Blu-ray disks, where disks usually reproduce data magnetically, while optical disks reproduce data optically using lasers. Combinations of the above should also be included in the scope of computer-readable media.

[0293] An embodiment of the present application provides a computer program product, which includes a computer program. When the computer program is executed, the computer executes the above method.

[0294] 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 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 1A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0295] The above specific implementation methods further illustrate the purpose, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above are only specific implementation methods of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made on the basis of the technical solutions of the present invention should be included in the scope of protection of the present invention.

Claims

1. A control method, characterized in that: Applied to an electronic device, the electronic device comprises a first decision layer, a second decision layer and a hardware layer, the first decision layer is a layer between the second decision layer and the hardware layer, the method comprises: When the first decision layer determines that the communication between the hardware layer and the second decision layer is normal, the first decision layer instructs to use a first control method to control the operating state of the hardware in the hardware layer; wherein, in the first control method, the second decision layer participates in the control of the operating state of the hardware in the hardware layer; When the first decision layer determines that the communication between the hardware layer and the second decision layer is abnormal, the first decision layer instructs the use of a second control method to control the operating status of the hardware in the hardware layer; wherein, in the second control method, the second decision layer does not participate in the control of the operating status of the hardware in the hardware layer.

2. The method according to claim 1, characterized in that The method further comprises: The first decision layer obtains a first heartbeat instruction from the hardware layer; The first decision layer transmits a second heartbeat instruction to the second decision layer in response to the first heartbeat instruction; When the first decision layer obtains the third heartbeat instruction within the first target time period, it determines that the communication between the hardware layer and the second decision layer is normal, or when the first decision layer does not obtain the third heartbeat instruction within the first target time period, it determines that the communication between the hardware layer and the second decision layer is abnormal; The first target time period is calculated from the time when the first decision layer transmits the second heartbeat instruction to the second decision layer, and the third heartbeat instruction includes an instruction fed back by the second decision layer in response to the second heartbeat instruction.

3. The method according to claim 2, characterized in that The hardware layer includes a controller at least for acquiring and transmitting a heartbeat instruction, wherein the first heartbeat instruction is cyclically transmitted by the controller at a first time interval, and the method further includes: The first decision layer transmits a fourth heartbeat instruction to the controller in response to the third heartbeat instruction, and the controller obtains the time of receiving the fourth heartbeat instruction as the starting time of the first time interval.

4. The method according to any one of claims 1 to 3, characterized in that After the first decision layer determines that the communication between the hardware layer and the second decision layer is abnormal, the method further includes: The first decision layer obtains a fifth heartbeat instruction from the second decision layer, where the fifth heartbeat instruction includes an instruction transmitted when the second decision layer switches from an abnormal operation state to a normal operation state; The first decision layer transmits a sixth heartbeat instruction to the hardware layer in response to the fifth heartbeat instruction; When the first decision layer obtains the seventh heartbeat instruction, it determines that the communication between the hardware layer and the second decision layer switches from abnormal communication to normal communication, and the seventh heartbeat instruction includes the instruction fed back by the hardware layer in response to the sixth heartbeat instruction.

5. The method according to claim 4, characterized in that The fifth heartbeat instruction is cyclically transmitted by the second decision layer at a second time interval, and the method further includes: The first decision layer transmits an eighth heartbeat instruction to the second decision layer in response to the seventh heartbeat instruction, and the second decision layer obtains the time of receiving the eighth heartbeat instruction as the starting time of the second time interval.

6. The method according to any one of claims 1 to 5, characterized in that The electronic device further includes a control system for controlling hardware in the hardware layer. After the first decision layer determines that the communication between the hardware layer and the second decision layer is abnormal, the method further includes: The second decision layer sends a control command to the first decision layer and the control system respectively, wherein the control command is generated by the second decision layer in a normal operating state when the second control method is used for control, and the control command indicates a command for controlling the operating state of the hardware in the hardware layer; When the first decision layer obtains the control command from the second decision layer, the first decision layer determines that the communication between the hardware layer and the second decision layer switches from abnormal communication to normal communication.

7. The method according to any one of claims 1 to 6, characterized in that The operating state of the hardware in the hardware layer is controlled by a first control method, including: The first decision layer obtains an operation parameter set from the hardware layer, where the operation parameter set includes operation parameters of part or all of the hardware during the operation of the electronic device; The first decision layer transmits the set of operating parameters to the second decision layer; The second decision layer controls the operating state of the hardware in the hardware layer based on the operating parameter set.

8. The method according to claim 7, characterized in that The second decision layer includes a first performance decision module and a deployment module, the first performance decision module is configured with one or more first performance control algorithms, the deployment module is configured to deploy a performance control strategy generated by the first performance decision module, the electronic device also includes a control system for controlling the hardware in the hardware layer, and the second decision layer controls the operating state of the hardware in the hardware layer based on the operating parameter set, including: The first performance decision module calls at least one first performance control algorithm, processes all operating parameters in the operating parameter set by the at least one first performance control algorithm, and obtains a first performance control strategy for the electronic device; The deployment module generates a control command based on the first performance control strategy, and transmits the control command to the control system; The control system controls the operating state of the hardware in the hardware layer based on the control command.

9. The method according to claim 7 or 8, characterized in that: The hardware layer includes a controller at least for obtaining operating parameters of first hardware in the hardware layer, and the first decision layer obtains an operating parameter set from the hardware layer, including: An operating parameter of a first hardware from the controller is obtained, and an operating parameter of a second hardware from the hardware layer is obtained.

10. The method according to any one of claims 7 to 9, characterized in that: The first decision layer includes a second performance decision module, the second performance decision module is configured with a second performance control algorithm, and the second control method is used to control the operating state of the hardware in the hardware layer, including: The second performance decision module calls the second performance control algorithm, processes part of the operating parameters in the operating parameter set through the second performance control algorithm, and obtains a second performance control strategy for the electronic device; The first decision layer controls the operating status of the hardware in the hardware layer based on the second performance control strategy.

11. The method according to any one of claims 1 to 10, characterized in that When the first decision layer determines that the communication between the hardware layer and the second decision layer is normal, the first decision layer instructs to control the operation state of the hardware in the hardware layer using a first control method, including: When the first decision layer determines that the communication between the hardware layer and the second decision layer is normal and the temperature of the electronic device is lower than a first temperature threshold, the first decision layer instructs to control the operating state of the hardware in the hardware layer using a first control method.

12. The method according to any one of claims 1 to 11, characterized in that When the first decision layer determines that the communication between the hardware layer and the second decision layer is abnormal, the first decision layer instructs to use a second control method to control the operating state of the hardware in the hardware layer, including: When the first decision layer determines that the communication between the hardware layer and the second decision layer is abnormal and the temperature of the electronic device is lower than a first temperature threshold, the first decision layer instructs to control the operating state of the hardware in the hardware layer using a second control method.

13. The method according to claim 11 or 12, characterized in that: The method further comprises: When the first decision layer determines that the temperature of the electronic device is higher than the second temperature threshold, the first decision layer instructs the use of a third control method to control the operating status of the hardware in the hardware layer; wherein the second temperature threshold is greater than or equal to the first temperature threshold, and in the third control method, the first decision layer and the second decision layer do not participate in the control of the operating status of the hardware in the hardware layer.

14. 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, the memory is used to store computer program code, the computer program code comprises computer instructions, and the one or more processors call the computer instructions so that the electronic device executes the method as described in any one of claims 1 to 13.

15. 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 any one of the methods described in claims 1 to 13.

16. A computer-readable storage medium, characterized in that: The computer-readable storage medium comprises computer instructions, and when the computer instructions are executed on an electronic device, the electronic device is caused to perform the method as claimed in any one of claims 1 to 13.

17. 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 13.

Citation Information

Patent Citations

  • Internet of Things terminal and system based on universal embedded computer

    CN110119282A

  • Power consumption management and temperature control system and method of computer

    CN114490252A

  • Methods for Managing Performance States in an Information Handling System

    US20100306768A1