A method of controlling temperature and electronic device
By dynamically adjusting the game frame rate and query cycle, and gradually reducing the game frame rate based on the real-time temperature of the electronic device, the problem of excessively high temperature of the electronic device was solved, resulting in reduced load and improved user experience.
Patent Information
- Application Number
- CN202410177941.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-08
- Publication Date
- 2025-12-30
- Estimated Expiration
- 2044-02-08
AI Technical Summary
How to effectively control the temperature of electronic devices without affecting the user experience, especially in gaming scenarios, to avoid device malfunctions due to overheating.
By dynamically adjusting the game frame rate and setting flexible query cycles and frequencies based on the real-time temperature of the electronic device, the game frame rate is gradually reduced to control temperature rise and avoid the load caused by frequent queries.
It enables fine-tuning of game frame rates while ensuring that temperature monitoring efficiency is not reduced, thereby reducing the load on electronic devices, avoiding device malfunctions caused by overheating, and improving the user experience.
Smart Images

Figure CN119270945B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of terminal, and in particular to a temperature control method and an electronic device. BACKGROUND
[0002] Electronic devices such as mobile phones and tablet computers may generate heat during use. For example, in a gaming scenario, the running of a game application may cause the electronic device to generate heat; for example, in a charging scenario, the input current may cause the battery of the electronic device to generate heat.
[0003] How to control the temperature of the electronic device so that the temperature of the electronic device is within a suitable range is a problem to be solved. SUMMARY
[0004] Embodiments of the present application provide a temperature control method and an electronic device, which can control the temperature rise of the electronic device in a low-load form while ensuring temperature monitoring efficiency.
[0005] To achieve the above object, embodiments of the present application adopt the following technical solutions:
[0006] In a first aspect, a temperature control method is provided, which includes: after a first application is started, obtaining a first temperature of an electronic device at a first time; determining a second time according to the first temperature; obtaining a second temperature of the electronic device at the second time; wherein at the first time, a game frame rate of the first application is a first frame rate; at the second time, the game frame rate of the first application is adjusted to a second frame rate; the second frame rate is less than the first frame rate, and the second temperature is greater than the first temperature.
[0007] In the method, the frequency of querying the temperature is dynamically adjusted according to the real-time temperature of the electronic device, and after the temperature of the electronic device meets a preset condition, the game frame rate is reduced, so that the temperature of the electronic device is controlled. The game frame rate is adjusted in time in a case where the temperature monitoring efficiency does not decrease or remains unchanged, and the temperature rise is controlled in a low-load form.
[0008] In combination with the first aspect, in a possible implementation manner, when the second temperature is greater than a first temperature threshold and less than a second temperature threshold, the second frame rate is determined according to the second temperature based on a first formula; wherein the first formula is used to represent the corresponding relationship between the temperature of the electronic device and the game frame rate of the first application; under the condition that the temperature of the electronic device is greater than the first temperature threshold and less than the second temperature threshold, the game frame rate of the first application is negatively correlated with the temperature of the electronic device.
[0009] In the method, when the temperature is greater than the first temperature threshold and less than the second temperature threshold, the game frame rate is negatively correlated with the temperature, that is, the game frame rate is gradually reduced as the temperature rises, instead of directly reducing the game frame rate to a lower value, which can avoid sudden reduction of the game frame rate and thus improve the user experience.
[0010] With reference to the first aspect, in a possible implementation, when the second temperature is greater than or equal to the second temperature threshold, the second frame rate is a preset frame rate value.
[0011] In the method, when the game frame rate is reduced to a certain extent (a preset frame rate value), the game frame rate is no longer reduced, which can avoid too low game frame rate and thus improve the user experience.
[0012] With reference to the first aspect, in a possible implementation, when the first temperature is less than or equal to the first temperature threshold, the first frame rate is a default game frame rate of the first application.
[0013] With reference to the first aspect, in a possible implementation, after obtaining the first temperature of the electronic device at the first time, the first query period is determined based on the first temperature and a preset correspondence between temperature and query period; the second time is a time after the first query period from the first time.
[0014] In the method, the query period (query frequency) for querying the temperature each time is dynamically determined according to the real-time temperature, which can flexibly set the query period, ensure the temperature monitoring efficiency, and reduce the load of the electronic device.
[0015] In a possible implementation, the correspondence between the temperature and the query period includes: a third temperature corresponds to a second query period, and a fourth temperature corresponds to a third query period; the third temperature is less than the fourth temperature, and the second query period is greater than the third query period.
[0016] The third temperature and the fourth temperature are both less than the first temperature threshold, or the third temperature and the fourth temperature are both greater than the first temperature threshold and less than the second temperature threshold.
[0017] In the method, the temperature interval corresponding to a short query period is high, and the closer the temperature is to the starting point (the first temperature threshold) of the game frame rate adjustment, the shorter the query period is. In this way, the query frequency can be increased when the temperature is close to the starting point of the game frame rate adjustment, so as to ensure the efficiency of temperature monitoring and start the game frame rate adjustment in time to control the temperature when the temperature rises. When the temperature is greater than or equal to the first temperature threshold (the starting point temperature of the game frame rate adjustment), the query frequency is reduced (the query period is extended). In this way, the game frame rate can be gradually reduced, and the user experience can be avoided from being affected by the too fast reduction of the game frame rate. When the temperature is greater than or equal to the first temperature threshold and less than the second temperature threshold, the temperature intervals correspond to different query periods, the temperature interval corresponding to a short query period is high, and the closer the temperature is to the end point (the second temperature threshold) of the game frame rate adjustment, the shorter the query period is. In this way, the game frame rate can be adjusted to the pre-set minimum value in time when the temperature rises.
[0018] In a possible implementation, the correspondence between the temperature and the query period includes that when the temperature is greater than or equal to the second temperature threshold, the query period corresponding to the temperature is a pre-set time length.
[0019] In this way, when the game frame rate has been reduced to a pre-set minimum frame rate value, the temperature is queried with a long query period, and the temperature is no longer frequently queried, so that the load caused by querying the temperature is reduced.
[0020] In a second aspect, an electronic device is provided, which has a function of implementing the method in the first aspect. The function can be implemented by hardware or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions.
[0021] In a third aspect, an electronic device is provided, which includes a processor and a memory. The memory is configured to store computer execution instructions. When the electronic device is running, the processor executes the computer execution instructions stored in the memory, so that the electronic device executes the method in any one of the first aspects.
[0022] In a fourth aspect, an electronic device is provided, which includes a processor. The processor is configured to be coupled with a memory and read instructions in the memory, and execute the method in any one of the first aspects according to the instructions.
[0023] In a fifth aspect, a computer readable storage medium is provided, which stores instructions. When the instructions are run on a computer, the computer can execute the method in any one of the first aspects.
[0024] In a sixth aspect, a computer program product containing instructions which, when executed on a computer, enable the computer to carry out the method according to any one of the first aspect.
[0025] In a seventh aspect, an apparatus (for example, the apparatus can be a chip system) is provided. The apparatus includes a processor configured to support an electronic device to implement the functions involved in the first aspect. In a possible design, the apparatus further includes a memory configured to store necessary program instructions and data for the electronic device. When the apparatus is a chip system, the apparatus can be composed of a chip or can include a chip and other discrete devices.
[0026] The technical effects brought by any one of the designs of the second aspect to the seventh aspect can be referred to the technical effects brought by the different designs of the first aspect, which will not be repeated here. BRIEF DESCRIPTION OF DRAWINGS
[0027] Figure 1 A schematic diagram of a method for controlling temperature;
[0028] Figure 2 A schematic diagram of another method for controlling temperature;
[0029] Figure 3 A schematic diagram of a hardware structure of an electronic device provided by an embodiment of the present application;
[0030] Figure 4 A schematic diagram of a software architecture of an electronic device provided by an embodiment of the present application;
[0031] Figure 5 A schematic diagram of a correspondence between temperature and game frame rate;
[0032] Figure 6 A schematic diagram of a flow of a method for controlling temperature provided by an embodiment of the present application;
[0033] Figure 7 A schematic diagram of a flow of a method for controlling temperature provided by an embodiment of the present application;
[0034] Figure 8 A schematic diagram of a flow of a method for controlling temperature provided by an embodiment of the present application;
[0035] Figure 9 A schematic diagram of a structure of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0036] In the description of the embodiments of the present application, the terms used in the following embodiments are only for the purpose of describing the specific embodiments and are not intended to be limiting of the present application. As used in the specification and the appended claims of the present application, the singular forms “a,” “an” and “the” are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will also be understood that the term “at least one of’ or “one or more of’ when used in the following embodiments refers to one or two or more (including two). The term “and / or” is used to describe the relationship between associated objects, which means that there can be three relationships; for example, A and / or B can represent the following three cases: A exists alone, A and B exist together, and B exists alone, where A and B can be singular or plural. The character “ / ” generally represents an “or” relationship between the associated objects.
[0037] In the present specification, the reference to “one embodiment” or “some embodiments” etc. means that a particular feature, structure or characteristic described in connection with the embodiment is included in one or more embodiments of the present application. Thus, the phrases “in one embodiment”, “in some embodiments”, “in other some embodiments”, “in yet some embodiments” etc. appearing in various places in the present specification are not necessarily all referring to one and the same embodiment, but can mean “one or more but not all embodiments”, unless otherwise specifically stated. The terms “comprising”, “containing”, “having” and their variants mean “including but not limited to”, unless otherwise specifically stated. The term “connected” includes both direct and indirect connections, unless otherwise stated. “First”, “second”, etc. are used only for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the technical features indicated.
[0038] In the embodiments of the present application, the words “exemplary” or “for example” are used to mean serving as an example, instance, or illustration, in no way limiting of other embodiments, designs, or features. The use of any of these terms in the description is not an indication of a preference or favoring of particular embodiments or designs over others. Rather, these terms are simply used to present concepts in a concrete manner.
[0039] Many scenarios in the use process of the electronic device will cause the phenomenon of heat generation. The heat generation will affect the normal use of the electronic device. The temperature of the electronic device can be controlled to avoid the temperature being too high to cause the electronic device to run abnormally.
[0040] Taking gaming scenarios as an example, in some implementations, if the temperature of an electronic device is detected to be higher than a certain value, the game frame rate can be reduced to lower the device's temperature. Frame rate refers to the number of frames displayed per second, measured in frames transmitted per second (FPS). A higher frame rate results in smoother visuals. In gaming, the frame rate is the number of frames per second that a game application runs. Understandably, factors causing an increase in electronic device temperature can include battery overheating, CPU overheating, etc. Reducing the game frame rate can decrease the high CPU resource consumption of running the game application, thus lowering the electronic device's temperature.
[0041] In some embodiments, reference Figure 1 When the temperature of an electronic device is detected to be greater than or equal to a preset temperature value, the game frame rate is reduced to a lower value to prevent the temperature from rising further. However, abruptly reducing the game frame rate from a high value to a low value may cause a sudden change in the smoothness of the game, resulting in a poor user experience.
[0042] In some embodiments, reference Figure 2 The system periodically detects the temperature of the electronic device. If the temperature of the electronic device is determined to be greater than or equal to a preset temperature value, the game frame rate is gradually reduced over a period of time until the game frame rate is reduced to the preset frame rate, thereby controlling the temperature of the electronic device.
[0043] In one implementation, a polling command can be used to periodically poll the temperature of the electronic device. In one example, the log recording of the electronic device's temperature polling is as follows:
[0044] Line 7173:12-15 10:42:11.291D AGPService:PGPlugin getTempaturenTempature:31269
[0045] Line 12577:12-15 10:42:16.296D AGPService:PGPlugin getTempaturenTempature:31327
[0046] Line 12579:12-15 10:42:16.297D AGPService:PGPlugin getTempaturenTempature:31327
[0047] Line 18982:12-15 10:42:21.299D AGPService:PGPlugin getTempaturenTempature:31336
[0048] Line 18984: 12-15 10:42:21.299 D AGPService: PGPlugin getTempature nTempature: 31336
[0049] Line 22345: 12-15 10:42:26.300 D AGPService: PGPlugin getTempature nTempature: 31505
[0050] Line 22347: 12-15 10:42:26.300 D AGPService: PGPlugin getTempature nTempature: 31505
[0051] Line 23211: 12-15 10:42:31.304 D AGPService: PGPlugin getTempature nTempature: 31745
[0052] Line 23213: 12-15 10:42:31.305 D AGPService: PGPlugin getTempature nTempature: 31745
[0053] Line 23915: 12-15 10:42:31.943 D AGPService: PGPlugin getTempature nTempature: 31745
[0054] Line 23938: 12-15 10:42:31.945 D AGPService: PGPlugin getTempature nTempature: 31745
[0055] Line 24016: 12-15 10:42:31.957 D AGPService: PGPlugin getTempature nTempature: 31745
[0056] Line 24021: 12-15 10:42:31.958 D AGPService: PGPlugin getTempature nTempature: 31745
[0057] Line 25233:12-15 10:42:36.308D AGPService:PGPlugin getTempature nTempature:32022
[0058] Line 25235:12-15 10:42:36.308D AGPService:PGPlugin getTempature nTempature:32022
[0059] Line 25352:12-15 10:42:36.960D AGPService:PGPlugin getTempature nTempature:32022
[0060] Line 25354:12-15 10:42:36.960D AGPService:PGPlugin getTempature nTempature:32022
[0061] Line 26351:12-15 10:42:41.311D AGPService:PGPlugin getTempature nTempature:32293
[0062] Line 26353:12-15 10:42:41.312D AGPService:PGPlugin getTempature nTempature:32293
[0063] Line 26489:12-15 10:42:41.963D AGPService:PGPlugin getTempature nTempature:32293
[0064] Line 26491:12-15 10:42:41.964D AGPService:PGPlugin getTempature nTempature:32293
[0065] Line 27434:12-15 10:42:46.316D AGPService:PGPlugin getTempature nTempature:32606
[0066] Line 27436:12-15 10:42:46.317D AGPService:PGPlugin getTempaturenTempature:32606
[0067] Line 27543:12-15 10:42:46.966D AGPService:PGPlugin getTempaturenTempature:32606
[0068] Line 27545:12-15 10:42:46.967D AGPService:PGPlugin getTempaturenTempature:32606
[0069] Line 28490:12-15 10:42:51.323D AGPService:PGPlugin getTempaturenTempature:32386
[0070] Line 28492:12-15 10:42:51.324D AGPService:PGPlugin getTempaturenTempature:32386
[0071] Line 28623:12-15 10:42:51.969D AGPService:PGPlugin getTempaturenTempature:32386
[0072] Line 28625:12-15 10:42:51.969D AGPService:PGPlugin getTempaturenTempature:32386
[0073] Line 29284:12-15 10:42:56.330D AGPService:PGPlugin getTempaturenTempature:33093
[0074] Line 29286:12-15 10:42:56.331D AGPService:PGPlugin getTempaturenTempature:33093
[0075] Line 29361:12-15 10:42:56.971D AGPService:PGPlugin getTempaturenTempature:33093
[0076] …
[0077] It can be seen that: about every 5 seconds, the AGPService of the electronic device calls the PGPlugin to query the temperature. The command to query the temperature is periodically executed.
[0078] In this embodiment, the long-time periodic polling of the temperature also increases the load of the electronic device, causing the temperature of the electronic device to rise.
[0079] The embodiments of the present application provide a method for controlling temperature, which dynamically adjusts the frequency of querying the temperature according to the real-time temperature of the electronic device, and gradually reduces the game frame rate within a period of time after the temperature of the electronic device meets the preset condition, so that the temperature of the electronic device is controlled. The game frame rate is adjusted according to the temperature of the electronic device in a fine manner without reducing or changing the temperature monitoring efficiency, so that the temperature rise is controlled in a low-load manner.
[0080] The method for controlling temperature provided by the embodiments of the present application can be applied to electronic devices that need to control temperature. The above-mentioned electronic devices can include mobile phones, tablet computers, notebook computers, personal computers (PC), ultra-mobile personal computers (UMPC), handheld computers, netbooks, smart home devices (such as smart TVs, smart screens, large screens, smart speakers, smart air conditioners, etc.), personal digital assistants (PDA), wearable devices (such as smart watches, smart bracelets, etc.), vehicle-mounted devices, virtual reality devices, etc., and the embodiments of the present application do not make any limitation thereto.
[0081] For example, refer to Figure 3 which shows a structural schematic diagram of an electronic device 100. The electronic device 100 can include a processor 110, an external memory interface 120, an internal memory 130, a display screen 140, a communication module 150, a power module 160, a sensor module 170, etc. Among them, the sensor module 170 can include a pressure sensor, a touch sensor, a temperature sensor, etc.
[0082] It can be understood that the structure shown in the embodiments of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 can include more or fewer components than shown, or combine certain components, or split certain components, or different arrangement of components. The components shown can be implemented in hardware, software, or a combination of software and hardware.
[0083] The processor 110 can include one or more processing units. For example, the processor 110 can include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), and / or a neural-network processing unit (NPU), etc. Different processing units can be independent components or integrated in one or more processors. In some embodiments, the electronic device 100 can also include one or more processors 110.
[0084] The controller is the nerve center and command center of the electronic device 100. According to the instruction operation code and timing signal, the operation control signal can be generated to complete the control of fetching and executing instructions.
[0085] The application processor can run an operating system of the electronic device 100, which is used to manage hardware and software resources of the electronic device 100. For example, to manage and configure memory, determine the priority of system resource supply and demand, control input and output devices, operate network, manage file system, manage driver, etc. The operating system can also be used to provide an operation interface for user to interact with the system. In the operating system, various software can be installed, such as driver, application (App), etc.
[0086] The memory in the processor 110 can also be configured to store instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory can store instructions or data that have just been used or are frequently used by the processor 110. If the processor 110 needs to use the instructions or data again, it can directly call from the memory. This avoids repeated access and reduces the waiting time of the processor 110, thereby improving the efficiency of the system.
[0087] In some embodiments, the processor 110 can include one or more interfaces. The interfaces can include an inter-integrated circuit (I2C) interface, an integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a SIM card interface, and / or a USB interface, etc.
[0088] It can be understood that the interface connection relationship between the modules shown in the embodiments of the present application is only illustrative and does not constitute a limitation on the structure of the electronic device 100. In some other embodiments of the present application, the electronic device 100 can also use different interface connection modes or a combination of multiple interface connection modes in the above embodiments.
[0089] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to realize data storage functions. For example, music, video, and other files are saved in the external memory card.
[0090] The internal memory 130 can be used to store one or more computer programs including instructions. The processor 110 can execute the above-mentioned instructions stored in the internal memory 130, so that the electronic device 100 executes the methods provided in some embodiments of the present application, as well as various applications and data management, etc. The internal memory 130 can include a code storage area and a data storage area. The data storage area can store data created during the use of the electronic device 100, etc. In addition, the internal memory 130 can include a high-speed random access memory, and can also include a non-volatile memory, such as one or more disk storage components, flash memory components, universal flash storage (UFS), etc. In some embodiments, the processor 110 can execute the instructions stored in the internal memory 130 and / or the instructions stored in the memory disposed in the processor 110, so that the electronic device 100 executes the methods provided in the embodiments of the present application, as well as other applications and data management.
[0091] The electronic device 100 implements display functions through a GPU, a display screen 140, and an application processor, etc. The GPU is a microprocessor for image processing, connecting the display screen 140 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 can include one or more GPUs that execute program instructions to generate or change display information.
[0092] The display screen 140 is used to display images, videos, etc. The display screen 140 includes a display panel. The display panel can adopt a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light emitting diode (AMOLED), a flex light-emitting diode (FLED), a Miniled, a MicroLed, a Micro-oLed, a quantum dot light emitting diode (QLED), etc. In some embodiments, the electronic device 100 can include 1 or N display screens 140, N being a positive integer greater than 1.
[0093] In some embodiments, the display screen 140 is provided with a pressure sensor, a touch sensor, etc. The pressure sensor is used to sense a pressure signal, which can be converted into an electrical signal. When a touch operation is applied to the display screen 140, the electronic device 100 detects the touch operation intensity according to the pressure sensor. The electronic device 100 can also calculate the touch position according to the detection signal of the pressure sensor. The touch sensor, also known as a "touch panel", can form a touch screen, also known as a "touch screen", with the display screen 140. The touch sensor is used to detect touch operations applied to it or nearby. The touch sensor can pass the detected touch operation to the application processor to determine the touch event type. Visual output related to the touch operation can also be provided through the display screen 140.
[0094] The communication module 150 can provide a solution for wireless communication, including cellular, Wi-Fi, Bluetooth (BT), wireless data transmission module (e.g., 433 MHz, 868 MHz, 915 MHz), etc., applied to the electronic device 100. The communication module 150 can be one or more devices that integrate at least one communication processing module.
[0095] The power module 160 can be used to supply power to various components included in the electronic device 100. In some embodiments, the power module 160 can be a battery, such as a rechargeable battery.
[0096] The electronic device 100 can detect the temperature of the electronic device through a temperature sensor. For example, the temperature sensor can be disposed near the CPU to detect the temperature of the CPU; for example, the temperature sensor can be disposed near the battery to detect the temperature of the battery, and the like. In the embodiments of the present application, the temperature of the electronic device 100 can be embodied by the temperature of the CPU, the temperature of the battery, and the like; alternatively, the temperature of the electronic device 100 can be comprehensively evaluated by comprehensively evaluating the temperature of the CPU, the battery, and the like. The specific embodiment of the temperature of the electronic device 100 can be determined according to actual conditions.
[0097] In the embodiments of the present application, the electronic device 100 described above is an electronic device that can run an operating system and install an application. Alternatively, the operating system running on the electronic device can be Android, iOS, Windows, and the like.
[0098] The above electronic device 100 is taken as a mobile phone as an example. The software system of the electronic device 100 can adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture. The embodiments of the present application take the layered architecture as an example to illustrate the software structure of the electronic device 100.
[0099] Figure 4 is a software structure block diagram of the electronic device 100 in the embodiments of the present application.
[0100] The layered architecture divides the software into several layers, and each layer has a clear role and division of labor. The layers communicate with each other through a software interface. In some embodiments, the Android system is divided into four layers, from top to bottom, which are an application layer, an application framework layer, an Android runtime and a system library, and a kernel layer.
[0101] The application layer can include a series of application packages. For example, camera, gallery, calendar, call, map, navigation, and the like.
[0102] The application framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer. The application framework layer includes some pre-defined functions.
[0103] For example, the application framework layer can include a package management service, a resource management service, a content provider, a window management service, a notification management service, a location management service, a telephony management service, a media management service, a power management service, and the like. Figure 4 As shown, the application framework layer can include a window management service, a content provider, a view system, a resource management service, an activity management service (AMS), an advanced graphic platform (AGP) service, a performance adjustment component, a power consumption control component, an automatic protect system (APS), etc.
[0104] The window management service is used to manage window programs. The window management service can acquire a display screen size, determine whether there is a status bar, lock a screen, and intercept a screen, etc.
[0105] The content provider is used to store and acquire data, and make the data accessible to an application program. The data can include videos, images, audios, dialed and received calls, browsing history and bookmarks, a phone book, etc.
[0106] The view system includes visual controls, such as a control for displaying text, a control for displaying pictures, etc. The view system can be used to build an application program. A display interface can be composed of one or more views. For example, a display interface including a short message notification icon can include a view for displaying text and a view for displaying pictures.
[0107] The resource management service provides various resources for an application program, such as localized strings, icons, pictures, layout files, video files, etc.
[0108] The AMS is mainly responsible for starting, switching, scheduling, and managing and scheduling application processes of four components in the system, and its responsibilities and operations are similar to the process management and scheduling module in the operating system. When a process or component is initiated, a request is transmitted to the AMS through the Binder communication mechanism, and the AMS makes unified processing.
[0109] The advanced graphic processing platform is used to optimize image performance, power consumption, etc. For example, reducing a game frame rate, adjusting a play frame rate of an application, etc.
[0110] The performance adjustment component is used to optimize the performance of an electronic device, such as controlling heating, prolonging battery life, etc. For example, the performance adjustment component is iaware.
[0111] The power consumption control component is used to manage the power consumption and temperature control of an electronic device, etc.
[0112] The automatic protect system is used to execute an automatic protection strategy, such as controlling temperature by adjusting a game frame rate, reducing battery temperature by limiting a charging current, etc.
[0113] The Android Runtime includes a core library and a virtual machine. The Android runtime is responsible for scheduling and managing the Android system.
[0114] The core library contains two parts: one part is the function function that the java language needs to call, and the other part is the core library of Android.
[0115] The application layer and the application framework layer run in the virtual machine. The virtual machine executes the java files of the application layer and the application framework layer into binary files. The virtual machine is used to perform functions such as management of object life cycle, stack management, thread management, security and exception management, and garbage collection.
[0116] The system library can include multiple functional modules. For example: surface manager, media library, three-dimensional graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.
[0117] The surface manager is used to manage the display subsystem and provides 2D and 3D layer fusion for multiple applications.
[0118] The media library supports multiple commonly used audio, video format playback and recording, and static image files, etc. The media library can support multiple audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
[0119] The three-dimensional graphics processing library is used to realize three-dimensional graphics drawing, image rendering, synthesis, and layer processing, etc.
[0120] The 2D graphics engine is a drawing engine for 2D drawing.
[0121] The kernel layer is the layer between hardware and software. The kernel layer can contain display drivers, sensor drivers, etc.
[0122] In some embodiments, the electronic device pre-configures a correspondence between temperature and query period. For example, a temperature interval corresponds to a query period. For example, the correspondence between temperature and query period is shown in Table 1. In the embodiment of the present application, the unit of temperature is degree Celsius.
[0123] Table 1
[0124]
[0125] The electronic device adjusts the period of querying the temperature in real time according to the temperature of the electronic device according to the correspondence relationship shown in Table 1. For example, when the temperature of the electronic device is less than 38 degrees, the period of querying the temperature of the electronic device is 30 seconds, which means that the temperature is queried every 30 seconds. When the temperature of the electronic device is greater than or equal to 38 degrees and less than 39 degrees, the period of querying the temperature of the electronic device is 20 seconds, which means that the temperature is queried every 20 seconds. When the temperature of the electronic device is greater than or equal to 39 degrees and less than 40 degrees, the period of querying the temperature of the electronic device is 10 seconds, which means that the temperature is queried every 10 seconds. When the temperature of the electronic device is greater than or equal to 40 degrees and less than 41 degrees, the period of querying the temperature of the electronic device is 5 seconds, which means that the temperature is queried every 5 seconds. When the temperature of the electronic device is greater than or equal to 41 degrees and less than 42 degrees, the temperature of the electronic device is queried every 20 seconds. When the temperature of the electronic device is greater than or equal to 42 degrees and less than 42.5 degrees, the temperature of the electronic device is queried every 10 seconds. When the temperature of the electronic device is greater than or equal to 42.5 degrees and less than 43 degrees, the temperature of the electronic device is queried every 5 seconds. When the temperature of the electronic device is greater than or equal to 43 degrees, the temperature of the electronic device is queried every 15 seconds.
[0126] In Table 1, when the temperature is less than the first threshold value (for example, 38 degrees), the corresponding query period 1 (for example, 30 seconds); when the temperature is greater than or equal to the first threshold value (for example, 38 degrees) and less than the second threshold value (for example, 39 degrees), the corresponding query period 2 (for example, 20 seconds); when the temperature is greater than or equal to the third threshold value (for example, 39 degrees) and less than the fourth threshold value (for example, 40 degrees), the corresponding query period 3 (for example, 10 seconds); when the temperature is greater than or equal to the fourth threshold value (for example, 40 degrees) and less than the fifth threshold value (for example, 41 degrees), the corresponding query period 4 (for example, 5 seconds). That is, different temperature intervals correspond to different query periods, and the query period corresponding to the interval with a higher temperature is shorter, and the closer the temperature is to the starting point of adjusting the game frame rate, the shorter the query period. In this way, the query frequency can be increased when the temperature is close to the starting point of adjusting the game frame rate, and the efficiency of temperature monitoring can be ensured, and the game frame rate can be adjusted in time to control the temperature when the temperature rises.
[0127] When the temperature is greater than or equal to the first temperature threshold value (the starting point temperature of adjusting the game frame rate), the query frequency is reduced (the query period is extended); for example, when the temperature is greater than or equal to 41 degrees, the corresponding query period is 20 seconds; in this way, the game frame rate can be gradually reduced, and the user experience can be avoided from being affected by the game frame rate being reduced too quickly. When the temperature is greater than or equal to the first temperature threshold value and less than the second temperature threshold value, different temperature intervals correspond to different query periods, and the query period corresponding to the interval with a higher temperature is shorter, and the closer the temperature is to the end point of adjusting the game frame rate (the second temperature threshold value), the shorter the query period. The game frame rate can be adjusted to the pre-set minimum value in time when the temperature rises.
[0128] When the temperature is greater than or equal to the second temperature threshold (for example, 43 degrees), the query period corresponding to the temperature is a pre-set time length (for example, 15 seconds); in this way, when the game frame rate has been reduced to a pre-set minimum frame rate value, a longer query period is used to query the temperature, and the temperature is no longer queried frequently, thereby reducing the load caused by querying the temperature.
[0129] Referring to Table 1, when the temperature is low, for example, less than 38 degrees, the query period is longer, that is, the query frequency is lower; when the temperature reaches a certain value, for example, greater than 40 degrees, the query period is shorter, that is, the query frequency is higher; in this way, it is not necessary to periodically and frequently query the temperature, and the frequency of querying the temperature can be reduced, thereby reducing the load of the electronic device. Moreover, as the temperature increases, the frequency of querying the temperature increases, which can ensure the temperature monitoring efficiency, and the game frame rate can be reduced in time when the temperature reaches the first value (for example, the starting temperature value for adjusting the game frame rate), and the starting time of reducing the game frame rate can be accurately determined. In an example, for example, in Table 1, when the temperature is greater than or equal to 41 degrees (the starting temperature value for adjusting the game frame rate), the frequency of querying the temperature is reduced (the query period is extended), so as to gradually reduce the game frame rate, thereby avoiding a sudden decrease in the game frame rate, which can cause a poor user experience.
[0130] In an implementation manner, different temperature and query period corresponding relationships can be configured for different game applications. For example, for game 1, the configured temperature and query period corresponding relationship is shown in Table 1. For game 2, the configured temperature and query period corresponding relationship is shown in Table 2.
[0131] Table 2
[0132]
[0133] It can be understood that in other implementation manners, a temperature and query frequency corresponding relationship can be set, for example, when the temperature of the electronic device is less than 37 degrees, the query frequency is that the electronic device queries the temperature every 30 seconds. The query frequency is querying the temperature every 30 seconds, that is, the corresponding query period is 30 seconds. The query frequency can be converted into the corresponding query period, and the query period can be converted into the corresponding query frequency.
[0134] Since the temperature of the electronic device is continuously and cumulatively changed, generally, no mutation occurs, and the query period of the temperature is adjusted according to the change trend of the temperature of the electronic device, which can save the computing resources of the electronic device and avoid the load caused by periodically and frequently querying the temperature.
[0135] In some embodiments, the electronic device is preconfigured with a correspondence between temperature and game frame rate. When the temperature of the electronic device is less than a first temperature threshold, the game frame rate is a first frame rate threshold. For example, the first frame rate threshold is a default frame rate of the game application. When the temperature of the electronic device is greater than a second temperature threshold, the game frame rate is a second frame rate threshold. The second temperature threshold is greater than the first temperature threshold, and the second frame rate threshold is less than the first frame rate threshold. When the temperature of the electronic device is greater than or equal to the first temperature threshold and less than or equal to the second temperature threshold, the higher the temperature, the lower the corresponding game frame rate, that is, the game frame rate is negatively correlated with the temperature. Optionally, the game frame rate corresponding to the temperature can be calculated according to a preset formula. In an implementation, the correspondence between the temperature and the game frame rate is linear when the temperature of the electronic device is greater than or equal to the first temperature threshold and less than or equal to the second temperature threshold. When the temperature of the electronic device is the first temperature threshold, the corresponding game frame rate is the first frame rate threshold. When the temperature of the electronic device is the second temperature threshold, the corresponding game frame rate is the second frame rate threshold. Figure 5
[0136] In an implementation, different temperature and game frame rate correspondences can be configured for different game applications. For example, for game 1, the first temperature threshold is 41 degrees Celsius, and the second temperature threshold is 43 degrees Celsius. For game 2, the first temperature threshold is 43 degrees Celsius, and the second temperature threshold is 48 degrees Celsius. For example, for game 1, the first frame rate threshold is 90 FPS, and the second frame rate threshold is 60 FPS. For game 2, the first frame rate threshold is 120 FPS, and the second frame rate threshold is 90 FPS.
[0137] After the electronic device queries the temperature each time, the game frame rate can be set according to the correspondence between the temperature and the game frame rate. When the temperature of the electronic device is greater than the first temperature threshold, the game frame rate gradually decreases as the temperature of the electronic device rises. Until the temperature of the electronic device is greater than or equal to the second temperature threshold, the game frame rate decreases to the second frame rate threshold.
[0138] By gradually reducing the game frame rate, the temperature of the electronic device is prevented from rising sharply.
[0139] In combination with Figure 4 the software architecture shown, Figure 6 an implementation of the method for controlling temperature provided by the embodiments of the present application is shown.
[0140] As shown in Figure 6 the method includes:
[0141] S601, the high-level graphics processing platform registers the application listener to the performance adjustment component.
[0142] The high-level graphics processing platform registers application monitoring to the performance adjustment component for monitoring application startup.
[0143] S602, after the first application starts, the AMS sends an application startup message to the performance adjustment component.
[0144] For example, the AMS is instrumented in the StartActivity() function of the application startup process. When an application starts, the send() function is called to send an application startup message to the performance adjustment component, and the application startup message includes the package name of the application.
[0145] For example, in response to a user operation, the first application starts, and the first application is a game application. In the StartActivity() function of the first application, the send() function is called to send an application startup message to the performance adjustment component, and the application startup message includes the package name of the first application.
[0146] S603, the performance adjustment component calls the high-level graphics processing platform, and sends the package name of the first application to the high-level graphics processing platform.
[0147] The performance adjustment component receives the application startup message, and obtains the package name of the first application according to the application startup message. The performance adjustment component determines that the high-level graphics processing platform has registered application monitoring, and sends the package name of the first application to the high-level graphics processing platform.
[0148] Optionally, after the performance adjustment component receives the application startup message, the application type is determined according to the application package name included in the application startup message. For example, the application type can include a video type, a game type, a call type, an office type, and the like. In an implementation manner, the corresponding relationship between the package name and the application type is preconfigured in the electronic device. The performance adjustment component can determine the application type according to the corresponding relationship between the package name and the application type. The performance adjustment component also sends the application type of the first application to the high-level graphics processing platform.
[0149] S604, the high-level graphics processing platform determines whether the first application belongs to a preset application. If the first application belongs to the preset application, S605 is performed, and if the first application does not belong to the preset application, S613 is performed.
[0150] In an implementation manner, a white list is preconfigured in the electronic device, and the white list includes the package name of at least one application. The application included in the white list is an application that needs to perform dynamic adjustment of the game frame rate according to the temperature. The application included in the white list is the preset application.
[0151] S605, the high-level graphics processing platform sets a monitoring flag bit to a first value.
[0152] The monitoring flag is the first value, indicating that the game frame rate is dynamically adjusted according to the temperature; and the monitoring flag is the second value, indicating that the game frame rate is not dynamically adjusted according to the temperature.
[0153] For example, the first value is 1, and the monitoring flag is set to 1, indicating that the game frame rate is dynamically adjusted according to the temperature.
[0154] S606, the high-level graphics processing platform obtains the temperature of the electronic device from the power consumption control component.
[0155] In an implementation, the power consumption control component can obtain the temperature value collected by the temperature sensor, for example, the temperature value collected by the temperature sensor can be the temperature value of the CPU, the temperature value of the battery, etc. In an example, the power consumption control component determines the temperature value of the CPU or the temperature value of the battery, etc. as the temperature of the electronic device; in another example, the power consumption control component obtains the temperature of the electronic device by weighting the temperature value of the CPU, the temperature value of the battery, etc.
[0156] In an implementation, after the high-level graphics processing platform obtains the temperature of the electronic device from the power consumption control component, the monitoring flag is determined. If the monitoring flag is the first value, indicating that the first application is the preset application, and the game frame rate needs to be dynamically adjusted according to the temperature, S607 or S608 is continued to be executed.
[0157] S607, if there is no timer, the high-level graphics processing platform starts the timer, and sets the time length of the timer according to the temperature of the electronic device.
[0158] The timer is used to control the period of the high-level graphics processing platform obtaining the temperature of the electronic device from the power consumption control component; the time length of the timer is set according to the temperature of the electronic device, for example, the time length of the timer is the query period corresponding to the temperature of the electronic device. In an implementation, after the high-level graphics processing platform obtains the temperature of the electronic device, the query period corresponding to the temperature of the electronic device is determined according to the corresponding relationship between the temperature and the query period (or the query frequency) configured for the first application. For example, the temperature of the electronic device is 26 degrees, the corresponding relationship between the temperature and the query period corresponding to the first application is as shown in Table 1, the query period corresponding to the temperature of 26 degrees is determined to be 30 seconds according to Table 1, and then the time length of the timer is determined to be 30 seconds.
[0159] After the timer expires each time, S606 is executed, and the high-level graphics processing platform obtains the temperature of the electronic device from the power consumption control component.
[0160] If the timer does not exist, the timer is started. In one implementation, a timer flag is set, the timer flag being a first value indicating that the timer is not started, and the timer flag being a second value indicating that the timer is started. The timer flag is set to the first value by default, and is set to the second value after the timer is started.
[0161] Optionally, in one implementation, the electronic device saves the current game frame rate for subsequent determination of whether to perform the action of adjusting the game frame rate. For example, if the timer does not exist, it indicates that it is the first time to obtain the temperature of the electronic device, and the game frame rate has not been adjusted, the current game frame rate can be set to a default value, for example, 0.
[0162] S608, if the timer exists, the advanced graphics processing platform adjusts the duration of the timer according to the temperature of the electronic device.
[0163] In one implementation, if it is determined that the timer flag is the second value, it indicates that the timer has been started. The advanced graphics processing platform determines the corresponding query period according to the temperature of the electronic device, i.e., determines the duration of the timer. The advanced graphics processing platform sets the duration of the timer to the query period corresponding to the temperature of the electronic device. In one implementation, after the advanced graphics processing platform obtains the temperature of the electronic device, it determines the query period corresponding to the temperature of the electronic device according to the configured corresponding relationship between the temperature and the query period (or the query frequency) corresponding to the first application. For example, the temperature of the electronic device is 38.5 degrees, the corresponding relationship between the temperature and the query period corresponding to the first application is as shown in Table 1, and according to Table 1, it is determined that the query period corresponding to the temperature of 38.5 degrees is 20 seconds, and then it is determined that the duration of the timer is 20 seconds.
[0164] S609, the advanced graphics processing platform obtains the target game frame rate corresponding to the first application according to the temperature of the electronic device.
[0165] In one implementation, the advanced graphics processing platform determines the target game frame rate corresponding to the first application according to the corresponding relationship between the temperature and the game frame rate corresponding to the first application and the temperature of the electronic device.
[0166] For example, the temperature of the electronic device obtained in S606 is greater than or equal to the first temperature threshold and less than or equal to the second temperature threshold, and the game frame rate corresponding to the temperature is calculated according to a preset formula.
[0167] S610, if the target game frame rate of the first application is not equal to the current game frame rate, the advanced graphics processing platform sends a frame rate adjustment message to the automatic protection system, which includes the target game frame rate of the first application.
[0168] In an implementation, the high-level graphics processing platform updates the recorded current game frame rate to the target game frame rate corresponding to the first application.
[0169] S611, the automatic protection system sends the target game frame rate of the first application to the surface compositor.
[0170] The surface compositor composites the image frame of the first application according to the target game frame rate of the first application. In an implementation, the frequency at which the framework layer takes the buffer (for saving the image frame) of the first application is changed according to the target game frame rate of the first application, that is, even if the frequency at which the first application takes the buffer is the value set by default or the value set by the user, the game frame rate of the first application can be adjusted to the target game frame rate.
[0171] S612, after the timer expires, S606 is executed, and the temperature of the electronic device is obtained from the power consumption control component again.
[0172] S613, the monitoring flag bit is set to the second value.
[0173] If the first application does not belong to the preset application, the game frame rate is not required to be dynamically adjusted according to the temperature, and the monitoring flag bit is set to the second value. For example, the game application is exited, and the desktop application is switched to the foreground application, so the first application is the desktop application, and the game frame rate is not required to be dynamically adjusted according to the temperature.
[0174] In an implementation, after the high-level graphics processing platform obtains the temperature of the electronic device from the power consumption control component, the monitoring flag bit is judged. If the monitoring flag bit is the second value, it indicates that the game frame rate is not required to be dynamically adjusted according to the temperature, the high-level graphics processing platform closes the timer, sets the timer flag bit to the first value, and can also set the current game frame rate to a default value (for example, 0).
[0175] In this embodiment, the duration of the timer is determined according to the temperature of the electronic device obtained in real time. For example, when the temperature of the electronic device is low, the duration of the timer is long, the period for obtaining the temperature of the electronic device is long, and the frequency is low; when the temperature of the electronic device reaches a certain value, the duration of the timer is short, the period for obtaining the temperature of the electronic device is short, and the frequency is high; instead of periodically and frequently obtaining the temperature of the electronic device, the frequency of interaction between the high-level graphics processing platform and the power consumption control component is reduced, thereby reducing the load of the electronic device; and after the temperature of the electronic device reaches a certain value, the frequency for obtaining the temperature of the electronic device is increased, so that the temperature monitoring efficiency can be ensured. In the process of reducing the game frame rate, as the temperature rises, the game frame rate gradually decreases, instead of suddenly decreasing, thereby avoiding the use experience of the user that the game quality suddenly becomes poor.
[0176] The high-level graphics processing platform can include a plurality of processing modules, for example, a temperature control module, a temperature reading module, a frame rate control module, etc.
[0177] Referring to Figure 7 After the first application (for example, the first application belongs to a preset application) is started, the temperature control module starts a process of monitoring the temperature. The temperature control module queries the temperature reading module for the temperature every t1 seconds. The temperature reading module queries the power consumption control component for the temperature of the electronic device through binder calling. After the temperature control module obtains the temperature of the electronic device from the power consumption control component, the temperature is sent to the temperature control module.
[0178] After the first application is started, the temperature of the electronic device gradually rises. In an implementation manner, the value of t1 is adjusted in real time according to the temperature of the electronic device. The closer the temperature of the electronic device to the first temperature threshold (the starting point temperature of reducing the game frame rate), the smaller the value of t1, that is, the higher the temperature query frequency.
[0179] In an example, after the temperature control module determines that the temperature of the electronic device is greater than or equal to the first temperature threshold, the temperature control module starts to adjust the game frame rate of the first application. In an implementation manner, the temperature control module notifies the frame rate control module to reduce the game frame rate of the first application. The frame rate control module sends a frame rate adjustment message to the automatic protection system to reduce the game frame rate of the first application.
[0180] In an implementation manner, the value of t2 is adjusted in real time according to the temperature of the electronic device. The closer the temperature of the electronic device to the second temperature threshold (the end point temperature of reducing the game frame rate), the smaller the value of t2, that is, the higher the temperature query frequency.
[0181] In combination Figure 4 The software architecture is shown, Figure 8 Another implementation manner of a method for controlling temperature is shown.
[0182] For example, Figure 8 As shown in the figure, the method comprises:
[0183] S801, the high-level graphics processing platform registers the application listening to the performance adjustment component.
[0184] S802, after the first application is started, the AMS sends an application start message to the performance adjustment component.
[0185] S803, the performance adjustment component calls the high-level graphics processing platform and sends the package name of the first application to the high-level graphics processing platform.
[0186] S804, the high-level graphics processing platform determines whether the first application belongs to the preset application. If the first application belongs to the preset application, S805 is executed, and if the first application does not belong to the preset application, S813 is executed.
[0187] S805, the high-level graphics processing platform sets the monitoring flag bit to a first value.
[0188] The specific implementation of S801-S805 can refer to S601-S605, which will not be described here.
[0189] S806, the high-level graphics processing platform registers temperature monitoring with the power consumption control component, including a first temperature threshold.
[0190] S807, after the temperature of the electronic device is greater than or equal to the first temperature threshold, the power consumption control component sends a first notification message to the high-level graphics processing platform.
[0191] In one implementation, the power consumption control component can obtain a temperature value collected by a temperature sensor, for example, a temperature value collected by a temperature sensor can be a temperature value of a CPU, a temperature value of a battery, etc. In one example, the power consumption control component determines the temperature of the electronic device as the temperature value of the CPU or the temperature value of the battery, etc. In another example, the power consumption control component obtains the temperature of the electronic device by weighting the temperature value of the CPU, the temperature value of the battery, etc.
[0192] After determining that the temperature of the electronic device is greater than or equal to the first temperature threshold, the power consumption control component sends a first notification message to the high-level graphics processing platform, to notify the power consumption control component that the temperature of the electronic device is greater than or equal to the first temperature threshold.
[0193] S808, the high-level graphics processing platform sends a temperature control gear to the power consumption control component.
[0194] After receiving the first notification message, the high-level graphics processing platform sends a temperature control gear to the power consumption control component. The temperature control gear includes a set of temperature values greater than the first temperature threshold and less than or equal to the second temperature threshold.
[0195] The first temperature threshold is the starting point temperature for reducing the game frame rate, and the second temperature threshold is the end point temperature for reducing the game frame rate. When the temperature is less than the first temperature threshold, the corresponding game frame rate is the first frame rate threshold; when the temperature is greater than the second temperature threshold, the corresponding game frame rate is the second frame rate threshold; wherein the second temperature threshold is greater than the first temperature threshold, and the second frame rate threshold is less than the first frame rate threshold. When the temperature is greater than or equal to the first temperature threshold and less than or equal to the second temperature threshold, the higher the temperature, the lower the corresponding game frame rate.
[0196] Exemplarily, the first temperature threshold is 41 degrees, and the second temperature threshold is 43 degrees. The temperature control gears include 41.5 degrees, 41.8 degrees, 42 degrees, 42.2 degrees, 42.4 degrees, 42.6 degrees, 42.7 degrees, 42.8 degrees, 42.9 degrees, and 43 degrees.
[0197] In S809, the power consumption control component determines that the temperature reaches any one of the temperature values in the temperature control gears, and sends a second notification message to the high-level graphics processing platform, which includes the current temperature.
[0198] It should be noted that in actual implementation, when the temperature of the electronic device reaches a certain temperature value, the difference between the temperature of the electronic device and the temperature value can be less than a preset threshold. For example, when the temperature of the electronic device is 42.81 degrees, that is, the difference between the temperature of the electronic device and 42.8 degrees is less than 0.02 (the preset threshold), it can be considered that the temperature of the electronic device reaches 42.8 degrees.
[0199] In S810, the high-level graphics processing platform acquires the current temperature of the electronic device according to the second notification message, and determines the target game frame rate of the first application according to the current temperature.
[0200] In an implementation manner, the high-level graphics processing platform determines the target game frame rate of the first application according to the corresponding relationship between the temperature and the game frame rate corresponding to the first application and the temperature of the electronic device.
[0201] In S811, if the target game frame rate of the first application is not equal to the current game frame rate, the high-level graphics processing platform sends a frame rate adjustment message to the automatic protection system, which includes the target game frame rate of the first application.
[0202] In an implementation manner, the electronic device saves the current game frame rate, which is used for subsequent judgment of whether to perform the action of adjusting the game frame rate. Exemplarily, the initial value of the current game frame rate is a default value (for example, 0). After the high-level graphics processing platform sends the frame rate adjustment message to the automatic protection system, the recorded current game frame rate is updated to the target game frame rate corresponding to the first application.
[0203] In S812, the automatic protection system sends the target game frame rate of the first application to the surface compositor.
[0204] In S812, the automatic protection system sends the target game frame rate of the first application to the surface compositor.
[0205] S813, if the monitoring flag is the first value, the advanced graphics processing platform notifies the power consumption control component to stop monitoring the temperature of the electronic device. The advanced graphics processing platform sets the monitoring flag to the second value.
[0206] If the first application does not belong to the preset application, it is not necessary to perform the dynamic adjustment of the game frame rate according to the temperature. For example, if the game application is exited, and the desktop application is switched to the foreground application, the first application is the desktop application, and it is not necessary to perform the dynamic adjustment of the game frame rate according to the temperature. The advanced graphics processing platform notifies the power consumption control component to stop monitoring the temperature of the electronic device.
[0207] The advanced graphics processing platform further sets the monitoring flag to the second value. Optionally, the advanced graphics processing platform further sets the current game frame rate to a default value (for example, 0).
[0208] In this embodiment, in the range greater than the first temperature threshold and less than the second temperature threshold, the power consumption control component reports the current temperature of the electronic device to the advanced graphics processing platform only when the temperature of the electronic device reaches some specific temperature values (temperature values included in the temperature control gears). The interaction frequency between the advanced graphics processing platform and the power consumption control component is reduced, thereby reducing the load of the electronic device. The advanced graphics processing platform adjusts the game frame rate according to the current temperature of the electronic device. In the process of reducing the game frame rate, the game frame rate gradually decreases with the increase of the temperature, instead of suddenly decreasing, thereby avoiding the use experience of the sudden deterioration of the game quality for the user.
[0209] In some scenarios, the charging of the battery of the electronic device may cause the temperature of the battery to rise, and long-time charging may cause the battery to heat. Embodiments of the present application further provide a method for controlling temperature, dynamically adjusting the frequency of querying the temperature according to the real-time temperature of the electronic device (battery), and gradually reducing the charging current of the electronic device within a time period when the temperature of the electronic device (battery) meets a preset condition. The charging current is finely adjusted according to the temperature of the electronic device in the form of low load to control the temperature rise without reducing or changing the temperature monitoring efficiency.
[0210] The specific implementation can refer to the related description in the above embodiment of adjusting the game frame rate according to the temperature of the electronic device.
[0211] It can be understood that, in order to realize the above functions, the electronic device provided in the embodiments of the present application comprises the hardware structure and / or software module corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of the examples described in the embodiments disclosed in the present application, the embodiments of the present application can be realized in the form of hardware or a combination of hardware and computer software. Whether a certain function is realized in the form of hardware or computer software driving hardware depends on the specific application of the technical solution and the design constraint conditions. Those skilled in the art can use different methods to realize the described functions for each specific application, but such implementation should not be considered beyond the scope of the embodiments of the present application.
[0212] The embodiments of the present application can divide the functional modules of the electronic device according to the above method examples. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one processing module. The integrated module can be realized in the form of hardware or software functional module. It should be noted that the division of the modules in the embodiments of the present application is illustrative, and is only a logical functional division. When actually implemented, another division method can be used.
[0213] In an example, refer to Figure 9 which shows a possible structure schematic diagram of the electronic device involved in the above embodiments. The electronic device 900 comprises a processing unit 910 and a storage unit 920.
[0214] The processing unit 910 is configured to control and manage the actions of the electronic device 900. The storage unit 920 is configured to save the program code and data of the electronic device 900.
[0215] Of course, the unit modules in the above electronic device 900 include but are not limited to the above processing unit 910 and storage unit 920.
[0216] Optionally, the electronic device 900 can further comprise a display unit 930, a sensor unit 940, etc. The display unit 930 is configured to display the interface of the electronic device 900; for example, the user interface of the first application, etc. The sensor unit 940 is configured to collect the temperature of the electronic device.
[0217] The processing unit 910 can be a processor or a controller, for example, a central processing unit (CPU), a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, transistor logic device, hardware component, or any combination thereof. The storage unit 920 can be a memory. The display unit 930 can be a display screen. The sensor unit 940 can include a temperature sensor.
[0218] For example, the processing unit 910 is a processor (such as the processor 110 shown in FIG. 1), the storage unit 920 can be a memory (such as the internal memory 130 shown in FIG. 1), the display unit 930 can be a display screen (such as the display screen 140 shown in FIG. 1), and the sensor unit 940 can be a sensor module (such as the sensor module 170 shown in FIG. 1). The electronic device 900 provided by the embodiment of the present application can be the electronic device 100 shown in FIG. 1. The above-mentioned processor, memory, display screen, sensor module, etc. can be connected together, for example, through a bus. Figure 3 Figure 3 Figure 3 Figure 3 Figure 3
[0219] The embodiment of the present application further provides a chip system, which includes at least one processor and at least one interface circuit. The processor and the interface circuit can be interconnected through a line. For example, the interface circuit can be used to receive signals from other devices (for example, the memory of the electronic device). For another example, the interface circuit can be used to send signals to other devices (for example, the processor). Illustratively, the interface circuit can read the instructions stored in the memory and send the instructions to the processor. When the instructions are executed by the processor, the electronic device can perform the steps in the above-mentioned embodiments. Of course, the chip system can also include other discrete devices, which are not limited in the embodiment of the present application.
[0220] The embodiment of the present application further provides a computer readable storage medium, which includes computer instructions. When the computer instructions are run on the above-mentioned electronic device, the electronic device can perform the functions or steps performed by the electronic device in the above-mentioned method embodiments.
[0221] The embodiment of the present application further provides a computer program product, which, when running on a computer, enables the computer to perform each function or step of the method embodiment of the mobile phone.
[0222] Through the description of the above embodiments, those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above functional modules is taken as an example for illustration, and in actual application, the above functions can be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.
[0223] In several embodiments provided in the present application, it should be understood that the disclosed device and method can be implemented by other ways. For example, the device embodiment described above is only schematic, for example, the division of the modules or units is only a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another device, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units or components shown or discussed can be indirect coupling or communication connection through some interface, device or unit, and can be electrical, mechanical or other forms.
[0224] The units described as separate components can or can not be physically separate, and the components shown as units can be one physical unit or multiple physical units, that is, can be located in one place, or can be distributed to multiple different places. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment scheme.
[0225] In addition, each functional unit in each embodiment of the present application can be integrated in one processing unit, or each unit can exist physically independently, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.
[0226] The integrated unit, if implemented in the form of a software function unit and sold or used as an independent product, can be stored in a readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application essentially or say the part that contributes to the prior art or the whole or part of the technical solutions can be embodied in the form of a software product. The software product is stored in a storage medium, including a plurality of instructions to make a device (which can be a single-chip microcomputer, a chip, etc.) or a processor execute all or part of the steps of the method described in various embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various media that can store program codes.
[0227] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any change or replacement within the technical scope disclosed in the present application should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A method of controlling temperature applied to an electronic device, the method comprising: determining a temperature of the electronic device; and controlling a temperature of the electronic device based on the determined temperature. The method comprises: After the first application is started, the temperature of the electronic device is periodically acquired; On the condition that the temperature of the electronic device is greater than or equal to a first temperature threshold and less than a second temperature threshold, the game frame rate of the first application is set after each acquisition of the temperature of the electronic device, so that the game frame rate of the first application is negatively correlated with the temperature of the electronic device; Wherein, when the temperature of the electronic device is less than a first temperature value, the period of acquiring the temperature of the electronic device is a first query period; when the temperature of the electronic device is greater than or equal to the first temperature value and less than a second temperature value, the period of acquiring the temperature of the electronic device is a second query period; the second query period is less than the first query period, and the second temperature value is less than or equal to the first temperature threshold; When the temperature of the electronic device is greater than or equal to the first temperature threshold and less than a third temperature value, the period of acquiring the temperature of the electronic device is a first period; when the temperature of the electronic device is greater than or equal to the third temperature value and less than a fourth temperature value, the period of acquiring the temperature of the electronic device is a second period; the first period is greater than the second query period, the second period is less than the first period, and the fourth temperature value is less than or equal to the second temperature threshold.
2. The method of claim 1, wherein, When the temperature of the electronic device is greater than or equal to a second temperature threshold, the game frame rate of the first application is a preset frame rate value.
3. The method of claim 1 or 2, wherein, When the temperature of the electronic device is less than or equal to the first temperature threshold, the game frame rate of the first application is a default game frame rate of the first application.
4. The method according to any one of claims 1 to 3, characterized in that, When the temperature of the electronic device is greater than or equal to the second temperature threshold, the period of acquiring the temperature of the electronic device is a preset time length.
5. An electronic device, comprising: Comprise: A processor and a memory; The memory has one or more computer programs stored therein, the one or more computer programs comprising instructions which, when executed by the processor, cause the electronic device to perform the method of any one of claims 1-4.
6. A computer readable storage medium having stored thereon computer programs / instructions, characterized in that, The computer program / instructions are executed by the processor to implement the steps of the method of any one of claims 1-4.
7. A computer program product comprising computer programs / instructions, characterized in that, The computer program / instructions are executed by the processor to implement the steps of the method of any one of claims 1-4.
Citation Information
Patent Citations
Cable joint temperature data acquisition method, monitoring device and storage medium
CN110879109A
Frame rate adjustment method and device, electronic equipment and readable storage medium
CN117111720A