CN117687585A - Refresh rate control method, electronic device and storage medium - Google Patents

Refresh rate control method, electronic device and storage medium Download PDF

Info

Publication number
CN117687585A
CN117687585A CN202310842435.XA CN202310842435A CN117687585A CN 117687585 A CN117687585 A CN 117687585A CN 202310842435 A CN202310842435 A CN 202310842435A CN 117687585 A CN117687585 A CN 117687585A
Authority
CN
China
Prior art keywords
electronic device
game
refresh rate
frame
rate
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310842435.XA
Other languages
Chinese (zh)
Inventor
高浠植
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honor Device Co Ltd
Original Assignee
Honor Device Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202310842435.XA priority Critical patent/CN117687585A/en
Publication of CN117687585A publication Critical patent/CN117687585A/en
Pending legal-status Critical Current

Links

Landscapes

  • Controls And Circuits For Display Device (AREA)

Abstract

The application provides a refresh rate control method, electronic equipment and a storage medium, wherein the method comprises the following steps: the electronic device displays a desktop, the desktop including icons of a first game application; the electronic equipment receives and responds to a first operation of a user aiming at an icon of a first game application, and a first refresh rate is determined based on parameter information of the electronic equipment; the electronic device refreshes and displays the picture frame of the first game application at a first refresh rate; wherein the parameter information of the electronic device includes one or more of: game scene information, jitter scene information, game mode information, temperature information, frame inserting information, game split screen display information and refresh rate information set by a user. In this way, the electronic device can determine the optimal refresh rate based on one or more factors, and dynamically adjust the screen refresh rate, so that the power consumption and the user experience of the electronic device are optimal in the game process, the power consumption of the electronic device is saved, and the game experience of the user is improved.

Description

