Temperature control method and electronic equipment
Through real-time monitoring and dynamic adjustment of the temperature query frequency and game frame rate of electronic devices, the heating problem of electronic devices in gaming and charging scenarios is solved, and the efficiency of temperature control and user experience is improved.
Patent Information
- Application Number
- CN202410177941.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-08
- Publication Date
- 2025-01-07
- Estimated Expiration
- 2044-02-08
AI Technical Summary
The prior art is difficult to effectively control the temperature of electronic devices, especially in gaming and charging scenarios, which leads to heat up the device and affects the user experience and life.
By monitoring the temperature of electronic devices in real time, dynamically adjusting the query frequency and game frame rate, gradually reducing the frame rate to control the temperature, ensuring that the temperature monitoring efficiency does not decrease, and avoiding the user experience being affected.
It realizes effective control of the temperature of electronic equipment under low load conditions, avoid equipment overheating, and improve user experience and equipment life.
Smart Images

Figure CN119270945A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of terminal technology, and in particular to a temperature control method and electronic device. Background Art
[0002] Electronic devices such as mobile phones and tablets may generate heat during use. For example, in gaming scenarios, the running of gaming applications may cause the electronic device to heat up; in charging scenarios, the input current may cause the battery of the electronic device to heat up.
[0003] How to control the temperature of electronic devices so that the temperature of the electronic devices is within an appropriate range is a problem that needs to be solved. Summary of the invention
[0004] The embodiments of the present application provide a method for controlling temperature and an electronic device, which can control the temperature rise of the electronic device in a low-load form while ensuring the temperature monitoring efficiency.
[0005] To achieve the above objectives, the embodiments of the present application adopt the following technical solutions:
[0006] In a first aspect, a method for controlling temperature is provided, the method comprising: after a first application is started, obtaining a first temperature of an electronic device at a first moment; determining a second moment based on the first temperature; obtaining a second temperature of the electronic device at a second moment; wherein, at the first moment, a game frame rate of the first application is a first frame rate; at the second moment, adjusting the game frame rate of the first application 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 this method, the frequency of querying the temperature is dynamically adjusted according to the real-time temperature of the electronic device. When the temperature of the electronic device meets the preset conditions, the game frame rate is reduced so that the temperature of the electronic device is controlled. The game frame rate is adjusted in time without reducing or changing the temperature monitoring efficiency, and the temperature rise is controlled in the form of low load.
[0008] In combination with the first aspect, in a possible implementation, when the second temperature is greater than the first temperature threshold and less than the second temperature threshold, the second frame rate is determined based on the first formula according to the second temperature; wherein the first formula is used to represent the correspondence 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 this 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, rather than directly reducing the game frame rate to a lower value. This can avoid a sudden drop in the game frame rate resulting in a poor user experience.
[0010] In combination with the first aspect, in a possible implementation, when the second temperature is greater than or equal to a second temperature threshold, the second frame rate is a preset frame rate value.
[0011] In this method, when the game frame rate drops to a certain level (pre-set frame rate value), it will no longer drop, thereby preventing the game frame rate from being too low and affecting the user experience.
[0012] In combination with the first aspect, in a possible implementation, when the first temperature is less than or equal to a first temperature threshold, the first frame rate is a default game frame rate of the first application.
[0013] In combination with the first aspect, in a possible implementation, after obtaining the first temperature of the electronic device at the first moment, the first query cycle is determined according to the first temperature based on a pre-configured correspondence between the temperature and the query cycle; the second moment is the moment after the first query cycle after the first moment.
[0014] In this method, the query cycle (query frequency) of each temperature query is dynamically determined according to the real-time temperature. The query cycle can be flexibly set to ensure the temperature monitoring efficiency while reducing the load of the electronic equipment.
[0015] In a possible implementation, the correspondence between temperature and query cycle includes: the third temperature corresponds to the second query cycle, and the fourth temperature corresponds to the third query cycle; wherein the third temperature is lower than the fourth temperature, and the second query cycle is higher than the third query cycle.
[0016] The third temperature and the fourth temperature are both lower than the first temperature threshold; or the third temperature and the fourth temperature are both higher than the first temperature threshold and lower than the second temperature threshold.
[0017] In this method, the query period corresponding to the high temperature interval is short, and the closer the temperature is to the starting point of adjusting the game frame rate (the first temperature threshold), 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, 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. When the temperature is greater than or equal to the first temperature threshold (the starting point temperature for adjusting the game frame rate), the query frequency is reduced (the query period is extended); in this way, the game frame rate can be gradually reduced to avoid reducing the game frame rate too quickly and affecting the user experience. When the temperature is greater than or equal to the first temperature threshold and less than the second temperature threshold, the temperature of different intervals corresponds to different query periods, and the query period corresponding to the high temperature interval is short, and the closer the temperature is to the end point of adjusting the game frame rate (the second temperature threshold), the shorter the query period; the game frame rate is adjusted to the preset minimum value in time when the temperature rises.
[0018] In a possible implementation, the corresponding relationship between the temperature and the query period includes: when the temperature is greater than or equal to the second temperature threshold, the query period corresponding to the temperature is a preset duration.
[0019] In this way, when the game frame rate has dropped to a preset minimum frame rate value, the temperature is queried with a longer query cycle, and the temperature is no longer queried frequently, thereby reducing the load caused by the temperature query.
[0020] In a second aspect, an electronic device is provided, which has the function of implementing the method described 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, comprising: a processor and a memory; the memory is used to store computer execution instructions, and when the electronic device is running, the processor executes the computer execution instructions stored in the memory to enable the electronic device to perform a method as described in any one of the above-mentioned first aspects.
[0022] In a fourth aspect, an electronic device is provided, comprising: a processor; the processor is used to couple with a memory, and after reading instructions in the memory, execute a method as described in any one of the above-mentioned first aspects according to the instructions.
[0023] In a fifth aspect, a computer-readable storage medium is provided, wherein instructions are stored in the computer-readable storage medium, and when the computer-readable storage medium is executed on a computer, the computer can execute any of the methods described in the first aspect.
[0024] In a sixth aspect, a computer program product comprising instructions is provided, which, when executed on a computer, enables the computer to execute any of the methods described in the first aspect.
[0025] In a seventh aspect, a device (for example, the device may be a chip system) is provided, the device including a processor for supporting an electronic device to implement the functions involved in the first aspect above. In one possible design, the device also includes a memory for storing program instructions and data necessary for the electronic device. When the device is a chip system, it may be composed of a chip, or may include a chip and other discrete devices.
[0026] Among them, the technical effects brought about by any design method in the second to seventh aspects can refer to the technical effects brought about by different design methods in the first aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[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 the hardware structure of an electronic device provided in an embodiment of the present application;
[0030] Figure 4 A schematic diagram of a software architecture of an electronic device provided in an embodiment of the present application;
[0031] Figure 5 This is a schematic diagram of the corresponding relationship between temperature and game frame rate;
[0032] Figure 6 A schematic diagram of a flow chart of a method for controlling temperature provided in an embodiment of the present application;
[0033] Figure 7 A schematic diagram of a flow chart of a method for controlling temperature provided in an embodiment of the present application;
[0034] Figure 8 A schematic diagram of a flow chart of a method for controlling temperature provided in an embodiment of the present application;
[0035] Fig. 9 A schematic diagram of the structural composition of an electronic device provided in 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 specific embodiments, and are not intended to be used as limitations to the present application. As used in the specification and the appended claims of the present application, the singular expressions "a", "said", "above", "the" and "this" are intended to also include such expressions as "one or more", unless there is a clear contrary indication in the context. It should also be understood that in the following embodiments of the present application, "at least one", "one or more" refer to one or more (including two). The term "and / or" is used to describe the association relationship of associated objects, indicating that three relationships can 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 associated objects before and after are a kind of "or" relationship.
[0037] References to "one embodiment" or "some embodiments" etc. described in this specification mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Thus, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways. The term "connection" includes direct connection and indirect connection, unless otherwise specified. "First" and "second" are used for descriptive purposes only and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated.
[0038] 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 embodiments of 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.
[0039] Many scenarios during the use of electronic devices will cause heating, which will affect the normal use of electronic devices. The temperature of electronic devices can be controlled to avoid abnormal operation of electronic devices due to excessive temperature.
[0040] Taking the game scene as an example, in some embodiments, after detecting that the temperature of the electronic device is higher than a certain value, the game frame rate can be reduced to reduce the temperature of the electronic device. The frame rate is the number of frames displayed per second, and the unit of the frame rate is the number of frames transmitted per second (frames per second, FPS). A high frame rate can produce a smoother picture. The game frame rate is the number of frames per second run when the game application is running. It can be understood that factors that cause the temperature of the electronic device to rise may include battery temperature upload, CPU temperature rise, etc. Reducing the game frame rate can reduce the high load consumption of CPU resources by running the game application and reduce the temperature of the electronic device.
[0041] In some embodiments, reference Figure 1 When the temperature of the electronic device is detected to be greater than or equal to the preset temperature value, the game frame rate is reduced to a lower value, so as to prevent the temperature from continuing to rise. However, if the game frame rate is directly reduced from a higher value to a lower value, the smoothness of the game screen may suddenly change, causing a bad experience for users.
[0042] In some embodiments, reference Figure 2 , periodically detect the temperature of the electronic device. If it is determined that the temperature of the electronic device is 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, so that the temperature of the electronic device is controlled.
[0043] In one implementation, a polling command may be used to periodically poll the temperature of the electronic device. In one example, the log record of the electronic device polling the temperature 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.299D AGPService:PGPlugin getTempaturenTempature:31336
[0049] Line 22345:12-15 10:42:26.300D AGPService:PGPlugin getTempaturenTempature:31505
[0050] Line 22347:12-15 10:42:26.300D AGPService:PGPlugin getTempaturenTempature:31505
[0051] Line 23211:12-15 10:42:31.304D AGPService:PGPlugin getTempaturenTempature:31745
[0052] Line 23213:12-15 10:42:31.305D AGPService:PGPlugin getTempaturenTempature:31745
[0053] Line 23915:12-15 10:42:31.943D AGPService:PGPlugin getTempaturenTempature:31745
[0054] Line 23938:12-15 10:42:31.945D AGPService:PGPlugin getTempaturenTempature:31745
[0055] Line 24016:12-15 10:42:31.957D AGPService:PGPlugin getTempaturenTempature:31745
[0056] Line 24021:12-15 10:42:31.958D AGPService:PGPlugin getTempaturenTempature:31745
[0057] Line 25233:12-15 10:42:36.308D AGPService:PGPlugin getTempaturenTempature:32022
[0058] Line 25235:12-15 10:42:36.308D AGPService:PGPlugin getTempaturenTempature:32022
[0059] Line 25352:12-15 10:42:36.960D AGPService:PGPlugin getTempaturenTempature:32022
[0060] Line 25354:12-15 10:42:36.960D AGPService:PGPlugin getTempaturenTempature:32022
[0061] Line 26351:12-15 10:42:41.311D AGPService:PGPlugin getTempaturenTempature:32293
[0062] Line 26353:12-15 10:42:41.312D AGPService:PGPlugin getTempaturenTempature:32293
[0063] Line 26489:12-15 10:42:41.963D AGPService:PGPlugin getTempaturenTempature:32293
[0064] Line 26491:12-15 10:42:41.964D AGPService:PGPlugin getTempaturenTempature:32293
[0065] Line 27434:12-15 10:42:46.316D AGPService:PGPlugin getTempaturenTempature: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: approximately every 5 seconds, the AGPService of the electronic device calls PGPlugin to query the temperature. The command to query the temperature is executed periodically.
[0078] In this embodiment, the temperature is polled periodically for a long time, and the polling itself will increase the load of the electronic device, causing the temperature of the electronic device to rise.
[0079] The embodiment of the present application provides a method for controlling temperature, which dynamically adjusts the frequency of querying temperature according to the real-time temperature of the electronic device, and gradually reduces the game frame rate over a period of time after the temperature of the electronic device meets the preset conditions, so that the temperature of the electronic device is controlled. The game frame rate is finely adjusted according to the temperature of the electronic device without reducing or changing the temperature monitoring efficiency, and the temperature rise is controlled in the form of low load.
[0080] The temperature control method provided in the embodiment of the present application can be applied to electronic devices that need to control temperature. The above electronic devices may include mobile phones, tablet computers, laptops, personal computers (PCs), ultra-mobile personal computers (UMPCs), handheld computers, netbooks, smart home devices (e.g., smart TVs, smart screens, large screens, smart speakers, smart air conditioners, etc.), personal digital assistants (PDAs), wearable devices (e.g., smart watches, smart bracelets, etc.), vehicle-mounted devices, virtual reality devices, etc., and the embodiments of the present application do not impose any restrictions on this.
[0081] For example, please refer to Figure 3 , which shows a schematic diagram of the structure of an electronic device 100. The electronic device 100 may 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 may include a pressure sensor, a touch sensor, a temperature sensor, etc.
[0082] It is to be understood that the structure illustrated in the embodiment 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 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0083] The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), and / or a neural-network processing unit (NPU). Different processing units may be independent components or integrated into one or more processors. In some embodiments, the electronic device 100 may also include one or more processors 110.
[0084] The controller is the nerve center and command center of the electronic device 100. It can generate operation control signals according to instruction operation codes and timing signals to complete the control of fetching and executing instructions.
[0085] The application processor can run the operating system of the electronic device 100, which is used to manage the hardware and software resources of the electronic device 100. For example, it manages and configures memory, determines the priority of system resource supply and demand, controls input and output devices, operates the network, manages the file system, manages drivers, etc. The operating system can also be used to provide an operating interface for users to interact with the system. Among them, various types of software can be installed in the operating system, such as drivers, applications (applications, Apps), etc.
[0086] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0087] In some embodiments, the processor 110 may include one or more interfaces. The interface may 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 is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present application is only a schematic illustration and does not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
[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 implement a data storage function, such as storing music, video and other files in the external memory card.
[0090] The internal memory 130 can be used to store one or more computer programs, which include instructions. The processor 110 can enable the electronic device 100 to perform the methods provided in some embodiments of the present application, as well as various applications and data management, etc. by running the above instructions stored in the internal memory 130. The internal memory 130 may include a code storage area and a data storage area. Among them, the data storage area can store data created during the use of the electronic device 100, etc. In addition, the internal memory 130 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more disk storage components, a flash memory component, a universal flash storage (UFS), etc. In some embodiments, the processor 110 can enable the electronic device 100 to perform the methods provided in the embodiments of the present application, as well as other applications and data management by running instructions stored in the internal memory 130, and / or instructions stored in a memory provided in the processor 110.
[0091] The electronic device 100 implements the display function through a GPU, a display screen 140, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 140 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs, which 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 be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include 1 or N display screens 140, where N is a positive integer greater than 1.
[0093] In some embodiments, the display screen 140 is provided with a pressure sensor, a touch sensor, and the like. The pressure sensor is used to sense pressure signals and can convert pressure signals into electrical signals. When a touch operation is applied to the display screen 140, the electronic device 100 detects the intensity of the touch operation according to the pressure sensor. The electronic device 100 can also calculate the position of the touch 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 thereto or thereabout. The touch sensor can transmit the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can also be provided through the display screen 140.
[0094] The communication module 150 can provide wireless communication solutions including cellular, Wi-Fi, Bluetooth (BT), wireless data transmission modules (e.g., 433MHz, 868MHz, 915MHz), etc. applied to the electronic device 100. The communication module 150 can be one or more devices integrating 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 set near the CPU to detect the temperature of the CPU; for example, the temperature sensor can be set near the battery to detect the temperature of the battery, etc. In the embodiment of the present application, the temperature of the electronic device 100 can be reflected by the temperature of the CPU, the temperature of the battery, etc.; optionally, the temperature of the electronic device 100 can also be comprehensively evaluated by comprehensively considering the temperatures of various components such as the CPU and the battery. The specific embodiment of the temperature of the electronic device 100 can be determined according to actual conditions.
[0097] In the embodiment of the present application, the electronic device 100 is an electronic device that can run an operating system and install application programs. Optionally, the operating system running on the electronic device can be system, system, System, etc.
[0098] Take the above electronic device 100 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 micro-kernel architecture, a micro-service architecture, or a cloud architecture. Taking the system as an example, the software structure of the electronic device 100 is exemplified.
[0099] Figure 4 1 is a software structure block diagram of the electronic device 100 according to an embodiment of the present invention.
[0100] The layered architecture divides the software into several layers, each with a clear role and division of labor. The layers communicate with each other through software interfaces. The system is divided into four layers, from top to bottom: application layer, application framework layer, Android runtime and system library, and kernel layer.
[0101] The application layer can include a series of application packages, such as camera, gallery, calendar, call, map, navigation and other applications.
[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 predefined functions.
[0103] like Figure 4As shown, the application framework layer may include window management services, content providers, view systems, resource management services, activity management services (AMS), advanced graphic platform (AGP) services, performance adjustment components, power consumption control components, automatic protection system (APS), etc.
[0104] The window management service is used to manage window programs. The window management service can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc.
[0105] Content providers are used to store and retrieve data and make it accessible to applications. The data may include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.
[0106] The view system includes visual controls, such as controls for displaying text, controls for displaying images, etc. The view system can be used to build applications. A display interface can be composed of one or more views. For example, a display interface including a text notification icon can include a view for displaying text and a view for displaying images.
[0107] The resource management service provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.
[0108] AMS is mainly responsible for the startup, switching, and scheduling of the four major components in the system, as well as the management and scheduling of application processes. Its responsibilities are similar to the process management and scheduling modules in the operating system. When a process or component is started, the request will be passed to AMS through the Binder communication mechanism, and AMS will then handle it uniformly.
[0109] The advanced graphics processing platform is used to optimize image performance, power consumption, etc. For example, it can reduce the frame rate of games and adjust the playback frame rate of applications.
[0110] The performance adjustment component is used to optimize the performance of the electronic device, such as controlling heating, extending battery life, etc. For example, the performance adjustment component is iaware.
[0111] The power consumption control component is used to manage the power consumption, temperature control, etc. of electronic devices.
[0112] The automatic protection system is used to execute automatic protection strategies, such as controlling temperature by adjusting the game frame rate, lowering battery temperature by limiting charging current, etc.
[0113] Android Runtime includes core libraries and virtual machines. Android runtime is responsible for scheduling and management of the Android system.
[0114] The core library consists of two parts: one part is the function that needs to be called by the Java language, and the other part is the Android core library.
[0115] The application layer and the application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
[0116] The system library may include multiple functional modules, such as surface manager, media library, 3D 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 provide the fusion of 2D and 3D layers for multiple applications.
[0118] The media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
[0119] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
[0120] A 2D graphics engine is a drawing engine for 2D drawings.
[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 corresponding relationship between temperature and query cycle. For example, one temperature interval corresponds to one query cycle. Exemplarily, the corresponding relationship between temperature and query cycle is shown in Table 1. The unit of temperature in the embodiment of the present application is Celsius.
[0123] Table 1
[0124]
[0125] The electronic device adjusts the cycle of querying the temperature in real time according to the corresponding relationship shown in Table 1 and the current temperature of the electronic device. Exemplarily, when the temperature of the electronic device is less than 38 degrees, the cycle of querying the temperature of the electronic device is 30 seconds, indicating that the temperature is queried once every 30 seconds. When the temperature of the electronic device is greater than or equal to 38 degrees and less than 39 degrees, the cycle of querying the temperature of the electronic device is 20 seconds, indicating that the temperature is queried once every 20 seconds. When the temperature of the electronic device is greater than or equal to 39 degrees and less than 40 degrees, the cycle of querying the temperature of the electronic device is 10 seconds, indicating that the temperature is queried once every 10 seconds. When the temperature of the electronic device is greater than or equal to 40 degrees and less than 41 degrees, the cycle of querying the temperature of the electronic device is 5 seconds, indicating that the temperature is queried once every 5 seconds. When the temperature of the electronic device is greater than or equal to 41 degrees and less than 42 degrees, the electronic device queries the temperature once 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 electronic device queries the temperature once 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 electronic device queries the temperature once every 5 seconds. When the temperature of the electronic device is greater than or equal to 43 degrees, the electronic device queries the temperature every 15 seconds.
[0126] In Table 1, when the temperature is less than the first threshold (e.g., 38 degrees), the corresponding query cycle is 1 (e.g., 30 seconds); when the temperature is greater than or equal to the first threshold (e.g., 38 degrees) and less than the second threshold (e.g., 39 degrees), the corresponding query cycle is 2 (e.g., 20 seconds); when the temperature is greater than or equal to the third threshold (e.g., 39 degrees) and less than the fourth threshold (e.g., 40 degrees), the corresponding query cycle is 3 (e.g., 10 seconds); when the temperature is greater than or equal to the fourth threshold (e.g., 40 degrees) and less than the fifth threshold (e.g., 41 degrees), the corresponding query cycle is 4 (e.g., 5 seconds). In other words, temperatures in different intervals correspond to different query cycles, and intervals with high temperatures correspond to short query cycles. The closer the temperature is to the starting point for adjusting the game frame rate, the shorter the query cycle is. In this way, the query frequency can be increased when the temperature is close to the starting point for adjusting the game frame rate, 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 (the starting point temperature for adjusting the game frame rate), the query frequency is reduced (the query cycle is extended); for example, when the temperature is greater than or equal to 41 degrees, the corresponding query cycle is 20 seconds; in this way, the game frame rate can be gradually reduced to avoid reducing the game frame rate too quickly and affecting the user experience. When the temperature is greater than or equal to the first temperature threshold and less than the second temperature threshold, different temperature intervals correspond to different query cycles, and the query cycle corresponding to the high temperature interval is short. The closer the temperature is to the end point of adjusting the game frame rate (the second temperature threshold), the shorter the query cycle. The game frame rate can be adjusted to the preset 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 preset duration (for example, 15 seconds); in this way, when the game frame rate has dropped to a preset minimum frame rate value, the temperature is queried with a longer query period, 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 cycle is longer, that is, the query frequency is lower; when the temperature reaches a certain value, for example, greater than 40 degrees, the query cycle is shorter, that is, the query frequency is higher; in this way, there is no need to frequently query the temperature periodically, and the frequency of querying the temperature can be reduced, thereby reducing the load of the electronic device. Moreover, as the temperature rises, the frequency of querying the temperature increases, which can ensure the efficiency of temperature monitoring, and when the temperature reaches the first value (such as the starting temperature value for adjusting the game frequency), the game frame rate is reduced in time to accurately determine the start time of reducing the game frame rate. In one 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 frequency), the frequency of querying the temperature is reduced (the query cycle is extended) to gradually reduce the game frame rate to avoid a sudden drop in the game frame rate resulting in a poor user experience.
[0130] In one implementation, different corresponding relationships between temperature and query period can be configured for different game applications. For example, for game 1, the corresponding relationship between the configured temperature and query period is shown in Table 1. For game 2, the corresponding relationship between the configured temperature and query period is shown in Table 2.
[0131] Table 2
[0132]
[0133] It is understandable that in other implementations, a corresponding relationship between temperature and query frequency 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 once every 30 seconds. The query frequency is once every 30 seconds, that is, the corresponding query period is 30 seconds. The query frequency can be converted into a corresponding query period, and the query period can also be converted into a corresponding query frequency.
[0134] Since the temperature of an electronic device changes continuously and cumulatively and generally does not change suddenly, adjusting the temperature query cycle according to the temperature change trend of the electronic device can save the computing resources of the electronic device and avoid the load caused by periodic and frequent temperature queries.
[0135] In some embodiments, the correspondence between the temperature of the electronic device and the game frame rate is preconfigured. When the temperature of the electronic device is less than a first temperature threshold, the game frame rate is the first frame rate threshold. For example, the first frame rate threshold is the 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 the second frame rate threshold. Among them, 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 one implementation, reference Figure 5 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 temperature of the electronic device and the game frame rate are linearly related; wherein, 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.
[0136] In one implementation, different corresponding relationships between temperature and game frame rate 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 90FPS and the second frame rate threshold is 60FPS; for Game 2, the first frame rate threshold is 120FPS and the second frame rate threshold is 90FPS.
[0137] Each time the electronic device queries the temperature, the game frame rate can be set according to the corresponding relationship 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 drops to the second frame rate threshold.
[0138] By gradually reducing the game frame rate, the temperature of electronic devices can be prevented from rising sharply.
[0139] Combination Figure 4 The software architecture shown is Figure 6 An implementation of the temperature control method provided in an embodiment of the present application is shown.
[0140] For example, Figure 6 As shown, the method includes:
[0141] S601. The advanced graphics processing platform registers an application monitor with a performance adjustment component.
[0142] The advanced graphics processing platform registers an application monitor with the performance adjustment component to monitor application startup.
[0143] S602: After the first application is started, the AMS sends an application start message to the performance adjustment component.
[0144] Exemplarily, AMS is stubbed in the StartActivity() function of the application startup process. When an application is started, 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] Exemplarily, in response to a user operation, a first application is started, and the first application is a game application. In the StartActivity() function of the first application, a send() function is called to send an application start message to the performance adjustment component, and the application start message includes the package name of the first application.
[0146] S603: The performance adjustment component calls back the advanced graphics processing platform and sends the package name of the first application to the advanced graphics processing platform.
[0147] The performance adjustment component receives the application start message, obtains the package name of the first application according to the application start message, determines that the advanced graphics processing platform has registered the application monitor, and sends the package name of the first application to the advanced graphics processing platform.
[0148] Optionally, after receiving the application startup message, the performance adjustment component determines the application type according to the application package name included in the application startup message. For example, the application type may include video, game, call, office, etc. In one implementation, the electronic device pre-configures the correspondence between the package name and the application type. The performance adjustment component may determine the application type according to the correspondence between the package name and the application type. The performance adjustment component also sends the application type of the first application to the advanced graphics processing platform.
[0149] S604: The advanced graphics processing platform determines whether the first application is a preset application. If the first application is a preset application, execute S605; if the first application is not a preset application, execute S613.
[0150] In one implementation, a whitelist is preconfigured in the electronic device, and the whitelist includes at least one package name of an application. The application included in the whitelist is an application that needs to dynamically adjust the game frame rate according to temperature. The application included in the whitelist is a preset application.
[0151] S605: The advanced graphics processing platform sets the monitoring flag to a first value.
[0152] The monitoring flag bit having a first value indicates that the game frame rate is dynamically adjusted according to the temperature, and the monitoring flag bit having a second value indicates that the game frame rate is not dynamically adjusted according to the temperature.
[0153] Exemplarily, the first value is 1, and the monitoring flag is set to 1 to indicate that the game frame rate is dynamically adjusted according to the temperature.
[0154] S606: The advanced graphics processing platform obtains the temperature of the electronic device from the power consumption control component.
[0155] In one implementation, the power consumption control component may obtain a temperature value collected by a temperature sensor, for example, the temperature value collected by the temperature sensor may be a temperature value of a CPU, a temperature value of a battery, etc. In one example, the power consumption control component determines the obtained temperature value of the CPU or the temperature value of the battery as the temperature of the electronic device; in another example, the power consumption control component weights the temperature value of the CPU, the temperature value of the battery, etc., and then obtains the temperature of the electronic device.
[0156] In one implementation, after the advanced graphics processing platform obtains the temperature of the electronic device from the power consumption control component, it determines the monitoring flag bit. If the monitoring flag bit is the first value, it indicates that the first application is a preset application and needs to dynamically adjust the game frame rate according to the temperature, and then continue to execute S607 or S608.
[0157] S607: If the timer does not exist, the advanced graphics processing platform starts the timer and sets the duration of the timer according to the temperature of the electronic device.
[0158] The timer is used to control the period in which the advanced graphics processing platform obtains the temperature of the electronic device from the power consumption control component; the timer duration is set according to the temperature of the electronic device, for example, the timer duration is 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 corresponding relationship between the temperature and the query period (or query frequency) configured for the first application. For example, the temperature of the electronic device is 26 degrees, and the corresponding relationship between the temperature and the query period corresponding to the first application is shown in Table 1. According to Table 1, the query period corresponding to the temperature of 26 degrees is determined to be 30 seconds, and the timer duration is determined to be 30 seconds.
[0159] Each time the timer times out, S606 is executed, and the advanced 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, and the timer flag is a first value indicating that the timer is not started, and the timer flag is a second value indicating that the timer is started. The timer flag defaults to the first value, and after the timer is started, the timer flag is set to the second value.
[0161] Optionally, in one implementation, the electronic device saves the current game frame rate for subsequent determination of whether to perform an action of adjusting the game frame rate. Exemplarily, if there is no timer, it means that the temperature of the electronic device is obtained for the first time, and the game frame rate has not been adjusted, and the current game frame rate can be set to a default value, such as 0.
[0162] S608: If a 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 means that the timer has been started. The advanced graphics processing platform determines the corresponding query period according to the temperature of the electronic device, that is, 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 corresponding relationship between the temperature and the query period (or query frequency) configured for the first application. For example, the temperature of the electronic device is 38.5 degrees, and the corresponding relationship between the temperature and the query period corresponding to the first application is shown in Table 1. According to Table 1, it is determined that the query period corresponding to the temperature of 38.5 degrees is 20 seconds, and the timer duration is determined to be 20 seconds.
[0164] S609: The advanced graphics processing platform obtains a 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 a target game frame rate corresponding to the first application according to a corresponding relationship between temperature and game frame rate corresponding to the first application and the temperature of the electronic device.
[0166] For example, if the temperature of the electronic device acquired in S606 is greater than or equal to the first temperature threshold and less than or equal to the second temperature threshold, 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, including the target game frame rate of the first application.
[0168] In one implementation, the advanced graphics processing platform updates the recorded current game frame rate to a target game frame rate corresponding to the first application.
[0169] S611. The automatic protection system sends a target game frame rate of the first application to the surface synthesizer.
[0170] The surface synthesizer synthesizes the image frames of the first application according to the target game frame rate of the first application. In one implementation, the frequency at which the framework layer sends buffers (for storing image frames) to the first application is changed according to the target game frame rate of the first application, and even if the frequency at which the first application takes buffers is a default value set by the first application or a 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 times out, execute S606 to obtain the temperature of the electronic device from the power consumption control component again.
[0172] S613: Set the monitoring flag to a second value.
[0173] If the first application is not a preset application, it is not necessary to dynamically adjust the game frame rate according to the temperature, and the monitoring flag is set to the second value. For example, when 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 dynamically adjust the game frame rate according to the temperature.
[0174] In one implementation, the advanced graphics processing platform obtains the temperature of the electronic device from the power consumption control component and determines the monitoring flag. If the monitoring flag is the second value, it means that it is not necessary to dynamically adjust the game frame rate according to the temperature. The advanced graphics processing platform turns off the timer, sets the timer flag to the first value, and can also set the current game frame rate to a default value (e.g., 0).
[0175] In this embodiment, the timer duration is determined based on the temperature of the electronic device obtained in real time. For example, when the temperature of the electronic device is low, the timer duration is long, and 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 timer duration is short, and 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 interaction frequency between the advanced 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 of obtaining the temperature of the electronic device will increase, which can ensure the efficiency of temperature monitoring. In the process of reducing the game frame rate, as the temperature rises, the game frame rate gradually decreases instead of suddenly decreasing, so as to avoid causing the user to experience a sudden deterioration in the game quality.
[0176] The advanced graphics processing platform may include multiple processing modules. Exemplarily, the advanced graphics processing platform includes a temperature control module, a temperature reading module, a frame rate control module, and the like.
[0177] refer to Figure 7 After the first application (for example, the first application belongs to the preset application) is started, the temperature control module starts to enter the process of monitoring the temperature. The temperature control module queries the temperature reading module once every t1 seconds. The temperature reading module queries the power consumption control component for the temperature of the electronic device through the binder call. After the temperature control module obtains the temperature of the electronic device from the power consumption control component, it sends the temperature to the temperature control module.
[0178] After the first application is started, the temperature of the electronic device gradually rises. In one implementation, 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 is to the first temperature threshold (the starting point temperature for reducing the game frame rate), the smaller the value of t1 is, that is, the higher the temperature query frequency is.
[0179] In one example, after the temperature control module determines that the temperature of the electronic device is greater than or equal to the first temperature threshold, it starts to adjust the game frame rate of the first application. In one implementation, 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 one implementation, 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 is to the second temperature threshold (the end point temperature for reducing the game frame rate), the smaller the value of t2 is, that is, the higher the temperature query frequency is.
[0181] Combination Figure 4 The software architecture shown is Figure 8 Another implementation of a temperature control method provided in an embodiment of the present application is shown.
[0182] For example, Figure 8 As shown, the method includes:
[0183] S801. The advanced graphics processing platform registers an application monitor with a 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 back the advanced graphics processing platform and sends the package name of the first application to the advanced graphics processing platform.
[0186] S804: The advanced graphics processing platform determines whether the first application is a preset application. If the first application is a preset application, execute S805; if the first application is not a preset application, execute S813.
[0187] S805: The advanced graphics processing platform sets the monitoring flag to a first value.
[0188] Among them, the specific implementation method of S801-S805 can refer to S601-S605, which will not be repeated here.
[0189] S806: The advanced 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 advanced graphics processing platform.
[0191] In one implementation, the power consumption control component may obtain a temperature value collected by a temperature sensor, for example, the temperature value collected by the temperature sensor may be a temperature value of a CPU, a temperature value of a battery, etc. In one example, the power consumption control component determines the obtained temperature value of the CPU or the temperature value of the battery as the temperature of the electronic device; in another example, the power consumption control component weights the temperature value of the CPU, the temperature value of the battery, etc., and then obtains the temperature of the electronic device.
[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 advanced 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 advanced graphics processing platform sends the temperature control level to the power consumption control component.
[0194] After receiving the first notification message, the advanced graphics processing platform sends a temperature control level to the power consumption control component. The temperature control level includes a set of temperature values greater than a first temperature threshold and less than or equal to a 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 ending 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] S809: When the power consumption control component determines that the temperature reaches any temperature value in the temperature control gear, it sends a second notification message to the advanced graphics processing platform, which includes the current temperature.
[0198] It should be noted that, in actual implementation, the temperature of the electronic device reaches a certain temperature value, which may be when the difference between the temperature of the electronic device and the temperature value is less than a preset threshold. For example, if 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 (preset threshold), then it can be considered that the temperature of the electronic device reaches 42.8 degrees.
[0199] S810. The advanced graphics processing platform obtains 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 one implementation, the advanced graphics processing platform determines a target game frame rate corresponding to the first application according to a corresponding relationship between temperature and game frame rate corresponding to the first application and the temperature of the electronic device.
[0201] S811. 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.
[0202] In one implementation, the electronic device saves the current game frame rate for subsequent determination of whether to perform an action to adjust the game frame rate. Exemplarily, the initial value of the current game frame rate is a default value (e.g., 0). After the advanced graphics processing platform sends a 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] S812. The automatic protection system sends the target game frame rate of the first application to the surface synthesizer.
[0204] The surface synthesizer synthesizes the image frames of the first application according to the target game frame rate of the first application. In one implementation, the frequency at which the framework layer sends buffers (for storing image frames) to the first application is changed according to the target game frame rate of the first application, and even if the frequency at which the first application takes buffers is a default value set by the first application or a value set by the user, the game frame rate of the first application can be adjusted to the target game frame rate.
[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 is not a preset application, it is not necessary to dynamically adjust the game frame rate according to the temperature. For example, when the game application is exited and the desktop application is switched to the foreground application, the first application is a desktop application and it is not necessary to dynamically adjust 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 also sets the monitoring flag to a second value. Optionally, the advanced graphics processing platform also sets the current game frame rate to a default value (eg, 0).
[0208] In this embodiment, within the range greater than the first temperature threshold and less than the second temperature threshold, when the temperature of the electronic device reaches certain specific temperature values (temperature values included in the temperature control gear), the power consumption control component reports the current temperature of the electronic device to the advanced graphics processing platform. The interaction frequency between the advanced graphics processing platform and the power consumption control component is reduced, thereby reducing the load on 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, as the temperature rises, the game frame rate gradually decreases instead of suddenly decreasing, so as to avoid causing the user to experience a sudden deterioration in the game quality.
[0209] In some scenarios, charging the battery of an electronic device will cause the battery temperature to rise, and long-term charging may cause the battery to heat up. The embodiment of the present application also provides a method for controlling temperature, which dynamically adjusts the frequency of querying temperature according to the real-time temperature of the electronic device (battery), and gradually reduces the charging current of the electronic device over a period of time when the temperature of the electronic device (battery) meets the preset conditions. Under the condition that the temperature monitoring efficiency is not reduced or unchanged, the charging current is finely adjusted according to the temperature of the electronic device, and the temperature rise is controlled in the form of low load.
[0210] For specific implementation methods, reference may be made to the related description in the above-mentioned embodiment of adjusting the game frame rate according to the temperature of the electronic device, and examples are not given one by one here.
[0211] It is understandable that the electronic device provided in the embodiment of the present application includes a hardware structure and / or software module corresponding to each function in order to realize the above functions. Those skilled in the art should easily realize that, in conjunction with the units and algorithm steps of each example described in the embodiment disclosed herein, the embodiment of the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the embodiment of the present application.
[0212] The embodiment of the present application can divide the functional modules of the above-mentioned electronic device according to the above-mentioned method example. For example, each functional module can be divided corresponding to each function, or two or more functions can be integrated into one processing module. The above-mentioned integrated module can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiment of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation.
[0213] In one example, see Fig. 9 , which shows a possible structural diagram of the electronic device involved in the above embodiment. The electronic device 900 includes: a processing unit 910 and a storage unit 920.
[0214] The processing unit 910 is used to control and manage the actions of the electronic device 900. The storage unit 920 is used to store program codes and data of the electronic device 900.
[0215] Of course, the unit modules in the electronic device 900 include but are not limited to the processing unit 910 and the storage unit 920 .
[0216] Optionally, the electronic device 900 may further include a display unit 930, a sensor unit 940, etc. The display unit 930 is used to display an interface of the electronic device 900, such as a user interface of the first application, etc. The sensor unit 940 is used to collect the temperature of the electronic device.
[0217] The processing unit 910 may be a processor or a controller, such as 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 devices, transistor logic devices, hardware components or any combination thereof. The storage unit 920 may be a memory. The display unit 930 may be a display screen. The sensor unit 940 may include a temperature sensor.
[0218] For example, the processing unit 910 is a processor (such as Figure 3 The processor 110 shown in FIG. 1 ), the storage unit 920 may be a memory (eg, Figure 3 The internal memory 130 shown in FIG. 1 ), the display unit 930 may be a display screen (such as Figure 3 The display screen 140 shown in FIG. 1 ) and the sensor unit 940 may be a sensor module (eg Figure 3 The electronic device 900 provided in the embodiment of the present application may be Figure 3 The electronic device 100 shown in the figure. The processor, memory, display screen, sensor module, etc. mentioned above may be connected together, for example, via a bus.
[0219] The embodiment of the present application also 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 by lines. For example, the interface circuit can be used to receive signals from other devices (such as a memory of an electronic device). For another example, the interface circuit can be used to send signals to other devices (such as a processor). Exemplarily, the interface circuit can read 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 various steps in the above embodiments. Of course, the chip system can also include other discrete devices, which are not specifically limited in the embodiment of the present application.
[0220] An embodiment of the present application also provides a computer-readable storage medium, which includes computer instructions. When the computer instructions are executed on the above-mentioned electronic device, the electronic device executes each function or step executed by the electronic device in the above-mentioned method embodiment.
[0221] The embodiment of the present application also provides a computer program product. When the computer program product is run on a computer, the computer is enabled to execute each function or step executed by the mobile phone in the above method embodiment.
[0222] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0223] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0224] The units described as separate components may or may not be physically separated, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0225] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0226] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium, including several instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.
[0227] The above contents are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application shall be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
Claims
1. A method for controlling temperature, applied to electronic equipment, characterized in that: The method comprises: After the first application is started, a first temperature of the electronic device is obtained at a first moment; at the first moment, a game frame rate of the first application is a first frame rate; Acquiring a second temperature of the electronic device at a second moment; the second moment is determined according to the first temperature; At the second moment, the game frame rate of the first application is adjusted to a second frame rate; the second frame rate is lower than the first frame rate, and the second temperature is higher than the first temperature.
2. The method according to claim 1, characterized in that When the second temperature is greater than the first temperature threshold and less than the second temperature threshold, the second frame rate is determined according to the second temperature based on a first formula; 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; Wherein, under the condition that the temperature of the electronic device is greater than a first temperature threshold and less than a second temperature threshold, the game frame rate of the first application is negatively correlated with the temperature of the electronic device.
3. The method according to claim 1 or 2, characterized in that: When the second temperature is greater than or equal to a second temperature threshold, the second frame rate is a preset frame rate value.
4. The method according to any one of claims 1 to 3, characterized in that: When the first temperature is less than or equal to a first temperature threshold, the first frame rate is a default game frame rate of the first application.
5. The method according to any one of claims 1 to 4, characterized in that: After obtaining the first temperature of the electronic device at the first moment, the method further includes: According to the first temperature, based on a pre-configured correspondence between temperature and query period, a first query period is determined; the second moment is a moment after the first moment and after the first query period.
6. The method according to claim 5, characterized in that The corresponding relationship between the temperature and the query period includes: The third temperature corresponds to the second query period, and the fourth temperature corresponds to the third query period; wherein the third temperature is lower than the fourth temperature, and the second query period is higher than the third query period.
7. The method according to claim 6, characterized in that The third temperature and the fourth temperature are both lower 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.
8. The method according to claim 5, characterized in that The corresponding relationship between the temperature and the query period includes: When the temperature is greater than or equal to the second temperature threshold, the query period corresponding to the temperature is a preset duration.
9. An electronic device, characterized in that: include: Processor and memory; One or more computer programs are stored in the memory, and the one or more computer programs include instructions. When the instructions are executed by the processor, the electronic device executes the method according to any one of claims 1 to 8.
10. A computer-readable storage medium having a computer program / instruction stored thereon, characterized in that: When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.
11. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.
Citation Information
Patent Citations
Thermostat temperature compensation modeling
CA2887254A1
Method for controlling temperature of mobile terminal to rise, mobile terminal and readable storage medium
CN107357392A
Method for reducing temperature rise, computer readable storage medium and mobile terminal
CN107426416A
Cable joint temperature data acquisition method, monitoring device and storage medium
CN110879109A
Frame rate switching method and related device
CN113630572A