Stable frame scheduling method, device, terminal equipment and computer-readable storage medium
By predicting the future temperature of the terminal device and adjusting the frame rate, it solves the problem of sudden frame rate drops in high-power gaming applications, improves user experience and optimizes device temperature management.
Patent Information
- Application Number
- CN202310520291.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-09
- Publication Date
- 2024-10-11
- Estimated Expiration
- 2043-05-09
AI Technical Summary
When running high-power gaming applications in terminal devices, the temperature control frequency limiting and frame limiting strategies cause system performance to degrade and frame rates to plummet, affecting user experience.
By obtaining current and historical temperature data, it predicts the future temperature of the terminal device and adjusts the frame rate based on the predicted temperature to avoid sudden frame rate drops and frame drops.
It effectively avoids a cliff-like drop in frame rate, improves user experience, and optimizes the temperature management of terminal devices to prevent hardware damage.
Smart Images

Figure CN117714788B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of computer application technology, and in particular, relates to a stable frame scheduling method, device, terminal equipment and computer-readable storage medium. Background Art
[0002] With the widespread popularity and rapid development of terminal devices such as smartphones, the functions of terminal devices such as smartphones are becoming more and more complete. For example, users can run various types of game applications for entertainment through smartphones. When running large-scale game applications and other high-power applications in terminal devices, due to complex scenarios and frequent interactions, it brings huge challenges to resource scheduling and power consumption optimization. Especially in some high-power game applications, long-term operation will cause the terminal device temperature to be too high, resulting in low-temperature burns to users, and irreversible damage to system hardware (such as screens, batteries, motherboards, etc.).
[0003] In the related art, for some high-power gaming applications, a temperature control, frequency limiting and frame limiting strategy is usually used to prevent the terminal device from overheating. That is, when the temperature of the terminal device exceeds a certain limit, the frame rate and frequency of the gaming application are reduced to a certain level to reduce the temperature of the terminal device. However, as the gaming time continues to increase, this frame and frequency limiting strategy will not only cause a sharp decline in system performance, and fail to bring into play the full computing power of the system's central processor and graphics processor, but will also cause a sharp drop in frame rate, resulting in frame drops and freezes, which seriously affects the user experience. Summary of the invention
[0004] The embodiments of the present application provide a stable frame scheduling method, apparatus, terminal device and computer-readable storage medium, which can solve the problem of using a temperature control, frequency limiting and frame limiting strategy to prevent the terminal device from overheating, which not only causes a sharp decline in system performance and fails to exert the full computing power of the system's central processing unit and image processor, but also causes a sudden drop in frame rate, resulting in frame drops and freezes, seriously affecting the user experience.
[0005] In the first aspect, an embodiment of the present application provides a stable frame scheduling method, including: obtaining an expected frame rate and a current frame rate corresponding to a current application; obtaining a current temperature of a terminal device where the current application is located and historical temperatures at multiple historical moments, wherein a historical moment refers to a display moment of multiple historical data frames before a current data frame; determining a predicted temperature of the terminal device after a preset time period based on the expected frame rate, the current temperature, and each historical temperature; determining a frame rate adjustment strategy corresponding to the current application based on the predicted temperature; and adjusting the current frame rate based on the frame rate adjustment strategy.
[0006] In a possible implementation manner of the first aspect, determining the predicted temperature of the terminal device after a preset period of time according to the expected frame rate, the current temperature, and each historical temperature includes:
[0007] Determine the temperature rise rate corresponding to the terminal device based on the expected frame rate and each historical temperature;
[0008] Determine the predicted temperature based on the current temperature, temperature rise rate and preset duration.
[0009] Optionally, in another possible implementation of the first aspect, determining the temperature rise rate corresponding to the terminal device according to the expected frame rate and each historical temperature includes:
[0010] Determine a temperature control window corresponding to each historical moment, wherein each temperature control window includes a preset number of historical temperatures;
[0011] According to each historical temperature included in each temperature control window, determine the average historical temperature corresponding to each historical moment;
[0012] Determine the temperature control duration based on the number of historical moments and the expected frame rate;
[0013] Determine the temperature rise rate based on the average historical temperatures and temperature control duration.
[0014] Optionally, in another possible implementation of the first aspect, the current temperature includes a current system temperature and a current shell temperature, and the historical temperature includes a historical system temperature and a historical shell temperature; accordingly, determining the predicted temperature of the terminal device after a preset time period according to the expected frame rate, the current temperature, and each historical temperature includes:
[0015] Determine the predicted system temperature of the terminal device after a preset time period based on the expected frame rate, the current system temperature and various historical system temperatures;
[0016] Determine the predicted shell temperature of the terminal device after a preset time period based on the expected frame rate, the current shell temperature and each historical shell temperature;
[0017] Determine the predicted temperature based on the predicted system temperature and the predicted shell temperature.
[0018] Optionally, in yet another possible implementation of the first aspect, determining the frame rate adjustment strategy corresponding to the current application according to the predicted temperature includes:
[0019] When the predicted temperature is less than or equal to the first warning temperature, the frame rate adjustment strategy is determined to keep the current frame rate unchanged;
[0020] When the predicted temperature is greater than the first warning temperature, the frame rate adjustment strategy is determined to reduce the current frame rate.
[0021] Optionally, in yet another possible implementation of the first aspect, when the predicted temperature is greater than the first warning temperature, determining the frame rate adjustment strategy to reduce the current frame rate includes:
[0022] When the predicted temperature is greater than the first warning temperature and less than or equal to the second warning temperature, the frame rate adjustment strategy is determined to reduce the current frame rate by the first frame reduction amplitude, wherein the second warning temperature is greater than the first warning temperature;
[0023] When the predicted temperature is greater than the second warning temperature, the frame rate adjustment strategy is determined to reduce the current frame rate by a second frame reduction amplitude, wherein the second frame reduction amplitude is greater than the first frame reduction amplitude.
[0024] Optionally, in another possible implementation manner of the first aspect, the predicted temperature is determined by using a pre-trained frame stabilization decision model, and the pre-trained frame stabilization decision model also includes a mapping relationship between the pre-trained temperature and the frame rate adjustment strategy; accordingly, determining the frame rate adjustment strategy corresponding to the current application according to the predicted temperature includes:
[0025] According to the predicted temperature and the mapping relationship between the temperature and the frame rate adjustment strategy, the frame rate adjustment strategy corresponding to the predicted temperature is determined as the frame rate adjustment strategy.
[0026] Optionally, in another possible implementation of the first aspect, after determining the predicted temperature of the terminal device after a preset time period according to the expected frame rate, the current temperature, and each historical temperature, the method further includes:
[0027] Determine the frame rate tolerance adjustment strategy corresponding to the current application based on the predicted temperature;
[0028] According to the frame rate tolerance adjustment strategy, the current frame rate tolerance corresponding to the current application is adjusted.
[0029] Optionally, in yet another possible implementation of the first aspect, determining the frame rate tolerance adjustment strategy corresponding to the current application according to the predicted temperature includes:
[0030] When the predicted temperature is less than or equal to the safe temperature, the frame rate tolerance adjustment strategy is determined to reduce the current frame rate tolerance;
[0031] When the predicted temperature is greater than the safe temperature and less than or equal to the first warning temperature, the frame rate tolerance adjustment strategy is determined to keep the current frame rate tolerance unchanged;
[0032] When the predicted temperature is greater than the first warning temperature, the frame rate tolerance adjustment strategy is determined to increase the current frame rate tolerance.
[0033] Optionally, in another possible implementation manner of the first aspect, the predicted temperature is determined by using a pre-trained frame stabilization decision model, and the pre-trained frame stabilization decision model also includes a mapping relationship between the pre-trained temperature and the frame rate tolerance adjustment strategy; accordingly, determining the frame rate tolerance adjustment strategy corresponding to the current application according to the predicted temperature includes:
[0034] According to the predicted temperature and the mapping relationship between the temperature and the frame rate tolerance adjustment strategy, the frame rate tolerance adjustment strategy corresponding to the predicted temperature is determined as the frame rate tolerance adjustment strategy.
[0035] Optionally, in another possible implementation of the first aspect, after determining the predicted temperature of the terminal device after a preset time period according to the expected frame rate, the current temperature, and each historical temperature, the method further includes:
[0036] Determine the processor frequency adjustment strategy corresponding to the terminal device based on the predicted temperature;
[0037] According to the processor frequency adjustment strategy, the current processor frequency corresponding to the terminal device is adjusted.
[0038] Optionally, in another possible implementation of the first aspect, determining the processor frequency adjustment strategy corresponding to the terminal device according to the predicted temperature includes:
[0039] When the predicted temperature is less than or equal to the second warning temperature, the processor frequency adjustment strategy is determined to keep the current processor frequency unchanged;
[0040] When the predicted temperature is greater than the second warning temperature, the processor frequency adjustment strategy is determined to reduce the current processor frequency.
[0041] Optionally, in another possible implementation manner of the first aspect, the predicted temperature is determined using a pre-trained stable frame decision model, and the stable frame decision model also includes a mapping relationship between a pre-trained temperature and a processor frequency adjustment strategy; accordingly, determining the processor frequency adjustment strategy corresponding to the terminal device according to the predicted temperature includes:
[0042] According to the predicted temperature and the mapping relationship between the temperature and the processor frequency adjustment strategy, the processor frequency adjustment strategy corresponding to the predicted temperature is determined as the processor frequency adjustment strategy.
[0043] In the second aspect, an embodiment of the present application provides a stable frame scheduling device, including: a first acquisition module, used to obtain the expected frame rate and the current frame rate corresponding to the current application; a second acquisition module, used to obtain the current temperature of the terminal device where the current application is located and the historical temperatures at multiple historical moments, wherein the historical moment refers to the display moment of multiple historical data frames before the current data frame; a first determination module, used to determine the predicted temperature of the terminal device after a preset time period based on the expected frame rate, the current temperature and each historical temperature; a second determination module, used to determine the frame rate adjustment strategy corresponding to the current application based on the predicted temperature; a first adjustment module, used to adjust the current frame rate according to the frame rate adjustment strategy.
[0044] In a possible implementation manner of the second aspect, the first determining module includes:
[0045] A first determination unit, configured to determine a temperature rise rate corresponding to the terminal device according to an expected frame rate and each historical temperature;
[0046] The second determination unit is used to determine the predicted temperature according to the current temperature, the temperature rise rate and the preset time.
[0047] Optionally, in another possible implementation manner of the second aspect, the first determining unit is specifically configured to:
[0048] Determine a temperature control window corresponding to each historical moment, wherein each temperature control window includes a preset number of historical temperatures;
[0049] According to each historical temperature included in each temperature control window, determine the average historical temperature corresponding to each historical moment;
[0050] Determine the temperature control duration based on the number of historical moments and the expected frame rate;
[0051] Determine the temperature rise rate based on the average historical temperatures and temperature control duration.
[0052] Optionally, in another possible implementation of the second aspect, the current temperature includes a current system temperature and a current shell temperature, and the historical temperature includes a historical system temperature and a historical shell temperature; accordingly, the first determining module includes:
[0053] A third determination unit, configured to determine a predicted system temperature of the terminal device after a preset time period according to the expected frame rate, the current system temperature and each historical system temperature;
[0054] A fourth determination unit, configured to determine a predicted shell temperature of the terminal device after a preset time period according to an expected frame rate, a current shell temperature, and each historical shell temperature;
[0055] The fifth determining unit is used to determine the predicted temperature according to the predicted system temperature and the predicted shell temperature.
[0056] Optionally, in yet another possible implementation manner of the second aspect, the second determining module includes:
[0057] A sixth determining unit, configured to determine the frame rate adjustment strategy to keep the current frame rate unchanged when the predicted temperature is less than or equal to the first warning temperature;
[0058] The seventh determining unit is configured to determine the frame rate adjustment strategy to reduce the current frame rate when the predicted temperature is greater than the first warning temperature.
[0059] Optionally, in yet another possible implementation manner of the second aspect, the seventh determining unit is specifically configured to:
[0060] When the predicted temperature is greater than the first warning temperature and less than or equal to the second warning temperature, the frame rate adjustment strategy is determined to reduce the current frame rate by the first frame reduction amplitude, wherein the second warning temperature is greater than the first warning temperature;
[0061] When the predicted temperature is greater than the second warning temperature, the frame rate adjustment strategy is determined to reduce the current frame rate by a second frame reduction amplitude, wherein the second frame reduction amplitude is greater than the first frame reduction amplitude.
[0062] Optionally, in another possible implementation manner of the second aspect, the predicted temperature is determined by using a pre-trained frame stabilization decision model, and the pre-trained frame stabilization decision model also includes a mapping relationship between a pre-trained temperature and a frame rate adjustment strategy; accordingly, the second determination module includes:
[0063] The eighth determining unit is configured to determine, according to the predicted temperature and the mapping relationship between the temperature and the frame rate adjustment strategy, the frame rate adjustment strategy corresponding to the predicted temperature as the frame rate adjustment strategy.
[0064] Optionally, in another possible implementation of the second aspect, the apparatus further includes:
[0065] A third determination module is used to determine a frame rate tolerance adjustment strategy corresponding to the current application according to the predicted temperature;
[0066] The second adjustment module is used to adjust the current frame rate tolerance corresponding to the current application according to the frame rate tolerance adjustment strategy.
[0067] Optionally, in yet another possible implementation manner of the second aspect, the third determining module includes:
[0068] a ninth determining unit, configured to determine, when the predicted temperature is less than or equal to the safe temperature, a frame rate tolerance adjustment strategy to reduce a current frame rate tolerance;
[0069] a tenth determining unit, configured to determine, when the predicted temperature is greater than the safety temperature and less than or equal to the first warning temperature, a frame rate tolerance adjustment strategy to keep the current frame rate tolerance unchanged;
[0070] The eleventh determining unit is configured to determine the frame rate tolerance adjustment strategy to increase the current frame rate tolerance when the predicted temperature is greater than the first warning temperature.
[0071] Optionally, in yet another possible implementation manner of the second aspect, the predicted temperature is determined by using a pre-trained frame stabilization decision model, and the pre-trained frame stabilization decision model also includes a mapping relationship between a pre-trained temperature and a frame rate tolerance adjustment strategy; accordingly, the third determination module includes:
[0072] The twelfth determining unit is configured to determine the frame rate tolerance adjustment strategy corresponding to the predicted temperature as the frame rate tolerance adjustment strategy according to the predicted temperature and the mapping relationship between the temperature and the frame rate tolerance adjustment strategy.
[0073] Optionally, in another possible implementation of the second aspect, the apparatus further includes:
[0074] A fourth determination module, used to determine a processor frequency adjustment strategy corresponding to the terminal device according to the predicted temperature;
[0075] The third adjustment module is used to adjust the current processor frequency corresponding to the terminal device according to the processor frequency adjustment strategy.
[0076] Optionally, in yet another possible implementation of the second aspect, the fourth determining module includes:
[0077] A thirteenth determining unit, configured to determine the processor frequency adjustment strategy to keep the current processor frequency unchanged when the predicted temperature is less than or equal to the second warning temperature;
[0078] The fourteenth determining unit is configured to determine the processor frequency adjustment strategy to reduce the current processor frequency when the predicted temperature is greater than the second warning temperature.
[0079] Optionally, in yet another possible implementation manner of the second aspect, the predicted temperature is determined using a pre-trained frame stabilization decision model, and the pre-trained frame stabilization decision model also includes a mapping relationship between a pre-trained temperature and a processor frequency adjustment strategy; accordingly, the fourth determination module includes:
[0080] The fifteenth determining unit is used to determine the processor frequency adjustment policy corresponding to the predicted temperature as the processor frequency adjustment policy according to the predicted temperature and the mapping relationship between the temperature and the processor frequency adjustment policy.
[0081] In a third aspect, an embodiment of the present application provides a terminal device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the stable frame scheduling method as described above when executing the computer program.
[0082] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the stable frame scheduling method as described above.
[0083] In a fifth aspect, an embodiment of the present application provides a computer program product, which, when executed on a terminal device, enables the terminal device to execute the stable frame scheduling method as described above.
[0084] Compared with the prior art, the embodiments of the present application have the following beneficial effects: by predicting the temperature of the terminal device after a preset period of time based on multiple historical temperatures of the terminal device, the temperature condition of the terminal device is predicted in advance, and when it is predicted that the temperature may be too high, the frame rate of the application is slowly reduced in advance, thereby avoiding a cliff drop in the frame rate of the application, solving the problem of frame drops and stuttering caused by a sudden drop in the frame rate, and improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0085] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0086] Figure 1 It is a flowchart of a stable frame scheduling method provided by an embodiment of the present application;
[0087] Figure 2 is a flowchart of a stable frame scheduling method provided by another embodiment of the present application;
[0088] Figure 3 is a flowchart of a stable frame scheduling method provided by yet another embodiment of the present application;
[0089] Figure 4 is a flowchart of a stable frame scheduling method provided by another embodiment of the present application;
[0090] Figure 5 It is an architecture diagram of a stable frame scheduling method provided by an embodiment of the present application;
[0091] Figure 6 is a scheduling flow chart of a stable frame scheduling method provided by an embodiment of the present application;
[0092] Figure 7 It is a structural diagram of a stable frame scheduling device provided in an embodiment of the present application;
[0093] Figure 8 It is a schematic diagram of the structure of the terminal device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0094] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.
[0095] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.
[0096] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0097] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.
[0098] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.
[0099] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0100] The stable frame scheduling method, apparatus, terminal device, storage medium and computer program provided by the present application are described in detail below with reference to the accompanying drawings.
[0101] Figure 1 A flow chart of a stable frame scheduling method provided in an embodiment of the present application is shown.
[0102] like Figure 1 As shown, the stable frame scheduling method includes the following steps:
[0103] Step 101, obtaining the expected frame rate and current frame rate corresponding to the current application.
[0104] It should be noted that the stable frame scheduling method of the embodiment of the present application can be executed by the stable frame scheduling device of the embodiment of the present application. The stable frame scheduling device of the embodiment of the present application can be configured in any terminal device to execute the stable frame scheduling method of the embodiment of the present application. For example, the stable frame scheduling device of the embodiment of the present application can be configured in a terminal device such as a mobile phone, a computer, a wearable device, etc., to perform stable frame processing during the operation of the application.
[0105] The current application may refer to an application currently running in the foreground of the terminal device and requiring frame stabilization processing. For example, the current application may be a video application, a game application, or other application with high power consumption currently running in the foreground of the terminal device.
[0106] The expected frame rate may be the optimal frame rate that the current application expects to achieve. As an example, the expected frame rate may be the default optimal frame rate of the current application, or the highest frame rate supported by the terminal device where the current application is located; or, it may be the frame rate set by the user after starting the current application, which is not limited in the embodiments of the present application.
[0107] It should be noted that if the application allows the user to select the optimal frame rate expected to be achieved when starting the application, the expected frame rate can be determined as the frame rate set by the user, so that the frame rate of the application can be determined according to the user's needs when the terminal device's operating conditions allow during the application. In addition, if the frame rate set by the user is greater than the maximum frame rate supported by the terminal device, the maximum frame rate supported by the terminal device can be determined as the expected frame rate of the current application.
[0108] The current frame rate may refer to the frame rate of the current application at the current moment.
[0109] In an embodiment of the present application, the application currently running in the foreground of the terminal device can be determined as the current application, and after the current application is started, the optimal frame rate that the current application expects to achieve can be obtained and determined as the expected frame rate, and the frame rate of the current application at the current moment can be obtained and determined as the current frame rate.
[0110] As a possible implementation method, if the current application does not allow the user to set the expected frame rate by himself, the default optimal frame rate of the current application can be determined as the expected frame rate, or the highest frame rate supported by the terminal device where the current application is located can also be determined as the expected frame rate; if the current application allows the user to set the expected frame rate by himself, then after the current application is started, the expected frame rate setting dialog box can be displayed in the display interface after the current application is started, so that the user can select or enter the expected frame rate through the expected frame rate setting dialog box, and then the frame rate selected or entered by the user in the expected frame rate setting dialog box can be determined as the expected frame rate.
[0111] As a possible implementation method, in order to reduce the resource scheduling pressure of the terminal device while ensuring the application display effect, stable frame scheduling can be performed only for the applications installed in the terminal device that have high power consumption, complex scenarios, or high frame rate requirements. Therefore, a preset application list that needs to be stable frame scheduled can be generated based on the applications installed in the terminal device, and when the application currently running in the foreground of the terminal device is an application in the preset application list, the application is determined as the current application, and the stable frame scheduling method of the present application is used to perform stable frame scheduling on the application; if the application currently running in the foreground of the terminal device is not an application in the preset application list, the application may not be determined as the current application, that is, the stable frame scheduling method of the present application may not be used to perform stable frame scheduling on the application, so as to save the computing resources of the terminal device when it is not necessary.
[0112] As a possible implementation method, a preset application type that needs to be scheduled for stable frame can also be pre-set. Therefore, when the application type of the application currently running in the foreground of the terminal device is the preset application type, the application can be determined as the current application, and the stable frame scheduling method of the present application can be used to perform stable frame scheduling on the application; when the application type of the application currently running in the foreground of the terminal device is not the preset application type, the application may not be determined as the current application, that is, the stable frame scheduling method of the present application may not be used to perform stable frame scheduling on the application, so as to save computing resources of the terminal device when unnecessary.
[0113] As an example, a preset application list or preset application type can be set according to the power consumption of the applications installed in the terminal device. For example, applications with power consumption greater than or equal to the power consumption threshold can be added to the preset application list; or, the average power consumption of each type of application installed in the terminal device can be determined, and the application type with average power consumption greater than the power consumption threshold can be determined as the preset application type. For example, large-scale game applications, video applications, etc. can be determined as preset application types, or large-scale game applications, video applications, etc. installed in the terminal device can be added to the preset application list.
[0114] As an example, in order to make the stable frame scheduling effect of each application in the terminal device more in line with the user's personalized needs, it is also possible to run user-defined applications that require stable frame scheduling. Therefore, the user can be allowed to select the application that needs to be scheduled for stable frame in the setting menu of the terminal device, and the application selected by the user can be added to the preset application list; or, the user can be allowed to select the application type that needs to be scheduled for stable frame in the setting menu of the terminal device, and the application type selected by the user can be determined as the preset application type that needs to be scheduled for stable frame.
[0115] It should be noted that the above-listed methods for determining applications that require stable frame scheduling are only exemplary and cannot be regarded as limitations on this application. In actual use, the applications that require stable frame scheduling and their setting methods can be set according to actual needs and specific application scenarios, and this application embodiment does not limit this.
[0116] Step 102, obtaining the current temperature of the terminal device where the current application is located and the historical temperatures at multiple historical moments, wherein the historical moment refers to the display moment of multiple historical data frames before the current data frame.
[0117] The current temperature may refer to the temperature of the terminal device at the current moment.
[0118] The current data frame may refer to a data frame in the current application displayed by the terminal device at the current moment. It should be noted that the current moment in the embodiment of the present application is the display moment of the current data frame.
[0119] The historical data frames may refer to multiple data frames displayed before the current data frame and adjacent to the current data frame; correspondingly, the historical moments are multiple display moments before the current moment and adjacent to the current moment. For example, if the current data frame is the 101st data frame displayed after the current application is started, the historical data frames may be the 81st to 100th data frames, and the historical moments are the display moments of the 81st to 100th data frames.
[0120] It should be noted that in actual use, the number of historical temperatures collected can be set according to actual needs and specific application scenarios, and the present application embodiment does not limit this. For example, the historical temperatures of the terminal device at 20 or 50 historical moments can be collected, and so on.
[0121] In an embodiment of the present application, a temperature sensor can be configured in the terminal device to collect the temperature of the terminal device during operation, and the temperature collected by the temperature sensor at the current moment can be determined as the current temperature, and the temperature collected by the temperature sensor at each historical moment can be determined as each historical temperature.
[0122] Step 103, determining the predicted temperature of the terminal device after a preset time period according to the expected frame rate, the current temperature and various historical temperatures.
[0123] Among them, the predicted temperature may refer to the temperature that the terminal device may reach after a period of time, based on the current and previous historical operating conditions (historical temperature) of the terminal device. It should be noted that since the predicted temperature is the temperature that the terminal device may reach after a period of time, based on the current temperature and historical temperature of the terminal device, the predicted temperature can reflect the operating conditions of the terminal device after a period of time, so that the temperature of the terminal device can be predicted in time through the predicted temperature, so as to schedule the frame rate of the current application in advance, thereby ensuring the frame rate stability of the current application, and preventing the frame rate of the current application from being adjusted significantly after the terminal device temperature is too high, resulting in a sudden drop in the frame rate, so as to improve the operating stability and display effect of the current application.
[0124] The preset duration can be set according to actual needs and specific application scenarios, and the present application embodiment does not limit this. For example, the preset duration can be 1 minute (i.e., predicting the temperature of the terminal device 1 minute later), 2 minutes, 5 minutes, and so on.
[0125] In an embodiment of the present application, multiple historical temperatures of the terminal device can reflect the temperature changes of the terminal device in the time period between the earliest historical moment obtained and the current moment (hereinafter referred to as the current historical time period). Therefore, the temperature changes of the terminal device can be determined based on the multiple historical temperatures of the terminal device and the length of the current historical time period, and then the predicted temperature after the preset time length can be determined based on the preset time length and the temperature changes of the terminal device.
[0126] It should be noted that the earliest historical moment may refer to the earliest historical moment corresponding to each historical temperature obtained at the current moment. For example, if the current data frame is the 101st data frame displayed in the current application, and each historical data frame is the 81st to 100th data frame, then the earliest historical moment refers to the display moment of the 81st data frame, and the current historical period refers to the period between the display moment of the 81st data frame and the current moment (i.e., the display moment of the 101st data frame). In addition, when the method of the present application is used to perform stable frame scheduling on the current application, it can be determined whether the current frame rate of the current application needs to be adjusted when each data frame is displayed. Therefore, the actual frame rate of the current application at each historical moment in the current historical period may be constantly changing, and the current historical period is usually very short. Therefore, directly determining the length of the current historical period by the difference between the earliest historical moment and the current moment is usually not accurate enough. Therefore, the expected frame rate can be used instead of the frame rate of the current application in the current historical period, and the length of the current historical period is determined based on the ratio of the number of data frames included in the current historical period to the expected frame rate, so as to improve the accuracy of determining the temperature change of the terminal device, thereby improving the accuracy of the stable frame scheduling.
[0127] Furthermore, the temperature change of the terminal device can be represented by the temperature rise rate to quantify the temperature change of the terminal device, improve the accuracy of the predicted temperature determination, and further improve the reliability of the stable frame scheduling. That is, in a possible implementation of the embodiment of the present application, the above step 103 may include:
[0128] Determine the temperature rise rate corresponding to the terminal device based on the expected frame rate and each historical temperature;
[0129] Determine the predicted temperature based on the current temperature, temperature rise rate and preset duration.
[0130] As a possible implementation method, the number of historical temperatures obtained at the current moment can be determined as the number of temperatures n included in the current historical period. Assuming that the expected frame rate is fps, the duration of the current historical period can be n / fps. Afterwards, the ratio of the sum of each historical temperature to the duration of the current historical period can be determined as the temperature rise rate corresponding to the terminal device. That is, the temperature rise rate corresponding to the terminal device can be determined by formula (1):
[0131]
[0132] Where v is the temperature rise rate corresponding to the terminal equipment, t i is the historical temperature at the i-th historical moment, n is the number of temperatures included in the current historical period, i is the sequence number of the historical temperature, and fps is the expected frame rate.
[0133] As a possible implementation method, since the terminal device needs to achieve a high frame rate when performing animation or video display so that the human eye can feel that the picture is changing continuously, the time interval between the display moments of two adjacent data frames is usually very short, so that the historical temperature directly collected by the temperature sensor at each historical moment usually has a certain error and randomness. Therefore, for a historical moment, the temperature of the historical moment can be obtained by using the temperatures of multiple historical moments adjacent to the historical moment to ensure the reliability of the temperature rise rate determination. That is, in a possible implementation method of the embodiment of the present application, the above-mentioned determination of the temperature rise rate corresponding to the terminal device based on the expected frame rate and each historical temperature may include:
[0134] Determine a temperature control window corresponding to each historical moment, wherein each temperature control window includes a preset number of historical temperatures;
[0135] According to each historical temperature included in each temperature control window, determine the average historical temperature corresponding to each historical moment;
[0136] Determine the temperature control duration based on the number of historical moments and the expected frame rate;
[0137] Determine the temperature rise rate based on the average historical temperatures and temperature control duration.
[0138] The temperature control window may refer to an empty sequence with a preset length. In actual use, the specific value of the preset number (i.e., the length of the temperature control window) may be determined according to actual needs and specific application scenarios, and the present application embodiment does not limit this. For example, the preset number may be 3, 5, 10, and so on.
[0139] Among them, the temperature control window corresponding to the historical moment may refer to a sequence generated by filling the temperature control window with the historical temperature of the historical moment and the historical temperatures of multiple historical moments before and adjacent to the historical moment as elements of the temperature control window.
[0140] For example, assuming that the preset number is 5, that is, the length of the temperature control window is 5, and assuming that the historical moments include the display moments of the 81st to 100th data frames, where the historical temperature at the display moment of the 90th data frame is 32 degrees, and the historical temperatures at the display moments of the 89th, 88th, 87th, and 86th data frames are 32 degrees, 31.5 degrees, 32 degrees, and 32.1 degrees, respectively, then the temperature control window corresponding to the display moment of the 90th data frame is [32 32 31.5 32 32.1].
[0141] The average historical temperature corresponding to a historical moment may refer to the average value of each historical temperature included in the temperature control window corresponding to the historical moment.
[0142] In the embodiment of the present application, after determining the temperature control windows corresponding to n historical moments, the average values of the historical temperatures included in the n temperature control windows can be determined respectively, and used as the average historical temperatures corresponding to the n historical moments respectively. Then, the temperature control duration is determined based on the ratio of the number of historical moments to the expected frame rate, and then the ratio of the sum of the average historical temperatures to the temperature control duration is determined as the temperature rise rate corresponding to the terminal device. That is, the temperature rise rate corresponding to the terminal device can be determined by formula (2) and formula (3):
[0143]
[0144]
[0145] Where v is the temperature rise rate corresponding to the terminal equipment, avg(t i ) is the average historical temperature corresponding to the i-th historical moment, n is the number of historical moments included in the current historical period, i is the sequence number of the historical moment, fps is the expected frame rate, a is the preset number, t ij is the jth historical temperature in the temperature control window corresponding to the i-th historical moment.
[0146] In the embodiment of the present application, after determining the temperature rise rate corresponding to the terminal device, the predicted temperature of the terminal device after the preset time period can be determined according to the current temperature at the current moment, the temperature rise rate and the preset time period. As an example, the predicted temperature of the terminal device after the preset time period can be determined by formula (4):
[0147] t=t0+dur×v(4)
[0148] Among them, t is the predicted temperature of the terminal device after the preset time, t0 is the current temperature, dur is the preset time, and v is the temperature rise rate corresponding to the terminal device.
[0149] Furthermore, since the system temperature and shell temperature of the terminal device will affect the performance and user experience of the terminal device, when predicting the temperature of the terminal device, the system temperature and shell temperature of the terminal device can be predicted separately to further improve the reliability of stable frame scheduling. That is, in a possible implementation of the embodiment of the present application, the current temperature includes the current system temperature and the current shell temperature, and the historical temperature includes the historical system temperature and the historical shell temperature; accordingly, the step 103 may include:
[0150] Determine the predicted system temperature of the terminal device after a preset time period based on the expected frame rate, the current system temperature and various historical system temperatures;
[0151] Determine the predicted shell temperature of the terminal device after a preset time period based on the expected frame rate, the current shell temperature and each historical shell temperature;
[0152] Determine the predicted temperature based on the predicted system temperature and the predicted shell temperature.
[0153] Among them, the system temperature may include at least one of the temperatures of the core hardware of the terminal device, such as the central processing unit (CPU) temperature, the motherboard temperature, the graphics card temperature, the hard disk temperature, and the memory temperature; or, the system temperature may also be the overall temperature obtained by weighting one or more of the above core hardware temperatures.
[0154] For example, assuming that the system temperature is determined based on the CPU temperature and the motherboard temperature, as an example, the average value of the CPU temperature and the motherboard temperature collected at the same time can be determined as the system temperature at that moment; as another example, the weighted sum of the CPU temperature and the motherboard temperature collected at the same time can also be determined as the system temperature at that moment, wherein the weights corresponding to the CPU and motherboard temperatures can be determined according to actual needs, and the embodiments of the present application are not limited to this.
[0155] It should be noted that, in actual use, the temperature type of the core hardware used to determine the system temperature can be determined based on the actual components in the terminal device or the actual usage requirements, and the embodiments of the present application do not limit this. For example, in order to save computing power, the most important CPU temperature can be directly used as the system temperature; or, when the terminal device is a computer, since the computer has complete components and high computing power, the system temperature can be determined based on the CPU temperature, motherboard temperature, graphics card temperature, and hard disk temperature; when the terminal device is a mobile phone, since there may be no hard disk, graphics card and other components in the mobile phone, and the computing power of the mobile phone is relatively weak, the system temperature can be determined based on the CPU temperature and the motherboard temperature, or the CPU temperature can be directly determined as the system temperature, and so on.
[0156] The shell temperature may refer to the temperature of the shell of the terminal device.
[0157] The current system temperature may refer to the system temperature of the terminal device at the current moment; the current shell temperature may refer to the shell temperature of the terminal device at the current moment.
[0158] In the embodiment of the present application, a temperature sensor can be set at one or more core hardware such as the CPU, motherboard, hard disk, and graphics card of the terminal device, and a temperature sensor can be set at a suitable position near the shell of the terminal device to collect the temperature of these core hardware and the shell temperature of the terminal device in real time, and determine the system temperature and shell temperature of the terminal device at the display time of each data frame according to the temperature collected by each temperature sensor at the display time of each data frame of the current application, so as to determine the current system and current shell temperature of the terminal device, as well as the historical system temperature and historical shell temperature of the terminal device at multiple historical moments corresponding to the current moment. After that, the system temperature of the terminal device after a preset time can be predicted based on the expected frame rate, the current system temperature, that is, each historical system temperature, to obtain the predicted system temperature; and the shell temperature of the terminal device after a preset time can be predicted based on the expected frame rate, the current shell temperature, and each historical shell temperature, to obtain the predicted shell temperature. Furthermore, the predicted temperature of the terminal device after a preset time can be determined based on the predicted system temperature and the predicted shell temperature.
[0159] As an example, the average value of the predicted system temperature and the predicted shell temperature may be determined as the predicted temperature of the terminal device after a preset period of time.
[0160] As an example, different weights can be set for the predicted system temperature and the predicted shell temperature, respectively, and then the weighted sum of the predicted system temperature and the predicted shell temperature is determined as the predicted temperature of the terminal device after a preset time. That is, the predicted temperature of the terminal device after a preset time can be determined by formula (5):
[0161] t=λT s+(1-λ)T h (5)
[0162] Where t is the predicted temperature of the terminal device after a preset time, T s is the predicted system temperature of the terminal device after a preset time, T h is the predicted shell temperature of the terminal device after a preset time, and λ is the weight of the predicted system temperature.
[0163] It should be noted that in actual use, the specific value of λ can be determined according to actual needs and specific application scenarios, and the embodiments of the present application do not limit this. For example, when the terminal device is a mobile phone, the shell temperature usually directly affects the user experience, so the weight of the predicted shell temperature can be set to a larger value, such as λ can be set to 0.4, that is, the weight of the predicted shell temperature 1-λ is 0.6.
[0164] As a possible implementation method, when determining the predicted system temperature and the predicted shell temperature, the system temperature rise rate corresponding to the terminal device can be determined based on the expected frame rate and each historical system temperature, and the predicted system temperature can be determined based on the current system temperature, the system temperature rise rate and the preset duration; correspondingly, the shell temperature rise rate corresponding to the terminal device can be determined based on the expected frame rate and each historical shell temperature, and the predicted shell temperature can be determined based on the current shell temperature, the shell temperature rise rate and the preset duration.
[0165] It should be noted that the method for determining the system temperature rise rate and the shell temperature rise rate can be the same as the specific method for determining the temperature rise rate corresponding to the terminal device according to the expected frame rate and each historical temperature in the aforementioned embodiment, that is, the historical system temperature at each historical moment is substituted into formula (1), or into formulas (2) and (3), so as to determine the system temperature rise rate; and the historical shell temperature at each historical moment is substituted into formula (1), or into formulas (2) and (3), so as to determine the shell temperature rise rate; and the method for determining the predicted system temperature according to the system temperature rise rate and the method for determining the predicted shell temperature according to the shell temperature rise rate can also be the same as the method for determining the predicted temperature according to the current temperature, the temperature rise rate and the preset time in the aforementioned embodiment, that is, the current system temperature and the system temperature rise rate are substituted into formula (4), so as to determine the predicted system temperature; and the current shell temperature and the shell temperature rise rate are substituted into formula (4), so as to determine the predicted shell temperature. For other specific implementation processes and principles, please refer to the detailed description of the aforementioned embodiment, which will not be repeated here.
[0166] Step 104: Determine a frame rate adjustment strategy corresponding to the current application according to the predicted temperature.
[0167] In an embodiment of the present application, after determining the predicted temperature of the terminal device after a preset period of time, the operating status and temperature status of the terminal device in the future can be predicted in advance based on the predicted temperature, and then the frame rate adjustment strategy corresponding to the current application can be determined based on the predicted temperature, so as to intervene in the current frame rate of the current application in advance, prevent the frame rate of the current application from being adjusted after the temperature of the terminal device is too high, avoid a sudden drop in frame rate, and avoid a series of problems such as frame dropping, frame jamming, unstable operation, etc. caused by the sudden drop in frame rate.
[0168] As a possible implementation method, when the predicted temperature of the terminal device after a preset period of time is high, it means that if the terminal device continues to maintain the current frame rate, there may be a risk of overtemperature. Therefore, the current frame rate of the current application can be reduced, that is, the frame rate adjustment strategy can be determined to reduce the current frame rate to advance and slowly reduce the frame rate of the current application; when the predicted temperature of the terminal device after the preset period of time is low, it means that the terminal device is currently operating in good condition and there is no risk of overtemperature. Therefore, the current frame rate of the current application can be kept unchanged to ensure the display and operation smoothness of the application as much as possible while ensuring the operating stability of the terminal device.
[0169] It should be noted that in the embodiment of the present application, the frame reduction amplitude can be preset, so that when the frame rate adjustment strategy is to reduce the current frame rate, the current frame rate can be reduced by the preset frame reduction amplitude; and the preset frame reduction amplitude can be a smaller value, such as 1fps, 2fps, 3fps, etc., to achieve the purpose of slowly reducing the frame rate. For example, if the current frame rate is 90fps and the frame rate adjustment strategy is to reduce the current frame rate, the current frame rate can be adjusted to 89fps.
[0170] Furthermore, the reliability of stable frame scheduling can be further improved by setting a temperature threshold of the terminal device and using the temperature threshold as a standard to determine whether the terminal device has a risk of over-temperature. That is, in a possible implementation of the embodiment of the present application, the above step 104 may include:
[0171] When the predicted temperature is less than or equal to the first warning temperature, the frame rate adjustment strategy is determined to keep the current frame rate unchanged;
[0172] When the predicted temperature is greater than the first warning temperature, the frame rate adjustment strategy is determined to reduce the current frame rate.
[0173] The first warning temperature may refer to an upper limit of an acceptable temperature value that will not have a significant impact on the operating status of the terminal device; that is, when the temperature of the terminal device exceeds the first warning temperature, it may have some impact on the performance of the terminal device. In actual use, the value of the first warning temperature can be determined according to actual needs and specific application scenarios, and the embodiments of the present application do not limit this.
[0174] As a possible implementation method, if the predicted temperature is less than or equal to the first warning temperature, it means that the temperature of the terminal device will remain at a low level after the preset period of time, so that the frame rate adjustment strategy can be determined to keep the current frame rate unchanged to ensure the smoothness of the display and operation of the current application; if the predicted temperature is greater than the first warning temperature, it means that the temperature of the terminal device may rise to a higher level after the preset period of time, so that the frame rate adjustment strategy can be determined to reduce the current frame rate to slowly reduce the frame rate before the temperature of the terminal device is too high, so as to achieve the purpose of controlling the temperature of the terminal device while ensuring the smoothness and stability of the application display and operation.
[0175] Furthermore, when frame reduction processing is required, different frame reduction amplitudes can be used to reduce the frame rate according to the level of the predicted temperature of the terminal device, so that when the predicted temperature is not ideal, the frame can be reduced more quickly and smoothly to prevent the terminal device from overheating. That is, in a possible implementation of the embodiment of the present application, when the predicted temperature is greater than the first warning temperature, the frame rate adjustment strategy is determined to reduce the current frame rate, which may include:
[0176] When the predicted temperature is greater than the first warning temperature and less than or equal to the second warning temperature, the frame rate adjustment strategy is determined to reduce the current frame rate by the first frame reduction amplitude, wherein the second warning temperature is greater than the first warning temperature;
[0177] When the predicted temperature is greater than the second warning temperature, the frame rate adjustment strategy is determined to reduce the current frame rate by a second frame reduction amplitude, wherein the second frame reduction amplitude is greater than the first frame reduction amplitude.
[0178] The second warning temperature may refer to the lower limit of the temperature value that will have a significant impact on the operating status of the terminal device; that is, when the temperature of the terminal device exceeds the second warning temperature, the performance of the terminal device may be significantly reduced. In actual use, the specific value of the second warning temperature can be set according to actual needs and specific application scenarios, and the embodiments of the present application do not limit this.
[0179] The first frame reduction amplitude and the second frame reduction amplitude are usually both small values, and the specific values can be determined according to actual needs and specific application scenarios, and the embodiment of the present application does not limit this. For example, the first frame reduction amplitude is 1fps, the second frame reduction amplitude is 3fps, and so on.
[0180] As a possible implementation method, if the predicted temperature is greater than the first warning temperature and less than or equal to the second warning temperature, it means that the temperature of the terminal device after the preset time may be high but within an acceptable range, so that the frame rate can be slowly reduced with a smaller frame reduction amplitude, that is, the frame rate adjustment strategy can be determined to reduce the current frame rate with a smaller first frame reduction amplitude to further improve the stability when reducing the frame rate; if the predicted temperature is greater than the second warning temperature, it means that the temperature of the terminal device after the preset time may be too high, so that the frame rate can be reduced slightly faster with a larger frame reduction amplitude, that is, the frame rate adjustment strategy can be determined to reduce the current frame rate with a larger second frame reduction amplitude, so as to adjust the frame rate to a safe range as quickly as possible under the premise of slowly reducing the frame rate, so as to prevent the terminal device from being overheated and ensure the stability of the terminal device operation.
[0181] It should be noted that in actual use, more warning temperatures can be set to divide the predicted temperature into more and more detailed temperature ranges, and different temperature ranges can correspond to different frame reduction amplitudes, so as to schedule the application's frame rate in a more detailed and accurate manner, further improving the reliability and stability of stable frame scheduling.
[0182] Furthermore, a frame stabilization decision model can be pre-trained, and the frame stabilization decision model can be used to directly output the current frame rate adjustment strategy based on the current temperature and historical temperature of the terminal device, so as to further improve the reliability and stability of the frame stabilization scheduling, and further improve the display and operation fluency of the application. That is, in a possible implementation of the embodiment of the present application, the predicted temperature can be determined by using a pre-trained frame stabilization decision model, and the pre-trained mapping relationship between the temperature and the frame rate adjustment strategy can also be included in the pre-trained frame stabilization decision model; accordingly, the above step 104 can include:
[0183] According to the predicted temperature and the mapping relationship between the temperature and the frame rate adjustment strategy, the frame rate adjustment strategy corresponding to the predicted temperature is determined as the frame rate adjustment strategy.
[0184] As a possible implementation method, the calculation method of the predicted temperature in steps 101-103 of the embodiment of the present application can be used as a part of the algorithm in the stable frame decision model, so as to directly calculate the predicted temperature of the terminal device after the preset time length through the stable frame decision model. In the embodiment of the present application, a large amount of temperature data of a large number of terminal devices and the frame rate data of the current application can be obtained in advance, and the stable frame decision model can be trained until an accurate mapping relationship between temperature and frame rate adjustment strategy is generated, that is, the stable frame decision model can be used for stable frame scheduling. That is to say, in the embodiment of the present application, after the current temperature of the terminal device, the historical temperature at each historical moment, the preset time length and the expected frame rate, and the current frame rate can be input into the stable frame decision model, the stable frame decision model can calculate the predicted temperature of the terminal device after the preset time length according to these parameters, and then directly according to the predicted temperature and the mapping relationship between the pre-trained temperature and the frame rate adjustment strategy, the frame rate adjustment strategy corresponding to the predicted temperature can be directly determined as the current frame rate adjustment strategy and output, so that the terminal device can adjust the current frame rate according to the frame rate adjustment strategy output by the stable frame decision model.
[0185] It should be noted that the pre-trained mapping relationship between temperature and frame rate adjustment strategy in the embodiment of the present application may include a large number of mapping relationships between temperature and frame rate adjustment strategies, that is, each different temperature may correspond to a different frame rate adjustment strategy, thereby achieving a more refined and accurate stable frame scheduling effect, and further improving the reliability and stability of stable frame scheduling.
[0186] Step 105: adjust the current frame rate according to the frame rate adjustment strategy.
[0187] In the embodiment of the present application, after the current frame rate adjustment strategy is determined, the current frame rate of the current application can be adjusted according to the frame rate adjustment strategy.
[0188] As a possible implementation, if the frame rate adjustment strategy is to keep the current frame rate unchanged, the current frame rate can be kept unchanged; if the frame rate adjustment strategy is to reduce the current frame rate, the current frame rate can be reduced according to a preset frame reduction range.
[0189] As a possible implementation method, if the frame rate adjustment strategy is to reduce the current frame rate by a first frame reduction amplitude, the current frame rate can be reduced by the first frame reduction amplitude; if the frame rate adjustment strategy is to reduce the current frame rate by a second frame reduction amplitude, the current frame rate can be reduced by the second frame reduction amplitude.
[0190] The stable frame scheduling method provided in the embodiment of the present application predicts the temperature of the terminal device after a preset period of time based on multiple historical temperatures of the terminal device, so as to make an early judgment on the temperature condition of the terminal device, and slowly reduce the frame rate of the application in advance when it is predicted that the temperature may be too high, thereby avoiding a cliff drop in the frame rate of the application, solving the problem of frame drops and stuttering caused by a sudden drop in the frame rate, and improving the user experience.
[0191] In a possible implementation form of the present application, in order to ensure the stability of the frame rate and to make the frame rate of the application as optimal as possible when the operating conditions of the terminal device permit, the frame rate tolerance can be used to constrain the fluctuation range of the frame rate. Therefore, when scheduling the frame rate of the application, the frame rate tolerance can also be adjusted according to the real-time temperature conditions to further improve the stability and reliability of stable frame scheduling and further improve the user experience.
[0192] Combine the following Figure 2 , the stable frame scheduling method provided in the embodiment of the present application is further explained.
[0193] Figure 2 A flow chart of another stable frame scheduling method provided in an embodiment of the present application is shown.
[0194] like Figure 2 As shown, the stable frame scheduling method includes the following steps:
[0195] Step 201, obtaining the expected frame rate and current frame rate corresponding to the current application.
[0196] Step 202, obtaining the current temperature of the terminal device where the current application is located and the historical temperatures at multiple historical moments, wherein the historical moment refers to the display moment of multiple historical data frames before the current data frame.
[0197] Step 203, determining the predicted temperature of the terminal device after a preset time period according to the expected frame rate, the current temperature and various historical temperatures.
[0198] The specific implementation process and principle of the above steps 201-203 can be referred to the detailed description of the above embodiment, which will not be repeated here.
[0199] Step 204: Determine a frame rate tolerance adjustment strategy corresponding to the current application according to the predicted temperature.
[0200] The frame rate tolerance may refer to the extent to which the actual frame rate of the current application is allowed to deviate from the expected frame rate. It should be noted that the greater the frame rate tolerance, the greater the extent to which the actual frame rate of the current application is allowed to deviate from the expected frame rate; the smaller the frame rate tolerance, the smaller the extent to which the actual frame rate of the current application is allowed to deviate from the expected frame rate. It can be understood that the smaller the frame rate tolerance, the more stable the actual frame rate of the current application can be maintained.
[0201] For example, assuming the frame rate tolerance is 2fps and the expected frame rate is 90fps, when the actual frame rate of the current application is within the range of 88 to 92fps, it can be considered that the actual frame rate of the current application is normal; if the actual frame rate of the current application is not within the range of 88 to 92fps, it can be considered that the actual frame rate of the current application is abnormal.
[0202] As a possible implementation method, when the predicted temperature of the terminal device after a preset period of time is high, it means that if the terminal device continues to maintain the current frame rate, there may be a risk of overtemperature. Therefore, the current frame rate of the current application can be reduced, and the frame rate tolerance adjustment strategy can be determined to increase the current frame rate tolerance to prepare for the subsequent reduction of the current frame rate to prevent the frame rate tolerance from being too low and the current frame rate cannot be reduced. When the predicted temperature of the terminal device after the preset period of time is low, it means that the terminal device is currently operating in good condition and there is no risk of overtemperature. Therefore, the current frame rate of the current application can be kept unchanged, that is, there is no need to adjust the current frame rate at present, and the frame rate tolerance adjustment strategy can be determined to keep the current frame rate tolerance unchanged, or to reduce the current frame rate tolerance so that the frame rate of the application can be kept as stable as possible.
[0203] Furthermore, the reliability of stable frame scheduling can be further improved by setting a temperature threshold of the terminal device and using the temperature threshold as a standard to determine whether the terminal device has a risk of over-temperature. That is, in a possible implementation of the embodiment of the present application, the above step 204 may include:
[0204] When the predicted temperature is less than or equal to the safe temperature, the frame rate tolerance adjustment strategy is determined to reduce the current frame rate tolerance;
[0205] When the predicted temperature is greater than the safe temperature and less than or equal to the first warning temperature, the frame rate tolerance adjustment strategy is determined to keep the current frame rate tolerance unchanged;
[0206] When the predicted temperature is greater than the first warning temperature, the frame rate tolerance adjustment strategy is determined to increase the current frame rate tolerance.
[0207] The safety temperature may refer to the upper temperature limit that will not affect the performance of the terminal device. In other words, when the temperature of the terminal device is less than or equal to the safety temperature, the performance of the terminal device is in a relatively good state. In actual use, the specific value of the safety temperature can be set according to actual needs and specific application scenarios, and the embodiments of the present application do not limit this.
[0208] The first warning temperature in this embodiment may be the same as the first warning temperature in the aforementioned embodiment, which will not be described in detail here.
[0209] As a possible implementation method, if the predicted temperature is less than or equal to the safe temperature, it means that the temperature of the terminal device is still maintained at a good level after the preset time, and there is no need to adjust the current frame rate for a period of time. Therefore, the frame rate tolerance adjustment strategy can be determined to reduce the current frame rate tolerance, so that the frame rate of the current application is kept as stable as possible, further improving the frame rate stability; if the predicted temperature is greater than the safe stability and less than or equal to the first warning temperature, it means that although the temperature of the terminal device is maintained at a low level after the preset time, there may be a risk of excessive temperature in the future, that is, the current frame rate can be kept unchanged at present, but there may be a need to reduce the frame rate in a short time, so the frame rate tolerance adjustment strategy can be determined to maintain the current frame rate tolerance, so that the frame rate can be adjusted normally when the frame rate adjustment is needed; if the predicted temperature is greater than the first warning temperature, it means that the temperature of the terminal device may rise to a higher level after the preset time, that is, the current frame rate can be reduced at present, so as to slowly reduce the frame rate before the temperature of the terminal device is too high, therefore, the frame rate tolerance adjustment strategy can be determined to increase the current frame rate tolerance to ensure that the frame rate can be reduced normally.
[0210] As a possible implementation method, when the predicted temperature of the terminal device is high and the frame rate tolerance needs to be increased, the frame rate tolerance can be increased by different amplitudes according to the predicted temperature level of the terminal device, so that when a larger frame rate reduction amplitude is required, a higher frame rate tolerance can be achieved at the same time.
[0211] As an example, if the predicted temperature is greater than the first warning temperature and less than or equal to the second warning temperature, it means that the temperature of the terminal device after the preset time may be high but within an acceptable range, so that the current frame rate can be reduced by a smaller first frame reduction amplitude, and the frame rate tolerance adjustment strategy can be determined to increase the current frame rate tolerance by a first preset value; if the predicted temperature is greater than the second warning temperature, it means that the temperature of the terminal device after the preset time may be too high, so that the current frame rate can be reduced by a larger second frame reduction amplitude, and the frame rate tolerance adjustment strategy can be determined to increase the current frame rate tolerance by a second preset value.
[0212] It should be noted that the second preset value may be greater than the first preset value. In actual use, the specific values of the first preset value and the second preset value may be determined according to actual needs and specific application scenarios, and the embodiments of the present application do not limit this. For example, the first preset value may be 2fps, the second preset value may be 4fps, and so on.
[0213] Furthermore, when the frame rate adjustment strategy is determined by the frame stabilization decision model, the frame rate tolerance adjustment strategy can also be determined by the frame stabilization decision model to further improve the reliability and stability of the frame stabilization scheduling and further improve the display and operation fluency of the application. That is, in a possible implementation of the embodiment of the present application, the above-mentioned predicted temperature is determined by using a pre-trained frame stabilization decision model, and the above-mentioned frame stabilization decision model can also include a mapping relationship between the pre-trained temperature and the frame rate tolerance adjustment strategy; accordingly, the above-mentioned step 204 can include:
[0214] According to the predicted temperature and the mapping relationship between the temperature and the frame rate tolerance adjustment strategy, the frame rate tolerance adjustment strategy corresponding to the predicted temperature is determined as the frame rate tolerance adjustment strategy.
[0215] As a possible implementation method, a large amount of temperature data of a large number of terminal devices and the frame rate data and frame rate tolerance data of the current application can be obtained in advance, and the stable frame decision model can be trained until an accurate mapping relationship between temperature and frame rate adjustment strategy and an accurate mapping relationship between temperature and frame rate tolerance adjustment strategy are generated, that is, the stable frame decision model can be used for stable frame scheduling. That is to say, in an embodiment of the present application, after the current temperature of the terminal device, the historical temperature at each historical moment, the preset duration and the expected frame rate, and the current frame rate are input into the stable frame decision model, the stable frame decision model can calculate the predicted temperature of the terminal device after the preset duration based on these parameters, and then directly determine the frame rate tolerance adjustment strategy corresponding to the predicted temperature based on the predicted temperature and the mapping relationship between the pre-trained temperature and the frame rate tolerance adjustment strategy, and output it as the current frame rate tolerance adjustment strategy, so that the terminal device can adjust the current frame rate tolerance according to the frame rate tolerance adjustment strategy output by the stable frame decision model.
[0216] It should be noted that the pre-trained mapping relationship between temperature and frame rate tolerance adjustment strategy in the embodiment of the present application may include a large number of mapping relationships between temperature and frame rate tolerance adjustment strategies, that is, each different temperature may correspond to a different frame rate tolerance adjustment strategy, thereby achieving a more refined and accurate stable frame scheduling effect, and further improving the reliability and stability of stable frame scheduling.
[0217] Step 205: Determine a frame rate adjustment strategy corresponding to the current application according to the predicted temperature.
[0218] The specific implementation process and principle of the above step 205 can refer to the detailed description of the above embodiment, which will not be repeated here.
[0219] Step 206: Adjust the current frame rate tolerance corresponding to the current application according to the frame rate tolerance adjustment strategy.
[0220] In the embodiment of the present application, after the current frame rate tolerance adjustment strategy is determined, the current frame rate tolerance of the current application can be adjusted according to the frame rate tolerance adjustment strategy.
[0221] As a possible implementation method, if the frame rate adjustment strategy is to keep the current frame rate tolerance unchanged, the current frame rate tolerance can be kept unchanged; if the frame rate adjustment strategy is to reduce the current frame rate tolerance, the current frame rate tolerance can be reduced according to a preset amplitude; if the frame rate adjustment strategy is to increase the current frame rate tolerance, the current frame rate tolerance can be generated according to a preset amplitude.
[0222] As a possible implementation method, if the frame rate tolerance adjustment strategy is to reduce the current frame rate tolerance by a first preset value, the current frame rate tolerance can be reduced by the first preset value; if the frame rate tolerance adjustment strategy is to reduce the current frame rate tolerance by a second preset value, the current frame rate tolerance can be reduced by the second preset value.
[0223] Step 207: adjust the current frame rate according to the frame rate adjustment strategy.
[0224] The specific implementation process and principle of the above step 207 can refer to the detailed description of the above embodiment, which will not be repeated here.
[0225] The stable frame scheduling method provided in the embodiment of the present application predicts the temperature of the terminal device after a preset period of time based on multiple historical temperatures of the terminal device, so as to make an early judgment on the temperature condition of the terminal device, and slowly reduce the frame rate of the application in advance when it is predicted that the temperature may be too high, and adjust the frame rate tolerance of the application, thereby not only avoiding a cliff drop in the frame rate of the application, but also solving the problem of frame drops and freezes caused by a sudden drop in the frame rate, thereby improving the user experience, and further improving the stability and reliability of the stable frame scheduling.
[0226] In a possible implementation form of the present application, since the processor frequency of the terminal device can directly affect the temperature of the terminal device, in order to maintain the temperature of the terminal device within a relatively stable range and prevent the terminal device from being overly hot and affecting performance, the processor frequency of the terminal device can be adjusted in advance when it is predicted that the terminal device is at risk of overheating. By controlling the temperature of the terminal device, the frame rate of the application can be maintained in a relatively optimal and stable state, thereby further improving the stability of stable frame scheduling and further improving the user experience.
[0227] Combine the following Figure 3 , the stable frame scheduling method provided in the embodiment of the present application is further explained.
[0228] Figure 3 A flow chart of another stable frame scheduling method provided in an embodiment of the present application is shown.
[0229] like Figure 3 As shown, the stable frame scheduling method includes the following steps:
[0230] Step 301, obtaining the expected frame rate and current frame rate corresponding to the current application.
[0231] Step 302, obtaining the current temperature of the terminal device where the current application is located and the historical temperatures at multiple historical moments, wherein the historical moment refers to the display moment of multiple historical data frames before the current data frame.
[0232] Step 303, determining the predicted temperature of the terminal device after a preset time period according to the expected frame rate, the current temperature and various historical temperatures.
[0233] Step 304: Determine a frame rate adjustment strategy corresponding to the current application according to the predicted temperature.
[0234] The specific implementation process and principle of the above steps 301-304 can be referred to the detailed description of the above embodiment, which will not be repeated here.
[0235] Step 305: Determine a processor frequency adjustment strategy corresponding to the terminal device according to the predicted temperature.
[0236] In an embodiment of the present application, after determining the predicted temperature of the terminal device after a preset period of time, the operating status and temperature status of the terminal device in the future can be predicted in advance based on the predicted temperature, and then the processor frequency adjustment strategy corresponding to the terminal device can be determined based on the predicted temperature to prevent the terminal device from overheating and further improve the frame rate stability of the application.
[0237] As a possible implementation method, when the predicted temperature of the terminal device after a preset period of time is high, it means that the terminal device may be at risk of overheating, so the processor frequency corresponding to the terminal device can be reduced, that is, the processor frequency adjustment strategy can be determined to reduce the current processor frequency, so as to reduce the processor frequency in advance and prevent the temperature of the terminal device from continuing to rise; when the predicted temperature of the terminal device after a preset period of time is low, it means that the terminal device is currently in good operating condition and there is no risk of overheating, so the current processor frequency can be kept unchanged to ensure the display and operation smoothness of the application as much as possible.
[0238] It should be noted that in the embodiment of the present application, the reduction range of the processor frequency can be preset so that when the processor frequency adjustment strategy is to reduce the current processor frequency, the current processor frequency can be reduced by the preset frequency reduction range.
[0239] Furthermore, the reliability of stable frame scheduling can be further improved by setting a temperature threshold of the terminal device and using the temperature threshold as a standard to determine whether the terminal device has a risk of over-temperature. That is, in a possible implementation of the embodiment of the present application, the above step 305 may include:
[0240] When the predicted temperature is less than or equal to the second warning temperature, the processor frequency adjustment strategy is determined to keep the current processor frequency unchanged;
[0241] When the predicted temperature is greater than the second warning temperature, the processor frequency adjustment strategy is determined to reduce the current processor frequency.
[0242] The second warning temperature of this embodiment may be the same as the second warning temperature of the aforementioned embodiment, and will not be described in detail here.
[0243] As a possible implementation method, if the predicted temperature is less than or equal to the second warning temperature, it means that there is no risk of overheating of the terminal device after a preset period of time, so the processor frequency adjustment strategy can be determined to keep the current processor frequency unchanged to ensure the operating stability of the terminal device and the smoothness of application display and operation; if the predicted temperature is greater than the second warning temperature, it means that the temperature of the terminal device may be too high after the preset period of time, so the processor frequency adjustment strategy can be determined to reduce the current processor frequency, so that the temperature of the terminal device can be reduced to prevent the terminal device from being overheated.
[0244] It should be noted that in actual use, more warning temperatures can be set to divide the predicted temperature into more and more detailed temperature ranges, and different temperature ranges can correspond to different frequency reduction ranges, so as to schedule the processor frequency in a more detailed and accurate manner, further improving the reliability and stability of stable frame scheduling.
[0245] Furthermore, when the frame rate adjustment strategy is determined by the stable frame decision model, the processor frequency adjustment strategy can also be determined by the stable frame decision model to further improve the reliability and stability of the stable frame scheduling, and further improve the display and operation fluency of the application. That is, in a possible implementation of the embodiment of the present application, the above-mentioned predicted temperature is determined by using a pre-trained stable frame decision model, and the above-mentioned stable frame decision model can also include a mapping relationship between the pre-trained temperature and the processor frequency adjustment strategy; accordingly, the above-mentioned step 305 can include:
[0246] According to the predicted temperature and the mapping relationship between the temperature and the processor frequency adjustment strategy, the processor frequency adjustment strategy corresponding to the predicted temperature is determined as the processor frequency adjustment strategy.
[0247] As a possible implementation method, a large amount of temperature data of a large number of terminal devices and the frame rate data and processor frequency data of the current application can be obtained in advance, and the stable frame decision model can be trained until an accurate mapping relationship between temperature and frame rate adjustment strategy and an accurate mapping relationship between temperature and processor frequency adjustment strategy are generated, that is, the stable frame decision model can be used for stable frame scheduling. That is to say, in an embodiment of the present application, after the current temperature of the terminal device, the historical temperature at each historical moment, the preset duration and the expected frame rate, and the current frame rate are input into the stable frame decision model, the stable frame decision model can calculate the predicted temperature of the terminal device after the preset duration based on these parameters, and then directly determine the processor frequency adjustment strategy corresponding to the predicted temperature based on the predicted temperature and the mapping relationship between the pre-trained temperature and the processor frequency adjustment strategy, and output it as the current processor frequency adjustment strategy, so that the terminal device can adjust the current processor frequency according to the processor frequency adjustment strategy output by the stable frame decision model.
[0248] It should be noted that the pre-trained mapping relationship between temperature and processor frequency adjustment strategy in the embodiment of the present application may include a large number of mapping relationships between temperature and processor frequency adjustment strategies, that is, each different temperature may correspond to a different processor frequency adjustment strategy, thereby achieving a more detailed and accurate stable frame scheduling effect, and further improving the reliability and stability of stable frame scheduling.
[0249] Step 306: adjust the current frame rate according to the frame rate adjustment strategy.
[0250] The specific implementation process and principle of the above step 306 can be referred to the detailed description of the above embodiment, which will not be repeated here.
[0251] Step 307: Adjust the current processor frequency corresponding to the terminal device according to the processor frequency adjustment strategy.
[0252] In the embodiment of the present application, after the current processor frequency adjustment strategy is determined, the current processor frequency of the current application can be adjusted according to the processor frequency adjustment strategy.
[0253] The stable frame scheduling method provided in the embodiment of the present application predicts the temperature of the terminal device after a preset period of time based on multiple historical temperatures of the terminal device, so as to prejudge the temperature condition of the terminal device in advance, and when it is predicted that the temperature may be too high, slowly reduce the frame rate of the application in advance, and adjust the processor frequency corresponding to the terminal device, thereby not only avoiding the phenomenon of a cliff drop in the frame rate of the application, but also solving the problem of frame drops and jamming caused by a sudden drop in the frame rate, improving the user experience, and by adjusting the processor frequency, the temperature of the terminal device can be reduced in time to prevent the temperature of the terminal device from being too high, further improving the stability and reliability of the stable frame scheduling.
[0254] In a possible implementation form of the present application, the frame rate, frame rate tolerance and processor frequency of the application can also be adjusted simultaneously according to the temperature of the terminal device to further enhance the stability of the stable frame scheduling and further improve the user experience.
[0255] Combine the following Figure 4 , the stable frame scheduling method provided in the embodiment of the present application is further explained.
[0256] Figure 4 A flow chart of another stable frame scheduling method provided in an embodiment of the present application is shown.
[0257] like Figure 4 As shown, the stable frame scheduling method includes the following steps:
[0258] Step 401, obtaining the expected frame rate and current frame rate corresponding to the current application.
[0259] Step 402, obtaining the current temperature of the terminal device where the current application is located and the historical temperatures at multiple historical moments, wherein the historical moments refer to the display moments of multiple historical data frames before the current data frame.
[0260] Step 403, determining the predicted temperature of the terminal device after a preset time period according to the expected frame rate, the current temperature and various historical temperatures.
[0261] Step 404: Determine a frame rate tolerance adjustment strategy corresponding to the current application according to the predicted temperature.
[0262] Step 405: Determine a frame rate adjustment strategy corresponding to the current application according to the predicted temperature.
[0263] Step 406: Determine a processor frequency adjustment strategy corresponding to the terminal device according to the predicted temperature.
[0264] Step 407: Adjust the current frame rate tolerance corresponding to the current application according to the frame rate tolerance adjustment strategy.
[0265] Step 408: Adjust the current frame rate according to the frame rate adjustment strategy.
[0266] Step 409: Adjust the current processor frequency corresponding to the terminal device according to the processor frequency adjustment strategy.
[0267] As a possible implementation method, when performing stable frame scheduling for the current application, the frame rate adjustment strategy, frame rate tolerance adjustment strategy corresponding to the current application, and the processor frequency adjustment strategy corresponding to the terminal device can be determined simultaneously based on the predicted temperature of the terminal device after a preset period of time, and the current frame rate, current frame rate tolerance and current processor frequency can be adjusted respectively according to the determined frame rate adjustment strategy, frame rate tolerance adjustment strategy and processor frequency adjustment strategy.
[0268] It should be noted that when simultaneously determining the frame rate adjustment strategy, the frame rate tolerance adjustment strategy and the processor frequency adjustment strategy, the method of determining these three adjustment strategies can be the same as the method in the above embodiment. For example, the three adjustment strategies can be determined separately according to the temperature range of the preset temperature; or, the three adjustment strategies can be determined separately through a pre-trained stable frame decision model.
[0269] As an example, when determining the frame rate adjustment strategy, frame rate tolerance adjustment strategy and processor frequency adjustment strategy respectively by predicting the temperature range in which the temperature is located, the three adjustment strategies can be determined respectively by the correspondence between each temperature range and the frame rate adjustment strategy, frame rate tolerance adjustment strategy and processor frequency adjustment strategy in the following Table 1.
[0270] Table 1
[0271] Predicted temperature Frame rate adjustment strategy Frame rate tolerance adjustment strategy Processor frequency adjustment strategy <![CDATA[T∈(0,T safety ]]]> Keep it the same reduce Keep it the same <![CDATA[T∈(T safety ,T acceptable ]]]> Keep it the same Keep it the same Keep it the same <![CDATA[T∈(T acceptable ,T warning ]]]> reduce Elevated Keep it the same <![CDATA[T∈(T warning ,+∞)]]> reduce Elevated reduce
[0272] Where T is the predicted temperature of the terminal device after a preset time, T safety It can be the safety temperature in the above embodiment, T acceptable It can be the first warning temperature in the above embodiment, T warning It can be the second warning temperature in the above embodiment.
[0273] For other specific implementation processes and principles of the above steps 401-409, reference may be made to the detailed description of the above embodiment, which will not be repeated here.
[0274] The stable frame scheduling method provided in the embodiment of the present application predicts the temperature of the terminal device after a preset period of time based on multiple historical temperatures of the terminal device, so as to prejudge the temperature condition of the terminal device in advance, and when it is predicted that the temperature may be too high, slowly reduce the frame rate of the application in advance, and adjust the frame rate tolerance of the application and the processor frequency corresponding to the terminal device, thereby not only avoiding the phenomenon of a cliff drop in the frame rate of the application, but also solving the problem of frame drops and jamming caused by a sudden drop in the frame rate, improving the user experience, and by adjusting the processor frequency, the temperature of the terminal device can be reduced in time to prevent the temperature of the terminal device from being too high, further improving the stability and reliability of the stable frame scheduling.
[0275] Combine the following Figure 5 , the software architecture of the stable frame scheduling method provided in the embodiment of the present application is further explained.
[0276] Figure 5 A structural diagram of a stable frame scheduling method provided in an embodiment of the present application is shown.
[0277] like Figure 5 As shown, taking the stable frame scheduling method of the embodiment of the present application as an example in the game application, the software architecture of the stable frame scheduling method includes an application layer, a framework layer, a Vendor Native layer and a kernel layer. Among them, the application layer may include game applications, the framework layer may include an application management service (Activity Manager Service, AMS), a window management service (WindowManagerServicem, WMS) and a game scene perception and state recognition module; the Vendor Native layer may include a Deamon and a game image experience enhancement module; the kernel layer may include a processor frequency management unit (cpufreq), a device frequency management unit (devfreq), a temperature collection unit (Thermal Collector), real-time scheduling (RT), a completely fair scheduling (Completely Fair Schduler, CFS) / energy-aware scheduling (Energy Aware Scheduling, EAS), and a single-process load tracking (Per-entity Load Tracking, PELT) / window assisted load tracking (Window Assisted Load Tracking, WALT). The hardware layer may include a central processing unit (CPU), a graphics processing unit (Graphics Processing Unit, GPU) and a temperature control unit (Thermal Unit).
[0278] It should be noted that the software architecture of the stable frame scheduling method and other specific work processes and functions of the hardware part of the embodiment of the present application can refer to the specific description of the above-mentioned stable frame scheduling method embodiment, and will not be repeated here.
[0279] Figure 6 A scheduling flow chart of a stable frame scheduling method provided in an embodiment of the present application is shown.
[0280] like Figure 6 As shown, refer to Figure 5 The architecture diagram in the figure, the scheduling flow chart of the stable frame scheduling method, involves the game application, game scene perception and state recognition module, game image experience improvement module, temperature acquisition unit in the software architecture, and Figure 5 The frame stabilization decision module and the scheduling parameter delivery module not shown in the figure, and Figure 5 The hardware layer part of the process. It includes the following steps:
[0281] Step 601: the game application sends the game package name and expected frame rate to the game scene perception and state recognition module;
[0282] Step 602: the game scene perception and state recognition module sends the game thread number and game mode to the game image experience enhancement module;
[0283] Step 603: the game image experience enhancement module sends the current frame rate to the frame stabilization decision module;
[0284] Step 604: The temperature acquisition unit feeds back the system temperature and the shell temperature of the terminal device to the frame stabilization decision module;
[0285] Step 605: The frame stabilization decision module calculates the frame rate fluctuation tolerance and the current frame rate, and sends them to the scheduling parameter sending module;
[0286] Step 606: The scheduling parameter sending module sends the CPU, GPU, and DDR frequency points to the hardware layer.
[0287] The specific implementation process and principle of the above scheduling flow can be referred to the detailed description of the above embodiment, which will not be repeated here.
[0288] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0289] Corresponding to the stable frame scheduling method described in the above embodiment, Figure 7 A structural block diagram of a stable frame scheduling device provided in an embodiment of the present application is shown. For ease of explanation, only the parts related to the embodiment of the present application are shown.
[0290] Reference Figure 7 The device 70 comprises:
[0291] A first acquisition module 71 is used to acquire an expected frame rate and a current frame rate corresponding to a current application;
[0292] The second acquisition module 72 is used to acquire the current temperature of the terminal device where the current application is located and the historical temperature at multiple historical moments, wherein the historical moment refers to the display moment of multiple historical data frames before the current data frame;
[0293] A first determination module 73, used to determine the predicted temperature of the terminal device after a preset time period according to the expected frame rate, the current temperature and various historical temperatures;
[0294] A second determination module 74, configured to determine a frame rate adjustment strategy corresponding to the current application according to the predicted temperature;
[0295] The first adjustment module 75 is used to adjust the current frame rate according to the frame rate adjustment strategy.
[0296] In actual use, the stable frame scheduling device provided in the embodiment of the present application can be configured in any terminal device to execute the aforementioned stable frame scheduling method.
[0297] The stable frame scheduling device provided in the embodiment of the present application predicts the temperature of the terminal device after a preset period of time based on multiple historical temperatures of the terminal device, so as to make an early judgment on the temperature condition of the terminal device, and slowly reduce the frame rate of the application in advance when it is predicted that the temperature may be too high, thereby avoiding a cliff drop in the frame rate of the application, solving the problem of frame drops and stuttering caused by a sudden drop in the frame rate, and improving the user experience.
[0298] In a possible implementation of the present application, the first determining module 73 includes:
[0299] A first determination unit, configured to determine a temperature rise rate corresponding to the terminal device according to an expected frame rate and each historical temperature;
[0300] The second determination unit is used to determine the predicted temperature according to the current temperature, the temperature rise rate and the preset time.
[0301] Furthermore, in another possible implementation of the present application, the first determining unit is specifically configured to:
[0302] Determine a temperature control window corresponding to each historical moment, wherein each temperature control window includes a preset number of historical temperatures;
[0303] According to each historical temperature included in each temperature control window, determine the average historical temperature corresponding to each historical moment;
[0304] Determine the temperature control duration based on the number of historical moments and the expected frame rate;
[0305] Determine the temperature rise rate based on the average historical temperatures and temperature control duration.
[0306] Furthermore, in another possible implementation of the present application, the current temperature includes the current system temperature and the current shell temperature, and the historical temperature includes the historical system temperature and the historical shell temperature; accordingly, the first determination module 73 includes:
[0307] A third determination unit, configured to determine a predicted system temperature of the terminal device after a preset time period according to the expected frame rate, the current system temperature and each historical system temperature;
[0308] A fourth determination unit, configured to determine a predicted shell temperature of the terminal device after a preset time period according to an expected frame rate, a current shell temperature, and each historical shell temperature;
[0309] The fifth determining unit is used to determine the predicted temperature according to the predicted system temperature and the predicted shell temperature.
[0310] Furthermore, in another possible implementation of the present application, the second determining module 74 includes:
[0311] A sixth determining unit, configured to determine the frame rate adjustment strategy to keep the current frame rate unchanged when the predicted temperature is less than or equal to the first warning temperature;
[0312] The seventh determining unit is configured to determine the frame rate adjustment strategy to reduce the current frame rate when the predicted temperature is greater than the first warning temperature.
[0313] Furthermore, in another possible implementation of the present application, the seventh determining unit is specifically configured to:
[0314] When the predicted temperature is greater than the first warning temperature and less than or equal to the second warning temperature, the frame rate adjustment strategy is determined to reduce the current frame rate by the first frame reduction amplitude, wherein the second warning temperature is greater than the first warning temperature;
[0315] When the predicted temperature is greater than the second warning temperature, the frame rate adjustment strategy is determined to reduce the current frame rate by a second frame reduction amplitude, wherein the second frame reduction amplitude is greater than the first frame reduction amplitude.
[0316] Further, in another possible implementation of the present application, the predicted temperature is determined by using a pre-trained frame stabilization decision model, and the pre-trained frame stabilization decision model also includes a mapping relationship between the pre-trained temperature and the frame rate adjustment strategy; accordingly, the second determination module 74 includes:
[0317] The eighth determining unit is configured to determine, according to the predicted temperature and the mapping relationship between the temperature and the frame rate adjustment strategy, the frame rate adjustment strategy corresponding to the predicted temperature as the frame rate adjustment strategy.
[0318] Furthermore, in another possible implementation of the present application, the device 70 further includes:
[0319] A third determination module is used to determine a frame rate tolerance adjustment strategy corresponding to the current application according to the predicted temperature;
[0320] The second adjustment module is used to adjust the current frame rate tolerance corresponding to the current application according to the frame rate tolerance adjustment strategy.
[0321] Furthermore, in another possible implementation of the present application, the third determining module includes:
[0322] a ninth determining unit, configured to determine, when the predicted temperature is less than or equal to the safe temperature, a frame rate tolerance adjustment strategy to reduce a current frame rate tolerance;
[0323] a tenth determining unit, configured to determine, when the predicted temperature is greater than the safety temperature and less than or equal to the first warning temperature, a frame rate tolerance adjustment strategy to keep the current frame rate tolerance unchanged;
[0324] The eleventh determining unit is configured to determine the frame rate tolerance adjustment strategy to increase the current frame rate tolerance when the predicted temperature is greater than the first warning temperature.
[0325] Further, in another possible implementation of the present application, the predicted temperature is determined by using a pre-trained frame stabilization decision model, and the pre-trained frame stabilization decision model also includes a mapping relationship between the pre-trained temperature and the frame rate tolerance adjustment strategy; accordingly, the third determination module includes:
[0326] The twelfth determining unit is configured to determine the frame rate tolerance adjustment strategy corresponding to the predicted temperature as the frame rate tolerance adjustment strategy according to the predicted temperature and the mapping relationship between the temperature and the frame rate tolerance adjustment strategy.
[0327] Furthermore, in another possible implementation of the present application, the device 70 further includes:
[0328] A fourth determination module, used to determine a processor frequency adjustment strategy corresponding to the terminal device according to the predicted temperature;
[0329] The third adjustment module is used to adjust the current processor frequency corresponding to the terminal device according to the processor frequency adjustment strategy.
[0330] Furthermore, in another possible implementation of the present application, the fourth determining module includes:
[0331] A thirteenth determining unit, configured to determine the processor frequency adjustment strategy to keep the current processor frequency unchanged when the predicted temperature is less than or equal to the second warning temperature;
[0332] The fourteenth determining unit is configured to determine the processor frequency adjustment strategy to reduce the current processor frequency when the predicted temperature is greater than the second warning temperature.
[0333] Further, in another possible implementation of the present application, the predicted temperature is determined by using a pre-trained frame stabilization decision model, and the pre-trained frame stabilization decision model also includes a mapping relationship between the pre-trained temperature and the processor frequency adjustment strategy; accordingly, the fourth determination module includes:
[0334] The fifteenth determining unit is used to determine the processor frequency adjustment policy corresponding to the predicted temperature as the processor frequency adjustment policy according to the predicted temperature and the mapping relationship between the temperature and the processor frequency adjustment policy.
[0335] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / units are based on the same concept as the method embodiment of the present application. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.
[0336] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0337] In order to implement the above embodiments, the present application also proposes a terminal device.
[0338] Figure 8 A schematic diagram of the structure of a terminal device according to an embodiment of the present application.
[0339] like Figure 8 As shown, the terminal device 800 includes:
[0340] The memory 810 and at least one processor 820, a bus 830 connecting different components (including the memory 810 and the processor 820), the memory 810 stores a computer program, and when the processor 820 executes the program, the stable frame scheduling method described in the embodiment of the present application is implemented.
[0341] Bus 830 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor or a local bus using any of a variety of bus architectures. For example, these architectures include but are not limited to Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MAC) bus, Enhanced ISA bus, Video Electronics Standards Association (VESA) local bus and Peripheral Component Interconnect (PCI) bus.
[0342] The terminal device 800 typically includes a variety of electronic device readable media, which can be any available media that can be accessed by the terminal device 800, including volatile and non-volatile media, removable and non-removable media.
[0343] The memory 810 may also include computer system readable media in the form of volatile memory, such as random access memory (RAM) 840 and / or cache memory 850. The terminal device 800 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 860 may be used to read and write non-removable, non-volatile magnetic media ( Figure 8 not shown, usually called a "hard drive"). Although Figure 8 Not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk"), and an optical drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical medium) may be provided. In these cases, each drive may be connected to bus 830 via one or more data medium interfaces. Memory 810 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the various embodiments of the present application.
[0344] A program / utility 880 having a set (at least one) of program modules 870 may be stored, for example, in the memory 810, such program modules 870 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. The program modules 870 generally perform the functions and / or methods of the embodiments described herein.
[0345] The terminal device 800 can also communicate with one or more external devices 890 (e.g., keyboard, pointing device, display 891, etc.), and can also communicate with one or more devices that enable users to interact with the terminal device 800, and / or communicate with any device that enables the terminal device 800 to communicate with one or more other computing devices (e.g., network card, modem, etc.). This communication can be performed through an input / output (I / O) interface 892. In addition, the terminal device 800 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN) and / or public network, such as the Internet) through a network adapter 893. As shown in the figure, the network adapter 893 communicates with other modules of the terminal device 800 through a bus 830. It should be understood that, although not shown in the figure, other hardware and / or software modules can be used in conjunction with the terminal device 800, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0346] The processor 820 executes various functional applications and data processing by running the programs stored in the memory 810 .
[0347] It should be noted that the implementation process and technical principles of the terminal device of this embodiment refer to the aforementioned explanation of the stable frame scheduling method of the embodiment of the present application, and will not be repeated here.
[0348] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.
[0349] An embodiment of the present application provides a computer program product. When the computer program product is run on a terminal device, the terminal device can implement the steps in the above-mentioned method embodiments when executing the computer program product.
[0350] 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 present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, the steps of the above-mentioned various method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may at least include: any entity or device that can carry the computer program code to the camera / terminal device, recording medium, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk or an optical disk. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electric carrier signals and telecommunication signals.
[0351] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0352] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software 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 be beyond the scope of this application.
[0353] In the embodiments provided in the present application, it should be understood that the disclosed devices / terminal equipment and methods can be implemented in other ways. For example, the device / terminal equipment embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0354] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0355] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A stable frame scheduling method, characterized in that: include: Get the expected frame rate and current frame rate corresponding to the current application; Acquire the current temperature of the terminal device where the current application is located and the historical temperatures at multiple historical moments, wherein the historical moments refer to the display moments of multiple historical data frames before the current data frame; The ratio of the number of the historical moments to the expected frame rate is determined as the temperature control duration, wherein the temperature control duration refers to the duration of the current historical period, and the current historical period refers to the period between the earliest historical moment obtained and the display time of the current data frame; Determining a predicted temperature of the terminal device after a preset time period according to the temperature control time period, the current temperature and each of the historical temperatures; Determining a frame rate adjustment strategy corresponding to the current application according to the predicted temperature; The current frame rate is adjusted according to the frame rate adjustment strategy.
2. The method according to claim 1, characterized in that The step of determining the predicted temperature of the terminal device after a preset time period according to the temperature control time period, the current temperature and each of the historical temperatures includes: Determining a temperature rise rate corresponding to the terminal device according to the temperature control duration and each of the historical temperatures; The predicted temperature is determined according to the current temperature, the temperature rise rate and the preset time.
3. The method according to claim 2, characterized in that The determining, according to the temperature control duration and each of the historical temperatures, a temperature rise rate corresponding to the terminal device includes: Determine a temperature control window corresponding to each of the historical moments, wherein each of the temperature control windows includes a preset number of the historical temperatures; Determine the average historical temperature corresponding to each historical moment according to each of the historical temperatures included in each of the temperature control windows; The temperature rise rate is determined according to each of the average historical temperatures and the temperature control time.
4. The method according to claim 1, characterized in that The current temperature includes the current system temperature and the current shell temperature, the historical temperature includes the historical system temperature and the historical shell temperature, and determining the predicted temperature of the terminal device after a preset time according to the temperature control time, the current temperature and each of the historical temperatures includes: Determining a predicted system temperature of the terminal device after the preset time period according to the temperature control time period, the current system temperature and each of the historical system temperatures; Determining a predicted shell temperature of the terminal device after the preset time period according to the temperature control time period, the current shell temperature and each of the historical shell temperatures; The predicted temperature is determined according to the predicted system temperature and the predicted shell temperature.
5. The method according to claim 1, characterized in that The determining, according to the predicted temperature, a frame rate adjustment strategy corresponding to the current application includes: When the predicted temperature is less than or equal to the first warning temperature, determining the frame rate adjustment strategy to keep the current frame rate unchanged; When the predicted temperature is greater than the first warning temperature, the frame rate adjustment strategy is determined to reduce the current frame rate.
6. The method according to claim 5, characterized in that When the predicted temperature is greater than the first warning temperature, determining the frame rate adjustment strategy to reduce the current frame rate includes: When the predicted temperature is greater than the first warning temperature and less than or equal to a second warning temperature, determining the frame rate adjustment strategy to reduce the current frame rate by a first frame reduction amplitude, wherein the second warning temperature is greater than the first warning temperature; When the predicted temperature is greater than the second warning temperature, the frame rate adjustment strategy is determined to reduce the current frame rate by a second frame reduction amplitude, wherein the second frame reduction amplitude is greater than the first frame reduction amplitude.
7. The method according to claim 1, characterized in that The predicted temperature is determined by using a pre-trained frame stabilization decision model, wherein the pre-trained mapping relationship between the temperature and the frame rate adjustment strategy is also included in the pre-trained frame stabilization decision model. The frame rate adjustment strategy corresponding to the current application is determined according to the predicted temperature, including: According to the predicted temperature and the mapping relationship between the temperature and the frame rate adjustment strategy, the frame rate adjustment strategy corresponding to the predicted temperature is determined as the frame rate adjustment strategy.
8. The method according to claim 1, characterized in that After determining the predicted temperature of the terminal device after a preset time period according to the temperature control time period, the current temperature and each of the historical temperatures, the method further includes: Determining a frame rate tolerance adjustment strategy corresponding to the current application according to the predicted temperature; According to the frame rate tolerance adjustment strategy, the current frame rate tolerance corresponding to the current application is adjusted.
9. The method according to claim 8, characterized in that The determining, according to the predicted temperature, a frame rate tolerance adjustment strategy corresponding to the current application includes: When the predicted temperature is less than or equal to the safe temperature, determining the frame rate tolerance adjustment strategy to reduce the current frame rate tolerance; When the predicted temperature is greater than the safety temperature and less than or equal to the first warning temperature, determining the frame rate tolerance adjustment strategy to keep the current frame rate tolerance unchanged; When the predicted temperature is greater than the first warning temperature, the frame rate tolerance adjustment strategy is determined to increase the current frame rate tolerance.
10. The method according to claim 8, characterized in that The predicted temperature is determined by using a pre-trained frame stabilization decision model, the pre-trained mapping relationship between the temperature and the frame rate tolerance adjustment strategy is also included in the frame stabilization decision model, and the frame rate tolerance adjustment strategy corresponding to the current application is determined according to the predicted temperature, including: According to the predicted temperature and the mapping relationship between the temperature and the frame rate tolerance adjustment strategy, the frame rate tolerance adjustment strategy corresponding to the predicted temperature is determined as the frame rate tolerance adjustment strategy.
11. The method according to any one of claims 1 to 10, characterized in that: After determining the predicted temperature of the terminal device after a preset time period according to the temperature control time period, the current temperature and each of the historical temperatures, the method further includes: Determining a processor frequency adjustment strategy corresponding to the terminal device according to the predicted temperature; According to the processor frequency adjustment strategy, the current processor frequency corresponding to the terminal device is adjusted.
12. The method according to claim 11, characterized in that The determining, according to the predicted temperature, a processor frequency adjustment strategy corresponding to the terminal device includes: When the predicted temperature is less than or equal to the second warning temperature, determining the processor frequency adjustment strategy to keep the current processor frequency unchanged; When the predicted temperature is greater than the second warning temperature, the processor frequency adjustment strategy is determined to reduce the current processor frequency.
13. The method according to claim 11, characterized in that The predicted temperature is determined by using a pre-trained stable frame decision model, the stable frame decision model also includes a mapping relationship between the pre-trained temperature and the processor frequency adjustment strategy, and the processor frequency adjustment strategy corresponding to the terminal device is determined according to the predicted temperature, including: According to the predicted temperature and the mapping relationship between the temperature and the processor frequency adjustment strategy, the processor frequency adjustment strategy corresponding to the predicted temperature is determined as the processor frequency adjustment strategy.
14. A stable frame scheduling device, characterized in that: include: A first acquisition module is used to acquire an expected frame rate and a current frame rate corresponding to a current application; A second acquisition module is used to acquire the current temperature of the terminal device where the current application is located and the historical temperature at multiple historical moments, wherein the historical moment refers to the display moment of multiple historical data frames before the current data frame; A first determination module is used to determine the ratio of the number of the historical moments to the expected frame rate as the temperature control duration, wherein the temperature control duration refers to the duration of the current historical period, and the current historical period refers to the period between the earliest historical moment obtained and the display time of the current data frame; and determine the predicted temperature of the terminal device after a preset duration according to the temperature control duration, the current temperature and each of the historical temperatures; A second determination module, configured to determine a frame rate adjustment strategy corresponding to the current application according to the predicted temperature; The first adjustment module is used to adjust the current frame rate according to the frame rate adjustment strategy.
15. A terminal device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 13 is implemented.
16. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 13 is implemented.
