A refresh rate control method, electronic device and storage medium
By dynamically adjusting the screen refresh rate and determining the optimal refresh rate based on multiple factors, the problem of increasing power consumption in high-performance applications of electronic devices is solved, and the optimization of power consumption and user experience is achieved.
Patent Information
- Application Number
- CN202310842435.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-10
- Publication Date
- 2025-03-18
- Estimated Expiration
- 2043-07-10
AI Technical Summary
When using high-performance applications, electronic devices need to schedule more processing power and storage capabilities, resulting in increased power consumption and affecting user experience.
By dynamically adjusting the screen refresh rate, the optimal refresh rate is determined based on game scene information, jitter scene information, game information, game mode information, temperature information, frame insertion information, game split screen display information and user setting refresh rate information to save power consumption and improve user experience.
It optimizes the power consumption and user experience of electronic devices during the game process, saves the power consumption of electronic devices, and improves the user's gaming experience.
Smart Images

Figure CN117687585B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of terminal technology, and in particular to a refresh rate control method, an electronic device and a storage medium. Background Art
[0002] As the application market on electronic devices continues to expand, some application manufacturers (for example, game application manufacturers) have begun to use real physics engines, high-precision rendering and other technologies in their applications, which has also put forward higher requirements on the performance of electronic devices. Therefore, electronic devices will also dispatch more system resources such as processing power and storage capacity to complete the rendering and synthetic display of the application's screen frames. This also brings more power consumption to electronic devices, causing the heat of electronic devices to increase, affecting the user's experience of using the application. Summary of the invention
[0003] The present application provides a refresh rate control method, an electronic device and a storage medium, wherein the electronic device can dynamically adjust the screen refresh rate, thereby saving power consumption of the electronic device and improving the user's gaming experience.
[0004] In a first aspect, the present application provides a refresh rate control method, the method comprising: an electronic device displays a desktop, the desktop including an icon of a first game application; the electronic device receives and responds to a first operation of a user on the icon of the first game application, and determines a first refresh rate based on parameter information of the electronic device; the electronic device refreshes and displays a screen frame of the first game application at the first refresh rate; wherein the parameter information of the electronic device includes one or more of the following: game scene information, jitter scene information, game information, game mode information, temperature information, interpolation information, game split-screen display information, and user-set refresh rate information.
[0005] Among them, the first refresh rate refers to the screen refresh rate.
[0006] The screen frame of the first game application may be a screen frame of a game loading scene, or a screen frame of a game match scene. Among them, the screen frame before entering the game match can be called a screen frame of the game loading scene.
[0007] In this way, the electronic device can jointly determine the optimal refresh rate based on one or more of the above factors and dynamically adjust the screen refresh rate so that during the game, the power consumption of the electronic device and the user experience are both optimized, saving the power consumption of the electronic device and improving the user's gaming experience.
[0008] In combination with the first aspect, in a possible implementation method, the digital information includes game scene information, and the game scene information includes game loading scene information and game match scene information; the electronic device receives and responds to the user's first operation on the icon of the first game application, and determines the first refresh rate based on the parameter information of the electronic device, specifically including: the electronic device receives and responds to the user's first operation on the icon of the first game application, and displays the first screen frame of the first game application, the first screen frame includes a start game option, and the first screen frame is a screen frame of the game loading scene; the electronic device determines the first refresh rate based on the game loading scene information; the electronic device refreshes and displays the screen frame of the first game application at the first refresh rate, specifically including: the electronic device refreshes and displays the first screen frame at the first refresh rate.
[0009] In this way, the electronic device can determine different screen refresh rates based on different game scenarios. In the game loading scenario, the electronic device can reduce the screen refresh rate to save power consumption of the electronic device.
[0010] In combination with the first aspect, in a possible implementation, after the electronic device refreshes and displays the first screen frame at a first refresh rate, the method also includes: the electronic device receives and responds to the user's second operation on the start game option, and determines the second refresh rate based on the game game scene information; the electronic device refreshes and displays the second screen frame of the first game application at the second refresh rate, the second screen frame being a screen frame of the game game scene; wherein the second refresh rate is greater than the first refresh rate.
[0011] The second frame is displayed after the electronic device receives the second operation of the user for the start game option. The second frame may include an exit game match scene option. The user can stop displaying the second frame of the first game application through the exit game match scene option in the second frame, and start displaying the first frame of the first game application.
[0012] In this way, the electronic device can determine different screen refresh rates based on different game scenarios. In the game match scenario, the electronic device can increase the screen refresh rate to improve the smoothness of the game screen and improve the user experience. In the game loading scenario, the electronic device can reduce the screen refresh rate to save the power consumption of the electronic device.
[0013] In combination with the first aspect, in a possible implementation method, the parameter information includes game loading scene information and game match 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 first refresh rate based on the parameter information of the electronic device, specifically including: the electronic device receives and responds to a first operation of a user on an icon of a first game application, and displays a second screen frame of the first game application, where the second screen frame is a screen frame of a game match scene; the electronic device determines the first refresh rate based on the game match scene information; the electronic device refreshes and displays the screen frame of the first game application at the first refresh rate, specifically including: the electronic device refreshes and displays the second screen frame of the first game application at the first refresh rate.
[0014] In this way, the user can run the first game application in the background before. After the user clicks the icon of the first game application, the first game application can run in the foreground. And the refresh rate corresponding to the game game scene is determined based on the game game scene.
[0015] In combination with the first aspect, in a possible implementation method, before the electronic device determines the second refresh rate based on the game game scene information, the method also includes: when the first condition is met, the electronic device determines the game game scene information; the first condition includes one or more of the following: the average rendering frame rate of consecutive p frames is greater than a first preset value; the standard deviation of the rendering time of p frames is less than a second preset value; the number of DrawCall operations within a first time length is greater than a third preset value; the number of IO operations within the first time length is greater than a fourth preset value.
[0016] In this way, the electronic device assists in identifying the game loading scene and the game match scene based on the above conditions to improve the accuracy of the electronic device in adjusting the screen refresh rate based on the game scene.
[0017] In combination with the first aspect, in a possible implementation method, the parameter information includes jitter scene information, the electronic device receives and responds to the user's first operation on the icon of the first game application, and determines the target refresh rate based on the parameter information of the electronic device, specifically including: after the electronic device receives and responds to the user's first operation on the icon of the first game application, if the second condition is not met, the electronic device determines the target refresh rate based on the jitter scene information; wherein the second condition includes one or more of the following: the difference between the average rendering frame rate of the screen frames in at least n windows among the m windows and the average rendering frame rate of the screen frames in the m windows is within a fifth preset value, wherein each window includes a preset number of screen frames; the difference between the average rendering frame rate of the screen frames in the m windows and the set frame rate is within a sixth preset value; the standard deviation of the synthesis time of the screen frames in the m windows is less than the seventh preset value; the CPU load of the electronic device is less than the eighth preset value.
[0018] The set frame rate may be a game frame rate set by the user in the first game application.
[0019] In combination with the first aspect, in a possible implementation method, 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 including: after the electronic device receives and responds to the first operation of the user on the icon of the first game application, when the electronic device obtains the set frame rate, the electronic device determines the target refresh rate based on 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.
[0020] The set frame rate may be a game frame rate set by the user in the first game application.
[0021] In some embodiments, the first game application can report the set frame rate to the electronic device, so that the electronic device can 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 cannot obtain the set frame rate.
[0022] When the electronic device can obtain the set frame rate, the electronic device can adjust the screen refresh rate based on the set frame rate, and the screen refresh rate must be greater than or equal to the set frame rate.
[0023] In combination with the first aspect, in a possible implementation method, the method also includes: when the electronic device cannot obtain the set frame rate, the electronic device counts the average frame rate of multiple frames within a first time period to obtain the set frame rate; the electronic device determines the target refresh rate based on the set frame rate; wherein the value of the target refresh rate is greater than or equal to the value of the average frame rate of the multiple frames within the first time period.
[0024] When the electronic device cannot obtain the set frame rate, the electronic device can release the screen refresh rate control. This allows the player of the first game to run at the set frame rate. Afterwards, the electronic device can count the average frame rate within a certain period of time to obtain the set frame rate. The screen refresh rate is determined based on the estimated set frame rate. The target refresh rate is greater than or equal to the average frame rate of multiple frames within the first period of time.
[0025] In combination with the first aspect, in a possible implementation, the first game application is allocated q buffers; before the electronic device obtains the set frame rate, the method also includes: the electronic device applies for s additional buffers; the electronic device renders the screen frame based on (q+s) buffers and the set frame rate.
[0026] In this way, the electronic device can dynamically allocate s buffers to the first game application, so that the game frame rate can reach the set frame rate based on a sufficient number of buffers, and the electronic device can obtain the set frame rate by statistics.
[0027] In combination with the first aspect, in a possible implementation method, 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, specifically including: 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 obtains the game frame rate of the first game application; the electronic device determines the target refresh rate based on the numerical value of the game frame rate and the game mode information.
[0028] Here, the game frame rate can be the default frame rate of the game or the frame rate set by the user, and this application does not limit this.
[0029] The first game application may provide a plurality of different game modes, and different game modes may have different screen refresh rates determined based on the game frame rate. For example, the game modes may include performance mode, balanced mode, and power saving mode.
[0030] In combination with the first aspect, in a possible implementation method, 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 device determines the total number of votes for each of multiple refresh rates based on the value of the parameter information and the relationship between the value of the parameter information and the number of votes of the multiple refresh rates; the electronic device determines the refresh rate with the largest total number of votes among the multiple refresh rates as the target refresh rate.
[0031] In this way, the electronic device can combine multiple parameter information to jointly determine the optimal refresh rate, so that the power consumption of the electronic device and the performance of the game are balanced.
[0032] 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, and the one or more memories are used to store computer program code, and the computer program code includes computer instructions, and when the one or more processors execute the computer instructions, the electronic device executes the method in the above-mentioned first aspect and any possible implementation of the first aspect.
[0033] In a third aspect, the present application provides another electronic device, comprising one or more functional modules, wherein the one or more functional modules are used to execute the method in the above-mentioned first aspect and any possible implementation manner of the first aspect.
[0034] In a fourth aspect, the present application provides a chip system for use in an electronic device, the chip system comprising a processing circuit and an interface circuit, the interface circuit being used to receive instructions and transmit them to the processing circuit, the processing circuit being used to run instructions to execute the method in the above-mentioned first aspect and any possible implementation method of the first aspect.
[0035] In a fifth aspect, the present application provides a computer-readable storage medium, comprising instructions, characterized in that when the instructions are executed on an electronic device, the method in the above-mentioned first aspect and any possible implementation of the first aspect is executed.
[0036] In a sixth aspect, an embodiment of the present application provides a computer program product. When the computer program product runs on a computer, it enables the computer to execute the method in the above-mentioned first aspect and any possible implementation manner of the first aspect.
[0037] The beneficial effects of the second and sixth aspects can refer to the beneficial effects of the first aspect and any possible implementation method of the first aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1A A schematic diagram of the structure of an electronic device 100 provided in an embodiment of the present application is shown;
[0039] Figure 1B A schematic diagram of the software structure of an electronic device 100 provided in an embodiment of the present application is shown;
[0040] Figure 1C A schematic diagram showing a refresh rate adjustment method of an electronic device 100 provided in an embodiment of the present application is shown;
[0041] Figure 2 A timing diagram of a picture frame from rendering to display provided in an embodiment of the present application is shown;
[0042] Figure 3A-3D A schematic diagram showing entering a game scene based on a first game application is shown;
[0043] Figure 4 A schematic diagram showing a method for the electronic device 100 to obtain the number of DrawCalls;
[0044] Figure 5A-5D A schematic diagram provided for this application;
[0045] Figure 6 A schematic diagram showing an electronic device 100 rendering and displaying a picture frame;
[0046] Figure 7 A schematic diagram showing another electronic device 100 rendering and displaying a picture frame;
[0047] Figure 8 A schematic diagram of determining an optimal refresh rate provided in an embodiment of the present application is shown;
[0048] Fig. 9 A schematic diagram of a refresh rate control method provided in this application. DETAILED DESCRIPTION
[0049] The technical solutions in the embodiments of the present application will be described clearly and in detail below in conjunction with the accompanying drawings. In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in the text is only a description of the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, "multiple" means two or more than two.
[0050] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as suggesting or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features, and in the description of the embodiments of the present application, unless otherwise specified, "plurality" means two or more.
[0051] The following introduces the hardware structure of an electronic device provided in an embodiment of the present application.
[0052] Figure 1A A schematic structural diagram of an electronic device 100 provided in an embodiment of the present application is shown.
[0053] It should be understood that Figure 1A The electronic device 100 shown is only an example, and the electronic device 100 may have more Figure 1A More or fewer components may be shown, two or more components may be combined, or there may be a different configuration of components. Figure 1A The various components shown in the EMBODIMENTS 2000 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.
[0054] The electronic device 100 may include: a processor 110, an external memory interface 120, an internal memory 121, an antenna 1, an antenna 2, a mobile communication module 1510, a wireless communication module 1610, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. Among them, the sensor module 180 may include a gyroscope sensor 180B, an acceleration sensor 180E, and a touch sensor 180K, etc.
[0055] It is to be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or separate some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0056] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0057] The controller may be the nerve center and command center of the electronic device 100. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.
[0058] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0059] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 1510, the wireless communication module 1610, the modem processor and the baseband processor.
[0060] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.
[0061] The mobile communication module 1510 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied to the electronic device 100. The mobile communication module 1510 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 1510 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 1510 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 1510 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 1510 can be set in the same device as at least some of the modules of the processor 110.
[0062] The modem processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker 170A, a receiver 170B, etc.), or displays an image or video through a display screen 194. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be set in the same device as the mobile communication module 1510 or other functional modules.
[0063] The wireless communication module 1610 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 100. The wireless communication module 1610 can be one or more devices integrating at least one communication processing module. The wireless communication module 1610 receives electromagnetic waves via the antenna 2, modulates the frequency of the electromagnetic wave signal and filters it, and sends the processed signal to the processor 110. The wireless communication module 1610 can also receive the signal to be sent from the processor 110, modulate the frequency of it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.
[0064] In some embodiments, the antenna 1 of the electronic device 100 is coupled to the mobile communication module 1510, and the antenna 2 is coupled to the wireless communication module 1610, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology. The GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS) and / or a satellite based augmentation system (SBAS).
[0065] The electronic device 100 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
[0066] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD). The display screen panel can also be made of an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), miniled, microled, micro-oled, a quantum dot light emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.
[0067] The electronic device 100 can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.
[0068] ISP is used to process the data fed back by camera 193. For example, when taking a photo, the shutter is opened, and the light is transmitted to the camera photosensitive element through the lens. The light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to ISP for processing and converts it into an image visible to the naked eye. ISP can also perform algorithm optimization on the noise, brightness, and skin color of the image. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, ISP can be set in camera 193.
[0069] The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then passes the electrical signal to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the electronic device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.
[0070] The digital signal processor is used to process digital signals, and can process not only digital image signals but also other digital signals. For example, when the electronic device 100 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.
[0071] Video codecs are used to compress or decompress digital videos. The electronic device 100 may support one or more video codecs. Thus, the electronic device 100 may play or record videos in a variety of coding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
[0072] NPU is a neural network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain, it can quickly process input information and can also continuously self-learn. Through NPU, applications such as intelligent cognition of electronic device 100 can be realized, such as image recognition, face recognition, voice recognition, text understanding, etc.
[0073] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function, such as storing music, video and other files in the external memory card.
[0074] The internal memory 121 can be used to store computer executable program codes, which include instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the electronic device 100 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.
[0075] The electronic device 100 can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.
[0076] The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 can be arranged in the processor 110, or some functional modules of the audio module 170 can be arranged in the processor 110.
[0077] The speaker 170A, also called a "speaker", is used to convert an audio electrical signal into a sound signal. The electronic device 100 can listen to music or listen to a hands-free call through the speaker 170A.
[0078] The receiver 170B, also called a "earpiece", is used to convert audio electrical signals into sound signals. When the electronic device 100 receives a call or voice message, the voice can be received by placing the receiver 170B close to the human ear.
[0079] Microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can speak by putting their mouth close to microphone 170C to input the sound signal into microphone 170C. The electronic device 100 can be provided with at least one microphone 170C. In other embodiments, the electronic device 100 can be provided with two microphones 170C, which can not only collect sound signals but also realize noise reduction function. In other embodiments, the electronic device 100 can also be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify the sound source, realize directional recording function, etc.
[0080] The earphone interface 170D is used to connect a wired earphone and can be a USB interface, or a 3.5 mm open mobile terminal platform (OMTP) standard interface, or a cellular telecommunications industry association of the USA (CTIA) standard interface.
[0081] The gyro sensor 180B can be used to determine the motion posture of the electronic device 100. In some embodiments, the angular velocity of the electronic device 100 around three axes (i.e., x, y, and z axes) can be determined by the gyro sensor 180B. The gyro sensor 180B can be used for anti-shake shooting. For example, when the shutter is pressed, the gyro sensor 180B detects the angle of the electronic device 100 shaking, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to offset the shaking of the electronic device 100 through reverse movement to achieve anti-shake. The gyro sensor 180B can also be used for navigation and somatosensory game scenes.
[0082] The acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device 100 in all directions (generally three axes). When the electronic device 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of the electronic device and is applied to applications such as horizontal and vertical screen switching and pedometers.
[0083] The touch sensor 180K is also called a "touch panel". The touch sensor 180K can be set on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also called a "touch screen". The touch sensor 180K is used to detect touch operations acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor 180K can also be set on the surface of the electronic device 100, which is different from the position of the display screen 194.
[0084] The button 190 includes a power button, a volume button, etc. The button 190 may be a mechanical button. It may also be a touch button. The electronic device 100 may receive a button input and generate a key signal input related to the user settings and function control of the electronic device 100. The motor 191 may generate a vibration prompt. The SIM card interface 195 is used to connect a SIM card. The SIM card may be connected to or disconnected from the electronic device 100 by inserting the SIM card interface 195 or pulling the SIM card interface 195 out.
[0085] In the embodiment of the present application, the device type of the electronic device 100 can be a mobile phone, a tablet computer, a handheld computer, a desktop computer, a laptop computer, an ultra-mobile personal computer (UMPC), a netbook, a cellular phone, a personal digital assistant (PDA), as well as smart home devices such as smart large screens and smart speakers, wearable devices such as smart bracelets, smart watches, and smart glasses, extended reality (extended reality, XR) devices such as augmented reality (AR), virtual reality (VR), and mixed reality (MR), vehicle-mounted devices or smart city devices, and the like.
[0086] Figure 1B A schematic diagram of the software structure of an electronic device 100 provided in an embodiment of the present application is shown.
[0087] like Figure 1BAs shown, the software system architecture of the electronic device 100 may include an application (APP) layer, an application framework (FWK) layer, a native service (native) layer, and a kernel (kernel) layer.
[0088] The application layer includes one or more applications, for example, one or more game applications, video applications, etc. The application can be used to provide the picture content of the picture frame, and the application can render the picture frame based on the picture content of the picture frame.
[0089] In some embodiments, the first game application can send game information to the application framework layer, so that the electronic device 100 can obtain the game information of the first game application.
[0090] In other embodiments, the first game application may not send the game information to the application framework layer. In this case, the electronic device 100 cannot obtain the game information of the first game application.
[0091] 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 maximum frame rate limited by the first game application, etc. This application takes the game information including the set frame rate as an example for explanation. The set frame rate may be a target frame rate set by a user.
[0092] The application framework layer may include game information and a temperature control frame limit module, wherein the game information is sent by the first game application to the application framework layer.
[0093] The temperature control frame limit module is used to reduce the frame rate after monitoring that the device temperature is greater than the preset temperature to avoid excessive power consumption of the device at a high frame rate.
[0094] The local service layer includes the layer compositor (SurfaceFlinger), the game frame rate control module, the interpolation information and the scheduling service.
[0095] Among them, SurfaceFlinger is used to perform layer synthesis processing on the picture frames rendered by the GPU, generate an interface including the picture frames, and send the interface including the picture frames to the display screen for display.
[0096] The game frame rate control module includes a frame rate calculation module, a feature scene recognition module, a refresh rate control module and a target frame rate control module.
[0097] Among them, the frame rate calculation module can be used to obtain the actual rendering frame rate of the game application through the timestamp statistics of the picture frames when the game information cannot be obtained.
[0098] The feature scene recognition module can be used to recognize feature scenes, such as game scenes and frame rate jitter scenes, where the game scenes can include game loading scenes and game match scenes. The frame rate jitter scenes can include frame rate stabilization scenes and frame rate jitter scenes.
[0099] The refresh rate control module can be used to determine the optimal refresh rate based on one or more influencing factors, and refresh and display the picture frames at the optimal refresh rate.
[0100] The target frame rate control module is used to adjust the game frame rate based on the target frame rate. The optimal refresh rate will limit the game frame rate, and the game frame rate value must not exceed the value of the optimal refresh rate.
[0101] The interpolation information includes the interpolation switch status and interpolation frame rate information of the current game.
[0102] The scheduling service is used to receive the optimal refresh rate sent by the refresh rate control module, determine the target frame rate, and send the target frame rate to the target frame rate control module. The adjustment of the refresh rate may affect the frame rate, and the game frame rate value must not exceed the value of the optimal refresh rate. For example, if the refresh rate is increased, the target frame rate must also be increased, and if the refresh rate is decreased, the target frame rate must also be decreased, so that the target frame rate matches the refresh rate.
[0103] The kernel layer may include graphics processing unit driver (GPUDriver), interpolation chip driver, display subsystem driver and other drivers. Among them, GPU Driver is used to drive the GPU to perform upper layer operations (for example, operations of rendering picture frames configured by the graphics interface). Interpolation chip driver is used to drive the interpolation chip to perform interpolation based on interpolation information. Display subsystem driver is used to drive the display screen to refresh the display picture frame.
[0104] The HW layer includes GPU, PW X5 and DSS.
[0105] The GPU is used to render the picture frame based on the image resources. The PW X5 is used to insert the frame based on the interpolation information. The display subsystem includes components such as the screen, display controller, and display interface. The display subsystem is used to work together to display the picture frame on the screen of the device.
[0106] Figure 1C A schematic diagram of adjusting the refresh rate of an electronic device 100 provided in an embodiment of the present application is shown.
[0107] Among them, the electronic device 100 includes a first game application, a layer synthesizer (SurfaceFlinger), an interpolation module, a temperature control module, a game mode perception module, a game mode configuration file, a game frame rate calculation module, a game feature scene recognition module, a screen refresh rate decision module and a screen refresh rate regulation module.
[0108] Among them, S201, the first game application obtains game information.
[0109] S202: The first game application sends game information to a game feature scene recognition module.
[0110] S203, the game feature scene recognition module sends the game information to the screen refresh rate decision module.
[0111] 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 maximum frame rate limited by the first game application, etc. This application takes the game information including the set frame rate as an example for explanation. The set frame rate may be a target frame rate set by a user.
[0112] The first game application sends the game information to the game feature scene recognition module, and the game feature scene recognition module then sends the game information to the screen refresh rate decision module.
[0113] 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.
[0114] S204. The first game application sends a game mode acquisition request to a game mode perception module.
[0115] S205. The game mode sensing module can obtain the game mode from the game mode configuration file.
[0116] S206: The game mode sensing module obtains the game mode.
[0117] S207. The game mode perception module sends the game mode to the screen refresh rate decision module.
[0118] The first game application can send the game mode to the screen refresh rate decision module. The game mode can be set by the user, and the game mode may include but is not limited to balanced mode, performance mode, and power saving mode, etc. Different game modes correspond to different refresh rate control strategies. Specifically, the first game application can send a game mode acquisition request to the game mode perception module. The game mode perception module can send a read configuration file request to the game mode configuration file. The game mode perception module can obtain the configuration file from the game mode configuration file, and then obtain the game mode from the configuration file. Afterwards, the game mode perception module sends the acquired game mode to the screen refresh rate decision module.
[0119] S208. The first game application sends the buffer information rendered by the game to the layer compositor (SurfaceFlinger).
[0120] S209. The layer compositor (SurfaceFlinger) sends the layer information of the screen frame rendered by the first game application to the game frame rate calculation module.
[0121] The layer compositor can obtain the layer information of the picture frame rendered by the game based on the buffer information rendered by the game.
[0122] Layer information refers to information contained in the frame of the game rendering, such as the layer name. The electronic device can obtain the layers in the first game application based on the layer name and filter to the layers of other applications.
[0123] S210. A game frame rate calculation module calculates a target frame rate of a first game application.
[0124] S211. The game frame rate calculation module sends the target frame rate of the first game application to the screen refresh rate decision module.
[0125] After receiving the rendered layer information sent by the first game application, the layer compositor (SurfaceFlinger) needs to filter out the screen frames of other applications and only needs to calculate the frame rate of the screen frames rendered by the first game application. The layer compositor (SurfaceFlinger) can obtain the layer information of the screen frames rendered by the first game application based on the screen frames rendered by the first game application. The layer compositor (SurfaceFlinger) then sends the layer information of the screen frames rendered by the first game application to the game frame rate calculation module.
[0126] The game frame rate calculation module can determine the target frame rate of the first game application based on the layer information of the screen frame rendered by the first game application, and then send the target frame rate of the first game application to the screen refresh rate decision module.
[0127] S212. The layer synthesizer (SurfaceFlinger) sends the layer information of the picture frame rendered by the first game application to the game feature scene recognition module.
[0128] S213: The game feature scene recognition module calculates and obtains a game scene and / or a frame rate jitter scene of the first game application.
[0129] S214. The game feature scene recognition module sends the game scene and / or frame rate jitter scene of the first game application to the screen refresh rate decision module.
[0130] The layer compositor (SurfaceFlinger) can send the layer information of the picture frame rendered by the first game application to the game feature scene recognition module, and the game feature scene recognition module then calculates the game scene and / or frame rate jitter scene of the first game application.
[0131] Among them, the game scene can include the game loading scene and the game scene. The frame rate jitter scene can include the frame rate stabilization scene and the frame rate jitter scene.
[0132] S215. The frame insertion module sends the frame insertion information to the screen refresh rate decision module.
[0133] The interpolation module sends the interpolation information to the screen refresh rate decision module, wherein the interpolation information may include information such as the interpolation switch state and the interpolation frame rate state of the game.
[0134] S216. The temperature control module sends the temperature control information to the screen refresh rate decision module.
[0135] 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 limit information.
[0136] S217: The screen refresh rate decision module calculates a target refresh rate.
[0137] S218. The screen refresh rate decision module sends the target refresh rate to the screen refresh rate control module.
[0138] The target refresh rate may be an optimal refresh rate determined by combining any one or more of the following factors, including but not limited to: game scene information, jitter scene information, game information, game mode information, temperature information, interpolation information, game split-screen display information, user-set refresh rate information, etc.
[0139] In this way, the screen refresh rate control module can refresh and display the picture frames based on the target refresh rate.
[0140] The following describes the process from rendering to displaying the picture frame.
[0141] First, some concepts related to the rendering and display of picture frames in the embodiments of the present application are introduced.
[0142] 1. Screen refresh rate: It indicates the number of times the display screen on an electronic device refreshes the display frame within 1 second. Generally, the refresh rate of the display screen of an electronic device is related to the fixed parameters of the display screen and is a fixed value.
[0143] In an embodiment of the present application, the electronic device may support multiple optional screen refresh rates, and the multiple optional screen refresh rates may include at least a minimum screen refresh rate and a maximum screen refresh rate.
[0144] Optionally, the multiple optional screen refresh rates may have only two optional screen refresh rates, one being the highest screen refresh rate and the other being the lowest screen refresh rate. Exemplary: the two optional screen refresh rates are: 60 Hz and 90 Hz. Among them, 60 Hz is the lowest screen refresh rate among the multiple optional screen refresh rates, and 90 Hz is the highest screen refresh rate among the multiple optional screen refresh rates.
[0145] Optionally, the multiple optional screen refresh rates may also include more optional screen refresh rates. Exemplarily, three optional screen refresh rates are included: 60 Hz, 90 Hz, and 120 Hz. Among them, 60 Hz is the lowest screen refresh rate among the multiple optional screen refresh rates, and 120 Hz is the highest screen refresh rate among the multiple optional screen refresh rates.
[0146] Optionally, the multiple optional screen refresh rates may also include more optional screen refresh rates. Exemplarily, four optional screen refresh rates are included: 60 Hz, 90 Hz, 120 Hz, and 144 Hz. Among them, 60 Hz is the lowest screen refresh rate among the multiple optional screen refresh rates, and 120 Hz is the highest screen refresh rate among the multiple optional screen refresh rates.
[0147] Optionally, the multiple optional screen refresh rates may also include more optional screen refresh rates. Exemplarily, five optional screen refresh rates are included: 45 Hz, 60 Hz, 90 Hz, 120 Hz, and 240 Hz. Among them, 45 Hz is the lowest screen refresh rate among the multiple optional screen refresh rates, and 240 Hz is the highest screen refresh rate among the multiple optional screen refresh rates.
[0148] It is understandable that, according to actual needs, the multiple optional screen refresh rates may also include more screen refresh rates, and the optional screen refresh rates may also have more different options, which are not limited here.
[0149] 2. Rendering frame rate (framerate): Indicates the number of frames that the application's rendering thread calls the GPU to render in 1 second. The rendering frame rate can be controlled by the application, and the unit of the rendering frame rate is PFS.
[0150] Among them, the maximum value of the rendering frame rate is the screen refresh rate.
[0151] The rendering frame rate determines the speed at which the application's rendering thread calls the GPU to render screen frames. For example, when the rendering frame rate is 60PFS, the application's rendering thread calls the GPU to render a frame in an average of 16.7ms. For another example, when the rendering frame rate is 90PFS, the application's rendering thread calls the GPU to render a frame in an average of 11.1ms. For another example, when the rendering frame rate is 120PFS, the application's rendering thread calls the GPU to render a frame in an average of 8.3ms.
[0152] The higher the rendering frame rate, the faster the application's rendering thread calls the GPU to render screen frames.
[0153] 3. Vertical synchronization (vsync) signal: Since the application needs to call the GPU to render the screen frame first, it can store the rendered screen frame in the layer buffer (buffer) and provide it to the layer synthesizer (SurfaceFlinger) for layer synthesis. After SurfaceFlinger takes out the rendered screen frame from the buffer for layer synthesis, it will send the screen frame after layer synthesis to the display screen for refresh display. When SurfaceFlinger sends the screen frame after layer synthesis to the display screen during the screen refresh process, it is easy for the two different screen frames before and after to overlap and display, causing the screen to tear (tearing) on the display screen. Therefore, in order to prevent this screen tearing phenomenon, the hardware module corresponding to the display screen can generate a vsync signal with the same period as the refresh rate and give it to SurfaceFlinger. After receiving the vsync signal each time, SurfaceFlinger can take out the screen frame from the buffer for layer synthesis and send it to the display screen for refresh display.
[0154] Figure 2 A timing diagram of the picture frame from rendering to display provided in an embodiment of the present application is shown.
[0155] like Figure 2As shown, an application (such as a game application) can send rendering instructions to the GPU to render the screen frame, and after sending the rendering instructions, the application can send a frame sending instruction to SurfaceFlinger. After the GPU renders the screen frame, the GPU can store the screen frame in the buffer indicated by the rendering instruction. After SurfaceFlinger obtains the frame sending instruction, it can obtain the screen frame buffer. After SurfaceFlinger detects that the screen frame buffer is filled with the rendered screen frame, it can wait for the arrival of the next vsync signal, take out the screen frame from the screen frame buffer for layer synthesis, and send it to the display screen for refresh display.
[0156] For example, between vertical synchronization signal 0 (VSYNC0) and vertical synchronization signal 1 (VSYNC1), the application can send rendering instruction A to the GPU and frame instruction A to SurfaceFlinger. After obtaining rendering instruction A, the GPU can render screen frame A and store the rendered screen frame A in the buffer of screen frame A indicated by rendering instruction A. SurfaceFlinger can obtain the buffer of screen frame A by sending frame instruction A, and after detecting that the rendered screen frame A is filled in the buffer of the screen frame, when VSYNC1 arrives, it takes out the screen frame A from the buffer of screen frame A for layer synthesis and sends it to the display screen for refresh display.
[0157] Between vertical synchronization signal 1 (VSYNC1) and vertical synchronization signal 2 (VSYNC2), the application can send rendering instruction B to the GPU and send frame instruction B to SurfaceFlinger. After obtaining rendering instruction B, the GPU can render screen frame B and store the rendered screen frame B in the buffer of screen frame B indicated by rendering instruction B. SurfaceFlinger can obtain the buffer of screen frame B by sending frame instruction B, and after detecting that the buffer of screen frame B is filled with the rendered screen frame B, it can wait until VSYNC2 arrives, take out screen frame B from the buffer of screen frame B for layer synthesis, and send it to the display screen for refresh display.
[0158] Between vertical synchronization signal 2 (VSYNC2) and vertical synchronization signal 3 (VSYNC3), the application can send rendering instruction C to the GPU and send frame instruction C to SurfaceFlinger. After obtaining rendering instruction C, the GPU can render screen frame C and store the rendered screen frame C in the buffer of screen frame C indicated by rendering instruction C. SurfaceFlinger can obtain the buffer of screen frame C by sending frame instruction C, and after detecting that the buffer of screen frame C is filled with the rendered screen frame C, when VSYNC3 arrives, it takes out the screen frame C from the buffer of screen frame C for layer synthesis and sends it to the display screen for refresh display.
[0159] Between vertical synchronization signal 3 (VSYNC3) and vertical synchronization signal 4 (VSYNC4), the application can send rendering instruction D to the GPU and frame instruction D to SurfaceFlinger. After obtaining rendering instruction D, the GPU can render screen frame D and store the rendered screen frame D in the buffer of screen frame D indicated by rendering instruction D. After SurfaceFlinger obtains the buffer of screen frame D by sending frame instruction D and fills the rendered screen frame D in the buffer of screen frame D after detecting it, it can wait until VSYNC4 arrives, take out screen frame D from the buffer of screen frame D for layer synthesis, and send it to the display screen for refresh display.
[0160] The present application is applied in a gaming scenario. In order to save power consumption of the electronic device 100 and enhance the gaming experience of the user, the electronic device can dynamically adjust the refresh rate of the electronic device 100 .
[0161] The electronic device 100 may determine the refresh rate of the electronic device 100 in combination with a variety of factors. The factors include but are not limited to any one or more of the following: game mode, game information, game scene, rendering frame rate jitter scene, whether it is a split-screen game, etc.
[0162] Not limited to the above factors, the factors determining the refresh rate of the electronic device 100 may also be other factors, and this application only uses the above factors as examples.
[0163] First, let me introduce the game scene.
[0164] Figure 3A-3D A schematic diagram of entering a game scene based on a first game application is shown.
[0165] like Figure 3AAs shown, the electronic device 100 may display a desktop, in which a page with application icons is displayed, and the page includes multiple application icons (for example, a setting application icon, an application market application icon, a gallery application icon, a browser application icon, a first game application icon, a second application icon, etc.). A page indicator is also displayed below the multiple application icons to indicate the positional relationship between the currently displayed page and other pages. A tray area is displayed below the page indicator. Among them, the tray area includes multiple tray icons, for example, a camera application icon, an address book application icon, a phone application icon, and an information application icon. The tray area remains displayed when the page is switched. In some embodiments, the above-mentioned page may also include multiple application icons and a page indicator, and the page indicator may not be part of the page and exist separately. The above-mentioned tray icon is also optional, and the embodiments of the present application are not limited to this.
[0166] The electronic device 100 may receive an input (e.g., a click) from a user on a phone application icon. In response to the input operation, the electronic device 100 may load a game resource and display the game. Figure 3B The user interface 340 shown may include the text “Loading”.
[0167] After the game resources are loaded, the electronic device 100 can display Figure 3C The user interface shown. Figure 3C It is a user interface 320 of a game provided in an embodiment of the present application. The user interface 320 can be called a game lobby interface.
[0168] The user interface 320 may include a start game option, for example, the start game option may be a competition option or a qualifying match option in the user interface 320. The user may start the game through the competition option or the qualifying match option in the user interface 320, and the electronic device 100 may display the game match interface.
[0169] For example, Figure 3C As shown, the electronic device 100 may receive an input operation (eg, a click) from a user for a competitive confrontation option in the user interface 320. In response to the input operation from the user, the electronic device 100 may display Figure 3D The user interface 330 shown in FIG. 3 may also be referred to as a game match interface. The user interface 330 includes an exit game option, through which the user can end the game and display the exit game option. Figure 3C User interface 320 is shown.
[0170] Next, it will be described how the above factors determine the refresh rate of the electronic device 100 .
[0171] 1. Adjust the screen refresh rate based on the game scene
[0172] 1. Category of game scenes
[0173] Game scenes may include but are not limited to game loading scenes and game match scenes.
[0174] The game loading scene may refer to the scene after the game application is started and before entering the game lobby or in the game lobby. In the game lobby, users can select game characters, game modes, form teams, match teammates, download resource packs, and receive props and skins.
[0175] For example, the electronic device 100 may receive a user's Figure 3A The input operation of the first game application icon shown in FIG. Figure 3B The user interface 340 shown may be a game loading interface.
[0176] After the electronic device 100 acquires the game resources, the electronic device 100 may display Figure 3C The user interface 320 shown may also be a game loading interface.
[0177] Afterwards, the electronic device 100 may receive the user's input operation for the competitive match option or the qualifying match option in the user interface 320 to start the game and enter the game match. The electronic device 100 may display Figure 3D The user interface 330 shown may be a game playing interface.
[0178] Among them, user interface 340 and user interface 320 can be game loading scenes.
[0179] The user interface 330 may be a game scene.
[0180] It should be noted that the game loading scene and the game match scene can also be other interfaces. This application only explains the game loading scene and the game match scene by way of example, and this application does not limit this.
[0181] 2. Identify game scenes
[0182] (1) Identify game loading scenes and game playing scenes based on frame rate feature information.
[0183] The first game application may call the GPU to render picture frames. The number of picture frames that the first game application calls the GPU to render within 1 second may be referred to as the rendering frame rate of the first game application.
[0184] The frame rate feature information includes but is not limited to one or more of the following: average frame rate, standard deviation of synthesis time of picture frames.
[0185] First, the electronic device 100 may obtain the rendering frame rate of the first game application every second for n consecutive seconds, and calculate the average frame rate within n seconds.
[0186] When the first game application renders a picture frame, each picture frame has a timestamp, and the timestamp is used to identify the moment when the picture frame is successfully rendered, and different picture frames have different timestamps.
[0187] The electronic device 100 can obtain the timestamps of the continuous m frames, and calculate the difference between the timestamps of two adjacent frames to obtain the synthesis time of each frame. For example, the electronic device 100 can obtain the timestamp of frame A, the timestamp of frame B, and the timestamp of frame C. The electronic device 100 can calculate the difference between the timestamp of frame A and the timestamp of frame B to obtain duration A, which is the synthesis time of frame A. The electronic device 100 can calculate the difference between the timestamp of frame B and the timestamp of frame C to obtain duration B, which is the synthesis time of frame B. By analogy, the electronic device 100 can obtain the synthesis time of each frame.
[0188] After the electronic device 100 obtains the composition time of each picture frame in the m picture frames, the electronic device 100 may calculate the composition time standard deviation of the m picture frames based on the composition time of each picture frame.
[0189] When the average frame rate and the synthesis time standard deviation meet preset conditions, the electronic device 100 can determine that the current scene is a game loading scene.
[0190] Exemplarily, when the electronic device 100 determines that the average frame rate is less than 10 PFS and the synthesis time standard deviation is greater than 10 ms, the electronic device 100 may determine that the current scene is a game loading scene.
[0191] When the average frame rate and the synthesis time standard deviation meet the second preset condition, the electronic device 100 can determine that the current scene is a game scene.
[0192] Exemplarily, when the electronic device 100 determines that the average frame rate is greater than 30 PFS and the synthesis time standard deviation is less than 5 ms, the electronic device 100 can determine that the current scene is a game scene.
[0193] (2) Identify game loading scenarios and game playing scenarios based on the average number of DrawCalls.
[0194] Among them, DrawCall is the CPU calling the image application programming interface. When the first game application calls the GPU to render the screen frame, it needs to obtain a large amount of image resources through the CPU, so the CPU can obtain the image resources through DrawCall. The CPU obtains the image application programming interface (such as DirectX interface or OpenGL interface, etc.) through DrawCall, and then obtains the image resources based on the image application programming interface. The CPU then sends the image resources to the GPU, so that the GPU can render the screen frame based on the image resources.
[0195] Figure 4 A schematic diagram showing a method for the electronic device 100 to obtain the number of DrawCalls is shown.
[0196] like Figure 4 As shown, the electronic device 100 includes a game perception module, a graphics common library and a screen refresh rate decision module.
[0197] The graphics common library provides an external interface for the first game application to call to perform drawing and rendering of picture frames.
[0198] S401, the game perception module calls the HOOK glDrawCall function.
[0199] S402: The graphics common library sends the DrawCall operation to the game perception module.
[0200] The game perception module can call the HOOK glDrawCall function, and then, after the first game application executes a DrawCall operation each time, the graphics common library can send each DrawCall operation to the game perception module so that the game perception module can count the number of DrawCalls.
[0201] S403: The game perception module counts the number of DrawCall operations.
[0202] After receiving the DrawCall operation sent by the graphics common library, the game perception module can count the number of DrawCalls and calculate the average number of DrawCalls within a certain period of time. For example, the game perception module can count the number of DrawCall operations within 1 second.
[0203] S404: The game perception module determines the game scene based on the number of DrawCall operations.
[0204] In game scenarios, the game scene is very complex and the image frames change faster. The GPU needs to call a large number of image resources to draw heroes, particle effects, lighting effects, etc., which all rely on DrawCall operations, resulting in a sharp increase in the number of DrawCall operations.
[0205] In the game loading scene, the GPU only needs to draw the loading bar and a small number of scenes, with few image resources and a relatively small number of DrawCall operations.
[0206] Then the game perception module can determine the game scene based on the average number of DrawCall operations.
[0207] For example, the game perception module can count the number of DrawCall operations within 1s and determine the game scene based on the average number of DrawCalls. When the number of DrawCall operations within 1s is greater than a preset value, the game perception module can determine that it is a game match scene. When the number of DrawCall operations within 1s is less than a preset value, the game perception module can determine that it is a game loading scene. Exemplarily, when the number of DrawCall operations within 1s is greater than 200 times, the game perception module can determine that it is a game match scene. When the number of DrawCall operations within 1s is less than 200 times, the game perception module can determine that it is a game loading scene.
[0208] For another example, the game perception module can count the number of DrawCall operations per second for a certain period of time, and determine the game scene based on the number of DrawCall operations per second for a certain period of time. When the number of DrawCall operations per second for a certain period of time is greater than a preset value, the game perception module can determine that it is a game scene. When the number of DrawCall operations per second for a certain period of time is less than a preset value, the game perception module can determine that it is a game loading scene. Exemplarily, when the number of DrawCall operations per second for 3 consecutive seconds is greater than 200 times, the game perception module can determine that it is a game scene. When the number of DrawCall operations per second for 3 consecutive seconds is less than 200 times, the game perception module can determine that it is a game loading scene.
[0209] S405. The game perception module sends the number of DrawCall operations to the screen refresh rate decision module.
[0210] After obtaining the average number of DrawCall operations, the screen refresh rate decision module can determine the game scene based on the average number of DrawCall operations, and then determine the screen refresh rate.
[0211] (3) Identify game loading scenarios and game play scenarios based on the number of IO operations.
[0212] During the game loading scene, IO operations will increase significantly because the game needs to read a large amount of game resource data from the storage medium (such as memory or disk) and load it into the memory for the game to use.
[0213] During the game scene, IO operations will be significantly reduced because the required resources are loaded into the memory during the game loading scene. Only a small amount of resources need to be loaded into the memory during the game scene.
[0214] The electronic device 100 can identify the game loading scenario and the game match scenario based on the number of IO operations.
[0215] When the number of IO operations within a certain period of time is greater than a preset value, the electronic device 100 can determine that the current scene is a game loading scene.
[0216] Exemplarily, when the number of IO operations or the IO operation frequency within a certain period of time is greater than 80% of a preset value, the electronic device 100 may determine that the current scene is a game loading scene.
[0217] When the number of IO operations within a certain period of time is less than a preset value, the electronic device 100 can determine that the current scene is a game loading scene.
[0218] Exemplarily, when the number of IO operations or the IO operation frequency within a certain period of time is less than 80% of a preset value, the electronic device 100 may determine that the current scene is a game loading scene.
[0219] The electronic device 100 may determine the game loading scene and the game playing scene based on any one or more of the above methods. The electronic device 100 may also determine the game loading scene and the game playing scene in combination with other methods, which is not limited in the present application.
[0220] 3. Adjust the refresh rate based on the game scene
[0221] The electronic device 100 refreshes the display picture frame based on a default refresh rate (eg, the first refresh rate).
[0222] When the electronic device 100 determines that a game loading scene has occurred, the electronic device 100 may reduce the refresh rate, for example, adjusting the refresh rate of the electronic device 100 from the first refresh rate to the second refresh rate, where the second refresh rate is less than the first refresh rate. In this way, in the game loading scene, the user's requirements for image quality are not very high, and the electronic device 100 may reduce the refresh rate to save power consumption of the electronic device 100.
[0223] For example, when the electronic device 100 determines that the game loading scene is detected, the electronic device 100 may set the refresh rate of the electronic device 100 to 30 Hz. Correspondingly, the rendering frame rate of the first game application will also decrease, and the rendering frame rate of the first game application will decrease to less than or equal to 30 PFS.
[0224] When the electronic device 100 determines a game scene, the electronic device 100 can increase the refresh rate to make the picture smoother and improve the user's gaming experience. For example, the refresh rate of the electronic device 100 is adjusted from the second refresh rate to the third refresh rate, and the third refresh rate is greater than the second refresh rate.
[0225] In some embodiments, the first game application may receive a frame rate of a game play scene set by a user, and the frame rate of the game play scene set by the user may be referred to as a set frame rate.
[0226] In some embodiments, the first game application can report the set frame rate to the system. After determining that the game game scene has been entered, the electronic device 100 can adjust the refresh rate based on the set frame rate so that the refresh rate value is not lower than the frame rate value and the refresh rate matches the frame rate.
[0227] Exemplarily, 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 greater than or equal to 120 Hz.
[0228] In other embodiments, the first game application will 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. However, the electronic device 100 needs to match the adjusted refresh rate with the set frame rate. Specifically, after determining to enter the game scene, the electronic device 100 adjusts the refresh rate to the maximum value so that the frame rate can reach the set frame rate. After a certain period of time, the frame rate stabilizes near the set frame rate. At this time, the electronic device 100 can 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 refresh rate value is not lower than the frame rate value, and the refresh rate matches the frame rate.
[0229] Exemplarily, when the electronic device 100 can obtain the set frame rate as 120PFS based on the frame rate information, the third refresh rate adjusted by the electronic device 100 can be greater than or equal to 120 Hz.
[0230] 2. Adjust the refresh rate based on the rendering frame rate jitter scene
[0231] There are multiple rendering frame rates to choose from, such as 120PFS, 90PFS, 60PFS and 30PFS.
[0232] For example, in a game scenario, the electronic device 100 renders and refreshes the screen frames at a high frame rate and a high refresh rate. Figure 5A As shown, the first game application renders and synthesizes screen frames at a rendering frame rate of 120PFS, but due to the high CPU load, the rendering frame rate of the first game application is unstable and keeps freezing, resulting in freezes or delays in the game screen, affecting the user's gaming experience.
[0233] Then the electronic device 100 can reduce the rendering frame rate of the first game application to stabilize the frame rate.
[0234] 1. Identify frame rate jitter
[0235] The electronic device 100 can identify whether the frame rate is jittering or stable based on the frame rate characteristic information and the CPU load. The frame rate characteristic information includes but is not limited to the average frame rate and the synthesis time standard deviation of the picture frame.
[0236] (1) Average frame rate
[0237] The electronic device 100 may acquire a certain number of picture frames, and determine an average frame rate of the certain number of picture frames based on the synthesis time of the certain number of picture frames.
[0238] Exemplarily, the electronic device 100 may acquire 200 picture frames, and divide the 200 picture frames into two parts, each part including 100 picture frames.
[0239] like Figure 5B As shown, the electronic device 100 can divide 100 picture frames into window 1, and divide another 100 picture frames into window 2.
[0240] Afterwards, the electronic device 100 divides the 100 picture frames in the window 1 into 5 small windows, each of which includes 20 picture frames.
[0241] Similarly, the electronic device 100 divides the 100 picture frames in the window 2 into 5 small windows, each of which includes 20 picture frames.
[0242] The electronic device 100 can obtain the overall average frame rate of window 1 and window 2, and the average frame rate of each small window.
[0243] The electronic device 100 may obtain the total rendering time of the 200 picture frames, and divide the total rendering time of the 200 picture frames by 200 to obtain the average frame rate of the 200 picture frames.
[0244] Among them, the electronic device 100 can obtain the total rendering time of 20 frames in each small window in window 1 and window 2, and divide the total rendering time of 20 frames in this small window by 200 to obtain the average frame rate of 20 frames in each small window. For example, the electronic device 100 can obtain the total rendering time of 20 frames in the first small window in window 1, and divide the total rendering time of 20 frames in this small window by 200 to obtain the average frame rate of 20 frames in the first small window in window 1. For another example, the electronic device 100 can obtain the total rendering time of 20 frames in the second small window in window 1, and divide the total rendering time of 20 frames in this small window by 200 to obtain the average frame rate of 20 frames in the second small window in window 1. By analogy, the electronic device 100 can obtain the average frame rate of each small window, that is, the average frame rate of 10 small windows.
[0245] In some embodiments, if the electronic device 100 determines the average frame rate of 200 frames and the average frame rate of every 20 frames, and after determining that the average frame rate of 200 frames and the average frame rate of every 20 frames meet preset conditions, the electronic device 100 can determine that the current frame rate is stable.
[0246] Exemplarily, if the difference between the average frame rate of 200 frames and the set frame rate is within a preset range, it can be determined that the current frame rate is stable.
[0247] 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.
[0248] In some embodiments, if the difference between the average frame rate of a certain number of small windows among the average frame rates of 10 small windows and the average frame rate of 200 frames is within a preset range, it can be determined that the current frame rate is stable.
[0249] For example, if the difference between the average frame rate of at least 8 small windows among the average frame rates of 10 small windows and the average frame rate of 200 frames is within a preset range, it can be determined that the current frame rate is stable.
[0250] For example, if the average frame rate of 200 frames is 80PFS, and the average frame rates of at least 8 small windows among the average frame rates of 10 small windows are between 80.5PFS and 79.5PFS, it can be determined that the current frame rate is stable.
[0251] The above-mentioned determination of whether the current frame rate is stable by the average frame rate of the picture frames in the large window and / or the average frame rate of the picture frames in the small window can more accurately reflect whether the frame rate is jittering, thereby improving the accuracy of the electronic device 100 in determining the frame rate jitter.
[0252] (2) Standard deviation of the synthesis time of the picture frame
[0253] When the first game application renders a picture frame, each picture frame has a timestamp, which is used to identify the moment when the picture frame is successfully rendered, and different picture frames have different timestamps. The electronic device 100 can obtain the timestamp of each picture frame in the 200 frames, and calculate the difference between the timestamps of two adjacent frames to obtain the synthesis time of each picture frame. For example, the electronic device 100 can obtain the timestamp of the first frame of the 200 frames, the timestamp of the second frame of the 200 frames, and the timestamp of the third frame of the 200 frames. The electronic device 100 can calculate the difference between the timestamps of the first frame of the 200 frames and the second frame of the 200 frames to obtain a duration 1, which is the synthesis time of the first frame of the 200 frames. The electronic device 100 can calculate the difference between the timestamps of the second frame in the 200 frames and the third frame in the 200 frames to obtain a duration 2, which is the synthesis time of the second frame in the 200 frames. Similarly, the electronic device 100 can obtain the synthesis time of each frame in the 200 frames.
[0254] After the electronic device 100 obtains the synthesis time of each picture frame in the 200 picture frames, the electronic device 100 may calculate the synthesis time standard deviation of the 200 picture frames based on the synthesis time of each picture frame.
[0255] If the synthesis time standard deviation of the 200 picture frames meets the preset condition, the electronic device 100 can determine that the current frame rate is stable.
[0256] Exemplarily, when the electronic device 100 determines that the standard deviation of the synthesis time of 200 frames is less than 3 ms, the electronic device 100 may determine that the current frame rate is stable.
[0257] It should be noted that the above 200 frames and the 20 frames in each small window are only used to explain the present application, and may also include other more or fewer frames, which is not limited in the present application.
[0258] (3)CPU Load
[0259] The electronic device 100 may obtain the CPU load. If the CPU load is greater than a preset value, the electronic device 100 may determine that the frame rate is jittering. If the CPU load is less than a preset value, the electronic device 100 may determine that the frame rate is stable.
[0260] 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 jittering. If the CPU load is less than 85%, the electronic device 100 may determine that the frame rate is stable.
[0261] The electronic device 100 can determine the frame rate jitter or frame rate stability based on any one or several of the above methods. Not limited to the above methods, the electronic device 100 can also determine the frame rate jitter or frame rate stability in combination with other methods, which is not limited in this application.
[0262] 2. Adjust the refresh rate
[0263] After the electronic device 100 determines that the frame rate jitter occurs, the electronic device 100 may adjust the refresh rate. When the refresh rate is reduced, the frame rate of the electronic device 100 will also be reduced to avoid the occurrence of frame rate jitter at a high frame rate.
[0264] Afterwards, the electronic device 100 can monitor the frame rate to see whether the frame rate is jittering or stable. If the frame rate is stable, there is no need to adjust the refresh rate, and the picture frame is rendered at the adjusted frame rate, and the picture frame is refreshed and displayed at the adjusted refresh rate.
[0265] If the frame rate still jitters, the refresh rate needs to be lowered again. After the refresh rate is lowered again, the frame rate of the electronic device 100 will also be lowered again, and the screen frames will be rendered at the re-adjusted frame rate, and the display screen frames will be refreshed at the re-adjusted refresh rate.
[0266] In this way, the electronic device 100 can sequentially reduce the refresh rate of the electronic device 100 to reduce the frame rate, and the refresh rate of the electronic device 100 is no longer adjusted after the frame rate is stabilized.
[0267] For example, before adjustment, the refresh rate of the electronic device 100 is 120 Hz. After identifying the frame rate jitter, the electronic device 100 can reduce the refresh rate to 90 Hz, and the corresponding rendering frame rate of the first game application will also drop to 90 PFS. Figure 5C shown.
[0268] Afterwards, the electronic device 100 can monitor the frame rate to see if the frame rate is jittering or stable. If the frame rate is stable, there is no need to adjust the refresh rate, and the picture frame is rendered at a frame rate of 90PFS. Figure 5C shown.
[0269] If the frame rate is still jittery, the refresh rate needs to be lowered again. The electronic device 100 can reduce the refresh rate to 60 Hz, and the corresponding rendering frame rate of the first game application will also drop to 60 PFS. Figure 5D If the frame rate is stable at 60PFS, the electronic device 100 may no longer adjust the refresh rate. Otherwise, the electronic device 100 may continue to reduce the refresh rate until the frame rate is stable.
[0270] In some embodiments, if the electronic device 100 reduces the frame rate due to the refresh rate, and if the frame rate stabilizes after a period of time, the electronic device 100 can increase the refresh rate again to increase the frame rate, making the picture smoother and improving the user's gaming experience.
[0271] In a possible implementation, the electronic device 100 may gradually increase the refresh rate.
[0272] For example, after the electronic device 100 reduces the refresh rate to 60 Hz, the frame rate of the electronic device 100 has stabilized. The electronic device 100 can increase the refresh rate to 90 Hz, and the electronic device 100 can render the picture frame at a frame rate of 90 PFS. Afterwards, the electronic device 100 determines whether the frame rate of the electronic device 100 is stable.
[0273] If the frame rate of the electronic device 100 is unstable, the electronic device 100 reduces the refresh rate to 60 Hz, and the rendering frame rate of the electronic device 100 is also reduced. The electronic device 100 still renders the picture frames at a frame rate of 60PFS.
[0274] If the frame rate of the electronic device 100 is still stable, the electronic device 100 can increase the refresh rate to 120 Hz, and the electronic device 100 can render the picture frame at a frame rate of 120 PFS. Afterwards, the electronic device 100 determines whether the frame rate of the electronic device 100 is stable.
[0275] If the frame rate of the electronic device 100 is unstable, the electronic device 100 reduces the refresh rate to 90 Hz, and the rendering frame rate of the electronic device 100 is also reduced. The electronic device 100 still renders the picture frames at a frame rate of 90 PFS.
[0276] If the frame rate of the electronic device 100 remains stable, the electronic device 100 can render the picture frames at a frame rate of 120 Hz, and refresh the display picture frames at a refresh rate of 120 Hz.
[0277] Here, the specific implementation of how the electronic device 100 determines whether the frame rate is stable or jittery can be referred to the above description, and this application will not go into details here.
[0278] In this way, the electronic device 100 can dynamically adjust the refresh rate of the electronic device 100 according to the frame rate jitter and frame rate stability, thereby avoiding the frame rate jitter from affecting the user's gaming experience and improving the user's gaming experience.
[0279] In other possible implementations, the electronic device 100 may also directly increase the refresh rate to the highest value.
[0280] For example, after the electronic device 100 reduces the refresh rate to 60 Hz, the frame rate of the electronic device 100 has stabilized. The electronic device 100 can directly increase the refresh rate to 120 Hz, and the electronic device 100 can render the picture frame at a frame rate of 120 PFS. Afterwards, the electronic device 100 determines whether the frame rate of the electronic device 100 is stable.
[0281] If the frame rate of the electronic device 100 remains stable, the electronic device 100 can render the picture frames at a frame rate of 120 Hz, and refresh the display picture frames at a refresh rate of 120 Hz.
[0282] If the frame rate of the electronic device 100 is unstable, the electronic device 100 reduces the refresh rate to 90 Hz, and the rendering frame rate of the electronic device 100 also reduces. The electronic device 100 still renders the picture frame at the frame rate of 90 PFS. Afterwards, the electronic device 100 determines whether the frame rate of the electronic device 100 is stable.
[0283] If the frame rate of the electronic device 100 remains stable, the electronic device 100 can render the picture frames at a frame rate of 90 Hz and refresh the display picture frames at a refresh rate of 90 Hz.
[0284] If the frame rate of the electronic device 100 is unstable, the electronic device 100 reduces the refresh rate to 60 Hz, and the rendering frame rate of the electronic device 100 is also reduced. The electronic device 100 still renders the picture frames at a frame rate of 60PFS.
[0285] 3. Adjust refresh rate based on game information
[0286] In some embodiments, the first game application may receive the frame rate (which may be referred to as the set frame rate) of the game scene of the user operating the device, and the game information may be the set frame rate. The game information may also include other information, such as the maximum frame rate limited by the first game application, etc. This application takes the game information including the set frame rate as an example for explanation.
[0287] Figure 6 A schematic diagram of an electronic device 100 rendering and displaying a picture frame is shown.
[0288] like Figure 6As shown, the first game application may be an application that provides games. The first game application may obtain image resources of the screen frame, render the screen frame based on the image resources of the screen frame, and store the rendered screen frame in a buffer. Afterwards, SurfaceFlinger has a cache queue to store the screen frames to be synthesized. SurfaceFlinger may obtain the rendered screen frames from the buffer and synthesize them, and refresh the synthesized screen frames to be displayed on the screen.
[0289] For example, if the electronic device 100 sets the refresh rate to 60 Hz, and if the first game application and the SurfaceFlinger side share 4 buffers by default, the time period of the vsync signal is 16.6 ms, that is, the first game application renders a frame every approximately 16.6 ms and stores it in the buffer. When SurfaceFlinger occupies 2 buffers to synthesize and send the frame for display, the first game application has 2 buffers left to render the frame. When the refresh rate is 60 Hz and the rendering frame rate of the first game application is also stabilized at 60PFS, the time period of the vsync signal is 16.6 ms, and the first game application renders a frame every approximately 16.6 ms and stores it in the buffer. SurfaceFlinger also reads the frame from the buffer at approximately 16.6 ms and synthesizes and sends the frame for display.
[0290] When the first game application receives a user operation, it will set the rendering frame rate, for example, increase the rendering frame rate and set the frame rate to 120PFS.
[0291] In some embodiments, the first game application can report the set frame rate to the system. After determining that the game game scene has been entered, the electronic device 100 can adjust the refresh rate based on the set frame rate so that the refresh rate value is not lower than the frame rate value and the refresh rate matches the frame rate.
[0292] Exemplarily, when the electronic device 100 obtains that the set frame rate reported by the first game application is 120PFS, the electronic device 100 can set the refresh rate to be greater than or equal to 120hz.
[0293] In other embodiments, the first game application does not report the set frame rate to the system, and the electronic device 100 cannot obtain the set frame rate. SurfaceFlinger still obtains the screen frame from the buffer at 60hz and synthesizes and displays the screen frame. Only after the first game application waits for SurfaceFlinger to obtain the screen frame from the buffer can the first game application store the rendered new screen frame in the idle buffer. In this case, when the refresh rate remains unchanged, the rendering frame rate of the first game application remains basically unchanged, and remains at around 60PFS. Even if the frame rate is set to 120PFS, the rendering frame rate of the first game application will not exceed 60PFS, and the user experience is not good.
[0294] Figure 7 A schematic diagram showing another electronic device 100 rendering and displaying a picture frame is shown.
[0295] like Figure 7 As shown, in order to identify the buffer frame sending characteristics, in the game scene, the first game application can apply for several additional buffers, for example, apply for 4 additional buffers. Under normal circumstances, the first game application can set the 4 additional buffers to the pending state. When the first game application receives a user operation to increase the frame rate, the first game application can set the 4 buffers in the pending state to the active state. The first game application can render and store screen frames based on 6 buffers. In this way, the first game application does not need to wait for SurfaceFlinger to obtain the screen frame from the buffer and release the buffer, which speeds up the speed of the first game application rendering the screen frame and improves the rendering frame rate of the first game application.
[0296] In this way, the electronic device 100 can count the rendering frame rates of the six buffers and obtain the set frame rate. After obtaining the set frame rate, the electronic device 100 can increase the refresh rate so that the adjusted refresh rate value is greater than or equal to the set frame rate, so that the first game application can reach the set frame rate selected by the user.
[0297] In other embodiments, Figure 6It can be seen from the embodiment that SurfaceFlinger occupies two buffers, so one buffer occupied by SurfaceFlinger can be released so that SurfaceFlinger only occupies one buffer. In this way, the first game application can render and store screen frames based on 7 buffers. In this way, the first game application does not need to wait for SurfaceFlinger to obtain the screen frame from the buffer and release the buffer, which speeds up the speed of rendering the screen frame of the first game application and improves the rendering frame rate of the first game application.
[0298] In this way, the electronic device 100 can count the rendering frame rates of the seven buffers and obtain the set frame rate. After obtaining the set frame rate, the electronic device 100 can increase the refresh rate so that the adjusted refresh rate value is greater than or equal to the set frame rate, so that the first game application can reach the set frame rate selected by the user.
[0299] The first game application can apply for 4 buffers to be activated when the first game application is started. The first game application can also apply for 4 buffers to be activated when receiving a user operation to increase the frame rate. This application does not limit this.
[0300] The first game application is not limited to applying for 4 additional buffers. The first game application can also apply for more or fewer buffers, and this application does not impose any limitation on this.
[0301] In this way, the electronic device 100 can dynamically adjust the refresh rate based on the set frame rate in the first game application, so that the first game application can render the screen frame at a higher rendering frame rate.
[0302] 4. Adjust refresh rate based on game mode
[0303] The first game application can provide different game modes, and the electronic device 100 can determine the refresh rate based on the different game modes in the first game application.
[0304] Exemplarily, the first game application may provide a plurality of different game modes, such as a performance mode, a balanced mode, and a power saving mode, etc. Different game modes have different refresh rates obtained based on rendering frame rate matching.
[0305] For example, in the performance mode, the electronic device 100 prioritizes game performance, such as game smoothness and other user experience, so the electronic device 100 can determine a refresh rate that is twice the rendering frame rate based on the rendering frame rate, and use the maximum refresh rate among the refresh rates that are twice the rendering frame rate as the refresh rate in the performance mode. If there is no refresh rate that is twice the rendering frame rate, the refresh rate with the largest value is selected.
[0306] For example, if the rendering frame rate of the first game application is 30PFS, and the refresh rates supported by the electronic device 100 include 30hz, 60hz, 90hz, and 120hz, etc., then the electronic device 100 can determine that the refresh rate is 120hz.
[0307] For example, if the rendering frame rate of the first game application is 60PFS, and the refresh rates supported by the electronic device 100 include 30hz, 60hz, 90hz, and 120hz, etc., then the electronic device 100 can determine that the refresh rate is 120hz.
[0308] For example, if the rendering frame rate of the first game application is 90PFS, and the refresh rates supported by the electronic device 100 include 30hz, 60hz, 90hz, and 120hz, etc., then the electronic device 100 can determine that the refresh rate is 120hz. If there is no refresh rate that is twice the rendering frame rate, the refresh rate with the largest value is selected.
[0309] For another example, for the balanced mode, the electronic device 100 needs to comprehensively consider the game performance and the game power consumption, so the electronic device 100 can determine a refresh rate that is twice the rendering frame rate based on the rendering frame rate, and use the minimum refresh rate among the refresh rates that are twice the rendering frame rate as the refresh rate in the performance mode. If there is no refresh rate that is twice the rendering frame rate, a refresh rate that is closest to the refresh rate that is twice the rendering frame rate is selected.
[0310] For example, if the rendering frame rate of the first game application is 60PFS, and the refresh rates supported by the electronic device 100 include 30hz, 60hz, 90hz, and 120hz, etc., then the electronic device 100 can determine that the refresh rate is 120hz.
[0311] For example, if the rendering frame rate of the first game application is 30PFS, and the refresh rates supported by the electronic device 100 include 30hz, 60hz, 90hz, and 120hz, etc., then the electronic device 100 can determine that the refresh rate is 60hz.
[0312] For example, if the rendering frame rate of the first game application is 80PFS, and the refresh rates supported by the electronic device 100 include 30hz, 60hz, 90hz, and 120hz, etc., then the electronic device 100 can determine that the refresh rate is 80hz. If there is no refresh rate twice the rendering frame rate, a refresh rate closest to the refresh rate twice the rendering frame rate is selected.
[0313] For another example, for the power saving mode, the electronic device 100 only needs to consider the power consumption of the game, and the electronic device 100 can determine the value of the refresh rate based on the value of the rendering frame rate of the first game application, and 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 power of the electronic device 100 can be saved. If there is no refresh rate with the same value as the rendering frame rate, a refresh rate closest to the value of the rendering frame rate is selected.
[0314] For example, if the rendering frame rate of the first game application is 60PFS, and the refresh rates supported by the electronic device 100 include 30hz, 60hz, 90hz, and 120hz, etc., then the electronic device 100 can determine that the refresh rate is 60hz.
[0315] For example, if the rendering frame rate of the first game application is 30PFS, and the refresh rates supported by the electronic device 100 include 30hz, 60hz, 90hz, and 120hz, etc., then the electronic device 100 can determine that the refresh rate is 30hz.
[0316] Not limited to performance mode, balanced mode and power saving mode, the first game application can also provide more other game modes, which is not limited in this application.
[0317] 5. Adjust refresh rate based on temperature information
[0318] The electronic device 100 can monitor the device temperature in real time. When the device temperature is greater than a preset temperature, the electronic device 100 can reduce the refresh rate to reduce the power consumption of the device, reduce the device temperature, and avoid the electronic device 100 from overheating.
[0319] In a possible implementation, the electronic device 100 may reduce the refresh rate to a minimum value.
[0320] For example, if the refresh rate of the electronic device 100 is 120 Hz, the refresh rates supported by the electronic device 100 include 30 Hz, 60 Hz, 90 Hz, and 120 Hz, etc. After the device temperature is greater than the preset temperature, the electronic device 100 can determine that the refresh rate is 30 Hz.
[0321] In other possible implementations, the electronic device 100 may also reduce the refresh rate to one level.
[0322] For example, if the refresh rate of the electronic device 100 is 120 Hz, and the refresh rates supported by the electronic device 100 include 30 Hz, 60 Hz, 90 Hz and 120 Hz, after the device temperature is greater than the preset temperature, the electronic device 100 can determine that the refresh rate is 90 Hz.
[0323] Optionally, after the electronic device 100 reduces 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 a 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.
[0324] 6. Adjust the refresh rate based on interpolation information
[0325] Frame insertion means adding one frame between every two frames of the original screen, shortening the display time between each frame, doubling the time, and increasing the screen refresh rate. For example, the refresh rate can be increased from the original 60Hz to 120HZ. In this way, the load of the mobile phone GPU in rendering the screen frames can be reduced.
[0326] If the user turns on the interpolation function in the first game application, the electronic device 100 can obtain the interpolation value, and then the electronic device 100 needs to adjust the refresh rate value to be greater than or equal to the interpolation value.
[0327] For example, if the interpolation frame selected by the user is 120 Hz, the electronic device 100 needs to adjust the refresh rate to at least 120 Hz.
[0328] 7. Adjust the refresh rate based on the split-screen display of the game
[0329] If the game interface is displayed in split screen, the power consumption of the electronic device 100 will increase. In order to reduce the power consumption of the electronic device 100, the electronic device 100 can reduce the refresh rate.
[0330] In a possible implementation, the electronic device 100 may reduce the refresh rate to a minimum value.
[0331] For example, if the refresh rate of the electronic device 100 is 120 Hz, the refresh rates supported by the electronic device 100 include 30 Hz, 60 Hz, 90 Hz, and 120 Hz, etc. After the game interface is displayed in split screen, the electronic device 100 can determine that the refresh rate is 30 Hz.
[0332] In other possible implementations, the electronic device 100 may also reduce the refresh rate to one level.
[0333] For example, if the refresh rate of the electronic device 100 is 120 Hz, the refresh rates supported by the electronic device 100 include 30 Hz, 60 Hz, 90 Hz, and 120 Hz, etc. After the game interface is displayed in split screen, the electronic device 100 can determine that the refresh rate is 90 Hz.
[0334] Optionally, after the electronic device 100 reduces the refresh rate, the electronic device 100 may also increase the refresh rate of the electronic device 100 after the game is not displayed in split screen. 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 the present application.
[0335] 8. Adjust refresh rate based on user operation
[0336] In some embodiments, the electronic device 100 may also receive a user operation to increase the refresh rate of the electronic device 100. The electronic device 100 may adjust the refresh rate of the electronic device 100 to the refresh rate selected by the user.
[0337] In some embodiments, the user operation may also be referred to as a user setting a refresh rate.
[0338] For example, if the refresh rate of the electronic device 100 is 90 Hz, the refresh rates supported by the electronic device 100 include 30 Hz, 60 Hz, 90 Hz, and 120 Hz, etc. After the electronic device 100 receives the user's setting of the refresh rate to 120 Hz, the electronic device 100 can determine that the refresh rate is 120 Hz.
[0339] The above provides several different methods for adjusting the screen refresh rate. For example, the electronic device 100 can determine the refresh rate based on the game scene, the electronic device 100 can determine the refresh rate based on the rendering frame rate jitter scene, the electronic device 100 can adjust the refresh rate based on the game information, the electronic device 100 can adjust the refresh rate based on the game mode, the electronic device 100 can adjust the refresh rate based on temperature information, the electronic device 100 can adjust the refresh rate based on the interpolation information, the electronic device 100 can adjust the refresh rate based on the game split-screen display, and the electronic device 100 can adjust the refresh rate based on the user operation.
[0340] In some embodiments, the electronic device 100 can adjust the refresh rate based on the above-mentioned different scenarios alone. In other embodiments, the electronic device 100 can also adjust the refresh rate by comprehensively considering two or more scenarios. This application does not limit this.
[0341] This application then introduces that the electronic device 100 comprehensively considers multiple factors such as game scenes, rendering frame rate jitter scenes, game information, game modes, temperature information, interpolation information, game split-screen display, user operations, etc. to jointly determine the refresh rate.
[0342] The electronic device 100 needs to comprehensively consider different factors. Different factors determine different refresh rates, and different factors have different proportions. The electronic device 100 can count the total number of votes for each refresh rate and take the refresh rate with the largest total number of votes as the final refresh rate.
[0343] Table 1
[0344]
[0345] Table 1 shows the weighted votes of different factors affecting the refresh rate. Among them, the weighted votes of the refresh rate determined by the game scene factor are 2 votes. The weighted votes of the refresh rate determined by the rendering frame rate jitter scene factor are 1 vote. The weighted votes of the refresh rate determined by the game information factor are 4 votes. The weighted votes of the refresh rate determined by the balanced mode factor are 3 votes, and the weighted votes of the refresh rate determined by the performance mode and power saving mode factors are 2 votes. The weighted votes of the refresh rate determined by the temperature information factor are 5 votes. The weighted votes of the refresh rate determined by the interpolation information factor are 4 votes. The weighted votes of the refresh rate determined by the game split-screen display factor are 2 votes. The weighted votes of the refresh rate determined by the user operation factor are 1 vote.
[0346] For example, the refresh rates supported by the electronic device 100 include 30 Hz, 60 Hz, 90 Hz, and 120 Hz, and the number of votes for the refresh rate of 30 Hz counted by the electronic device 100 is 3, the number of votes for the refresh rate of 60 Hz counted by the electronic device 100 is 0, the number of votes for the refresh rate of 90 Hz counted by the electronic device 100 is 9, and the number of votes for the refresh rate of 120 Hz counted by the electronic device 100 is 4, then the electronic device 100 can determine that the final refresh rate is 90 Hz. The electronic device 100 can refresh the display frame at a refresh rate of 90 Hz.
[0347] It should be noted that the weighted votes of the above-mentioned factors are only used to explain this application. The weighted votes of the above-mentioned factors may also be other values, and this application does not limit this.
[0348] Figure 8 A schematic diagram showing an electronic device 100 determining a refresh rate based on a combination of multiple factors is shown.
[0349] Exemplarily, the refresh rates supported by the electronic device 100 include 30 Hz, 60 Hz, 90 Hz, and 120 Hz, etc.
[0350] For example, Figure 8 As shown, if the first game application enters the game scene, the electronic device 100 can increase the refresh rate, for example, determine that the refresh rate is 120hz. Then the game scene factor can vote 2 votes for the refresh rate of 120hz.
[0351] For example, Figure 8 As shown, the electronic device 100 recognizes frame rate jitter, and the electronic device 100 can reduce the refresh rate, for example, determine that the refresh rate is 90 Hz. Then the rendering frame rate jitter scene factor can vote for the refresh rate of 90 Hz.
[0352] For example, Figure 8 As shown, the electronic device 100 recognizes the game information (such as the set frame rate), and the electronic device 100 can set the refresh rate value to be greater than or equal to the set frame rate value, for example, the set frame rate is 120PFS, and the refresh rate can be determined to be 120hz. Then the game information factor can vote 4 for the refresh rate of 120hz.
[0353] For example, Figure 8 As shown, the electronic device 100 recognizes the game mode (eg, performance mode), and the electronic device 100 can increase the refresh rate, for example, determining that the refresh rate is 120 Hz. Then the game mode factor can vote 2 for the refresh rate of 120 Hz.
[0354] For example, Figure 8 As shown, the electronic device 100 recognizes that the device temperature is greater than a preset value, and the electronic device 100 can reduce the refresh rate, for example, determining that the refresh rate is 30 Hz. Then the temperature information factor can cast 5 votes for the refresh rate of 30 Hz.
[0355] For example, Figure 8 As shown, the electronic device 100 recognizes that the interpolated frame rate is 120PFS, and the electronic device 100 can set the refresh rate value to a value greater than or equal to the interpolated frame rate. For example, the electronic device 100 can determine that the refresh rate is 120hz. Then the interpolated frame information factor can vote 4 for the refresh rate of 120hz.
[0356] For example, Figure 8 As shown, the electronic device 100 recognizes that the game interface is displayed in split screen, and the electronic device 100 can reduce the refresh rate, for example, determine that the refresh rate is 90hz. Then the game split screen display factor can vote 2 votes for the refresh rate of 90hz.
[0357] For example, Figure 8 As shown, the electronic device 100 recognizes the user operation and adjusts the refresh rate to 120 Hz. The electronic device 100 can adjust the refresh rate to 120 Hz. Then the user operation factor can vote for the refresh rate of 120 Hz.
[0358] Afterwards, the electronic device 100 may count the number of votes for each refresh rate, and use the refresh rate with the largest number of votes as the refresh rate finally determined by the electronic device 100.
[0359] For example, Figure 8 As shown, the electronic device 100 determines that the number of votes for a refresh rate of 30 Hz is 5, the number of votes for a refresh rate of 60 Hz is 0, the number of votes for a refresh rate of 90 Hz is 3, and the number of votes for a refresh rate of 120 Hz is 13. Finally, the electronic device 100 determines that the optimal refresh rate is 120 Hz, and adjusts the refresh rate of the electronic device 100 to 120 Hz. The electronic device 100 can refresh the display frame at a refresh rate of 120 Hz.
[0360] It should be noted that Figure 8 The embodiment is only an example to illustrate how various factors work together to determine the optimal refresh rate. The optimal refresh rate determined by the various factors working together may be different in different situations, and this application does not limit this.
[0361] Fig. 9 A schematic diagram of a refresh rate control method provided in this application.
[0362] S901. The electronic device displays a desktop, where the desktop includes an icon of a first game application.
[0363] For example, the desktop can be Figure 3A User interface 310 is shown.
[0364] The icon of the first game application can be Figure 3A Shown is the app icon that the user clicked.
[0365] 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.
[0366] Among them, the parameter information of the electronic device includes one or more of the following: game scene information, jitter scene information, game information, game mode information, temperature information, interpolation information, game split-screen display information, and user-set refresh rate information.
[0367] Among them, the first refresh rate refers to the screen refresh rate.
[0368] S903: The electronic device refreshes and displays the screen frames of the first game application at a first refresh rate.
[0369] The screen frame of the first game application may be a screen frame of a game loading scene, and the screen frames before entering the game match may be referred to as screen frames of a game loading scene. Figure 3B The user interface 340 and Figure 3C User interface 320 is shown.
[0370] The screen frame of the first game application may also be a screen frame of a game scene. Figure 3D User interface 330 is shown.
[0371] In this way, the electronic device can jointly determine the optimal refresh rate based on one or more of the above factors and dynamically adjust the screen refresh rate so that during the game, the power consumption of the electronic device and the user experience are both optimized, saving the power consumption of the electronic device and improving the user's gaming experience.
[0372] In one possible implementation, digital information includes game scene information, and the game scene information includes game loading scene information and game match 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 first refresh rate based on parameter information of the electronic device, specifically including: the electronic device receives and responds to a first operation of a user on an icon of a first game application, and displays a first screen frame of the first game application, the first screen frame includes a start game option, and the first screen frame is a screen 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 screen frame of the first game application at the first refresh rate, specifically including: the electronic device refreshes and displays the first screen frame at the first refresh rate.
[0373] The first picture frame may be Figure 3C User interface 320 is shown.
[0374] In this way, the electronic device can determine different screen refresh rates based on different game scenarios. In the game loading scenario, the electronic device can reduce the screen refresh rate to save power consumption of the electronic device.
[0375] In one possible implementation, after the electronic device refreshes and displays the first screen frame at a first refresh rate, the method also includes: the electronic device receives and responds to a second operation of the user on a start game option, and determines a second refresh rate based on game play scene information; the electronic device refreshes and displays a second screen frame of the first game application at the second refresh rate, the second screen frame being a screen frame of the game play scene; wherein the second refresh rate is greater than the first refresh rate.
[0376] The second picture frame may be Figure 3D User interface 330 is shown.
[0377] The second frame is displayed after the electronic device receives the second operation of the user for the start game option. The second frame may include an exit game match scene option. The user can stop displaying the second frame of the first game application through the exit game match scene option in the second frame, and start displaying the first frame of the first game application.
[0378] In this way, the electronic device can determine different screen refresh rates based on different game scenarios. In the game match scenario, the electronic device can increase the screen refresh rate to improve the smoothness of the game screen and improve the user experience. In the game loading scenario, the electronic device can reduce the screen refresh rate to save the power consumption of the electronic device.
[0379] In one possible implementation, the parameter information includes game loading scene information and game match 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 first refresh rate based on the parameter information of the electronic device, specifically including: the electronic device receives and responds to a first operation of a user on an icon of a first game application, and displays a second screen frame of the first game application, where the second screen frame is a screen frame of a game match scene; the electronic device determines the first refresh rate based on the game match scene information; the electronic device refreshes and displays the screen frame of the first game application at the first refresh rate, specifically including: the electronic device refreshes and displays the second screen frame of the first game application at the first refresh rate.
[0380] The second picture frame may be Figure 3D User interface 330 is shown.
[0381] In this way, the user can run the first game application in the background before. After the user clicks the icon of the first game application, the first game application can run in the foreground. And the refresh rate corresponding to the game game scene is determined based on the game game scene.
[0382] In one possible implementation, the parameter information includes jitter scene information, the electronic device receives and responds to the user's first operation on the icon of the first game application, and determines the target refresh rate based on the parameter information of the electronic device, specifically including: after the electronic device receives and responds to the user's first operation on the icon of the first game application, if the second condition is not met, the electronic device determines the target refresh rate based on the jitter scene information; wherein the second condition includes one or more of the following: the difference between the average rendering frame rate of the screen frames in at least n windows among the m windows and the average rendering frame rate of the screen frames in the m windows is within a fifth preset value, wherein each window includes a preset number of screen frames; the difference between the average rendering frame rate of the screen frames in the m windows and the set frame rate is within a sixth preset value; the standard deviation of the synthesis time of the screen frames in the m windows is less than the seventh preset value; the CPU load of the electronic device is less than the eighth preset value.
[0383] The set frame rate may be a game frame rate set by the user in the first game application.
[0384] In one possible implementation, the parameter information includes game information, the game information includes a set frame rate, the electronic device receives and responds to a first operation performed by 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 the first operation performed by a user on an icon of the first game application, when the electronic device obtains the set frame rate, the electronic device determines the target refresh rate based on 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.
[0385] The set frame rate may be a game frame rate set by the user in the first game application.
[0386] In some embodiments, the first game application can report the set frame rate to the electronic device, so that the electronic device can 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 cannot obtain the set frame rate.
[0387] When the electronic device can obtain the set frame rate, the electronic device can adjust the screen refresh rate based on the set frame rate, and the screen refresh rate must be greater than or equal to the set frame rate.
[0388] In one possible implementation, the method also includes: when the electronic device is unable to obtain the set frame rate, the electronic device counts the average frame rate of multiple picture frames within a first time period to obtain the set frame rate; the electronic device determines the target refresh rate based on the set frame rate; wherein the value of the target refresh rate is greater than or equal to the value of the average frame rate of the multiple picture frames within the first time period.
[0389] When the electronic device cannot obtain the set frame rate, the electronic device can release the screen refresh rate control. This allows the player of the first game to run at the set frame rate. Afterwards, the electronic device can count the average frame rate within a certain period of time to obtain the set frame rate. The screen refresh rate is determined based on the estimated set frame rate. The target refresh rate is greater than or equal to the average frame rate of multiple frames within the first period of time.
[0390] In a possible implementation, the first game application is allocated q buffers; before the electronic device obtains the set frame rate, the method further includes: the electronic device applies for s additional buffers; the electronic device renders the screen frame based on (q+s) buffers and the set frame rate.
[0391] In this way, the electronic device can dynamically allocate s buffers to the first game application, so that the game frame rate can reach the set frame rate based on a sufficient number of buffers, and the electronic device can obtain the set frame rate by statistics.
[0392] In one possible implementation, the parameter information includes game mode information, the electronic device receives and responds to a first operation performed by 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 the first operation performed by a user on an icon of the first game application, the electronic device obtains the game frame rate of the first game application; the electronic device determines the target refresh rate based on the numerical value of the game frame rate and the game mode information.
[0393] Here, the game frame rate can be the default frame rate of the game or the frame rate set by the user, and this application does not limit this.
[0394] The first game application may provide a plurality of different game modes, and different game modes may have different screen refresh rates determined based on the game frame rate. For example, the game modes may include performance mode, balanced mode, and power saving mode.
[0395] 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 device determines the total number of votes for each of the multiple refresh rates based on the value of the parameter information and the relationship between the value of the parameter information and the number of votes of the multiple refresh rates; the electronic device determines the refresh rate with the largest total number of votes among the multiple refresh rates as the target refresh rate.
[0396] In this way, the electronic device can combine multiple parameter information to jointly determine the optimal refresh rate, so that the power consumption of the electronic device and the performance of the game are balanced.
[0397] 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 are used to store computer program codes, the computer program codes include computer instructions, when the one or more processors execute the computer instructions, the electronic device executes Figure 8 A refresh rate control method is shown.
[0398] The present application provides another electronic device, including one or more functional modules, wherein the one or more functional modules are used to execute Figure 8 A refresh rate control method is shown.
[0399] The present application provides a chip system, which is applied to electronic equipment. The chip system includes a processing circuit and an interface circuit. The interface circuit is used to receive instructions and transmit them to the processing circuit. The processing circuit is used to run the instructions to execute Figure 8 A refresh rate control method is shown.
[0400] The present application provides a computer-readable storage medium, including instructions, which, when executed on an electronic device, enable execution of Figure 8 A refresh rate control method is shown.
[0401] The present application provides a computer program product, which, when executed on a computer, enables the computer to execute Figure 8 A refresh rate control method is shown.
[0402] In the above embodiments, all or part of them may be implemented by software, hardware, firmware or any combination thereof.
[0403] When software is used for implementation, it can 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 the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. 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 a website site, a computer, a server, or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server, or data center. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or a data center that includes one or more available media integrations. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk), etc.
[0404] Those skilled in the art can understand that to implement all or part of the processes in the above-mentioned embodiments, the processes can be completed by computer programs to instruct related hardware, and the programs can be stored in computer-readable storage media. When the programs are executed, they can include the processes of the above-mentioned method embodiments. The aforementioned storage media include: ROM or random access memory RAM, magnetic disk or optical disk and other media that can store program codes.
[0405] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A refresh rate control method, characterized in that: The method comprises: The electronic device displays a desktop at a first refresh rate, wherein the desktop includes an icon of a first game application; The electronic device receives and responds to a first operation of a user on the icon of the first game application, and determines a total number of votes for each of a plurality of refresh rates based on a value of parameter information of the electronic device and a relationship between the value of the parameter information of the electronic device and a plurality of refresh rates, the plurality of refresh rates being refresh rates supported by the electronic device; The electronic device determines a refresh rate with the largest total number of votes among the multiple refresh rates as a target refresh rate; The electronic device refreshes and displays the screen frames of the first game application at the target refresh rate; The parameter information of the electronic device includes: setting frame rate information, game mode information, temperature information, interpolation information, game split-screen display information, and user-set refresh rate information; The electronic device refreshing and displaying the screen frames of the first game application at the target refresh rate specifically includes: The electronic device refreshes and displays the screen frames of the first game application at a second refresh rate; After the electronic device refreshes and displays the screen frames of the first game application at the second refresh rate, if the second refresh rate is a refresh rate that is greater than the first refresh rate and less than the target refresh rate, and the frame rate of the electronic device is stable and / or the temperature of the electronic device is less than a preset temperature, the electronic device displays the screen frames of the first game application at the target refresh rate again; If the second refresh rate is a refresh rate greater than the target refresh rate and less than the first refresh rate, and the frame rate of the electronic device jitters and / or the temperature of the electronic device is greater than the preset temperature, the electronic device displays the screen frames of the first game application at the target refresh rate.
2. The method according to claim 1, characterized in that The parameter information of the electronic device also includes: game scene information and jitter scene information.
3. The method according to claim 1 or 2, characterized in that: The parameter information includes game scene information, the game scene information includes game loading scene information and game match scene information, and the target refresh rate includes a first refresh rate; the electronic device receives and responds to a first operation of a user on an icon of the first game application, and determines the target refresh rate based on the parameter information of the electronic device, specifically including: The electronic device receives and responds to a first operation of the user on the icon of the first game application, and displays a first screen frame of the first game application, wherein the first screen frame includes a start game option and is a screen frame of a game loading scene; The electronic device determines the first refresh rate based on the game loading scene information; The electronic device refreshing and displaying the screen frames of the first game application at the target refresh rate specifically includes: The electronic device refreshes and displays the first picture frame at the first refresh rate.
4. The method according to claim 3, characterized in that After the electronic device refreshes and displays the first picture frame at the first refresh rate, the method further includes: The electronic device receives and responds to a second operation of the user on the start game option, and determines a second refresh rate based on the game match scene information; The electronic device refreshes and displays a second screen frame of the first game application at the second refresh rate, where the second screen frame is a screen frame of a game scene; Wherein, the second refresh rate is greater than the first refresh rate.
5. The method according to claim 1, characterized in that: The parameter information includes game loading scene information and game match scene information, and the target refresh rate includes a second refresh rate; the electronic device receives and responds to a first operation of a user on an icon of the first game application, and determines the second refresh rate based on the parameter information of the electronic device, specifically including: The electronic device receives and responds to a first operation of the user on the icon of the first game application, and displays a second screen frame of the first game application, where the second screen frame is a screen frame of a game scene; The electronic device determines the second refresh rate based on the game match scene information; The electronic device refreshing and displaying the screen frames of the first game application at the target refresh rate specifically includes: The electronic device refreshes and displays the second screen frame of the first game application at the second refresh rate.
6. The method according to claim 4 or 5, characterized in that: Before the electronic device determines the second refresh rate based on the game match scenario information, the method further includes: When the first condition is met, the electronic device determines the game match scene information; The first condition includes one or more of the following: The average rendering frame rate of the consecutive p frames is greater than a first preset value; The standard deviation of the rendering time of the p frames is less than a second preset value; The number of DrawCall operations within the first duration is greater than a third preset value; The number of IO operations within the first time period is greater than a fourth preset value.
7. The method according to claim 1, characterized in that The parameter information includes jitter scene information, the electronic device receives and responds to a first operation of the user on the icon of the 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 the first operation of the user on the icon of the first game application, if the second condition is not met, the electronic device determines the target refresh rate based on the jitter scene information; The second condition includes one or more of the following: The difference between the average rendering frame rate of the picture frames in at least n windows among the 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 includes a preset number of picture frames; The difference between the average rendering frame rate of the picture frames in the m windows and the set frame rate is within a sixth preset value; The synthesis time standard deviation of the picture frames in the m windows is less than a seventh preset value; The CPU load of the electronic device is less than an eighth preset value.
8. The method according to claim 1, characterized in that The parameter information includes the set frame rate, the electronic device receives and responds to a first operation of the user on the icon of the 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 the first operation of the user on the icon of the first game application, in the case where the electronic device obtains the set frame rate, the electronic device determines the target refresh rate based on the set frame rate; The target refresh rate is greater than or equal to the set frame rate.
9. The method according to claim 8, characterized in that The method further comprises: When the electronic device cannot obtain the set frame rate, the electronic device calculates the average frame rate of multiple frames within the first time period to obtain the set frame rate; The electronic device determines the target refresh rate based on the set frame rate; The target refresh rate is greater than or equal to an average frame rate of multiple frames within the first duration.
10. The method according to claim 8 or 9, characterized in that: The first game application is allocated q buffers; before the electronic device obtains the set frame rate, the method further includes: The electronic device applies for s additional buffers; The electronic device renders picture frames based on (q+s) buffers and the set frame rate.
11. The method according to claim 1, characterized in that: The parameter information includes game mode information, the electronic device 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 the parameter information of the electronic device, specifically including: 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 a 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.
12. An electronic device, characterized in that: It comprises one or more processors and one or more memories; wherein, the one or more memories are coupled to the one or more processors, and the one or more memories are used to store computer program code, and the computer program code includes computer instructions, and when the one or more processors execute the computer instructions, the electronic device executes the method as described in any one of claims 1-11.
13. A chip system, characterized in that: The chip system is applied to an electronic device, and the chip system includes a processing circuit and an interface circuit, the interface circuit is used to receive instructions and transmit them to the processing circuit, and the processing circuit is used to run the instructions to execute the method as described in any one of claims 1-11.
14. A computer-readable storage medium, characterized in that: The method comprises instructions, which, when executed on an electronic device, cause the electronic device to execute the method as claimed in any one of claims 1 to 11.
Citation Information
Patent Citations
Terminal equipment performance adjusting method and related device
CN114632329A
Refresh rate adjusting method, equipment and medium
CN116386568A