Device control method, device, electronic device and storage medium
By predicting the future temperature of electronic devices when running games and adjusting the display frame rate, it solves the problems of electronic devices being damaged due to heat and game performance degradation, and achieves efficient operation of the device and good display effects.
Patent Information
- Application Number
- CN202011398849.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-01
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2040-12-01
AI Technical Summary
When electronic devices run high-load games, due to heating issues, the temperature may be too high and damaged. At the same time, downclocking to lower the temperature will cause game frames to drop and frame rate to jitter, affecting the user experience.
By obtaining the current temperature and running time of the electronic device when running the game, input it into the pre-trained temperature prediction model, predict the device temperature after the specified time, and adjust the display frame rate according to the predicted temperature to avoid heating problems and ensure the display of the game. Effect.
Effectively predict and adjust the display frame rate to avoid electronic equipment being damaged due to heat, while maintaining the smoothness and performance of the game, and solving the problems of electronic equipment heating and performance degradation.
Smart Images

Figure CN112587920B
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of electronic equipment, and more specifically, to a device control method, apparatus, electronic equipment and storage medium. Background Art
[0002] With the rapid development of technology and living standards, more and more people are starting to use computers, mobile phones and other electronic devices to play games to kill their leisure time. In addition, the configuration level of electronic devices is getting higher and higher, and the performance level of games is getting better and better, but the heating problem of electronic devices also comes along. Summary of the invention
[0003] In view of the above problems, the present application proposes a device control method, apparatus, electronic device and storage medium.
[0004] In a first aspect, an embodiment of the present application provides a device control method, which is applied to an electronic device, and the method includes: obtaining a current device temperature when the electronic device is running a game, and a running time of the current game; inputting the current device temperature and the running time into a pre-trained temperature prediction model to obtain a predicted device temperature after a specified time output by the temperature prediction model; determining a frame rate to be displayed based on the predicted device temperature; and adjusting the display frame rate of the electronic device based on the frame rate to be displayed.
[0005] In a second aspect, an embodiment of the present application provides a device control device, which is applied to an electronic device, and the device includes: a temperature acquisition module, a temperature prediction module, a frame rate determination module and a frame rate adjustment module, wherein the temperature acquisition module is used to obtain the current device temperature of the electronic device when running a game, and the running time of running the game; the temperature prediction module is used to input the current device temperature and the running time into a pre-trained temperature prediction model to obtain the predicted device temperature after a specified time output by the temperature prediction model; the frame rate determination module is used to determine the frame rate to be displayed based on the predicted device temperature; and the frame rate adjustment module is used to adjust the display frame rate of the electronic device based on the frame rate to be displayed.
[0006] In a third aspect, an embodiment of the present application provides an electronic device, comprising: one or more processors; a memory; one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, and the one or more programs are configured to execute the device control method provided in the first aspect above.
[0007] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which a program code is stored. The program code can be called by a processor to execute the device control method provided in the first aspect above.
[0008] The solution provided by the present application obtains the current device temperature of the electronic device when it runs a game, as well as the running time of the current game, and inputs the current device temperature and running time into a pre-trained temperature prediction model to obtain the predicted device temperature for a specified time output by the temperature prediction model, and then determines the frame rate to be displayed based on the predicted device temperature, and adjusts the display frame rate of the electronic device based on the frame rate to be displayed, thereby achieving the predicted future temperature when the electronic device runs the game, and adjusting the display frame rate in advance according to the predicted future temperature, thereby avoiding the problem of serious heating of the electronic device. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0010] Figure 1 A flow chart of a device control method according to an embodiment of the present application is shown.
[0011] Figure 2 A flow chart of a device control method according to another embodiment of the present application is shown.
[0012] Figure 3 A flow chart of a device control method according to yet another embodiment of the present application is shown.
[0013] Figure 4 A schematic diagram of a temperature conversion model provided by yet another embodiment of the present application is shown.
[0014] Figure 5 Another schematic diagram of a temperature conversion model provided by yet another embodiment of the present application is shown.
[0015] Figure 6 A flow chart of a device control method according to another embodiment of the present application is shown.
[0016] Figure 7 A schematic diagram showing a principle of a device control method provided in an embodiment of the present application is shown.
[0017] Figure 8 A block diagram of a device control apparatus according to an embodiment of the present application is shown.
[0018] Fig. 9 It is a block diagram of an electronic device according to an embodiment of the present application for executing a device control method according to an embodiment of the present application.
[0019] Fig.10 It is a storage unit of an embodiment of the present application for storing or carrying program codes for implementing the device control method according to an embodiment of the present application. DETAILED DESCRIPTION
[0020] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.
[0021] With the rapid development of technology and living standards, more and more people are starting to use computers, mobile phones and other electronic devices to play games to kill their leisure time. In addition, the configuration level of electronic devices is getting higher and higher, and the performance level of games is getting better and better. However, when electronic devices are running games, their heat is also more serious.
[0022] Usually when electronic devices run high-load games, the processor that continues to run at a high frequency is likely to burn out due to high temperature and poor heat dissipation, so manufacturers generally use frequency reduction to reduce temperature and reduce damage to human skin caused by high temperature. In this way, although frequency reduction can effectively reduce terminal temperature and extend terminal battery life, it will cause large frame drops and severe frame rate jitter during the game.
[0023] In response to the above problems, the inventors have proposed a device control method, apparatus, electronic device, and storage medium provided in the embodiments of the present application, which can predict the temperature of the device after a specified period of time when the device is running a game, and then adjust the device according to the temperature. The specific device control method will be described in detail in the subsequent embodiments.
[0024] See also Figure 1 , Figure 1 FIG. 1 is a flow chart of a device control method provided by an embodiment of the present application. In a specific embodiment, the device control method is applied to Figure 8 The device control device 400 and the electronic device 100 ( Fig. 9 ). The following will take an electronic device as an example to illustrate the specific process of this embodiment. Of course, it can be understood that the electronic device used in this embodiment can be a smart phone, a tablet computer, a smart watch, smart glasses, a laptop computer, etc., which is not limited here. Figure 1 The process shown is described in detail, and the device control method may specifically include the following steps:
[0025] Step S110: obtaining the current device temperature of the electronic device when the game is running, and the running time of the current game.
[0026] In the embodiment of the present application, when the electronic device is running a game, it can obtain its current device temperature and the running time of the current game regularly or irregularly, so as to predict the device temperature after a specified time based on the current device temperature and the running time. Among them, the current device temperature is the device temperature obtained by the electronic device each time when the device temperature is obtained; the running time of the current game is the running time during the current game running process each time the device temperature is obtained.
[0027] In some embodiments, the electronic device may periodically obtain the current device temperature and the current operating time at a preset time interval to predict the device temperature after a specified time. That is, the electronic device may execute steps S110 to S140 at preset time intervals, so that the future temperature can be continuously predicted during the game, and the display frame rate can be adjusted to ensure that the temperature of the electronic device is not too high. The specific value of the specified time may not be limited, for example, it may be 1 second, 2 seconds, 4 seconds, 1 minute, etc., and may be selected according to actual needs. The specific value of the time interval may not be limited, and the time interval may be less than the specified time, or greater than or equal to the specified time. For example, the current device temperature and the current operating time may be obtained every 5 seconds.
[0028] In some embodiments, a plurality of temperature sensors may be provided in the electronic device, wherein the temperature sensors may be provided at different locations in the electronic device, for example, they may include a temperature sensor in the central processing unit (CPU) and a temperature sensor in the graphics processing unit (GPU), and they may also include a temperature sensor provided near the battery, a temperature sensor provided near the speaker, etc., and the number and the location of the temperature sensors may not be limited. The electronic device may collect temperature through a plurality of temperature sensors, and then determine the current temperature of the electronic device based on the temperature data collected by the plurality of temperature sensors. As one method, the electronic device may average the temperature data collected by the plurality of temperature sensors, and use the average value as the current device temperature; as another method, the electronic device may obtain the maximum value of the temperature data collected by the plurality of temperature sensors, and use the maximum value as the current device temperature. Of course, the specific implementation method of the electronic device obtaining the current device temperature may not be limited.
[0029] Step S120: input the current device temperature and the operating time into a pre-trained temperature prediction model to obtain the predicted device temperature after a specified time output by the temperature prediction model.
[0030] In an embodiment of the present application, after obtaining the current device temperature and operating time, the electronic device can input the current device temperature and operating time into a pre-trained temperature prediction model to obtain the predicted device temperature output by the temperature prediction model, which is the predicted device temperature after a specified time at the current moment.
[0031] Among them, the event prediction model is pre-trained, so that the event prediction model can output the activity events within the preset time period according to the preset time period that needs to be predicted. The activity events output by the event prediction model are the predicted activity events of the target user within the preset time period after the current moment. It can be understood that the target user can refer to the user corresponding to the wearable device. The wearable device can usually monitor the activity events performed by the target user in real time, such as running, cycling, sleeping, etc., and the target user usually has a certain regularity when wearing the wearable device to perform these events in daily life. Therefore, the event prediction model trained as above can predict the activity events that the target user may perform in the preset time period in the future.
[0032] In some embodiments, the temperature prediction model can be stored locally, and the electronic device can directly read the temperature prediction model from the local device; the temperature prediction model can also be stored in a server, and when the electronic device needs to predict the temperature after a specified period of time at the current moment, it can send a request to the server to call the temperature prediction model.
[0033] In an embodiment of the present application, the temperature prediction model can be obtained by training a large number of training samples. Among them, the training samples can be determined according to the historical device temperature when the electronic device runs the game for different durations according to the electronic device's historical records. It can be understood that the device temperature at a certain moment and its corresponding running time can be used as input data. According to the above records of the electronic device, the device temperature after the specified time at the moment can be determined, and the device temperature after the specified time at the moment can be used as output data to form a sample pair, and the output data is the label corresponding to the input data. Since the heating caused by the electronic device when running a certain game is relatively stable, and the temperature change process of the electronic device in each time the game is run is usually the same, and there will be no significant changes in each operation, the initial model is trained based on the above training samples, so that the model can learn the temperature change of the electronic device when running the game, and obtain the temperature prediction model, and then the obtained temperature prediction model can output the predicted temperature according to the current device temperature and the current running time obtained.
[0034] In some embodiments, the initial model may include a neural network, a long short-term memory (LSTM) network, a threshold recurrent unit, a simple recurrent unit, an autoencoder, a decision tree, a random forest, a classification regression tree, a support vector machine, a logistic regression model, etc. Of course, the specific initial model may not be used as a limitation.
[0035] The following takes a neural network as an example to illustrate how to train an initial model based on a training data set.
[0036] The device temperature x1 and the running time x2 in a set of data in the training data set are used as the input samples of the neural network, and the device temperature y after a specified time length marked in a set of data is used as the output sample of the neural network. The neurons in the input layer are fully connected to the neurons in the hidden layer, and the neurons in the hidden layer are fully connected to the neurons in the output layer, so that potential features of different granularities can be effectively extracted. In addition, the number of hidden layers can be multiple, so that nonlinear relationships can be better fitted, making the trained temperature prediction model more accurate.
[0037] It is understandable that the training process of the temperature prediction model can be completed by the electronic device or not. When the training process is not completed by the electronic device, the electronic device can only be a direct user or an indirect user, that is, the electronic device can send a preset time period after the current moment to a server storing the temperature prediction model, and obtain the predicted device temperature from the server.
[0038] In addition, when the training process of the temperature prediction model is completed by the server, the electronic device can report the data recorded by the historical running of the game to the server, and then the server will process the data, generate a training data set and the model training process.
[0039] In some embodiments, the trained temperature prediction model can be stored locally in the electronic device. The trained temperature prediction model can also be stored in a server that is communicatively connected to the electronic device. Storing the temperature prediction model in the server can reduce the storage space occupied by the electronic device and improve the operating efficiency of the electronic device.
[0040] In some embodiments, the temperature prediction model can also be trained according to new training data with a preset update frequency; or new training data can be obtained irregularly to train the temperature prediction model to update the temperature prediction model. The preset update frequency can be one week, two weeks, etc., and its specific value can be unlimited; the new training data can be training data newly generated by the electronic device and not used to train the temperature prediction model, and the training data includes the device temperature at different running time, the running time, and the device temperature after the specified time recorded when running the game. By continuously training the temperature prediction model, the changing pattern of the device temperature when the electronic device runs the game can be learned more accurately, and the temperature prediction model can also learn new changing patterns in a timely manner, so that the accuracy of the temperature prediction model is improved.
[0041] Step S130: determining a frame rate to be displayed based on the predicted device temperature.
[0042] In an embodiment of the present application, after the electronic device obtains the predicted device temperature after a specified period of time, it can determine the frame rate to be displayed based on the predicted future predicted device temperature, so as to adjust its display frame rate in advance to ensure that the temperature of the electronic device is not too high. Among them, the display frame rate refers to the frame rate at which the electronic device actually displays the game screen, that is, the number of frames of the game screen content displayed by the electronic device per second. For example, if the display frame rate is 60 frames / second, the frame rate of the game screen content displayed per second is 60 frames. It can be understood that the processing capacity of the electronic device when displaying the game screen is positively correlated with the display frame rate. If the display frame rate is higher, the processing capacity of the electronic device when displaying the game screen is also greater. If the display frame rate is lower, the processing capacity of the electronic device when displaying the game screen is also smaller.
[0043] In some embodiments, the electronic device can obtain the display frame rate corresponding to the predicted device temperature as the frame rate to be displayed according to the correspondence between the preset device temperature and the display frame rate. Among them, the correspondence can be obtained in advance based on a large number of experiments. Under the correspondence, the electronic device displays at the display frame rate corresponding to each temperature, which can ensure the display effect of the game screen while ensuring that the temperature will not be too high in the subsequent time. For example, when the predicted device temperature is low (for example, less than the set threshold), the corresponding display frame rate is high in the correspondence, so that the electronic device can ensure the display effect of the game, and the display of the game screen at the display frame rate will not cause the device temperature to be high; for another example, when the predicted device temperature is high (for example, greater than the set threshold), the corresponding display frame rate is low in the correspondence, so that the electronic device reduces the processing amount when displaying the game screen, so that the subsequent device temperature will not be too high. Of course, the above is only an example and does not represent a limitation on the actual above correspondence.
[0044] Step S140: adjusting the display frame rate of the electronic device based on the frame rate to be displayed.
[0045] In an embodiment of the present application, after the electronic device determines the frame rate to be displayed, it can adjust the display frame rate of the electronic device based on the frame rate to be displayed. As one way, the electronic device can adjust the current display frame rate to the frame rate to be displayed when the current display frame rate is different from the frame rate to be displayed, and when the current display frame rate is different from the frame rate to be displayed, the current display frame rate can be kept unchanged; as another way, the electronic device can determine the difference between the current display frame rate and the frame rate to be displayed when the current display frame rate is different from the frame rate to be displayed, and if the difference is greater than the preset difference, the current display frame rate is adjusted to the frame rate to be displayed, and if the difference is less than or equal to the preset difference, the current display frame rate can be kept unchanged, wherein the preset difference can be 1 frame / second, 2 frames / second, etc., which is not limited here.
[0046] The device control method provided in the embodiment of the present application obtains the current device temperature of the electronic device when running a game, and the running time of the current game, inputs the current device temperature and the running time into a pre-trained temperature prediction model, obtains the predicted device temperature for a specified time output by the temperature prediction model, and then determines the frame rate to be displayed based on the predicted device temperature, and adjusts the display frame rate of the electronic device based on the frame rate to be displayed, thereby achieving the predicted future temperature when the electronic device runs the game, and adjusting the display frame rate in advance according to the predicted future temperature, thereby avoiding the problem of serious heating of the electronic device and ensuring the display effect of the game screen.
[0047] See also Figure 2 , Figure 2 A schematic diagram of a device control method according to another embodiment of the present application is shown. The device control method is applied to the above-mentioned electronic device. Figure 2 The process shown is described in detail, and the device control method may specifically include the following steps:
[0048] Step S210: obtaining the current device temperature of the electronic device when the game is running, and the running time of the current game.
[0049] Step S220: input the current device temperature and the operating time into a pre-trained temperature prediction model to obtain the predicted device temperature after a specified time output by the temperature prediction model.
[0050] In the embodiment of the present application, step S210 and step S220 can refer to the contents of the aforementioned embodiment and will not be described again here.
[0051] Step S230: Acquire the current processor temperature of the electronic device.
[0052] In the embodiment of the present application, when the electronic device determines the frame rate to be displayed according to the predicted device temperature, the electronic device can also obtain the current processor temperature of the processor of the electronic device to refer to the predicted device temperature of the electronic device after a specified period of time and the current processing temperature to determine the frame rate to be displayed. Among them, a temperature sensor is usually provided in the processor, and the processor can read the temperature collected by the temperature sensor inside it.
[0053] In some embodiments, the processor may include a CPU and a GPU at the same time. After obtaining the CPU temperature and the GPU temperature, the processor temperature may be determined based on the CPU temperature and the GPU temperature. Among them, the weight corresponding to the CPU temperature and the weight corresponding to the GPU temperature may be obtained, and the obtained CPU temperature and GPU temperature may be weighted and summed, and the obtained result may be used as the processor temperature. For example, the weight corresponding to the CPU temperature is Δ1, and the weight dimension corresponding to the GPU temperature is Δ2, then the processor temperature = CPU temperature * Δ1 + GPU temperature * Δ2.
[0054] In this embodiment, the weight corresponding to the CPU temperature and the weight corresponding to the GPU temperature may be less than 1. The weight corresponding to the CPU temperature and the weight corresponding to the GPU temperature may be determined according to the type of the current game. Specifically, if the current game is a game type that consumes more CPU resources than GPU resources, the weight corresponding to the CPU temperature may be greater than the weight corresponding to the GPU temperature, for example, they may be 0.6 and 0.4 respectively; if the CPU resources are less than the game type that consumes GPU resources, the weight corresponding to the CPU temperature may be less than the weight corresponding to the GPU temperature, for example, they may be 0.4 and 0.6 respectively; if the CPU resources are equal to the game type that consumes GPU resources, the weight corresponding to the CPU temperature may be equal to the weight corresponding to the GPU temperature, for example, they may be 0.5 and 0.5 respectively. It can be understood that by referring to the type of the running game and determining the processor temperature, it is possible to more accurately determine the reference standard used to determine the frame rate to be displayed, thereby making the subsequently determined frame rate to be displayed more accurate.
[0055] It should be noted that in the embodiment of the present application, the execution order between step S220 and step S230 may not be limited, step S220 may be before step S230, step S230 may be before step S220, and step S220 and step S230 may also be executed simultaneously.
[0056] Step S240: Determine a frame rate to be displayed based on the predicted device temperature and the processor temperature.
[0057] In an embodiment of the present application, after obtaining the predicted device temperature after the specified predicted duration and the current processor temperature, the electronic device can determine the frame rate to be displayed based on the predicted device temperature and the processor temperature.
[0058] In some embodiments, the electronic device may obtain the difference between the predicted device temperature and the processor temperature. If the difference is greater than a set threshold, it means that the predicted temperature of the electronic device after the specified time is different from the temperature of the current processor, that is, it is expected that the device temperature will change greatly after the specified time. In this case, the electronic device may determine the frame rate to be displayed based on the predicted device temperature. For example, according to the corresponding relationship in the aforementioned embodiment, the display frame rate corresponding to the predicted device temperature is obtained; if the difference is not greater than the set threshold, it means that the predicted temperature of the electronic device after the specified time is different from the temperature of the current processor. That is, it is expected that the device temperature will change less after the specified time. In this case, the electronic device may determine the frame rate to be displayed based on the processor temperature. For example, if the current processor temperature is high (greater than the first preset temperature, for example, greater than 45°C), the display frame rate may be reduced. If the current processor temperature is low (less than the second preset temperature, the first preset temperature is greater than the second preset temperature, for example, less than 25°C), the display frame rate may be increased. The set threshold may be 1°C, 2°C, etc., which is not limited here.
[0059] In other embodiments, the electronic device may also compare the predicted device temperature with the processor temperature. If the predicted device temperature is greater than the processor temperature, it indicates that the temperature of the subsequent electronic device will decrease. Therefore, a frame rate greater than the current display frame rate can be determined as the frame rate to be displayed to increase the display frame rate; if the predicted device temperature is less than the processor temperature, it indicates that the temperature of the subsequent electronic device will rise. Therefore, a frame rate less than the current display frame rate can be determined as the frame rate to be displayed to reduce the display frame rate; if the predicted device temperature is equal to the processor temperature, it can be determined based on the actual processor temperature whether it is too high, thereby determining whether the display frame rate needs to be adjusted, and then determining the frame rate to be displayed. For example, if the processor temperature is greater than the first preset temperature, such as greater than 45°C, the display frame rate can be reduced. If the current processor temperature is less than the second preset temperature, and the first preset temperature is greater than the second preset temperature, such as less than 25°C, the display frame rate can be increased.
[0060] Step S250: adjusting the display frame rate of the electronic device based on the frame rate to be displayed.
[0061] The device control method provided in the embodiment of the present application obtains the current device temperature of the electronic device when running a game, and the running time of the current game, and inputs the current device temperature and the running time into a pre-trained temperature prediction model to obtain the predicted device temperature of the specified time output by the temperature prediction model, and obtains the current processor temperature of the processor of the electronic device, and then jointly determines the frame rate to be displayed based on the current processor temperature and the predicted device temperature, so that the determined frame rate to be displayed is more accurate. After adjusting the display frame rate of the electronic device based on the frame rate to be displayed, the display frame rate can be adjusted in advance, thereby avoiding the problem of serious heating of the electronic device and ensuring the display effect of the game screen.
[0062] See also Figure 3 , Figure 3 A schematic diagram of a device control method according to another embodiment of the present application is shown. The device control method is applied to the above-mentioned electronic device. Figure 3 The process shown is described in detail, and the device control method may specifically include the following steps:
[0063] Step S310: obtaining the current device temperature of the electronic device when the game is running, and the running time of the current game.
[0064] Step S320: input the current device temperature and the operating time into a pre-trained temperature prediction model to obtain the predicted device temperature after a specified time output by the temperature prediction model.
[0065] Step S330: Acquire the current processor temperature of the electronic device.
[0066] In the embodiment of the present application, steps S310 to S330 may refer to the contents of the aforementioned embodiment and will not be described in detail here.
[0067] Step S340: Based on a set temperature conversion model, a first display frame rate corresponding to the processor temperature is obtained.
[0068] In an embodiment of the present application, after obtaining the current processor temperature, the electronic device can obtain a first display frame rate corresponding to the processor temperature based on a set temperature conversion model, that is, based on the current processor temperature, determine the display frame rate required by the electronic device at the current processor temperature.
[0069] In some embodiments, the temperature conversion model can be pre-established and stored in the electronic device. The temperature conversion model may include a corresponding relationship between the processor temperature and the display frame rate, and the corresponding relationship may include the frame rate corresponding to each processor temperature value. The corresponding relationship can be obtained in advance based on a large number of experiments. Under the corresponding relationship, the electronic device displays at the display frame rate corresponding to each processor temperature, which can ensure the display effect of the game screen while ensuring that the temperature will not be too high in the subsequent time. For example, if the current processor temperature is low (for example, less than a set threshold), then in the corresponding relationship, the corresponding display frame rate is high, so that the electronic device can ensure the display effect of the game, and displaying the game screen at the display frame rate will not cause the device temperature to be high; for another example, if the current processor temperature is high (for example, greater than a set threshold), then in the corresponding relationship, the corresponding display frame rate is low, so that the electronic device reduces the processing amount when displaying the game screen, so that the subsequent device temperature will not be too high. Of course, the above is only an example and does not represent a limitation on the actual above corresponding relationship.
[0070] As a way, in the temperature conversion model, if the processor temperature is less than the first temperature value, the corresponding display frame rate is the highest frame rate; if the processor temperature is greater than or equal to the first temperature value and less than the second temperature value, the display frame rate is negatively correlated with the processor temperature; if the processor temperature is greater than or equal to the second temperature value, the corresponding display frame rate is the lowest frame rate. Among them, the highest frame rate is the highest frame rate corresponding to the game, and the lowest frame rate is the lowest frame rate corresponding to the game.
[0071] It can be understood that if the current processor temperature is less than the first temperature value, it means that the processor temperature is low, and therefore, it can be displayed at the highest frame rate; if the current processor temperature is greater than or equal to the first temperature value, and less than the second temperature value, it means that the processor temperature is relatively high, and therefore cannot be displayed at the highest frame rate, and the display frame rate is negatively correlated with the processor temperature. Each time the process of the device control method provided in the embodiment of the present application is executed, if the processor temperature continues to rise relative to the last time, the display frame rate is reduced relative to the last time. Due to the reduction in the display frame rate, the processing capacity of the electronic device is reduced, and the heat generation is also reduced, thereby achieving the reduction in the temperature of the electronic device; if the current processor temperature is greater than the second temperature value, it means that the processor temperature is already very high, and the display frame rate has been reduced to a certain extent. If the display frame rate is reduced further, the operation of the game cannot be guaranteed. Therefore, this is the minimum frame rate corresponding to the game.
[0072] In some cases, different games require different game frame rates, and the temperature conversion model needs to refer to the frame rate required by the game. Therefore, the temperature conversion model can be determined based on the highest frame rate corresponding to the game. For example, see Figure 4 , Figure 4 FIG. 1 shows a schematic diagram of a temperature conversion model corresponding to a maximum frame rate of 60 frames. In the temperature conversion model, the maximum display frame rate is 60 frames and the minimum display frame rate is 40 frames. For another example, see Figure 5 , Figure 5 A schematic diagram of a temperature conversion model corresponding to a maximum frame rate of 60 frames is shown. In the temperature conversion model, the maximum display frame rate is 90 frames and the minimum display frame rate is 60 frames.
[0073] Of course, the above temperature conversion model is only an example, and the temperature conversion model can also be a neural network model obtained through training, etc., which is not limited here.
[0074] Step S350: Compare the predicted device temperature with the processor temperature to obtain a comparison result.
[0075] In an embodiment of the present application, the electronic device may compare the predicted device temperature with the processor temperature. If the predicted device temperature is greater than the processor temperature, it indicates that the temperature of the subsequent electronic device will decrease; if the predicted device temperature is less than the processor temperature, it indicates that the temperature of the subsequent electronic device will increase; if the predicted device temperature is equal to the processor temperature, it indicates that the temperature of the subsequent electronic device will not change.
[0076] Step S360: Based on the comparison result, the first display frame rate is adjusted to obtain a second display frame rate as the frame rate to be displayed.
[0077] In the embodiment of the present application, since the change of the device temperature of the electronic device relative to the processor temperature can be predicted, the change can also be referred to when determining the frame rate to be displayed. Therefore, the electronic device can adjust the first display frame rate based on the above comparison result to obtain the second display frame rate as the frame rate to be displayed.
[0078] In some implementations, the electronic device adjusts the first display frame rate based on the comparison result to obtain the second display frame rate, which may include:
[0079] If the predicted device temperature is lower than the processor temperature, the first display frame rate is increased to obtain a second display frame rate; if the predicted device temperature is higher than the processor temperature, the first display frame rate is reduced to obtain a second display frame rate.
[0080] It can be understood that if the predicted device temperature is greater than the processor temperature, it means that the temperature of the subsequent electronic device will decrease. Therefore, the acquired first display frame rate can be improved to make the display effect of the game screen better; if the predicted device temperature is lower than the processor temperature, it means that the temperature of the subsequent electronic device will increase. Therefore, the acquired first display frame rate can be reduced to further solve the heating problem; if the predicted device temperature is lower than the processor temperature, it means that the temperature of the subsequent electronic device will not change. At this time, the acquired first display frame rate can be used as the frame rate to be displayed.
[0081] Under this embodiment, when the electronic device predicts that the device temperature is lower than the processor temperature, the first display frame rate is increased to obtain the second display frame rate, which may include: obtaining the product of the first display frame rate and a first coefficient to obtain a first target frame rate, wherein the first coefficient is greater than 1; if the first target frame rate is lower than the maximum frame rate corresponding to the game, using the first target frame rate as the second display frame rate; if the first target frame rate is greater than or equal to the maximum frame rate corresponding to the game, using the maximum frame rate as the second display frame rate.
[0082] It can be understood that after the electronic device obtains the product of the first display frame rate and the first coefficient according to the pre-set first coefficient, since the first coefficient is greater than 1, the first display frame rate is improved; then, by comparing the first target frame rate with the maximum frame rate corresponding to the game, when the first target frame rate is less than the maximum frame rate corresponding to the game, the first target frame rate is used as the second display frame rate; when the first target frame rate is greater than or equal to the maximum frame rate corresponding to the game, the maximum frame rate is used as the second display frame rate, thereby improving the first display frame rate while avoiding the determined frame rate to be displayed from exceeding the maximum frame rate corresponding to the game, thereby avoiding waste of resources.
[0083] In this embodiment, when the electronic device predicts that the device temperature is greater than the processor temperature, the first display frame rate is reduced to obtain a second display frame rate, which may include: obtaining the product of the first display frame rate and a second coefficient to obtain a second target frame rate, wherein the second coefficient is less than 1; if the second target frame rate is greater than the minimum frame rate corresponding to the game, using the second target frame rate as the second display frame rate; if the second target frame rate is less than or equal to the minimum frame rate corresponding to the game, using the minimum frame rate as the second display frame rate.
[0084] It can be understood that after the electronic device obtains the product of the first display frame rate and the first coefficient according to the pre-set second coefficient, since the first coefficient is less than 1, the first display frame rate is reduced; then, by comparing the second target frame rate with the maximum frame rate corresponding to the game, when the second target frame rate is greater than the minimum frame rate corresponding to the game, the second target frame rate is used as the second display frame rate; when the second target frame rate is less than or equal to the minimum frame rate corresponding to the game, the minimum frame rate is used as the second display frame rate, thereby reducing the first display frame rate while avoiding the determined frame rate to be displayed being lower than the minimum frame rate corresponding to the game, thereby avoiding problems when the game is running.
[0085] Step S370: adjusting the display frame rate of the electronic device based on the frame rate to be displayed.
[0086] The device control method provided in the embodiment of the present application obtains the current device temperature of the electronic device when running the game, and the running time of the current game, inputs the current device temperature and the running time into the pre-trained temperature prediction model, obtains the predicted device temperature of the specified time output by the temperature prediction model, and obtains the current processor temperature of the processor of the electronic device, determines the initial display frame rate based on the current processor temperature, and then adjusts the display frame rate according to the comparison result between the predicted device temperature and the processor temperature to obtain the final frame rate to be displayed, thereby determining the frame rate to be displayed with reference to the predicted future temperature and the current processor temperature, so that the accuracy of the determined frame rate to be displayed is higher. After adjusting the display frame rate of the electronic device based on the frame rate to be displayed, the display frame rate can be adjusted in advance, avoiding the problem of serious heating of the electronic device, and ensuring the display effect of the game screen.
[0087] See also Figure 6 , Figure 6 A schematic diagram of a device control method provided by another embodiment of the present application is shown. The device control method is applied to the above electronic device. Figure 6 The process shown is described in detail, and the device control method may specifically include the following steps:
[0088] Step S410: obtaining the current device temperature of the electronic device when the game is running, and the running time of the current game.
[0089] Step S420: input the current device temperature and the operating time into a pre-trained temperature prediction model to obtain the predicted device temperature after a specified time output by the temperature prediction model.
[0090] Step S430: Determine the frame rate to be displayed based on the predicted device temperature.
[0091] In the embodiment of the present application, steps S410 to S430 can refer to the contents of the aforementioned embodiment and will not be described in detail here.
[0092] Step S440: Obtaining frame rate statistics when the electronic device runs the game.
[0093] In an embodiment of the present application, after determining the frame rate to be displayed, the electronic device can also refer to the frame rate performance of the electronic device when running the game, and correct the determined frame rate to be displayed, so that the determined frame rate to be displayed can correspond to the actual performance of the electronic device, thereby improving the final display frame rate adjustment effect. Among them, the electronic device can obtain a frame rate statistical record when the electronic device runs the game. The frame rate statistical record can be the frame rate of all game screens presented during the current running of the game, or the frame rate of all game screens presented during the previous running of the game, or the frame rate of all game screens recorded within a preset time period during the current running of the game.
[0094] Step S450: Correcting the frame rate to be displayed based on the frame rate statistical record.
[0095] In the embodiment of the present application, after acquiring the frame rate statistical record, the electronic device can correct the frame rate to be displayed.
[0096] As a method, the electronic device corrects the frame rate to be displayed based on the frame rate statistical record, which may include: obtaining the median frame rate within a preset time length based on the frame rate statistical record; based on the weights corresponding to the median frame rate and the frame rate to be displayed, performing weighted summation on the median frame rate and the frame rate to be displayed to obtain the corrected frame rate to be displayed. In this method, the weight corresponding to the median frame rate and the weight corresponding to the frame rate to be displayed can be preset, and the specific values may not be limited. For example, the weight corresponding to the median frame rate is 0.5, and the weight corresponding to the frame rate to be displayed is 0.5; the final corrected frame rate to be displayed is: median frame rate*Δ3+frame rate to be displayed*Δ4, where Δ3 is the weight corresponding to the median frame rate, and Δ4 is the weight corresponding to the frame rate to be displayed.
[0097] Step S460: adjusting the display frame rate of the electronic device based on the corrected frame rate to be displayed.
[0098] The device control method provided in the embodiment of the present application determines the frame rate to be displayed based on the current processor temperature and the predicted device temperature after a specified period of time, and then refers to the frame rate performance of the electronic device when running a game to correct the determined frame rate to be displayed, so that the determined frame rate to be displayed can correspond to the actual performance of the electronic device, thereby improving the final display frame rate adjustment effect.
[0099] In some embodiments, the above embodiments may also be combined. Figure 7 , Figure 7 Embodiment A schematic diagram of a device control method provided in an embodiment of the present application. Among them, the electronic device can determine the current device temperature based on the temperature data collected by the sensor, and based on the current device temperature and the current running time, predict the predicted device temperature after a specified time through the temperature prediction module; in addition, the processor temperature can be determined according to the CPU temperature and the GPU temperature; the frame rate calculation module determines the frame rate to be displayed according to the processor temperature and the predicted device temperature; then, the frame rate correction module can correct the frame rate to be displayed according to the frame rate information counted by the runtime frame rate statistics module; finally, the display module adjusts the current display frame rate according to the corrected frame rate to be displayed. Thus, it is possible to adjust the display frame rate according to the predicted device temperature, the current processor temperature, and the frame rate displayed during the electronic device running the game, so as to avoid the temperature of the electronic device being too high and ensure the display effect of the game screen.
[0100] See also Figure 8 , which shows a structural block diagram of a device control device 400 provided in an embodiment of the present application. The device control device 400 applies the above-mentioned electronic device, and the device control device 400 includes: a temperature acquisition module 410, a temperature prediction module 420, a frame rate determination module 430 and a frame rate adjustment module 440. Among them, the temperature acquisition module 410 is used to obtain the current device temperature of the electronic device when running the game, and the running time of running the game; the temperature prediction module 420 is used to input the current device temperature and the running time into a pre-trained temperature prediction model to obtain the predicted device temperature after the specified time output by the temperature prediction model; the frame rate determination module 430 is used to determine the frame rate to be displayed based on the predicted device temperature; the frame rate adjustment module 440 is used to adjust the display frame rate of the electronic device based on the frame rate to be displayed.
[0101] In some embodiments, the device control apparatus 400 may further include: a processor temperature acquisition module. The processor temperature acquisition module is used to acquire the current processor temperature of the electronic device; the frame rate determination module 430 may be specifically used to: determine the frame rate to be displayed based on the predicted device temperature and the processor temperature.
[0102] In this embodiment, the frame rate determination module 430 may include: a first frame rate acquisition unit, a temperature comparison unit, and a second frame rate acquisition unit. The first frame rate acquisition unit is used to acquire a first display frame rate corresponding to the processor temperature based on a set temperature conversion model; the temperature comparison unit is used to compare the predicted device temperature with the processor temperature to obtain a comparison result; and the second frame rate acquisition unit is used to adjust the first display frame rate based on the comparison result to obtain a second display frame rate as the frame rate to be displayed.
[0103] In this manner, the second frame rate acquisition unit can be specifically used to: if the predicted device temperature is lower than the processor temperature, increase the first display frame rate to obtain the second display frame rate; if the predicted device temperature is higher than the processor temperature, reduce the first display frame rate to obtain the second display frame rate.
[0104] As a way, the second frame rate acquisition unit improves the first display frame rate, which may include: obtaining the product of the first display frame rate and a first coefficient to obtain a first target frame rate, wherein the first coefficient is greater than 1; if the first target frame rate is less than the maximum frame rate corresponding to the game, then using the first target frame rate as the second display frame rate; if the first target frame rate is greater than or equal to the maximum frame rate corresponding to the game, then using the maximum frame rate as the second display frame rate.
[0105] As a way, the second frame rate acquisition unit reduces the first display frame rate, which may include: obtaining the product of the first display frame rate and a second coefficient to obtain a second target frame rate, wherein the second coefficient is less than 1; if the second target frame rate is greater than the minimum frame rate corresponding to the game, then using the second target frame rate as the second display frame rate; if the second target frame rate is less than or equal to the minimum frame rate corresponding to the game, then using the minimum frame rate as the second display frame rate.
[0106] In some embodiments, the device control apparatus 400 may further include a frame rate statistics module and a frame rate correction module. The frame rate statistics module is used to obtain a frame rate statistics record when the electronic device runs the game before adjusting the display frame rate of the electronic device based on the frame rate to be displayed; the frame rate correction module is used to correct the frame rate to be displayed based on the frame rate statistics record. The frame rate adjustment module 440 may be specifically used to adjust the display frame rate of the electronic device based on the corrected frame rate to be displayed.
[0107] In this embodiment, the frame rate correction module can be specifically used to: obtain the median frame rate within a preset time length based on the frame rate statistical record; based on the weights corresponding to the median frame rate and the frame rate to be displayed, perform weighted summation on the median frame rate and the frame rate to be displayed to obtain the corrected frame rate to be displayed.
[0108] In some embodiments, the device control apparatus 400 may further include a sample acquisition module and a model training module. The sample acquisition module is used to obtain the historical device temperature of the electronic device when the electronic device runs the game for different durations; the model training module is used to train the initial model based on the historical device temperature and its corresponding running duration to obtain the temperature prediction model.
[0109] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices and modules can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here.
[0110] In several embodiments provided in the present application, the coupling between modules may be electrical, mechanical or other forms of coupling.
[0111] In addition, each functional module in each embodiment of the present application can be integrated into a processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The above integrated modules can be implemented in the form of hardware or software functional modules.
[0112] In summary, the solution provided by the present application obtains the current device temperature of the electronic device when running the game, as well as the running time of the current game, and inputs the current device temperature and running time into a pre-trained temperature prediction model to obtain the predicted device temperature for a specified time output by the temperature prediction model, and then determines the frame rate to be displayed based on the predicted device temperature, and adjusts the display frame rate of the electronic device based on the frame rate to be displayed, thereby achieving the display frame rate adjustment in advance according to the predicted future temperature when the electronic device runs the game, thereby avoiding the problem of serious heating of the electronic device.
[0113] Please refer to Fig. 9, which shows a structural block diagram of an electronic device provided in an embodiment of the present application. The electronic device 100 may be an electronic device capable of running applications, such as a smart phone, a tablet computer, a smart watch, smart glasses, a laptop computer, etc. The electronic device 100 in the present application may include one or more of the following components: a processor 110, a memory 120, and one or more applications, wherein the one or more applications may be stored in the memory 120 and configured to be executed by one or more processors 110, and the one or more programs are configured to execute the method described in the aforementioned method embodiment.
[0114] The processor 110 may include one or more processing cores. The processor 110 uses various interfaces and lines to connect various parts of the entire electronic device 100, and executes various functions and processes data of the electronic device 100 by running or executing instructions, programs, code sets or instruction sets stored in the memory 120, and calling data stored in the memory 120. Optionally, the processor 110 can be implemented in at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), and programmable logic array (PLA). The processor 110 can integrate one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), and a modem. Among them, the CPU mainly processes the operating system, user interface, and application programs; the GPU is responsible for rendering and drawing display content; and the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 110, but may be implemented separately through a communication chip.
[0115] The memory 120 may include a random access memory (RAM) or a read-only memory (ROM). The memory 120 may be used to store instructions, programs, codes, code sets or instruction sets. The memory 120 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the following various method embodiments, etc. The data storage area may also store data (such as a phone book, audio and video data, chat record data) created by the electronic device 100 during use.
[0116] Please refer to Fig.10 , which shows a structural block diagram of a computer-readable storage medium provided in an embodiment of the present application. The computer-readable medium 800 stores program codes, which can be called by a processor to execute the method described in the above method embodiment.
[0117] The computer readable storage medium 800 may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read-only memory), an EPROM, a hard disk, or a ROM. Optionally, the computer readable storage medium 800 includes a non-transitory computer-readable storage medium. The computer readable storage medium 800 has storage space for program code 810 that performs any method step in the above method. These program codes can be read from or written to one or more computer program products. The program code 810 can be compressed, for example, in an appropriate form.
[0118] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A device control method, characterized in that: Applied to electronic equipment, the method comprises: Acquire the current device temperature of the electronic device when running the game, and the running time of the current game, where the running time is the running time of the game during the current game running process when the current device temperature is acquired; Inputting the current device temperature and the operating time into a pre-trained temperature prediction model to obtain a predicted device temperature after a specified time period output by the temperature prediction model; Obtaining the current processor temperature of the electronic device; Based on a set temperature conversion model, acquiring a first display frame rate corresponding to the processor temperature; Comparing the predicted device temperature with the processor temperature to obtain a comparison result; Based on the comparison result, adjusting the first display frame rate to obtain a second display frame rate as the frame rate to be displayed; Obtaining a frame rate statistical record when the electronic device runs the game; Based on the frame rate statistical record, correcting the frame rate to be displayed; Based on the corrected frame rate to be displayed, the display frame rate of the electronic device is adjusted.
2. The method according to claim 1, characterized in that The adjusting the first display frame rate based on the comparison result to obtain a second display frame rate includes: If the predicted device temperature is lower than the processor temperature, increasing the first display frame rate to obtain a second display frame rate; If the predicted device temperature is greater than the processor temperature, the first display frame rate is reduced to obtain a second display frame rate.
3. The method according to claim 2, characterized in that The step of increasing the first display frame rate includes: Obtaining a product of the first display frame rate and a first coefficient to obtain a first target frame rate, wherein the first coefficient is greater than 1; If the first target frame rate is lower than the maximum frame rate corresponding to the game, using the first target frame rate as the second display frame rate; If the first target frame rate is greater than or equal to the maximum frame rate corresponding to the game, the maximum frame rate is used as the second display frame rate.
4. The method according to claim 2, characterized in that: The reducing the first display frame rate includes: Obtaining a product of the first display frame rate and a second coefficient to obtain a second target frame rate, wherein the second coefficient is less than 1; If the second target frame rate is greater than the minimum frame rate corresponding to the game, using the second target frame rate as the second display frame rate; If the second target frame rate is less than or equal to the minimum frame rate corresponding to the game, the minimum frame rate is used as the second display frame rate.
5. The method according to claim 1, characterized in that The correcting the frame rate to be displayed based on the frame rate statistical record includes: Based on the frame rate statistical record, obtaining a median frame rate within a preset time length; Based on the weights corresponding to the median frame rate and the frame rate to be displayed, a weighted sum is performed on the median frame rate and the frame rate to be displayed to obtain a corrected frame rate to be displayed.
6. The method according to any one of claims 1 to 5, characterized in that: Before inputting the current device temperature and the operating time into a pre-trained temperature prediction model to obtain a predicted device temperature after a specified time period output by the temperature prediction model, the method further includes: Obtain historical device temperatures of the electronic device during the running of the game for different running time periods; Based on the historical device temperatures and their corresponding operating time, an initial model is trained to obtain the temperature prediction model.
7. A device control device, characterized in that: Applied to electronic equipment, the device includes: a temperature acquisition module, a temperature prediction module, a processor temperature acquisition module, a frame rate determination module, a frame rate statistics module, a frame rate correction module and a frame rate adjustment module, wherein: The temperature acquisition module is used to acquire the current device temperature of the electronic device when running the game, and the running time of the game, wherein the running time is the running time of the game during the current game running process when the current device temperature is acquired; The temperature prediction module is used to input the current device temperature and the operating time into a pre-trained temperature prediction model to obtain the predicted device temperature after a specified time output by the temperature prediction model; The processor temperature acquisition module is used to acquire the current processor temperature of the electronic device; The frame rate determination module is used to obtain a first display frame rate corresponding to the processor temperature based on a set temperature conversion model; compare the predicted device temperature with the processor temperature to obtain a comparison result; and adjust the first display frame rate based on the comparison result to obtain a second display frame rate as the frame rate to be displayed; The frame rate statistics module is used to obtain the frame rate statistics record when the electronic device runs the game; The frame rate correction module is used to correct the frame rate to be displayed based on the frame rate statistical record; The frame rate adjustment module is used to adjust the display frame rate of the electronic device based on the corrected frame rate to be displayed.
8. An electronic device, characterized in that: include: one or more processors; Memory; One or more application programs, wherein the one or more application programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs are configured to execute the method according to any one of claims 1-6.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores program codes, which can be called by a processor to execute the method according to any one of claims 1 to 6.