Refresh rate control method, electronic device and storage medium
Technical Field
The present disclosure relates to the field of terminal technologies, and in particular, to a refresh rate control method, an electronic device, and a storage medium.
Background
As the market for applications on electronic devices expands further, some application vendors (e.g., vendors of gaming applications) begin to use real physics engines, high precision rendering, etc. techniques in the applications, which also place higher demands on the performance of the electronic devices. Therefore, the electronic device also schedules more system resources such as processing capacity, storage capacity, and the like, and completes rendering and composite display of the picture frames of the application. This also brings more power consumption to the electronic device, causing increased heating of the electronic device, affecting the user's experience of using the application.
Disclosure of Invention
The application provides a refresh rate control method, electronic equipment and a storage medium, wherein the electronic equipment can dynamically adjust the screen refresh rate, so that the power consumption of the electronic equipment is saved, and the game experience of a user is improved.
In a first aspect, the present application provides a refresh rate control method, including: the electronic device displays a desktop, the desktop including icons of a first game application; the electronic equipment receives and responds to a first operation of a user aiming at an icon of a first game application, and a first refresh rate is determined based on parameter information of the electronic equipment; the electronic device refreshes and displays the picture frame of the first game application at a first refresh rate; wherein the parameter information of the electronic device includes one or more of: game scene information, jitter scene information, game mode information, temperature information, frame inserting information, game split screen display information and refresh rate information set by a user.
Wherein the first refresh rate refers to a screen refresh rate.
The frame of the first game application may be a frame of a game loading scene or a frame of a game playing scene. Wherein the picture frame before entering the game play pair may be referred to as the picture frame of the game loading scene.
Therefore, the electronic equipment can jointly determine the optimal refresh rate and dynamically adjust the screen refresh rate based on one or more factors, so that the power consumption and the user experience of the electronic equipment are optimal in the game process, the power consumption of the electronic equipment is saved, and the game experience of the user is improved.
With reference to the first aspect, in one possible implementation manner, the number information includes game scene information, and the game scene information includes game loading scene information and game play scene information; the electronic device receives and responds to a first operation of a user aiming at an icon of a first game application, and determines a first refresh rate based on parameter information of the electronic device, and the method specifically comprises the following steps: the electronic equipment receives and responds to a first operation of a user on an icon of a first game application, and displays a first picture frame of the first game application, wherein the first picture frame comprises a game starting option, and the first picture frame is a picture frame of a game loading scene; the electronic device determines a first refresh rate based on the game loading scene information; the electronic device refreshes and displays the picture frame of the first game application at a first refresh rate, and specifically comprises the following steps: the electronic device refreshes the display of the first picture frame at the first refresh rate.
In this way, the electronic device may determine different screen refresh rates based on different game scenarios. In the game loading scene, the electronic equipment can reduce the screen refresh rate and save the power consumption of the electronic equipment.
With reference to the first aspect, in one possible implementation manner, after the electronic device refreshes and displays the first frame at the first refresh rate, the method further includes: the electronic device receives and responds to a second operation of the user aiming at the game starting option, and determines a second refresh rate based on game opposite scene information; the electronic equipment refreshes and displays a second picture frame of the first game application at a second refreshing rate, wherein the second picture frame is a picture frame of a game scene; wherein the second refresh rate is greater than the first refresh rate.
Wherein the second picture frame is displayed after the electronic device receives a second operation of the user for starting the game option. The second picture frame may include an exit game play scene option. The user may stop displaying the second frame of the first game application and begin displaying the first frame of the first game application by exiting the game play scene option in the second frame.
In this way, the electronic device may determine different screen refresh rates based on different game scenarios. In a game play scene, the electronic equipment can improve the screen refresh rate so as to improve the fluency of game pictures and improve the user experience. In the game loading scene, the electronic equipment can reduce the screen refresh rate and save the power consumption of the electronic equipment.
With reference to the first aspect, in one possible implementation manner, the parameter information includes game loading scene information and game play scene information; the electronic device receives and responds to a first operation of a user aiming at an icon of a first game application, and determines a first refresh rate based on parameter information of the electronic device, and the method specifically comprises the following steps: the electronic equipment receives and responds to a first operation of a user on an icon of a first game application, and displays a second picture frame of the first game application, wherein the second picture frame is a picture frame of a game scene; the electronic device determines a first refresh rate based on the game play scene information; the electronic device refreshes and displays the picture frame of the first game application at a first refresh rate, and specifically comprises the following steps: the electronic device refreshes a second picture frame displaying the first gaming application at the first refresh rate.
In this way, the user may have previously run the first gaming application in the background. After the user clicks on the icon of the first game application, the first game application may be run in the foreground. And determining the refresh rate corresponding to the game play scene based on the game play scene.
With reference to the first aspect, in a possible implementation manner, before the electronic device determines the second refresh rate based on the game play scene information, the method further includes: under the condition that the first condition is met, the electronic equipment determines game play scene information; the first condition includes one or more of: the average rendering frame rate of the continuous p-frame picture frames is larger than a first preset value; the standard deviation of the rendering time of the p-frame picture frames is smaller than a second preset value; the number of DrawCall operations in the first duration is larger than a third preset value; the number of IO operations in the first duration is greater than a fourth preset value.
Thus, the electronic device assists in identifying the game loading scene and the game play scene based on the above conditions, so as to improve the accuracy of the electronic device in adjusting the screen refresh rate based on the game scene.
With reference to the first aspect, in one possible implementation manner, the parameter information includes jitter scene information, the electronic device receives and responds to a first operation of a user on an icon of a first game application, and determines a target refresh rate based on the parameter information of the electronic device, and specifically includes: after the electronic device receives and responds to the first operation of the user on the icon of the first game application, the electronic device determines a target refresh rate based on the dithering scene information under the condition that the second condition is not met; wherein the second condition comprises one or more of: the difference value between the average rendering frame rate of at least n frames in the m windows and the average rendering frame rate of the frames in the m windows is within a fifth preset value, wherein each window comprises a preset number of frames; the difference value between the average rendering frame rate and the set frame rate of the m frames in the window is within a sixth preset value; the standard deviation of the synthetic time of the picture frames in the m windows is smaller than a seventh preset value; the CPU load of the electronic device is less than an eighth preset value.
Wherein the set frame rate may be a game frame rate set by the user within the first game application.
With reference to the first aspect, in one possible implementation manner, the parameter information includes game information, the game information includes a set frame rate, the electronic device receives and responds to a first operation of a user on an icon of a first game application, and determines a target refresh rate based on the parameter information of the electronic device specifically includes: after the electronic device receives and responds to a first operation of the user on the icon of the first game application, the electronic device determines a target refresh rate based on the set frame rate under the condition that the electronic device acquires the set frame rate; wherein the value of the target refresh rate is equal to or greater than the value of the set frame rate.
Wherein the set frame rate may be a game frame rate set by the user within the first game application.
In some embodiments, the first gaming application may report the set frame rate to the electronic device such that the electronic device may obtain the set frame rate. In other embodiments, the first game application may not report the set frame rate to the electronic device, and the electronic device may not obtain the set frame rate.
Under the condition that the electronic equipment can acquire the set frame rate, the electronic equipment can adjust the screen refresh rate based on the set frame rate, and the screen refresh rate needs to be greater than or equal to the set frame rate.
With reference to the first aspect, in one possible implementation manner, the method further includes: under the condition that the electronic equipment cannot acquire the set frame rate, the electronic equipment counts the average frame rate of the multi-frame picture frames in the first time period, and acquires the set frame rate; the electronic device determines a target refresh rate based on the set frame rate; the value of the target refresh rate is greater than or equal to the value of the average frame rate of the multi-frame picture frames in the first time duration.
In the case where the electronic device cannot acquire the set frame rate, the electronic device may release the screen refresh rate control. So that this female consideration of the first game can run to the set frame rate. And then, the electronic equipment can count the average frame rate in a certain time length to obtain the set frame rate. And determining the screen refresh rate based on the estimated set frame rate. The value of the target refresh rate is greater than or equal to the value of the average frame rate of the multi-frame picture frames in the first time duration.
With reference to the first aspect, in one possible implementation manner, the first game application is allocated with q buffers; before the electronic device obtains the set frame rate, the method further comprises: the electronic equipment applies for s buffers additionally; the electronic device renders the picture frame based on the (q+s) buffers and the set frame rate.
In this way, the electronic device can dynamically allocate s buffers to the first game application, so that the game frame rate can run to the set frame rate based on a sufficient number of buffers, and the electronic device can obtain the set frame rate through statistics.
With reference to the first aspect, in one possible implementation manner, the parameter information includes game mode information, the electronic device receives and responds to a first operation of a user on an icon of a first game application, and determines a target refresh rate based on the parameter information of the electronic device, and specifically includes: after the electronic device receives and responds to a first operation of a user on an icon of a first game application, the electronic device acquires a game frame rate of the first game application; the electronic device determines a target refresh rate based on the value of the game frame rate and the game mode information.
Here, the game frame rate may be a default frame rate of the game, or may be a frame rate set by the user, which is not limited in this application.
The first gaming application may provide a plurality of different gaming modes, with different gaming modes having different screen refresh rates determined based on the gaming frame rate. For example, the game mode may include a performance mode, an equalization mode, a power saving mode, and the like.
With reference to the first aspect, in one possible implementation manner, the electronic device receives and responds to a first operation of a user on an icon of a first game application, and determines a first refresh rate based on parameter information of the electronic device, and specifically includes: the electronic equipment determines the total ticket number of each refresh rate in the refresh rates based on the value of the parameter information and the ticket number relation between the value of the parameter information and the refresh rates; the electronic device determines one of the plurality of refresh rates having the highest total number of tickets as a target refresh rate.
In this way, the electronic device can combine the plurality of parameter information to jointly determine the optimal refresh rate. So that both the power consumption of the electronic device and the performance of the game are balanced.
In a second aspect, the present application provides an electronic device, comprising: one or more processors and one or more memories; wherein the one or more memories are coupled to the one or more processors, the one or more memories being operable to store computer program code comprising computer instructions that, when executed by the one or more processors, cause the electronic device to perform the method of any of the above-described first aspect and possible implementations of the first aspect.
In a third aspect, the present application provides another electronic device comprising one or more functional modules for performing the method of the first aspect and any of the possible implementation manners of the first aspect.
In a fourth aspect, the present application provides a chip system for application in an electronic device, the chip system comprising processing circuitry and interface circuitry, the interface circuitry for receiving instructions and transmitting to the processing circuitry, the processing circuitry for executing instructions to perform the method of the first aspect and any one of the possible implementations of the first aspect.
In a fifth aspect, the present application provides a computer readable storage medium comprising instructions, characterized in that the instructions, when run on an electronic device, cause the method of any one of the above-mentioned first aspect and possible implementation manners of the first aspect to be performed.
In a sixth aspect, embodiments of the present application provide a computer program product, which when run on a computer causes the computer to perform the method of the first aspect and any one of the possible implementations of the first aspect.
The advantages of the second aspect and the sixth aspect may be referred to as the advantages of any one of the possible implementations of the first aspect and the first aspect, and are not described here again.
Drawings
Fig. 1A shows a schematic structural diagram of an electronic device 100 provided in an embodiment of the present application;
fig. 1B shows a software architecture diagram of an electronic device 100 provided in an embodiment of the present application;
FIG. 1C illustrates a schematic diagram of an electronic device 100 regulating refresh rate provided in an embodiment of the present application;
FIG. 2 shows a timing diagram of a picture frame provided in an embodiment of the present application from rendering to display;
3A-3D illustrate schematic diagrams of entering a game scene based on a first game application;
Fig. 4 shows a schematic diagram of a method for electronic device 100 to obtain a DrawCall number;
FIGS. 5A-5D are schematic illustrations provided herein;
FIG. 6 shows a schematic diagram of an electronic device 100 rendering and displaying a visual frame;
FIG. 7 is a schematic diagram of another electronic device 100 rendering and displaying a visual frame;
FIG. 8 illustrates a schematic diagram of one determination of an optimal refresh rate provided in an embodiment of the present application;
fig. 9 is a schematic diagram of a method for controlling a refresh rate according to the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and thoroughly described below with reference to the accompanying drawings. Wherein, in the description of the embodiments of the present application, "/" means or is meant unless otherwise indicated, for example, a/B may represent a or B; the text "and/or" is merely an association relation describing the associated object, and indicates that three relations may exist, for example, a and/or B may indicate: the three cases where a exists alone, a and B exist together, and B exists alone, and in addition, in the description of the embodiments of the present application, "plural" means two or more than two.
The terms "first," "second," and the like, are used below for descriptive purposes only and are not to be construed as implying or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include one or more such feature, and in the description of embodiments of the present application, unless otherwise indicated, the meaning of "a plurality" is two or more.
The following describes a hardware structure of an electronic device provided in an embodiment of the present application.
Fig. 1A shows a schematic structural diagram of an electronic device 100 provided in an embodiment of the present application.
It should be understood that the electronic device 100 shown in fig. 1A is only one example, and that the electronic device 100 may have more or fewer components than shown in fig. 1A, may combine two or more components, or may have a different configuration of components. The various components shown in fig. 1A may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and/or application specific integrated circuits.
The electronic device 100 may include: processor 110, external memory interface 120, internal memory 121, antenna 1, antenna 2, mobile communication module 1510, wireless communication module 1610, audio module 170, speaker 170A, receiver 170B, microphone 170C, headset interface 170D, sensor module 180, keys 190, motor 191, indicator 192, camera 193, display 194, and subscriber identity module (subscriber identification module, SIM) card interface 195, among others. Among them, the sensor module 180 may include a gyro sensor 180B, an acceleration sensor 180E, a touch sensor 180K, and the like.
It should be understood that the illustrated structure of the embodiment of the present invention does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, electronic device 100 may include more or fewer components than shown, or certain components may be combined, or certain components may be split, or different arrangements of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
The processor 110 may include one or more processing units, such as: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a memory, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and/or a neural network processor (neural-network processing unit, NPU), etc. Wherein the different processing units may be separate devices or may be integrated in one or more processors.
The controller may be a neural hub and a command center of the electronic device 100, among others. The controller can generate operation control signals according to the instruction operation codes and the time sequence signals to finish the control of instruction fetching and instruction execution.
A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may hold instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to reuse the instruction or data, it can be called directly from the memory. Repeated accesses are avoided and the latency of the processor 110 is reduced, thereby improving the efficiency of the system.
The wireless communication function of the electronic device 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 1510, the wireless communication module 1610, a modem processor, a baseband processor, and the like.
The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in the electronic device 100 may be used to cover a single or multiple communication bands. Different antennas may also be multiplexed to improve the utilization of the antennas. For example: the antenna 1 may be multiplexed into a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
The mobile communication module 1510 may provide solutions for wireless communications, including 2G/3G/4G/5G, as applied to the electronic device 100. The mobile communication module 1510 may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA), etc. The mobile communication module 1510 may receive electromagnetic waves from the antenna 1, filter, amplify, and the like the received electromagnetic waves, and transmit the electromagnetic waves to a modem processor for demodulation. The mobile communication module 1510 may amplify the signal modulated by the modem processor, and convert the signal into electromagnetic waves through the antenna 1 for radiation. In some embodiments, at least some of the functional modules of the mobile communication module 1510 may be disposed in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 1510 may be provided in the same device as at least some of the modules of the processor 110.
The modem processor may include a modulator and a demodulator. The modulator is used for modulating the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used for demodulating the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low frequency baseband signal to the baseband processor for processing. The low frequency baseband signal is processed by the baseband processor and then transferred to the application processor. The application processor outputs sound signals through an audio device (not limited to the speaker 170A, the receiver 170B, etc.), or displays images or video through the display screen 194. In some embodiments, the modem processor may be a stand-alone device. In other embodiments, the modem processor may be provided in the same device as the mobile communication module 1510 or other functional modules, independent of the processor 110.
The wireless communication module 1610 may provide solutions for wireless communication including wireless local area networks (wireless local area networks, WLAN) (e.g., wireless fidelity (wireless fidelity, wi-Fi) networks), bluetooth (BT), global navigation satellite systems (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field wireless communication technology (near field communication, NFC), infrared technology (IR), etc., applied to the electronic device 100. The wireless communication module 1610 may be one or more devices that integrate at least one communication processing module. The wireless communication module 1610 receives electromagnetic waves via the antenna 2, modulates the electromagnetic wave signals, filters the electromagnetic wave signals, and transmits the processed signals to the processor 110. The wireless communication module 1610 may also receive a signal to be transmitted from the processor 110, frequency modulate it, amplify it, and convert it to electromagnetic waves for radiation via the antenna 2.
In some embodiments, antenna 1 and mobile communication module 1510 of electronic device 100 are coupled, and antenna 2 and wireless communication module 1610 are coupled, such that electronic device 100 may communicate with networks and other devices through wireless communication techniques. The wireless communication techniques may include the Global System for Mobile communications (global system for mobile communications, GSM), general packet radio service (general packet radio service, GPRS), code division multiple access (code division multiple access, CDMA), wideband code division multiple access (wideband code division multiple access, WCDMA), time division code division multiple access (time-division code division multiple access, TD-SCDMA), long term evolution (long term evolution, LTE), BT, GNSS, WLAN, NFC, FM, and/or IR techniques, among others. The GNSS may include a global satellite positioning system (global positioning system, GPS), a global navigation satellite system (global navigation satellite system, GLONASS), a beidou satellite navigation system (beidou navigation satellite system, BDS), a quasi zenith satellite system (quasi-zenith satellite system, QZSS) and/or a satellite based augmentation system (satellite based augmentation systems, SBAS).
The electronic device 100 implements display functions through a GPU, a display screen 194, an application processor, and the like. The GPU is a microprocessor for image processing, and is connected to the display 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
The display screen 194 is used to display images, videos, and the like. The display 194 includes a display panel. The display panel may employ a liquid crystal display (liquid crystal display, LCD). The display panel may also be manufactured using organic light-emitting diode (OLED), active-matrix organic light-emitting diode (AMOLED) or active-matrix organic light-emitting diode (active-matrix organic light emitting diode), flexible light-emitting diode (flex-emitting diode), mini, micro-OLED, quantum dot light-emitting diode (quantum dot light emitting diodes, QLED), or the like. In some embodiments, the electronic device 100 may include 1 or N display screens 194, N being a positive integer greater than 1.
The electronic device 100 may implement photographing functions through an ISP, a camera 193, a video codec, a GPU, a display screen 194, an application processor, and the like.
The ISP is used to process data fed back by the camera 193. For example, when photographing, the shutter is opened, light is transmitted to the camera photosensitive element through the lens, the optical signal is converted into an electric signal, and the camera photosensitive element transmits the electric signal to the ISP for processing and is converted into an image visible to naked eyes. ISP can also optimize the noise, brightness and skin color of the image. The ISP can also optimize parameters such as exposure, color temperature and the like of a shooting scene. In some embodiments, the ISP may be provided in the camera 193.
The camera 193 is used to capture still images or video. The object generates an optical image through the lens and projects the optical image onto the photosensitive element. The photosensitive element may be a charge coupled device (charge coupled device, CCD) or a Complementary Metal Oxide Semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, which is then transferred to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV, or the like format. In some embodiments, electronic device 100 may include 1 or N cameras 193, N being a positive integer greater than 1.
The digital signal processor is used for processing digital signals, and can process other digital signals besides digital image signals. For example, when the electronic device 100 selects a frequency bin, the digital signal processor is used to fourier transform the frequency bin energy, or the like.
Video codecs are used to compress or decompress digital video. The electronic device 100 may support one or more video codecs. In this way, the electronic device 100 may play or record video in a variety of encoding formats, such as: dynamic picture experts group (moving picture experts group, MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
The NPU is a neural-network (NN) computing processor, and can rapidly process input information by referencing a biological neural network structure, for example, referencing a transmission mode between human brain neurons, and can also continuously perform self-learning. Applications such as intelligent awareness of the electronic device 100 may be implemented through the NPU, for example: image recognition, face recognition, speech recognition, text understanding, etc.
The external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to enable expansion of the memory capabilities of the electronic device 100. The external memory card communicates with the processor 110 through an external memory interface 120 to implement data storage functions. For example, files such as music, video, etc. are stored in an external memory card.
The internal memory 121 may be used to store computer executable program code including instructions. The processor 110 executes various functional applications of the electronic device 100 and data processing by executing instructions stored in the internal memory 121. The internal memory 121 may include a storage program area and a storage data area. The storage program area may store an application program (such as a sound playing function, an image playing function, etc.) required for at least one function of the operating system, etc. The storage data area may store data created during use of the electronic device 100 (e.g., audio data, phonebook, etc.), and so on. In addition, the internal memory 121 may include a high-speed random access memory, and may further include a nonvolatile memory such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (universal flash storage, UFS), and the like.
The electronic device 100 may implement audio functions through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, an application processor, and the like. Such as music playing, recording, etc.
The audio module 170 is used to convert digital audio information into an analog audio signal output and also to convert an analog audio input into a digital audio signal. The audio module 170 may also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be disposed in the processor 110, or a portion of the functional modules of the audio module 170 may be disposed in the processor 110.
The speaker 170A, also referred to as a "horn," is used to convert audio electrical signals into sound signals. The electronic device 100 may listen to music, or to hands-free conversations, through the speaker 170A.
A receiver 170B, also referred to as a "earpiece", is used to convert the audio electrical signal into a sound signal. When electronic device 100 is answering a telephone call or voice message, voice may be received by placing receiver 170B in close proximity to the human ear.
Microphone 170C, also referred to as a "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or transmitting voice information, the user can sound near the microphone 170C through the mouth, inputting a sound signal to the microphone 170C. The electronic device 100 may be provided with at least one microphone 170C. In other embodiments, the electronic device 100 may be provided with two microphones 170C, and may implement a noise reduction function in addition to collecting sound signals. In other embodiments, the electronic device 100 may also be provided with three, four, or more microphones 170C to enable collection of sound signals, noise reduction, identification of sound sources, directional recording functions, etc.
The earphone interface 170D is used to connect a wired earphone. The headset interface 170D may be a USB interface or a 3.5mm open mobile electronic device platform (open mobile terminal platform, OMTP) standard interface, a american cellular telecommunications industry association (cellular telecommunications industry association of the USA, CTIA) standard interface.
The gyro sensor 180B may be used to determine a motion gesture of the electronic device 100. In some embodiments, the angular velocity of electronic device 100 about three axes (i.e., x, y, and z axes) may be determined by gyro sensor 180B. The gyro sensor 180B may be used for photographing anti-shake. For example, when the shutter is pressed, the gyro sensor 180B detects the shake angle of the electronic device 100, calculates the distance to be compensated by the lens module according to the angle, and makes the lens counteract the shake of the electronic device 100 through the reverse motion, so as to realize anti-shake. The gyro sensor 180B may also be used for navigating, somatosensory game scenes.
The acceleration sensor 180E may detect the magnitude of acceleration of the electronic device 100 in various directions (typically three axes). The magnitude and direction of gravity may be detected when the electronic device 100 is stationary. The electronic equipment gesture recognition method can also be used for recognizing the gesture of the electronic equipment, and is applied to horizontal and vertical screen switching, pedometers and other applications.
The touch sensor 180K, also referred to as a "touch panel". The touch sensor 180K may be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, which is also called a "touch screen". The touch sensor 180K is for detecting a touch operation acting thereon or thereabout. The touch sensor may communicate the detected touch operation to the application processor to determine the touch event type. Visual output related to touch operations may be provided through the display 194. In other embodiments, the touch sensor 180K may also be disposed on the surface of the electronic device 100 at a different location than the display 194.
The keys 190 include a power key, a volume key, etc. The keys 190 may be mechanical keys. Or may be a touch key. The electronic device 100 may receive key inputs, generating key signal inputs related to user settings and function controls of the electronic device 100. The motor 191 may generate a vibration cue. The SIM card interface 195 is used to connect a SIM card. The SIM card may be inserted into the SIM card interface 195, or removed from the SIM card interface 195 to enable contact and separation with the electronic device 100.
In this embodiment, the device type of the electronic device 100 may be any one of a mobile phone, a tablet computer, a handheld computer, a desktop computer, a laptop computer, a super mobile personal computer (ultra-mobile personal computer, UMPC), a netbook, a cellular phone, a personal digital assistant (personal digital assistant, PDA), and an intelligent home device such as an intelligent large screen, an intelligent sound box, a wearable device such as an intelligent bracelet, an intelligent watch, an intelligent glasses, an augmented reality (augmented reality, AR), a Virtual Reality (VR), an extended reality (XR) device such as a Mixed Reality (MR), a vehicle-mounted device, or a smart city device.
Fig. 1B shows a software architecture diagram of an electronic device 100 provided in an embodiment of the present application.
As shown in fig. 1B, the software system architecture of the electronic device 100 may include an Application (APP) layer, an application Framework (FWK) layer, a local services (native) layer, and a kernel (kernel) layer.
Wherein the application layer includes one or more applications, e.g., one or more gaming applications, video applications, etc. Wherein the application may be used to provide the picture content of the picture frame, and the application may render the picture frame based on the picture content of the picture frame.
In some embodiments, the first gaming application may send the gaming information to the application framework layer such that the electronic device 100 may obtain the gaming information of the first gaming application.
In other embodiments, the first gaming application may not send game information to the application framework layer. In this case, the electronic device 100 cannot acquire the game information of the first game application.
The game information of the first game application may be a set frame rate. The game information may also include other information such as a highest frame rate limited by the first game application, etc., the present application is described with respect to the game information including a set frame rate. The set frame rate may be a target frame rate set by a user.
The application framework layer may include game information and a temperature control framing module. Wherein the game information is sent by the first game application to the application framework layer.
The temperature control frame limiting module is used for reducing the frame rate after the temperature of the equipment is monitored to be larger than the preset temperature, and avoiding the excessive power consumption of the equipment under the high frame rate.
The local service layer comprises a layer synthesizer (surfeflinger), a game frame rate regulation module, frame inserting information and scheduling service.
The surface eFlinger is used for carrying out layer combination processing on the picture frames rendered by the GPU, generating an interface comprising the picture frames, and sending the interface comprising the picture frames to the display screen for display.
The game frame rate regulation and control module comprises a frame rate calculation module, a characteristic scene identification module, a refresh rate regulation and control module and a target frame rate regulation and control module.
The frame rate calculation module can be used for obtaining the actual rendering frame rate of the game application through the timestamp statistics of the picture frames under the condition that the game information cannot be obtained.
The feature scene recognition module may be used to recognize feature scenes, such as game scenes, frame rate jitter scenes, etc., where game scenes may include game loading scenes and game play scenes. The frame rate dithering scene may include a frame rate stabilization scene and a frame rate dithering scene.
The refresh rate control module may be configured to determine an optimal refresh rate based on one or more influencing factors, and refresh and send the frame of the display frame at the optimal refresh rate.
The target frame rate adjustment module is used for adjusting the game frame rate based on the target frame rate. The optimal refresh rate may limit the game frame rate such that the value of the game frame rate must not exceed the value of the optimal refresh rate.
The frame inserting information includes the frame inserting switch state of the current game and frame inserting rate information.
The scheduling service is used for receiving the optimal refresh rate sent by the refresh rate regulation module, determining a target frame rate and sending the target frame rate to the target frame rate regulation module. The adjustment of the refresh rate may affect the frame rate, and the value of the game frame rate must not exceed the value of the optimal refresh rate. For example, the refresh rate is adjusted up, the target frame rate is also adjusted up, the refresh rate is adjusted down, and the target frame rate is also adjusted down so that the target frame rate matches the refresh rate.
The kernel layer may include graphics processor drivers (graphics processing unit Driver), plug-in chip drivers, display subsystem drivers, and the like. The GPU Driver is configured to drive the GPU to perform an operation of an upper layer (for example, an operation of rendering a frame of a screen configured by a graphics interface). The frame inserting chip driver is used for driving the frame inserting chip to insert frames based on the frame inserting information. The display subsystem driver is used for driving the display screen to refresh the display picture frame.
The HW layer includes GPU, PW X5 and DSS.
The GPU is used for rendering to obtain a picture frame based on the image resource. PW X5 is used for performing interpolation based on interpolation information. The display subsystem includes a screen, a display controller, a display interface, etc., and is used to cooperate to display the picture frames on the screen of the device.
Fig. 1C illustrates a schematic diagram of an electronic device 100 regulating a refresh rate according to an embodiment of the present application.
The electronic device 100 includes a first game application, a graphics layer synthesizer (surfeflinger), a frame inserting module, a temperature control module, a game mode sensing module, a game mode configuration file, a game frame rate calculating module, a game feature scene identifying module, a screen refresh rate deciding module and a screen refresh rate regulating module.
Wherein, S201, the first game application obtains game information.
S202, the first game application sends game information to a game feature scene recognition module.
S203, the game feature scene recognition module sends game information to the screen refresh rate decision module.
The game information of the first game application may be a set frame rate. The game information may also include other information such as a highest frame rate limited by the first game application, etc., the present application is described with respect to the game information including a set frame rate. The set frame rate may be a target frame rate set by a user.
The first game application sends the game information to the game feature scene recognition module, and the game feature scene recognition module sends the game information to the screen refresh rate decision module.
Optionally, in some embodiments, the game feature scene recognition module may not send the game information to the screen refresh rate decision module through the game feature scene recognition module.
S204, the first game application sends a game mode acquisition request to the game mode sensing module.
S205, the game mode sensing module can acquire the game mode from the game mode configuration file.
S206, the game mode sensing module acquires a game mode.
S207, the game mode sensing module sends the game mode to the screen refresh rate decision module.
The first gaming application may send the game mode to the screen refresh rate decision module. The game modes can be set by a user, and the game modes can include, but are not limited to, an equalization mode, a performance mode, a power saving mode and the like, and refresh rate regulation strategies corresponding to different game modes are different. Specifically, the first gaming application may send a game mode acquisition request to the game mode awareness module. The game mode awareness module may send a read profile request to the game mode profile. The game mode sensing module may obtain a configuration file from the game mode configuration file, and then obtain the game mode from the configuration file. And then, the game mode sensing module sends the acquired game mode to the screen refresh rate decision module.
S208, the first game application sends the Buffer information of the game rendering to a layer synthesizer (surface eFlinger).
S209, a layer synthesizer (SurfaceFlinger) sends layer information of the picture frame rendered by the first game application to the game frame rate calculation module.
The layer synthesizer may obtain layer information of a game-rendered picture frame based on Buffer information of the game rendering.
Layer information refers to information contained in a game-rendered frame of a picture, such as a layer name. The electronic device may obtain a layer in the first gaming application based on the layer name, filtering to layers of other applications.
S210, the game frame rate calculation module calculates the target frame rate of the first game application.
S211, the game frame rate calculation module sends the target frame rate of the first game application to the screen refresh rate decision module.
After receiving the rendered layer information sent by the first game application, the layer synthesizer (SurfaceFlinger) needs to filter out the picture frames of other applications, and only needs to calculate the frame rate of the picture frames rendered by the first game application. A layer synthesizer (SurfaceFlinger) may obtain layer information for the first gaming application rendered frame based on the first gaming application rendered frame. The layer synthesizer (surfeflinger) then sends layer information of the picture frames rendered by the first gaming application to the game frame rate calculation module.
The game frame rate calculation module may determine a target frame rate for the first game application based on layer information of the frame of pictures rendered by the first game application. The game frame rate calculation module then sends the target frame rate of the first game application to the screen refresh rate decision module.
S212, a layer synthesizer (SurfaceFlinger) sends layer information of the picture frames rendered by the first game application to a game feature scene recognition module.
S213, the game feature scene recognition module calculates a game scene and/or a frame rate jitter scene of the first game application.
And S214, the game feature scene recognition module sends the game scene and/or the frame rate dithering scene of the first game application to the screen refresh rate decision module.
The layer synthesizer (surfeflinger) may send layer information of the frame rendered by the first game application to the game feature scene recognition module, where the game feature scene recognition module recalculates the game scene and/or the frame rate jitter scene of the first game application.
The game scenes may include a game loading scene and a game play scene. The frame rate dithering scene may include a frame rate stabilization scene and a frame rate dithering scene.
S215, the frame inserting module sends the frame inserting information to the screen refresh rate decision module.
And the frame inserting module sends the frame inserting information to the screen refresh rate decision module. The frame inserting information may include information such as a frame inserting switch state of a game and a frame inserting rate state.
S216, the temperature control module sends the temperature control information to the screen refresh rate decision module.
The temperature control module sends the temperature control information to the screen refresh rate decision module. Wherein, the temperature control information may include game temperature control frame limiting information.
S217, the screen refresh rate decision module calculates to obtain the target refresh rate.
S218, the screen refresh rate decision module sends the target refresh rate to the screen refresh rate regulation module.
The target refresh rate may be an optimal refresh rate determined in combination with any one or several of the following factors. Factors include, but are not limited to: game scene information, jitter scene information, game mode information, temperature information, plug-in frame information, game split screen display information, user-set refresh rate information, and the like.
Thus, the screen refresh rate adjustment module may refresh and display the picture frames based on the target refresh rate.
The process of rendering a picture frame to display is described below.
First, some noun concepts involved in rendering to sending a picture frame in the embodiments of the present application are described.
1. Screen refresh rate (refresh rate): the refresh rate of the display screen of the electronic device is generally related to a fixed parameter of the display screen, and is a fixed value.
In the embodiment of the application, the electronic device can support a plurality of selectable screen refresh rates, and at least the lowest screen refresh rate and the highest screen refresh rate can be contained in the plurality of selectable screen refresh rates.
Alternatively, the plurality of selectable screen refresh rates may have only two selectable screen refresh rates, one being the highest screen refresh rate and one being the lowest screen refresh rate. Exemplary: two selectable screen refresh rates are: 60Hz,90Hz. Wherein 60Hz is the lowest screen refresh rate of the plurality of selectable screen refresh rates, and 90Hz is the highest screen refresh rate of the plurality of selectable screen refresh rates.
Optionally, the plurality of selectable screen refresh rates may also include more selectable screen refresh rates. Illustratively, 3 selectable screen refresh rates are included: 60Hz,90Hz,120Hz. Wherein 60Hz is the lowest screen refresh rate of the plurality of selectable screen refresh rates and 120Hz is the highest screen refresh rate of the plurality of selectable screen refresh rates.
Optionally, the plurality of selectable screen refresh rates may also include more selectable screen refresh rates. Illustratively, 4 selectable screen refresh rates are included: 60Hz,90Hz,120Hz,144Hz. Wherein 60Hz is the lowest screen refresh rate of the plurality of selectable screen refresh rates, and 120Hz is the highest screen refresh rate of the plurality of selectable screen refresh rates.
Optionally, the plurality of selectable screen refresh rates may also include more selectable screen refresh rates. Exemplary, 5 selectable screen refresh rates are included: 45Hz, 60Hz,90Hz,120Hz,240Hz. Wherein 45Hz is the lowest screen refresh rate of the plurality of selectable screen refresh rates, and 240Hz is the highest screen refresh rate of the plurality of selectable screen refresh rates.
It will be appreciated that the plurality of selectable screen refresh rates may also include more screen refresh rates, depending on the actual requirements. There may be many more options for alternative screen refresh rates, not limited herein.
2. Render frame rate (frame): the rendering thread representing the application invokes the GPU to render the frame number of the picture frame in 1 second. The rendering frame rate may be controlled by the application, the rendering frame rate being in PFS.
Wherein the maximum value of the rendering frame rate is the screen refresh rate.
The rendering frame rate determines how fast the rendering thread of the application invokes the GPU to render the picture frames. For example, when the rendering frame rate is 60PFS, the rendering thread of the application calls the GPU to render for an average of 16.7ms to obtain a frame of picture frame. For example, when the rendering frame rate is 90PFS, the rendering thread of the application calls the GPU to render for an average of 11.1ms to obtain a frame of picture frame. For example, when the rendering frame rate is 120PFS, the rendering thread of the application calls the GPU to render for an average of 8.3ms to obtain a frame of picture frame.
The higher the rendering frame rate, the faster the rendering thread of the application invokes the GPU to render the picture frame.
3. Vertical synchronization (vsync) signal: after the application needs to call the GPU to render the picture frames, the rendered picture frames can be stored in a layer buffer (buffer) and provided to a layer synthesizer (surface eFlinger) for layer synthesis. And after the surface eFlinger takes out the rendered picture frames from the buffer to carry out picture layer combination, sending the picture frames after the picture layer combination to a display screen to refresh and display. When the timing of sending the picture frames after the graphics layer is combined into the display screen is in the process of refreshing the screen, the phenomenon that two different picture frames before and after the graphics layer are overlapped and displayed easily occurs, so that the picture displayed by the display screen is torn (tearing). Therefore, in order to prevent such a phenomenon of picture tearing, the hardware module corresponding to the display screen may generate a vsync signal having the same period as the refresh rate to the surfeflinger. After the surface eFlinger receives the vsync signal, the surface eFlinger can take out the picture frame from the buffer to perform layer composition and send the picture frame to the display screen to refresh and display.
Fig. 2 shows a timing diagram of a picture frame provided in an embodiment of the present application from rendering to sending.
As shown in fig. 2, an application (e.g., a gaming application) may issue a rendering instruction to the GPU to render a frame of a picture, and after issuing the rendering instruction, the application may issue a frame-sending instruction for the frame of the picture to the SurfaceFlinger. After the GPU has rendered the frame, the GPU may store the frame into a buffer indicated by the rendering instruction. After the SurfaceFlinger acquires the frame sending instruction, the buffer of the picture frame can be acquired, after the SurfaceFlinger detects that the buffer of the picture frame is filled with the rendered picture frame, the picture frame can be taken out from the buffer of the picture frame to carry out layer synthesis when the next vsync signal arrives, and the picture frame is sent to the display screen to carry out refreshing display.
For example, between vertical synchronization signal 0 (VSYNC 0) and vertical synchronization signal 1 (VSYNC 1), the application may issue rendering instruction A to the GPU and frame instruction A to the SurfaceFlinger. After the GPU acquires the rendering instruction a, the GPU may render the picture frame a, and store the rendered picture frame a into the buffer of the picture frame a indicated by the rendering instruction a. The surface eFlinger can acquire a buffer of the picture frame A through the frame sending instruction A, and after the rendered picture frame A is filled in the buffer of the picture frame A, when the VSYNC1 arrives, the picture frame A is taken out from the buffer of the picture frame A to carry out layer synthesis, and the picture frame A is sent to a display screen to carry out refreshing display.
Between vertical synchronization signal 1 (VSYNC 1) and vertical synchronization signal 2 (VSYNC 2), the application may issue rendering instruction B to the GPU and frame instruction B to the SurfaceFlinger. After the GPU acquires the rendering instruction B, the GPU may render the picture frame B, and store the rendered picture frame B into the buffer of the picture frame B indicated by the rendering instruction B. The surface eFlinger can acquire the buffer of the picture frame B through the frame sending instruction B, and after the rendered picture frame B is filled in the buffer of the picture frame B, the picture frame B can be taken out from the buffer of the picture frame B to carry out layer synthesis when VSYNC2 arrives, and the picture frame B is sent to a display screen to carry out refreshing display.
Between vertical synchronization signal 2 (VSYNC 2) and vertical synchronization signal 3 (VSYNC 3), the application may issue rendering instruction C to the GPU and frame instruction C to the SurfaceFlinger. After the GPU acquires the rendering instruction C, the GPU may render the frame C, and store the rendered frame C into the buffer of the frame C indicated by the rendering instruction C. The surface eFlinger can acquire the buffer of the picture frame C through the frame sending instruction C, and after the rendered picture frame C is filled in the buffer of the picture frame C, when the VSYNC3 arrives, the picture frame C is taken out from the buffer of the picture frame C to carry out layer synthesis, and the picture frame C is sent to the display screen to carry out refreshing display.
Between vertical synchronization signal 3 (VSYNC 3) and vertical synchronization signal 4 (VSYNC 4), the application may issue rendering instruction D to the GPU and frame instruction D to the SurfaceFlinger. After the GPU acquires the rendering instruction D, the GPU may render the frame D, and store the rendered frame D into the buffer of the frame D indicated by the rendering instruction D. After the buffer of the picture frame D is obtained through the frame sending command D, and after the rendered picture frame D is filled in the buffer of the picture frame D is detected, when the VSYNC4 arrives, the picture frame D is taken out from the buffer of the picture frame D to carry out layer synthesis, and the picture frame D is sent to a display screen to carry out refreshing display.
The method and the device are applied to game scenes, and in order to save the power consumption of the electronic device 100 and improve the game experience of a user, the electronic device can dynamically regulate and control the refresh rate of the electronic device 100.
The electronic device 100 may determine the refresh rate of the electronic device 100 in combination with a variety of factors. Factors include, but are not limited to, any one or more of the following: game mode, game information, game scene, rendered frame rate jittered scene, whether split screen game, etc.
Not limited to the above factors, the factors determining the refresh rate of the electronic device 100 may be other factors, and the present application is merely exemplified by the above factors.
First, a game scene is introduced.
Fig. 3A-3D show schematic diagrams of entering a game scene based on a first game application.
As shown in fig. 3A, the electronic device 100 may display a desktop in which a page with application icons is displayed, the page including a plurality of application icons (e.g., a setup application icon, an application marketplace application icon, a gallery application icon, a browser application icon, a first game application icon, a second application icon, etc.). Page indicators are also displayed below the application icons to indicate the positional relationship between the currently displayed page and other pages. A tray area is displayed below the page indicator. The tray area includes a plurality of tray icons, such as a camera application icon, an address book application icon, a phone application icon, and an information application icon. The tray area remains displayed while the page is switched. In some embodiments, the page may also include a plurality of application icons and page indicators, which may not be part of the page, but may exist alone, and the tray icon may also be optional, which is not limited in this embodiment.
The electronic device 100 may receive user input (e.g., a single click) on a telephony application icon, in response to which the electronic device 100 may load a game resource and display the user interface 340 shown in fig. 3B, the user interface 340 may include the text "in progress for loading.
After the game resources are loaded, the electronic device 100 may display the user interface shown in FIG. 3C. Fig. 3C is a user interface 320 for a game provided in an embodiment of the present application. The user interface 320 may be referred to as a game lobby interface.
A start game option may be included in the user interface 320, for example, the start game option may be a competitive reactance option or a rank match option in the user interface 320, or the like. The user may begin a game via the athletic reaction option or the ranking game option in the user interface 320 and the electronic device 100 may display a game play interface.
For example, as shown in fig. 3C, the electronic device 100 may receive an input operation (e.g., a single click) by a user for an athletic reaction option in the user interface 320, and in response to the input operation by the user, the electronic device 100 may display the user interface 330 shown in fig. 3D, and the user interface 330 may also be referred to as a game play interface. Included in the user interface 330 is a play exit option by which the user can end the game and display the user interface 320 shown in fig. 3C.
Next, how the above factors determine the refresh rate of the electronic device 100 will be described.
1. Adjusting screen refresh rate based on game scene
1. Categories of game scenes
The game scenes may include, but are not limited to, game loading scenes and game play scenes.
The game loading scene may refer to a scene before entering a game hall or in the game hall after the game application is started. In the game arcade, the user may select game characters, select game modes, team, match teammates, download resource packages, pick up props and skins, etc.
For example, the electronic device 100 may receive an input operation by a user for the first game application icon shown in fig. 3A and display the user interface 340 shown in fig. 3B, and the user interface 340 may be a game loading interface.
After the electronic device 100 acquires the game resource, the electronic device 100 may display the user interface 320 shown in fig. 3C, and the user interface 320 may be a game loading interface.
Thereafter, the electronic device 100 may receive an input operation of the user for the athletic reaction option or the ranking competition option in the user interface 320 to start a game and enter a game play, the electronic device 100 may display the user interface 330 illustrated in fig. 3D, and the user interface 330 may be a game play interface.
Wherein user interface 340 and user interface 320 may be game loading scenarios.
The user interface 330 may be a game play scenario.
It should be noted that, the game loading scene and the game playing scene may also be other interfaces, and the application is only illustrative of the game loading scene and the game playing scene, which is not limited in this application.
2. Identifying game scenes
(1) The game loading scene and the game play scene are identified based on the frame rate characteristic information.
The first gaming application may invoke the GPU to render the frame of the picture. The number of frames that the first gaming application invokes the GPU to render the frame of the picture in 1 second may be referred to as the rendering frame rate of the first gaming application.
Wherein the frame rate characteristic information includes, but is not limited to, one or more of the following: average frame rate, composite time standard deviation of picture frames.
First, the electronic device 100 may obtain a rendering frame rate of the first game application every second for n consecutive seconds, and calculate an average frame rate for n seconds.
When the first game application renders the picture frames, each frame of picture frame has a time stamp, and the time stamp is used for identifying the successful rendering time of the picture frame, and the time stamps of different picture frames are different.
The electronic device 100 may obtain the time stamps of the frames of m consecutive frames, and calculate the difference between the time stamps of the frames of two adjacent frames to obtain the synthesis time of each frame. For example, electronic device 100 may obtain a timestamp for picture frame a, a timestamp for picture frame B, and a timestamp for picture frame C. The electronic device 100 may calculate a difference between the timestamp of the frame a and the timestamp of the frame B to obtain a duration a, where the duration a is a composite time of the frame a. The electronic device 100 may calculate a difference between the timestamp of the frame B and the timestamp of the frame C to obtain a duration B, where the duration B is a composite time of the frame B. And so on, the electronic device 100 may obtain the composition time for each picture frame.
After the electronic device 100 acquires the synthesis time of each of the m-frame picture frames, the electronic device 100 may calculate the synthesis time standard deviation of the m-frame picture frames based on the synthesis time of each of the m-frame picture frames.
In the case where the average frame rate and the standard deviation of the synthesis time satisfy the preset conditions, the electronic device 100 may determine that the current scene is a game loading scene.
For example, when the electronic device 100 determines that the average frame rate is less than 10PFS and the standard deviation of the synthesis time is greater than 10ms, the electronic device 100 may determine that the current scene is a game loading scene.
In the case that the average frame rate and the standard deviation of the synthesis time satisfy the second preset condition, the electronic device 100 may determine that the current scene is a game play scene.
For example, when the electronic device 100 determines that the average frame rate is greater than 30PFS and the standard deviation of the synthesis time is less than 5ms, the electronic device 100 may determine that the current scene is a game play scene.
(2) The game loading scenario and the game play scenario are identified based on the DrawCall average number.
Where DrawCall is the CPU invoking the image application programming interface. When the first game application calls the GPU to render the picture frame, a large amount of image resources are required to be acquired through the CPU, and then the CPU can acquire the image resources in a DrawCall mode. The CPU obtains an image application programming interface (such as a DirectX interface or an OpenGL interface) through the DrawCall, obtains an image resource based on the image application programming interface, and sends the image resource to the GPU, so that the GPU can render a picture frame based on the image resource.
Fig. 4 shows a schematic diagram of a method for the electronic device 100 to obtain the DrawCall number.
As shown in fig. 4, the electronic device 100 includes a game awareness module, a graphics public library, and a screen refresh rate decision module.
The graphic public library provides an external interface for the first game application to call and render the picture frames, and the like.
S401, the game perception module calls a HOOK glDrawCall function.
S402, the graphic public library sends the DrawCall operation to the game perception module.
The game perception module may call the HOOK gldraw call function, and then, after each draw call operation performed by the first game application, the graphic public library may send each draw call operation to the game perception module, so that the game perception module may count the number of draw calls.
S403, the game perception module counts the number of DrawCall operations.
After the game perception module receives the DrawCall operation sent by the graphic public library, the game perception module can count the number of DrawCall and calculate the average number of DrawCall in a certain time. For example, the game awareness module may count the number of DrawCall operations within 1 s.
S404, the game perception module determines a game scene based on the DrawCall operation quantity.
Because in the game play scene, the complexity of the game scene is higher, the change of the image frames is faster, and the GPU needs to call a large amount of image resources to draw hero characters, particle effects, illumination effects and the like, which all need to rely on DrawCall operation, so that the number of DrawCall operations is greatly increased.
In a game loading scene, the GPU only needs to draw a loading bar and a small number of scenes, so that the image resources are small, and the number of DrawCall operations is relatively small.
The game awareness module may determine the game scenario based on the average number of DrawCall operations.
For example, the game awareness module may count the number of DrawCall operations within 1s and determine a game scenario based on the average DrawCall number. When the number of DrawCall operations within 1s is greater than a preset value, the game perception module can determine that the game is a game play scene. When the number of DrawCall operations within 1s is smaller than a preset value, the game perception module can determine that the scene is loaded for the game. For example, when the number of DrawCall operations within 1s is greater than 200, the game perception module may determine to be a game play scenario. When the number of DrawCall operations within 1s is less than 200, the game perception module may determine to load a scene for the game.
For another example, the game awareness module may count the number of draw call operations per second in a continuous period of time and determine a game scenario based on the number of draw call operations per second in a continuous period of time. When the number of DrawCall operations per second in a continuous period of time is greater than a preset value, the game perception module can determine that the game is a game play scene. When the number of DrawCall operations per second in a continuous period of time is smaller than a preset value, the game perception module can determine that a scene is loaded for the game. For example, the game perception module may determine to be a game play scenario when the number of DrawCall operations in 3 consecutive seconds per second is greater than 200. When the number of DrawCall operations in each second of 3 consecutive seconds is less than 200, the game perception module may determine to load the scene for the game.
S405, the game perception module sends the DrawCall operation quantity to the screen refresh rate decision module.
After the screen refresh rate decision module obtains the average DrawCall operation number, the screen refresh rate decision module can determine the game scene based on the average DrawCall operation number, and then determine the screen refresh rate.
(3) And identifying a game loading scene and a game playing scene based on the IO operation times.
During a game loading scenario, IO operations may rise significantly because the game needs to read a large amount of game resource data from a storage medium (e.g., memory or disk) and load it into memory for use by the game.
IO operation is significantly reduced during game play scenarios, because the resources needed during game play loading scenarios are loaded into memory, and only a small amount of resources need to be loaded into memory during game play scenarios.
The electronic device 100 may identify a game loading scenario and a game play scenario based on the IO operation number.
When the number of IO operations within a certain period of time is greater than a preset value, the electronic device 100 may determine that the current scene is a game loading scene.
For example, when the number of IO operations or the IO operation frequency in a certain period of time is greater than 80% of the preset value, the electronic device 100 may determine that the current scene is a game loading scene.
When the number of IO operations within a certain period of time is smaller than a preset value, the electronic device 100 may determine that the current scene is a game loading scene.
For example, when the number of IO operations or the IO operation frequency in a certain period of time is less than 80% of the preset value, the electronic device 100 may determine that the current scene is a game loading scene.
The electronic device 100 may determine the game loading scenario and the game play scenario based on any one or several of the above. The electronic device 100 may also determine the game loading scenario and the game play scenario in combination with other methods, which is not limited in this application.
3. Adjusting refresh rate based on game scene
The electronic device 100 refreshes the display frames based on a default refresh rate (e.g., a first refresh rate).
When the electronic device 100 determines that the game is loaded, the electronic device 100 may decrease the refresh rate, e.g., adjust the refresh rate of the electronic device 100 from a first refresh rate to a second refresh rate, the second refresh rate being less than the first refresh rate. Thus, in a game loading scenario, where user requirements for image quality are not high, the electronic device 100 may reduce the refresh rate to save power consumption of the electronic device 100.
For example, when the electronic device 100 determines a game loading scenario, the electronic device 100 may set the refresh rate of the electronic device 100 to 30hz. Correspondingly, the rendering frame rate of the first game application also decreases, and the rendering frame rate of the first game application decreases to 30PFS or less.
When the electronic device 100 determines that the game is played, the electronic device 100 may increase the refresh rate, so that the picture is smoother, and the game experience of the user is improved. For example, the refresh rate of the electronic device 100 is adjusted from the second refresh rate to a third refresh rate, the third refresh rate being greater than the second refresh rate.
In some embodiments, the first gaming application may receive a user set frame rate of the game play scene, which may be referred to as a set frame rate.
In some embodiments, the first gaming application may report the set frame rate to the system, and upon determining to enter the game play scene, the electronic device 100 may adjust the refresh rate based on the set frame rate such that the value of the refresh rate is not less than the value of the frame rate and such that the refresh rate matches the frame rate.
For example, when the electronic device 100 obtains that the set frame rate reported by the first game application is 120PFS, the third refresh rate may be 120hz or more.
In other embodiments, the first gaming application may not report the set frame rate to the system, and the electronic device 100 may not be able to adjust the refresh rate based on the set frame rate. But the electronic device 100 needs to match the adjusted refresh rate to the set frame rate. Specifically, after determining to enter a game play scene, the electronic device 100 adjusts the refresh rate to a maximum value, so that the frame rate can reach the set frame rate. After a certain period of time, the frame rate stabilizes around the set frame rate, at which time the electronic device 100 may obtain the set frame rate based on the frame rate information, and then adjust the refresh rate based on the set frame rate, so that the value of the refresh rate is not lower than the value of the frame rate, and so that the refresh rate matches the frame rate.
For example, when the electronic device 100 may acquire the set frame rate of 120PFS based on the frame rate information, the third refresh rate adjusted by the electronic device 100 may be 120hz or more.
2. Adjusting refresh rate based on rendering frame rate dithering scene
The rendering frame rate has a plurality of gear positions selectable, for example, 120PFS, 90PFS, 60PFS, and 30PFS.
Illustratively, in a game play scenario, the electronic device 100 renders and refreshes picture frames at a high frame rate and a high refresh rate. As shown in fig. 5A, the first game application renders and synthesizes the picture frames at a rendering frame rate of 120PFS, but the rendering frame rate of the first game application is unstable due to the excessively high load of the CPU, and is fixed back and forth, so that the situation of clamping or delaying the game picture occurs, and the game experience of the user is affected.
The electronic device 100 may decrease the rendering frame rate of the first gaming application such that the frame rate stabilizes.
1. Identifying frame rate jitter
The electronic device 100 can recognize whether the frame rate jitters or the frame rate is stable based on the frame rate characteristic information and the CPU load. The frame rate characteristic information includes, but is not limited to, an average frame rate and a composite time standard deviation of the picture frames.
(1) Average frame rate
The electronic device 100 may obtain a number of frame images and determine an average frame rate of the number of frame images based on a composition time of the number of frame images.
For example, the electronic device 100 may obtain 200 frames of frames, dividing the 200 frames of frames into two portions, each portion including 100 frames of frames.
As shown in fig. 5B, the electronic device 100 may divide 100 frames of a picture into the window 1 and divide another 100 frames of a picture into the window 2.
Then, the electronic device 100 divides the 100 frames in the window 1 into 5 small windows, each small window including 20 frames.
Similarly, the electronic device 100 divides the 100 frames in the window 2 into 5 portlets, each of which includes 20 frames.
The electronic device 100 may obtain the overall average frame rate for window 1 and window 2, as well as the average frame rate for each widget.
The electronic device 100 may obtain the total rendering time of the 200 frames, and divide the total rendering time of the 200 frames by 200 to obtain the average frame rate of the 200 frames.
The electronic device 100 may obtain the total rendering time of 20 frames in each of the windows 1 and 2, and divide the total rendering time of 20 frames in the window by 200 to obtain the average frame rate of 20 frames in each of the windows. For example, the electronic device 100 may obtain the total rendering time of 20 frames in the first widget in the window 1, and divide the total rendering time of 20 frames in the widget by 200 to obtain the average frame rate of 20 frames in the first widget in the window 1. For another example, the electronic device 100 may obtain the total rendering time of 20 frames in the second widget in the window 1, and divide the total rendering time of 20 frames in the widget by 200 to obtain the average frame rate of 20 frames in the second widget in the window 1. By analogy, the electronic device 100 may obtain the average frame rate of each widget, i.e., obtain the average frame rate of 10 widgets.
In some embodiments, if the electronic device 100 determines that the average frame rate of 200 frames and the average frame rate of every 20 frames meet the preset condition after determining that the average frame rate of 200 frames and the average frame rate of every 20 frames, the electronic device 100 may determine that the current frame rate is stable.
For example, if the difference between the average frame rate and the set frame rate of 200 frames is within the preset range, the current frame rate may be determined to be stable.
For example, if the frame rate is set to 60PFS, if the average frame rate of 200 frames is between 55PFS and 65PFS, the current frame rate can be considered stable. For another example, if the frame rate is set to 90PFS, if the average frame rate of 200 frames is between 80PFS and 100PFS, the current frame rate can be considered stable. For another example, if the frame rate is set to 120PFS, if the average frame rate of 200 frames is between 105PFS and 135PFS, the current frame rate can be considered stable.
In some embodiments, if the average frame rate of a certain number of small windows in the average frame rates of 10 small windows is within a preset range, the current frame rate may be determined to be stable.
For example, if the average frame rate of at least 8 small windows among the average frame rates of 10 small windows is within the preset range, the current frame rate may be determined to be stable.
For example, if the average frame rate of 200 frames is 80PFS and the average frame rate of at least 8 of the 10 windows is between 80.5PFS and 79.5PFS, the current frame rate may be considered stable.
The above-mentioned determination of whether the current frame rate is stable or not by the average frame rate of the frame in the large window and/or the average frame rate of the frame in the small window can more accurately reflect whether the frame rate is jittering, and the accuracy of the electronic device 100 in determining the frame rate jittering is improved.
(2) Standard deviation of synthesizing time of picture frame
When the first game application renders the picture frames, each frame of picture frame has a time stamp, and the time stamp is used for identifying the successful rendering time of the picture frame, and the time stamps of different picture frames are different. The electronic device 100 may obtain a time stamp of each frame of the 200 frames, and calculate a difference between time stamps of two adjacent frames to obtain a composite time of each frame. For example, the electronic device 100 may obtain a timestamp of a first frame of 200 frame frames, a timestamp of a second frame of 200 frame frames, and a timestamp of a third frame of 200 frame frames. The electronic device 100 may calculate a difference between the time stamps of the first frame of the 200 frame frames and the second frame of the 200 frame frames to obtain a duration 1, where the duration 1 is a synthesis time of the first frame of the 200 frame frames. The electronic device 100 may calculate a difference between the time stamps of the second frame of the 200 frame frames and the third frame of the 200 frame frames to obtain a duration 2, where the duration 2 is a synthesis time of the second frame of the 200 frame frames. By analogy, the electronic device 100 may obtain the composition time of each of the 200 frames.
After the electronic device 100 acquires the synthesis time of each of the 200 frame frames, the electronic device 100 may calculate the synthesis time standard deviation of the 200 frame frames based on the synthesis time of each frame.
If the standard deviation of the synthesis time of 200 frames meets the preset condition, the electronic device 100 may determine that the current frame rate is stable.
For example, when the electronic device 100 determines that the standard deviation of the synthesis time of 200 frames is less than 3ms, the electronic device 100 may determine that the current frame rate is stable.
It should be noted that the 200 frames and the 20 frames in each widget are only used to explain the present application, and may include other more or less frames, which is not limited in the present application.
(3) CPU load
The electronic device 100 may obtain a CPU load condition. If the CPU load is greater than the preset value, the electronic device 100 may determine the frame rate jitter. If the CPU load is smaller than the preset value, the electronic device 100 may determine that the frame rate is stable.
For example, if the electronic device 100 determines that the CPU load is greater than 85%, the electronic device 100 may determine that the frame rate is jittered. If the CPU load is less than 85%, the electronic device 100 may determine that the frame rate is stable.
The electronic device 100 may determine that the frame rate jitters or the frame rate is stable based on any one or a combination of the above. Not limited to the above manner, the electronic device 100 may also determine that the frame rate jitter or the frame rate is stable in combination with other manners, which is not limited in this application.
2. Adjusting refresh rate
After the electronic device 100 determines the frame rate jitter, the electronic device 100 may adjust the refresh rate. After the refresh rate is reduced, the frame rate of the electronic device 100 is also reduced, so as to avoid occurrence of frame rate jitter at a high frame rate.
The electronic device 100 may then monitor the frame rate condition for frame rate jitter or stability. If the frame rate is stable, the refresh rate does not need to be adjusted again, the picture frames are rendered at the adjusted frame rate, and the display picture frames are refreshed at the adjusted refresh rate.
If the frame rate is still jittered, the refresh rate needs to be reduced again, and after the refresh rate is reduced again, the frame rate of the electronic device 100 will also be reduced again, and the frame of the display frame is rendered at the readjusted frame rate, and the frame of the display frame is refreshed at the readjusted refresh rate.
In this way, the electronic device 100 may sequentially decrease the refresh rate of the electronic device 100 to decrease the frame rate, and the refresh rate of the electronic device 100 is not adjusted after the frame rate stabilizes.
For example, before the adjustment, the refresh rate of the electronic device 100 is 120hz, after recognizing the frame rate jitter, the electronic device 100 may reduce the refresh rate to 90hz, and the rendering frame rate of the corresponding first game application may also be reduced to 90PFS, as shown in fig. 5C.
The electronic device 100 may then monitor the frame rate condition for frame rate jitter or stability. If the frame rate is stable, the refresh rate does not need to be adjusted again, and the frame of the picture is rendered at the frame rate of 90PFS, as shown in FIG. 5C.
If the frame rate remains jittered, the electronic device 100 may need to decrease the refresh rate again to 60hz, and the corresponding rendering frame rate of the first game application may also decrease to 60PFS, as shown in fig. 5D. If the frame rate stabilizes at 60PFS, the electronic device 100 may not adjust the refresh rate. Otherwise, the electronic device 100 may continue to decrease the refresh rate until the frame rate stabilizes.
In some embodiments, if the frame rate is reduced by the refresh rate of the electronic device 100, the frame rate stabilizes after a period of time. The electronic device 100 may further increase the refresh rate so that the frame rate may be increased, so that the picture is smoother, and the game experience of the user is improved.
In one possible implementation, the electronic device 100 may gradually increase the refresh rate.
For example, after the electronic device 100 reduces the refresh rate to 60hz, the frame rate of the electronic device 100 has stabilized. The electronic device 100 may increase the refresh rate to 90hz and the electronic device 100 may render the picture frames at a frame rate of 90 PFS. Then, the electronic device 100 determines whether the frame rate of the electronic device 100 is stable.
If the frame rate of the electronic device 100 is unstable, the electronic device 100 reduces the refresh rate to 60hz again, and the rendering frame rate of the electronic device 100 is also reduced, and the electronic device 100 renders the screen frame at a frame rate of 60 PFS.
If the frame rate of the electronic device 100 is still stable, the electronic device 100 may increase the refresh rate to 120hz, and the electronic device 100 may render the frame at a frame rate of 120 PFS. Then, the electronic device 100 determines whether the frame rate of the electronic device 100 is stable.
If the frame rate of the electronic device 100 is unstable, the electronic device 100 reduces the refresh rate to 90hz again, and the rendering frame rate of the electronic device 100 is also reduced, and the electronic device 100 renders the frame at a frame rate of 90 PFS.
If the frame rate of the electronic device 100 is still stable, the electronic device 100 may render the frame at a frame rate of 120hz and refresh the display frame at a refresh rate of 120 hz.
Here, reference may be made to the foregoing description for specific implementation of how the electronic device 100 determines that the frame rate is stable or the frame rate is jittered, which is not repeated herein.
In this way, the electronic device 100 can dynamically adjust the refresh rate of the electronic device 100 according to the jitter of the frame rate and the stable condition of the frame rate, so as to avoid the influence of the jitter of the frame rate on the game experience of the user, and improve the game experience of the user.
In other possible implementations, the electronic device 100 may also directly boost the refresh rate to a maximum value.
For example, after the electronic device 100 reduces the refresh rate to 60hz, the frame rate of the electronic device 100 has stabilized. The electronic device 100 may directly increase the refresh rate to 120hz and the electronic device 100 may render the picture frames at a frame rate of 120 PFS. Then, the electronic device 100 determines whether the frame rate of the electronic device 100 is stable.
If the frame rate of the electronic device 100 is still stable, the electronic device 100 may render the frame at a frame rate of 120hz and refresh the display frame at a refresh rate of 120 hz.
If the frame rate of the electronic device 100 is unstable, the electronic device 100 reduces the refresh rate to 90hz again, and the rendering frame rate of the electronic device 100 is also reduced, and the electronic device 100 renders the frame at a frame rate of 90 PFS. Then, the electronic device 100 determines whether the frame rate of the electronic device 100 is stable.
If the frame rate of the electronic device 100 is still stable, the electronic device 100 may render the frame at a frame rate of 90hz and refresh the display frame at a refresh rate of 90 hz.
If the frame rate of the electronic device 100 is unstable, the electronic device 100 reduces the refresh rate to 60hz again, and the rendering frame rate of the electronic device 100 is also reduced, and the electronic device 100 renders the screen frame at a frame rate of 60 PFS.
3. Adjusting refresh rate based on game information
In some embodiments, the first gaming application may receive a frame rate (which may be referred to as a set frame rate) of a user-operated device game play scene, and the game information may be the set frame rate. The game information may also include other information such as a highest frame rate limited by the first game application, etc., the present application is described with respect to the game information including a set frame rate.
Fig. 6 shows a schematic diagram of an electronic device 100 rendering and displaying a picture frame.
As shown in fig. 6, the first game application may be an application that provides a game. The first game application can acquire the image resources of the picture frames, render the picture frames based on the image resources of the picture frames, and store the rendered picture frames in the buffer. And then, a buffer queue is arranged in the surface eFlinger to store the picture frames to be synthesized, the surface eFlinger can acquire the rendered picture frames from the buffer and synthesize the picture frames, and the synthesized picture frames are refreshed and displayed on a screen.
For example, if the electronic device 100 sets the refresh rate to 60hz, if the first gaming application and the surfeflinger side default to 4 buffers in common, the time period of the vsync signal is 16.6ms, that is, the first gaming application renders a frame of pictures every about 16.6ms and deposits it in the buffers. When surfeflinger occupies 2 buffers to compose and send out a frame of a picture, the first gaming application leaves 2 buffers to render the frame of the picture. When the refresh rate is 60hz and the rendering frame rate of the first game application is also stabilized at 60PFS, the time period of the vsync signal is 16.6ms, the first game application renders one frame of picture frame every about 16.6ms and stores it in the buffer, and the surfeflinger reads the picture frame from the buffer and synthesizes and sends the picture frame at about 16.6 ms.
When the first gaming application receives a user operation, the rendering frame rate will be set, e.g., raised, to 120PFS.
In some embodiments, the first gaming application may report the set frame rate to the system, and upon determining to enter the game play scene, the electronic device 100 may adjust the refresh rate based on the set frame rate such that the value of the refresh rate is not less than the value of the frame rate and such that the refresh rate matches the frame rate.
For example, when the electronic device 100 acquires the setting frame rate of 120PFS reported by the first game application, the electronic device 100 may set the refresh rate to 120hz or more.
In other embodiments, the first gaming application does not report the set frame rate to the system, and the electronic device 100 cannot obtain the set frame rate, whether surfeflinger is to obtain the frame from the buffer at 60hz and compose and send the frame. The first game application can store the rendered new picture frame in the idle buffer only after waiting for the SurfaceFlinger to acquire the picture frame from the buffer. In this case, the rendering frame rate of the first game application is also substantially unchanged, or maintained at around 60PFS, with the refresh rate unchanged. Even if the frame rate is set to 120PFS, the rendering frame rate of the first game application does not break through 60PFS, and the user experience is poor.
Fig. 7 shows a schematic diagram of another electronic device 100 rendering and displaying a picture frame.
As shown in fig. 7, in order to identify the buffer framing feature, in the game scenario, the first game application may apply for several buffers in addition, for example, apply for 4 buffers in addition, and under normal circumstances, the first game application may set the 4 buffers applied for in addition to a pending (to be activated) state. When the first game application receives a user operation to increase the frame rate, the first game application may set 4 buffers in a to-be-activated state to an active (activated) state. The first gaming application may render and store the picture frames based on 6 buffers. Therefore, the first game application can obtain the picture frames from the buffer without waiting for the surface eFlinger to release the buffer, so that the speed of the first game application for rendering the picture frames is increased, and the rendering frame rate of the first game application is increased.
Thus, the electronic device 100 may count the rendering frame rates of 6 buffers, and obtain the set frame rate. After the set frame rate is obtained, the electronic device 100 may increase the refresh rate such that the value of the adjusted refresh rate is greater than or equal to the set frame rate, such that the first gaming application may reach the user-selected set frame rate.
In other embodiments, as can be seen from the embodiment of fig. 6, if the surface efliger occupies two buffers, one buffer occupied by the surface efliger may be released, so that the surface efliger occupies only one buffer, and thus, the first game application may render and store the frame based on 7 buffers. Therefore, the first game application can obtain the picture frames from the buffer without waiting for the surface eFlinger to release the buffer, so that the speed of the first game application for rendering the picture frames is increased, and the rendering frame rate of the first game application is increased.
Thus, the electronic device 100 may count the rendering frame rates of 7 buffers, and obtain the set frame rate. After the set frame rate is obtained, the electronic device 100 may increase the refresh rate such that the value of the adjusted refresh rate is greater than or equal to the set frame rate, such that the first gaming application may reach the user-selected set frame rate.
The first game application may apply for 4 buffers to be activated when the first game application is started, and the first game application may also apply for 4 buffers to be activated when receiving the user operation to increase the frame rate, which is not limited in this application.
The first game application may apply for more or fewer buffers, which is not limited to applying for 4 buffers.
In this manner, the electronic device 100 may dynamically adjust the refresh rate based on the set frame rate in the first gaming application such that the first gaming application may render the resulting picture frames at a higher rendering frame rate.
4. Adjusting refresh rate based on game mode
The first gaming application may provide different gaming modes and the electronic device 100 may determine the resulting refresh rate based on the different gaming modes in the first gaming application.
By way of example, the first gaming application may provide a number of different gaming modes, such as a performance mode, an equalization mode, a power saving mode, and the like. Different game modes have different refresh rates based on rendering frame rate matching.
For example, for performance mode, where the electronic device 100 prioritizes game performance, such as user experience priority such as game smoothness, the electronic device 100 may determine a refresh rate that is twice the rendering frame rate based on the rendering frame rate, and the maximum refresh rate of the refresh rates that is twice the rendering frame rate is the refresh rate in performance mode. If there is no refresh rate twice the rendering frame rate, the one refresh rate with the largest value is selected.
Illustratively, if the rendering frame rate of the first gaming application is 30PFS, the supported refresh rates of the electronic device 100 include 30hz, 60hz, 90hz, 120hz, etc. Then the electronic device 100 may determine that the refresh rate is 120hz.
Illustratively, if the rendering frame rate of the first gaming application is 60PFS, the supported refresh rates of the electronic device 100 include 30hz, 60hz, 90hz, 120hz, etc. Then the electronic device 100 may determine that the refresh rate is 120hz.
Illustratively, if the rendering frame rate of the first gaming application is 90PFS, the supported refresh rates of the electronic device 100 include 30hz, 60hz, 90hz, 120hz, etc. Then the electronic device 100 may determine that the refresh rate is 120hz. If there is no refresh rate twice the rendering frame rate, the refresh rate with the largest value is selected.
For another example, for the balanced mode, the electronic device 100 needs to comprehensively consider the game performance and the game power consumption, and then the electronic device 100 may determine a refresh rate twice the rendering frame rate based on the rendering frame rate, and set the minimum refresh rate of the refresh rates twice the rendering frame rate as the refresh rate in the performance mode. If there is no refresh rate twice the rendering frame rate, then the one refresh rate closest to the refresh rate twice the rendering frame rate is selected.
Illustratively, if the rendering frame rate of the first gaming application is 60PFS, the supported refresh rates of the electronic device 100 include 30hz, 60hz, 90hz, 120hz, etc. Then the electronic device 100 may determine that the refresh rate is 120hz.
Illustratively, if the rendering frame rate of the first gaming application is 30PFS, the supported refresh rates of the electronic device 100 include 30hz, 60hz, 90hz, 120hz, etc. Then the electronic device 100 may determine that the refresh rate is 60hz.
Illustratively, if the rendering frame rate of the first gaming application is 80PFS, the supported refresh rates of the electronic device 100 include 30hz, 60hz, 90hz, 120hz, etc. Then the electronic device 100 may determine that the refresh rate is 80hz. If there is no refresh rate twice the rendering frame rate, then the one refresh rate closest to the refresh rate twice the rendering frame rate is selected.
For another example, for the power saving mode, the electronic device 100 only needs to consider game power consumption, and the electronic device 100 may determine the value of the refresh rate based on the value of the rendering frame rate of the first game application, where the value of the refresh rate is the same as the value of the rendering frame rate, so that the power consumption of the electronic device 100 is the lowest, and the electric quantity of the electronic device 100 may be saved. If there is no refresh rate that is the same as the value of the rendering frame rate, then the one that is closest to the value of the rendering frame rate is selected.
Illustratively, if the rendering frame rate of the first gaming application is 60PFS, the supported refresh rates of the electronic device 100 include 30hz, 60hz, 90hz, 120hz, etc. Then the electronic device 100 may determine that the refresh rate is 60hz.
Illustratively, if the rendering frame rate of the first gaming application is 30PFS, the supported refresh rates of the electronic device 100 include 30hz, 60hz, 90hz, 120hz, etc. Then the electronic device 100 may determine that the refresh rate is 30hz.
Not limited to the performance mode, the equalization mode, and the power saving mode, the first gaming application may also provide other more gaming modes, which are not limited in this regard.
5. Adjusting refresh rate based on temperature information
The electronic device 100 may monitor the device temperature in real time. After the device temperature is greater than the preset temperature, the electronic device 100 may reduce the refresh rate, so as to reduce power consumption of the device, reduce the device temperature, and avoid the occurrence of the situation that the electronic device 100 is scalded.
In one possible implementation, the electronic device 100 may reduce the refresh rate to a minimum.
Illustratively, if the current year refresh rate of electronic device 100 is 120hz, the supported refresh rates of electronic device 100 include 30hz, 60hz, 90hz, 120hz, and the like. After the device temperature is greater than the preset temperature, then the electronic device 100 may determine that the refresh rate is 30hz.
In other possible implementations, the electronic device 100 may also reduce the refresh rate to one gear.
For example, if the refresh rate of the electronic device 100 is 120hz in the current year, the supported refresh rates of the electronic device 100 include 30hz, 60hz, 90hz, 120hz, etc. after the device temperature is greater than the preset temperature, the electronic device 100 may determine that the refresh rate is 90hz.
Optionally, after the electronic device 100 decreases the refresh rate, the electronic device 100 may also increase the refresh rate of the electronic device 100 after monitoring that the device temperature is less than the preset temperature. The electronic device 100 may gradually increase the refresh rate of the electronic device 100, or the electronic device 100 may directly increase the refresh rate of the electronic device 100 to a maximum value, which is not limited in this application.
6. Adjusting refresh rate based on frame insertion information
The frame insertion can increase one frame in every two frames of images displayed by the original images, shorten the display time between each frame, doubly improve the time, and generally improve the refresh rate of the screen, for example, the refresh rate can be improved from original 60Hz to 120HZ. Thus, the load of the mobile phone GPU for rendering the picture frames in different modes can be reduced.
If the user starts the frame insertion function in the first game application, the electronic device 100 may obtain the frame insertion value, and the electronic device 100 needs to adjust the value of the refresh rate to be greater than or equal to the frame insertion value.
Illustratively, the user selected plug frame is 120HZ, and then the electronic device 100 needs to adjust the refresh rate to at least 120HZ.
7. Adjusting refresh rate based on split-screen display of a game
If the game interface is displayed in a split screen manner, the power consumption of the electronic device 100 will increase, and in order to reduce the power consumption of the electronic device 100, the electronic device 100 may reduce the refresh rate.
In one possible implementation, the electronic device 100 may reduce the refresh rate to a minimum.
Illustratively, if the current year refresh rate of electronic device 100 is 120hz, the supported refresh rates of electronic device 100 include 30hz, 60hz, 90hz, 120hz, and the like. After the game interface split screen display, then the electronic device 100 may determine that the refresh rate is 30hz.
In other possible implementations, the electronic device 100 may also reduce the refresh rate to one gear.
Illustratively, if the current year refresh rate of electronic device 100 is 120hz, the supported refresh rates of electronic device 100 include 30hz, 60hz, 90hz, 120hz, and the like. After the game interface split screen display, then the electronic device 100 may determine that the refresh rate is 90hz.
Optionally, after the electronic device 100 decreases the refresh rate, the electronic device 100 may also increase the refresh rate of the electronic device 100 after the game is not split-screen displayed. The electronic device 100 may gradually increase the refresh rate of the electronic device 100, or the electronic device 100 may directly increase the refresh rate of the electronic device 100 to a maximum value, which is not limited in this application.
8. Adjusting refresh rate based on user operation
In some embodiments, the electronic device 100 may also receive a user operation to turn up the refresh rate of the electronic device 100. The electronic device 100 may adjust the refresh rate of the electronic device 100 to a user-selected refresh rate.
In some embodiments, the user operation may also be referred to as a user setting a refresh rate.
Illustratively, if the current year refresh rate of electronic device 100 is 90hz, the supported refresh rates of electronic device 100 include 30hz, 60hz, 90hz, 120hz, and the like. After electronic device 100 receives a user setting the refresh rate to 120hz, electronic device 100 may determine that the refresh rate is 120hz.
The above provides several different ways of adjusting the screen refresh rate. For example, electronic device 100 may determine a refresh rate based on a game scene, electronic device 100 may determine a refresh rate based on a rendering frame rate dithering scene, electronic device 100 may adjust a refresh rate based on game information, electronic device 100 may adjust a refresh rate based on a game mode, electronic device 100 may adjust a refresh rate based on temperature information, electronic device 100 may adjust a refresh rate based on an interpolation frame information, electronic device 100 may adjust a refresh rate based on a game split screen display, and electronic device 100 may adjust a refresh rate based on a user operation.
In some embodiments, the electronic device 100 may adjust the refresh rate based on the above-mentioned different scenes alone, and in other embodiments, the electronic device 100 may also adjust the refresh rate by comprehensively considering the combined actions of two or more scenes, which is not limited in this application.
The present application next describes the electronic device 100 determining the refresh rate by considering a plurality of factors, such as game scene, rendered frame rate dithering scene, game information, game mode, temperature information, frame inserting information, game split screen display, user operation, and the like.
The electronic device 100 needs to comprehensively consider different factors, the refresh rates determined by the different factors are different, the specific weights of the different factors are different, the electronic device 100 can count the total ticket number of each refresh rate, and the refresh rate with the largest total ticket number is used as the finally determined refresh rate.
TABLE 1
/>
Table 1 shows the number of weight votes for different factors affecting the refresh rate. The game scene factor determines that the weighted ticket number of the refresh rate is 2 tickets. The rendering frame rate dithering scene factor determines that the weighted ticket number of the refresh rate is 1 ticket. The game information factor determines that the weighted ticket number of the refresh rate is 4 tickets. The balance mode factor determines that the weight ticket number of the refresh rate is 3 tickets, and the performance mode and power saving mode factors determine that the weight ticket number of the refresh rate is 2 tickets. The temperature information factor determines that the weighted ticket number of the refresh rate is 5 tickets. The frame inserting information factor determines that the weight ticket number of the refresh rate is 4 tickets. The game split screen display factors determine that the weighted ticket number of the refresh rate is 2 tickets. The user operation factor determines that the weighted ticket number of the refresh rate is 1 ticket.
For example, the refresh rate supported by the electronic device 100 includes 30hz, 60hz, 90hz, 120hz, etc., the counted number of tickets for the refresh rate of 30hz by the electronic device 100 is 3 tickets, the counted number of tickets for the refresh rate of 60hz by the electronic device 100 is 0 ticket, the counted number of tickets for the refresh rate of 90hz by the electronic device 100 is 9 tickets, the counted number of tickets for the refresh rate of 120hz by the electronic device 100 is 4 tickets, and the electronic device 100 can determine that the final refresh rate is 90hz. The electronic device 100 may refresh the display frames at a refresh rate of 90hz.
The value of the weight ticket number of each factor is only used to explain the present application, and the value of the weight ticket number of each factor may be other values, which is not limited in the present application.
Fig. 8 illustrates a schematic diagram of an electronic device 100 determining a refresh rate based on a combination of factors.
Exemplary refresh rates supported by electronic device 100 include 30hz, 60hz, 90hz, 120hz, and the like.
For example, as shown in FIG. 8, if the first gaming application enters a game play scenario, the electronic device 100 may increase the refresh rate, e.g., determine that the refresh rate is 120hz. Then the game scenario factor may cast 2 tickets to a refresh rate of 120hz.
Illustratively, as shown in FIG. 8, the electronic device 100 recognizes the frame rate jitter, and the electronic device 100 may decrease the refresh rate, e.g., determine that the refresh rate is 90hz. Then the render frame rate dither scene factor may cast a 1 ticket to a refresh rate of 90hz.
For example, as shown in fig. 8, when the electronic device 100 recognizes game information (e.g., a set frame rate), the electronic device 100 may set a value of the refresh rate to be equal to or greater than the set frame rate, e.g., set the frame rate to 120PFS, and may determine that the refresh rate is 120hz. Then the game information factor may cast 4 tickets to a refresh rate of 120hz.
For example, as shown in FIG. 8, the electronic device 100 may recognize a gaming mode (e.g., a performance mode) and the electronic device 100 may increase the refresh rate, e.g., determine that the refresh rate is 120hz. Then the play mode factor may cast 2 tickets to a refresh rate of 120hz.
For example, as shown in fig. 8, the electronic device 100 recognizes that the device temperature is greater than the preset value, the electronic device 100 may decrease the refresh rate, for example, determine that the refresh rate is 30hz. Then the temperature information factor may cast 5 tickets to a refresh rate of 30hz.
Illustratively, as shown in fig. 8, the electronic device 100 recognizes that the frame rate of the inserted frame is 120PFS, the electronic device 100 may set the value of the refresh rate to be equal to or greater than the value of the frame rate of the inserted frame, e.g., the electronic device 100 may determine that the refresh rate is 120hz. Then the framing information factor may cast 4 tickets to a refresh rate of 120hz.
For example, as shown in FIG. 8, electronic device 100 may recognize that the game interface is split-screen displayed and electronic device 100 may decrease the refresh rate, e.g., determine that the refresh rate is 90hz. Then the game split display factor may cast 2 tickets to a refresh rate of 90hz.
Illustratively, as shown in FIG. 8, the electronic device 100 recognizes the user operation and adjusts the refresh rate to 120hz, and the electronic device 100 may adjust the refresh rate to 120hz. Then the user operational factor may cast a 1 ticket to a refresh rate of 120hz.
Thereafter, the electronic device 100 may count the number of tickets for each refresh rate, and use the refresh rate with the largest number of tickets as the refresh rate finally determined by the electronic device 100.
As an example, as shown in fig. 8, the electronic device 100 determines that the ticket number of the refresh rate of 30hz is 5 tickets, the electronic device 100 determines that the ticket number of the refresh rate of 60hz is 0 ticket, the electronic device 100 determines that the ticket number of the refresh rate of 90hz is 3 ticket, the electronic device 100 determines that the ticket number of the refresh rate of 120hz is 13 ticket, then finally, the electronic device 100 determines that the optimal refresh rate is 120hz, and adjusts the refresh rate of the electronic device 100 to 120hz. The electronic device 100 may refresh the display frames at a refresh rate of 120hz.
It should be noted that, the embodiment of fig. 8 is merely an example for illustrating how the factors cooperate to determine the optimal refresh rate, and the factors cooperate to determine that the optimal refresh rate is different in different situations, which is not limited in this application.
Fig. 9 is a schematic diagram of a method for controlling a refresh rate according to the present application.
And S901, displaying a desktop by the electronic equipment, wherein the desktop comprises icons of the first game application.
Illustratively, the desktop may be the user interface 310 shown in FIG. 3A.
The icon of the first game application may be an application icon clicked by the user as shown in fig. 3A.
S902, the electronic device receives and responds to a first operation of a user on an icon of a first game application, and determines a first refresh rate based on parameter information of the electronic device.
Wherein the parameter information of the electronic device includes one or more of: game scene information, jitter scene information, game mode information, temperature information, frame inserting information, game split screen display information and refresh rate information set by a user.
Wherein the first refresh rate refers to a screen refresh rate.
S903, the electronic device refreshes a frame of a screen displaying the first game application at the first refresh rate.
The frame of the first game application may be a frame of a game loading scene, and the frame of the first game application before entering the game play may be referred to as a frame of the game loading scene. Such as user interface 340 shown in fig. 3B and user interface 320 shown in fig. 3C.
The picture frame of the first game application may also be a picture frame of a game play scene. Such as user interface 330 shown in fig. 3D.
Therefore, the electronic equipment can jointly determine the optimal refresh rate and dynamically adjust the screen refresh rate based on one or more factors, so that the power consumption and the user experience of the electronic equipment are optimal in the game process, the power consumption of the electronic equipment is saved, and the game experience of the user is improved.
In one possible implementation, the number information includes game scenario information, including game loading scenario information and game play scenario information; the electronic device receives and responds to a first operation of a user aiming at an icon of a first game application, and determines a first refresh rate based on parameter information of the electronic device, and the method specifically comprises the following steps: the electronic equipment receives and responds to a first operation of a user on an icon of a first game application, and displays a first picture frame of the first game application, wherein the first picture frame comprises a game starting option, and the first picture frame is a picture frame of a game loading scene; the electronic device determines a first refresh rate based on the game loading scene information; the electronic device refreshes and displays the picture frame of the first game application at a first refresh rate, and specifically comprises the following steps: the electronic device refreshes the display of the first picture frame at the first refresh rate.
Wherein the first picture frame may be the user interface 320 shown in fig. 3C.
In this way, the electronic device may determine different screen refresh rates based on different game scenarios. In the game loading scene, the electronic equipment can reduce the screen refresh rate and save the power consumption of the electronic equipment.
In one possible implementation, after the electronic device refreshes the display of the first picture frame at the first refresh rate, the method further comprises: the electronic device receives and responds to a second operation of the user aiming at the game starting option, and determines a second refresh rate based on game opposite scene information; the electronic equipment refreshes and displays a second picture frame of the first game application at a second refreshing rate, wherein the second picture frame is a picture frame of a game scene; wherein the second refresh rate is greater than the first refresh rate.
Wherein the second picture frame may be the user interface 330 shown in fig. 3D.
The second picture frame is displayed after the electronic device receives a second operation of the user for starting the game option. The second picture frame may include an exit game play scene option. The user may stop displaying the second frame of the first game application and begin displaying the first frame of the first game application by exiting the game play scene option in the second frame.
In this way, the electronic device may determine different screen refresh rates based on different game scenarios. In a game play scene, the electronic equipment can improve the screen refresh rate so as to improve the fluency of game pictures and improve the user experience. In the game loading scene, the electronic equipment can reduce the screen refresh rate and save the power consumption of the electronic equipment.
In one possible implementation, the parameter information includes game loading scenario information and game play scenario information; the electronic device receives and responds to a first operation of a user aiming at an icon of a first game application, and determines a first refresh rate based on parameter information of the electronic device, and the method specifically comprises the following steps: the electronic equipment receives and responds to a first operation of a user on an icon of a first game application, and displays a second picture frame of the first game application, wherein the second picture frame is a picture frame of a game scene; the electronic device determines a first refresh rate based on the game play scene information; the electronic device refreshes and displays the picture frame of the first game application at a first refresh rate, and specifically comprises the following steps: the electronic device refreshes a second picture frame displaying the first gaming application at the first refresh rate.
Wherein the second picture frame may be the user interface 330 shown in fig. 3D.
In this way, the user may have previously run the first gaming application in the background. After the user clicks on the icon of the first game application, the first game application may be run in the foreground. And determining the refresh rate corresponding to the game play scene based on the game play scene.
In one possible implementation, the parameter information includes jitter scene information, the electronic device receives and responds to a first operation of a user on an icon of a first game application, and determines a target refresh rate based on the parameter information of the electronic device, and specifically includes: after the electronic device receives and responds to the first operation of the user on the icon of the first game application, the electronic device determines a target refresh rate based on the dithering scene information under the condition that the second condition is not met; wherein the second condition comprises one or more of: the difference value between the average rendering frame rate of at least n frames in the m windows and the average rendering frame rate of the frames in the m windows is within a fifth preset value, wherein each window comprises a preset number of frames; the difference value between the average rendering frame rate and the set frame rate of the m frames in the window is within a sixth preset value; the standard deviation of the synthetic time of the picture frames in the m windows is smaller than a seventh preset value; the CPU load of the electronic device is less than an eighth preset value.
Wherein the set frame rate may be a game frame rate set by the user within the first game application.
In one possible implementation, the parameter information includes game information including a set frame rate, the electronic device receives and responds to a first operation of the user on an icon of the first game application, and determines the target refresh rate based on the parameter information of the electronic device, including: after the electronic device receives and responds to a first operation of the user on the icon of the first game application, the electronic device determines a target refresh rate based on the set frame rate under the condition that the electronic device acquires the set frame rate; wherein the value of the target refresh rate is equal to or greater than the value of the set frame rate.
Wherein the set frame rate may be a game frame rate set by the user within the first game application.
In some embodiments, the first gaming application may report the set frame rate to the electronic device such that the electronic device may obtain the set frame rate. In other embodiments, the first game application may not report the set frame rate to the electronic device, and the electronic device may not obtain the set frame rate.
Under the condition that the electronic equipment can acquire the set frame rate, the electronic equipment can adjust the screen refresh rate based on the set frame rate, and the screen refresh rate needs to be greater than or equal to the set frame rate.
In one possible implementation, the method further includes: under the condition that the electronic equipment cannot acquire the set frame rate, the electronic equipment counts the average frame rate of the multi-frame picture frames in the first time period, and acquires the set frame rate; the electronic device determines a target refresh rate based on the set frame rate; the value of the target refresh rate is greater than or equal to the value of the average frame rate of the multi-frame picture frames in the first time duration.
In the case where the electronic device cannot acquire the set frame rate, the electronic device may release the screen refresh rate control. So that this female consideration of the first game can run to the set frame rate. And then, the electronic equipment can count the average frame rate in a certain time length to obtain the set frame rate. And determining the screen refresh rate based on the estimated set frame rate. The value of the target refresh rate is greater than or equal to the value of the average frame rate of the multi-frame picture frames in the first time duration.
In one possible implementation, the first gaming application is allocated q buffers; before the electronic device obtains the set frame rate, the method further comprises: the electronic equipment applies for s buffers additionally; the electronic device renders the picture frame based on the (q+s) buffers and the set frame rate.
In this way, the electronic device can dynamically allocate s buffers to the first game application, so that the game frame rate can run to the set frame rate based on a sufficient number of buffers, and the electronic device can obtain the set frame rate through statistics.
In one possible implementation, the parameter information includes game mode information, and the electronic device receives and responds to a first operation of a user on an icon of a first game application, and determines a target refresh rate based on the parameter information of the electronic device, specifically including: after the electronic device receives and responds to a first operation of a user on an icon of a first game application, the electronic device acquires a game frame rate of the first game application; the electronic device determines a target refresh rate based on the value of the game frame rate and the game mode information.
Here, the game frame rate may be a default frame rate of the game, or may be a frame rate set by the user, which is not limited in this application.
The first gaming application may provide a plurality of different gaming modes, with different gaming modes having different screen refresh rates determined based on the gaming frame rate. For example, the game mode may include a performance mode, an equalization mode, a power saving mode, and the like.
In one possible implementation, the electronic device receives and responds to a first operation of a user on an icon of a first game application, and determines a first refresh rate based on parameter information of the electronic device, specifically including: the electronic equipment determines the total ticket number of each refresh rate in the refresh rates based on the value of the parameter information and the ticket number relation between the value of the parameter information and the refresh rates; the electronic device determines one of the plurality of refresh rates having the highest total number of tickets as a target refresh rate.
In this way, the electronic device can combine the plurality of parameter information to jointly determine the optimal refresh rate. So that both the power consumption of the electronic device and the performance of the game are balanced.
The application provides an electronic device, comprising: one or more processors and one or more memories; wherein the one or more memories are coupled to the one or more processors, the one or more memories for storing computer program code comprising computer instructions that, when executed by the one or more processors, cause the electronic device to perform a refresh rate control method as shown in fig. 8.
Another electronic device is provided that includes one or more functional modules configured to perform a refresh rate control method as shown in fig. 8.
The present application provides a chip system for use in an electronic device, the chip system comprising processing circuitry and interface circuitry, the interface circuitry for receiving instructions and transmitting to the processing circuitry, the processing circuitry for executing instructions to perform a refresh rate control method as shown in fig. 8.
The present application provides a computer readable storage medium comprising instructions that when executed on an electronic device cause a refresh rate control method as shown in fig. 8 to be performed.
Embodiments of the present application provide a computer program product that, when run on a computer, causes the computer to perform a refresh rate control method as shown in fig. 8.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof.
When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, produces a flow or function in accordance with embodiments of the present application, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by a wired (e.g., coaxial cable, fiber optic, digital subscriber line), or wireless (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid state disk), etc.
Those of ordinary skill in the art will appreciate that implementing all or part of the above-described method embodiments may be accomplished by a computer program to instruct related hardware, the program may be stored in a computer readable storage medium, and the program may include the above-described method embodiments when executed. And the aforementioned storage medium includes: ROM or random access memory RAM, magnetic or optical disk, etc.
The above embodiments are merely for illustrating the technical solution of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application.

Claims (14)

1. A method of refresh rate control, the method comprising:
the electronic device displays a desktop, the desktop including an icon of a first gaming application;
the electronic equipment receives and responds to a first operation of a user on the icon of the first game application, and a target refresh rate is determined based on parameter information of the electronic equipment;
The electronic device refreshing and displaying the picture frame of the first game application at the target refresh rate;
wherein the parameter information of the electronic device includes one or more of the following: game scene information, jitter scene information, game mode information, temperature information, frame inserting information, game split screen display information and refresh rate information set by a user.
2. The method of claim 1, wherein the parameter information comprises game scenario information, the game scenario information comprises game loading scenario information and game play scenario information, and the target refresh rate comprises a first refresh rate; the electronic equipment receives and responds to a first operation of a user on the icon of the first game application, and determines a target refresh rate based on parameter information of the electronic equipment, and the method specifically comprises the following steps:
the electronic equipment receives and responds to a first operation of a user on an icon of the first game application, and displays a first picture frame of the first game application, wherein the first picture frame comprises a game starting option, and is a picture frame of a game loading scene;
the electronic device determining the first refresh rate based on the game loading scenario information;
The electronic device refreshes and displays the picture frame of the first game application at the target refresh rate, and specifically comprises the following steps:
the electronic device refreshes and displays the first picture frame at the first refresh rate.
3. The method of claim 2, wherein after the electronic device refreshes displaying the first picture frame at the first refresh rate, the method further comprises:
the electronic equipment receives and responds to a second operation of the user for the game starting option, and a second refresh rate is determined based on the game playing scene information;
the electronic equipment refreshes and displays a second picture frame of the first game application at the second refresh rate, wherein the second picture frame is a picture frame of a game scene;
wherein the second refresh rate is greater than the first refresh rate.
4. The method of claim 1, wherein the parameter information comprises game loading scenario information and game play scenario information, and the target refresh rate comprises a second refresh rate; the electronic equipment receives and responds to a first operation of a user on the icon of the first game application, and determines a second refresh rate based on parameter information of the electronic equipment, and the method specifically comprises the following steps:
The electronic equipment receives and responds to a first operation of a user on an icon of the first game application, and displays a second picture frame of the first game application, wherein the second picture frame is a picture frame of a game scene;
the electronic device determining the second refresh rate based on the game play scene information;
the electronic device refreshes and displays the picture frame of the first game application at the target refresh rate, and specifically comprises the following steps:
the electronic device refreshes the second picture frame displaying the first gaming application at the second refresh rate.
5. The method of claim 3 or 4, wherein prior to the electronic device determining the second refresh rate based on the game play scenario information, the method further comprises:
under the condition that the first condition is met, the electronic equipment determines game play scene information;
the first condition includes one or more of:
the average rendering frame rate of the continuous p-frame picture frames is larger than a first preset value;
the standard deviation of the rendering time of the p-frame picture frames is smaller than a second preset value;
the number of DrawCall operations in the first duration is larger than a third preset value;
and the number of IO operations in the first time period is larger than a fourth preset value.
6. The method according to claim 1, wherein the parameter information comprises jittered scene information, wherein the electronic device receives and responds to a first operation of a user on an icon of the first game application, and wherein determining the target refresh rate based on the parameter information of the electronic device comprises:
after the electronic device receives and responds to the first operation of the user on the icon of the first game application, the electronic device determines the target refresh rate based on the jitter scene information under the condition that a second condition is not met;
wherein the second condition comprises one or more of:
the difference value between the average rendering frame rate of at least n picture frames in m windows and the average rendering frame rate of the picture frames in the m windows is within a fifth preset value, wherein each window comprises a preset number of picture frames;
the difference value between the average rendering frame rate and the set frame rate of the m frames in the window is within a sixth preset value;
the standard deviation of the synthetic time of the picture frames in the m windows is smaller than a seventh preset value;
the CPU load of the electronic equipment is smaller than an eighth preset value.
7. The method of claim 1, wherein the parameter information comprises game information, the game information comprising a set frame rate, the electronic device receiving and responding to a first operation of a user on an icon of the first game application, determining a target refresh rate based on the parameter information of the electronic device, comprising:
After the electronic device receives and responds to the first operation of the user on the icon of the first game application, the electronic device determines the target refresh rate based on the set frame rate under the condition that the electronic device acquires the set frame rate;
wherein the value of the target refresh rate is greater than or equal to the value of the set frame rate.
8. The method of claim 7, wherein the method further comprises:
under the condition that the electronic equipment cannot acquire the set frame rate, the electronic equipment counts the average frame rate of the multi-frame picture frames in the first time period, and acquires the set frame rate;
the electronic device determining the target refresh rate based on the set frame rate;
and the value of the target refresh rate is greater than or equal to the value of the average frame rate of the multi-frame picture frames in the first duration.
9. The method according to claim 7 or 8, wherein the first gaming application is allocated q buffers; before the electronic device obtains the set frame rate, the method further includes:
the electronic equipment applies for s buffers additionally;
the electronic device renders picture frames based on the (q+s) buffers and the set frame rate.
10. The method according to claim 1, wherein the parameter information comprises game mode information, wherein the electronic device receives and responds to a first operation of a user on an icon of the first game application, and wherein determining the target refresh rate based on the parameter information of the electronic device comprises:
after the electronic device receives and responds to the first operation of the user on the icon of the first game application, the electronic device acquires the game frame rate of the first game application;
the electronic device determines the target refresh rate based on the value of the game frame rate and game mode information.
11. The method according to claim 1, wherein the electronic device receives and responds to a first operation of a user on an icon of the first game application, and wherein determining the first refresh rate based on the parameter information of the electronic device comprises:
the electronic equipment determines the total ticket number of each refresh rate in a plurality of refresh rates based on the value of the parameter information and the ticket number relation between the value of the parameter information and the refresh rates;
and the electronic equipment determines that one refresh rate with the highest total ticket number in a plurality of refresh rates is the target refresh rate.
12. An electronic device comprising one or more processors and one or more memories; wherein the one or more memories are coupled to the one or more processors, the one or more memories for storing computer program code comprising computer instructions that, when executed by the one or more processors, cause the electronic device to perform the method of any of claims 1-11.
13. A chip system for application to an electronic device, the chip system comprising processing circuitry and interface circuitry, the interface circuitry for receiving instructions and transmitting to the processing circuitry, the processing circuitry for executing the instructions to perform the method of any of claims 1-11.
14. A computer readable storage medium comprising instructions which, when run on an electronic device, cause the electronic device to perform the method of any of claims 1-11.
CN202310842435.XA 2023-07-10 2023-07-10 Refresh rate control method, electronic device and storage medium Pending CN117687585A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310842435.XA CN117687585A (en) 2023-07-10 2023-07-10 Refresh rate control method, electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310842435.XA CN117687585A (en) 2023-07-10 2023-07-10 Refresh rate control method, electronic device and storage medium

Publications (1)

Publication Number Publication Date
CN117687585A true CN117687585A (en) 2024-03-12

Family

ID=90130749

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310842435.XA Pending CN117687585A (en) 2023-07-10 2023-07-10 Refresh rate control method, electronic device and storage medium

Country Status (1)

Country Link
CN (1) CN117687585A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108628430A (en) * 2018-05-14 2018-10-09 努比亚技术有限公司 A kind of game electricity-saving control method, terminal and computer readable storage medium
CN111767013A (en) * 2020-06-01 2020-10-13 Oppo(重庆)智能科技有限公司 Control method, control device, electronic device, computer-readable storage medium
CN112652263A (en) * 2020-12-25 2021-04-13 深圳传音控股股份有限公司 Refreshing method, terminal and storage medium
CN112667339A (en) * 2020-12-31 2021-04-16 努比亚技术有限公司 Method for setting screen refresh rate, terminal and computer readable medium
CN114632329A (en) * 2022-05-16 2022-06-17 荣耀终端有限公司 Terminal equipment performance adjusting method and related device
CN114764357A (en) * 2021-01-13 2022-07-19 华为技术有限公司 Frame inserting method in interface display process and terminal equipment

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108628430A (en) * 2018-05-14 2018-10-09 努比亚技术有限公司 A kind of game electricity-saving control method, terminal and computer readable storage medium
CN111767013A (en) * 2020-06-01 2020-10-13 Oppo(重庆)智能科技有限公司 Control method, control device, electronic device, computer-readable storage medium
CN112652263A (en) * 2020-12-25 2021-04-13 深圳传音控股股份有限公司 Refreshing method, terminal and storage medium
CN112667339A (en) * 2020-12-31 2021-04-16 努比亚技术有限公司 Method for setting screen refresh rate, terminal and computer readable medium
CN114764357A (en) * 2021-01-13 2022-07-19 华为技术有限公司 Frame inserting method in interface display process and terminal equipment
CN114632329A (en) * 2022-05-16 2022-06-17 荣耀终端有限公司 Terminal equipment performance adjusting method and related device

Similar Documents

Publication Publication Date Title
WO2021175213A1 (en) Refresh rate switching method and electronic device
CN113726950B (en) Image processing method and electronic equipment
US11818497B2 (en) Recording frame rate control method and related apparatus
CN114579075B (en) Data processing method and related device
CN113722030B (en) Display method, electronic equipment and computer storage medium
CN113556598A (en) Multi-window screen projection method and electronic equipment
WO2022007862A1 (en) Image processing method, system, electronic device and computer readable storage medium
CN116055786B (en) Method for displaying multiple windows and electronic equipment
CN116991354A (en) Data processing method and related device
CN115048012B (en) Data processing method and related device
CN110636554A (en) Data transmission method and device
CN114827696B (en) Method for synchronously playing audio and video data of cross-equipment and electronic equipment
CN117687585A (en) Refresh rate control method, electronic device and storage medium
CN115686403A (en) Display parameter adjusting method, electronic device, chip and readable storage medium
CN114830608A (en) Multiplexing method and terminal for multiple HTTP channels
CN116069187B (en) Display method and electronic equipment
CN116700578B (en) Layer synthesis method, electronic device and storage medium
CN115904184B (en) Data processing method and related device
CN117689774A (en) Animation frame skipping method and related device
CN117850727A (en) Vsync signal control method, electronic device, storage medium and chip
CN117667559A (en) Method for monitoring frame loss and electronic equipment
CN118314000A (en) Image prediction method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination