Temperature control method, temperature control apparatus, and storage medium
A temperature control method is provided. In the method, a terminal determines a current temperature of the terminal and determines, based on a preset corresponding relationship between a screen display frame rate and a temperature interval, a target temperature interval of the current temperature of the terminal in the preset corresponding relationship. The terminal may determine a target screen display frame rate corresponding to the target temperature interval. And the terminal may adjust a current screen display frame rate of the terminal to the target screen display frame rate, to control the temperature of the terminal to be within a preset temperature range.
1. A temperature control method, comprising:
determining, by a terminal, a current temperature of the terminal;
determining, by the terminal based on a preset corresponding relationship between a screen display frame rate and a temperature interval, a target temperature interval of the current temperature of the terminal in the preset corresponding relationship, and determining a target screen display frame rate corresponding to the target temperature interval;
obtaining a frame rate configuration file sent by a cloud server, the frame rate configuration file being used to indicate the preset corresponding relationship between the screen display frame rate and the temperature interval; and
adjusting, by the terminal, a current screen display frame rate of the terminal to the target screen display frame rate, to control the temperature of the terminal to be within a preset temperature range.
2. The temperature control method according to claim 1 , wherein the preset corresponding relationship between the screen display frame rate and the temperature interval comprises:
a corresponding relationship between a first temperature interval and a first screen display frame rate;
a corresponding relationship between a second temperature interval and a second screen display frame rate; or
a corresponding relationship between each temperature sub-interval among a plurality of consecutive temperature sub-intervals comprised in a third temperature interval and a third screen display frame rate;
wherein the upper temperature limit of the first temperature interval is a first temperature threshold, the lower temperature limit of the second temperature interval is a second temperature threshold, and the third temperature interval takes the first temperature threshold as a lower limit and the second temperature threshold as an upper limit; and
wherein the second temperature threshold is greater than the first temperature threshold, the second screen display frame rate is less than the first screen display frame rate, and the third screen display frame rate is between the first screen display frame rate and the second screen display frame rate.
3. The temperature control method according to claim 2 , wherein adjusting the current screen display frame rate of the terminal to the target screen display frame rate comprises:
in response to the current temperature of the terminal is less than the first temperature threshold, determining a hardware refresh rate corresponding to the target screen display frame rate; and
performing screen fresh based on the hardware refresh rate to adjust the current screen display frame rate to the target screen display frame rate.
4. The temperature control method according to claim 2 , wherein adjusting the current screen display frame rate of the terminal to the target screen display frame rate comprises:
in response to the current temperature of the terminal is greater than the first temperature threshold, determining a time interval for the terminal to read the screen display content of a buffer twice adjacently; and
reading the screen display content of the buffer based on the determined time interval to adjust the current screen display frame rate to the target screen display frame rate.
5. The temperature control method according to claim 4 , wherein determining the time interval for the terminal to read the screen display content of the buffer twice adjacently comprises:
in response to a duration after the terminal previously adjusts the target screen display frame rate reaches a preset time threshold, and it is determined that the time interval for reading the screen display content of the buffer twice adjacently reaches a first preset duration, determining the first preset duration as the time interval for reading the screen display content of the buffer twice adjacently; or
in response to the duration after the terminal previously adjusts the target screen display frame rate reaches the preset time threshold, and it is determined that the time interval for reading the screen display content of the buffer twice adjacently does not reach the first preset duration, determining the time interval after the time interval is extended by a second preset duration as the time interval for reading the screen display content of the buffer twice adjacently;
wherein the second preset duration is a duration difference between the first preset duration and the time interval for reading the screen display content of the buffer twice adjacently.
6. A temperature control apparatus, comprising:
at least one processor; and
a memory for storing processor executable instructions;
wherein, the at least one processor is configured to execute a temperature control method, the method comprising:
determining a current temperature of the terminal;
determining, based on a preset corresponding relationship between a screen display frame rate and a temperature interval, a target temperature interval of the current temperature of the terminal in the preset corresponding relationship, and determining a target screen display frame rate corresponding to the target temperature interval;
obtaining a frame rate configuration file sent by a cloud server, the frame rate configuration file being used to indicate the preset corresponding relationship between the screen display frame rate and the temperature interval; and
adjusting a current screen display frame rate of the terminal to the target screen display frame rate, to control the temperature of the terminal to be within a preset temperature range.
7. The temperature control apparatus according to claim 6 , wherein the preset corresponding relationship between the screen display frame rate and the temperature interval comprises:
a corresponding relationship between a first temperature interval and a first screen display frame rate;
a corresponding relationship between a second temperature interval and a second screen display frame rate; or
a corresponding relationship between each temperature sub-interval among a plurality of consecutive temperature sub-intervals comprised in a third temperature interval and a third screen display frame rate;
wherein the upper temperature limit of the first temperature interval is a first temperature threshold, the lower temperature limit of the second temperature interval is a second temperature threshold, and the third temperature interval takes the first temperature threshold as a lower limit and the second temperature threshold as an upper limit; and
wherein the second temperature threshold is greater than the first temperature threshold, the second screen display frame rate is less than the first screen display frame rate, and the third screen display frame rate is between the first screen display frame rate and the second screen display frame rate.
8. The temperature control apparatus according to claim 7 , wherein adjusting the current screen display frame rate of the terminal to the target screen display frame rate comprises:
in response to the current temperature of the terminal is less than the first temperature threshold, determining a hardware refresh rate corresponding to the target screen display frame rate; and
performing screen fresh based on the hardware refresh rate to adjust the current screen display frame rate to the target screen display frame rate.
9. The temperature control apparatus according to claim 7 , wherein adjusting the current screen display frame rate of the terminal to the target screen display frame rate comprises:
in response to the current temperature of the terminal is greater than the first temperature threshold, determining a time interval for the terminal to read the screen display content of a buffer twice adjacently; and
reading the screen display content of the buffer based on the determined time interval to adjust the current screen display frame rate to the target screen display frame rate.
10. The temperature control apparatus according to claim 9 , wherein determining the time interval for the terminal to read the screen display content of the buffer twice adjacently comprises:
in response to a duration after the terminal previously adjusts the target screen display frame rate reaches a preset time threshold, and it is determined that the time interval for reading the screen display content of the buffer twice adjacently reaches a first preset duration, determining the first preset duration as the time interval for reading the screen display content of the buffer twice adjacently; or
in response to the duration after the terminal previously adjusts the target screen display frame rate reaches the preset time threshold, and it is determined that the time interval for reading the screen display content of the buffer twice adjacently does not reach the first preset duration, determining the time interval after the time interval is extended by a second preset duration as the time interval for reading the screen display content of the buffer twice adjacently;
wherein the second preset duration is a duration difference between the first preset duration and the time interval for reading the screen display content of the buffer twice adjacently.
11. A non-temporary computer-readable storage medium, wherein instructions are stored in the storage medium, and when the instructions in the storage medium are executed by at least one processor of a terminal, the terminal performs a temperature control method, the method comprising:
determining a current temperature of the terminal;
determining, based on a preset corresponding relationship between a screen display frame rate and a temperature interval, a target temperature interval of the current temperature of the terminal in the preset corresponding relationship, and determining a target screen display frame rate corresponding to the target temperature interval;
obtaining a frame rate configuration file sent by a cloud server, the frame rate configuration file being used to indicate the preset corresponding relationship between the screen display frame rate and the temperature interval; and
adjusting a current screen display frame rate of the terminal to the target screen display frame rate, to control the temperature of the terminal to be within a preset temperature range.
12. The non-temporary computer-readable storage medium according to claim 11 , wherein the preset corresponding relationship between the screen display frame rate and the temperature interval comprises:
a corresponding relationship between a first temperature interval and a first screen display frame rate;
a corresponding relationship between a second temperature interval and a second screen display frame rate; or
a corresponding relationship between each temperature sub-interval among a plurality of consecutive temperature sub-intervals comprised in a third temperature interval and a third screen display frame rate;
wherein the upper temperature limit of the first temperature interval is a first temperature threshold, the lower temperature limit of the second temperature interval is a second temperature threshold, and the third temperature interval takes the first temperature threshold as a lower limit and the second temperature threshold as an upper limit; and
wherein the second temperature threshold is greater than the first temperature threshold, the second screen display frame rate is less than the first screen display frame rate, and the third screen display frame rate is between the first screen display frame rate and the second screen display frame rate.
13. The non-temporary computer-readable storage medium according to claim 12 , wherein adjusting the current screen display frame rate of the terminal to the target screen display frame rate comprises:
in response to the current temperature of the terminal is less than the first temperature threshold, determining a hardware refresh rate corresponding to the target screen display frame rate; and
performing screen fresh based on the hardware refresh rate to adjust the current screen display frame rate to the target screen display frame rate.
14. The non-temporary computer-readable storage medium according to claim 12 , wherein adjusting the current screen display frame rate of the terminal to the target screen display frame rate comprises:
in response to the current temperature of the terminal is greater than the first temperature threshold, determining a time interval for the terminal to read the screen display content of a buffer twice adjacently; and
reading the screen display content of the buffer based on the determined time interval to adjust the current screen display frame rate to the target screen display frame rate.
15. The non-temporary computer-readable storage medium according to claim 14 , wherein determining the time interval for the terminal to read the screen display content of the buffer twice adjacently comprises:
in response to a duration after the terminal previously adjusts the target screen display frame rate reaches a preset time threshold, and it is determined that the time interval for reading the screen display content of the buffer twice adjacently reaches a first preset duration, determining the first preset duration as the time interval for reading the screen display content of the buffer twice adjacently; or
in response to the duration after the terminal previously adjusts the target screen display frame rate reaches the preset time threshold, and it is determined that the time interval for reading the screen display content of the buffer twice adjacently does not reach the first preset duration, determining the time interval after the time interval is extended by a second preset duration as the time interval for reading the screen display content of the buffer twice adjacently;
wherein the second preset duration is a duration difference between the first preset duration and the time interval for reading the screen display content of the buffer twice adjacently.