Temperature control method of electronic equipment
By adjusting the screen backlight value in electronic devices and using a slow-down strategy to gradually reduce the brightness, the problem of excessive device temperature is solved, and power consumption is reduced and performance is improved.
Patent Information
- Application Number
- CN202310871699.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-14
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2043-07-14
AI Technical Summary
Excessive temperature of electronic equipment during operation will lead to hardware damage and increased power consumption. It is difficult to effectively adjust the temperature with existing technology, leading to a decrease in equipment performance.
The device temperature is controlled by adjusting the backlight value of the screen. The application framework layer sends the target coefficient to the kernel layer. The kernel layer adjusts the screen backlight value according to the current backlight value and the target coefficient, and uses a slow-down strategy to gradually reduce the brightness to reduce the temperature and reduce the application process. The number of interactions between the framework layer and the kernel layer.
It effectively lowers the device temperature, reduces power consumption, improves device performance, avoids sudden changes in screen brightness that affect the user experience, and reduces the occurrence of uevent events.
Smart Images

Figure CN117707243B
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of terminal technology, and in particular to a temperature control method for an electronic device. Background Art
[0002] With the development of the Internet, electronic devices are becoming more and more powerful, and more and more people are using electronic devices in their work and life. During the operation of electronic devices, if the temperature of the electronic devices is too high, it is not only easy to damage the hardware and corresponding functions of the devices, but also cause the power consumption of the devices to be too high. Therefore, temperature regulation during the use of electronic devices is very important. Summary of the invention
[0003] An embodiment of the present application provides a temperature control method for an electronic device, which adjusts the backlight value of the screen through the core layer of the electronic device to achieve the purpose of lowering the temperature of the device, reduces the number of interactions between the upper layer and the bottom layer of the electronic device, reduces the power consumption of the device, and reduces the situation where the temperature of the device is too high.
[0004] To achieve the above objectives, the embodiments of the present application adopt the following technical solutions:
[0005] In a first aspect, the present application provides a temperature control method for an electronic device, the electronic device comprising an application framework layer and a kernel layer, the kernel layer comprising a first node, the temperature control method may include:
[0006] When the application framework layer determines that the current temperature is greater than or equal to the first temperature threshold, the application framework layer sends the target coefficient corresponding to the current temperature to the first node of the kernel layer. After the first node of the kernel layer obtains the current backlight value of the screen, it determines the target backlight value based on the current backlight value and the target coefficient; the first node of the kernel layer adjusts the backlight value of the screen to the target backlight value to adjust the current temperature.
[0007] Among them, a plurality of temperature values and brightness discount coefficients corresponding to each temperature value are pre-stored in the application framework layer, and the above-mentioned target coefficient is the brightness discount coefficient corresponding to the current temperature of the electronic device.
[0008] In an embodiment of the present application, the application framework layer may pre-store brightness discount coefficients corresponding to different temperature values, or the application framework layer may pre-store brightness discount coefficients corresponding to different temperature value intervals, or the application framework layer may pre-store a linear relationship between temperature values and brightness discount coefficients. For example, the application framework layer stores different temperature values and the brightness discount coefficients corresponding to each temperature value are (40, 0.9; 41, 0.85; 42, 0.8), or the application framework layer stores different temperature value intervals and the brightness discount coefficients corresponding to each temperature value interval are ([40, 42], 0.9; (42, 45], 0.8).
[0009] In the embodiment of the present application, after the application framework layer sends the target coefficient to the kernel layer, the kernel layer executes the entire process of adjusting the brightness of the screen. It can be seen that the application framework layer only sends the target coefficient to the kernel layer once, and the system only generates one uevent event, which reduces the number of interactions between the application framework layer and the kernel layer, avoids the generation of a large number of uevent events, and not only reduces the energy consumption of the mobile phone, but also improves the performance of the mobile phone.
[0010] In a possible implementation manner of the first aspect, the first node of the kernel layer adjusts the backlight value of the screen to the target backlight value, including:
[0011] After the first node of the kernel layer determines multiple first backlight values according to the current backlight value, the target backlight value and the first preset value, the first node of the kernel layer adjusts the backlight value of the screen according to each first backlight value in descending order until the backlight value of the screen reaches the target backlight value.
[0012] In an embodiment of the present application, the first node of the kernel layer adopts a slow-down strategy to gradually reduce the backlight value of the screen from the current backlight value to the target backlight value, so as to avoid directly adjusting the backlight value of the screen to the target backlight value, resulting in a sudden change in screen brightness and affecting the user experience.
[0013] In another possible implementation manner of the first aspect, the first node of the kernel layer determines the multiple first backlight values according to the current backlight value, the target backlight value, and the first preset value, which may include:
[0014] The first node of the core layer determines a plurality of first backlight values with equal differences according to the current backlight value, the target backlight value and the first preset value.
[0015] For example, the first node determines that the current backlight value is 200, the target backlight value is 180 and the first preset value is 2, and the first node determines that multiple first backlight values are 200, 198, 196, ..., 184, 182, and 180 respectively.
[0016] In the embodiment of the present application, after the first node determines a plurality of first backlight values, the plurality of first backlight values are sequentially sent to the LCD driver, and the LCD driver adjusts the backlight value of the screen according to each first backlight value until the LCD driver adjusts the backlight value of the screen to the target backlight value. Thus, the first node reduces the screen brightness by slowly reducing the backlight value of the screen, thereby achieving the purpose of reducing the device temperature by reducing the power consumption of the device.
[0017] In another possible implementation manner of the first aspect, the kernel layer includes an LCD driver, and the first node of the kernel layer adjusts the backlight value of the screen according to each of the first backlight values in descending order until the backlight value of the screen reaches the target backlight value, including:
[0018] The first node of the kernel layer sends each first backlight value to the LCD driver in descending order, and the LCD driver adjusts the backlight value of the screen to the first backlight value until the LCD driver adjusts the backlight value of the screen to the target backlight value.
[0019] It can be understood that the LCD driver adjusts the backlight value of the screen according to each first backlight value received until the LCD driver adjusts the backlight value of the screen to the target backlight value. Thus, the first node reduces the screen brightness by slowly reducing the backlight value of the screen, thereby achieving the purpose of reducing the device temperature by reducing the device power consumption.
[0020] In another possible implementation of the first aspect, after the first node of the kernel layer adjusts the backlight value of the screen to the target backlight value, the temperature control method may further include:
[0021] After the application framework layer determines that the current temperature is the first temperature, if the application framework layer determines that the first temperature is greater than or equal to the first temperature threshold, the application framework layer sends the first coefficient corresponding to the first temperature to the first node of the kernel layer, and after the first node of the kernel layer obtains the current backlight value of the screen, it determines the first target backlight value based on the current backlight value and the first coefficient, and the first node of the kernel layer adjusts the backlight value of the screen to the first target backlight value to adjust the current temperature.
[0022] It can be understood that after the first node of the kernel layer adjusts the backlight value of the screen to the target backlight value, the application framework layer obtains the current temperature of the electronic device detected by the temperature sensor again, and the application framework layer determines that the current temperature is still greater than the first temperature threshold. The application framework layer determines the first coefficient corresponding to the current temperature based on the pre-stored multiple temperature values and the brightness discount coefficients corresponding to each temperature value, and then sends the first coefficient to the first node of the kernel layer, and the first node of the kernel layer executes the process of adjusting the backlight value of the screen again. In other words, the application framework layer determines that the current temperature of the electronic device is greater than or equal to the first temperature threshold, and the kernel layer continues to execute the process of adjusting the backlight value of the screen.
[0023] In another possible implementation of the first aspect, after the first node of the kernel layer adjusts the backlight value of the screen to the target backlight value, the temperature control method may further include:
[0024] After the application framework layer determines that the current temperature is the first temperature, the application framework layer determines that the first temperature is less than a first temperature threshold.
[0025] It can be understood that after the first node of the kernel layer adjusts the backlight value of the screen to the target backlight value, the application framework layer again obtains the current temperature of the electronic device detected by the temperature sensor. The application framework layer determines that the current temperature is less than the first temperature threshold, and the kernel layer does not need to execute the process of adjusting the backlight value of the screen.
[0026] In another possible implementation manner of the first aspect, after the application framework layer sends the target coefficient corresponding to the current temperature to the first node of the kernel layer, the method may further include:
[0027] The first node calls a reading function to read a character string corresponding to the target coefficient from the first node; the first node calls a parsing function to parse the character string corresponding to the target coefficient to obtain the target coefficient.
[0028] It can be understood that the first node obtains the target coefficient by calling the analytical function, so that the first node determines the target backlight value according to the target coefficient and the current backlight value of the screen. Thus, the bottom layer of the electronic device obtains the target coefficient by analytical analysis to determine the target backlight value at the bottom layer, which reduces the number of interactions between the upper layer and the bottom layer and reduces the power consumption of the device.
[0029] In another possible implementation manner of the first aspect, determining the target backlight value according to the current backlight value and the target coefficient includes:
[0030] The first node calls the parsing function to parse the character string of the current backlight value read by the reading function. After obtaining the current backlight value, the first node calls the parsing function to send the current backlight value and the target coefficient to the brightness function; the first node calls the brightness function to calculate the target backlight value based on the current backlight value and the target coefficient.
[0031] It can be seen that the bottom layer of the electronic device performs a process of determining the target backlight value according to the current backlight value of the screen and the target coefficient, which reduces the number of interactions between the upper layer and the bottom layer and reduces the power consumption of the device.
[0032] In a second aspect, the present application provides another temperature control method for an electronic device, the electronic device comprising an application framework layer and a kernel layer, the temperature control method may include:
[0033] In response to the startup operation of the electronic device, the application framework layer sends thermal control parameters to the kernel layer. When the kernel layer determines that the current temperature of the electronic device is greater than or equal to the second temperature threshold, the kernel layer determines the target coefficient corresponding to the current temperature based on multiple temperature values and the brightness discount coefficients corresponding to each temperature value; the kernel layer determines the target backlight value based on the current backlight value of the screen and the target coefficient; the kernel layer adjusts the backlight value of the screen to the target backlight value to adjust the current temperature.
[0034] The thermal control parameters include a plurality of temperature thresholds and brightness discount coefficients corresponding to the temperature thresholds.
[0035] It can be understood that after the system of the electronic device is started, the application framework layer sends the thermal control parameters to the kernel layer. When the kernel layer determines that the current temperature of the mobile phone reaches the second temperature threshold, the kernel layer directly controls the screen brightness without interacting with the application framework layer, thereby avoiding the generation of a large number of uevent events, reducing the load on the mobile phone, and reducing the energy consumption of the mobile phone, thereby improving the performance of the mobile phone.
[0036] In a possible implementation manner of the second aspect, the kernel layer includes a first node, and the kernel layer adjusts a backlight value of a screen to a target backlight value, including:
[0037] The first node of the kernel layer determines multiple second backlight values according to the current backlight value, the target backlight value and the second preset value; the first node of the kernel layer adjusts the backlight value of the screen according to each second backlight value in descending order until the backlight value of the screen reaches the target backlight value.
[0038] In an embodiment of the present application, the first node of the kernel layer adopts a slow-down strategy to gradually reduce the backlight value of the screen from the current backlight value to the target backlight value, so as to avoid directly adjusting the backlight value of the screen to the target backlight value, resulting in a sudden change in screen brightness and affecting the user experience.
[0039] In another possible implementation manner of the second aspect, the first node of the kernel layer determines a plurality of second backlight values according to the current backlight value, the target backlight value, and the second preset value, including:
[0040] The first node of the core layer determines a plurality of second backlight values with equal differences according to the current backlight value, the target backlight value and the second preset value.
[0041] The second preset value may be the same as or different from the first preset value, which is not limited here. For example, the first preset value is 1 and the second preset value is 2. For another example, the first preset value and the second preset value are both 1 or 2.
[0042] For example, the first node determines that the current backlight value is 200, the target backlight value is 180 and the second preset value is 1, and the first node determines that multiple second backlight values are 200, 199, 198, ..., 182, 181, and 180 respectively.
[0043] In the embodiment of the present application, after the first node determines the multiple second backlight values, the multiple second backlight values are sent to the LCD driver in sequence, and the LCD driver adjusts the backlight value of the screen according to each second backlight value until the LCD driver adjusts the backlight value of the screen to the target backlight value. Thus, the first node reduces the screen brightness by slowly reducing the backlight value of the screen, thereby achieving the purpose of reducing the device temperature by reducing the power consumption of the device.
[0044] In another possible implementation manner of the second aspect, after the kernel layer adjusts the backlight value of the screen to the target backlight value, the method may further include:
[0045] If the kernel layer determines that the current temperature is greater than or equal to the second temperature threshold, the kernel layer determines the second coefficient corresponding to the current temperature based on multiple temperature values and the brightness discount coefficients corresponding to each temperature value. The kernel layer determines the second target backlight value based on the current backlight value of the screen and the second coefficient. The kernel layer adjusts the backlight value of the screen to the second target backlight value.
[0046] It can be understood that after the kernel layer adjusts the backlight value of the screen to the target backlight value, the kernel layer again obtains the current temperature of the electronic device detected by the temperature sensor, and the kernel layer determines that the current temperature is still greater than the second temperature threshold. The kernel layer determines the target coefficient corresponding to the current temperature based on the pre-stored multiple temperature values and the brightness discount coefficients corresponding to each temperature value, and then the kernel layer again performs the process of adjusting the backlight value of the screen. In other words, the kernel layer determines that the current temperature of the electronic device is greater than or equal to the first temperature threshold, and the kernel layer continues to perform the process of adjusting the backlight value of the screen.
[0047] In another possible implementation manner of the second aspect, after the kernel layer adjusts the backlight value of the screen to the target backlight value, the method may further include:
[0048] The kernel layer determines that the current temperature is less than a second temperature threshold.
[0049] It can be understood that after the kernel layer adjusts the backlight value of the screen to the target backlight value, the kernel layer again obtains the current temperature of the electronic device detected by the temperature sensor. The kernel layer determines that the current temperature is less than the second temperature threshold, and the kernel layer does not need to execute the process of adjusting the backlight value of the screen.
[0050] In another possible implementation manner of the second aspect, the kernel layer includes a first node, and after the application framework layer sends the thermal control parameter to the kernel layer, the method further includes:
[0051] The first node calls a reading function to read a character string corresponding to the thermal control parameter from the first node; the first node calls a parsing function to parse the character string corresponding to the thermal control parameter to obtain multiple temperature values and brightness discount coefficients corresponding to each temperature value.
[0052] It can be seen that the first node of the kernel layer calls the parsing function to parse the string corresponding to the thermal control parameter, and after obtaining multiple temperature thresholds and the brightness discount coefficients corresponding to each temperature threshold, the first node adjusts the screen brightness to achieve the purpose of lowering the device temperature. The kernel layer does not need to interact with the application framework layer, avoiding the generation of a large number of uevent events, reducing the load on the mobile phone, reducing the energy consumption of the mobile phone, and thus improving the performance of the mobile phone.
[0053] In another possible implementation manner of the second aspect, the kernel layer includes a first node, and the kernel layer determines a target coefficient corresponding to a current temperature, including:
[0054] When the first node determines that the current temperature is greater than or equal to the second temperature threshold, the first node calls the callback function to determine a target coefficient corresponding to the current temperature;
[0055] The kernel layer determines the target backlight value based on the current backlight value of the screen and the target coefficient, including:
[0056] The first node calls the callback function to calculate the target backlight value according to the current backlight value and the target coefficient.
[0057] In a third aspect, the present application provides an electronic device, which has the function of implementing the method described in the first aspect above, and has the function of implementing the method described in the second aspect above. The function can be implemented by hardware, or it can be implemented by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions. For example, the electronic device may include a temperature control management module. The temperature control management module can be used to control the temperature of the electronic device. The temperature control management module can monitor the temperature of the electronic device in real time to determine whether to trigger the temperature control of the electronic device. For example, when the temperature control management module determines that the temperature of the electronic device is less than a certain temperature threshold, the temperature control management module determines to increase the temperature of the electronic device, and at this time, the electronic device triggers the process of increasing the temperature. When the temperature control management module determines that the temperature of the electronic device is greater than a certain temperature threshold, the temperature control management module determines to reduce the temperature of the electronic device, and at this time, the electronic device triggers the process of reducing the temperature.
[0058] In a possible implementation of the embodiment of the present application, when the temperature control management module determines that the current temperature of the electronic device is greater than or equal to the first temperature threshold, the temperature control management module sends a target coefficient corresponding to the current temperature to the kernel layer.
[0059] In another possible implementation of the embodiment of the present application, when the system of the electronic device is started, the temperature control management module can send thermal control parameters to the kernel layer, where the thermal control parameters include multiple temperature thresholds and brightness discount coefficients corresponding to each temperature threshold.
[0060] In a fourth aspect, the present application provides an electronic device, comprising: a touch screen, the touch screen comprising a touch sensor and a display screen; one or more processors; a memory; wherein one or more computer programs are stored in the memory, and the one or more computer programs include instructions, which, when executed by the electronic device, enable the electronic device to execute a temperature control method as described in any one of the first aspects above, or execute a temperature control method as described in any one of the second aspects above.
[0061] In a fifth aspect, the present application provides a computer-readable storage medium, which stores instructions. When the instructions are executed on an electronic device, the electronic device executes a temperature control method as described in any one of the first aspects, or executes a temperature control method as described in any one of the second aspects.
[0062] In a sixth aspect, the present application provides a computer program product, which includes computer instructions. When the computer instructions are executed on an electronic device, the electronic device executes a temperature control method as described in any one of the first aspects, or executes a temperature control method as described in any one of the second aspects.
[0063] It can be understood that the electronic device described in the third and fourth aspects, the computer storage medium described in the fifth aspect, and the computer program product described in the sixth aspect are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] Figure 1 A schematic diagram of a process for adjusting screen brightness provided in the related art;
[0065] Figure 2 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;
[0066] Figure 3 A layered architecture diagram of an electronic device provided in an embodiment of the present application;
[0067] Figure 4 A graph showing the relationship between the housing temperature and the brightness discount coefficient of a mobile phone provided in an embodiment of the present application;
[0068] Figure 5 A schematic diagram of a temperature control method provided in an embodiment of the present application Figure 1 ;
[0069] Figure 6 A schematic diagram of a temperature control method provided in an embodiment of the present application Figure 2 ;
[0070] Figure 7 Example of determining the target backlight value for the first node of the kernel layer provided in the embodiment of the present application Figure 1 ;
[0071] Figure 8 A schematic diagram of a temperature control method provided in an embodiment of the present application Figure 3 ;
[0072] Fig. 9 A schematic diagram of a temperature control method provided in an embodiment of the present application Figure 4 ;
[0073] Fig.10 Example of determining the target backlight value for the first node of the kernel layer provided in the embodiment of the present application Figure 2 ;
[0074] Fig.11 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0075] The technical solution in the embodiment of the present application will be described below in conjunction with the drawings in the embodiment of the present application. In the description of the embodiment of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone.
[0076] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present application, unless otherwise specified, "plurality" means two or more.
[0077] 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.
[0078] During the operation of electronic devices, electronic devices can control the temperature of electronic devices by adjusting the screen brightness, thereby preventing the temperature of the device from being too high or too low, which would affect the performance of the device. For example, when the temperature of an electronic device rises to a certain temperature threshold, most device manufacturers use a thermal control brightness discount method, that is, adjust the screen brightness value, to achieve the purpose of lowering the device temperature, so as to avoid the situation where the device temperature is too high and affects the performance of the device.
[0079] For example, when a user uses a camera function of an electronic device to shoot a video, when the temperature of the electronic device reaches a certain temperature threshold (for example, the temperature threshold is 40° C.), the electronic device can lower the device temperature by adjusting the screen brightness.
[0080] In the related art, as the system of an electronic device starts up, the thermal control system of the electronic device is initialized. When the thermal control system is initialized, the electronic device will load the control nodes related to the liquid crystal display (LCD) of the screen and the interface for initializing uevent. When the temperature of the electronic device reaches a certain temperature threshold, the thermal (temperature control management module) of the electronic device reads the current brightness information of the screen from the brightness driving node, and determines the target brightness information based on the current brightness information. The temperature control management module of the electronic device sends the target brightness information to the brightness driving node. The brightness driving node sends the target brightness information to the LCD driver, so that the LCD driver adjusts the brightness of the screen according to the target brightness information. The following is combined with Figure 1 The above process is introduced in detail. Figure 1 A schematic diagram of a process for adjusting screen brightness provided in the related art is shown in FIG. Figure 1 As shown, the process may include the following steps:
[0081] S1, the temperature control management module of the application framework layer determines that the current temperature reaches the temperature threshold and determines to adjust the screen brightness.
[0082] After the system of the electronic device is started, the temperature control management module of the electronic device monitors the temperature of the electronic device in real time. When the temperature control management module determines that the current temperature of the electronic device reaches a temperature threshold (for example, 40°C), the temperature control management module determines to adjust the screen brightness of the electronic device to achieve the purpose of lowering the temperature of the electronic device by adjusting the screen brightness.
[0083] S2, the temperature control management module of the application framework layer reads the current backlight value of the screen from the brightness driver node of the kernel layer.
[0084] S3, the temperature control management module of the application framework layer determines the target backlight value, and determines multiple backlight values for adjusting the screen according to the slow-down strategy.
[0085] Optionally, the temperature control management module determines the target backlight value of the screen according to the screen brightness adjustment scheme pre-stored in the electronic device, and then determines to adjust multiple backlight values of the screen according to the slow-down adjustment strategy. Among them, the slow-down adjustment strategy refers to a method of slowly reducing the backlight value of the screen according to the current backlight value of the screen. In this scheme, the electronic device uses a slow-down strategy to adjust the screen brightness, which can avoid the problem that the screen brightness suddenly becomes brighter or darker, affecting the user experience.
[0086] For example, assuming that the current backlight value of the screen read by the temperature control management module from the brightness driving node is 200, the target backlight value of the screen is determined to be 180, and the multiple backlight values used to adjust the screen are determined to be 199, 198, 197, ..., 181, 180 according to the slow-down adjustment strategy.
[0087] S4, the temperature control management module of the application framework layer writes multiple backlight values into the brightness driving node respectively until the target backlight value is written.
[0088] S5, the brightness driver node of the core layer sends the backlight value to the LCD driver; correspondingly, the LCD driver receives the backlight value.
[0089] S6, LCD driver adjusts screen brightness according to backlight value.
[0090] Optionally, after the temperature control management module determines multiple backlight values, for each backlight value, the temperature control management module writes the backlight value into the brightness driver node of the kernel layer. After receiving the backlight value, the brightness driver node sends the backlight value to the LCD driver, and after receiving the backlight value, the LCD driver adjusts the brightness of the screen according to the received backlight value.
[0091] The temperature control management module cyclically writes the backlight value to the brightness driving node. After the brightness driving node receives each backlight value, it sends the backlight value to the LCD driver. After the LCD driver receives the backlight value, it adjusts the brightness of the screen according to the received backlight value until the temperature control management module writes the target backlight value to the brightness driving node. The temperature control management module stops writing the backlight value to the brightness driving node. If the temperature control management module determines that the current temperature of the electronic device is less than the temperature threshold, the screen brightness is stopped. If the temperature management module determines that the current temperature of the electronic device is still greater than or equal to the temperature threshold, the process of adjusting the screen brightness in S2 to S6 above is continued until the temperature control management module determines that the current temperature of the electronic device is less than the temperature threshold.
[0092] For example, suppose the current backlight value of the screen read by the temperature control management module from the brightness driver node is 200, and the backlight value written by the temperature control management module to the brightness driver node is 199. After receiving the backlight value 199, the brightness driver node sends the backlight value 199 to the LCD driver. After receiving the backlight value 199, the LCD driver adjusts the brightness of the screen from the backlight value 200 to 199. Then, the temperature control management module writes the backlight value 198 to the brightness driver node. After receiving the backlight value 198, the brightness driver node sends the backlight value 198 to the LCD driver. The LCD driver adjusts the brightness of the screen from the backlight value 199 to 198. The temperature control management module continues to write backlight values to the brightness driver node until the target backlight value 180 is written to the brightness driver node, and the temperature control management module stops writing backlight values to the brightness driver node.
[0093] It can be seen that in the above-mentioned entire brightness adjustment process, the temperature control management module writes the backlight value to the brightness driver node 20 times, the temperature control management module writes the backlight value to the brightness driver node once, and the kernel layer reports a uevent event to the application framework layer. Among them, the uevent event is a communication mechanism for the kernel layer to notify the upper layer. In other words, the application framework layer sends a backlight value to the kernel layer once, and the kernel layer reports a uevent event.
[0094] Depend on Figure 1 It can be seen that when the electronic device adopts the slow-down strategy to adjust the brightness of the screen, the temperature control management module writes the backlight value to the brightness driver node multiple times. The temperature control management module frequently reads and writes the brightness driver node, causing the kernel layer to report uevent events to the application framework layer multiple times. The reporting of multiple uevent events will not only increase the system load, but also increase the power consumption of the device, thereby affecting the performance of the system.
[0095] For example, the process of the temperature control management module writing the first backlight value to the brightness driver node generates a uevent event; the process of the temperature control management module writing the second backlight value to the brightness driver node generates a uevent event. The temperature control management module cyclically writes the backlight value determined by the ramp-down strategy to the brightness driver node until the target backlight value is written to the brightness driver node. Each time the temperature control management module writes a backlight value to the brightness driver node, a uevent event is generated, resulting in a large number of uevent events being generated in the process of the temperature control management module adjusting the screen brightness of the device.
[0096] It needs to be explained that the manufacturers of electronic devices have analyzed the operation logs of electronic devices and found that when the electronic device uses a slow-down strategy to adjust the brightness of the screen, a large number of uevent events are generated, and the uevent events take the longest time of all processes. In addition, the manufacturer of the electronic device determines that the frequency at which the temperature control management module writes the backlight value to the brightness driver node is the same as the frequency of uevent events. In other words, in the process of adjusting the brightness by the temperature control management module of the electronic device, frequent reading and writing of the brightness driver node will generate a large number of uevent events. For example, during a certain test period, a large number of backlight brightness uevent events in the electronic device are reported to the upper layer, such as 356 uevent events generated by the bottom layer and reported to the upper layer, resulting in excessive power consumption of the device.
[0097] When the electronic device is in an automatic backlight scenario, the electronic device automatically adjusts the screen brightness according to the brightness of the light source, making the frequency and number of times the electronic device adjusts the screen brightness more frequent, resulting in the phenomenon that the temperature control management module of the electronic device frequently reads and writes the brightness driver node, resulting in a large number of uevent events. It can be seen that in the process of adjusting the temperature of the electronic device by adjusting the screen brightness, the load of some processes increases, the power consumption is increased, and the high-load process occupies CPU resources, which also seriously deteriorates the performance of the device.
[0098] In addition, with the regulation of the extreme temperature of electronic devices by 3C safety certification, for example, reducing the extreme temperature of electronic devices from 50°C to 48°C, the temperature of electronic devices will be regulated more frequently during operation, causing the electronic devices to frequently read and write brightness drive nodes, generating a large number of uevent events, and causing the performance of the electronic devices to deteriorate.
[0099] In addition, when the electronic device uses the front camera or the rear camera to capture a portrait, as the temperature of the electronic device rises, the electronic device also generates a large number of uevent processes. For example, when the electronic device uses the front camera to capture a portrait, the uevent process in the electronic device takes up to 5730.37ms, and when the electronic device uses the rear camera to capture a portrait, the uevent process in the electronic device takes up to 3765.94ms. It can be seen that during the operation of the camera of the electronic device, a large number of uevent processes are generated, which increases the load of the electronic device, increases the power consumption of the electronic device, and reduces the performance of the device.
[0100] To this end, an embodiment of the present application provides a temperature control method for an electronic device. When the application framework layer determines that the current temperature of the electronic device is greater than or equal to the first temperature threshold, the application framework layer sends a target coefficient corresponding to the current temperature to the first node of the kernel layer. After the first node of the kernel layer determines the target backlight value according to the current backlight value of the screen and the target coefficient, the first node adjusts the backlight value of the screen to the target backlight value to adjust the current temperature. It can be seen that after the application framework layer sends the target coefficient to the first node of the kernel layer, the first node of the kernel layer adjusts the backlight value of the screen to the target backlight value to achieve the purpose of lowering the temperature of the device. By reducing the number of interactions between the application framework layer and the kernel layer, the phenomenon of generating a large number of uevent events is avoided, the power consumption of the device is reduced, and the situation of excessive temperature of the device is reduced.
[0101] For example, the temperature control method of an electronic device provided in the embodiments of the present application can be applied to mobile phones, tablet computers, personal computers (PCs), personal digital assistants (PDAs), smart watches, netbooks, wearable electronic devices, augmented reality (AR) devices, virtual reality (VR) devices, vehicle-mounted devices, smart cars, smart speakers and other electronic devices with display screens, and the embodiments of the present application do not impose any restrictions on this.
[0102] like Figure 2 As shown, Figure 2 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
[0103] The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0104] 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.
[0105] 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 memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0106] The controller may be the nerve center and command center of the electronic device 100. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.
[0107] 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.
[0108] In some embodiments, the processor 110 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-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 subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.
[0109] 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.
[0110] The charging management module 140 is used to receive charging input from a charger, where the charger can be a wireless charger or a wired charger.
[0111] The power management module 141 is used to connect the battery 142 , the charging management module 140 and the processor 110 .
[0112] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.
[0113] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.
[0114] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, etc. the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1.
[0115] The modem processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker 170A, a receiver 170B, etc.), or displays an image or video through a display screen 194. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules.
[0116] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 100. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the frequency of the electromagnetic wave signal and performs filtering, and sends the processed signal to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency of it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.
[0117] In some embodiments, the antenna 1 of the electronic device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology, etc. GNSS may include the global positioning system (GPS), the global navigation satellite system (GLONASS), the Beidou navigation satellite system (BDS), the quasi-zenith satellite system (QZSS) and / or the satellite based augmentation system (SBAS).
[0118] The electronic device 100 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 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 that execute program instructions to generate or change display information.
[0119] The display screen 194 is used to display images, videos, etc. The display screen 194 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 194, where N is a positive integer greater than 1.
[0120] The electronic device 100 can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.
[0121] ISP is used to process the data fed back by camera 193. For example, when taking a photo, the shutter is opened, and the light is transmitted to the camera photosensitive element through the lens. The light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to ISP for processing and converts it into an image visible to the naked eye. ISP can also perform algorithm optimization on the noise and brightness of the image. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, ISP can be set in camera 193.
[0122] The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then passes the electrical signal to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the electronic device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.
[0123] The digital signal processor is used to process digital signals, and can process not only digital image signals but also other digital signals. For example, when the electronic device 100 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.
[0124] Video codecs are used to compress or decompress digital videos. The electronic device 100 may support one or more video codecs. Thus, the electronic device 100 may play or record videos in a variety of coding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
[0125] NPU is a neural network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain, it can quickly process input information and can also continuously self-learn. Through NPU, applications such as intelligent cognition of electronic device 100 can be realized, such as image recognition, face recognition, voice recognition, text understanding, etc.
[0126] 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.
[0127] The internal memory 121 can be used to store computer executable program codes, and the executable program codes include instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the electronic device 100 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.
[0128] The electronic device 100 can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.
[0129] The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 can be arranged in the processor 110, or some functional modules of the audio module 170 can be arranged in the processor 110.
[0130] The speaker 170A, also called a "speaker", is used to convert an audio electrical signal into a sound signal. The electronic device 100 can listen to music or listen to a hands-free call through the speaker 170A.
[0131] The receiver 170B, also called a "earpiece", is used to convert audio electrical signals into sound signals. When the electronic device 100 receives a call or voice message, the voice can be received by placing the receiver 170B close to the human ear.
[0132] Microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can speak by putting their mouth close to microphone 170C to input the sound signal into microphone 170C. The electronic device 100 can be provided with at least one microphone 170C. In other embodiments, the electronic device 100 can be provided with two microphones 170C, which can not only collect sound signals but also realize noise reduction function. In other embodiments, the electronic device 100 can also be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify the sound source, realize directional recording function, etc.
[0133] The earphone interface 170D is used to connect a wired earphone and can be a USB interface 130 or a 3.5 mm open mobile terminal platform (OMTP) standard interface or a cellular telecommunications industry association of the USA (CTIA) standard interface.
[0134] The pressure sensor 180A is used to sense pressure signals and convert the pressure signals into electrical signals.
[0135] The gyro sensor 180B may be used to determine the motion posture of the electronic device 100 .
[0136] The magnetic sensor 180D includes a Hall sensor, and the electronic device 100 can detect the opening and closing of the flip leather case by using the magnetic sensor 180D.
[0137] The acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device 100 in all directions (generally three axes). When the electronic device 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of the electronic device and is applied to applications such as horizontal and vertical screen switching and pedometers.
[0138] The distance sensor 180F is used to measure the distance. The electronic device 100 can measure the distance by infrared or laser. In some embodiments, when shooting a scene, the electronic device 100 can use the distance sensor 180F to measure the distance to achieve fast focusing.
[0139] The proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode.
[0140] The ambient light sensor 180L is used to sense the ambient light brightness. The electronic device 100 can adaptively adjust the brightness of the display screen 194 according to the perceived ambient light brightness. The ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures. The ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the electronic device 100 is in a pocket to prevent accidental touches.
[0141] The fingerprint sensor 180H is used to collect fingerprints. The electronic device 100 can use the collected fingerprint characteristics to implement fingerprint unlocking, access application locks, fingerprint photography, fingerprint call answering, etc.
[0142] The temperature sensor 180J is used to detect temperature. In some embodiments, the electronic device 100 uses the temperature detected by the temperature sensor 180J to execute a temperature processing strategy. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold, the electronic device 100 reduces the performance of a processor located near the temperature sensor 180J to reduce power consumption and implement thermal protection.
[0143] In an embodiment of the present application, when the electronic device 100 determines that the temperature reported by the temperature sensor 180J exceeds the temperature threshold, the electronic device adjusts the brightness of the screen to reduce the temperature of the electronic device detected by the temperature sensor 180J.
[0144] The number of temperature sensors 180J provided in the electronic device is not limited, and there may be multiple temperature sensors 180J. For example, the electronic device is provided with temperature sensors 180J for measuring the temperature of the battery, circuit board and housing of the electronic device respectively.
[0145] For example, in an embodiment of the present application, the electronic device 100 can obtain the temperature of the screen of the electronic device based on multiple temperature sensors 180J installed on the screen; the multiple temperature sensors 180J are mainly distributed around the screen of the electronic device 100, and in an embodiment of the present application, temperature sensors 180J can be installed in the left and right lower corners of the screen respectively. The two temperature sensors 180J are attached to the screen and can accurately detect the temperature of the screen.
[0146] In other embodiments, when the temperature is lower than another threshold, the electronic device 100 heats the battery 142 to prevent the low temperature from causing abnormal shutdown of the electronic device 100. In other embodiments, when the temperature is lower than another threshold, the electronic device 100 boosts the output voltage of the battery 142 to prevent abnormal shutdown caused by low temperature.
[0147] The touch sensor 180K is also called a “touch panel.” The touch sensor 180K may be disposed on the display screen 194 , and the touch sensor 180K and the display screen 194 form a touch screen, also called a “touch screen.”
[0148] Bone conduction sensor 180M can obtain vibration signals.
[0149] The SIM card interface 195 is used to connect a SIM card. The SIM card can be connected to and separated from the electronic device 100 by inserting it into the SIM card interface 195 or pulling it out from the SIM card interface 195. The electronic device 100 can support 1 or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, and the like. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of the multiple cards can be the same or different. The SIM card interface 195 can also be compatible with different types of SIM cards. The SIM card interface 195 can also be compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to implement functions such as calls and data communications. In some embodiments, the electronic device 100 uses an eSIM, i.e., an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.
[0150] The software system of the electronic device may adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. The embodiment of the present invention takes a system with a layered architecture as an example to exemplify the software structure of the electronic device.
[0151] Figure 3 A layered architecture diagram of an electronic device provided in an embodiment of the present application.
[0152] It is understandable that 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. In some embodiments, the software system may include an application layer (abbreviated as application layer), an application framework layer (abbreviated as framework layer), a system library, and a kernel layer.
[0153] The above-mentioned application layer may include a series of application packages.
[0154] like Figure 3 As shown, the application package may include system applications. System applications refer to applications that are set in the electronic device before leaving the factory. For example, the system applications may include programs such as camera, gallery, calendar, music, short message, memo, and weather.
[0155] The application package may also include third-party applications, which are applications that users install after downloading the installation package from an application store (or application market), such as map applications, food delivery applications, reading applications (such as e-books), social applications, and travel applications.
[0156] The application framework layer provides an application programming interface (API) and a programming framework for the application programs in the application layer. The application framework layer includes some predefined functions.
[0157] like Figure 3 As shown, the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, and a temperature control management module (Thermal), etc.
[0158] The window manager is used to manage window programs. The window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc.
[0159] Content providers are used to store and retrieve data and make it accessible to applications. The data can include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.
[0160] 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.
[0161] The phone manager is used to provide communication functions for electronic devices, such as the management of call status (including answering, hanging up, etc.).
[0162] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.
[0163] The notification manager allows applications to display notification information in the status bar. It can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also be a notification that appears in the system top status bar in the form of a chart or scroll bar text, such as notifications of applications running in the background, or a notification that appears on the screen in the form of a dialog window. For example, a text message is displayed in the status bar, a reminder sound is emitted, the phone vibrates, the indicator light flashes, etc.
[0164] The temperature control management module is used to control the temperature of the electronic device. The temperature control management module can monitor the temperature of the electronic device in real time to determine whether to trigger the temperature control of the electronic device. For example, when the temperature control management module determines that the temperature of the electronic device is less than a certain temperature threshold, the temperature control management module determines to increase the temperature of the electronic device, and at this time, the electronic device triggers a temperature increase plan. When the temperature control management module determines that the temperature of the electronic device is greater than a certain temperature threshold, the temperature control management module determines to reduce the temperature of the electronic device, and at this time, the electronic device triggers a temperature reduction plan.
[0165] In a possible implementation method of an embodiment of the present application, when the temperature control management module determines that the current temperature of the electronic device reaches a certain temperature threshold, the temperature control management module sends a brightness discount coefficient corresponding to the current temperature to the kernel layer, so that after the kernel layer receives the brightness discount coefficient, it determines the target backlight value based on the current backlight value of the electronic device and the brightness discount coefficient. Then, the kernel layer slowly adjusts the screen brightness according to the slow-down strategy until the screen brightness value is adjusted to the target backlight value.
[0166] In another possible implementation of the embodiment of the present application, when the system of the electronic device is started, the temperature control management module sends multiple temperature thresholds and the brightness discount coefficients corresponding to each temperature threshold to the kernel layer, so that when the current temperature of the electronic device reaches a certain temperature threshold, the kernel layer determines the brightness discount coefficient corresponding to the current temperature. Then, after the kernel layer determines the target backlight value based on the current backlight value and the corresponding brightness discount coefficient, the kernel layer slowly adjusts the screen brightness according to the slow-down strategy until the brightness value of the screen is adjusted to the target backlight value.
[0167] Android Runtime includes core libraries and virtual machines. Android Runtime is responsible for scheduling and management of the Android system.
[0168] The core library consists of two parts: one is the function that needs to be called by the Java language, and the other is the Android core library.
[0169] 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.
[0170] 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.
[0171] The surface manager is used to manage the display subsystem and provide the fusion of two-dimensional and three-dimensional layers for multiple applications.
[0172] 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.
[0173] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
[0174] A 2D graphics engine is a drawing engine for 2D drawings.
[0175] The kernel layer is the layer between hardware and software. The kernel layer includes at least the first node (i.e., brightness discount coefficient node), LCD driver, display driver, camera driver, audio driver, and sensor driver.
[0176] In one possible case of an embodiment of the present application, the first node can be used to determine the target backlight value according to the current backlight value of the electronic device and the brightness discount coefficient after receiving the brightness discount coefficient corresponding to the current temperature of the electronic device sent by the temperature control management module. Then, the first node uses a slow-down strategy to send the backlight value to the LCD driver multiple times, so that the LCD driver adjusts the screen brightness of the electronic device according to the received backlight value, until the first node sends the target backlight value to the LCD driver and stops sending the backlight value to the LCD driver.
[0177] In another possible case of an embodiment of the present application, the first node can also be used to receive multiple temperature values sent by the application framework layer and the brightness discount coefficient corresponding to each temperature value. When the current temperature of the electronic device acquired by the first node reaches a certain temperature threshold, the first node can determine the brightness discount coefficient corresponding to the current temperature, and the first node determines the target backlight value based on the current backlight value of the electronic device and the brightness discount coefficient. Then, the first node uses a slow-down strategy to send backlight values to the LCD driver multiple times, so that the LCD driver adjusts the screen brightness of the electronic device according to the received backlight value, until the first node sends the target backlight value to the LCD driver and stops sending the backlight value to the LCD driver.
[0178] The LCD driver is used to adjust the screen brightness according to the received backlight value after receiving the backlight value sent by the first node.
[0179] The following takes a mobile phone as an example of an electronic device and describes the temperature control method of the electronic device in an embodiment of the present application in conjunction with the accompanying drawings.
[0180] In the embodiment of the present application, during the operation of the mobile phone, the temperature sensor of the device in the mobile phone can detect the current temperature of the mobile phone in real time. When the current temperature of the mobile phone reaches the temperature threshold, the mobile phone can adjust the brightness of the screen to adjust the temperature of the mobile phone by adjusting the screen brightness.
[0181] The temperature of the mobile phone can be the temperature of the battery in the mobile phone, the temperature of the circuit board, or the temperature of the outer shell. In the embodiment of the present application, the hardware device of the current temperature of the mobile phone detected by the temperature sensor is not limited. For example, the mobile phone can be provided with 4 temperature sensors, which are respectively used to detect the temperature at different positions of the outer shell. Then, after the mobile phone obtains the temperature values detected by the 4 temperature sensors respectively, the outer shell temperature of the mobile phone can be determined according to the average value of the outer shell temperatures at different positions detected by the 4 temperature sensors.
[0182] Optionally, when the mobile phone determines that the current temperature detected by the temperature sensor reaches the temperature threshold, the mobile phone can determine the brightness discount coefficient corresponding to the current temperature based on the correspondence between the temperature value and the brightness discount coefficient. Then, after the mobile phone determines the target backlight value for adjusting the brightness of the screen based on the brightness discount coefficient, it uses a slow-down strategy to determine multiple backlight values for adjusting the screen, and gradually reduces the brightness of the screen based on the multiple backlight values, so as to reduce the temperature of the mobile phone by reducing the screen brightness, thereby avoiding the problem of the mobile phone's temperature being too high and affecting the performance of the device.
[0183] For example, Figure 4 The relationship between the shell temperature and the brightness discount coefficient of the mobile phone provided in the embodiment of the present application is shown in FIG. Figure 4It can be seen that when the shell temperature of the mobile phone is less than 40℃, there is no need to adjust the screen brightness, and the brightness discount coefficient is 1; when the shell temperature of the mobile phone is equal to 42℃, the mobile phone uses the backlight value determined by the brightness discount coefficient to adjust the screen brightness. At this time, the brightness discount coefficient is 0.9; when the shell temperature of the mobile phone is equal to 44℃, the corresponding brightness discount coefficient is 0.8.
[0184] For example, it can be seen from the following Table 1 that when the shell temperature of the mobile phone is less than 40°C, there is no need to adjust the screen brightness, and the brightness discount coefficient is 1; when the shell temperature of the mobile phone is greater than or equal to 40°C and less than or equal to 42°C, the mobile phone uses the backlight value determined by the brightness discount coefficient to adjust the screen brightness. At this time, the brightness discount coefficient is 0.9; when the shell temperature of the mobile phone is greater than 42°C and less than or equal to 44°C, the corresponding brightness discount coefficient is 0.8.
[0185] Table 1
[0186] Case temperature(℃) Brightness discount factor (0,40) 1 [40,42] 0.9 (42,44] 0.8
[0187] It should be explained that the above Table 1 and Figure 4 The correspondence between the shell temperature and the brightness discount coefficient is introduced as an example. The temperature of the mobile phone described in the embodiments of this application is not limited to the shell temperature. The correspondence between the temperature of different hardware and the brightness discount coefficient may be the same or different, and this is not limited in the embodiments of this application. For example, when the battery temperature of the mobile phone is greater than or equal to 38°C and less than 40°C, the corresponding brightness discount coefficient is 0.9; when the battery temperature of the mobile phone is greater than or equal to 40°C and less than 43°C, the corresponding brightness discount coefficient is 0.8, and so on. In actual applications, the mobile phone can determine the corresponding brightness discount coefficient according to the temperature of different hardware, and this is not limited in the embodiments of this application.
[0188] In the embodiment of the present application, after the application framework layer of the mobile phone obtains the current temperature of the mobile phone detected by the temperature sensor, it determines that the current temperature has reached the first temperature threshold, and the application framework layer determines to adjust the screen brightness. The application framework layer of the mobile phone sends the brightness discount coefficient corresponding to the current temperature to the kernel layer. After receiving the brightness discount coefficient, the kernel layer determines the target backlight value based on the current backlight value of the mobile phone screen and the brightness discount coefficient. Then, the kernel layer uses a slow-down strategy to slowly adjust the brightness of the screen to the target backlight value. Figure 5 The above process is introduced in detail. Figure 5 A schematic diagram of a temperature control method provided in an embodiment of the present application Figure 1 .
[0189] like Figure 5 As shown, the method may include the following steps:
[0190] Step 510: The application framework layer of the mobile phone determines that the current temperature of the mobile phone reaches a first temperature threshold, and determines to adjust the screen brightness.
[0191] The temperature threshold is a temperature value of the mobile phone that is pre-set in the mobile phone and triggers the adjustment of the screen brightness. For example, the temperature threshold may be 38°C, 40°C, or 42°C, etc. Different mobile phone manufacturers may set the same or different first temperature thresholds, which is not limited here. The first temperature threshold here may be the minimum temperature threshold among the multiple temperature thresholds pre-set in the mobile phone.
[0192] In the embodiment of the present application, the application framework layer can obtain the current temperature of the mobile phone detected by the temperature sensor in real time. When the current temperature of the mobile phone detected by the temperature sensor obtained by the application framework layer reaches the first temperature threshold, the application framework layer determines to execute the process of adjusting the screen brightness. That is, the application framework layer determines to achieve the purpose of lowering the temperature of the mobile phone by adjusting the screen brightness.
[0193] Exemplarily, assuming that the first temperature threshold set in the mobile phone is 42° C., when the application framework layer obtains that the current temperature of the mobile phone detected by the temperature sensor is 43° C., the application framework layer determines to adjust the screen brightness.
[0194] Step 520: The application framework layer determines a target coefficient corresponding to the current temperature based on a plurality of pre-stored temperature values and the brightness discount coefficient corresponding to each temperature value.
[0195] Step 530: The application framework layer sends a target coefficient corresponding to the current temperature to the kernel layer. Correspondingly, the kernel layer receives the target coefficient sent by the application framework layer.
[0196] The target coefficient refers to the brightness discount coefficient corresponding to the current temperature of the mobile phone. For example, when the current temperature of the mobile phone is 42°C, the application framework layer can determine that the target coefficient corresponding to the current temperature is 0.9 based on the correspondence between the temperature and the brightness discount coefficient in Table 1 above. For another example, when the current temperature of the mobile phone is 44°C, the application framework layer can determine that the target coefficient corresponding to the current temperature is 0.8 based on the correspondence between the temperature and the brightness discount coefficient in Table 1 above.
[0197] In the embodiment of the present application, when the application framework layer determines to adjust the screen brightness, the application framework layer determines the target coefficient corresponding to the current temperature of the mobile phone based on the pre-stored multiple temperature values and the brightness discount coefficients corresponding to each temperature value, and then sends the target coefficient to the kernel layer. For example, the application framework layer determines that the target coefficient corresponding to the current temperature of the mobile phone of 42°C is 0.9, and the application framework layer sends the target coefficient 0.9 to the kernel layer.
[0198] Step 540: The kernel layer determines a target backlight value according to the current backlight value and the target coefficient.
[0199] The target backlight value refers to the backlight value finally reached after adjusting the screen brightness of the mobile phone.
[0200] In the embodiment of the present application, the kernel layer can calculate the target backlight value according to the current backlight value of the mobile phone screen and the target coefficient. For example, assuming that the current backlight value of the mobile phone screen obtained by the kernel layer is 200 and the target coefficient is 0.9, the kernel layer calculates the target backlight value as 200*0.9=180 according to the current backlight value and the target coefficient.
[0201] Step 550: The kernel layer uses a slow-down strategy to adjust the brightness of the screen until the screen brightness value reaches the target backlight value.
[0202] Among them, the slow-down strategy means that after the kernel layer determines the target backlight value, the backlight value used to adjust the screen brightness is sent to the LCD driver in a gradually decreasing manner, so that the LCD driver gradually reduces the screen brightness according to the received multiple backlight values.
[0203] In the embodiment of the present application, after the kernel layer determines the target backlight value according to the current backlight value and the target coefficient of the screen, the kernel layer can use a slow-down strategy to sequentially send multiple backlight values to the LCD driver until the target backlight value is sent to the LCD driver. Each time the LCD driver receives the backlight value sent by the kernel layer, it adjusts the brightness of the screen according to the received backlight value, thereby achieving the purpose of reducing device power consumption and device temperature by gradually reducing the screen brightness, and also avoiding the situation where the screen brightness suddenly changes and affects user use.
[0204] In an embodiment of the present application, after the kernel layer determines multiple first backlight values according to the current backlight value, the target backlight value and the first preset value, the kernel layer sends the multiple first backlight values to the LCD driver in descending order until the target backlight value is sent to the LCD driver. Each time the LCD driver receives the first backlight value sent by the kernel layer, it adjusts the brightness of the screen according to the received first backlight value. Exemplarily, assuming that the current backlight value of the mobile phone screen obtained by the kernel layer is 200, the target backlight value is 180, and the first preset value is 1, the kernel layer determines multiple first backlight values as [199, 198, 197, ..., 182, 181, 180], and the kernel layer can use a step-by-step method to send the backlight value to the LCD driver. For example, the kernel layer sends the following multiple first backlight values [199, 198, 197, ..., 182, 181, 180] to the LCD driver in sequence. Each time the LCD driver receives a first backlight value sent by the kernel layer, the LCD driver adjusts the brightness of the mobile phone screen to the first backlight value until the LCD driver receives the target backlight value sent by the kernel layer, and then the LCD driver adjusts the brightness of the mobile phone screen to the target backlight value.
[0205] In an embodiment of the present application, after the LCD driver adjusts the screen brightness of the mobile phone to the target backlight value, the application framework layer can continue to obtain the current temperature of the mobile phone detected by the temperature sensor, and the application framework layer determines that the current temperature of the mobile phone obtained again is the first temperature.
[0206] In one possible case, if the application framework layer determines that the first temperature is less than the first temperature threshold, the process of adjusting the screen brightness of the mobile phone is stopped. For example, assuming that the first temperature threshold is 40°C, if the current temperature of the mobile phone obtained by the application framework layer again is 37°C, the process of adjusting the screen brightness of the mobile phone is stopped.
[0207] In another possible case, if the application framework layer determines that the first temperature is still greater than or equal to the first temperature threshold, the mobile phone continues to execute the above-mentioned implementation process of steps 520 to 540 until the current temperature of the mobile phone obtained by the application framework layer is less than the first temperature threshold, and the mobile phone stops executing the above-mentioned process of adjusting the screen brightness of the mobile phone.
[0208] For example, assuming that the first temperature threshold is 40°C, if the current temperature of the mobile phone obtained by the application framework layer for the first time is 44°C, the application framework layer determines the target coefficient corresponding to the current temperature as 0.9 based on the pre-stored multiple temperature values and the brightness discount coefficients corresponding to each temperature value, and the application framework layer sends the target coefficient to the kernel layer. After the kernel layer determines the target backlight value based on the current backlight value and the target coefficient, it uses a slow-down strategy to adjust the brightness of the screen until the screen brightness value reaches the target backlight value. Then, the application framework layer obtains the current temperature of the mobile phone again. If the current temperature of the mobile phone obtained by the application framework layer again is 42°C, the application framework layer determines the first coefficient corresponding to the current temperature as 0.8 based on the pre-stored multiple temperature values and the brightness discount coefficients corresponding to each temperature value, and the application framework layer sends the target coefficient to the kernel layer. After the kernel layer determines the first target backlight value based on the current backlight value and the first coefficient, it uses a slow-down strategy to adjust the brightness of the screen until the screen brightness value reaches the first target backlight value, so as to reduce the temperature of the mobile phone until the current temperature of the mobile phone obtained by the application framework layer is less than the first temperature threshold.
[0209] It can be understood that during the operation of the mobile phone, the application framework layer can obtain the current temperature of the mobile phone detected by the temperature sensor in real time. When the current temperature of the mobile phone obtained by the application framework layer is greater than or equal to the first temperature threshold, the application framework layer triggers the execution of the above steps 510 to 550 until the current temperature of the mobile phone obtained by the application framework layer is less than the first temperature threshold, and the mobile phone stops executing the above process of adjusting the screen brightness of the mobile phone.
[0210] Depend on Figure 5 As can be seen from the above description, the mobile phone controls the temperature of the mobile phone by adjusting the screen brightness. After the application framework layer of the mobile phone sends the target coefficient to the kernel layer, the kernel layer executes the entire process of adjusting the brightness of the screen. It can be seen that the application framework layer only sends the target coefficient to the kernel layer once, and the system only generates one uevent event, which reduces the number of interactions between the application framework layer and the kernel layer, avoids the generation of a large number of uevent events, and not only reduces the energy consumption of the mobile phone, but also improves the performance of the mobile phone.
[0211] In an embodiment of the present application, when the system of the mobile phone is started, a brightness discount coefficient node is newly added in the kernel layer. For the sake of ease of description, the newly added brightness discount coefficient node in the kernel layer will be referred to as the first node later. When the temperature control management module in the application framework layer of the mobile phone determines that the current temperature of the mobile phone has reached the first temperature threshold, the temperature control management module determines to adjust the screen brightness of the mobile phone. The temperature control management module sends the brightness discount coefficient corresponding to the current temperature to the first node in the kernel layer. After the first node receives the brightness discount coefficient corresponding to the current temperature sent by the temperature control management module, the first node can determine the target backlight value based on the current backlight value of the mobile phone screen and the brightness discount coefficient. Then, the first node uses a slow-down strategy to send backlight values to the LCD driver in sequence, so that the LCD driver adjusts the screen brightness of the mobile phone according to the received backlight value until the backlight value of the screen brightness reaches the target backlight value. The following is combined with Figure 6 The above process is introduced in detail. Figure 6 A schematic diagram of a temperature control method provided in an embodiment of the present application Figure 2 .
[0212] like Figure 6 As shown, the method may include the following steps:
[0213] Step 610: The temperature control management module of the application framework layer of the mobile phone determines that the current temperature of the mobile phone reaches a first temperature threshold, and determines to adjust the screen brightness.
[0214] In an embodiment of the present application, the temperature control management module of the application framework layer determines that the current temperature of the mobile phone reaches the minimum temperature threshold, and determines the implementation process of adjusting the screen brightness. The implementation process of step 510 above can be referred to and will not be repeated here.
[0215] Step 620: The temperature control management module determines a target coefficient corresponding to the current temperature according to the multiple temperature values and the brightness discount coefficients corresponding to the temperature values.
[0216] Step 630: The temperature control management module sends a target coefficient corresponding to the current temperature to the first node. Correspondingly, the first node receives the target coefficient sent by the temperature control management module.
[0217] When the system of the mobile phone is started for the first time, the kernel layer can generate a first node. For example, the first node generated by the kernel layer executing the code "DEVICE_ATTR_RW(BL_SCALE_PERCENT)" is BL_SCALE_PERCENT. The first node BL_SCALE_PERCENT is used to perform the process of adjusting the screen brightness.
[0218] When the temperature control management module of the application framework layer determines that the current temperature of the mobile phone has reached the first temperature threshold, the temperature control management module determines the target coefficient corresponding to the current temperature of the mobile phone based on the pre-stored multiple temperature values and the brightness discount coefficients corresponding to each temperature value, and then sends the target coefficient to the first node. After the first node receives the target coefficient sent by the temperature control management module, the first node performs the process of adjusting the screen brightness. Here, the implementation process of the temperature control management module determining the target coefficient corresponding to the current temperature of the mobile phone can be referred to the implementation process in the above step 530, which will not be repeated here.
[0219] That is to say, during the entire process of adjusting the screen brightness of the mobile phone, after the temperature control management module of the application framework layer of the mobile phone sends the target coefficient to the first node of the kernel layer once, the first node of the kernel layer executes the subsequent process of adjusting the screen brightness, and the first node no longer interacts with the application framework layer when adjusting the screen brightness, thereby reducing the number of interactions between the upper and bottom layers of the mobile phone.
[0220] Step 640: The first node triggers the analytical function to calculate the target backlight value based on the current backlight value and the target coefficient.
[0221] In an embodiment of the present application, the behavior of the temperature control management module sending the target coefficient to the first node triggers the reading function to execute a process of calculating the target backlight value based on the current backlight value and the target coefficient after parsing the target coefficient from the first node.
[0222] For example, Figure 7 Example of determining the target backlight value for the first node of the kernel layer provided in the embodiment of the present application Figure 1 ,like Figure 7 As shown, after the temperature control management module writes the target coefficient into the first node, the read function is triggered to read the character string corresponding to the target coefficient from the first node. Then, the parsing function parses the character string read by the read function to obtain the target coefficient. The parsing function parses the current backlight value of the mobile phone obtained, obtains the current backlight value of the mobile phone and stores it, and then the parsing function sends the current backlight value and the target coefficient to the brightness function, and the brightness function calculates the target backlight value based on the current backlight value and the target coefficient.
[0223] Assume that the first node is BL_SCALE_PERCENT, the reading function is BL_SCALE_PERCENT_SHOW, the parsing function is BL_SCALE_PERCENT_STORE, and the brightness function is backlight_device_set_brightness. BL_SCALE_PERCENT_SHOW returns a string from BL_SCALE_PERCENT in the manner of reading and writing files to read and obtain the string corresponding to the target coefficient. BL_SCALE_PERCENT_STORE parses the string corresponding to the target coefficient to obtain the target coefficient. Then, BL_SCALE_PERCENT_STORE parses the current backlight value of the mobile phone obtained, obtains the current backlight value of the mobile phone and stores it, and then BL_SCALE_PERCENT_STORE sends the current backlight value to backlight_device_set_brightness, and backlight_device_set_brightness calculates the target backlight value based on the current backlight value and the target coefficient.
[0224] Step 650: The first node sends the plurality of first backlight values to the LCD driver in sequence until the target backlight value is sent. Accordingly, the LCD driver receives the plurality of first backlight values sent by the first node in sequence.
[0225] Step 660: The LCD driver adjusts the screen brightness according to the first backlight value.
[0226] In an embodiment of the present application, after the first node determines the target backlight value for adjusting the screen brightness, the first node sends multiple first backlight values to the LCD driver in sequence until the target backlight value is sent to the LCD driver. Each time the LCD driver receives the first backlight value sent by the kernel layer, it adjusts the brightness of the screen according to the received first backlight value. For example, after the first node determines the target backlight value, the first node sends backlight value 1 and backlight value 2 to the LCD driver in sequence until the target backlight value is sent to the LCD driver. The LCD driver adjusts the screen brightness of the mobile phone according to each first backlight value received.
[0227] In the embodiment of the present application, after the first node of the kernel layer determines multiple first backlight values according to the current backlight value, the target backlight value and the first preset value, the first node sends the multiple first backlight values to the LCD driver in descending order until the target backlight value is sent to the LCD driver. Each time the LCD driver receives the first backlight value sent by the first node, it adjusts the brightness of the screen according to the received first backlight value.
[0228] Exemplarily, assuming that the current backlight value of the mobile phone screen obtained by the first node is 200, the target backlight value is 180, the first preset value is 1, and the first node determines multiple first backlight values as [199, 198, 197, ..., 182, 181, 180]. The first node can use a step-by-step method to send multiple first backlight values to the LCD driver. For example, the first node sends the following multiple first backlight values [199, 198, 197, ..., 182, 181, 180] to the LCD driver in sequence. After the LCD driver receives each first backlight value sent by the first node, the LCD driver adjusts the brightness of the mobile phone screen to the first backlight value until the LCD driver receives the target backlight value sent by the first node, and the LCD driver adjusts the brightness of the mobile phone screen to the target backlight value.
[0229] Depend on Figure 6 As can be seen from the above description, during the entire process of the mobile phone controlling the temperature of the mobile phone by adjusting the screen brightness, after the temperature control management module of the application framework layer sends the target coefficient to the first node of the kernel layer, the first node of the kernel layer executes the entire process of adjusting the brightness of the screen. It can be seen that the temperature control management module sends the target coefficient to the first node once, and the system only generates one uevent event, which reduces the number of interactions between the application framework layer and the kernel layer, avoids the generation of a large number of uevent events, and not only reduces the energy consumption of the mobile phone, but also improves the performance of the mobile phone.
[0230] In an embodiment of the present application, after the first node achieves the purpose of lowering the temperature of the mobile phone by adjusting the screen brightness to the target backlight value, the temperature control management module of the application framework layer continues to obtain the current temperature of the mobile phone detected by the temperature sensor. When the temperature control management module determines that the current temperature of the mobile phone is lower than the first temperature threshold, and the current backlight value of the mobile phone screen obtained by the first node is the target backlight value, the first node can restore the screen brightness to the backlight value before the brightness adjustment, thereby avoiding the situation where the screen brightness of the mobile phone is too low and affects the application usage experience.
[0231] Exemplarily, assume that the temperature control management module determines that the current backlight value of the mobile phone is 180, the temperature control management module determines that the backlight value is the backlight value after the screen brightness is adjusted, the temperature control management module determines that the backlight value of the mobile phone screen before the brightness adjustment is 200, and the temperature control management module determines that the brightness discount coefficient for increasing the screen brightness is 200 / 180. The temperature control management module sends the brightness discount coefficient to the first node, and the first node determines the target backlight value to be 180*200 / 180=200 based on the brightness discount coefficient and the current backlight value of the mobile phone. The first node sends multiple backlight values to the LCD driver in sequence until the target backlight value is sent to the LCD driver. The first node sends the following backlight values [181, 182, 183, ..., 198, 199, 200] to the LCD driver in sequence. Each time the LCD driver receives a backlight value sent by the first node, the LCD driver adjusts the brightness of the mobile phone screen to the backlight value. After the LCD driver receives the backlight value 200 sent by the first node, the LCD driver adjusts the brightness of the mobile phone screen to the backlight value 200.
[0232] In the embodiment of the present application, when the mobile phone system is started, the application framework layer of the mobile phone can send different temperature values and corresponding brightness discount coefficients to the kernel layer, and the kernel layer performs the process of adjusting the screen brightness of the mobile phone. Figure 8 The above process is introduced in detail. Figure 8 A schematic diagram of a temperature control method provided in an embodiment of the present application Figure 3 .
[0233] like Figure 8 As shown, the method may include the following steps:
[0234] Step 810: When the mobile phone system is started, the application framework layer sends thermal control parameters to the kernel layer; correspondingly, the kernel layer receives the thermal control parameters sent by the application framework layer.
[0235] The thermal control parameters include but are not limited to a plurality of temperature values and brightness discount coefficients corresponding to each temperature value.
[0236] In the embodiment of the present application, when the mobile phone is turned on and the system is started, the application framework layer can send multiple temperature values and the brightness discount coefficients corresponding to each temperature value to the kernel layer. After the kernel layer receives the different temperature values and the corresponding brightness discount coefficients sent by the application framework layer, the different temperature values and the brightness discount coefficients corresponding to each temperature value are stored.
[0237] For example, if the temperature is 40℃, the corresponding brightness discount coefficient is 0.9; if the temperature is 42℃, the corresponding brightness discount coefficient is 0.8. The application framework layer can send values (40, 0.9; 42, 0.8) to the kernel layer. After the kernel layer receives the values (40, 0.9; 42, 0.8) sent by the application framework layer, it can store the received values.
[0238] For example, assuming that when the temperature value is greater than or equal to 40°C and less than or equal to 42°C, the corresponding brightness discount coefficient is 0.9; when the temperature value is greater than 42°C and less than or equal to 45°C, the corresponding brightness discount coefficient is 0.8. The application framework layer can send values ([40, 42], 0.9; (42, 45], 0.8) to the kernel layer. After receiving the different temperature value intervals and corresponding brightness discount coefficients sent by the application framework layer, the kernel layer stores the received values.
[0239] Step 820: The kernel layer determines that the current temperature of the mobile phone reaches a second temperature threshold.
[0240] Step 830: The kernel layer determines a target coefficient corresponding to the current temperature according to the multiple temperature values and the brightness discount coefficients corresponding to the temperature values.
[0241] In an embodiment of the present application, the kernel layer can obtain the current temperature of the mobile phone detected by the temperature sensor in real time. When the kernel layer determines that the current temperature of the mobile phone reaches the second temperature threshold, the kernel layer can determine the target coefficient corresponding to the current temperature based on the pre-stored different temperature values and the brightness discount coefficients corresponding to each temperature value.
[0242] For example, the temperature sensor detected by the kernel layer indicates that the current temperature of the mobile phone is 40°C. The kernel layer can determine that the target coefficient corresponding to the current temperature is 0.9 based on the pre-stored temperature value and the corresponding brightness discount coefficient (40, 0.9; 42, 0.8), or based on the pre-stored temperature value range and the corresponding brightness discount coefficient ([40, 42], 0.9; (42, 45], 0.8).
[0243] For example, the temperature sensor detected by the kernel layer indicates that the current temperature of the mobile phone is 43°C. The kernel layer can determine that the target coefficient corresponding to the current temperature is 0.8 based on the pre-stored temperature value and the corresponding brightness discount coefficient ([40, 42], 0.9; (42, 45], 0.8).
[0244] Step 840: The kernel layer calculates the target backlight value according to the current backlight value and the target coefficient.
[0245] In the embodiment of the present application, when the kernel layer determines to adjust the screen brightness, the kernel layer can obtain the current backlight value of the mobile phone screen. Then, the kernel layer calculates the target backlight value according to the current backlight value and the target coefficient.
[0246] For example, assuming that the current backlight value of the mobile phone screen obtained by the kernel layer is 200 and the target coefficient is 0.8, the kernel layer calculates the target backlight value as 200*0.8=160 based on the current backlight value and the target coefficient.
[0247] Step 850: The kernel layer uses a slow-down strategy to adjust the brightness of the screen until the screen brightness value reaches the target backlight value.
[0248] In the embodiment of the present application, the process of the kernel layer using the slow-down strategy to adjust the brightness of the screen in step 850 can refer to the implementation process of the above-mentioned step 550, which will not be repeated here.
[0249] In an embodiment of the present application, after the LCD driver adjusts the brightness of the mobile phone screen to the target backlight value, the kernel layer can continue to obtain the current temperature of the mobile phone detected by the temperature sensor.
[0250] In one possible case, if the current temperature of the mobile phone obtained by the kernel layer again is less than the second temperature threshold, the kernel layer stops executing the above process of adjusting the screen brightness of the mobile phone. For example, assuming that the second temperature threshold is 40°C, if the current temperature of the mobile phone obtained by the kernel layer again is 37°C, the process of adjusting the screen brightness of the mobile phone is stopped.
[0251] In another possible case, if the current temperature of the mobile phone obtained by the kernel layer again is still greater than or equal to the second temperature threshold, the kernel layer continues to execute the implementation process of steps 830 to 850 until the current temperature of the mobile phone obtained by the kernel layer is less than the second temperature threshold, and stops executing the above process of adjusting the screen brightness of the mobile phone.
[0252] For example, assuming that the second temperature threshold is 40°C, if the current temperature of the mobile phone obtained by the kernel layer for the first time is 44°C, the kernel layer determines that the target coefficient corresponding to the current temperature is 0.9 according to the pre-stored multiple temperature values and the brightness discount coefficients corresponding to each temperature value. After the kernel layer determines the target backlight value according to the current backlight value and the target coefficient, it uses a slow-down strategy to adjust the brightness of the screen until the screen brightness value reaches the target backlight value. Then, the kernel layer obtains the current temperature of the mobile phone again. If the current temperature of the mobile phone obtained by the kernel layer again is 42°C, the kernel layer determines that the second coefficient corresponding to the current temperature is 0.8 according to the pre-stored multiple temperature values and the brightness discount coefficients corresponding to each temperature value. After the kernel layer determines the second target backlight value according to the current backlight value and the second coefficient, it uses a slow-down strategy to adjust the brightness of the screen until the screen brightness value reaches the second target backlight value, so as to reduce the temperature of the mobile phone until the current temperature of the mobile phone obtained by the kernel layer is less than the second temperature threshold.
[0253] It can be understood that during the operation of the mobile phone, the kernel layer can obtain the current temperature of the mobile phone detected by the temperature sensor in real time. When the current temperature of the mobile phone obtained by the kernel layer is greater than or equal to the second temperature threshold, the kernel layer executes the above-mentioned implementation process of steps 830 to 850 until the current temperature of the mobile phone obtained by the kernel layer is less than the second temperature threshold, and the kernel layer stops executing the above-mentioned process of adjusting the screen brightness of the mobile phone.
[0254] Depend on Figure 8 As can be seen from the above explanation, when the mobile phone system starts, the application framework layer sends different temperature values and corresponding brightness discount coefficients to the kernel layer. When the kernel layer determines that the current temperature of the mobile phone reaches the second temperature threshold, the kernel layer directly controls the screen brightness without interacting with the application framework layer, avoiding the generation of a large number of uevent events, reducing the load of the mobile phone, reducing the energy consumption of the mobile phone, and thus improving the performance of the mobile phone.
[0255] In the embodiment of the present application, when the system of the mobile phone is started, the temperature control management module in the application framework layer of the mobile phone sends different temperature values and corresponding brightness discount coefficients to the first node newly added in the kernel layer, and the first node performs the process of adjusting the screen brightness of the mobile phone. Fig. 9 The above process is introduced in detail. Fig. 9 A schematic diagram of a temperature control method provided in an embodiment of the present application Figure 4 .
[0256] like Fig. 9 As shown, the method may include the following steps:
[0257] Step 910: When the mobile phone system starts, the temperature control management module of the application framework layer sends the temperature control parameters to the first node of the kernel layer. Correspondingly, the first node receives the temperature control parameters sent by the temperature control management module.
[0258] The thermal control parameters include but are not limited to a plurality of temperature values and brightness discount coefficients corresponding to each temperature value.
[0259] In an embodiment of the present application, when the mobile phone is turned on and the system starts, the temperature control management module of the application framework layer sends multiple temperature values and the brightness discount coefficients corresponding to each temperature value to the first node of the kernel layer. After the first node receives each temperature value and the corresponding brightness discount coefficient sent by the application framework layer, it stores each temperature value and the corresponding brightness discount coefficient. For example, the first node can store multiple temperature values and the brightness discount coefficients corresponding to each temperature value in a partition of the memory.
[0260] For example, assume that the format of the thermal control parameters sent by the temperature control management module to the first node is (temperature value, brightness discount coefficient, temperature value, brightness discount coefficient, 0, 0). When the temperature value is 40°C, the corresponding brightness discount coefficient is 0.9; when the temperature value is 42°C, the corresponding brightness discount coefficient is 0.8. In other words, the thermal control parameters sent by the temperature control management module to the first node are as follows: (40, 0.9; 42, 0.8). After the first node receives the thermal control parameters (40, 0.9; 42, 0.8) sent by the temperature control management module, it can store the received values.
[0261] For another example, assume that the format of the thermal control parameters sent by the temperature control management module to the first node is ([first temperature value, second temperature value], brightness discount coefficient; (second temperature value, third temperature value]), brightness discount coefficient). When the temperature value is greater than or equal to 40°C and less than or equal to 42°C, the corresponding brightness discount coefficient is 0.9; when the temperature value is greater than 42°C and less than or equal to 45°C, the corresponding brightness discount coefficient is 0.8. In other words, the thermal control parameters sent by the temperature control management module to the first node are as follows: ([40, 42], 0.9; (42, 45], 0.8). After the first node receives the different temperature value intervals and the corresponding brightness discount coefficients sent by the temperature control management module, it stores the received thermal control parameters.
[0262] It can be understood that after the first node stores multiple temperature values and the brightness discount coefficients corresponding to each temperature value in the bottom layer, the bottom layer does not need to interact with the upper layer during the process of controlling the screen brightness. This solves the problem in the related technology that the bottom layer interacts with the upper layer too many times, generates a large number of uevent events, causes the mobile phone to be overloaded, and reduces the power consumption of the mobile phone.
[0263] Step 920: The first node of the kernel layer triggers the parsing function to execute the parsing process and registers the callback function.
[0264] In an embodiment of the present application, after receiving the thermal control parameters, the first node triggers the parsing function to parse the thermal control parameters to obtain multiple temperature values included in the thermal control parameters and the brightness discount coefficient corresponding to each temperature value.
[0265] In addition, the first node registers a callback function (for example, the callback function is cb_backlight) with the thermal sensor. The callback function is used to calculate the target backlight value according to the brightness discount coefficient corresponding to the temperature threshold and the current backlight value of the mobile phone when the current temperature of the mobile phone reaches a certain temperature threshold.
[0266] Step 930: The first node of the kernel layer determines that the current temperature reaches a second temperature threshold, and determines to adjust the screen brightness.
[0267] In an embodiment of the present application, the first node can obtain the current temperature of the mobile phone detected by the temperature sensor in real time. When the current temperature of the mobile phone obtained by the first node reaches the second temperature threshold, the first node determines to adjust the screen brightness of the mobile phone.
[0268] For example, the temperature values pre-stored in the first node are 40° C., 42° C., and 45° C. Assuming that the current temperature of the mobile phone detected by the temperature sensor acquired by the first node is 42° C., the first node determines to adjust the screen brightness of the mobile phone.
[0269] Step 940: The callback function calculates the target coefficient according to the current temperature and the brightness discount coefficients corresponding to different temperature values.
[0270] In an embodiment of the present application, when the first node determines that the current temperature of the mobile phone reaches the second temperature threshold, the callback function determines the target coefficient based on the current temperature and the brightness discount coefficients corresponding to different temperature values.
[0271] For example, assuming that the temperature values and the corresponding brightness discount coefficients are as follows: ([40, 42], 0.9; (42, 45], 0.8), when the first node determines that the current temperature of the mobile phone is 42°C, the callback function determines that the target coefficient corresponding to the current temperature of the mobile phone is 0.9 based on the temperature values and the corresponding brightness discount coefficients.
[0272] Step 950: The callback function calculates the target backlight value according to the current backlight value and the target coefficient.
[0273] In an embodiment of the present application, after the callback function determines the target coefficient corresponding to the current temperature of the mobile phone, the callback function obtains the current backlight value of the mobile phone screen to calculate the target backlight value based on the current backlight value and the target coefficient.
[0274] For example, the current backlight value of the mobile phone screen obtained by the callback function is 200, and the target coefficient determined by the callback function is 0.9. The callback function calculates the target backlight value as 200*0.9=180 based on the current backlight value and the target coefficient.
[0275] For example, Fig.10 Example of determining a target backlight value for a first node provided in an embodiment of the present application Figure 2 ,like Fig.10 As shown,
[0276] Assume that the first node is BL_SCALE_PERCENT, the reading function is BL_SCALE_PERCENT_SHOW, the parsing function is BL_SCALE_PERCENT_STORE, and the brightness function is backlight_device_set_brightness. Assume that the temperature control management module sends multiple temperature values and the brightness discount coefficients corresponding to each temperature value to BL_SCALE_PERCENT in the format of (temperature value, brightness discount coefficient, temperature value, brightness discount coefficient, 0, 0). After BL_SCALE_PERCENT receives each temperature value and the corresponding brightness discount coefficient, BL_SCALE_PERCENT triggers BL_SCALE_PERCENT_SHOW to execute the string returned from BL_SCALE_PERCENT in the manner of reading and writing files, so as to read and obtain the strings corresponding to the multiple temperature values and the brightness discount coefficients corresponding to each temperature value. The parsing function BL_SCALE_PERCENT_STORE parses the character strings corresponding to the multiple temperature values and the brightness discount coefficients corresponding to the respective temperature values, obtains the multiple temperature values and the brightness discount coefficients corresponding to the respective temperature values, and then stores the multiple temperature values and the brightness discount coefficients corresponding to the respective temperature values.
[0277] When the first node determines that the current temperature of the mobile phone reaches the second temperature threshold, the callback function cb_backlight determines the target coefficient corresponding to the current temperature from multiple pre-stored temperature values and the brightness discount coefficients corresponding to each temperature value. Then, the callback function cb_backlight calculates the target backlight value based on the current backlight value of the mobile phone screen and the target coefficient.
[0278] Step 960: The first node sends the plurality of second backlight values to the LCD driver in sequence until the target backlight value is sent. Accordingly, the LCD driver receives the plurality of second backlight values sent by the first node in sequence.
[0279] Step 970: The LCD driver adjusts the screen brightness according to the second backlight value.
[0280] In the embodiment of the present application, the implementation process of the above-mentioned steps 960 and 970 can refer to the implementation process of the above-mentioned steps 650 and 660, which will not be repeated here.
[0281] In an embodiment of the present application, after the LCD driver adjusts the screen brightness of the mobile phone to the target backlight value, the first node can continue to obtain the current temperature of the mobile phone detected by the temperature sensor. If the current temperature of the mobile phone obtained by the first node is less than the second temperature threshold, the above process of adjusting the screen brightness of the mobile phone is stopped. If the current temperature of the mobile phone obtained by the first node is still greater than or equal to the second temperature threshold, the mobile phone continues to execute the above-mentioned implementation process of steps 930 to 970 until the current temperature of the mobile phone obtained by the first node is less than the second temperature threshold, and the mobile phone stops executing the above process of adjusting the screen brightness of the mobile phone.
[0282] As can be seen from the above, after the temperature control management module in the application framework layer sends different temperature values and corresponding brightness discount coefficients to the newly added first node in the kernel layer, when the first node determines that the current temperature of the mobile phone reaches the second temperature threshold, the first node executes the entire process of adjusting the screen brightness, so as to achieve the purpose of lowering the temperature of the mobile phone by adjusting the screen brightness of the mobile phone. Since in the entire process of regulating the temperature of the mobile phone, the upper layer and the lower layer of the mobile phone interact only once, the mobile phone executes the process of adjusting the screen brightness using a slow-down strategy at the bottom layer, which not only solves the problem that the application framework layer of the mobile phone in the related technology sends multiple backlight values used to adjust the screen brightness to the kernel layer, resulting in too many interactions between the application framework layer and the kernel layer, and multiple uevent events are reported, resulting in increased power consumption and load of the mobile phone, thereby reducing the number of interactions between the application framework layer and the kernel layer, avoiding the generation of a large number of uevent events, not only reducing the energy consumption of the mobile phone, but also improving the performance of the mobile phone.
[0283] In an embodiment of the present application, after the first node achieves the purpose of lowering the temperature of the mobile phone by adjusting the screen brightness to the target backlight value, the first node continues to obtain the current temperature of the mobile phone detected by the temperature sensor. When the first node determines that the current temperature of the mobile phone is lower than the second temperature threshold, and the current backlight value of the mobile phone screen obtained by the first node is the target backlight value, the first node can restore the screen brightness to the backlight value before the brightness adjustment, thereby avoiding the situation where the screen brightness of the mobile phone is too low, affecting the application usage experience.
[0284] Exemplarily, it is assumed that the first node determines that the current backlight value of the mobile phone is 180, the first node determines that the backlight value is the backlight value after the screen brightness is adjusted, the first node determines that the backlight value of the mobile phone screen before the brightness adjustment is 200, and the first node determines that the brightness discount coefficient for increasing the screen brightness is 200 / 180. The first node determines the target backlight value to be 180*200 / 180=200 based on the brightness discount coefficient and the current backlight value of the mobile phone. The first node sends multiple backlight values to the LCD driver in sequence until the target backlight value is sent to the LCD driver. The first node sends the following backlight values [181, 182, 183, ..., 198, 199, 200] to the LCD driver in sequence. After the LCD driver receives a backlight value sent by the first node, the LCD driver adjusts the brightness of the mobile phone screen to the backlight value until the LCD driver receives the backlight value 200 sent by the first node, and then the LCD driver adjusts the brightness of the mobile phone screen to the backlight value 200.
[0285] like Fig.11 As shown, an embodiment of the present application discloses an electronic device, which may be the mobile phone mentioned above. The electronic device may specifically include: a touch screen 1101, wherein the touch screen 1101 includes a touch sensor 1106 and a display screen 1107; one or more processors 1102; a memory 1103; one or more application programs (not shown); and one or more computer programs 1104, and the above-mentioned components may be connected via one or more communication buses 1105. Among them, the above-mentioned one or more computer programs 1104 are stored in the above-mentioned memory 1103 and are configured to be executed by the one or more processors 1102, and the one or more computer programs 1104 include instructions, which may be used to execute the relevant steps in the above-mentioned embodiment.
[0286] It is understandable that, in order to realize the above functions, the above-mentioned electronic devices, etc. include hardware structures and / or software modules 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 each example described in the embodiments disclosed herein, the embodiments 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 embodiments of the present invention.
[0287] The embodiment of the present application can divide the functional modules of the above-mentioned electronic device etc. 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 invention is schematic and is only a logical function division. There may be other division methods in actual implementation.
[0288] In the case of dividing each functional module according to each function, a possible composition diagram of the electronic device involved in the above embodiment, the electronic device may include: a display unit, a transmission unit and a processing unit, etc. It should be noted that all relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module, and will not be repeated here.
[0289] The embodiment of the present application also provides an electronic device, including one or more processors and one or more memories. The one or more memories are coupled to the one or more processors, and the one or more memories are used to store computer program codes, and the computer program codes include computer instructions. When the one or more processors execute the computer instructions, the electronic device executes the above-mentioned related method steps to implement the temperature control method in the above-mentioned embodiment.
[0290] An embodiment of the present application further provides a computer-readable storage medium, in which computer instructions are stored. When the computer instructions are executed on an electronic device, the electronic device executes the above-mentioned related method steps to implement the temperature control method in the above-mentioned embodiment.
[0291] An embodiment of the present application further provides a computer program product, which includes computer instructions. When the computer instructions are executed on an electronic device, the electronic device executes the above-mentioned related method steps to implement the temperature control method in the above-mentioned embodiment.
[0292] In addition, an embodiment of the present application also provides a device, which may specifically be a chip, a component or a module, and the device may include a connected processor and a memory; wherein the memory is used to store computer-executable instructions, and when the device is running, the processor may execute the computer-executable instructions stored in the memory so that the device executes the temperature control method executed by the electronic device in the above-mentioned method embodiments.
[0293] Among them, the electronic device, computer-readable storage medium, computer program product or device provided in this embodiment is used to execute the corresponding method provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method provided above, and will not be repeated here.
[0294] Through the description of the above implementation methods, technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. The specific working process of the system, device and unit described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0295] Each functional unit in each embodiment of the present application can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of software functional units.
[0296] 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 computer-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, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) or a 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: various media that can store program codes, such as flash memory, mobile hard disk, read-only memory, random access memory, disk or optical disk.
[0297] The above is only a specific implementation 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 should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A temperature control method for an electronic device, characterized in that: The electronic device comprises an application framework layer and a kernel layer, the kernel layer comprises a first node, and the method comprises: When the application framework layer determines that the current temperature is greater than or equal to the first temperature threshold, the application framework layer sends a target coefficient corresponding to the current temperature to the first node of the kernel layer, wherein the application framework layer pre-stores a plurality of temperature values and brightness discount coefficients corresponding to the temperature values, and the target coefficient is the brightness discount coefficient corresponding to the current temperature; After the first node of the kernel layer obtains the current backlight value of the screen, it determines the target backlight value according to the current backlight value and the target coefficient; The first node of the kernel layer adjusts the backlight value of the screen to the target backlight value to adjust the current temperature.
2. The method according to claim 1, characterized in that The first node of the kernel layer adjusts the backlight value of the screen to the target backlight value, including: The first node of the kernel layer determines a plurality of first backlight values according to the current backlight value, the target backlight value and a first preset value; The first node of the kernel layer adjusts the backlight value of the screen according to each of the first backlight values in descending order until the backlight value of the screen reaches the target backlight value.
3. The method according to claim 2, characterized in that The first node of the kernel layer determines a plurality of first backlight values according to the current backlight value, the target backlight value and a first preset value, including: The first node of the core layer determines the plurality of first backlight values having equal differences according to the current backlight value, the target backlight value and the first preset value.
4. The method according to claim 2 or 3, characterized in that: The core layer includes an LCD driver, and the first node of the core layer adjusts the backlight value of the screen according to each of the first backlight values in descending order until the backlight value of the screen reaches the target backlight value, including: The first node of the kernel layer sends each of the first backlight values to the LCD driver in order from large to small, and the LCD driver adjusts the backlight value of the screen to the first backlight value until the LCD driver adjusts the backlight value of the screen to the target backlight value.
5. The method according to any one of claims 1 to 4, characterized in that: After the first node of the kernel layer adjusts the backlight value of the screen to the target backlight value, the method further includes: The application framework layer determines that the current temperature is a first temperature; If the application framework layer determines that the first temperature is greater than or equal to the first temperature threshold, the application framework layer sends the first coefficient corresponding to the first temperature to the first node of the kernel layer. After the first node of the kernel layer obtains the current backlight value of the screen, it determines a first target backlight value based on the current backlight value and the first coefficient. The first node of the kernel layer adjusts the backlight value of the screen to the first target backlight value to adjust the current temperature.
6. The method according to any one of claims 1 to 4, characterized in that: After the first node of the kernel layer adjusts the backlight value of the screen to the target backlight value, the method further includes: The application framework layer determines that the current temperature is a first temperature; The application framework layer determines that the first temperature is less than the first temperature threshold.
7. The method according to any one of claims 1 to 6, characterized in that: After the application framework layer sends the target coefficient corresponding to the current temperature to the first node of the kernel layer, the method further includes: The first node calls a read function to read a character string corresponding to the target coefficient from the first node; The first node calls a parsing function to parse the character string corresponding to the target coefficient to obtain the target coefficient.
8. The method according to any one of claims 1 to 7, characterized in that: The step of determining a target backlight value according to the current backlight value and the target coefficient includes: The first node calls a parsing function to parse the character string of the current backlight value read by the reading function to obtain the current backlight value; The first node calls the analytical function to send the current backlight value and the target coefficient to the brightness function; The first node calls the brightness function to calculate the target backlight value according to the current backlight value and the target coefficient.
9. A temperature control method for an electronic device, characterized in that: The electronic device comprises an application framework layer and a kernel layer, and the method comprises: In response to a startup operation of the electronic device, the application framework layer sends a thermal control parameter to the kernel layer, the thermal control parameter including a plurality of temperature values and a brightness discount coefficient corresponding to each temperature value; When the kernel layer determines that the current temperature of the electronic device is greater than or equal to a second temperature threshold, the kernel layer determines a target coefficient corresponding to the current temperature according to the multiple temperature values and the brightness discount coefficients corresponding to the temperature values; The kernel layer determines the target backlight value according to the current backlight value of the screen and the target coefficient; The kernel layer adjusts the backlight value of the screen to the target backlight value to adjust the current temperature.
10. The method according to claim 9, characterized in that The kernel layer includes a first node, and the kernel layer adjusts the backlight value of the screen to the target backlight value, including: The first node of the kernel layer determines a plurality of second backlight values according to the current backlight value, the target backlight value and a second preset value; The first node of the kernel layer adjusts the backlight value of the screen according to each of the second backlight values in descending order until the backlight value of the screen reaches the target backlight value.
11. The method according to claim 9, characterized in that The first node of the kernel layer determines a plurality of second backlight values according to the current backlight value, the target backlight value and a second preset value, including: The first node of the core layer determines the plurality of second backlight values having equal differences according to the current backlight value, the target backlight value and the second preset value.
12. The method according to any one of claims 9 to 11, characterized in that: After the kernel layer adjusts the backlight value of the screen to the target backlight value, the method further includes: If the kernel layer determines that the current temperature is greater than or equal to the second temperature threshold, the kernel layer determines the second coefficient corresponding to the current temperature based on the multiple temperature values and the brightness discount coefficients corresponding to each temperature value, the kernel layer determines the second target backlight value based on the current backlight value of the screen and the second coefficient, and the kernel layer adjusts the backlight value of the screen to the second target backlight value.
13. The method according to any one of claims 9 to 11, characterized in that: After the kernel layer adjusts the backlight value of the screen to the target backlight value, the method further includes: The core layer determines that the current temperature is less than a second temperature threshold.
14. The method according to any one of claims 9 to 13, characterized in that: The kernel layer includes a first node, and after the application framework layer sends the thermal control parameter to the kernel layer, the method further includes: The first node calls a read function to read a character string corresponding to the thermal control parameter from the first node; The first node calls a parsing function to parse the character string corresponding to the thermal control parameter to obtain the multiple temperature values and the brightness discount coefficient corresponding to each temperature value.
15. The method according to any one of claims 9 to 13, characterized in that: The kernel layer includes a first node, and the kernel layer determines a target coefficient corresponding to the current temperature, including: When the first node determines that the current temperature is greater than or equal to the second temperature threshold, the first node calls a callback function to determine the target coefficient corresponding to the current temperature; The kernel layer determines the target backlight value according to the current backlight value of the screen and the target coefficient, including: The first node calls the callback function to calculate the target backlight value according to the current backlight value and the target coefficient.
16. An electronic device, characterized in that: include: Display screen; one or more processors; Memory; Wherein, 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 electronic device, the electronic device executes the temperature control method as described in any one of claims 1-8, or executes the temperature control method as described in any one of claims 9-15.
17. A computer-readable storage medium, wherein instructions are stored in the computer-readable storage medium, characterized in that: When the instruction is executed on an electronic device, the electronic device executes the temperature control method according to any one of claims 1 to 8, or executes the temperature control method according to any one of claims 9 to 15.
